@microsoft/office-js
Version:
Office JavaScript Library ESM Module for Excel/Word/PowerPoint/Outlook
19,987 lines • 932 kB
JavaScript
import {
OfficeCore,
OfficeExtension
} from './officebase.debug.js';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 __());
};
})();
/*
* This is a generated file based off "otools\inc\richapi\CodeGen\TypeScriptCore.tt".
* Generated by PptApi.RichApi.Gen.bat.
* If there are content placeholders, only edit content inside content placeholders.
* If there are no content placeholders, do not edit this file directly.
*/
/* Begin_PlaceHolder_GlobalHeader */
/* End_PlaceHolder_GlobalHeader */
var PowerPoint;
(function (PowerPoint) {
/* Begin_PlaceHolder_ModuleHeader */
/* End_PlaceHolder_ModuleHeader */
var _hostName = "PowerPoint";
var _defaultApiSetName = "PowerPointApi";
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";
/* Begin_PlaceHolder_Application_BeforeDeclaration */
/* End_PlaceHolder_Application_BeforeDeclaration */
/**
* Represents the PowerPoint application that manages the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.0]
*/
var Application = /** @class */ (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
});
/**
* Inserts a hyperlink on the active slide.
*
* @remarks
* [Api set: PowerPointApi 1.1]
*
* @param address The URL target of the hyperlink being inserted.
* @param displayName The display name of the hyperlink being inserted.
*/
Application.prototype.insertHyperLink = function (address, displayName) {
/* Begin_PlaceHolder_Application_InsertHyperLink */
/* End_PlaceHolder_Application_InsertHyperLink */
_throwIfApiNotSupported("Application.insertHyperLink", _defaultApiSetName, "1.1", _hostName);
_invokeMethod(this, "InsertHyperLink", 0 /* Default */, [address, displayName], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Inserts a slide with the provided content.
*
* @remarks
* [Api set: PowerPointApi 1.1]
*
* @param slideContent Slide content (Office Open XML (OOXML) format) to be inserted.
* @returns The success or failure code from the insert slide activity.
*/
Application.prototype.insertSlideFromContent = function (slideContent) {
/* Begin_PlaceHolder_Application_InsertSlideFromContent */
/* End_PlaceHolder_Application_InsertSlideFromContent */
_throwIfApiNotSupported("Application.insertSlideFromContent", _defaultApiSetName, "1.1", _hostName);
return _invokeMethod(this, "InsertSlideFromContent", 0 /* Default */, [slideContent], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Application.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Application_HandleResult */
/* End_PlaceHolder_Application_HandleResult */
};
/** Handle retrieve results
* @private
*/
Application.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Application_HandleRetrieveResult */
/* End_PlaceHolder_Application_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Create a new instance of the `PowerPoint.Application` object.
*/
Application.newObject = function (context) {
return _createTopLevelServiceObject(PowerPoint.Application, context, "Microsoft.Office.PowerPoint.Application", false /*isCollection*/, 4 /* concurrent */);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
Application.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
return Application;
}(OfficeExtension.ClientObject));
PowerPoint.Application = Application;
/* Begin_PlaceHolder_Application_AfterDeclaration */
/* End_PlaceHolder_Application_AfterDeclaration */
var _typeSensitivityLabelsCatalog = "SensitivityLabelsCatalog";
/* Begin_PlaceHolder_SensitivityLabelsCatalog_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelsCatalog_BeforeDeclaration */
/**
* Provides methods to check the status of the catalog of sensitivity labels in PowerPoint
and retrieve all available sensitivity labels if the catalog is enabled.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelsCatalog = /** @class */ (function (_super) {
__extends(SensitivityLabelsCatalog, _super);
function SensitivityLabelsCatalog() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SensitivityLabelsCatalog.prototype, "_className", {
get: function () {
return "SensitivityLabelsCatalog";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelsCatalog.prototype, "_scalarPropertyNames", {
get: function () {
return ["getLabelingCapability", "getLabelingCapabilities"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelsCatalog.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["GetLabelingCapability", "GetLabelingCapabilities"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelsCatalog.prototype, "getLabelingCapabilities", {
/* Begin_PlaceHolder_SensitivityLabelsCatalog_Custom_Members */
/* End_PlaceHolder_SensitivityLabelsCatalog_Custom_Members */
/**
* Gets the host capabilities for sensitivity labels in PowerPoint.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelsCatalog_GetLabelingCapabilities_get */
/* End_PlaceHolder_SensitivityLabelsCatalog_GetLabelingCapabilities_get */
_throwIfNotLoaded("getLabelingCapabilities", this._G, _typeSensitivityLabelsCatalog, this._isNull);
return this._G;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelsCatalog.prototype, "getLabelingCapability", {
get: function () {
/* Begin_PlaceHolder_SensitivityLabelsCatalog_GetLabelingCapability_get */
/* End_PlaceHolder_SensitivityLabelsCatalog_GetLabelingCapability_get */
_throwIfNotLoaded("getLabelingCapability", this._Ge, _typeSensitivityLabelsCatalog, this._isNull);
return this._Ge;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/**
* Gets the attribute-based access control (ABAC) attributes that are available to the current user.
*
* @remarks
* [Api set: PowerPointApi 1.11]
* @returns An array of objects.
*/
SensitivityLabelsCatalog.prototype.getAttributes = function () {
/* Begin_PlaceHolder_SensitivityLabelsCatalog_GetAttributes */
/* End_PlaceHolder_SensitivityLabelsCatalog_GetAttributes */
return _invokeMethod(this, "GetAttributes", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets sensitivity labels that are available to the current user.
*
* @remarks
* [Api set: PowerPointApi 1.11]
* @returns The current object.
*/
SensitivityLabelsCatalog.prototype.getLabels = function () {
/* Begin_PlaceHolder_SensitivityLabelsCatalog_GetLabels */
/* End_PlaceHolder_SensitivityLabelsCatalog_GetLabels */
return _createMethodObject(PowerPoint.SensitivityLabelDetailsCollection, this, "GetLabels", 1 /* Read */, [], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
SensitivityLabelsCatalog.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SensitivityLabelsCatalog_HandleResult */
/* End_PlaceHolder_SensitivityLabelsCatalog_HandleResult */
if (!_isUndefined(obj["GetLabelingCapabilities"])) {
this._G = obj["GetLabelingCapabilities"];
/* Begin_PlaceHolder_SensitivityLabelsCatalog_HandleResult_Prop_GetLabelingCapabilities */
/* End_PlaceHolder_SensitivityLabelsCatalog_HandleResult_Prop_GetLabelingCapabilities */
}
if (!_isUndefined(obj["GetLabelingCapability"])) {
this._Ge = obj["GetLabelingCapability"];
/* Begin_PlaceHolder_SensitivityLabelsCatalog_HandleResult_Prop_GetLabelingCapability */
/* End_PlaceHolder_SensitivityLabelsCatalog_HandleResult_Prop_GetLabelingCapability */
}
};
SensitivityLabelsCatalog.prototype.load = function (options) {
return _load(this, options);
};
SensitivityLabelsCatalog.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SensitivityLabelsCatalog.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SensitivityLabelsCatalog_HandleRetrieveResult */
/* End_PlaceHolder_SensitivityLabelsCatalog_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Create a new instance of the `PowerPoint.SensitivityLabelsCatalog` object.
*/
SensitivityLabelsCatalog.newObject = function (context) {
return _createTopLevelServiceObject(PowerPoint.SensitivityLabelsCatalog, context, "Microsoft.Office.PowerPoint.SensitivityLabelsCatalog", false /*isCollection*/, 4 /* concurrent */);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SensitivityLabelsCatalog` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SensitivityLabelsCatalogData`) that contains shallow copies of any loaded child properties from the original object.
*/
SensitivityLabelsCatalog.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SensitivityLabelsCatalog.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SensitivityLabelsCatalog.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SensitivityLabelsCatalog;
}(OfficeExtension.ClientObject));
PowerPoint.SensitivityLabelsCatalog = SensitivityLabelsCatalog;
/* Begin_PlaceHolder_SensitivityLabelsCatalog_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelsCatalog_AfterDeclaration */
var _typePresentation = "Presentation";
/* Begin_PlaceHolder_Presentation_BeforeDeclaration */
/* End_PlaceHolder_Presentation_BeforeDeclaration */
/**
* The `Presentation` object is the top-level object with one or more slides that contain the contents of the presentation.
To learn more about the PowerPoint object model,
see {@link https://learn.microsoft.com/office/dev/add-ins/powerpoint/core-concepts | PowerPoint JavaScript object model}.
*
* @remarks
* [Api set: PowerPointApi 1.0]
*/
var Presentation = /** @class */ (function (_super) {
__extends(Presentation, _super);
function Presentation() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Presentation.prototype, "_className", {
get: function () {
return "Presentation";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "_scalarPropertyNames", {
get: function () {
return ["title", "id"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Title", "Id"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "_navigationPropertyNames", {
get: function () {
return ["slides", "slideMasters", "tags", "bindings", "customXmlParts", "properties", "pageSetup", "sensitivityLabel", "experiment"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "bindings", {
/* Begin_PlaceHolder_Presentation_Custom_Members */
/* End_PlaceHolder_Presentation_Custom_Members */
/**
* Returns a collection of bindings that are associated with the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Bindings_get */
/* End_PlaceHolder_Presentation_Bindings_get */
_throwIfApiNotSupported("Presentation.bindings", _defaultApiSetName, "1.8", _hostName);
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.BindingCollection, this, "Bindings", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_Bindings_get_post */
/* End_PlaceHolder_Presentation_Bindings_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "customXmlParts", {
/**
* Returns a collection of custom XML parts that are associated with the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_CustomXmlParts_get */
/* End_PlaceHolder_Presentation_CustomXmlParts_get */
_throwIfApiNotSupported("Presentation.customXmlParts", _defaultApiSetName, "1.7", _hostName);
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.CustomXmlPartCollection, this, "CustomXmlParts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_CustomXmlParts_get_post */
/* End_PlaceHolder_Presentation_CustomXmlParts_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "experiment", {
/**
* Container for first-party experimental APIs. Provides a sandbox surface for new or incubating internal PowerPoint commands for Copilot scenarios.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Experiment_get */
/* End_PlaceHolder_Presentation_Experiment_get */
_throwIfApiNotSupported("Presentation.experiment", _defaultApiSetName, "99.9", _hostName);
if (!this._E) {
this._E = _createPropertyObject(PowerPoint.Experiment, this, "Experiment", false /*isCollection*/, 1 /* restrictedResourceAccess */ | 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_Experiment_get_post */
/* End_PlaceHolder_Presentation_Experiment_get_post */
return this._E;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "pageSetup", {
/**
* Returns the page setup information whose properties control slide setup attributes for the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_PageSetup_get */
/* End_PlaceHolder_Presentation_PageSetup_get */
_throwIfApiNotSupported("Presentation.pageSetup", _defaultApiSetName, "1.10", _hostName);
if (!this._P) {
this._P = _createPropertyObject(PowerPoint.PageSetup, this, "PageSetup", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_PageSetup_get_post */
/* End_PlaceHolder_Presentation_PageSetup_get_post */
return this._P;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "properties", {
/**
* Gets the properties of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Properties_get */
/* End_PlaceHolder_Presentation_Properties_get */
_throwIfApiNotSupported("Presentation.properties", _defaultApiSetName, "1.7", _hostName);
if (!this._Pr) {
this._Pr = _createPropertyObject(PowerPoint.DocumentProperties, this, "Properties", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_Properties_get_post */
/* End_PlaceHolder_Presentation_Properties_get_post */
return this._Pr;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "sensitivityLabel", {
/**
* Returns the sensitivity label of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_SensitivityLabel_get */
/* End_PlaceHolder_Presentation_SensitivityLabel_get */
_throwIfApiNotSupported("Presentation.sensitivityLabel", _defaultApiSetName, "1.11", _hostName);
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.SensitivityLabel, this, "SensitivityLabel", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_SensitivityLabel_get_post */
/* End_PlaceHolder_Presentation_SensitivityLabel_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "slideMasters", {
/**
* Returns the collection of `SlideMaster` objects that are in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_SlideMasters_get */
/* End_PlaceHolder_Presentation_SlideMasters_get */
_throwIfApiNotSupported("Presentation.slideMasters", _defaultApiSetName, "1.3", _hostName);
if (!this._Sl) {
this._Sl = _createPropertyObject(PowerPoint.SlideMasterCollection, this, "SlideMasters", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_SlideMasters_get_post */
/* End_PlaceHolder_Presentation_SlideMasters_get_post */
return this._Sl;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "slides", {
/**
* Returns an ordered collection of slides in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Slides_get */
/* End_PlaceHolder_Presentation_Slides_get */
_throwIfApiNotSupported("Presentation.slides", _defaultApiSetName, "1.2", _hostName);
if (!this._Sli) {
this._Sli = _createPropertyObject(PowerPoint.SlideCollection, this, "Slides", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_Slides_get_post */
/* End_PlaceHolder_Presentation_Slides_get_post */
return this._Sli;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "tags", {
/**
* Returns a collection of tags attached to the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Tags_get */
/* End_PlaceHolder_Presentation_Tags_get */
_throwIfApiNotSupported("Presentation.tags", _defaultApiSetName, "1.3", _hostName);
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.TagCollection, this, "Tags", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Presentation_Tags_get_post */
/* End_PlaceHolder_Presentation_Tags_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "id", {
/**
* Gets the ID of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Id_get */
/* End_PlaceHolder_Presentation_Id_get */
_throwIfNotLoaded("id", this._I, _typePresentation, this._isNull);
_throwIfApiNotSupported("Presentation.id", _defaultApiSetName, "1.5", _hostName);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "title", {
/**
* Returns the title of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.0]
*/
get: function () {
/* Begin_PlaceHolder_Presentation_Title_get */
/* End_PlaceHolder_Presentation_Title_get */
_throwIfNotLoaded("title", this._Ti, _typePresentation, this._isNull);
return this._Ti;
},
enumerable: true,
configurable: true
});
/**
* Executes internal commands defined by the payload. These commands are expected to be created/generated
by first party Copilot SDX to modify the document with specific commands.
More information can be found in the following documentation
PowerPoint Copilot System Design - https://microsoft.sharepoint.com/:p:/t/powerpoint/ES3j2wTjDS5CnqnCCjf2-pABGC8bKEKxmpiLylmu4sdmdQ?e=GfU53w
Returns a custom payload as response to the operation.
[DEPRECATED; kept for backwards-compatibility with existing first-party solutions]. Please use `copilotAction` instead.
*
* @remarks
* [Api set: PptCopilotActionApi 1.0]
*
* @param payload Custom payload to execute commands within the host.
* @param options Options to specify the execution settings.
*/
Presentation.prototype.applyJOfcCommands = function (payload, options) {
/* Begin_PlaceHolder_Presentation_ApplyJOfcCommands */
/* End_PlaceHolder_Presentation_ApplyJOfcCommands */
_throwIfApiNotSupported("Presentation.applyJOfcCommands", "PptCopilotActionApi", "1.0", _hostName);
return _invokeMethod(this, "ApplyJOfcCommands", 0 /* Default */, [payload, options], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Starts a background operation and runs internal commands defined by the payload.
Raises `applyJOfcCommandsCompleted` event when operation completes.
These commands are expected to be created or generated
by first party Copilot SDX to modify the document with specific commands.
More information can be found in the following documentation
PowerPoint Copilot System Design - https://microsoft.sharepoint.com/:p:/t/powerpoint/ES3j2wTjDS5CnqnCCjf2-pABGC8bKEKxmpiLylmu4sdmdQ?e=GfU53w
Returns the `requestId`, which will be provided with the {@link PowerPoint.ApplyJOfcCommandsCompletedEventArgs} when the operation completes.
This `requestId` can be used to wait for the results.
[DEPRECATED; kept for backwards-compatibility with existing first-party solutions]. Please use `copilotActionAsync` instead.
*
* @remarks
* [Api set: PptCopilotActionApi 1.0]
*
* @param payload Custom payload to run commands within the host.
* @param options Options to specify the settings.
*/
Presentation.prototype.applyJOfcCommandsAsync = function (payload, options) {
/* Begin_PlaceHolder_Presentation_ApplyJOfcCommandsAsync */
/* End_PlaceHolder_Presentation_ApplyJOfcCommandsAsync */
_throwIfApiNotSupported("Presentation.applyJOfcCommandsAsync", "PptCopilotActionApi", "1.0", _hostName);
return _invokeMethod(this, "ApplyJOfcCommandsAsync", 0 /* Default */, [payload, options], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Notifies the host application that the add-in's code has finished running in an autorun event.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param autorunEventCompletedOptions Optional. Options for completing the autorun event.
*/
Presentation.prototype.autorunEventCompleted = function (autorunEventCompletedOptions) {
/* Begin_PlaceHolder_Presentation_AutorunEventCompleted */
/* End_PlaceHolder_Presentation_AutorunEventCompleted */
_throwIfApiNotSupported("Presentation.autorunEventCompleted", _defaultApiSetName, "99.9", _hostName);
_invokeMethod(this, "AutorunEventCompleted", 0 /* Default */, [autorunEventCompletedOptions], 0 /* none */, 0 /* none */);
};
/**
* Executes internal commands defined by the payload. These commands are expected to be created/generated
by first party Copilot SDX to modify the document with specific commands.
More information can be found in the following documentation
PowerPoint Copilot System Design - https://microsoft.sharepoint.com/:p:/t/powerpoint/ES3j2wTjDS5CnqnCCjf2-pABGC8bKEKxmpiLylmu4sdmdQ?e=GfU53w
Returns a custom payload as response to the operation.
*
* @remarks
* [Api set: PptCopilotActionApi 1.1]
*
* @param type Category of the payload that defines how the payload should be processed.
* @param payload Custom payload to execute commands within the host.
*/
Presentation.prototype.copilotAction = function (type, payload) {
/* Begin_PlaceHolder_Presentation_CopilotAction */
/* End_PlaceHolder_Presentation_CopilotAction */
_throwIfApiNotSupported("Presentation.copilotAction", "PptCopilotActionApi", "1.1", _hostName);
return _invokeMethod(this, "CopilotAction", 0 /* Default */, [type, payload], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Starts a background operation and runs internal commands defined by the payload.
Raises `applyJOfcCommandsCompleted` event when operation completes.
These commands are expected to be created or generated
by first party Copilot SDX to modify the document with specific commands.
More information can be found in the following documentation
PowerPoint Copilot System Design - https://microsoft.sharepoint.com/:p:/t/powerpoint/ES3j2wTjDS5CnqnCCjf2-pABGC8bKEKxmpiLylmu4sdmdQ?e=GfU53w
Returns the `requestId`, which will be provided with the {@link PowerPoint.ApplyJOfcCommandsCompletedEventArgs} when the operation completes.
This `requestId` can be used to wait for the results.
*
* @remarks
* [Api set: PptCopilotActionApi 1.1]
*
* @param type Category of the payload that defines how the payload should be processed.
* @param payload Custom payload to run commands within the host.
*/
Presentation.prototype.copilotActionAsync = function (type, payload) {
/* Begin_PlaceHolder_Presentation_CopilotActionAsync */
/* End_PlaceHolder_Presentation_CopilotActionAsync */
_throwIfApiNotSupported("Presentation.copilotActionAsync", "PptCopilotActionApi", "1.1", _hostName);
return _invokeMethod(this, "CopilotActionAsync", 0 /* Default */, [type, payload], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Returns the current active {@link PowerPoint.Slide} that is visible in the editing area.
If there's no active slide, 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.11]
*/
Presentation.prototype.getActiveSlideOrNullObject = function () {
/* Begin_PlaceHolder_Presentation_GetActiveSlideOrNullObject */
/* End_PlaceHolder_Presentation_GetActiveSlideOrNullObject */
_throwIfApiNotSupported("Presentation.getActiveSlideOrNullObject", _defaultApiSetName, "1.11", _hostName);
return _createMethodObject(PowerPoint.Slide, this, "GetActiveSlideOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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 1.5]
*/
Presentation.prototype.getSelectedShapes = function () {
/* Begin_PlaceHolder_Presentation_GetSelectedShapes */
/* End_PlaceHolder_Presentation_GetSelectedShapes */
_throwIfApiNotSupported("Presentation.getSelectedShapes", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.ShapeScopedCollection, this, "GetSelectedShapes", 0 /* Default */, [], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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 1.5]
*/
Presentation.prototype.getSelectedSlides = function () {
/* Begin_PlaceHolder_Presentation_GetSelectedSlides */
/* End_PlaceHolder_Presentation_GetSelectedSlides */
_throwIfApiNotSupported("Presentation.getSelectedSlides", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.SlideScopedCollection, this, "GetSelectedSlides", 0 /* Default */, [], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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 1.5]
*/
Presentation.prototype.getSelectedTextRange = function () {
/* Begin_PlaceHolder_Presentation_GetSelectedTextRange */
/* End_PlaceHolder_Presentation_GetSelectedTextRange */
_throwIfApiNotSupported("Presentation.getSelectedTextRange", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.TextRange, this, "GetSelectedTextRange", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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.
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.5]
*/
Presentation.prototype.getSelectedTextRangeOrNullObject = function () {
/* Begin_PlaceHolder_Presentation_GetSelectedTextRangeOrNullObject */
/* End_PlaceHolder_Presentation_GetSelectedTextRangeOrNullObject */
_throwIfApiNotSupported("Presentation.getSelectedTextRangeOrNullObject", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.TextRange, this, "GetSelectedTextRangeOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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.
*/
Presentation.prototype.insertSlidesFromBase64 = function (base64File, options) {
/* Begin_PlaceHolder_Presentation_InsertSlidesFromBase64 */
/* End_PlaceHolder_Presentation_InsertSlidesFromBase64 */
_throwIfApiNotSupported("Presentation.insertSlidesFromBase64", _defaultApiSetName, "1.2", _hostName);
_invokeMethod(this, "InsertSlidesFromBase64", 0 /* Default */, [base64File, options], 0 /* none */, 0 /* none */);
};
/**
* Selects the slides in the current view of the presentation. Existing slide selection is replaced with the new selection.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*
* @param slideIds List of slide IDs to select in the presentation. If the list is empty, selection is cleared.
*/
Presentation.prototype.setSelectedSlides = function (slideIds) {
/* Begin_PlaceHolder_Presentation_SetSelectedSlides */
/* End_PlaceHolder_Presentation_SetSelectedSlides */
_throwIfApiNotSupported("Presentation.setSelectedSlides", _defaultApiSetName, "1.5", _hostName);
_invokeMethod(this, "SetSelectedSlides", 0 /* Default */, [slideIds], 0 /* none */, 0 /* none */);
};
Presentation.prototype._RegisterEvent = function (referenceId, eventType) {
/* Begin_PlaceHolder_Presentation__RegisterEvent */
/* End_PlaceHolder_Presentation__RegisterEvent */
_invokeMethod(this, "_RegisterEvent", 1 /* Read */, [referenceId, eventType], 4 /* concurrent */, 0 /* none */);
};
/**
* Register Event applyJOfcCommandsCompleted
*
* @remarks
* [Api set: PptCopilotActionApi 1.0]
*/
Presentation.prototype._RegisterEventApplyJOfcCommandsCompleted = function () {
/* Begin_PlaceHolder_Presentation__RegisterEventApplyJOfcCommandsCompleted */
/* End_PlaceHolder_Presentation__RegisterEventApplyJOfcCommandsCompleted */
_throwIfApiNotSupported("Presentation._RegisterEventApplyJOfcCommandsCompleted", "PptCopilotActionApi", "1.0", _hostName);
_invokeMethod(this, "_RegisterEventApplyJOfcCommandsCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event copilotActionCompleted
*
* @remarks
* [Api set: PptCopilotActionApi 1.1]
*/
Presentation.prototype._RegisterEventCopilotActionCompleted = function () {
/* Begin_PlaceHolder_Presentation__RegisterEventCopilotActionCompleted */
/* End_PlaceHolder_Presentation__RegisterEventCopilotActionCompleted */
_throwIfApiNotSupported("Presentation._RegisterEventCopilotActionCompleted", "PptCopilotActionApi", "1.1", _hostName);
_invokeMethod(this, "_RegisterEventCopilotActionCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event shapeSelectionChanged
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
Presentation.prototype._RegisterEventShapeSelectionChanged = function () {
/* Begin_PlaceHolder_Presentation__RegisterEventShapeSelectionChanged */
/* End_PlaceHolder_Presentation__RegisterEventShapeSelectionChanged */
_throwIfApiNotSupported("Presentation._RegisterEventShapeSelectionChanged", _defaultApiSetName, "99.9", _hostName);
_invokeMethod(this, "_RegisterEventShapeSelectionChanged", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event slideSelectionChanged
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Presentation.prototype._RegisterEventSlideSelectionChanged = function () {
/* Begin_PlaceHolder_Presentation__RegisterEventSlideSelectionChanged */
/* End_PlaceHolder_Presentation__RegisterEventSlideSelectionChanged */
_throwIfApiNotSupported("Presentation._RegisterEventSlideSelectionChanged", _defaultApiSetName, "1.11", _hostName);
_invokeMethod(this, "_RegisterEventSlideSelectionChanged", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
Presentation.prototype._UnregisterEvent = function (referenceId, eventType) {
/* Begin_PlaceHolder_Presentation__UnregisterEvent */
/* End_PlaceHolder_Presentation__UnregisterEvent */
_invokeMethod(this, "_UnregisterEvent", 1 /* Read */, [referenceId, eventType], 4 /* concurrent */, 0 /* none */);
};
/**
* Register Event applyJOfcCommandsCompleted
*
* @remarks
* [Api set: PptCopilotActionApi 1.0]
*/
Presentation.prototype._UnregisterEventApplyJOfcCommandsCompleted = function () {
/* Begin_PlaceHolder_Presentation__UnregisterEventApplyJOfcCommandsCompleted */
/* End_PlaceHolder_Presentation__UnregisterEventApplyJOfcCommandsCompleted */
_throwIfApiNotSupported("Presentation._UnregisterEventApplyJOfcCommandsCompleted", "PptCopilotActionApi", "1.0", _hostName);
_invokeMethod(this, "_UnregisterEventApplyJOfcCommandsCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event copilotActionCompleted
*
* @remarks
* [Api set: PptCopilotActionApi 1.1]
*/
Presentation.prototype._UnregisterEventCopilotActionCompleted = function () {
/* Begin_PlaceHolder_Presentation__UnregisterEventCopilotActionCompleted */
/* End_PlaceHolder_Presentation__UnregisterEventCopilotActionCompleted */
_throwIfApiNotSupported("Presentation._UnregisterEventCopilotActionCompleted", "PptCopilotActionApi", "1.1", _hostName);
_invokeMethod(this, "_UnregisterEventCopilotActionCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event shapeSelectionChanged
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
Presentation.prototype._UnregisterEventShapeSelectionChanged = function () {
/* Begin_PlaceHolder_Presentation__UnregisterEventShapeSelectionChanged */
/* End_PlaceHolder_Presentation__UnregisterEventShapeSelectionChanged */
_throwIfApiNotSupported("Presentation._UnregisterEventShapeSelectionChanged", _defaultApiSetName, "99.9", _hostName);
_invokeMethod(this, "_UnregisterEventShapeSelectionChanged", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event slideSelectionChanged
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Presentation.prototype._UnregisterEventSlideSelectionChanged = function () {
/* Begin_PlaceHolder_Presentation__UnregisterEventSlideSelectionChanged */
/* End_PlaceHolder_Presentation__UnregisterEventSlideSelectionChanged */
_throwIfApiNotSupported("Presentation._UnregisterEventSlideSelectionChanged", _defaultApiSetName, "1.11", _hostName);
_invokeMethod(this, "_UnregisterEventSlideSelectionChanged", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Presentation.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Presentation_HandleResult */
/* End_PlaceHolder_Presentation_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Presentation_HandleResult_Prop_Id */
/* End_PlaceHolder_Presentation_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Title"])) {
this._Ti = obj["Title"];
/* Begin_PlaceHolder_Presentation_HandleResult_Prop_Title */
/* End_PlaceHolder_Presentation_HandleResult_Prop_Title */
}
_handleNavigationPropertyResults(this, obj, ["bindings", "Bindings", "customXmlParts", "CustomXmlParts", "experiment", "Experiment", "pageSetup", "PageSetup", "properties", "Properties", "sensitivityLabel", "SensitivityLabel", "slideMasters", "SlideMasters", "slides", "Slides", "tags", "Tags"]);
};
Presentation.prototype.load = function (options) {
return _load(this, options);
};
Presentation.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Presentation.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Presentation_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Presentation_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Presentation.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Presentation_HandleRetrieveResult */
/* End_PlaceHolder_Presentation_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
Object.defineProperty(Presentation.prototype, "onApplyJOfcCommandsCompleted", {
/**
* Occurs when the background operation started by `ApplyJOfcCommands` has finished.
[DEPRECATED; kept for backwards-compatibility with existing first-party solutions]. Please use `copilotActionCompleted` event instead.
*
* @remarks
* [Api set: PptCopilotActionApi 1.0]
*
* @eventproperty
*/
get: function () {
var _this = this;
// Event - Presentation ApplyJOfcCommandsCompleted PowerPoint.ApplyJOfcCommandsCompletedEventArgs
_throwIfApiNotSupported("Presentation.onApplyJOfcCommandsCompleted", "PptCopilotActionApi", "1.0", _hostName);
if (!this.m_applyJOfcCommandsCompleted) {
this.m_applyJOfcCommandsCompleted = new OfficeExtension.GenericEventHandlers(this.context, this, "ApplyJOfcCommandsCompleted", {
eventType: 1 /* presentationApplyJOfcCommandsCompletedEvent */,
registerFunc: function () { return _this._RegisterEventApplyJOfcCommandsCompleted(); },
unregisterFunc: function () { return _this._UnregisterEventApplyJOfcCommandsCompleted(); },
getTargetIdFunc: function () { return _this.id; },
eventArgsTransformFunc: function (value) {
var event = {
requestId: value.requestId,
result: value.result
};
return OfficeExtension.Utility._createPromiseFromResult(event);
}
});
}
return this.m_applyJOfcCommandsCompleted;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "onCopilotActionCompleted", {
/**
* Occurs when the background operation started by `copilotActionAsync` has finished.
*
* @remarks
* [Api set: PptCopilotActionApi 1.1]
*
* @eventproperty
*/
get: function () {
var _this = this;
// Event - Presentation CopilotActionCompleted PowerPoint.CopilotActionCompletedEventArgs
_throwIfApiNotSupported("Presentation.onCopilotActionCompleted", "PptCopilotActionApi", "1.1", _hostName);
if (!this.m_copilotActionCompleted) {
this.m_copilotActionCompleted = new OfficeExtension.GenericEventHandlers(this.context, this, "CopilotActionCompleted", {
eventType: 2 /* presentationCopilotActionCompletedEvent */,
registerFunc: function () { return _this._RegisterEventCopilotActionCompleted(); },
unregisterFunc: function () { return _this._UnregisterEventCopilotActionCompleted(); },
getTargetIdFunc: function () { return _this.id; },
eventArgsTransformFunc: function (value) {
var event = {
requestId: value.requestId,
result: value.result
};
return OfficeExtension.Utility._createPromiseFromResult(event);
}
});
}
return this.m_copilotActionCompleted;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "onShapeSelectionChanged", {
/**
* Occurs when the selection of shapes changes.
This event is raised when the user selects a different set of shapes or clears the selection (including when navigating to a different slide with shapes previously selected).
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @eventproperty
*/
get: function () {
var _this = this;
// Event - Presentation ShapeSelectionChanged PowerPoint.ShapeSelectionChangedEventArgs
_throwIfApiNotSupported("Presentation.onShapeSelectionChanged", _defaultApiSetName, "99.9", _hostName);
if (!this.m_shapeSelectionChanged) {
this.m_shapeSelectionChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "ShapeSelectionChanged", {
eventType: 4 /* presentationShapeSelectionChangedEvent */,
registerFunc: function () { return _this._RegisterEventShapeSelectionChanged(); },
unregisterFunc: function () { return _this._UnregisterEventShapeSelectionChanged(); },
getTargetIdFunc: function () { return _this.id; },
eventArgsTransformFunc: function (value) {
var event = {
shapeIds: value.shapeIds,
slideId: value.slideId
};
return OfficeExtension.Utility._createPromiseFromResult(event);
}
});
}
return this.m_shapeSelectionChanged;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Presentation.prototype, "onSlideSelectionChanged", {
/**
* Occurs when the selection of slides in the presentation changes.
This event is raised when the user selects a different slide or changes the selection of slides.
This event is not raised when the selection of the contents (for example, shapes) in the slide changes.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @eventproperty
*/
get: function () {
var _this = this;
// Event - Presentation SlideSelectionChanged PowerPoint.SlideSelectionChangedEventArgs
_throwIfApiNotSupported("Presentation.onSlideSelectionChanged", _defaultApiSetName, "1.11", _hostName);
if (!this.m_slideSelectionChanged) {
this.m_slideSelectionChanged = new OfficeExtension.GenericEventHandlers(this.context, this, "SlideSelectionChanged", {
eventType: 3 /* presentationSlideSelectionChangedEvent */,
registerFunc: function () { return _this._RegisterEventSlideSelectionChanged(); },
unregisterFunc: function () { return _this._UnregisterEventSlideSelectionChanged(); },
getTargetIdFunc: function () { return _this.id; },
eventArgsTransformFunc: function (value) {
var event = {
slideIds: value.slideIds
};
return OfficeExtension.Utility._createPromiseFromResult(event);
}
});
}
return this.m_slideSelectionChanged;
},
enumerable: true,
configurable: true
});
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
Presentation.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {
"title": this._Ti,
},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Presentation.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Presentation.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Presentation;
}(OfficeExtension.ClientObject));
PowerPoint.Presentation = Presentation;
/* Begin_PlaceHolder_AddSlideOptions_AfterDeclaration */
/* End_PlaceHolder_AddSlideOptions_AfterDeclaration */
var _typeAdjustments = "Adjustments";
/* Begin_PlaceHolder_Adjustments_BeforeDeclaration */
/* End_PlaceHolder_Adjustments_BeforeDeclaration */
/**
* Represents the adjustment values for a shape.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var Adjustments = /** @class */ (function (_super) {
__extends(Adjustments, _super);
function Adjustments() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Adjustments.prototype, "_className", {
get: function () {
return "Adjustments";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Adjustments.prototype, "_scalarPropertyNames", {
get: function () {
return ["count"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Adjustments.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Count"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Adjustments.prototype, "count", {
/* Begin_PlaceHolder_Adjustments_Custom_Members */
/* End_PlaceHolder_Adjustments_Custom_Members */
/**
* Specifies the number of adjustment points.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Adjustments_Count_get */
/* End_PlaceHolder_Adjustments_Count_get */
_throwIfNotLoaded("count", this._C, _typeAdjustments, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/**
* Gets the adjustment value at the specified zero-based index.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the adjustment to retrieve.
* @returns The adjustment value at the given index.
*/
Adjustments.prototype.get = function (index) {
/* Begin_PlaceHolder_Adjustments_Get */
/* End_PlaceHolder_Adjustments_Get */
return _invokeMethod(this, "Get", 1 /* Read */, [index], 4 /* concurrent */, 0 /* none */);
};
/**
* Sets the adjustment value at the specified zero-based index.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the adjustment to set.
* @param value The adjustment value to set.
*/
Adjustments.prototype.set = function (index, value) {
/* Begin_PlaceHolder_Adjustments_Set */
/* End_PlaceHolder_Adjustments_Set */
_invokeMethod(this, "Set", 0 /* Default */, [index, value], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Adjustments.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Adjustments_HandleResult */
/* End_PlaceHolder_Adjustments_HandleResult */
if (!_isUndefined(obj["Count"])) {
this._C = obj["Count"];
/* Begin_PlaceHolder_Adjustments_HandleResult_Prop_Count */
/* End_PlaceHolder_Adjustments_HandleResult_Prop_Count */
}
};
Adjustments.prototype.load = function (options) {
return _load(this, options);
};
Adjustments.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Adjustments.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Adjustments_HandleRetrieveResult */
/* End_PlaceHolder_Adjustments_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Adjustments` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.AdjustmentsData`) that contains shallow copies of any loaded child properties from the original object.
*/
Adjustments.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Adjustments.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Adjustments.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Adjustments;
}(OfficeExtension.ClientObject));
PowerPoint.Adjustments = Adjustments;
/* Begin_PlaceHolder_AutorunEventType_BeforeDeclaration */
/* End_PlaceHolder_AutorunEventType_BeforeDeclaration */
/**
* Specifies the type of autorun event.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
var AutorunEventType;
(function (AutorunEventType) {
/**
* The Autorun event type is unknown.
* @remarks
* [Api set: PowerPointApi 99.9]
*/
AutorunEventType["unknown"] = "Unknown";
/**
* The Autorun event type is triggered when the document is saved.
* @remarks
* [Api set: PowerPointApi 99.9]
*/
AutorunEventType["onDocumentSave"] = "OnDocumentSave";
/**
* The Autorun event type is triggered when the document is saved as a new file.
* @remarks
* [Api set: PowerPointApi 99.9]
*/
AutorunEventType["onDocumentSaveAs"] = "OnDocumentSaveAs";
})(AutorunEventType = PowerPoint.AutorunEventType || (PowerPoint.AutorunEventType = {}));
/* Begin_PlaceHolder_BindingType_BeforeDeclaration */
/* End_PlaceHolder_BindingType_BeforeDeclaration */
/**
* Represents the possible binding types.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var BindingType;
(function (BindingType) {
/**
* Represents a shape binding.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
BindingType["shape"] = "Shape";
})(BindingType = PowerPoint.BindingType || (PowerPoint.BindingType = {}));
/* Begin_PlaceHolder_BindingType_AfterDeclaration */
/* End_PlaceHolder_BindingType_AfterDeclaration */
var _typeCustomXmlPart = "CustomXmlPart";
/* Begin_PlaceHolder_CustomXmlPart_BeforeDeclaration */
/* End_PlaceHolder_CustomXmlPart_BeforeDeclaration */
/**
* Represents a custom XML part object.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var CustomXmlPart = /** @class */ (function (_super) {
__extends(CustomXmlPart, _super);
function CustomXmlPart() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CustomXmlPart.prototype, "_className", {
get: function () {
return "CustomXmlPart";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "namespaceUri"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "NamespaceUri"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPart.prototype, "id", {
/* Begin_PlaceHolder_CustomXmlPart_Custom_Members */
/* End_PlaceHolder_CustomXmlPart_Custom_Members */
/**
* The ID of the custom XML part.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_CustomXmlPart_Id_get */
/* End_PlaceHolder_CustomXmlPart_Id_get */
_throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", {
/**
* The namespace URI of the custom XML part.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_CustomXmlPart_NamespaceUri_get */
/* End_PlaceHolder_CustomXmlPart_NamespaceUri_get */
_throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull);
return this._N;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/**
* Deletes the custom XML part.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomXmlPart.prototype.delete = function () {
/* Begin_PlaceHolder_CustomXmlPart_Delete */
/* End_PlaceHolder_CustomXmlPart_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Gets the XML content of the custom XML part.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomXmlPart.prototype.getXml = function () {
/* Begin_PlaceHolder_CustomXmlPart_GetXml */
/* End_PlaceHolder_CustomXmlPart_GetXml */
return _invokeMethod(this, "GetXml", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Sets the XML content for the custom XML part.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param xml XML content for the part.
*/
CustomXmlPart.prototype.setXml = function (xml) {
/* Begin_PlaceHolder_CustomXmlPart_SetXml */
/* End_PlaceHolder_CustomXmlPart_SetXml */
_invokeMethod(this, "SetXml", 0 /* Default */, [xml], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
CustomXmlPart.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CustomXmlPart_HandleResult */
/* End_PlaceHolder_CustomXmlPart_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_CustomXmlPart_HandleResult_Prop_Id */
/* End_PlaceHolder_CustomXmlPart_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["NamespaceUri"])) {
this._N = obj["NamespaceUri"];
/* Begin_PlaceHolder_CustomXmlPart_HandleResult_Prop_NamespaceUri */
/* End_PlaceHolder_CustomXmlPart_HandleResult_Prop_NamespaceUri */
}
};
CustomXmlPart.prototype.load = function (options) {
return _load(this, options);
};
CustomXmlPart.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
CustomXmlPart.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_CustomXmlPart_HandleIdResult_Prop_Id */
/* End_PlaceHolder_CustomXmlPart_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
CustomXmlPart.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CustomXmlPart_HandleRetrieveResult */
/* End_PlaceHolder_CustomXmlPart_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object.
*/
CustomXmlPart.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
CustomXmlPart.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
CustomXmlPart.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return CustomXmlPart;
}(OfficeExtension.ClientObject));
PowerPoint.CustomXmlPart = CustomXmlPart;
/* Begin_PlaceHolder_CustomXmlPart_AfterDeclaration */
/* End_PlaceHolder_CustomXmlPart_AfterDeclaration */
var _typeCustomXmlPartScopedCollection = "CustomXmlPartScopedCollection";
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_BeforeDeclaration */
/* End_PlaceHolder_CustomXmlPartScopedCollection_BeforeDeclaration */
/**
* A scoped collection of custom XML parts.
A scoped collection is the result of some operation (such as filtering by namespace).
A scoped collection cannot be scoped any further.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var CustomXmlPartScopedCollection = /** @class */ (function (_super) {
__extends(CustomXmlPartScopedCollection, _super);
function CustomXmlPartScopedCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", {
get: function () {
return "CustomXmlPartScopedCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_Custom_Members */
/* End_PlaceHolder_CustomXmlPartScopedCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_items */
/* End_PlaceHolder_CustomXmlPartScopedCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because CustomXmlPartScopedCollection is a collection.
/**
* Gets the number of custom XML parts in this collection.
*
* @remarks
* [Api set: PowerPointApi 1.7]
* @returns The number of custom XML parts in the collection.
*/
CustomXmlPartScopedCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetCount */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a `CustomXmlPart` based on its ID.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param id ID of the object to be retrieved.
*/
CustomXmlPartScopedCollection.prototype.getItem = function (id) {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetItem */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetItem */
return _createIndexerObject(PowerPoint.CustomXmlPart, this, [id]);
};
/**
* Gets a `CustomXmlPart` by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the custom XML part in the collection.
* @returns The custom XML part at the given index.
*/
CustomXmlPartScopedCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetItemAt */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetItemAt */
_throwIfApiNotSupported("CustomXmlPartScopedCollection.getItemAt", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a `CustomXmlPart` based on its ID.
If the `CustomXmlPart` doesn't exist, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param id ID of the object to be retrieved.
*/
CustomXmlPartScopedCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetItemOrNullObject */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetItemOrNullObject", 1 /* Read */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* If the collection contains exactly one item, this method returns it.
If the collection contains no items or more than one item, then this method returns the `GeneralException` error.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomXmlPartScopedCollection.prototype.getOnlyItem = function () {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetOnlyItem */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetOnlyItem */
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetOnlyItem", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* If the collection contains exactly one item, this method returns it.
Otherwise, this method returns `null`.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject = function () {
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_GetOnlyItemOrNullObject */
/* End_PlaceHolder_CustomXmlPartScopedCollection_GetOnlyItemOrNullObject */
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetOnlyItemOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
CustomXmlPartScopedCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_HandleResult */
/* End_PlaceHolder_CustomXmlPartScopedCollection_HandleResult */
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(PowerPoint.CustomXmlPart, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
CustomXmlPartScopedCollection.prototype.load = function (options) {
return _load(this, options);
};
CustomXmlPartScopedCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
CustomXmlPartScopedCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_HandleRetrieveResult */
/* End_PlaceHolder_CustomXmlPartScopedCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomXmlPart, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
CustomXmlPartScopedCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
CustomXmlPartScopedCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomXmlPart, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return CustomXmlPartScopedCollection;
}(OfficeExtension.ClientObject));
PowerPoint.CustomXmlPartScopedCollection = CustomXmlPartScopedCollection;
/* Begin_PlaceHolder_CustomXmlPartScopedCollection_AfterDeclaration */
/* End_PlaceHolder_CustomXmlPartScopedCollection_AfterDeclaration */
var _typeCustomXmlPartCollection = "CustomXmlPartCollection";
/* Begin_PlaceHolder_CustomXmlPartCollection_BeforeDeclaration */
/* End_PlaceHolder_CustomXmlPartCollection_BeforeDeclaration */
/**
* A collection of custom XML parts.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var CustomXmlPartCollection = /** @class */ (function (_super) {
__extends(CustomXmlPartCollection, _super);
function CustomXmlPartCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CustomXmlPartCollection.prototype, "_className", {
get: function () {
return "CustomXmlPartCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomXmlPartCollection.prototype, "items", {
/* Begin_PlaceHolder_CustomXmlPartCollection_Custom_Members */
/* End_PlaceHolder_CustomXmlPartCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_CustomXmlPartCollection_items */
/* End_PlaceHolder_CustomXmlPartCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because CustomXmlPartCollection is a collection.
/**
* Adds a new `CustomXmlPart` to the collection.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param xml XML content. Must be a valid XML fragment. If the XML fragment is invalid, then this method returns the `GeneralException` error.
*/
CustomXmlPartCollection.prototype.add = function (xml) {
/* Begin_PlaceHolder_CustomXmlPartCollection_Add */
/* End_PlaceHolder_CustomXmlPartCollection_Add */
return _createMethodObject(PowerPoint.CustomXmlPart, this, "Add", 0 /* Default */, [xml], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Gets a new scoped collection of custom XML parts whose namespaces match the given namespace.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param namespaceUri This must be a fully qualified schema URI, such as "http://schemas.contoso.com/review/1.0".
*/
CustomXmlPartCollection.prototype.getByNamespace = function (namespaceUri) {
/* Begin_PlaceHolder_CustomXmlPartCollection_GetByNamespace */
/* End_PlaceHolder_CustomXmlPartCollection_GetByNamespace */
return _createMethodObject(PowerPoint.CustomXmlPartScopedCollection, this, "GetByNamespace", 1 /* Read */, [namespaceUri], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets the number of custom XML parts in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.7]
* @returns The number of custom XML parts in the collection.
*/
CustomXmlPartCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_CustomXmlPartCollection_GetCount */
/* End_PlaceHolder_CustomXmlPartCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a `CustomXmlPart` based on its ID.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param id ID of the object to be retrieved.
*/
CustomXmlPartCollection.prototype.getItem = function (id) {
/* Begin_PlaceHolder_CustomXmlPartCollection_GetItem */
/* End_PlaceHolder_CustomXmlPartCollection_GetItem */
return _createIndexerObject(PowerPoint.CustomXmlPart, this, [id]);
};
/**
* Gets a `CustomXmlPart` by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the custom XML part in the collection.
* @returns The custom XML part at the given index.
*/
CustomXmlPartCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_CustomXmlPartCollection_GetItemAt */
/* End_PlaceHolder_CustomXmlPartCollection_GetItemAt */
_throwIfApiNotSupported("CustomXmlPartCollection.getItemAt", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a `CustomXmlPart` based on its ID.
If the `CustomXmlPart` doesn't exist, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param id ID of the object to be retrieved.
*/
CustomXmlPartCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_CustomXmlPartCollection_GetItemOrNullObject */
/* End_PlaceHolder_CustomXmlPartCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.CustomXmlPart, this, "GetItemOrNullObject", 1 /* Read */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
CustomXmlPartCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CustomXmlPartCollection_HandleResult */
/* End_PlaceHolder_CustomXmlPartCollection_HandleResult */
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(PowerPoint.CustomXmlPart, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
CustomXmlPartCollection.prototype.load = function (options) {
return _load(this, options);
};
CustomXmlPartCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
CustomXmlPartCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CustomXmlPartCollection_HandleRetrieveResult */
/* End_PlaceHolder_CustomXmlPartCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomXmlPart, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
CustomXmlPartCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
CustomXmlPartCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomXmlPart, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return CustomXmlPartCollection;
}(OfficeExtension.ClientObject));
PowerPoint.CustomXmlPartCollection = CustomXmlPartCollection;
/* Begin_PlaceHolder_CustomXmlPartCollection_AfterDeclaration */
/* End_PlaceHolder_CustomXmlPartCollection_AfterDeclaration */
var _typeGraphic = "Graphic";
/* Begin_PlaceHolder_Graphic_BeforeDeclaration */
/* End_PlaceHolder_Graphic_BeforeDeclaration */
/**
* Represents a graphic object in PowerPoint.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var Graphic = /** @class */ (function (_super) {
__extends(Graphic, _super);
function Graphic() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Graphic.prototype, "_className", {
get: function () {
return "Graphic";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Graphic.prototype, "_navigationPropertyNames", {
get: function () {
return ["shape"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Graphic.prototype, "shape", {
/* Begin_PlaceHolder_Graphic_Custom_Members */
/* End_PlaceHolder_Graphic_Custom_Members */
/**
* Returns the `Shape` object associated with the graphic.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Graphic_Shape_get */
/* End_PlaceHolder_Graphic_Shape_get */
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.Shape, this, "Shape", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Graphic_Shape_get_post */
/* End_PlaceHolder_Graphic_Shape_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "shape" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
Graphic.prototype.convertToShape = function () {
/* Begin_PlaceHolder_Graphic_ConvertToShape */
/* End_PlaceHolder_Graphic_ConvertToShape */
return _createMethodObject(PowerPoint.ShapeScopedCollection, this, "ConvertToShape", 0 /* Default */, [], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Graphic.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Graphic_HandleResult */
/* End_PlaceHolder_Graphic_HandleResult */
_handleNavigationPropertyResults(this, obj, ["shape", "Shape"]);
};
Graphic.prototype.load = function (options) {
return _load(this, options);
};
Graphic.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Graphic.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Graphic_HandleRetrieveResult */
/* End_PlaceHolder_Graphic_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Graphic` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.GraphicData`) that contains shallow copies of any loaded child properties from the original object.
*/
Graphic.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Graphic.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Graphic.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Graphic;
}(OfficeExtension.ClientObject));
PowerPoint.Graphic = Graphic;
/* Begin_PlaceHolder_HyperlinkAddOptions_AfterDeclaration */
/* End_PlaceHolder_HyperlinkAddOptions_AfterDeclaration */
var _typeHyperlinkScopedCollection = "HyperlinkScopedCollection";
/* Begin_PlaceHolder_HyperlinkScopedCollection_BeforeDeclaration */
/* End_PlaceHolder_HyperlinkScopedCollection_BeforeDeclaration */
/**
* Represents a scoped collection of hyperlinks.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var HyperlinkScopedCollection = /** @class */ (function (_super) {
__extends(HyperlinkScopedCollection, _super);
function HyperlinkScopedCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(HyperlinkScopedCollection.prototype, "_className", {
get: function () {
return "HyperlinkScopedCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(HyperlinkScopedCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HyperlinkScopedCollection.prototype, "items", {
/* Begin_PlaceHolder_HyperlinkScopedCollection_Custom_Members */
/* End_PlaceHolder_HyperlinkScopedCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_HyperlinkScopedCollection_items */
/* End_PlaceHolder_HyperlinkScopedCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeHyperlinkScopedCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because HyperlinkScopedCollection is a collection.
/**
* Gets the number of hyperlinks in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.10]
* @returns The number of hyperlinks in the collection.
*/
HyperlinkScopedCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_HyperlinkScopedCollection_GetCount */
/* End_PlaceHolder_HyperlinkScopedCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a hyperlink using its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the hyperlink in the collection.
* @returns The hyperlink at the given index.
*/
HyperlinkScopedCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_HyperlinkScopedCollection_GetItemAt */
/* End_PlaceHolder_HyperlinkScopedCollection_GetItemAt */
return _createMethodObject(PowerPoint.Hyperlink, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
HyperlinkScopedCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_HyperlinkScopedCollection_HandleResult */
/* End_PlaceHolder_HyperlinkScopedCollection_HandleResult */
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(PowerPoint.Hyperlink, false, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
HyperlinkScopedCollection.prototype.load = function (options) {
return _load(this, options);
};
HyperlinkScopedCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
HyperlinkScopedCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_HyperlinkScopedCollection_HandleRetrieveResult */
/* End_PlaceHolder_HyperlinkScopedCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Hyperlink, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.HyperlinkScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.HyperlinkScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
HyperlinkScopedCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
HyperlinkScopedCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Hyperlink, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return HyperlinkScopedCollection;
}(OfficeExtension.ClientObject));
PowerPoint.HyperlinkScopedCollection = HyperlinkScopedCollection;
/* Begin_PlaceHolder_HyperlinkScopedCollection_AfterDeclaration */
/* End_PlaceHolder_HyperlinkScopedCollection_AfterDeclaration */
/* Begin_PlaceHolder_ParagraphHorizontalAlignment_BeforeDeclaration */
/* End_PlaceHolder_ParagraphHorizontalAlignment_BeforeDeclaration */
/**
* Represents the horizontal alignment of the {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ParagraphHorizontalAlignment;
(function (ParagraphHorizontalAlignment) {
/**
* Align text to the left margin.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["left"] = "Left";
/**
* Align text in the center.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["center"] = "Center";
/**
* Align text to the right margin.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["right"] = "Right";
/**
* Align text so that it's justified across the whole line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["justify"] = "Justify";
/**
* Specifies the alignment or adjustment of kashida length in Arabic text.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["justifyLow"] = "JustifyLow";
/**
* Distributes the text words across an entire text line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["distributed"] = "Distributed";
/**
* Distributes Thai text specially, because each character is treated as a word.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ParagraphHorizontalAlignment["thaiDistributed"] = "ThaiDistributed";
})(ParagraphHorizontalAlignment = PowerPoint.ParagraphHorizontalAlignment || (PowerPoint.ParagraphHorizontalAlignment = {}));
/* Begin_PlaceHolder_ParagraphHorizontalAlignment_AfterDeclaration */
/* End_PlaceHolder_ParagraphHorizontalAlignment_AfterDeclaration */
/* Begin_PlaceHolder_BulletStyle_BeforeDeclaration */
/* End_PlaceHolder_BulletStyle_BeforeDeclaration */
/**
* Specifies the style of a bullet.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var BulletStyle;
(function (BulletStyle) {
/**
* Style is unsupported.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["unsupported"] = "Unsupported";
/**
* Lowercase alphabetical characters with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetLowercasePeriod"] = "AlphabetLowercasePeriod";
/**
* Uppercase alphabetical characters with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetUppercasePeriod"] = "AlphabetUppercasePeriod";
/**
* Arabic numerals with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicNumeralParenthesisRight"] = "ArabicNumeralParenthesisRight";
/**
* Arabic numerals with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicNumeralPeriod"] = "ArabicNumeralPeriod";
/**
* Lowercase Roman numerals with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanLowercaseParenthesesBoth"] = "RomanLowercaseParenthesesBoth";
/**
* Lowercase Roman numerals with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanLowercaseParenthesisRight"] = "RomanLowercaseParenthesisRight";
/**
* Lowercase Roman numerals with period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanLowercasePeriod"] = "RomanLowercasePeriod";
/**
* Uppercase Roman numerals with period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanUppercasePeriod"] = "RomanUppercasePeriod";
/**
* Lowercase alphabetical characters with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetLowercaseParenthesesBoth"] = "AlphabetLowercaseParenthesesBoth";
/**
* Lowercase alphabetical characters with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetLowercaseParenthesisRight"] = "AlphabetLowercaseParenthesisRight";
/**
* Uppercase alphabetical characters with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetUppercaseParenthesesBoth"] = "AlphabetUppercaseParenthesesBoth";
/**
* Uppercase alphabetical characters with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["alphabetUppercaseParenthesisRight"] = "AlphabetUppercaseParenthesisRight";
/**
* Arabic numerals with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicNumeralParenthesesBoth"] = "ArabicNumeralParenthesesBoth";
/**
* Arabic numerals.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicNumeralPlain"] = "ArabicNumeralPlain";
/**
* Uppercase Roman numerals with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanUppercaseParenthesesBoth"] = "RomanUppercaseParenthesesBoth";
/**
* Uppercase Roman numerals with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["romanUppercaseParenthesisRight"] = "RomanUppercaseParenthesisRight";
/**
* Simplified Chinese without a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["simplifiedChinesePlain"] = "SimplifiedChinesePlain";
/**
* Simplified Chinese with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["simplifiedChinesePeriod"] = "SimplifiedChinesePeriod";
/**
* Double-byte circled number for values up to 10.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["circleNumberDoubleBytePlain"] = "CircleNumberDoubleBytePlain";
/**
* Text colored number with same color circle drawn around it.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["circleNumberWideDoubleByteWhitePlain"] = "CircleNumberWideDoubleByteWhitePlain";
/**
* Shadow color number with circular background of normal text color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["circleNumberWideDoubleByteBlackPlain"] = "CircleNumberWideDoubleByteBlackPlain";
/**
* Traditional Chinese without a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["traditionalChinesePlain"] = "TraditionalChinesePlain";
/**
* Traditional Chinese with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["traditionalChinesePeriod"] = "TraditionalChinesePeriod";
/**
* Arabic alphabet with a dash.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicAlphabetDash"] = "ArabicAlphabetDash";
/**
* Arabic Abjad alphabet with a dash.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicAbjadDash"] = "ArabicAbjadDash";
/**
* Hebrew alphabet with a dash.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["hebrewAlphabetDash"] = "HebrewAlphabetDash";
/**
* Japanese/Korean numbers without a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["kanjiKoreanPlain"] = "KanjiKoreanPlain";
/**
* Japanese/Korean numbers with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["kanjiKoreanPeriod"] = "KanjiKoreanPeriod";
/**
* Double-byte Arabic numbering scheme (no punctuation).
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicDoubleBytePlain"] = "ArabicDoubleBytePlain";
/**
* Double-byte Arabic numbering scheme with double-byte period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["arabicDoubleBytePeriod"] = "ArabicDoubleBytePeriod";
/**
* Thai alphabet with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiAlphabetPeriod"] = "ThaiAlphabetPeriod";
/**
* Thai alphabet with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiAlphabetParenthesisRight"] = "ThaiAlphabetParenthesisRight";
/**
* Thai alphabet with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiAlphabetParenthesesBoth"] = "ThaiAlphabetParenthesesBoth";
/**
* Thai numerals with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiNumeralPeriod"] = "ThaiNumeralPeriod";
/**
* Thai numerals with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiNumeralParenthesisRight"] = "ThaiNumeralParenthesisRight";
/**
* Thai numerals with both parentheses.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["thaiNumeralParenthesesBoth"] = "ThaiNumeralParenthesesBoth";
/**
* Hindi alphabet (vowels) with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["hindiAlphabetPeriod"] = "HindiAlphabetPeriod";
/**
* Hindi numerals with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["hindiNumeralPeriod"] = "HindiNumeralPeriod";
/**
* Kanji Simplified Chinese with double-byte period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["kanjiSimplifiedChineseDoubleBytePeriod"] = "KanjiSimplifiedChineseDoubleBytePeriod";
/**
* Hindi numerals with closing parenthesis.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["hindiNumeralParenthesisRight"] = "HindiNumeralParenthesisRight";
/**
* Hindi alphabet (consonants) with a period.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletStyle["hindiAlphabet1Period"] = "HindiAlphabet1Period";
})(BulletStyle = PowerPoint.BulletStyle || (PowerPoint.BulletStyle = {}));
/* Begin_PlaceHolder_BulletStyle_AfterDeclaration */
/* End_PlaceHolder_BulletStyle_AfterDeclaration */
/* Begin_PlaceHolder_BulletType_BeforeDeclaration */
/* End_PlaceHolder_BulletType_BeforeDeclaration */
/**
* Specifies the type of a bullet.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var BulletType;
(function (BulletType) {
/**
* Type is unsupported.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletType["unsupported"] = "Unsupported";
/**
* No bullets.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletType["none"] = "None";
/**
* Numbered bullet (e.g., 1, 2, 3 or a, b, c).
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletType["numbered"] = "Numbered";
/**
* Symbol-based bullet (e.g., disc, circle, square).
* @remarks
* [Api set: PowerPointApi 1.10]
*/
BulletType["unnumbered"] = "Unnumbered";
})(BulletType = PowerPoint.BulletType || (PowerPoint.BulletType = {}));
/* Begin_PlaceHolder_BulletType_AfterDeclaration */
/* End_PlaceHolder_BulletType_AfterDeclaration */
var _typeBulletFormat = "BulletFormat";
/* Begin_PlaceHolder_BulletFormat_BeforeDeclaration */
/* End_PlaceHolder_BulletFormat_BeforeDeclaration */
/**
* Represents the bullet formatting properties of a text that is attached to the {@link PowerPoint.ParagraphFormat}.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var BulletFormat = /** @class */ (function (_super) {
__extends(BulletFormat, _super);
function BulletFormat() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(BulletFormat.prototype, "_className", {
get: function () {
return "BulletFormat";
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "_scalarPropertyNames", {
get: function () {
return ["visible", "style", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Visible", "Style", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "style", {
/* Begin_PlaceHolder_BulletFormat_Custom_Members */
/* End_PlaceHolder_BulletFormat_Custom_Members */
/**
* Specifies the style of the bullets in the paragraph. See {@link PowerPoint.BulletStyle} for details.
Returns `null` if the {@link PowerPoint.TextRange} includes text fragments with different bullet formatting properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_BulletFormat_Style_get */
/* End_PlaceHolder_BulletFormat_Style_get */
_throwIfNotLoaded("style", this._S, _typeBulletFormat, this._isNull);
_throwIfApiNotSupported("BulletFormat.style", _defaultApiSetName, "1.10", _hostName);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_BulletFormat_Style_set */
/* End_PlaceHolder_BulletFormat_Style_set */
this._S = value;
_invokeSetProperty(this, "Style", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "type", {
/**
* Specifies the type of the bullets in the paragraph. See {@link PowerPoint.BulletType} for details.
Returns `null` if the {@link PowerPoint.TextRange} includes text fragments with different bullet formatting properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_BulletFormat_Type_get */
/* End_PlaceHolder_BulletFormat_Type_get */
_throwIfNotLoaded("type", this._T, _typeBulletFormat, this._isNull);
_throwIfApiNotSupported("BulletFormat.type", _defaultApiSetName, "1.10", _hostName);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_BulletFormat_Type_set */
/* End_PlaceHolder_BulletFormat_Type_set */
this._T = value;
_invokeSetProperty(this, "Type", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(BulletFormat.prototype, "visible", {
/**
* Specifies if the bullets in the paragraph are visible. Returns `null` if the {@link PowerPoint.TextRange} includes text fragments with different bullet visibility values.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_BulletFormat_Visible_get */
/* End_PlaceHolder_BulletFormat_Visible_get */
_throwIfNotLoaded("visible", this._V, _typeBulletFormat, this._isNull);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_BulletFormat_Visible_set */
/* End_PlaceHolder_BulletFormat_Visible_set */
this._V = value;
_invokeSetProperty(this, "Visible", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "style" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "type" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "visible" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
BulletFormat.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_BulletFormat_HandleResult */
/* End_PlaceHolder_BulletFormat_HandleResult */
if (!_isUndefined(obj["Style"])) {
this._S = obj["Style"];
/* Begin_PlaceHolder_BulletFormat_HandleResult_Prop_Style */
/* End_PlaceHolder_BulletFormat_HandleResult_Prop_Style */
}
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_BulletFormat_HandleResult_Prop_Type */
/* End_PlaceHolder_BulletFormat_HandleResult_Prop_Type */
}
if (!_isUndefined(obj["Visible"])) {
this._V = obj["Visible"];
/* Begin_PlaceHolder_BulletFormat_HandleResult_Prop_Visible */
/* End_PlaceHolder_BulletFormat_HandleResult_Prop_Visible */
}
};
BulletFormat.prototype.load = function (options) {
return _load(this, options);
};
BulletFormat.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
BulletFormat.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_BulletFormat_HandleRetrieveResult */
/* End_PlaceHolder_BulletFormat_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
BulletFormat.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
BulletFormat.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
BulletFormat.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return BulletFormat;
}(OfficeExtension.ClientObject));
PowerPoint.BulletFormat = BulletFormat;
/* Begin_PlaceHolder_BulletFormat_AfterDeclaration */
/* End_PlaceHolder_BulletFormat_AfterDeclaration */
var _typeParagraphFormat = "ParagraphFormat";
/* Begin_PlaceHolder_ParagraphFormat_BeforeDeclaration */
/* End_PlaceHolder_ParagraphFormat_BeforeDeclaration */
/**
* Represents the paragraph formatting properties of a text that is attached to the {@link PowerPoint.TextRange}.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ParagraphFormat = /** @class */ (function (_super) {
__extends(ParagraphFormat, _super);
function ParagraphFormat() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ParagraphFormat.prototype, "_className", {
get: function () {
return "ParagraphFormat";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "_scalarPropertyNames", {
get: function () {
return ["horizontalAlignment", "indentLevel"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["HorizontalAlignment", "IndentLevel"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "_navigationPropertyNames", {
get: function () {
return ["bulletFormat"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "bulletFormat", {
/* Begin_PlaceHolder_ParagraphFormat_Custom_Members */
/* End_PlaceHolder_ParagraphFormat_Custom_Members */
/**
* Represents the bullet format of the paragraph. See {@link PowerPoint.BulletFormat} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ParagraphFormat_BulletFormat_get */
/* End_PlaceHolder_ParagraphFormat_BulletFormat_get */
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.BulletFormat, this, "BulletFormat", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_ParagraphFormat_BulletFormat_get_post */
/* End_PlaceHolder_ParagraphFormat_BulletFormat_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "horizontalAlignment", {
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_ParagraphFormat_HorizontalAlignment_get */
/* End_PlaceHolder_ParagraphFormat_HorizontalAlignment_get */
_throwIfNotLoaded("horizontalAlignment", this._H, _typeParagraphFormat, this._isNull);
return this._H;
},
set: function (value) {
/* Begin_PlaceHolder_ParagraphFormat_HorizontalAlignment_set */
/* End_PlaceHolder_ParagraphFormat_HorizontalAlignment_set */
this._H = value;
_invokeSetProperty(this, "HorizontalAlignment", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ParagraphFormat.prototype, "indentLevel", {
/**
* Represents the indent level of the paragraph.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_ParagraphFormat_IndentLevel_get */
/* End_PlaceHolder_ParagraphFormat_IndentLevel_get */
_throwIfNotLoaded("indentLevel", this._I, _typeParagraphFormat, this._isNull);
_throwIfApiNotSupported("ParagraphFormat.indentLevel", _defaultApiSetName, "1.10", _hostName);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_ParagraphFormat_IndentLevel_set */
/* End_PlaceHolder_ParagraphFormat_IndentLevel_set */
this._I = value;
_invokeSetProperty(this, "IndentLevel", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "bulletFormat" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "horizontalAlignment" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "indentLevel" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
ParagraphFormat.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ParagraphFormat_HandleResult */
/* End_PlaceHolder_ParagraphFormat_HandleResult */
if (!_isUndefined(obj["HorizontalAlignment"])) {
this._H = obj["HorizontalAlignment"];
/* Begin_PlaceHolder_ParagraphFormat_HandleResult_Prop_HorizontalAlignment */
/* End_PlaceHolder_ParagraphFormat_HandleResult_Prop_HorizontalAlignment */
}
if (!_isUndefined(obj["IndentLevel"])) {
this._I = obj["IndentLevel"];
/* Begin_PlaceHolder_ParagraphFormat_HandleResult_Prop_IndentLevel */
/* End_PlaceHolder_ParagraphFormat_HandleResult_Prop_IndentLevel */
}
_handleNavigationPropertyResults(this, obj, ["bulletFormat", "BulletFormat"]);
};
ParagraphFormat.prototype.load = function (options) {
return _load(this, options);
};
ParagraphFormat.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
ParagraphFormat.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ParagraphFormat_HandleRetrieveResult */
/* End_PlaceHolder_ParagraphFormat_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ParagraphFormat.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
ParagraphFormat.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
ParagraphFormat.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return ParagraphFormat;
}(OfficeExtension.ClientObject));
PowerPoint.ParagraphFormat = ParagraphFormat;
/* Begin_PlaceHolder_ParagraphFormat_AfterDeclaration */
/* End_PlaceHolder_ParagraphFormat_AfterDeclaration */
/* Begin_PlaceHolder_ShapeFontUnderlineStyle_BeforeDeclaration */
/* End_PlaceHolder_ShapeFontUnderlineStyle_BeforeDeclaration */
/**
* The type of underline applied to a font.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeFontUnderlineStyle;
(function (ShapeFontUnderlineStyle) {
/**
* No underlining.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["none"] = "None";
/**
* Regular single line underlining.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["single"] = "Single";
/**
* Underlining of text with double lines.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["double"] = "Double";
/**
* Underlining of text with a thick line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["heavy"] = "Heavy";
/**
* Underlining of text with a dotted line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dotted"] = "Dotted";
/**
* Underlining of text with a thick, dotted line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dottedHeavy"] = "DottedHeavy";
/**
* Underlining of text with a line containing dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dash"] = "Dash";
/**
* Underlining of text with a thick line containing dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dashHeavy"] = "DashHeavy";
/**
* Underlining of text with a line containing long dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dashLong"] = "DashLong";
/**
* Underlining of text with a thick line containing long dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dashLongHeavy"] = "DashLongHeavy";
/**
* Underlining of text with a line containing dots and dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dotDash"] = "DotDash";
/**
* Underlining of text with a thick line containing dots and dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dotDashHeavy"] = "DotDashHeavy";
/**
* Underlining of text with a line containing double dots and dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dotDotDash"] = "DotDotDash";
/**
* Underlining of text with a thick line containing double dots and dashes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["dotDotDashHeavy"] = "DotDotDashHeavy";
/**
* Underlining of text with a wavy line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["wavy"] = "Wavy";
/**
* Underlining of text with a thick, wavy line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["wavyHeavy"] = "WavyHeavy";
/**
* Underlining of text with double wavy lines.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFontUnderlineStyle["wavyDouble"] = "WavyDouble";
})(ShapeFontUnderlineStyle = PowerPoint.ShapeFontUnderlineStyle || (PowerPoint.ShapeFontUnderlineStyle = {}));
/* Begin_PlaceHolder_ShapeFontUnderlineStyle_AfterDeclaration */
/* End_PlaceHolder_ShapeFontUnderlineStyle_AfterDeclaration */
var _typeShapeFont = "ShapeFont";
/* Begin_PlaceHolder_ShapeFont_BeforeDeclaration */
/* End_PlaceHolder_ShapeFont_BeforeDeclaration */
/**
* Represents the font attributes, such as font name, font size, and color, for a shape's TextRange object.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeFont = /** @class */ (function (_super) {
__extends(ShapeFont, _super);
function ShapeFont() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ShapeFont.prototype, "_className", {
get: function () {
return "ShapeFont";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "_scalarPropertyNames", {
get: function () {
return ["bold", "color", "italic", "name", "size", "underline", "allCaps", "doubleStrikethrough", "smallCaps", "strikethrough", "subscript", "superscript"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Bold", "Color", "Italic", "Name", "Size", "Underline", "AllCaps", "DoubleStrikethrough", "SmallCaps", "Strikethrough", "Subscript", "Superscript"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, true, true, true, true, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "allCaps", {
/* Begin_PlaceHolder_ShapeFont_Custom_Members */
/* End_PlaceHolder_ShapeFont_Custom_Members */
/**
* Specifies whether the text in the `TextRange` is set to use the **All Caps** attribute which makes lowercase letters appear as uppercase letters. The possible values are as follows:
- `true`: All the text has the **All Caps** attribute.
- `false`: None of the text has the **All Caps** attribute.
- `null`: Returned if some, but not all, of the text has the **All Caps** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_AllCaps_get */
/* End_PlaceHolder_ShapeFont_AllCaps_get */
_throwIfNotLoaded("allCaps", this._A, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.allCaps", _defaultApiSetName, "1.8", _hostName);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_AllCaps_set */
/* End_PlaceHolder_ShapeFont_AllCaps_set */
this._A = value;
_invokeSetProperty(this, "AllCaps", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "bold", {
/**
* Specifies whether the text in the `TextRange` is set to bold. The possible values are as follows:
- `true`: All the text is bold.
- `false`: None of the text is bold.
- `null`: Returned if some, but not all, of the text is bold.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Bold_get */
/* End_PlaceHolder_ShapeFont_Bold_get */
_throwIfNotLoaded("bold", this._B, _typeShapeFont, this._isNull);
return this._B;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Bold_set */
/* End_PlaceHolder_ShapeFont_Bold_set */
this._B = value;
_invokeSetProperty(this, "Bold", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "color", {
/**
* Specifies the HTML color code representation of the text color (e.g., "#FF0000" represents red). Returns `null` if the `TextRange` contains text fragments with different colors.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Color_get */
/* End_PlaceHolder_ShapeFont_Color_get */
_throwIfNotLoaded("color", this._C, _typeShapeFont, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Color_set */
/* End_PlaceHolder_ShapeFont_Color_set */
this._C = value;
_invokeSetProperty(this, "Color", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "doubleStrikethrough", {
/**
* Specifies whether the text in the `TextRange` is set to use the **Double strikethrough** attribute. The possible values are as follows:
- `true`: All the text has the **Double strikethrough** attribute.
- `false`: None of the text has the **Double strikethrough** attribute.
- `null`: Returned if some, but not all, of the text has the **Double strikethrough** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_DoubleStrikethrough_get */
/* End_PlaceHolder_ShapeFont_DoubleStrikethrough_get */
_throwIfNotLoaded("doubleStrikethrough", this._D, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.doubleStrikethrough", _defaultApiSetName, "1.8", _hostName);
return this._D;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_DoubleStrikethrough_set */
/* End_PlaceHolder_ShapeFont_DoubleStrikethrough_set */
this._D = value;
_invokeSetProperty(this, "DoubleStrikethrough", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "italic", {
/**
* Specifies whether the text in the `TextRange` is set to italic. The possible values are as follows:
- `true`: All the text is italicized.
- `false`: None of the text is italicized.
- `null`: Returned if some, but not all, of the text is italicized.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Italic_get */
/* End_PlaceHolder_ShapeFont_Italic_get */
_throwIfNotLoaded("italic", this._I, _typeShapeFont, this._isNull);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Italic_set */
/* End_PlaceHolder_ShapeFont_Italic_set */
this._I = value;
_invokeSetProperty(this, "Italic", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "name", {
/**
* Specifies the font name (e.g., "Calibri"). If the text is a Complex Script or East Asian language, this is the corresponding font name; otherwise it's the Latin font name. Returns `null` if the `TextRange` contains text fragments with different font names.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Name_get */
/* End_PlaceHolder_ShapeFont_Name_get */
_throwIfNotLoaded("name", this._N, _typeShapeFont, this._isNull);
return this._N;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Name_set */
/* End_PlaceHolder_ShapeFont_Name_set */
this._N = value;
_invokeSetProperty(this, "Name", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "size", {
/**
* Specifies the font size in points (e.g., 11). Returns `null` if the `TextRange` contains text fragments with different font sizes.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Size_get */
/* End_PlaceHolder_ShapeFont_Size_get */
_throwIfNotLoaded("size", this._S, _typeShapeFont, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Size_set */
/* End_PlaceHolder_ShapeFont_Size_set */
this._S = value;
_invokeSetProperty(this, "Size", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "smallCaps", {
/**
* Specifies whether the text in the `TextRange` is set to use the **Small Caps** attribute which makes lowercase letters appear as small uppercase letters. The possible values are as follows:
- `true`: All the text has the **Small Caps** attribute.
- `false`: None of the text has the **Small Caps** attribute.
- `null`: Returned if some, but not all, of the text has the **Small Caps** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_SmallCaps_get */
/* End_PlaceHolder_ShapeFont_SmallCaps_get */
_throwIfNotLoaded("smallCaps", this._Sm, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.smallCaps", _defaultApiSetName, "1.8", _hostName);
return this._Sm;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_SmallCaps_set */
/* End_PlaceHolder_ShapeFont_SmallCaps_set */
this._Sm = value;
_invokeSetProperty(this, "SmallCaps", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "strikethrough", {
/**
* Specifies whether the text in the `TextRange` is set to use the **Strikethrough** attribute. The possible values are as follows:
- `true`: All the text has the **Strikethrough** attribute.
- `false`: None of the text has the **Strikethrough** attribute.
- `null`: Returned if some, but not all, of the text has the **Strikethrough** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Strikethrough_get */
/* End_PlaceHolder_ShapeFont_Strikethrough_get */
_throwIfNotLoaded("strikethrough", this._St, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.strikethrough", _defaultApiSetName, "1.8", _hostName);
return this._St;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Strikethrough_set */
/* End_PlaceHolder_ShapeFont_Strikethrough_set */
this._St = value;
_invokeSetProperty(this, "Strikethrough", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "subscript", {
/**
* Specifies whether the text in the `TextRange` is set to use the **Subscript** attribute. The possible values are as follows:
- `true`: All the text has the **Subscript** attribute.
- `false`: None of the text has the **Subscript** attribute.
- `null`: Returned if some, but not all, of the text has the **Subscript** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Subscript_get */
/* End_PlaceHolder_ShapeFont_Subscript_get */
_throwIfNotLoaded("subscript", this._Su, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.subscript", _defaultApiSetName, "1.8", _hostName);
return this._Su;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Subscript_set */
/* End_PlaceHolder_ShapeFont_Subscript_set */
this._Su = value;
_invokeSetProperty(this, "Subscript", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "superscript", {
/**
* Specifies whether the text in the `TextRange` is set to use the **Superscript** attribute. The possible values are as follows:
- `true`: All the text has the **Superscript** attribute.
- `false`: None of the text has the **Superscript** attribute.
- `null`: Returned if some, but not all, of the text has the **Superscript** attribute.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Superscript_get */
/* End_PlaceHolder_ShapeFont_Superscript_get */
_throwIfNotLoaded("superscript", this._Sup, _typeShapeFont, this._isNull);
_throwIfApiNotSupported("ShapeFont.superscript", _defaultApiSetName, "1.8", _hostName);
return this._Sup;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Superscript_set */
/* End_PlaceHolder_ShapeFont_Superscript_set */
this._Sup = value;
_invokeSetProperty(this, "Superscript", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFont.prototype, "underline", {
/**
* Specifies the type of underline applied to the font. Returns `null` if the `TextRange` contains text fragments with different underline styles. See {@link PowerPoint.ShapeFontUnderlineStyle} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFont_Underline_get */
/* End_PlaceHolder_ShapeFont_Underline_get */
_throwIfNotLoaded("underline", this._U, _typeShapeFont, this._isNull);
return this._U;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFont_Underline_set */
/* End_PlaceHolder_ShapeFont_Underline_set */
this._U = value;
_invokeSetProperty(this, "Underline", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "allCaps" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "bold" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "color" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "doubleStrikethrough" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "italic" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "name" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "size" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "smallCaps" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "strikethrough" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "subscript" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "superscript" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "underline" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
ShapeFont.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeFont_HandleResult */
/* End_PlaceHolder_ShapeFont_HandleResult */
if (!_isUndefined(obj["AllCaps"])) {
this._A = obj["AllCaps"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_AllCaps */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_AllCaps */
}
if (!_isUndefined(obj["Bold"])) {
this._B = obj["Bold"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Bold */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Bold */
}
if (!_isUndefined(obj["Color"])) {
this._C = obj["Color"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Color */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Color */
}
if (!_isUndefined(obj["DoubleStrikethrough"])) {
this._D = obj["DoubleStrikethrough"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_DoubleStrikethrough */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_DoubleStrikethrough */
}
if (!_isUndefined(obj["Italic"])) {
this._I = obj["Italic"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Italic */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Italic */
}
if (!_isUndefined(obj["Name"])) {
this._N = obj["Name"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Name */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Name */
}
if (!_isUndefined(obj["Size"])) {
this._S = obj["Size"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Size */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Size */
}
if (!_isUndefined(obj["SmallCaps"])) {
this._Sm = obj["SmallCaps"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_SmallCaps */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_SmallCaps */
}
if (!_isUndefined(obj["Strikethrough"])) {
this._St = obj["Strikethrough"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Strikethrough */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Strikethrough */
}
if (!_isUndefined(obj["Subscript"])) {
this._Su = obj["Subscript"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Subscript */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Subscript */
}
if (!_isUndefined(obj["Superscript"])) {
this._Sup = obj["Superscript"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Superscript */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Superscript */
}
if (!_isUndefined(obj["Underline"])) {
this._U = obj["Underline"];
/* Begin_PlaceHolder_ShapeFont_HandleResult_Prop_Underline */
/* End_PlaceHolder_ShapeFont_HandleResult_Prop_Underline */
}
};
ShapeFont.prototype.load = function (options) {
return _load(this, options);
};
ShapeFont.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
ShapeFont.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeFont_HandleRetrieveResult */
/* End_PlaceHolder_ShapeFont_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ShapeFont.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
ShapeFont.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
ShapeFont.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return ShapeFont;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeFont = ShapeFont;
/* Begin_PlaceHolder_ShapeFont_AfterDeclaration */
/* End_PlaceHolder_ShapeFont_AfterDeclaration */
/* Begin_PlaceHolder_ShapeAutoSize_BeforeDeclaration */
/* End_PlaceHolder_ShapeAutoSize_BeforeDeclaration */
/**
* Determines the type of automatic sizing allowed.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeAutoSize;
(function (ShapeAutoSize) {
/**
* No autosizing.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeAutoSize["autoSizeNone"] = "AutoSizeNone";
/**
* The text is adjusted to fit the shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeAutoSize["autoSizeTextToFitShape"] = "AutoSizeTextToFitShape";
/**
* The shape is adjusted to fit the text.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeAutoSize["autoSizeShapeToFitText"] = "AutoSizeShapeToFitText";
/**
* A combination of automatic sizing schemes are used.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeAutoSize["autoSizeMixed"] = "AutoSizeMixed";
})(ShapeAutoSize = PowerPoint.ShapeAutoSize || (PowerPoint.ShapeAutoSize = {}));
/* Begin_PlaceHolder_ShapeAutoSize_AfterDeclaration */
/* End_PlaceHolder_ShapeAutoSize_AfterDeclaration */
/* Begin_PlaceHolder_TextVerticalAlignment_BeforeDeclaration */
/* End_PlaceHolder_TextVerticalAlignment_BeforeDeclaration */
/**
* Represents the vertical alignment of a {@link PowerPoint.TextFrame} in a {@link PowerPoint.Shape}.
If one of the centered options is 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]
*/
var TextVerticalAlignment;
(function (TextVerticalAlignment) {
/**
* Specifies that the `TextFrame` should be top aligned to the `Shape`.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
TextVerticalAlignment["top"] = "Top";
/**
* Specifies that the `TextFrame` should be center aligned to the `Shape`.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
TextVerticalAlignment["middle"] = "Middle";
/**
* Specifies that the `TextFrame` should be bottom aligned to the `Shape`.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
TextVerticalAlignment["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]
*/
TextVerticalAlignment["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]
*/
TextVerticalAlignment["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]
*/
TextVerticalAlignment["bottomCentered"] = "BottomCentered";
})(TextVerticalAlignment = PowerPoint.TextVerticalAlignment || (PowerPoint.TextVerticalAlignment = {}));
/* Begin_PlaceHolder_TextVerticalAlignment_AfterDeclaration */
/* End_PlaceHolder_TextVerticalAlignment_AfterDeclaration */
var _typeTextFrame = "TextFrame";
/* Begin_PlaceHolder_TextFrame_BeforeDeclaration */
/* End_PlaceHolder_TextFrame_BeforeDeclaration */
/**
* Represents the text frame of a shape object.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var TextFrame = /** @class */ (function (_super) {
__extends(TextFrame, _super);
function TextFrame() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TextFrame.prototype, "_className", {
get: function () {
return "TextFrame";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "_scalarPropertyNames", {
get: function () {
return ["autoSizeSetting", "bottomMargin", "hasText", "leftMargin", "rightMargin", "topMargin", "verticalAlignment", "wordWrap"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["AutoSizeSetting", "BottomMargin", "HasText", "LeftMargin", "RightMargin", "TopMargin", "VerticalAlignment", "WordWrap"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, false, true, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "_navigationPropertyNames", {
get: function () {
return ["textRange"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "textRange", {
/* Begin_PlaceHolder_TextFrame_Custom_Members */
/* End_PlaceHolder_TextFrame_Custom_Members */
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_TextRange_get */
/* End_PlaceHolder_TextFrame_TextRange_get */
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.TextRange, this, "TextRange", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TextFrame_TextRange_get_post */
/* End_PlaceHolder_TextFrame_TextRange_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "autoSizeSetting", {
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_AutoSizeSetting_get */
/* End_PlaceHolder_TextFrame_AutoSizeSetting_get */
_throwIfNotLoaded("autoSizeSetting", this._A, _typeTextFrame, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_AutoSizeSetting_set */
/* End_PlaceHolder_TextFrame_AutoSizeSetting_set */
this._A = value;
_invokeSetProperty(this, "AutoSizeSetting", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "bottomMargin", {
/**
* Represents the bottom margin, in points, of the text frame.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_BottomMargin_get */
/* End_PlaceHolder_TextFrame_BottomMargin_get */
_throwIfNotLoaded("bottomMargin", this._B, _typeTextFrame, this._isNull);
return this._B;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_BottomMargin_set */
/* End_PlaceHolder_TextFrame_BottomMargin_set */
this._B = value;
_invokeSetProperty(this, "BottomMargin", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "hasText", {
/**
* Specifies if the text frame contains text.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_HasText_get */
/* End_PlaceHolder_TextFrame_HasText_get */
_throwIfNotLoaded("hasText", this._H, _typeTextFrame, this._isNull);
return this._H;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "leftMargin", {
/**
* Represents the left margin, in points, of the text frame.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_LeftMargin_get */
/* End_PlaceHolder_TextFrame_LeftMargin_get */
_throwIfNotLoaded("leftMargin", this._L, _typeTextFrame, this._isNull);
return this._L;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_LeftMargin_set */
/* End_PlaceHolder_TextFrame_LeftMargin_set */
this._L = value;
_invokeSetProperty(this, "LeftMargin", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "rightMargin", {
/**
* Represents the right margin, in points, of the text frame.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_RightMargin_get */
/* End_PlaceHolder_TextFrame_RightMargin_get */
_throwIfNotLoaded("rightMargin", this._R, _typeTextFrame, this._isNull);
return this._R;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_RightMargin_set */
/* End_PlaceHolder_TextFrame_RightMargin_set */
this._R = value;
_invokeSetProperty(this, "RightMargin", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "topMargin", {
/**
* Represents the top margin, in points, of the text frame.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_TopMargin_get */
/* End_PlaceHolder_TextFrame_TopMargin_get */
_throwIfNotLoaded("topMargin", this._To, _typeTextFrame, this._isNull);
return this._To;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_TopMargin_set */
/* End_PlaceHolder_TextFrame_TopMargin_set */
this._To = value;
_invokeSetProperty(this, "TopMargin", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "verticalAlignment", {
/**
* Represents the vertical alignment of the text frame. See {@link PowerPoint.TextVerticalAlignment} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_VerticalAlignment_get */
/* End_PlaceHolder_TextFrame_VerticalAlignment_get */
_throwIfNotLoaded("verticalAlignment", this._V, _typeTextFrame, this._isNull);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_VerticalAlignment_set */
/* End_PlaceHolder_TextFrame_VerticalAlignment_set */
this._V = value;
_invokeSetProperty(this, "VerticalAlignment", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextFrame.prototype, "wordWrap", {
/**
* Determines whether lines break automatically to fit text inside the shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextFrame_WordWrap_get */
/* End_PlaceHolder_TextFrame_WordWrap_get */
_throwIfNotLoaded("wordWrap", this._W, _typeTextFrame, this._isNull);
return this._W;
},
set: function (value) {
/* Begin_PlaceHolder_TextFrame_WordWrap_set */
/* End_PlaceHolder_TextFrame_WordWrap_set */
this._W = value;
_invokeSetProperty(this, "WordWrap", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "autoSizeSetting" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "bottomMargin" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "leftMargin" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "rightMargin" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "textRange" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "topMargin" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "verticalAlignment" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "wordWrap" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes all the text in the text frame.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
TextFrame.prototype.deleteText = function () {
/* Begin_PlaceHolder_TextFrame_DeleteText */
/* End_PlaceHolder_TextFrame_DeleteText */
_invokeMethod(this, "DeleteText", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.Shape} object that holds this `TextFrame`.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
TextFrame.prototype.getParentShape = function () {
/* Begin_PlaceHolder_TextFrame_GetParentShape */
/* End_PlaceHolder_TextFrame_GetParentShape */
_throwIfApiNotSupported("TextFrame.getParentShape", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "GetParentShape", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TextFrame.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TextFrame_HandleResult */
/* End_PlaceHolder_TextFrame_HandleResult */
if (!_isUndefined(obj["AutoSizeSetting"])) {
this._A = obj["AutoSizeSetting"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_AutoSizeSetting */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_AutoSizeSetting */
}
if (!_isUndefined(obj["BottomMargin"])) {
this._B = obj["BottomMargin"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_BottomMargin */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_BottomMargin */
}
if (!_isUndefined(obj["HasText"])) {
this._H = obj["HasText"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_HasText */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_HasText */
}
if (!_isUndefined(obj["LeftMargin"])) {
this._L = obj["LeftMargin"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_LeftMargin */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_LeftMargin */
}
if (!_isUndefined(obj["RightMargin"])) {
this._R = obj["RightMargin"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_RightMargin */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_RightMargin */
}
if (!_isUndefined(obj["TopMargin"])) {
this._To = obj["TopMargin"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_TopMargin */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_TopMargin */
}
if (!_isUndefined(obj["VerticalAlignment"])) {
this._V = obj["VerticalAlignment"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_VerticalAlignment */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_VerticalAlignment */
}
if (!_isUndefined(obj["WordWrap"])) {
this._W = obj["WordWrap"];
/* Begin_PlaceHolder_TextFrame_HandleResult_Prop_WordWrap */
/* End_PlaceHolder_TextFrame_HandleResult_Prop_WordWrap */
}
_handleNavigationPropertyResults(this, obj, ["textRange", "TextRange"]);
};
TextFrame.prototype.load = function (options) {
return _load(this, options);
};
TextFrame.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TextFrame.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TextFrame_HandleRetrieveResult */
/* End_PlaceHolder_TextFrame_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
TextFrame.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TextFrame.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TextFrame.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TextFrame;
}(OfficeExtension.ClientObject));
PowerPoint.TextFrame = TextFrame;
/* Begin_PlaceHolder_TextFrame_AfterDeclaration */
/* End_PlaceHolder_TextFrame_AfterDeclaration */
var _typeTextRange = "TextRange";
/* Begin_PlaceHolder_TextRange_BeforeDeclaration */
/* End_PlaceHolder_TextRange_BeforeDeclaration */
/**
* 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]
*/
var TextRange = /** @class */ (function (_super) {
__extends(TextRange, _super);
function TextRange() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TextRange.prototype, "_className", {
get: function () {
return "TextRange";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "_scalarPropertyNames", {
get: function () {
return ["text", "length", "start"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Text", "Length", "Start"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "_navigationPropertyNames", {
get: function () {
return ["font", "paragraphFormat", "hyperlinks"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "font", {
/* Begin_PlaceHolder_TextRange_Custom_Members */
/* End_PlaceHolder_TextRange_Custom_Members */
/**
* Returns a `ShapeFont` object that represents the font attributes for the text range.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_Font_get */
/* End_PlaceHolder_TextRange_Font_get */
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.ShapeFont, this, "Font", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TextRange_Font_get_post */
/* End_PlaceHolder_TextRange_Font_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "hyperlinks", {
/**
* Returns a collection of hyperlinks that exist on this `TextRange`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_Hyperlinks_get */
/* End_PlaceHolder_TextRange_Hyperlinks_get */
_throwIfApiNotSupported("TextRange.hyperlinks", _defaultApiSetName, "1.10", _hostName);
if (!this._H) {
this._H = _createPropertyObject(PowerPoint.HyperlinkScopedCollection, this, "Hyperlinks", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TextRange_Hyperlinks_get_post */
/* End_PlaceHolder_TextRange_Hyperlinks_get_post */
return this._H;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "paragraphFormat", {
/**
* Represents the paragraph format of the text range. See {@link PowerPoint.ParagraphFormat} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_ParagraphFormat_get */
/* End_PlaceHolder_TextRange_ParagraphFormat_get */
if (!this._P) {
this._P = _createPropertyObject(PowerPoint.ParagraphFormat, this, "ParagraphFormat", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TextRange_ParagraphFormat_get_post */
/* End_PlaceHolder_TextRange_ParagraphFormat_get_post */
return this._P;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "length", {
/**
* 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 1.5]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_Length_get */
/* End_PlaceHolder_TextRange_Length_get */
_throwIfNotLoaded("length", this._L, _typeTextRange, this._isNull);
_throwIfApiNotSupported("TextRange.length", _defaultApiSetName, "1.5", _hostName);
return this._L;
},
set: function (value) {
/* Begin_PlaceHolder_TextRange_Length_set */
/* End_PlaceHolder_TextRange_Length_set */
this._L = value;
_invokeSetProperty(this, "Length", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "start", {
/**
* 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 1.5]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_Start_get */
/* End_PlaceHolder_TextRange_Start_get */
_throwIfNotLoaded("start", this._S, _typeTextRange, this._isNull);
_throwIfApiNotSupported("TextRange.start", _defaultApiSetName, "1.5", _hostName);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_TextRange_Start_set */
/* End_PlaceHolder_TextRange_Start_set */
this._S = value;
_invokeSetProperty(this, "Start", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TextRange.prototype, "text", {
/**
* Represents the plain text content of the text range.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_TextRange_Text_get */
/* End_PlaceHolder_TextRange_Text_get */
_throwIfNotLoaded("text", this._T, _typeTextRange, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_TextRange_Text_set */
/* End_PlaceHolder_TextRange_Text_set */
this._T = value;
_invokeSetProperty(this, "Text", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "font" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "hyperlinks" /* COLLECTION; Collections may not have a "SET" method */,
// * "length" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "paragraphFormat" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "start" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "text" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Returns the parent {@link PowerPoint.TextFrame} object that holds this `TextRange`.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
TextRange.prototype.getParentTextFrame = function () {
/* Begin_PlaceHolder_TextRange_GetParentTextFrame */
/* End_PlaceHolder_TextRange_GetParentTextFrame */
_throwIfApiNotSupported("TextRange.getParentTextFrame", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.TextFrame, this, "GetParentTextFrame", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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.
*/
TextRange.prototype.getSubstring = function (start, length) {
/* Begin_PlaceHolder_TextRange_GetSubstring */
/* End_PlaceHolder_TextRange_GetSubstring */
return _createMethodObject(PowerPoint.TextRange, this, "GetSubstring", 0 /* Default */, [start, length], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Sets a hyperlink on this `TextRange` with the specified options. This will delete all existing hyperlinks on this `TextRange`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Optional. The options for the hyperlink.
* @returns The newly created {@link PowerPoint.Hyperlink} object.
*/
TextRange.prototype.setHyperlink = function (options) {
/* Begin_PlaceHolder_TextRange_SetHyperlink */
/* End_PlaceHolder_TextRange_SetHyperlink */
_throwIfApiNotSupported("TextRange.setHyperlink", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.Hyperlink, this, "SetHyperlink", 0 /* Default */, [options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Selects this `TextRange` in the current view.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
TextRange.prototype.setSelected = function () {
/* Begin_PlaceHolder_TextRange_SetSelected */
/* End_PlaceHolder_TextRange_SetSelected */
_throwIfApiNotSupported("TextRange.setSelected", _defaultApiSetName, "1.5", _hostName);
_invokeMethod(this, "SetSelected", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TextRange.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TextRange_HandleResult */
/* End_PlaceHolder_TextRange_HandleResult */
if (!_isUndefined(obj["Length"])) {
this._L = obj["Length"];
/* Begin_PlaceHolder_TextRange_HandleResult_Prop_Length */
/* End_PlaceHolder_TextRange_HandleResult_Prop_Length */
}
if (!_isUndefined(obj["Start"])) {
this._S = obj["Start"];
/* Begin_PlaceHolder_TextRange_HandleResult_Prop_Start */
/* End_PlaceHolder_TextRange_HandleResult_Prop_Start */
}
if (!_isUndefined(obj["Text"])) {
this._T = obj["Text"];
/* Begin_PlaceHolder_TextRange_HandleResult_Prop_Text */
/* End_PlaceHolder_TextRange_HandleResult_Prop_Text */
}
_handleNavigationPropertyResults(this, obj, ["font", "Font", "hyperlinks", "Hyperlinks", "paragraphFormat", "ParagraphFormat"]);
};
TextRange.prototype.load = function (options) {
return _load(this, options);
};
TextRange.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TextRange.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TextRange_HandleRetrieveResult */
/* End_PlaceHolder_TextRange_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
TextRange.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TextRange.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TextRange.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TextRange;
}(OfficeExtension.ClientObject));
PowerPoint.TextRange = TextRange;
/* Begin_PlaceHolder_TextRange_AfterDeclaration */
/* End_PlaceHolder_TextRange_AfterDeclaration */
/* Begin_PlaceHolder_HyperlinkType_BeforeDeclaration */
/* End_PlaceHolder_HyperlinkType_BeforeDeclaration */
/**
* Specifies the type of object that a hyperlink is applied to.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var HyperlinkType;
(function (HyperlinkType) {
/**
* Specifies that the hyperlink is applied to a TextRange.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
HyperlinkType["textRange"] = "TextRange";
/**
* Specifies that the hyperlink is applied to a Shape.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
HyperlinkType["shape"] = "Shape";
})(HyperlinkType = PowerPoint.HyperlinkType || (PowerPoint.HyperlinkType = {}));
/* Begin_PlaceHolder_HyperlinkType_AfterDeclaration */
/* End_PlaceHolder_HyperlinkType_AfterDeclaration */
var _typeHyperlink = "Hyperlink";
/* Begin_PlaceHolder_Hyperlink_BeforeDeclaration */
/* End_PlaceHolder_Hyperlink_BeforeDeclaration */
/**
* Represents a single hyperlink.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*/
var Hyperlink = /** @class */ (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", "screenTip", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Hyperlink.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Address", "ScreenTip", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Hyperlink.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Hyperlink.prototype, "address", {
/* Begin_PlaceHolder_Hyperlink_Custom_Members */
/* End_PlaceHolder_Hyperlink_Custom_Members */
/**
* Specifies the address of the hyperlink, which can be a URL, a file name or file path, or an email address with the `mailto` URI scheme.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*/
get: function () {
/* Begin_PlaceHolder_Hyperlink_Address_get */
/* End_PlaceHolder_Hyperlink_Address_get */
_throwIfNotLoaded("address", this._A, _typeHyperlink, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_Hyperlink_Address_set */
/* End_PlaceHolder_Hyperlink_Address_set */
this._A = value;
_invokeSetProperty(this, "Address", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Hyperlink.prototype, "screenTip", {
/**
* Specifies the string displayed when hovering over the hyperlink.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*/
get: function () {
/* Begin_PlaceHolder_Hyperlink_ScreenTip_get */
/* End_PlaceHolder_Hyperlink_ScreenTip_get */
_throwIfNotLoaded("screenTip", this._S, _typeHyperlink, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_Hyperlink_ScreenTip_set */
/* End_PlaceHolder_Hyperlink_ScreenTip_set */
this._S = value;
_invokeSetProperty(this, "ScreenTip", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Hyperlink.prototype, "type", {
/**
* Returns the type of object that the hyperlink is applied to. See {@link PowerPoint.HyperlinkType} for details.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Hyperlink_Type_get */
/* End_PlaceHolder_Hyperlink_Type_get */
_throwIfNotLoaded("type", this._T, _typeHyperlink, this._isNull);
_throwIfApiNotSupported("Hyperlink.type", _defaultApiSetName, "1.10", _hostName);
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "address" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "screenTip" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes the hyperlink.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
Hyperlink.prototype.delete = function () {
/* Begin_PlaceHolder_Hyperlink_Delete */
/* End_PlaceHolder_Hyperlink_Delete */
_throwIfApiNotSupported("Hyperlink.delete", _defaultApiSetName, "1.10", _hostName);
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Returns the {@link PowerPoint.Shape} object that the hyperlink is applied to.
If the hyperlink is not of type `shape`, or it is within a domain that does not currently support a {@link PowerPoint.Shape}, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
Hyperlink.prototype.getLinkedShapeOrNullObject = function () {
/* Begin_PlaceHolder_Hyperlink_GetLinkedShapeOrNullObject */
/* End_PlaceHolder_Hyperlink_GetLinkedShapeOrNullObject */
_throwIfApiNotSupported("Hyperlink.getLinkedShapeOrNullObject", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "GetLinkedShapeOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the {@link PowerPoint.TextRange} object that the hyperlink is applied to.
If the hyperlink is not of type `textRange`, or it is within a domain that does not currently support a {@link PowerPoint.TextRange}, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
Hyperlink.prototype.getLinkedTextRangeOrNullObject = function () {
/* Begin_PlaceHolder_Hyperlink_GetLinkedTextRangeOrNullObject */
/* End_PlaceHolder_Hyperlink_GetLinkedTextRangeOrNullObject */
_throwIfApiNotSupported("Hyperlink.getLinkedTextRangeOrNullObject", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.TextRange, this, "GetLinkedTextRangeOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Hyperlink.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Hyperlink_HandleResult */
/* End_PlaceHolder_Hyperlink_HandleResult */
if (!_isUndefined(obj["Address"])) {
this._A = obj["Address"];
/* Begin_PlaceHolder_Hyperlink_HandleResult_Prop_Address */
/* End_PlaceHolder_Hyperlink_HandleResult_Prop_Address */
}
if (!_isUndefined(obj["ScreenTip"])) {
this._S = obj["ScreenTip"];
/* Begin_PlaceHolder_Hyperlink_HandleResult_Prop_ScreenTip */
/* End_PlaceHolder_Hyperlink_HandleResult_Prop_ScreenTip */
}
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_Hyperlink_HandleResult_Prop_Type */
/* End_PlaceHolder_Hyperlink_HandleResult_Prop_Type */
}
};
Hyperlink.prototype.load = function (options) {
return _load(this, options);
};
Hyperlink.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Hyperlink.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Hyperlink_HandleRetrieveResult */
/* End_PlaceHolder_Hyperlink_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Hyperlink` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object.
*/
Hyperlink.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Hyperlink.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Hyperlink.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Hyperlink;
}(OfficeExtension.ClientObject));
PowerPoint.Hyperlink = Hyperlink;
/* Begin_PlaceHolder_Hyperlink_AfterDeclaration */
/* End_PlaceHolder_Hyperlink_AfterDeclaration */
/* Begin_PlaceHolder_PlaceholderType_BeforeDeclaration */
/* End_PlaceHolder_PlaceholderType_BeforeDeclaration */
/**
* Specifies the type of a placeholder.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var PlaceholderType;
(function (PlaceholderType) {
/**
* The placeholder is unsupported.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["unsupported"] = "Unsupported";
/**
* The placeholder is for a date.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["date"] = "Date";
/**
* The placeholder is for a slide number.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["slideNumber"] = "SlideNumber";
/**
* The placeholder is for a footer.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["footer"] = "Footer";
/**
* The placeholder is for a header.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["header"] = "Header";
/**
* The placeholder is for a title.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["title"] = "Title";
/**
* The placeholder is for a body.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["body"] = "Body";
/**
* The placeholder is for a center title.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["centerTitle"] = "CenterTitle";
/**
* The placeholder is for a subtitle.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["subtitle"] = "Subtitle";
/**
* The placeholder is for a vertical title.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["verticalTitle"] = "VerticalTitle";
/**
* The placeholder is for a vertical body.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["verticalBody"] = "VerticalBody";
/**
* The placeholder is for generic content.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["content"] = "Content";
/**
* The placeholder is for a chart.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["chart"] = "Chart";
/**
* The placeholder is for a table.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["table"] = "Table";
/**
* The placeholder is for an online picture.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["onlinePicture"] = "OnlinePicture";
/**
* The placeholder is for a SmartArt.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["smartArt"] = "SmartArt";
/**
* The placeholder is for media.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["media"] = "Media";
/**
* The placeholder is for generic vertical content.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["verticalContent"] = "VerticalContent";
/**
* The placeholder is for a picture.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["picture"] = "Picture";
/**
* The placeholder is for a cameo.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
PlaceholderType["cameo"] = "Cameo";
})(PlaceholderType = PowerPoint.PlaceholderType || (PowerPoint.PlaceholderType = {}));
/* Begin_PlaceHolder_PlaceholderType_AfterDeclaration */
/* End_PlaceHolder_PlaceholderType_AfterDeclaration */
/* Begin_PlaceHolder_ShapeType_BeforeDeclaration */
/* End_PlaceHolder_ShapeType_BeforeDeclaration */
/**
* Specifies the type of a shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeType;
(function (ShapeType) {
/**
* The given shape's type is unsupported.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["unsupported"] = "Unsupported";
/**
* The shape is an image.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["image"] = "Image";
/**
* The shape is a geometric shape such as rectangle.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["geometricShape"] = "GeometricShape";
/**
* The shape is a group shape which contains sub-shapes.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["group"] = "Group";
/**
* The shape is a line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["line"] = "Line";
/**
* The shape is a table.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["table"] = "Table";
/**
* The shape is a callout.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["callout"] = "Callout";
/**
* The shape is a chart.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["chart"] = "Chart";
/**
* The shape is a content Office Add-in.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["contentApp"] = "ContentApp";
/**
* The shape is a diagram.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["diagram"] = "Diagram";
/**
* The shape is a freeform object.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["freeform"] = "Freeform";
/**
* The shape is a graphic.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["graphic"] = "Graphic";
/**
* The shape is an ink object.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["ink"] = "Ink";
/**
* The shape is a media object.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["media"] = "Media";
/**
* The shape is a 3D model.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["model3D"] = "Model3D";
/**
* The shape is an OLE (Object Linking and Embedding) object.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["ole"] = "Ole";
/**
* The shape is a placeholder.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["placeholder"] = "Placeholder";
/**
* The shape is a SmartArt graphic.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["smartArt"] = "SmartArt";
/**
* The shape is a text box.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeType["textBox"] = "TextBox";
})(ShapeType = PowerPoint.ShapeType || (PowerPoint.ShapeType = {}));
/* Begin_PlaceHolder_ShapeType_AfterDeclaration */
/* End_PlaceHolder_ShapeType_AfterDeclaration */
var _typePlaceholderFormat = "PlaceholderFormat";
/* Begin_PlaceHolder_PlaceholderFormat_BeforeDeclaration */
/* End_PlaceHolder_PlaceholderFormat_BeforeDeclaration */
/**
* Represents the properties of a `placeholder` shape.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var PlaceholderFormat = /** @class */ (function (_super) {
__extends(PlaceholderFormat, _super);
function PlaceholderFormat() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(PlaceholderFormat.prototype, "_className", {
get: function () {
return "PlaceholderFormat";
},
enumerable: true,
configurable: true
});
Object.defineProperty(PlaceholderFormat.prototype, "_scalarPropertyNames", {
get: function () {
return ["containedType", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(PlaceholderFormat.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["ContainedType", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(PlaceholderFormat.prototype, "containedType", {
/* Begin_PlaceHolder_PlaceholderFormat_Custom_Members */
/* End_PlaceHolder_PlaceholderFormat_Custom_Members */
/**
* Gets the type of the shape contained within the placeholder. See {@link PowerPoint.ShapeType} for details.
Returns `null` if the placeholder is empty.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_PlaceholderFormat_ContainedType_get */
/* End_PlaceHolder_PlaceholderFormat_ContainedType_get */
_throwIfNotLoaded("containedType", this._C, _typePlaceholderFormat, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PlaceholderFormat.prototype, "type", {
/**
* Returns the type of this placeholder. See {@link PowerPoint.PlaceholderType} for details.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_PlaceholderFormat_Type_get */
/* End_PlaceHolder_PlaceholderFormat_Type_get */
_throwIfNotLoaded("type", this._T, _typePlaceholderFormat, this._isNull);
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/** Handle results returned from the document
* @private
*/
PlaceholderFormat.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_PlaceholderFormat_HandleResult */
/* End_PlaceHolder_PlaceholderFormat_HandleResult */
if (!_isUndefined(obj["ContainedType"])) {
this._C = obj["ContainedType"];
/* Begin_PlaceHolder_PlaceholderFormat_HandleResult_Prop_ContainedType */
/* End_PlaceHolder_PlaceholderFormat_HandleResult_Prop_ContainedType */
}
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_PlaceholderFormat_HandleResult_Prop_Type */
/* End_PlaceHolder_PlaceholderFormat_HandleResult_Prop_Type */
}
};
PlaceholderFormat.prototype.load = function (options) {
return _load(this, options);
};
PlaceholderFormat.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
PlaceholderFormat.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_PlaceholderFormat_HandleRetrieveResult */
/* End_PlaceHolder_PlaceholderFormat_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.PlaceholderFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PlaceholderFormatData`) that contains shallow copies of any loaded child properties from the original object.
*/
PlaceholderFormat.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
PlaceholderFormat.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
PlaceholderFormat.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return PlaceholderFormat;
}(OfficeExtension.ClientObject));
PowerPoint.PlaceholderFormat = PlaceholderFormat;
/* Begin_PlaceHolder_CommentAnchorType_BeforeDeclaration */
/* End_PlaceHolder_CommentAnchorType_BeforeDeclaration */
/**
* Specifies the type of anchor to which a comment is attached.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var CommentAnchorType;
(function (CommentAnchorType) {
/**
* The comment anchor is unsupported.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentAnchorType["unsupported"] = "Unsupported";
/**
* The comment is anchored to a slide.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentAnchorType["slide"] = "Slide";
/**
* The comment is anchored to a shape.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentAnchorType["shape"] = "Shape";
/**
* The comment is anchored to a text range.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentAnchorType["textRange"] = "TextRange";
})(CommentAnchorType = PowerPoint.CommentAnchorType || (PowerPoint.CommentAnchorType = {}));
/* Begin_PlaceHolder_CommentContentType_BeforeDeclaration */
/* End_PlaceHolder_CommentContentType_BeforeDeclaration */
/**
* Specifies the type of content for a comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var CommentContentType;
(function (CommentContentType) {
/**
* The comment content contains only plain text.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentContentType["plain"] = "Plain";
/**
* The comment content contains mentions.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentContentType["mention"] = "Mention";
})(CommentContentType = PowerPoint.CommentContentType || (PowerPoint.CommentContentType = {}));
var _typeDocumentTask = "DocumentTask";
/* Begin_PlaceHolder_DocumentTask_BeforeDeclaration */
/* End_PlaceHolder_DocumentTask_BeforeDeclaration */
/**
* Represents a task associated with a comment thread.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var DocumentTask = /** @class */ (function (_super) {
__extends(DocumentTask, _super);
function DocumentTask() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(DocumentTask.prototype, "_className", {
get: function () {
return "DocumentTask";
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "_scalarPropertyNames", {
get: function () {
return ["assignees", "completedBy", "completedDateTime", "createdBy", "createdDateTime", "title"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Assignees", "CompletedBy", "CompletedDateTime", "CreatedBy", "CreatedDateTime", "Title"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, false, false, false, false, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "_navigationPropertyNames", {
get: function () {
return ["comment"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "comment", {
/**
* Gets the comment with which the task is associated.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_Comment_get */
/* End_PlaceHolder_DocumentTask_Comment_get */
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.Comment, this, "Comment", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_DocumentTask_Comment_get_post */
/* End_PlaceHolder_DocumentTask_Comment_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "assignees", {
/**
* Gets the users to which the task is assigned.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_Assignees_get */
/* End_PlaceHolder_DocumentTask_Assignees_get */
_throwIfNotLoaded("assignees", this._A, _typeDocumentTask, this._isNull);
return this._A;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "completedBy", {
/**
* Gets the most recent user to have completed the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_CompletedBy_get */
/* End_PlaceHolder_DocumentTask_CompletedBy_get */
_throwIfNotLoaded("completedBy", this._Co, _typeDocumentTask, this._isNull);
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "completedDateTime", {
/**
* Gets the date and time that the task was completed. All dates are in UTC.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_CompletedDateTime_get */
/* End_PlaceHolder_DocumentTask_CompletedDateTime_get */
_throwIfNotLoaded("completedDateTime", this._Com, _typeDocumentTask, this._isNull);
return this._Com;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "createdBy", {
/**
* Gets the user who created the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_CreatedBy_get */
/* End_PlaceHolder_DocumentTask_CreatedBy_get */
_throwIfNotLoaded("createdBy", this._Cr, _typeDocumentTask, this._isNull);
return this._Cr;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "createdDateTime", {
/**
* Gets the date and time that the task was created. All dates are in UTC.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_CreatedDateTime_get */
/* End_PlaceHolder_DocumentTask_CreatedDateTime_get */
_throwIfNotLoaded("createdDateTime", this._Cre, _typeDocumentTask, this._isNull);
return this._Cre;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTask.prototype, "title", {
/**
* Specifies the title of the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_DocumentTask_Title_get */
/* End_PlaceHolder_DocumentTask_Title_get */
_throwIfNotLoaded("title", this._T, _typeDocumentTask, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentTask_Title_set */
/* End_PlaceHolder_DocumentTask_Title_set */
this._T = value;
_invokeSetProperty(this, "Title", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
/**
* Adds the given user to the list of assignees attached to the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param assignee The assignee, which can be either a user ID string (a GUID) or an `Identity` object.
*/
DocumentTask.prototype.assign = function (assignee) {
/* Begin_PlaceHolder_DocumentTask_Assign */
/* End_PlaceHolder_DocumentTask_Assign */
_invokeMethod(this, "Assign", 0 /* Default */, [assignee], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Removes the given user from the list of assignees attached to the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param assignee The assignee, which can be either a user ID string (a GUID) or an `Identity` object.
*/
DocumentTask.prototype.unassign = function (assignee) {
/* Begin_PlaceHolder_DocumentTask_Unassign */
/* End_PlaceHolder_DocumentTask_Unassign */
_invokeMethod(this, "Unassign", 0 /* Default */, [assignee], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Removes all users from the list of assignees attached to the task.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
DocumentTask.prototype.unassignAll = function () {
/* Begin_PlaceHolder_DocumentTask_UnassignAll */
/* End_PlaceHolder_DocumentTask_UnassignAll */
_invokeMethod(this, "UnassignAll", 0 /* Default */, [], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
DocumentTask.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_DocumentTask_HandleResult */
/* End_PlaceHolder_DocumentTask_HandleResult */
if (!_isUndefined(obj["Assignees"])) {
this._A = obj["Assignees"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_Assignees */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_Assignees */
}
if (!_isUndefined(obj["CompletedBy"])) {
this._Co = obj["CompletedBy"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_CompletedBy */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_CompletedBy */
}
if (!_isUndefined(obj["CompletedDateTime"])) {
this._Com = obj["CompletedDateTime"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_CompletedDateTime */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_CompletedDateTime */
}
if (!_isUndefined(obj["CreatedBy"])) {
this._Cr = obj["CreatedBy"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_CreatedBy */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_CreatedBy */
}
if (!_isUndefined(obj["CreatedDateTime"])) {
this._Cre = obj["CreatedDateTime"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_CreatedDateTime */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_CreatedDateTime */
}
if (!_isUndefined(obj["Title"])) {
this._T = obj["Title"];
/* Begin_PlaceHolder_DocumentTask_HandleResult_Prop_Title */
/* End_PlaceHolder_DocumentTask_HandleResult_Prop_Title */
}
_handleNavigationPropertyResults(this, obj, ["comment", "Comment"]);
};
DocumentTask.prototype.load = function (options) {
return _load(this, options);
};
DocumentTask.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
DocumentTask.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_DocumentTask_HandleRetrieveResult */
/* End_PlaceHolder_DocumentTask_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.DocumentTask` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.DocumentTaskData`) that contains shallow copies of any loaded child properties from the original object.
*/
DocumentTask.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
DocumentTask.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
DocumentTask.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return DocumentTask;
}(OfficeExtension.ClientObject));
PowerPoint.DocumentTask = DocumentTask;
var _typeCommentReply = "CommentReply";
/* Begin_PlaceHolder_CommentReply_BeforeDeclaration */
/* End_PlaceHolder_CommentReply_BeforeDeclaration */
/**
* Represents a reply to a {@link PowerPoint.Comment}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var CommentReply = /** @class */ (function (_super) {
__extends(CommentReply, _super);
function CommentReply() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CommentReply.prototype, "_className", {
get: function () {
return "CommentReply";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "_scalarPropertyNames", {
get: function () {
return ["author", "content", "contentType", "creationDate", "id", "mentions", "resolved", "richContent"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Author", "Content", "ContentType", "CreationDate", "Id", "Mentions", "Resolved", "RichContent"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, true, false, false, false, false, true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "author", {
/**
* Gets the author of this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_Author_get */
/* End_PlaceHolder_CommentReply_Author_get */
_throwIfNotLoaded("author", this._A, _typeCommentReply, this._isNull);
return this._A;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "content", {
/**
* Gets or sets the plain text content of this reply. For comments with `contentType` as `mention`, this is text with mentions formatted as \@Name (e.g., Hello \@John Smith).
Setting this property requires the current user to be the author of this reply; otherwise, a `PermissionDenied` exception is thrown when the change is committed.
To update content that includes mentions, use `updateMentions` instead.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_Content_get */
/* End_PlaceHolder_CommentReply_Content_get */
_throwIfNotLoaded("content", this._C, _typeCommentReply, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_CommentReply_Content_set */
/* End_PlaceHolder_CommentReply_Content_set */
this._C = value;
_invokeSetProperty(this, "Content", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "contentType", {
/**
* Gets the content type of this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_ContentType_get */
/* End_PlaceHolder_CommentReply_ContentType_get */
_throwIfNotLoaded("contentType", this._Co, _typeCommentReply, this._isNull);
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "creationDate", {
/**
* Gets the creation time of this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_CreationDate_get */
/* End_PlaceHolder_CommentReply_CreationDate_get */
_throwIfNotLoaded("creationDate", this._Cr, _typeCommentReply, this._isNull);
return this._Cr;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "id", {
/**
* Gets the unique ID of this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_Id_get */
/* End_PlaceHolder_CommentReply_Id_get */
_throwIfNotLoaded("id", this._I, _typeCommentReply, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "mentions", {
/**
* Gets the entities (for example, people) that are mentioned in this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_Mentions_get */
/* End_PlaceHolder_CommentReply_Mentions_get */
_throwIfNotLoaded("mentions", this._M, _typeCommentReply, this._isNull);
return this._M;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "resolved", {
/**
* Gets or sets whether this reply's comment thread is resolved. A value of `true` means the thread is resolved.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_Resolved_get */
/* End_PlaceHolder_CommentReply_Resolved_get */
_throwIfNotLoaded("resolved", this._R, _typeCommentReply, this._isNull);
return this._R;
},
set: function (value) {
/* Begin_PlaceHolder_CommentReply_Resolved_set */
/* End_PlaceHolder_CommentReply_Resolved_set */
this._R = value;
_invokeSetProperty(this, "Resolved", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReply.prototype, "richContent", {
/**
* Gets the rich text content of this reply (e.g., mentions in comments). For comments with `contentType` as `plain`, this is the raw text with no XML tags.
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: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_CommentReply_RichContent_get */
/* End_PlaceHolder_CommentReply_RichContent_get */
_throwIfNotLoaded("richContent", this._Ri, _typeCommentReply, this._isNull);
return this._Ri;
},
enumerable: true,
configurable: true
});
/**
* Assigns a task to the given user.
If a task already exists, the user is added as an additional assignee. If there is no task, one is created.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param assignee The assignee, which can be either a user ID string (a GUID) or an `Identity` object.
*/
CommentReply.prototype.assignTask = function (assignee) {
/* Begin_PlaceHolder_CommentReply_AssignTask */
/* End_PlaceHolder_CommentReply_AssignTask */
return _createMethodObject(PowerPoint.DocumentTask, this, "AssignTask", 0 /* Default */, [assignee], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Deletes this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentReply.prototype.delete = function () {
/* Begin_PlaceHolder_CommentReply_Delete */
/* End_PlaceHolder_CommentReply_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Gets the parent comment of this reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentReply.prototype.getParentComment = function () {
/* Begin_PlaceHolder_CommentReply_GetParentComment */
/* End_PlaceHolder_CommentReply_GetParentComment */
return _createMethodObject(PowerPoint.Comment, this, "GetParentComment", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the task associated with this reply's comment thread.
If there is no task, an `ItemNotFound` exception is thrown.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentReply.prototype.getTask = function () {
/* Begin_PlaceHolder_CommentReply_GetTask */
/* End_PlaceHolder_CommentReply_GetTask */
return _createMethodObject(PowerPoint.DocumentTask, this, "GetTask", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the task associated with this reply's comment thread.
If there is no task, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentReply.prototype.getTaskOrNullObject = function () {
/* Begin_PlaceHolder_CommentReply_GetTaskOrNullObject */
/* End_PlaceHolder_CommentReply_GetTaskOrNullObject */
return _createMethodObject(PowerPoint.DocumentTask, this, "GetTaskOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Updates the content with a specially formatted string and a list of mentions.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that are parsed into the string when displayed by PowerPoint.
*/
CommentReply.prototype.updateMentions = function (contentWithMentions) {
/* Begin_PlaceHolder_CommentReply_UpdateMentions */
/* End_PlaceHolder_CommentReply_UpdateMentions */
_invokeMethod(this, "UpdateMentions", 0 /* Default */, [contentWithMentions], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
CommentReply.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CommentReply_HandleResult */
/* End_PlaceHolder_CommentReply_HandleResult */
if (!_isUndefined(obj["Author"])) {
this._A = obj["Author"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_Author */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_Author */
}
if (!_isUndefined(obj["Content"])) {
this._C = obj["Content"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_Content */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_Content */
}
if (!_isUndefined(obj["ContentType"])) {
this._Co = obj["ContentType"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_ContentType */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_ContentType */
}
if (!_isUndefined(obj["CreationDate"])) {
this._Cr = _adjustToDateTime(obj["CreationDate"]);
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_CreationDate */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_CreationDate */
}
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_Id */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Mentions"])) {
this._M = obj["Mentions"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_Mentions */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_Mentions */
}
if (!_isUndefined(obj["Resolved"])) {
this._R = obj["Resolved"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_Resolved */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_Resolved */
}
if (!_isUndefined(obj["RichContent"])) {
this._Ri = obj["RichContent"];
/* Begin_PlaceHolder_CommentReply_HandleResult_Prop_RichContent */
/* End_PlaceHolder_CommentReply_HandleResult_Prop_RichContent */
}
};
CommentReply.prototype.load = function (options) {
return _load(this, options);
};
CommentReply.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
CommentReply.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_CommentReply_HandleIdResult_Prop_Id */
/* End_PlaceHolder_CommentReply_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
CommentReply.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
if (_isNullOrUndefined(value))
return;
var obj = value;
/* Begin_PlaceHolder_CommentReply_HandleRetrieveResult */
/* End_PlaceHolder_CommentReply_HandleRetrieveResult */
if (!_isUndefined(obj["CreationDate"])) {
obj["creationDate"] = _adjustToDateTime(obj["creationDate"]);
}
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object.
*/
CommentReply.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
CommentReply.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
CommentReply.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return CommentReply;
}(OfficeExtension.ClientObject));
PowerPoint.CommentReply = CommentReply;
var _typeCommentReplyCollection = "CommentReplyCollection";
/* Begin_PlaceHolder_CommentReplyCollection_BeforeDeclaration */
/* End_PlaceHolder_CommentReplyCollection_BeforeDeclaration */
/**
* Represents a collection of comment replies.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var CommentReplyCollection = /** @class */ (function (_super) {
__extends(CommentReplyCollection, _super);
function CommentReplyCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CommentReplyCollection.prototype, "_className", {
get: function () {
return "CommentReplyCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReplyCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommentReplyCollection.prototype, "items", {
/* Begin_PlaceHolder_CommentReplyCollection_Custom_Members */
/* End_PlaceHolder_CommentReplyCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_CommentReplyCollection_items */
/* End_PlaceHolder_CommentReplyCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeCommentReplyCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
/**
* Creates a new comment reply.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param content The comment reply content. This can be either a plain text string or `CommentRichContent` (e.g. for comments with mentions).
*/
CommentReplyCollection.prototype.add = function (content) {
/* Begin_PlaceHolder_CommentReplyCollection_Add */
/* End_PlaceHolder_CommentReplyCollection_Add */
return _createMethodObject(PowerPoint.CommentReply, this, "Add", 0 /* Default */, [content], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Gets the number of comment replies in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentReplyCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_CommentReplyCollection_GetCount */
/* End_PlaceHolder_CommentReplyCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */ | 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Gets a comment reply by its ID.
Throws an `ItemNotFound` exception if no item is found with the specified ID.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the comment reply.
*/
CommentReplyCollection.prototype.getItem = function (id) {
/* Begin_PlaceHolder_CommentReplyCollection_GetItem */
/* End_PlaceHolder_CommentReplyCollection_GetItem */
return _createIndexerObject(PowerPoint.CommentReply, this, [id]);
};
/**
* Gets a comment reply by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param index The index of the comment reply.
*/
CommentReplyCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_CommentReplyCollection_GetItemAt */
/* End_PlaceHolder_CommentReplyCollection_GetItemAt */
return _createMethodObject(PowerPoint.CommentReply, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets a comment reply by its ID.
If no item is found with the specified ID, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the comment reply.
*/
CommentReplyCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_CommentReplyCollection_GetItemOrNullObject */
/* End_PlaceHolder_CommentReplyCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.CommentReply, this, "GetItemOrNullObject", 1 /* Read */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/** Handle results returned from the document
* @private
*/
CommentReplyCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CommentReplyCollection_HandleResult */
/* End_PlaceHolder_CommentReplyCollection_HandleResult */
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(PowerPoint.CommentReply, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
CommentReplyCollection.prototype.load = function (options) {
return _load(this, options);
};
CommentReplyCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
CommentReplyCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CommentReplyCollection_HandleRetrieveResult */
/* End_PlaceHolder_CommentReplyCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.CommentReply, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
CommentReplyCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
CommentReplyCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.CommentReply, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return CommentReplyCollection;
}(OfficeExtension.ClientObject));
PowerPoint.CommentReplyCollection = CommentReplyCollection;
var _typeComment = "Comment";
/* Begin_PlaceHolder_Comment_BeforeDeclaration */
/* End_PlaceHolder_Comment_BeforeDeclaration */
/**
* Represents a comment in PowerPoint.
Note: This API only supports modern comments in PowerPoint. Legacy comments are not supported.
For more information about modern comments, see {@link https://support.microsoft.com/office/c0aa37bb-82cb-414c-872d-178946ff60ec | Modern comments in PowerPoint}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var Comment = /** @class */ (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 ["anchorType", "author", "content", "contentType", "creationDate", "id", "mentions", "resolved", "richContent"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["AnchorType", "Author", "Content", "ContentType", "CreationDate", "Id", "Mentions", "Resolved", "RichContent"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, false, true, false, false, false, false, true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "_navigationPropertyNames", {
get: function () {
return ["replies"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "replies", {
/**
* Gets the collection of replies for this comment thread.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Replies_get */
/* End_PlaceHolder_Comment_Replies_get */
if (!this._R) {
this._R = _createPropertyObject(PowerPoint.CommentReplyCollection, this, "Replies", true /*isCollection*/, 1 /* restrictedResourceAccess */ | 4 /* concurrent */);
}
/* Begin_PlaceHolder_Comment_Replies_get_post */
/* End_PlaceHolder_Comment_Replies_get_post */
return this._R;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "anchorType", {
/**
* Gets the type of anchor for this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_AnchorType_get */
/* End_PlaceHolder_Comment_AnchorType_get */
_throwIfNotLoaded("anchorType", this._A, _typeComment, this._isNull);
return this._A;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "author", {
/**
* Gets the author of this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Author_get */
/* End_PlaceHolder_Comment_Author_get */
_throwIfNotLoaded("author", this._Au, _typeComment, this._isNull);
return this._Au;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "content", {
/**
* Gets or sets the plain text content of this comment. For comments with `contentType` as `mention`, this is text with mentions formatted as \@Name (e.g., Hello \@John Smith).
Setting this property requires the current user to be the author of this comment; otherwise, a `PermissionDenied` exception is thrown when the change is committed.
To update content that includes mentions, use `updateMentions` instead.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Content_get */
/* End_PlaceHolder_Comment_Content_get */
_throwIfNotLoaded("content", this._C, _typeComment, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_Comment_Content_set */
/* End_PlaceHolder_Comment_Content_set */
this._C = value;
_invokeSetProperty(this, "Content", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "contentType", {
/**
* Gets the content type of this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_ContentType_get */
/* End_PlaceHolder_Comment_ContentType_get */
_throwIfNotLoaded("contentType", this._Co, _typeComment, this._isNull);
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "creationDate", {
/**
* Gets the creation time of this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_CreationDate_get */
/* End_PlaceHolder_Comment_CreationDate_get */
_throwIfNotLoaded("creationDate", this._Cr, _typeComment, this._isNull);
return this._Cr;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "id", {
/**
* Gets the unique ID of this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Id_get */
/* End_PlaceHolder_Comment_Id_get */
_throwIfNotLoaded("id", this._I, _typeComment, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "mentions", {
/**
* Gets the entities (for example, people) that are mentioned in this comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Mentions_get */
/* End_PlaceHolder_Comment_Mentions_get */
_throwIfNotLoaded("mentions", this._M, _typeComment, this._isNull);
return this._M;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "resolved", {
/**
* Gets or sets whether this comment's thread is resolved. A value of `true` means the thread is resolved.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_Resolved_get */
/* End_PlaceHolder_Comment_Resolved_get */
_throwIfNotLoaded("resolved", this._Re, _typeComment, this._isNull);
return this._Re;
},
set: function (value) {
/* Begin_PlaceHolder_Comment_Resolved_set */
/* End_PlaceHolder_Comment_Resolved_set */
this._Re = value;
_invokeSetProperty(this, "Resolved", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Comment.prototype, "richContent", {
/**
* Gets the rich text content of this comment (e.g., mentions in comments). For comments with `contentType` as `plain`, this is the raw text with no XML tags.
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: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Comment_RichContent_get */
/* End_PlaceHolder_Comment_RichContent_get */
_throwIfNotLoaded("richContent", this._Ri, _typeComment, this._isNull);
return this._Ri;
},
enumerable: true,
configurable: true
});
/**
* Adds a new reply to the comment thread.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param content The comment reply content. This can be either a plain text string or `CommentRichContent` (e.g. for comments with mentions).
*/
Comment.prototype.addReply = function (content) {
/* Begin_PlaceHolder_Comment_AddReply */
/* End_PlaceHolder_Comment_AddReply */
return _createMethodObject(PowerPoint.CommentReply, this, "AddReply", 0 /* Default */, [content], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Assigns a task to the given user.
If a task already exists, the user is added as an additional assignee. If there is no task, one is created.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param assignee The assignee, which can be either a user ID string (a GUID) or an `Identity` object.
*/
Comment.prototype.assignTask = function (assignee) {
/* Begin_PlaceHolder_Comment_AssignTask */
/* End_PlaceHolder_Comment_AssignTask */
return _createMethodObject(PowerPoint.DocumentTask, this, "AssignTask", 0 /* Default */, [assignee], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Deletes this comment and all of its replies.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.delete = function () {
/* Begin_PlaceHolder_Comment_Delete */
/* End_PlaceHolder_Comment_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Gets the shape anchor for this comment.
If this comment's anchor type is not `shape`, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.getShapeAnchorOrNullObject = function () {
/* Begin_PlaceHolder_Comment_GetShapeAnchorOrNullObject */
/* End_PlaceHolder_Comment_GetShapeAnchorOrNullObject */
return _createMethodObject(PowerPoint.Shape, this, "GetShapeAnchorOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the slide anchor for this comment.
If this comment's anchor type is not `slide`, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.getSlideAnchorOrNullObject = function () {
/* Begin_PlaceHolder_Comment_GetSlideAnchorOrNullObject */
/* End_PlaceHolder_Comment_GetSlideAnchorOrNullObject */
return _createMethodObject(PowerPoint.Slide, this, "GetSlideAnchorOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the task associated with this comment's thread.
If there is no task, an `ItemNotFound` exception is thrown.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.getTask = function () {
/* Begin_PlaceHolder_Comment_GetTask */
/* End_PlaceHolder_Comment_GetTask */
return _createMethodObject(PowerPoint.DocumentTask, this, "GetTask", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the task associated with this comment's thread.
If there is no task, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.getTaskOrNullObject = function () {
/* Begin_PlaceHolder_Comment_GetTaskOrNullObject */
/* End_PlaceHolder_Comment_GetTaskOrNullObject */
return _createMethodObject(PowerPoint.DocumentTask, this, "GetTaskOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets the text range anchor for this comment.
If this comment's anchor type is not `textRange`, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
Comment.prototype.getTextRangeAnchorOrNullObject = function () {
/* Begin_PlaceHolder_Comment_GetTextRangeAnchorOrNullObject */
/* End_PlaceHolder_Comment_GetTextRangeAnchorOrNullObject */
return _createMethodObject(PowerPoint.TextRange, this, "GetTextRangeAnchorOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Updates the content with a specially formatted string and a list of mentions.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param contentWithMentions The content for the comment. This contains a specially formatted string and a list of mentions that are parsed into the string when displayed by PowerPoint.
*/
Comment.prototype.updateMentions = function (contentWithMentions) {
/* Begin_PlaceHolder_Comment_UpdateMentions */
/* End_PlaceHolder_Comment_UpdateMentions */
_invokeMethod(this, "UpdateMentions", 0 /* Default */, [contentWithMentions], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Comment.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Comment_HandleResult */
/* End_PlaceHolder_Comment_HandleResult */
if (!_isUndefined(obj["AnchorType"])) {
this._A = obj["AnchorType"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_AnchorType */
/* End_PlaceHolder_Comment_HandleResult_Prop_AnchorType */
}
if (!_isUndefined(obj["Author"])) {
this._Au = obj["Author"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_Author */
/* End_PlaceHolder_Comment_HandleResult_Prop_Author */
}
if (!_isUndefined(obj["Content"])) {
this._C = obj["Content"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_Content */
/* End_PlaceHolder_Comment_HandleResult_Prop_Content */
}
if (!_isUndefined(obj["ContentType"])) {
this._Co = obj["ContentType"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_ContentType */
/* End_PlaceHolder_Comment_HandleResult_Prop_ContentType */
}
if (!_isUndefined(obj["CreationDate"])) {
this._Cr = _adjustToDateTime(obj["CreationDate"]);
/* Begin_PlaceHolder_Comment_HandleResult_Prop_CreationDate */
/* End_PlaceHolder_Comment_HandleResult_Prop_CreationDate */
}
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_Id */
/* End_PlaceHolder_Comment_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Mentions"])) {
this._M = obj["Mentions"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_Mentions */
/* End_PlaceHolder_Comment_HandleResult_Prop_Mentions */
}
if (!_isUndefined(obj["Resolved"])) {
this._Re = obj["Resolved"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_Resolved */
/* End_PlaceHolder_Comment_HandleResult_Prop_Resolved */
}
if (!_isUndefined(obj["RichContent"])) {
this._Ri = obj["RichContent"];
/* Begin_PlaceHolder_Comment_HandleResult_Prop_RichContent */
/* End_PlaceHolder_Comment_HandleResult_Prop_RichContent */
}
_handleNavigationPropertyResults(this, obj, ["replies", "Replies"]);
};
Comment.prototype.load = function (options) {
return _load(this, options);
};
Comment.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Comment.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Comment_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Comment_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Comment.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
if (_isNullOrUndefined(value))
return;
var obj = value;
/* Begin_PlaceHolder_Comment_HandleRetrieveResult */
/* End_PlaceHolder_Comment_HandleRetrieveResult */
if (!_isUndefined(obj["CreationDate"])) {
obj["creationDate"] = _adjustToDateTime(obj["creationDate"]);
}
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object.
*/
Comment.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Comment.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Comment.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Comment;
}(OfficeExtension.ClientObject));
PowerPoint.Comment = Comment;
var _typeCommentCollection = "CommentCollection";
/* Begin_PlaceHolder_CommentCollection_BeforeDeclaration */
/* End_PlaceHolder_CommentCollection_BeforeDeclaration */
/**
* Represents a collection of comments.
Note: This API only supports modern comments in PowerPoint. Legacy comments are not supported.
For more information about modern comments, see {@link https://support.microsoft.com/office/c0aa37bb-82cb-414c-872d-178946ff60ec | Modern comments in PowerPoint}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var CommentCollection = /** @class */ (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", {
/* Begin_PlaceHolder_CommentCollection_Custom_Members */
/* End_PlaceHolder_CommentCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_CommentCollection_items */
/* End_PlaceHolder_CommentCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeCommentCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
/**
* Creates a new comment.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @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.
* @param target Optional. The target to which the comment is attached. The target must exist on the same slide as this collection is derived from. If not specified, the comment is attached to the slide of which the collection is derived.
*/
CommentCollection.prototype.add = function (content, target) {
/* Begin_PlaceHolder_CommentCollection_Add */
/* End_PlaceHolder_CommentCollection_Add */
return _createMethodObject(PowerPoint.Comment, this, "Add", 0 /* Default */, [content, target], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Gets the number of comments in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
CommentCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_CommentCollection_GetCount */
/* End_PlaceHolder_CommentCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */ | 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Gets a comment by its ID.
Throws an `ItemNotFound` exception if no item is found with the specified ID.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the comment.
*/
CommentCollection.prototype.getItem = function (id) {
/* Begin_PlaceHolder_CommentCollection_GetItem */
/* End_PlaceHolder_CommentCollection_GetItem */
return _createIndexerObject(PowerPoint.Comment, this, [id]);
};
/**
* Gets a comment by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param index The index of the comment.
*/
CommentCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_CommentCollection_GetItemAt */
/* End_PlaceHolder_CommentCollection_GetItemAt */
return _createMethodObject(PowerPoint.Comment, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets a comment by its ID.
If no item is found with the specified ID, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the comment.
*/
CommentCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_CommentCollection_GetItemOrNullObject */
/* End_PlaceHolder_CommentCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Comment, this, "GetItemOrNullObject", 1 /* Read */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/** Handle results returned from the document
* @private
*/
CommentCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CommentCollection_HandleResult */
/* End_PlaceHolder_CommentCollection_HandleResult */
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(PowerPoint.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);
};
/** Handle retrieve results
* @private
*/
CommentCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CommentCollection_HandleRetrieveResult */
/* End_PlaceHolder_CommentCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Comment, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
CommentCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
CommentCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Comment, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return CommentCollection;
}(OfficeExtension.ClientObject));
PowerPoint.CommentCollection = CommentCollection;
var _typeDocumentTaskCollection = "DocumentTaskCollection";
/* Begin_PlaceHolder_DocumentTaskCollection_BeforeDeclaration */
/* End_PlaceHolder_DocumentTaskCollection_BeforeDeclaration */
/**
* Represents a collection of tasks.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var DocumentTaskCollection = /** @class */ (function (_super) {
__extends(DocumentTaskCollection, _super);
function DocumentTaskCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(DocumentTaskCollection.prototype, "_className", {
get: function () {
return "DocumentTaskCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTaskCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentTaskCollection.prototype, "items", {
/* Begin_PlaceHolder_DocumentTaskCollection_Custom_Members */
/* End_PlaceHolder_DocumentTaskCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_DocumentTaskCollection_items */
/* End_PlaceHolder_DocumentTaskCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeDocumentTaskCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
/**
* Gets the number of tasks in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
DocumentTaskCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_DocumentTaskCollection_GetCount */
/* End_PlaceHolder_DocumentTaskCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */ | 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Gets a task by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param index The index of the task.
*/
DocumentTaskCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_DocumentTaskCollection_GetItemAt */
/* End_PlaceHolder_DocumentTaskCollection_GetItemAt */
return _createMethodObject(PowerPoint.DocumentTask, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/** Handle results returned from the document
* @private
*/
DocumentTaskCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_DocumentTaskCollection_HandleResult */
/* End_PlaceHolder_DocumentTaskCollection_HandleResult */
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(PowerPoint.DocumentTask, false, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
DocumentTaskCollection.prototype.load = function (options) {
return _load(this, options);
};
DocumentTaskCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
DocumentTaskCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_DocumentTaskCollection_HandleRetrieveResult */
/* End_PlaceHolder_DocumentTaskCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.DocumentTask, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.DocumentTaskCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.DocumentTaskCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
DocumentTaskCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
DocumentTaskCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.DocumentTask, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return DocumentTaskCollection;
}(OfficeExtension.ClientObject));
PowerPoint.DocumentTaskCollection = DocumentTaskCollection;
var _typeHyperlinkCollection = "HyperlinkCollection";
/* Begin_PlaceHolder_HyperlinkCollection_BeforeDeclaration */
/* End_PlaceHolder_HyperlinkCollection_BeforeDeclaration */
/**
* Represents a collection of hyperlinks.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*/
var HyperlinkCollection = /** @class */ (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", {
/* Begin_PlaceHolder_HyperlinkCollection_Custom_Members */
/* End_PlaceHolder_HyperlinkCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_HyperlinkCollection_items */
/* End_PlaceHolder_HyperlinkCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeHyperlinkCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because HyperlinkCollection is a collection.
/**
* Adds a hyperlink to the specified target with the given options. If the target already contains any hyperlinks, they will be deleted.
The new hyperlink may appear anywhere in the collection and is not guaranteed to be added at the end.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param target The target to add the hyperlink to. Can be a {@link PowerPoint.TextRange} or a {@link PowerPoint.Shape}.
* @param options Optional. The options for the hyperlink.
* @returns The newly created {@link PowerPoint.Hyperlink} object.
*/
HyperlinkCollection.prototype.add = function (target, options) {
/* Begin_PlaceHolder_HyperlinkCollection_Add */
/* End_PlaceHolder_HyperlinkCollection_Add */
_throwIfApiNotSupported("HyperlinkCollection.add", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.Hyperlink, this, "Add", 0 /* Default */, [target, options], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Gets the number of hyperlinks in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.6]
* @returns The number of hyperlinks in the collection.
*/
HyperlinkCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_HyperlinkCollection_GetCount */
/* End_PlaceHolder_HyperlinkCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a hyperlink using its zero-based index in the collection.
Throws an `InvalidArgument` exception if the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*
* @param index The index of the hyperlink in the collection.
* @returns The hyperlink at the given index.
*/
HyperlinkCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_HyperlinkCollection_GetItemAt */
/* End_PlaceHolder_HyperlinkCollection_GetItemAt */
return _createMethodObject(PowerPoint.Hyperlink, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
HyperlinkCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_HyperlinkCollection_HandleResult */
/* End_PlaceHolder_HyperlinkCollection_HandleResult */
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(PowerPoint.Hyperlink, false, 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);
};
/** Handle retrieve results
* @private
*/
HyperlinkCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_HyperlinkCollection_HandleRetrieveResult */
/* End_PlaceHolder_HyperlinkCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Hyperlink, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
HyperlinkCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
HyperlinkCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Hyperlink, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return HyperlinkCollection;
}(OfficeExtension.ClientObject));
PowerPoint.HyperlinkCollection = HyperlinkCollection;
/* Begin_PlaceHolder_HyperlinkCollection_AfterDeclaration */
/* End_PlaceHolder_HyperlinkCollection_AfterDeclaration */
/* Begin_PlaceHolder_ConnectorType_BeforeDeclaration */
/* End_PlaceHolder_ConnectorType_BeforeDeclaration */
/**
* Specifies the connector type for line shapes.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ConnectorType;
(function (ConnectorType) {
/**
* Straight connector type.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ConnectorType["straight"] = "Straight";
/**
* Elbow connector type.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ConnectorType["elbow"] = "Elbow";
/**
* Curve connector type.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ConnectorType["curve"] = "Curve";
})(ConnectorType = PowerPoint.ConnectorType || (PowerPoint.ConnectorType = {}));
/* Begin_PlaceHolder_ConnectorType_AfterDeclaration */
/* End_PlaceHolder_ConnectorType_AfterDeclaration */
/* Begin_PlaceHolder_GeometricShapeType_BeforeDeclaration */
/* End_PlaceHolder_GeometricShapeType_BeforeDeclaration */
/**
* Specifies the shape type for a `GeometricShape` object.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var GeometricShapeType;
(function (GeometricShapeType) {
/**
* Straight line from top-right corner to bottom-left corner of the shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["lineInverse"] = "LineInverse";
/**
* Isosceles triangle geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["triangle"] = "Triangle";
/**
* Right triangle geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rightTriangle"] = "RightTriangle";
/**
* Rectangle geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rectangle"] = "Rectangle";
/**
* Diamond geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["diamond"] = "Diamond";
/**
* Parallelogram geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["parallelogram"] = "Parallelogram";
/**
* Trapezoid geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["trapezoid"] = "Trapezoid";
/**
* Trapezoid geometric shape which may have non-equal sides.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["nonIsoscelesTrapezoid"] = "NonIsoscelesTrapezoid";
/**
* Pentagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["pentagon"] = "Pentagon";
/**
* Hexagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["hexagon"] = "Hexagon";
/**
* Heptagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["heptagon"] = "Heptagon";
/**
* Octagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["octagon"] = "Octagon";
/**
* Decagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["decagon"] = "Decagon";
/**
* Dodecagon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["dodecagon"] = "Dodecagon";
/**
* Star: 4 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star4"] = "Star4";
/**
* Star: 5 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star5"] = "Star5";
/**
* Star: 6 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star6"] = "Star6";
/**
* Star: 7 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star7"] = "Star7";
/**
* Star: 8 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star8"] = "Star8";
/**
* Star: 10 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star10"] = "Star10";
/**
* Star: 12 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star12"] = "Star12";
/**
* Star: 16 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star16"] = "Star16";
/**
* Star: 24 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star24"] = "Star24";
/**
* Star: 32 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["star32"] = "Star32";
/**
* Rectangle geometric shape: rounded corners.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["roundRectangle"] = "RoundRectangle";
/**
* Rectangle geometric shape: single corner rounded.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["round1Rectangle"] = "Round1Rectangle";
/**
* Rectangle geometric shape: top corners rounded.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["round2SameRectangle"] = "Round2SameRectangle";
/**
* Rectangle geometric shape: diagonal corners rounded.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["round2DiagonalRectangle"] = "Round2DiagonalRectangle";
/**
* Rectangle geometric shape: top corners one rounded and one snipped.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["snipRoundRectangle"] = "SnipRoundRectangle";
/**
* Rectangle geometric shape: single corner snipped.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["snip1Rectangle"] = "Snip1Rectangle";
/**
* Rectangle geometric shape: top corners snipped.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["snip2SameRectangle"] = "Snip2SameRectangle";
/**
* Rectangle geometric shape: diagonal corners snipped.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["snip2DiagonalRectangle"] = "Snip2DiagonalRectangle";
/**
* Plaque geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["plaque"] = "Plaque";
/**
* Oval geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["ellipse"] = "Ellipse";
/**
* Teardrop geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["teardrop"] = "Teardrop";
/**
* Arrow: pentagon.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["homePlate"] = "HomePlate";
/**
* Arrow: chevron.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["chevron"] = "Chevron";
/**
* Partial circle geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["pieWedge"] = "PieWedge";
/**
* Partial circle geometric shape with adjustable spanning area.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["pie"] = "Pie";
/**
* Block arc geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["blockArc"] = "BlockArc";
/**
* Circle geometric shape: hollow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["donut"] = "Donut";
/**
* "Not allowed" symbol.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["noSmoking"] = "NoSmoking";
/**
* Arrow: right.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rightArrow"] = "RightArrow";
/**
* Arrow: left.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftArrow"] = "LeftArrow";
/**
* Arrow: up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["upArrow"] = "UpArrow";
/**
* Arrow: down.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["downArrow"] = "DownArrow";
/**
* Arrow: striped right.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["stripedRightArrow"] = "StripedRightArrow";
/**
* Arrow: notched right.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["notchedRightArrow"] = "NotchedRightArrow";
/**
* Arrow: bent-up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["bentUpArrow"] = "BentUpArrow";
/**
* Arrow: left-right.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftRightArrow"] = "LeftRightArrow";
/**
* Arrow: up-down.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["upDownArrow"] = "UpDownArrow";
/**
* Arrow: left-up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftUpArrow"] = "LeftUpArrow";
/**
* Arrow: left-right-up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftRightUpArrow"] = "LeftRightUpArrow";
/**
* Arrow: quad.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["quadArrow"] = "QuadArrow";
/**
* Callout: left arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftArrowCallout"] = "LeftArrowCallout";
/**
* Callout: right arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rightArrowCallout"] = "RightArrowCallout";
/**
* Callout: up arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["upArrowCallout"] = "UpArrowCallout";
/**
* Callout: down arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["downArrowCallout"] = "DownArrowCallout";
/**
* Callout: left-right arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftRightArrowCallout"] = "LeftRightArrowCallout";
/**
* Callout: up-down arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["upDownArrowCallout"] = "UpDownArrowCallout";
/**
* Callout: quad arrow.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["quadArrowCallout"] = "QuadArrowCallout";
/**
* Arrow: bent.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["bentArrow"] = "BentArrow";
/**
* Arrow: U-turn.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["uturnArrow"] = "UturnArrow";
/**
* Arrow: circular.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["circularArrow"] = "CircularArrow";
/**
* Arrow: circular with opposite arrow direction.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftCircularArrow"] = "LeftCircularArrow";
/**
* Arrow: circular with two arrows in both directions.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftRightCircularArrow"] = "LeftRightCircularArrow";
/**
* Arrow: curved right.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["curvedRightArrow"] = "CurvedRightArrow";
/**
* Arrow: curved left.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["curvedLeftArrow"] = "CurvedLeftArrow";
/**
* Arrow: curved up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["curvedUpArrow"] = "CurvedUpArrow";
/**
* Arrow: curved down.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["curvedDownArrow"] = "CurvedDownArrow";
/**
* Arrow: curved right arrow with varying width.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["swooshArrow"] = "SwooshArrow";
/**
* Cube geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["cube"] = "Cube";
/**
* Cylinder geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["can"] = "Can";
/**
* Lightning bolt.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["lightningBolt"] = "LightningBolt";
/**
* Heart geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["heart"] = "Heart";
/**
* Sun.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["sun"] = "Sun";
/**
* Moon geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["moon"] = "Moon";
/**
* Smiley face.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["smileyFace"] = "SmileyFace";
/**
* Explosion: 8 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["irregularSeal1"] = "IrregularSeal1";
/**
* Explosion: 14 points.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["irregularSeal2"] = "IrregularSeal2";
/**
* Rectangle geometric shape: folded corner.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["foldedCorner"] = "FoldedCorner";
/**
* Rectangle geometric shape: beveled.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["bevel"] = "Bevel";
/**
* Frame geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["frame"] = "Frame";
/**
* Half frame geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["halfFrame"] = "HalfFrame";
/**
* L-shape geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["corner"] = "Corner";
/**
* Diagonal stripe geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["diagonalStripe"] = "DiagonalStripe";
/**
* Chord geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["chord"] = "Chord";
/**
* Arc geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["arc"] = "Arc";
/**
* Left bracket.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftBracket"] = "LeftBracket";
/**
* Right bracket.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rightBracket"] = "RightBracket";
/**
* Left brace.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftBrace"] = "LeftBrace";
/**
* Right brace.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["rightBrace"] = "RightBrace";
/**
* Double bracket.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["bracketPair"] = "BracketPair";
/**
* Double brace.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["bracePair"] = "BracePair";
/**
* Callout: line with no border.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["callout1"] = "Callout1";
/**
* Callout: bent line with no border.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["callout2"] = "Callout2";
/**
* Callout: double bent line with no border.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["callout3"] = "Callout3";
/**
* Callout: line with accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentCallout1"] = "AccentCallout1";
/**
* Callout: bent line with accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentCallout2"] = "AccentCallout2";
/**
* Callout: double bent line with accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentCallout3"] = "AccentCallout3";
/**
* Callout: line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["borderCallout1"] = "BorderCallout1";
/**
* Callout: bent line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["borderCallout2"] = "BorderCallout2";
/**
* Callout: double bent line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["borderCallout3"] = "BorderCallout3";
/**
* Callout: line with border and accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentBorderCallout1"] = "AccentBorderCallout1";
/**
* Callout: bent line with border and accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentBorderCallout2"] = "AccentBorderCallout2";
/**
* Callout: double bent line with border and accent bar.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["accentBorderCallout3"] = "AccentBorderCallout3";
/**
* Speech bubble: rectangle.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["wedgeRectCallout"] = "WedgeRectCallout";
/**
* Speech bubble: rectangle with corners rounded.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["wedgeRRectCallout"] = "WedgeRRectCallout";
/**
* Speech bubble: oval.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["wedgeEllipseCallout"] = "WedgeEllipseCallout";
/**
* Thought bubble: cloud.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["cloudCallout"] = "CloudCallout";
/**
* Cloud.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["cloud"] = "Cloud";
/**
* Ribbon: tilted down.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["ribbon"] = "Ribbon";
/**
* Ribbon: tilted up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["ribbon2"] = "Ribbon2";
/**
* Ribbon: curved and tilted down.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["ellipseRibbon"] = "EllipseRibbon";
/**
* Ribbon: curved and tilted up.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["ellipseRibbon2"] = "EllipseRibbon2";
/**
* Ribbon: straight with both left and right arrows.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["leftRightRibbon"] = "LeftRightRibbon";
/**
* Scroll: vertical.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["verticalScroll"] = "VerticalScroll";
/**
* Scroll: horizontal.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["horizontalScroll"] = "HorizontalScroll";
/**
* Wave geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["wave"] = "Wave";
/**
* Double wave geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["doubleWave"] = "DoubleWave";
/**
* Cross geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["plus"] = "Plus";
/**
* Flowchart: process.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartProcess"] = "FlowChartProcess";
/**
* Flowchart: decision.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartDecision"] = "FlowChartDecision";
/**
* Flowchart: data.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartInputOutput"] = "FlowChartInputOutput";
/**
* Flowchart: predefined process.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartPredefinedProcess"] = "FlowChartPredefinedProcess";
/**
* Flowchart: internal storage.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartInternalStorage"] = "FlowChartInternalStorage";
/**
* Flowchart: document.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartDocument"] = "FlowChartDocument";
/**
* Flowchart: multidocument.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartMultidocument"] = "FlowChartMultidocument";
/**
* Flowchart: terminator.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartTerminator"] = "FlowChartTerminator";
/**
* Flowchart: preparation.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartPreparation"] = "FlowChartPreparation";
/**
* Flowchart: manual input.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartManualInput"] = "FlowChartManualInput";
/**
* Flowchart: manual operation.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartManualOperation"] = "FlowChartManualOperation";
/**
* Flowchart: connector.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartConnector"] = "FlowChartConnector";
/**
* Flowchart: card.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartPunchedCard"] = "FlowChartPunchedCard";
/**
* Flowchart: punched tape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartPunchedTape"] = "FlowChartPunchedTape";
/**
* Flowchart: summing junction.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartSummingJunction"] = "FlowChartSummingJunction";
/**
* Flowchart: or.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartOr"] = "FlowChartOr";
/**
* Flowchart: collate.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartCollate"] = "FlowChartCollate";
/**
* Flowchart: sort.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartSort"] = "FlowChartSort";
/**
* Flowchart: extract.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartExtract"] = "FlowChartExtract";
/**
* Flowchart: merge.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartMerge"] = "FlowChartMerge";
/**
* Flowchart: offline storage.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartOfflineStorage"] = "FlowChartOfflineStorage";
/**
* Flowchart: stored data.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartOnlineStorage"] = "FlowChartOnlineStorage";
/**
* Flowchart: sequential access storage.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartMagneticTape"] = "FlowChartMagneticTape";
/**
* Flowchart: magnetic disk.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartMagneticDisk"] = "FlowChartMagneticDisk";
/**
* Flowchart: direct access storage.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartMagneticDrum"] = "FlowChartMagneticDrum";
/**
* Flowchart: display.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartDisplay"] = "FlowChartDisplay";
/**
* Flowchart: delay.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartDelay"] = "FlowChartDelay";
/**
* Flowchart: alternate process.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartAlternateProcess"] = "FlowChartAlternateProcess";
/**
* Flowchart: off-page connector.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["flowChartOffpageConnector"] = "FlowChartOffpageConnector";
/**
* Action button: blank.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonBlank"] = "ActionButtonBlank";
/**
* Action button: go home.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonHome"] = "ActionButtonHome";
/**
* Action button: help.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonHelp"] = "ActionButtonHelp";
/**
* Action button: get information.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonInformation"] = "ActionButtonInformation";
/**
* Action button: go forward or next.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonForwardNext"] = "ActionButtonForwardNext";
/**
* Action button: go back or previous.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonBackPrevious"] = "ActionButtonBackPrevious";
/**
* Action button: go to end.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonEnd"] = "ActionButtonEnd";
/**
* Action button: go to beginning.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonBeginning"] = "ActionButtonBeginning";
/**
* Action button: return.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonReturn"] = "ActionButtonReturn";
/**
* Action button: document.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonDocument"] = "ActionButtonDocument";
/**
* Action button: sound.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonSound"] = "ActionButtonSound";
/**
* Action button: video.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["actionButtonMovie"] = "ActionButtonMovie";
/**
* Gear: a gear with six teeth.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["gear6"] = "Gear6";
/**
* Gear: a gear with nine teeth.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["gear9"] = "Gear9";
/**
* Funnel geometric shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["funnel"] = "Funnel";
/**
* Plus sign.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathPlus"] = "MathPlus";
/**
* Minus sign.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathMinus"] = "MathMinus";
/**
* Multiplication sign.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathMultiply"] = "MathMultiply";
/**
* Division sign.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathDivide"] = "MathDivide";
/**
* Equals.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathEqual"] = "MathEqual";
/**
* Not equal.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["mathNotEqual"] = "MathNotEqual";
/**
* Four right triangles that define a rectangular shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["cornerTabs"] = "CornerTabs";
/**
* Four small squares that define a rectangular shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["squareTabs"] = "SquareTabs";
/**
* Four quarter circles that define a rectangular shape.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["plaqueTabs"] = "PlaqueTabs";
/**
* A rectangle divided into four parts along diagonal lines.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["chartX"] = "ChartX";
/**
* A rectangle divided into six parts along a vertical line and diagonal lines.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["chartStar"] = "ChartStar";
/**
* A rectangle divided vertically and horizontally into four quarters.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
GeometricShapeType["chartPlus"] = "ChartPlus";
})(GeometricShapeType = PowerPoint.GeometricShapeType || (PowerPoint.GeometricShapeType = {}));
/* Begin_PlaceHolder_ShapeAddOptions_AfterDeclaration */
/* End_PlaceHolder_ShapeAddOptions_AfterDeclaration */
var _typeShapeScopedCollection = "ShapeScopedCollection";
/* Begin_PlaceHolder_ShapeScopedCollection_BeforeDeclaration */
/* End_PlaceHolder_ShapeScopedCollection_BeforeDeclaration */
/**
* Represents a collection of shapes.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
var ShapeScopedCollection = /** @class */ (function (_super) {
__extends(ShapeScopedCollection, _super);
function ShapeScopedCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ShapeScopedCollection.prototype, "_className", {
get: function () {
return "ShapeScopedCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeScopedCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeScopedCollection.prototype, "items", {
/* Begin_PlaceHolder_ShapeScopedCollection_Custom_Members */
/* End_PlaceHolder_ShapeScopedCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_ShapeScopedCollection_items */
/* End_PlaceHolder_ShapeScopedCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeShapeScopedCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because ShapeScopedCollection is a collection.
/**
* Gets the number of shapes in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.5]
* @returns The number of shapes in the collection.
*/
ShapeScopedCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_ShapeScopedCollection_GetCount */
/* End_PlaceHolder_ShapeScopedCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a shape using its unique ID. An error is thrown if the shape doesn't exist.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*
* @param key The ID of the shape.
* @returns The shape with the unique ID. If such a shape doesn't exist, an error is thrown.
*/
ShapeScopedCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_ShapeScopedCollection_GetItem */
/* End_PlaceHolder_ShapeScopedCollection_GetItem */
return _createIndexerObject(PowerPoint.Shape, this, [key]);
};
/**
* 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.5]
*
* @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.
*/
ShapeScopedCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_ShapeScopedCollection_GetItemAt */
/* End_PlaceHolder_ShapeScopedCollection_GetItemAt */
return _createMethodObject(PowerPoint.Shape, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a shape using its unique ID. If such a shape doesn't 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.5]
*
* @param id The ID of the shape.
* @returns The shape with the unique ID. If such a shape doesn't exist, an object with an `isNullObject` property set to true is returned.
*/
ShapeScopedCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_ShapeScopedCollection_GetItemOrNullObject */
/* End_PlaceHolder_ShapeScopedCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Shape, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Groups all shapes in this collection into a single shape.
If the collection contains fewer than two shapes, then this method returns the `GeneralException` error.
*
* @remarks
* [Api set: PowerPointApi 1.8]
* @returns The newly created grouped shape as a {@link PowerPoint.Shape}.
*/
ShapeScopedCollection.prototype.group = function () {
/* Begin_PlaceHolder_ShapeScopedCollection_Group */
/* End_PlaceHolder_ShapeScopedCollection_Group */
_throwIfApiNotSupported("ShapeScopedCollection.group", _defaultApiSetName, "1.8", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "Group", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
ShapeScopedCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeScopedCollection_HandleResult */
/* End_PlaceHolder_ShapeScopedCollection_HandleResult */
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(PowerPoint.Shape, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
ShapeScopedCollection.prototype.load = function (options) {
return _load(this, options);
};
ShapeScopedCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
ShapeScopedCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeScopedCollection_HandleRetrieveResult */
/* End_PlaceHolder_ShapeScopedCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Shape, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ShapeScopedCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
ShapeScopedCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Shape, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return ShapeScopedCollection;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeScopedCollection = ShapeScopedCollection;
/* Begin_PlaceHolder_ShapeLineDashStyle_BeforeDeclaration */
/* End_PlaceHolder_ShapeLineDashStyle_BeforeDeclaration */
/**
* Specifies the dash style for a line.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeLineDashStyle;
(function (ShapeLineDashStyle) {
/**
* The dash line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["dash"] = "Dash";
/**
* The dash-dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["dashDot"] = "DashDot";
/**
* The dash-dot-dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["dashDotDot"] = "DashDotDot";
/**
* The long dash line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["longDash"] = "LongDash";
/**
* The long dash-dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["longDashDot"] = "LongDashDot";
/**
* The round dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["roundDot"] = "RoundDot";
/**
* The solid line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["solid"] = "Solid";
/**
* The square dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["squareDot"] = "SquareDot";
/**
* The long dash-dot-dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["longDashDotDot"] = "LongDashDotDot";
/**
* The system dash line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["systemDash"] = "SystemDash";
/**
* The system dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["systemDot"] = "SystemDot";
/**
* The system dash-dot line pattern.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineDashStyle["systemDashDot"] = "SystemDashDot";
})(ShapeLineDashStyle = PowerPoint.ShapeLineDashStyle || (PowerPoint.ShapeLineDashStyle = {}));
/* Begin_PlaceHolder_ShapeLineDashStyle_AfterDeclaration */
/* End_PlaceHolder_ShapeLineDashStyle_AfterDeclaration */
var _typeBorder = "Border";
/* Begin_PlaceHolder_Border_BeforeDeclaration */
/* End_PlaceHolder_Border_BeforeDeclaration */
/**
* Represents the properties for a table cell border.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var Border = /** @class */ (function (_super) {
__extends(Border, _super);
function Border() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Border.prototype, "_className", {
get: function () {
return "Border";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "_scalarPropertyNames", {
get: function () {
return ["color", "dashStyle", "transparency", "weight"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Color", "DashStyle", "Transparency", "Weight"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "color", {
/* Begin_PlaceHolder_Border_Custom_Members */
/* End_PlaceHolder_Border_Custom_Members */
/**
* Represents the line color in the hexadecimal format #RRGGBB (e.g., "FFA500") or as a named HTML color value (e.g., "orange").
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Border_Color_get */
/* End_PlaceHolder_Border_Color_get */
_throwIfNotLoaded("color", this._C, _typeBorder, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_Border_Color_set */
/* End_PlaceHolder_Border_Color_set */
this._C = value;
_invokeSetProperty(this, "Color", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "dashStyle", {
/**
* Represents the dash style of the line.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Border_DashStyle_get */
/* End_PlaceHolder_Border_DashStyle_get */
_throwIfNotLoaded("dashStyle", this._D, _typeBorder, this._isNull);
return this._D;
},
set: function (value) {
/* Begin_PlaceHolder_Border_DashStyle_set */
/* End_PlaceHolder_Border_DashStyle_set */
this._D = value;
_invokeSetProperty(this, "DashStyle", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "transparency", {
/**
* Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear).
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Border_Transparency_get */
/* End_PlaceHolder_Border_Transparency_get */
_throwIfNotLoaded("transparency", this._T, _typeBorder, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_Border_Transparency_set */
/* End_PlaceHolder_Border_Transparency_set */
this._T = value;
_invokeSetProperty(this, "Transparency", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Border.prototype, "weight", {
/**
* Represents the weight of the line, in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Border_Weight_get */
/* End_PlaceHolder_Border_Weight_get */
_throwIfNotLoaded("weight", this._W, _typeBorder, this._isNull);
return this._W;
},
set: function (value) {
/* Begin_PlaceHolder_Border_Weight_set */
/* End_PlaceHolder_Border_Weight_set */
this._W = value;
_invokeSetProperty(this, "Weight", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "color" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "dashStyle" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "transparency" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "weight" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
Border.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Border_HandleResult */
/* End_PlaceHolder_Border_HandleResult */
if (!_isUndefined(obj["Color"])) {
this._C = obj["Color"];
/* Begin_PlaceHolder_Border_HandleResult_Prop_Color */
/* End_PlaceHolder_Border_HandleResult_Prop_Color */
}
if (!_isUndefined(obj["DashStyle"])) {
this._D = obj["DashStyle"];
/* Begin_PlaceHolder_Border_HandleResult_Prop_DashStyle */
/* End_PlaceHolder_Border_HandleResult_Prop_DashStyle */
}
if (!_isUndefined(obj["Transparency"])) {
this._T = obj["Transparency"];
/* Begin_PlaceHolder_Border_HandleResult_Prop_Transparency */
/* End_PlaceHolder_Border_HandleResult_Prop_Transparency */
}
if (!_isUndefined(obj["Weight"])) {
this._W = obj["Weight"];
/* Begin_PlaceHolder_Border_HandleResult_Prop_Weight */
/* End_PlaceHolder_Border_HandleResult_Prop_Weight */
}
};
Border.prototype.load = function (options) {
return _load(this, options);
};
Border.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Border.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Border_HandleRetrieveResult */
/* End_PlaceHolder_Border_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object.
*/
Border.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Border.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Border.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Border;
}(OfficeExtension.ClientObject));
PowerPoint.Border = Border;
/* Begin_PlaceHolder_Border_AfterDeclaration */
/* End_PlaceHolder_Border_AfterDeclaration */
var _typeBorders = "Borders";
/* Begin_PlaceHolder_Borders_BeforeDeclaration */
/* End_PlaceHolder_Borders_BeforeDeclaration */
/**
* Represents the borders for a table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var Borders = /** @class */ (function (_super) {
__extends(Borders, _super);
function Borders() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Borders.prototype, "_className", {
get: function () {
return "Borders";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "_navigationPropertyNames", {
get: function () {
return ["bottom", "diagonalDown", "diagonalUp", "left", "right", "top"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "bottom", {
/* Begin_PlaceHolder_Borders_Custom_Members */
/* End_PlaceHolder_Borders_Custom_Members */
/**
* Gets the bottom border.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_Bottom_get */
/* End_PlaceHolder_Borders_Bottom_get */
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.Border, this, "Bottom", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_Bottom_get_post */
/* End_PlaceHolder_Borders_Bottom_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "diagonalDown", {
/**
* Gets the diagonal border (top-left to bottom-right).
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_DiagonalDown_get */
/* End_PlaceHolder_Borders_DiagonalDown_get */
if (!this._D) {
this._D = _createPropertyObject(PowerPoint.Border, this, "DiagonalDown", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_DiagonalDown_get_post */
/* End_PlaceHolder_Borders_DiagonalDown_get_post */
return this._D;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "diagonalUp", {
/**
* Gets the diagonal border (bottom-left to top-right).
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_DiagonalUp_get */
/* End_PlaceHolder_Borders_DiagonalUp_get */
if (!this._Di) {
this._Di = _createPropertyObject(PowerPoint.Border, this, "DiagonalUp", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_DiagonalUp_get_post */
/* End_PlaceHolder_Borders_DiagonalUp_get_post */
return this._Di;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "left", {
/**
* Gets the left border.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_Left_get */
/* End_PlaceHolder_Borders_Left_get */
if (!this._L) {
this._L = _createPropertyObject(PowerPoint.Border, this, "Left", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_Left_get_post */
/* End_PlaceHolder_Borders_Left_get_post */
return this._L;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "right", {
/**
* Gets the right border.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_Right_get */
/* End_PlaceHolder_Borders_Right_get */
if (!this._R) {
this._R = _createPropertyObject(PowerPoint.Border, this, "Right", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_Right_get_post */
/* End_PlaceHolder_Borders_Right_get_post */
return this._R;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Borders.prototype, "top", {
/**
* Gets the top border.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Borders_Top_get */
/* End_PlaceHolder_Borders_Top_get */
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.Border, this, "Top", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Borders_Top_get_post */
/* End_PlaceHolder_Borders_Top_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "bottom" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "diagonalDown" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "diagonalUp" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "left" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "right" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "top" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
Borders.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Borders_HandleResult */
/* End_PlaceHolder_Borders_HandleResult */
_handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "diagonalDown", "DiagonalDown", "diagonalUp", "DiagonalUp", "left", "Left", "right", "Right", "top", "Top"]);
};
Borders.prototype.load = function (options) {
return _load(this, options);
};
Borders.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Borders.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Borders_HandleRetrieveResult */
/* End_PlaceHolder_Borders_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Borders` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BordersData`) that contains shallow copies of any loaded child properties from the original object.
*/
Borders.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Borders.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Borders.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Borders;
}(OfficeExtension.ClientObject));
PowerPoint.Borders = Borders;
/* Begin_PlaceHolder_Borders_AfterDeclaration */
/* End_PlaceHolder_Borders_AfterDeclaration */
var _typeMargins = "Margins";
/* Begin_PlaceHolder_Margins_BeforeDeclaration */
/* End_PlaceHolder_Margins_BeforeDeclaration */
/**
* Represents the margins of a table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var Margins = /** @class */ (function (_super) {
__extends(Margins, _super);
function Margins() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Margins.prototype, "_className", {
get: function () {
return "Margins";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "_scalarPropertyNames", {
get: function () {
return ["bottom", "left", "right", "top"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Bottom", "Left", "Right", "Top"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "bottom", {
/* Begin_PlaceHolder_Margins_Custom_Members */
/* End_PlaceHolder_Margins_Custom_Members */
/**
* Specifies the bottom margin in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Margins_Bottom_get */
/* End_PlaceHolder_Margins_Bottom_get */
_throwIfNotLoaded("bottom", this._B, _typeMargins, this._isNull);
return this._B;
},
set: function (value) {
/* Begin_PlaceHolder_Margins_Bottom_set */
/* End_PlaceHolder_Margins_Bottom_set */
this._B = value;
_invokeSetProperty(this, "Bottom", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "left", {
/**
* Specifies the left margin in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Margins_Left_get */
/* End_PlaceHolder_Margins_Left_get */
_throwIfNotLoaded("left", this._L, _typeMargins, this._isNull);
return this._L;
},
set: function (value) {
/* Begin_PlaceHolder_Margins_Left_set */
/* End_PlaceHolder_Margins_Left_set */
this._L = value;
_invokeSetProperty(this, "Left", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "right", {
/**
* Specifies the right margin in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Margins_Right_get */
/* End_PlaceHolder_Margins_Right_get */
_throwIfNotLoaded("right", this._R, _typeMargins, this._isNull);
return this._R;
},
set: function (value) {
/* Begin_PlaceHolder_Margins_Right_set */
/* End_PlaceHolder_Margins_Right_set */
this._R = value;
_invokeSetProperty(this, "Right", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Margins.prototype, "top", {
/**
* Specifies the top margin in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Margins_Top_get */
/* End_PlaceHolder_Margins_Top_get */
_throwIfNotLoaded("top", this._T, _typeMargins, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_Margins_Top_set */
/* End_PlaceHolder_Margins_Top_set */
this._T = value;
_invokeSetProperty(this, "Top", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "bottom" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "left" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "right" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "top" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
Margins.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Margins_HandleResult */
/* End_PlaceHolder_Margins_HandleResult */
if (!_isUndefined(obj["Bottom"])) {
this._B = obj["Bottom"];
/* Begin_PlaceHolder_Margins_HandleResult_Prop_Bottom */
/* End_PlaceHolder_Margins_HandleResult_Prop_Bottom */
}
if (!_isUndefined(obj["Left"])) {
this._L = obj["Left"];
/* Begin_PlaceHolder_Margins_HandleResult_Prop_Left */
/* End_PlaceHolder_Margins_HandleResult_Prop_Left */
}
if (!_isUndefined(obj["Right"])) {
this._R = obj["Right"];
/* Begin_PlaceHolder_Margins_HandleResult_Prop_Right */
/* End_PlaceHolder_Margins_HandleResult_Prop_Right */
}
if (!_isUndefined(obj["Top"])) {
this._T = obj["Top"];
/* Begin_PlaceHolder_Margins_HandleResult_Prop_Top */
/* End_PlaceHolder_Margins_HandleResult_Prop_Top */
}
};
Margins.prototype.load = function (options) {
return _load(this, options);
};
Margins.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Margins.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Margins_HandleRetrieveResult */
/* End_PlaceHolder_Margins_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Margins` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.MarginsData`) that contains shallow copies of any loaded child properties from the original object.
*/
Margins.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Margins.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Margins.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Margins;
}(OfficeExtension.ClientObject));
PowerPoint.Margins = Margins;
/* Begin_PlaceHolder_Margins_AfterDeclaration */
/* End_PlaceHolder_Margins_AfterDeclaration */
/* Begin_PlaceHolder_ShapeFillType_BeforeDeclaration */
/* End_PlaceHolder_ShapeFillType_BeforeDeclaration */
/**
* Specifies a shape's fill type.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeFillType;
(function (ShapeFillType) {
/**
* Specifies that the shape should have no fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["noFill"] = "NoFill";
/**
* Specifies that the shape should have regular solid fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["solid"] = "Solid";
/**
* Specifies that the shape should have gradient fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["gradient"] = "Gradient";
/**
* Specifies that the shape should have pattern fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["pattern"] = "Pattern";
/**
* Specifies that the shape should have picture or texture fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["pictureAndTexture"] = "PictureAndTexture";
/**
* Specifies that the shape should have slide background fill.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFillType["slideBackground"] = "SlideBackground";
})(ShapeFillType = PowerPoint.ShapeFillType || (PowerPoint.ShapeFillType = {}));
/* Begin_PlaceHolder_ShapeFillType_AfterDeclaration */
/* End_PlaceHolder_ShapeFillType_AfterDeclaration */
var _typeShapeFill = "ShapeFill";
/* Begin_PlaceHolder_ShapeFill_BeforeDeclaration */
/* End_PlaceHolder_ShapeFill_BeforeDeclaration */
/**
* Represents the fill formatting of a shape object.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeFill = /** @class */ (function (_super) {
__extends(ShapeFill, _super);
function ShapeFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ShapeFill.prototype, "_className", {
get: function () {
return "ShapeFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["foregroundColor", "transparency", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["ForegroundColor", "Transparency", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "foregroundColor", {
/* Begin_PlaceHolder_ShapeFill_Custom_Members */
/* End_PlaceHolder_ShapeFill_Custom_Members */
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFill_ForegroundColor_get */
/* End_PlaceHolder_ShapeFill_ForegroundColor_get */
_throwIfNotLoaded("foregroundColor", this._F, _typeShapeFill, this._isNull);
return this._F;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFill_ForegroundColor_set */
/* End_PlaceHolder_ShapeFill_ForegroundColor_set */
this._F = value;
_invokeSetProperty(this, "ForegroundColor", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "transparency", {
/**
* Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type doesn't support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFill_Transparency_get */
/* End_PlaceHolder_ShapeFill_Transparency_get */
_throwIfNotLoaded("transparency", this._T, _typeShapeFill, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeFill_Transparency_set */
/* End_PlaceHolder_ShapeFill_Transparency_set */
this._T = value;
_invokeSetProperty(this, "Transparency", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeFill.prototype, "type", {
/**
* Returns the fill type of the shape. See {@link PowerPoint.ShapeFillType} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeFill_Type_get */
/* End_PlaceHolder_ShapeFill_Type_get */
_throwIfNotLoaded("type", this._Ty, _typeShapeFill, this._isNull);
return this._Ty;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "foregroundColor" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "transparency" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Clears the fill formatting of this shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeFill.prototype.clear = function () {
/* Begin_PlaceHolder_ShapeFill_Clear */
/* End_PlaceHolder_ShapeFill_Clear */
_invokeMethod(this, "Clear", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Sets the fill formatting of the shape to an image. This changes the fill type to `PictureAndTexture`.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param base64EncodedImage A string that is a Base64 encoding of the image data.
*/
ShapeFill.prototype.setImage = function (base64EncodedImage) {
/* Begin_PlaceHolder_ShapeFill_SetImage */
/* End_PlaceHolder_ShapeFill_SetImage */
_throwIfApiNotSupported("ShapeFill.setImage", _defaultApiSetName, "1.8", _hostName);
_invokeMethod(this, "SetImage", 0 /* Default */, [base64EncodedImage], 0 /* none */, 0 /* none */);
};
/**
* 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").
*/
ShapeFill.prototype.setSolidColor = function (color) {
/* Begin_PlaceHolder_ShapeFill_SetSolidColor */
/* End_PlaceHolder_ShapeFill_SetSolidColor */
_invokeMethod(this, "SetSolidColor", 0 /* Default */, [color], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
ShapeFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeFill_HandleResult */
/* End_PlaceHolder_ShapeFill_HandleResult */
if (!_isUndefined(obj["ForegroundColor"])) {
this._F = obj["ForegroundColor"];
/* Begin_PlaceHolder_ShapeFill_HandleResult_Prop_ForegroundColor */
/* End_PlaceHolder_ShapeFill_HandleResult_Prop_ForegroundColor */
}
if (!_isUndefined(obj["Transparency"])) {
this._T = obj["Transparency"];
/* Begin_PlaceHolder_ShapeFill_HandleResult_Prop_Transparency */
/* End_PlaceHolder_ShapeFill_HandleResult_Prop_Transparency */
}
if (!_isUndefined(obj["Type"])) {
this._Ty = obj["Type"];
/* Begin_PlaceHolder_ShapeFill_HandleResult_Prop_Type */
/* End_PlaceHolder_ShapeFill_HandleResult_Prop_Type */
}
};
ShapeFill.prototype.load = function (options) {
return _load(this, options);
};
ShapeFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
ShapeFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeFill_HandleRetrieveResult */
/* End_PlaceHolder_ShapeFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ShapeFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
ShapeFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
ShapeFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return ShapeFill;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeFill = ShapeFill;
/* Begin_PlaceHolder_TextRun_AfterDeclaration */
/* End_PlaceHolder_TextRun_AfterDeclaration */
var _typeTableCell = "TableCell";
/* Begin_PlaceHolder_TableCell_BeforeDeclaration */
/* End_PlaceHolder_TableCell_BeforeDeclaration */
/**
* Represents a table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var TableCell = /** @class */ (function (_super) {
__extends(TableCell, _super);
function TableCell() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableCell.prototype, "_className", {
get: function () {
return "TableCell";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "_scalarPropertyNames", {
get: function () {
return ["horizontalAlignment", "indentLevel", "text", "textRuns", "verticalAlignment", "columnCount", "columnIndex", "rowCount", "rowIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["HorizontalAlignment", "IndentLevel", "Text", "TextRuns", "VerticalAlignment", "ColumnCount", "ColumnIndex", "RowCount", "RowIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, true, false, false, false, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "_navigationPropertyNames", {
get: function () {
return ["borders", "fill", "font", "margins"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "borders", {
/* Begin_PlaceHolder_TableCell_Custom_Members */
/* End_PlaceHolder_TableCell_Custom_Members */
/**
* Gets the collection of borders for the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_Borders_get */
/* End_PlaceHolder_TableCell_Borders_get */
_throwIfApiNotSupported("TableCell.borders", _defaultApiSetName, "1.9", _hostName);
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.Borders, this, "Borders", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TableCell_Borders_get_post */
/* End_PlaceHolder_TableCell_Borders_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "fill", {
/**
* Gets the fill color of the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_Fill_get */
/* End_PlaceHolder_TableCell_Fill_get */
_throwIfApiNotSupported("TableCell.fill", _defaultApiSetName, "1.9", _hostName);
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.ShapeFill, this, "Fill", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TableCell_Fill_get_post */
/* End_PlaceHolder_TableCell_Fill_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "font", {
/**
* Gets the font of the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_Font_get */
/* End_PlaceHolder_TableCell_Font_get */
_throwIfApiNotSupported("TableCell.font", _defaultApiSetName, "1.9", _hostName);
if (!this._Fo) {
this._Fo = _createPropertyObject(PowerPoint.ShapeFont, this, "Font", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TableCell_Font_get_post */
/* End_PlaceHolder_TableCell_Font_get_post */
return this._Fo;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "margins", {
/**
* Gets the set of margins in the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_Margins_get */
/* End_PlaceHolder_TableCell_Margins_get */
_throwIfApiNotSupported("TableCell.margins", _defaultApiSetName, "1.9", _hostName);
if (!this._M) {
this._M = _createPropertyObject(PowerPoint.Margins, this, "Margins", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_TableCell_Margins_get_post */
/* End_PlaceHolder_TableCell_Margins_get_post */
return this._M;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "columnCount", {
/**
* Gets the number of table columns this cell spans across.
Will be greater than or equal to 1.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_ColumnCount_get */
/* End_PlaceHolder_TableCell_ColumnCount_get */
_throwIfNotLoaded("columnCount", this._C, _typeTableCell, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "columnIndex", {
/**
* Gets the zero-based column index of the cell within the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_ColumnIndex_get */
/* End_PlaceHolder_TableCell_ColumnIndex_get */
_throwIfNotLoaded("columnIndex", this._Co, _typeTableCell, this._isNull);
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "horizontalAlignment", {
/**
* Specifies the horizontal alignment of the text in the table cell. Returns `null` if the cell text contains different alignments.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_HorizontalAlignment_get */
/* End_PlaceHolder_TableCell_HorizontalAlignment_get */
_throwIfNotLoaded("horizontalAlignment", this._H, _typeTableCell, this._isNull);
_throwIfApiNotSupported("TableCell.horizontalAlignment", _defaultApiSetName, "1.9", _hostName);
return this._H;
},
set: function (value) {
/* Begin_PlaceHolder_TableCell_HorizontalAlignment_set */
/* End_PlaceHolder_TableCell_HorizontalAlignment_set */
this._H = value;
_invokeSetProperty(this, "HorizontalAlignment", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "indentLevel", {
/**
* Specifies the indent level of the text in the table cell. Returns `null` if the cell text contains different indent levels.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_IndentLevel_get */
/* End_PlaceHolder_TableCell_IndentLevel_get */
_throwIfNotLoaded("indentLevel", this._I, _typeTableCell, this._isNull);
_throwIfApiNotSupported("TableCell.indentLevel", _defaultApiSetName, "1.9", _hostName);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_TableCell_IndentLevel_set */
/* End_PlaceHolder_TableCell_IndentLevel_set */
this._I = value;
_invokeSetProperty(this, "IndentLevel", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "rowCount", {
/**
* Gets the number of table rows this cell spans across.
Will be greater than or equal to 1.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_RowCount_get */
/* End_PlaceHolder_TableCell_RowCount_get */
_throwIfNotLoaded("rowCount", this._R, _typeTableCell, this._isNull);
return this._R;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "rowIndex", {
/**
* Gets the zero-based row index of the cell within the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_RowIndex_get */
/* End_PlaceHolder_TableCell_RowIndex_get */
_throwIfNotLoaded("rowIndex", this._Ro, _typeTableCell, this._isNull);
return this._Ro;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "text", {
/**
* Specifies the text content of the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_Text_get */
/* End_PlaceHolder_TableCell_Text_get */
_throwIfNotLoaded("text", this._T, _typeTableCell, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_TableCell_Text_set */
/* End_PlaceHolder_TableCell_Text_set */
this._T = value;
_invokeSetProperty(this, "Text", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "textRuns", {
/**
* Specifies the contents of the table cell as an array of {@link PowerPoint.TextRun} objects.
Each `TextRun` object represents a sequence of one or more characters that share the same font attributes.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_TextRuns_get */
/* End_PlaceHolder_TableCell_TextRuns_get */
_throwIfNotLoaded("textRuns", this._Te, _typeTableCell, this._isNull);
_throwIfApiNotSupported("TableCell.textRuns", _defaultApiSetName, "1.9", _hostName);
return this._Te;
},
set: function (value) {
/* Begin_PlaceHolder_TableCell_TextRuns_set */
/* End_PlaceHolder_TableCell_TextRuns_set */
this._Te = value;
_invokeSetProperty(this, "TextRuns", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCell.prototype, "verticalAlignment", {
/**
* Specifies the vertical alignment of the text in the table cell.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableCell_VerticalAlignment_get */
/* End_PlaceHolder_TableCell_VerticalAlignment_get */
_throwIfNotLoaded("verticalAlignment", this._V, _typeTableCell, this._isNull);
_throwIfApiNotSupported("TableCell.verticalAlignment", _defaultApiSetName, "1.9", _hostName);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_TableCell_VerticalAlignment_set */
/* End_PlaceHolder_TableCell_VerticalAlignment_set */
this._V = value;
_invokeSetProperty(this, "VerticalAlignment", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "borders" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "fill" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "font" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "horizontalAlignment" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "indentLevel" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "margins" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "text" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "textRuns" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "verticalAlignment" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Resizes the table cell to span across a specified number of rows and columns.
If rowCount or columnCount are greater than 1, the cell will become a merged area. If the cell
is already a merged area and rowCount and columnCount are set to 1, the cell will no longer be
a merged area.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param rowCount The number of rows the cell will span across. Must be greater than 0.
* @param columnCount The number of columns the cell will span across. Must be greater than 0.
*/
TableCell.prototype.resize = function (rowCount, columnCount) {
/* Begin_PlaceHolder_TableCell_Resize */
/* End_PlaceHolder_TableCell_Resize */
_throwIfApiNotSupported("TableCell.resize", _defaultApiSetName, "1.9", _hostName);
_invokeMethod(this, "Resize", 0 /* Default */, [rowCount, columnCount], 0 /* none */, 0 /* none */);
};
/**
* Splits the cell into the specified number of rows and columns.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param rowCount The number of rows to split into. Must be greater than 0.
* @param columnCount The number of columns to split into. Must be greater than 0.
*/
TableCell.prototype.split = function (rowCount, columnCount) {
/* Begin_PlaceHolder_TableCell_Split */
/* End_PlaceHolder_TableCell_Split */
_throwIfApiNotSupported("TableCell.split", _defaultApiSetName, "1.9", _hostName);
_invokeMethod(this, "Split", 0 /* Default */, [rowCount, columnCount], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TableCell.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableCell_HandleResult */
/* End_PlaceHolder_TableCell_HandleResult */
if (!_isUndefined(obj["ColumnCount"])) {
this._C = obj["ColumnCount"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_ColumnCount */
/* End_PlaceHolder_TableCell_HandleResult_Prop_ColumnCount */
}
if (!_isUndefined(obj["ColumnIndex"])) {
this._Co = obj["ColumnIndex"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_ColumnIndex */
/* End_PlaceHolder_TableCell_HandleResult_Prop_ColumnIndex */
}
if (!_isUndefined(obj["HorizontalAlignment"])) {
this._H = obj["HorizontalAlignment"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_HorizontalAlignment */
/* End_PlaceHolder_TableCell_HandleResult_Prop_HorizontalAlignment */
}
if (!_isUndefined(obj["IndentLevel"])) {
this._I = obj["IndentLevel"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_IndentLevel */
/* End_PlaceHolder_TableCell_HandleResult_Prop_IndentLevel */
}
if (!_isUndefined(obj["RowCount"])) {
this._R = obj["RowCount"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_RowCount */
/* End_PlaceHolder_TableCell_HandleResult_Prop_RowCount */
}
if (!_isUndefined(obj["RowIndex"])) {
this._Ro = obj["RowIndex"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_RowIndex */
/* End_PlaceHolder_TableCell_HandleResult_Prop_RowIndex */
}
if (!_isUndefined(obj["Text"])) {
this._T = obj["Text"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_Text */
/* End_PlaceHolder_TableCell_HandleResult_Prop_Text */
}
if (!_isUndefined(obj["TextRuns"])) {
this._Te = obj["TextRuns"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_TextRuns */
/* End_PlaceHolder_TableCell_HandleResult_Prop_TextRuns */
}
if (!_isUndefined(obj["VerticalAlignment"])) {
this._V = obj["VerticalAlignment"];
/* Begin_PlaceHolder_TableCell_HandleResult_Prop_VerticalAlignment */
/* End_PlaceHolder_TableCell_HandleResult_Prop_VerticalAlignment */
}
_handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "margins", "Margins"]);
};
TableCell.prototype.load = function (options) {
return _load(this, options);
};
TableCell.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableCell.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableCell_HandleRetrieveResult */
/* End_PlaceHolder_TableCell_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object.
*/
TableCell.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TableCell.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TableCell.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TableCell;
}(OfficeExtension.ClientObject));
PowerPoint.TableCell = TableCell;
/* Begin_PlaceHolder_TableCell_AfterDeclaration */
/* End_PlaceHolder_TableCell_AfterDeclaration */
var _typeTableCellCollection = "TableCellCollection";
/* Begin_PlaceHolder_TableCellCollection_BeforeDeclaration */
/* End_PlaceHolder_TableCellCollection_BeforeDeclaration */
/**
* Represents a collection of table cells.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var TableCellCollection = /** @class */ (function (_super) {
__extends(TableCellCollection, _super);
function TableCellCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableCellCollection.prototype, "_className", {
get: function () {
return "TableCellCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCellCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableCellCollection.prototype, "items", {
/* Begin_PlaceHolder_TableCellCollection_Custom_Members */
/* End_PlaceHolder_TableCellCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_TableCellCollection_items */
/* End_PlaceHolder_TableCellCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because TableCellCollection is a collection.
/**
* Gets the number of table cells in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.8]
* @returns The number of table cells in the collection.
*/
TableCellCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_TableCellCollection_GetCount */
/* End_PlaceHolder_TableCellCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the table cell using its zero-based index in the collection. If the `TableCell` doesn't exist, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param row Row index value of the table cell to be retrieved, as a zero-based index.
* @param column Column index value of the table cell to be retrieved, as a zero-based index.
* @returns The `TableCell` object.
*/
TableCellCollection.prototype.getItemAtOrNullObject = function (row, column) {
/* Begin_PlaceHolder_TableCellCollection_GetItemAtOrNullObject */
/* End_PlaceHolder_TableCellCollection_GetItemAtOrNullObject */
return _createMethodObject(PowerPoint.TableCell, this, "GetItemAtOrNullObject", 1 /* Read */, [row, column], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
TableCellCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableCellCollection_HandleResult */
/* End_PlaceHolder_TableCellCollection_HandleResult */
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(PowerPoint.TableCell, false, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
TableCellCollection.prototype.load = function (options) {
return _load(this, options);
};
TableCellCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableCellCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableCellCollection_HandleRetrieveResult */
/* End_PlaceHolder_TableCellCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableCell, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
TableCellCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
TableCellCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableCell, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return TableCellCollection;
}(OfficeExtension.ClientObject));
PowerPoint.TableCellCollection = TableCellCollection;
/* Begin_PlaceHolder_TableCellCollection_AfterDeclaration */
/* End_PlaceHolder_TableCellCollection_AfterDeclaration */
var _typeTableColumn = "TableColumn";
/* Begin_PlaceHolder_TableColumn_BeforeDeclaration */
/* End_PlaceHolder_TableColumn_BeforeDeclaration */
/**
* Represents a column in a table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableColumn = /** @class */ (function (_super) {
__extends(TableColumn, _super);
function TableColumn() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableColumn.prototype, "_className", {
get: function () {
return "TableColumn";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", {
get: function () {
return ["width", "columnIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumn.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Width", "ColumnIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumn.prototype, "columnIndex", {
/* Begin_PlaceHolder_TableColumn_Custom_Members */
/* End_PlaceHolder_TableColumn_Custom_Members */
/**
* Returns the index number of the column within the column collection of the table. Zero-indexed.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableColumn_ColumnIndex_get */
/* End_PlaceHolder_TableColumn_ColumnIndex_get */
_throwIfNotLoaded("columnIndex", this._C, _typeTableColumn, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumn.prototype, "width", {
/**
* Retrieves the width of the column in points. If the set column width is less than the minimum width, the column width will be increased to the minimum width.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableColumn_Width_get */
/* End_PlaceHolder_TableColumn_Width_get */
_throwIfNotLoaded("width", this._W, _typeTableColumn, this._isNull);
return this._W;
},
set: function (value) {
/* Begin_PlaceHolder_TableColumn_Width_set */
/* End_PlaceHolder_TableColumn_Width_set */
this._W = value;
_invokeSetProperty(this, "Width", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "width" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes the column.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableColumn.prototype.delete = function () {
/* Begin_PlaceHolder_TableColumn_Delete */
/* End_PlaceHolder_TableColumn_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TableColumn.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableColumn_HandleResult */
/* End_PlaceHolder_TableColumn_HandleResult */
if (!_isUndefined(obj["ColumnIndex"])) {
this._C = obj["ColumnIndex"];
/* Begin_PlaceHolder_TableColumn_HandleResult_Prop_ColumnIndex */
/* End_PlaceHolder_TableColumn_HandleResult_Prop_ColumnIndex */
}
if (!_isUndefined(obj["Width"])) {
this._W = obj["Width"];
/* Begin_PlaceHolder_TableColumn_HandleResult_Prop_Width */
/* End_PlaceHolder_TableColumn_HandleResult_Prop_Width */
}
};
TableColumn.prototype.load = function (options) {
return _load(this, options);
};
TableColumn.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableColumn.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableColumn_HandleRetrieveResult */
/* End_PlaceHolder_TableColumn_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableColumn` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableColumnData`) that contains shallow copies of any loaded child properties from the original object.
*/
TableColumn.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TableColumn.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TableColumn.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TableColumn;
}(OfficeExtension.ClientObject));
PowerPoint.TableColumn = TableColumn;
/* Begin_PlaceHolder_TableColumn_AfterDeclaration */
/* End_PlaceHolder_TableColumn_AfterDeclaration */
var _typeTableColumnCollection = "TableColumnCollection";
/* Begin_PlaceHolder_TableColumnCollection_BeforeDeclaration */
/* End_PlaceHolder_TableColumnCollection_BeforeDeclaration */
/**
* Represents a collection of table columns.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableColumnCollection = /** @class */ (function (_super) {
__extends(TableColumnCollection, _super);
function TableColumnCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableColumnCollection.prototype, "_className", {
get: function () {
return "TableColumnCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumnCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableColumnCollection.prototype, "items", {
/* Begin_PlaceHolder_TableColumnCollection_Custom_Members */
/* End_PlaceHolder_TableColumnCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_TableColumnCollection_items */
/* End_PlaceHolder_TableColumnCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because TableColumnCollection is a collection.
/**
* Adds one or more columns to the table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param index Optional. Specifies the zero-based index where the new columns are added. Existing columns starting at the index location are shifted right. If the index value is undefined, null, -1, or greater than the number of columns in the table, the new columns are added at the end of the table.
* @param count Optional. The number of columns to add. If the value is undefined or 0, only one column is added.
*/
TableColumnCollection.prototype.add = function (index, count) {
/* Begin_PlaceHolder_TableColumnCollection_Add */
/* End_PlaceHolder_TableColumnCollection_Add */
_invokeMethod(this, "Add", 0 /* Default */, [index, count], 0 /* none */, 0 /* none */);
};
/**
* Deletes the specified columns from the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param columns An array of `TableColumn` objects representing the columns to be deleted.
*/
TableColumnCollection.prototype.deleteColumns = function (columns) {
/* Begin_PlaceHolder_TableColumnCollection_DeleteColumns */
/* End_PlaceHolder_TableColumnCollection_DeleteColumns */
_invokeMethod(this, "DeleteColumns", 0 /* Default */, [columns], 0 /* none */, 0 /* none */);
};
/**
* Gets the number of columns in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
* @returns The number of columns in the collection.
*/
TableColumnCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_TableColumnCollection_GetCount */
/* End_PlaceHolder_TableColumnCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the column using its zero-based index in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param index Index value of the column to be retrieved, as a zero-based index.
* @returns The column object.
*/
TableColumnCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_TableColumnCollection_GetItemAt */
/* End_PlaceHolder_TableColumnCollection_GetItemAt */
return _createMethodObject(PowerPoint.TableColumn, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
TableColumnCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableColumnCollection_HandleResult */
/* End_PlaceHolder_TableColumnCollection_HandleResult */
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(PowerPoint.TableColumn, false, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
TableColumnCollection.prototype.load = function (options) {
return _load(this, options);
};
TableColumnCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableColumnCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableColumnCollection_HandleRetrieveResult */
/* End_PlaceHolder_TableColumnCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableColumn, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableColumnCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableColumnCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
TableColumnCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
TableColumnCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableColumn, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return TableColumnCollection;
}(OfficeExtension.ClientObject));
PowerPoint.TableColumnCollection = TableColumnCollection;
/* Begin_PlaceHolder_TableClearOptions_AfterDeclaration */
/* End_PlaceHolder_TableClearOptions_AfterDeclaration */
var _typeTableRow = "TableRow";
/* Begin_PlaceHolder_TableRow_BeforeDeclaration */
/* End_PlaceHolder_TableRow_BeforeDeclaration */
/**
* Represents a row in a table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableRow = /** @class */ (function (_super) {
__extends(TableRow, _super);
function TableRow() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableRow.prototype, "_className", {
get: function () {
return "TableRow";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", {
get: function () {
return ["height", "currentHeight", "rowIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Height", "CurrentHeight", "RowIndex"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, false, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "currentHeight", {
/* Begin_PlaceHolder_TableRow_Custom_Members */
/* End_PlaceHolder_TableRow_Custom_Members */
/**
* Retrieves the current height of the row in points.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableRow_CurrentHeight_get */
/* End_PlaceHolder_TableRow_CurrentHeight_get */
_throwIfNotLoaded("currentHeight", this._C, _typeTableRow, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "height", {
/**
* Specifies the height of the row in points. If the set row height is less than the minimum height, the row height will be increased to the minimum height.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableRow_Height_get */
/* End_PlaceHolder_TableRow_Height_get */
_throwIfNotLoaded("height", this._H, _typeTableRow, this._isNull);
return this._H;
},
set: function (value) {
/* Begin_PlaceHolder_TableRow_Height_set */
/* End_PlaceHolder_TableRow_Height_set */
this._H = value;
_invokeSetProperty(this, "Height", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRow.prototype, "rowIndex", {
/**
* Returns the index number of the row within the rows collection of the table. Zero-indexed.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableRow_RowIndex_get */
/* End_PlaceHolder_TableRow_RowIndex_get */
_throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull);
return this._R;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "height" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes the row.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableRow.prototype.delete = function () {
/* Begin_PlaceHolder_TableRow_Delete */
/* End_PlaceHolder_TableRow_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TableRow.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableRow_HandleResult */
/* End_PlaceHolder_TableRow_HandleResult */
if (!_isUndefined(obj["CurrentHeight"])) {
this._C = obj["CurrentHeight"];
/* Begin_PlaceHolder_TableRow_HandleResult_Prop_CurrentHeight */
/* End_PlaceHolder_TableRow_HandleResult_Prop_CurrentHeight */
}
if (!_isUndefined(obj["Height"])) {
this._H = obj["Height"];
/* Begin_PlaceHolder_TableRow_HandleResult_Prop_Height */
/* End_PlaceHolder_TableRow_HandleResult_Prop_Height */
}
if (!_isUndefined(obj["RowIndex"])) {
this._R = obj["RowIndex"];
/* Begin_PlaceHolder_TableRow_HandleResult_Prop_RowIndex */
/* End_PlaceHolder_TableRow_HandleResult_Prop_RowIndex */
}
};
TableRow.prototype.load = function (options) {
return _load(this, options);
};
TableRow.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableRow.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableRow_HandleRetrieveResult */
/* End_PlaceHolder_TableRow_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object.
*/
TableRow.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TableRow.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TableRow.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TableRow;
}(OfficeExtension.ClientObject));
PowerPoint.TableRow = TableRow;
/* Begin_PlaceHolder_TableRow_AfterDeclaration */
/* End_PlaceHolder_TableRow_AfterDeclaration */
var _typeTableRowCollection = "TableRowCollection";
/* Begin_PlaceHolder_TableRowCollection_BeforeDeclaration */
/* End_PlaceHolder_TableRowCollection_BeforeDeclaration */
/**
* Represents a collection of table rows.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableRowCollection = /** @class */ (function (_super) {
__extends(TableRowCollection, _super);
function TableRowCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableRowCollection.prototype, "_className", {
get: function () {
return "TableRowCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRowCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableRowCollection.prototype, "items", {
/* Begin_PlaceHolder_TableRowCollection_Custom_Members */
/* End_PlaceHolder_TableRowCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_TableRowCollection_items */
/* End_PlaceHolder_TableRowCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because TableRowCollection is a collection.
/**
* Adds one or more rows to the table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param index Optional. Specifies the zero-based index where the new rows are added. Existing rows starting at the index location are shifted down. If the index value is undefined, null, -1, or greater than the number of rows in the table, the new rows are added at the end of the table.
* @param count Optional. The number of rows to add. If the value is undefined or 0, only one row is added.
*/
TableRowCollection.prototype.add = function (index, count) {
/* Begin_PlaceHolder_TableRowCollection_Add */
/* End_PlaceHolder_TableRowCollection_Add */
_invokeMethod(this, "Add", 0 /* Default */, [index, count], 0 /* none */, 0 /* none */);
};
/**
* Deletes the specified rows from the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param rows An array of `TableRow` objects representing the rows to be deleted.
*/
TableRowCollection.prototype.deleteRows = function (rows) {
/* Begin_PlaceHolder_TableRowCollection_DeleteRows */
/* End_PlaceHolder_TableRowCollection_DeleteRows */
_invokeMethod(this, "DeleteRows", 0 /* Default */, [rows], 0 /* none */, 0 /* none */);
};
/**
* Gets the number of rows in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
* @returns The number of rows in the collection.
*/
TableRowCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_TableRowCollection_GetCount */
/* End_PlaceHolder_TableRowCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the row using its zero-based index in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param index Index value of the row to be retrieved, as a zero-based index.
* @returns The row object.
*/
TableRowCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_TableRowCollection_GetItemAt */
/* End_PlaceHolder_TableRowCollection_GetItemAt */
return _createMethodObject(PowerPoint.TableRow, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
TableRowCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableRowCollection_HandleResult */
/* End_PlaceHolder_TableRowCollection_HandleResult */
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(PowerPoint.TableRow, false, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
TableRowCollection.prototype.load = function (options) {
return _load(this, options);
};
TableRowCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableRowCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableRowCollection_HandleRetrieveResult */
/* End_PlaceHolder_TableRowCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableRow, false, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
TableRowCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
TableRowCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.TableRow, false, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return TableRowCollection;
}(OfficeExtension.ClientObject));
PowerPoint.TableRowCollection = TableRowCollection;
/* Begin_PlaceHolder_TableRowCollection_AfterDeclaration */
/* End_PlaceHolder_TableRowCollection_AfterDeclaration */
/* Begin_PlaceHolder_TableStyle_BeforeDeclaration */
/* End_PlaceHolder_TableStyle_BeforeDeclaration */
/**
* Represents the available built-in table styles.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableStyle;
(function (TableStyle) {
/**
* Specifies the style "No style, No grid" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["noStyleNoGrid"] = "NoStyleNoGrid";
/**
* Specifies the style "Themed style 1 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent1"] = "ThemedStyle1Accent1";
/**
* Specifies the style "Themed style 1 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent2"] = "ThemedStyle1Accent2";
/**
* Specifies the style "Themed style 1 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent3"] = "ThemedStyle1Accent3";
/**
* Specifies the style "Themed style 1 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent4"] = "ThemedStyle1Accent4";
/**
* Specifies the style "Themed style 1 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent5"] = "ThemedStyle1Accent5";
/**
* Specifies the style "Themed style 1 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle1Accent6"] = "ThemedStyle1Accent6";
/**
* Specifies the style "No style, Table grid" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["noStyleTableGrid"] = "NoStyleTableGrid";
/**
* Specifies the style "Themed style 2 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent1"] = "ThemedStyle2Accent1";
/**
* Specifies the style "Themed style 2 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent2"] = "ThemedStyle2Accent2";
/**
* Specifies the style "Themed style 2 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent3"] = "ThemedStyle2Accent3";
/**
* Specifies the style "Themed style 2 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent4"] = "ThemedStyle2Accent4";
/**
* Specifies the style "Themed style 2 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent5"] = "ThemedStyle2Accent5";
/**
* Specifies the style "Themed style 2 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["themedStyle2Accent6"] = "ThemedStyle2Accent6";
/**
* Specifies the style "Light Style 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1"] = "LightStyle1";
/**
* Specifies the style "Light style 1 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent1"] = "LightStyle1Accent1";
/**
* Specifies the style "Light style 1 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent2"] = "LightStyle1Accent2";
/**
* Specifies the style "Light style 1 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent3"] = "LightStyle1Accent3";
/**
* Specifies the style "Light style 1 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent4"] = "LightStyle1Accent4";
/**
* Specifies the style "Light style 1 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent5"] = "LightStyle1Accent5";
/**
* Specifies the style "Light style 1 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle1Accent6"] = "LightStyle1Accent6";
/**
* Specifies the style "Light Style 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2"] = "LightStyle2";
/**
* Specifies the style "Light style 2 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent1"] = "LightStyle2Accent1";
/**
* Specifies the style "Light style 2 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent2"] = "LightStyle2Accent2";
/**
* Specifies the style "Light style 2 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent3"] = "LightStyle2Accent3";
/**
* Specifies the style "Light style 2 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent4"] = "LightStyle2Accent4";
/**
* Specifies the style "Light style 2 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent5"] = "LightStyle2Accent5";
/**
* Specifies the style "Light style 2 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle2Accent6"] = "LightStyle2Accent6";
/**
* Specifies the style "Light Style 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3"] = "LightStyle3";
/**
* Specifies the style "Light style 3 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent1"] = "LightStyle3Accent1";
/**
* Specifies the style "Light style 3 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent2"] = "LightStyle3Accent2";
/**
* Specifies the style "Light style 3 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent3"] = "LightStyle3Accent3";
/**
* Specifies the style "Light style 3 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent4"] = "LightStyle3Accent4";
/**
* Specifies the style "Light style 3 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent5"] = "LightStyle3Accent5";
/**
* Specifies the style "Light style 3 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["lightStyle3Accent6"] = "LightStyle3Accent6";
/**
* Specifies the style "Medium Style 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1"] = "MediumStyle1";
/**
* Specifies the style "Medium style 1 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent1"] = "MediumStyle1Accent1";
/**
* Specifies the style "Medium style 1 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent2"] = "MediumStyle1Accent2";
/**
* Specifies the style "Medium style 1 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent3"] = "MediumStyle1Accent3";
/**
* Specifies the style "Medium style 1 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent4"] = "MediumStyle1Accent4";
/**
* Specifies the style "Medium style 1 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent5"] = "MediumStyle1Accent5";
/**
* Specifies the style "Medium style 1 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle1Accent6"] = "MediumStyle1Accent6";
/**
* Specifies the style "Medium Style 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2"] = "MediumStyle2";
/**
* Specifies the style "Medium style 2 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent1"] = "MediumStyle2Accent1";
/**
* Specifies the style "Medium style 2 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent2"] = "MediumStyle2Accent2";
/**
* Specifies the style "Medium style 2 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent3"] = "MediumStyle2Accent3";
/**
* Specifies the style "Medium style 2 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent4"] = "MediumStyle2Accent4";
/**
* Specifies the style "Medium style 2 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent5"] = "MediumStyle2Accent5";
/**
* Specifies the style "Medium style 2 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle2Accent6"] = "MediumStyle2Accent6";
/**
* Specifies the style "Medium Style 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3"] = "MediumStyle3";
/**
* Specifies the style "Medium style 3 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent1"] = "MediumStyle3Accent1";
/**
* Specifies the style "Medium style 3 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent2"] = "MediumStyle3Accent2";
/**
* Specifies the style "Medium style 3 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent3"] = "MediumStyle3Accent3";
/**
* Specifies the style "Medium style 3 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent4"] = "MediumStyle3Accent4";
/**
* Specifies the style "Medium style 3 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent5"] = "MediumStyle3Accent5";
/**
* Specifies the style "Medium style 3 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle3Accent6"] = "MediumStyle3Accent6";
/**
* Specifies the style "Medium Style 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4"] = "MediumStyle4";
/**
* Specifies the style "Medium style 4 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent1"] = "MediumStyle4Accent1";
/**
* Specifies the style "Medium style 4 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent2"] = "MediumStyle4Accent2";
/**
* Specifies the style "Medium style 4 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent3"] = "MediumStyle4Accent3";
/**
* Specifies the style "Medium style 4 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent4"] = "MediumStyle4Accent4";
/**
* Specifies the style "Medium style 4 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent5"] = "MediumStyle4Accent5";
/**
* Specifies the style "Medium style 4 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["mediumStyle4Accent6"] = "MediumStyle4Accent6";
/**
* Specifies the style "Dark Style 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1"] = "DarkStyle1";
/**
* Specifies the style "Dark style 1 - Accent 1" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent1"] = "DarkStyle1Accent1";
/**
* Specifies the style "Dark style 1 - Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent2"] = "DarkStyle1Accent2";
/**
* Specifies the style "Dark style 1 - Accent 3" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent3"] = "DarkStyle1Accent3";
/**
* Specifies the style "Dark style 1 - Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent4"] = "DarkStyle1Accent4";
/**
* Specifies the style "Dark style 1 - Accent 5" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent5"] = "DarkStyle1Accent5";
/**
* Specifies the style "Dark style 1 - Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle1Accent6"] = "DarkStyle1Accent6";
/**
* Specifies the style "Dark Style 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle2"] = "DarkStyle2";
/**
* Specifies the style "Dark style 2 - Accent 1/Accent 2" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle2Accent1"] = "DarkStyle2Accent1";
/**
* Specifies the style "Dark style 2 - Accent 3/Accent 4" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle2Accent2"] = "DarkStyle2Accent2";
/**
* Specifies the style "Dark style 2 - Accent 5/Accent 6" in UI.
* @remarks
* [Api set: PowerPointApi 1.9]
*/
TableStyle["darkStyle2Accent3"] = "DarkStyle2Accent3";
})(TableStyle = PowerPoint.TableStyle || (PowerPoint.TableStyle = {}));
/* Begin_PlaceHolder_TableStyle_AfterDeclaration */
/* End_PlaceHolder_TableStyle_AfterDeclaration */
var _typeTableStyleSettings = "TableStyleSettings";
/* Begin_PlaceHolder_TableStyleSettings_BeforeDeclaration */
/* End_PlaceHolder_TableStyleSettings_BeforeDeclaration */
/**
* Represents the available table style settings.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
var TableStyleSettings = /** @class */ (function (_super) {
__extends(TableStyleSettings, _super);
function TableStyleSettings() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TableStyleSettings.prototype, "_className", {
get: function () {
return "TableStyleSettings";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "_scalarPropertyNames", {
get: function () {
return ["areColumnsBanded", "areRowsBanded", "isFirstColumnHighlighted", "isFirstRowHighlighted", "isLastColumnHighlighted", "isLastRowHighlighted", "style"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["AreColumnsBanded", "AreRowsBanded", "IsFirstColumnHighlighted", "IsFirstRowHighlighted", "IsLastColumnHighlighted", "IsLastRowHighlighted", "Style"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "areColumnsBanded", {
/* Begin_PlaceHolder_TableStyleSettings_Custom_Members */
/* End_PlaceHolder_TableStyleSettings_Custom_Members */
/**
* 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: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_AreColumnsBanded_get */
/* End_PlaceHolder_TableStyleSettings_AreColumnsBanded_get */
_throwIfNotLoaded("areColumnsBanded", this._A, _typeTableStyleSettings, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_AreColumnsBanded_set */
/* End_PlaceHolder_TableStyleSettings_AreColumnsBanded_set */
this._A = value;
_invokeSetProperty(this, "AreColumnsBanded", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "areRowsBanded", {
/**
* 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: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_AreRowsBanded_get */
/* End_PlaceHolder_TableStyleSettings_AreRowsBanded_get */
_throwIfNotLoaded("areRowsBanded", this._Ar, _typeTableStyleSettings, this._isNull);
return this._Ar;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_AreRowsBanded_set */
/* End_PlaceHolder_TableStyleSettings_AreRowsBanded_set */
this._Ar = value;
_invokeSetProperty(this, "AreRowsBanded", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "isFirstColumnHighlighted", {
/**
* Specifies if the first column contains special formatting.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_IsFirstColumnHighlighted_get */
/* End_PlaceHolder_TableStyleSettings_IsFirstColumnHighlighted_get */
_throwIfNotLoaded("isFirstColumnHighlighted", this._I, _typeTableStyleSettings, this._isNull);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_IsFirstColumnHighlighted_set */
/* End_PlaceHolder_TableStyleSettings_IsFirstColumnHighlighted_set */
this._I = value;
_invokeSetProperty(this, "IsFirstColumnHighlighted", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "isFirstRowHighlighted", {
/**
* Specifies if the first row contains special formatting.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_IsFirstRowHighlighted_get */
/* End_PlaceHolder_TableStyleSettings_IsFirstRowHighlighted_get */
_throwIfNotLoaded("isFirstRowHighlighted", this._Is, _typeTableStyleSettings, this._isNull);
return this._Is;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_IsFirstRowHighlighted_set */
/* End_PlaceHolder_TableStyleSettings_IsFirstRowHighlighted_set */
this._Is = value;
_invokeSetProperty(this, "IsFirstRowHighlighted", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "isLastColumnHighlighted", {
/**
* Specifies if the last column contains special formatting.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_IsLastColumnHighlighted_get */
/* End_PlaceHolder_TableStyleSettings_IsLastColumnHighlighted_get */
_throwIfNotLoaded("isLastColumnHighlighted", this._IsL, _typeTableStyleSettings, this._isNull);
return this._IsL;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_IsLastColumnHighlighted_set */
/* End_PlaceHolder_TableStyleSettings_IsLastColumnHighlighted_set */
this._IsL = value;
_invokeSetProperty(this, "IsLastColumnHighlighted", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "isLastRowHighlighted", {
/**
* Specifies if the last row contains special formatting.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_IsLastRowHighlighted_get */
/* End_PlaceHolder_TableStyleSettings_IsLastRowHighlighted_get */
_throwIfNotLoaded("isLastRowHighlighted", this._IsLa, _typeTableStyleSettings, this._isNull);
return this._IsLa;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_IsLastRowHighlighted_set */
/* End_PlaceHolder_TableStyleSettings_IsLastRowHighlighted_set */
this._IsLa = value;
_invokeSetProperty(this, "IsLastRowHighlighted", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(TableStyleSettings.prototype, "style", {
/**
* Specifies the table style.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_TableStyleSettings_Style_get */
/* End_PlaceHolder_TableStyleSettings_Style_get */
_throwIfNotLoaded("style", this._S, _typeTableStyleSettings, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_TableStyleSettings_Style_set */
/* End_PlaceHolder_TableStyleSettings_Style_set */
this._S = value;
_invokeSetProperty(this, "Style", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "areColumnsBanded" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "areRowsBanded" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "isFirstColumnHighlighted" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "isFirstRowHighlighted" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "isLastColumnHighlighted" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "isLastRowHighlighted" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "style" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
TableStyleSettings.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TableStyleSettings_HandleResult */
/* End_PlaceHolder_TableStyleSettings_HandleResult */
if (!_isUndefined(obj["AreColumnsBanded"])) {
this._A = obj["AreColumnsBanded"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_AreColumnsBanded */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_AreColumnsBanded */
}
if (!_isUndefined(obj["AreRowsBanded"])) {
this._Ar = obj["AreRowsBanded"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_AreRowsBanded */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_AreRowsBanded */
}
if (!_isUndefined(obj["IsFirstColumnHighlighted"])) {
this._I = obj["IsFirstColumnHighlighted"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsFirstColumnHighlighted */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsFirstColumnHighlighted */
}
if (!_isUndefined(obj["IsFirstRowHighlighted"])) {
this._Is = obj["IsFirstRowHighlighted"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsFirstRowHighlighted */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsFirstRowHighlighted */
}
if (!_isUndefined(obj["IsLastColumnHighlighted"])) {
this._IsL = obj["IsLastColumnHighlighted"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsLastColumnHighlighted */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsLastColumnHighlighted */
}
if (!_isUndefined(obj["IsLastRowHighlighted"])) {
this._IsLa = obj["IsLastRowHighlighted"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsLastRowHighlighted */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_IsLastRowHighlighted */
}
if (!_isUndefined(obj["Style"])) {
this._S = obj["Style"];
/* Begin_PlaceHolder_TableStyleSettings_HandleResult_Prop_Style */
/* End_PlaceHolder_TableStyleSettings_HandleResult_Prop_Style */
}
};
TableStyleSettings.prototype.load = function (options) {
return _load(this, options);
};
TableStyleSettings.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TableStyleSettings.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TableStyleSettings_HandleRetrieveResult */
/* End_PlaceHolder_TableStyleSettings_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.TableStyleSettings` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableStyleSettingsData`) that contains shallow copies of any loaded child properties from the original object.
*/
TableStyleSettings.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
TableStyleSettings.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
TableStyleSettings.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return TableStyleSettings;
}(OfficeExtension.ClientObject));
PowerPoint.TableStyleSettings = TableStyleSettings;
/* Begin_PlaceHolder_TableStyleSettings_AfterDeclaration */
/* End_PlaceHolder_TableStyleSettings_AfterDeclaration */
var _typeTable = "Table";
/* Begin_PlaceHolder_Table_BeforeDeclaration */
/* End_PlaceHolder_Table_BeforeDeclaration */
/**
* Represents a table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var Table = /** @class */ (function (_super) {
__extends(Table, _super);
function Table() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Table.prototype, "_className", {
get: function () {
return "Table";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "_scalarPropertyNames", {
get: function () {
return ["columnCount", "rowCount", "values"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["ColumnCount", "RowCount", "Values"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "_navigationPropertyNames", {
get: function () {
return ["columns", "rows", "styleSettings"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "columns", {
/* Begin_PlaceHolder_Table_Custom_Members */
/* End_PlaceHolder_Table_Custom_Members */
/**
* Gets the collection of columns in the table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Table_Columns_get */
/* End_PlaceHolder_Table_Columns_get */
_throwIfApiNotSupported("Table.columns", _defaultApiSetName, "1.9", _hostName);
if (!this._Co) {
this._Co = _createPropertyObject(PowerPoint.TableColumnCollection, this, "Columns", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Table_Columns_get_post */
/* End_PlaceHolder_Table_Columns_get_post */
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "rows", {
/**
* Gets the collection of rows in the table.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Table_Rows_get */
/* End_PlaceHolder_Table_Rows_get */
_throwIfApiNotSupported("Table.rows", _defaultApiSetName, "1.9", _hostName);
if (!this._Ro) {
this._Ro = _createPropertyObject(PowerPoint.TableRowCollection, this, "Rows", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Table_Rows_get_post */
/* End_PlaceHolder_Table_Rows_get_post */
return this._Ro;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "styleSettings", {
/**
* Gets the table style settings.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*/
get: function () {
/* Begin_PlaceHolder_Table_StyleSettings_get */
/* End_PlaceHolder_Table_StyleSettings_get */
_throwIfApiNotSupported("Table.styleSettings", _defaultApiSetName, "1.9", _hostName);
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.TableStyleSettings, this, "StyleSettings", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Table_StyleSettings_get_post */
/* End_PlaceHolder_Table_StyleSettings_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "columnCount", {
/**
* Gets the number of columns in the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Table_ColumnCount_get */
/* End_PlaceHolder_Table_ColumnCount_get */
_throwIfNotLoaded("columnCount", this._C, _typeTable, this._isNull);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "rowCount", {
/**
* Gets the number of rows in the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Table_RowCount_get */
/* End_PlaceHolder_Table_RowCount_get */
_throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull);
return this._R;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Table.prototype, "values", {
/**
* Gets all of the values in the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Table_Values_get */
/* End_PlaceHolder_Table_Values_get */
_throwIfNotLoaded("values", this._V, _typeTable, this._isNull);
return this._V;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "columns" /* COLLECTION; Collections may not have a "SET" method */,
// * "rows" /* COLLECTION; Collections may not have a "SET" method */,
// * "styleSettings" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/**
* Clears table values and formatting.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param options Provides options for clearing the table.
*/
Table.prototype.clear = function (options) {
/* Begin_PlaceHolder_Table_Clear */
/* End_PlaceHolder_Table_Clear */
_throwIfApiNotSupported("Table.clear", _defaultApiSetName, "1.9", _hostName);
_invokeMethod(this, "Clear", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/**
* Gets the cell at the specified `rowIndex` and `columnIndex`.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param rowIndex The zero-based row index of the cell.
* @param columnIndex The zero-based column index of the cell.
* @returns The cell at the specified row and column. If the cell is part of a merged area and not the top left cell of the merged area, an object with the `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}.
*/
Table.prototype.getCellOrNullObject = function (rowIndex, columnIndex) {
/* Begin_PlaceHolder_Table_GetCellOrNullObject */
/* End_PlaceHolder_Table_GetCellOrNullObject */
return _createMethodObject(PowerPoint.TableCell, this, "GetCellOrNullObject", 1 /* Read */, [rowIndex, columnIndex], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a collection of cells that represent the merged areas of the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
* @returns a `TableCellCollection` with cells that represent the merged areas of the table.
*/
Table.prototype.getMergedAreas = function () {
/* Begin_PlaceHolder_Table_GetMergedAreas */
/* End_PlaceHolder_Table_GetMergedAreas */
return _createMethodObject(PowerPoint.TableCellCollection, this, "GetMergedAreas", 0 /* Default */, [], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Gets the shape object for the table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
Table.prototype.getShape = function () {
/* Begin_PlaceHolder_Table_GetShape */
/* End_PlaceHolder_Table_GetShape */
return _createMethodObject(PowerPoint.Shape, this, "GetShape", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Creates a merged area starting at the cell specified by rowIndex and columnIndex. The merged area spans across a specified number of rows and columns.
*
* @remarks
* [Api set: PowerPointApi 1.9]
*
* @param rowIndex The zero-based row index of the cell to start the merged area.
* @param columnIndex The zero-based column index of the cell to start the merged area.
* @param rowCount The number of rows to merge with the starting cell. Must be greater than 0.
* @param columnCount The number of columns to merge with the starting cell. Must be greater than 0.
*/
Table.prototype.mergeCells = function (rowIndex, columnIndex, rowCount, columnCount) {
/* Begin_PlaceHolder_Table_MergeCells */
/* End_PlaceHolder_Table_MergeCells */
_throwIfApiNotSupported("Table.mergeCells", _defaultApiSetName, "1.9", _hostName);
_invokeMethod(this, "MergeCells", 0 /* Default */, [rowIndex, columnIndex, rowCount, columnCount], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Table.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Table_HandleResult */
/* End_PlaceHolder_Table_HandleResult */
if (!_isUndefined(obj["ColumnCount"])) {
this._C = obj["ColumnCount"];
/* Begin_PlaceHolder_Table_HandleResult_Prop_ColumnCount */
/* End_PlaceHolder_Table_HandleResult_Prop_ColumnCount */
}
if (!_isUndefined(obj["RowCount"])) {
this._R = obj["RowCount"];
/* Begin_PlaceHolder_Table_HandleResult_Prop_RowCount */
/* End_PlaceHolder_Table_HandleResult_Prop_RowCount */
}
if (!_isUndefined(obj["Values"])) {
this._V = obj["Values"];
/* Begin_PlaceHolder_Table_HandleResult_Prop_Values */
/* End_PlaceHolder_Table_HandleResult_Prop_Values */
}
_handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "styleSettings", "StyleSettings"]);
};
Table.prototype.load = function (options) {
return _load(this, options);
};
Table.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Table.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Table_HandleRetrieveResult */
/* End_PlaceHolder_Table_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object.
*/
Table.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Table.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Table.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Table;
}(OfficeExtension.ClientObject));
PowerPoint.Table = Table;
/* Begin_PlaceHolder_ChartSpecificationType_BeforeDeclaration */
/* End_PlaceHolder_ChartSpecificationType_BeforeDeclaration */
/**
* Specifies the format of a chart specification.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
var ChartSpecificationType;
(function (ChartSpecificationType) {
/**
* The uniform chart specification format. Use this when the specification has already been translated to the uniform format, in which case no further conversion is performed.
* @remarks
* [Api set: PowerPointApi 99.9]
*/
ChartSpecificationType["uniformChart"] = "UniformChart";
/**
* The chart specification source format. Use this with `getSpecification` to read a chart's current specification; the returned string is produced in-process and is intended to be translated to the editable format by the caller.
* @remarks
* [Api set: PowerPointApi 99.9]
*/
ChartSpecificationType["chartSpecSource"] = "ChartSpecSource";
})(ChartSpecificationType = PowerPoint.ChartSpecificationType || (PowerPoint.ChartSpecificationType = {}));
var _typeChart = "Chart";
/* Begin_PlaceHolder_Chart_BeforeDeclaration */
/* End_PlaceHolder_Chart_BeforeDeclaration */
/**
* Represents a chart.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
var Chart = /** @class */ (function (_super) {
__extends(Chart, _super);
function Chart() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Chart.prototype, "_className", {
get: function () {
return "Chart";
},
enumerable: true,
configurable: true
});
/**
* Applies the given specification to this existing chart.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param specification The JSON string that describes the chart. Throws an `InvalidArgument` exception if `specification` is null, empty, or can't be parsed for the given `specType`.
* @param specType The format of the chart specification.
* @returns A `ChartApplySpecificationResult` object describing the outcome of the operation.
*/
Chart.prototype.applySpecification = function (specification, specType) {
/* Begin_PlaceHolder_Chart_ApplySpecification */
/* End_PlaceHolder_Chart_ApplySpecification */
return _invokeMethod(this, "ApplySpecification", 0 /* Default */, [specification, specType], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Returns the shape object that represents this chart.
*
* @remarks
* [Api set: PowerPointApi 99.9]
* @returns The shape that contains this chart.
*/
Chart.prototype.getShape = function () {
/* Begin_PlaceHolder_Chart_GetShape */
/* End_PlaceHolder_Chart_GetShape */
return _createMethodObject(PowerPoint.Shape, this, "GetShape", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Gets this chart's specification in the requested format.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param specType The format in which to return the chart specification.
* @returns A `ChartSpecificationResult` object containing the chart specification as a JSON string.
*/
Chart.prototype.getSpecification = function (specType) {
/* Begin_PlaceHolder_Chart_GetSpecification */
/* End_PlaceHolder_Chart_GetSpecification */
return _invokeMethod(this, "GetSpecification", 1 /* Read */, [specType], 4 /* concurrent */ | 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Chart.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Chart_HandleResult */
/* End_PlaceHolder_Chart_HandleResult */
};
/** Handle retrieve results
* @private
*/
Chart.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Chart_HandleRetrieveResult */
/* End_PlaceHolder_Chart_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Chart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ChartData`) that contains shallow copies of any loaded child properties from the original object.
*/
Chart.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
return Chart;
}(OfficeExtension.ClientObject));
PowerPoint.Chart = Chart;
var _typeShapeCollection = "ShapeCollection";
/* Begin_PlaceHolder_ShapeCollection_BeforeDeclaration */
/* End_PlaceHolder_ShapeCollection_BeforeDeclaration */
/**
* Represents the collection of shapes.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var ShapeCollection = /** @class */ (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", {
/* Begin_PlaceHolder_ShapeCollection_Custom_Members */
/* End_PlaceHolder_ShapeCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_ShapeCollection_items */
/* End_PlaceHolder_ShapeCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeShapeCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
/**
* Adds a chart to the slide from the given chart specification.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param specification The JSON string that describes the chart. Throws an `InvalidArgument` exception if `specification` is null, empty, or can't be parsed for the given `specType`.
* @param specType The format of the chart specification.
* @param options Optional. Provides options describing the position and size of the new chart.
* @returns A `ChartCreationResult` object describing the outcome of the operation.
*/
ShapeCollection.prototype.addChartFromSpecification = function (specification, specType, options) {
/* Begin_PlaceHolder_ShapeCollection_AddChartFromSpecification */
/* End_PlaceHolder_ShapeCollection_AddChartFromSpecification */
_throwIfApiNotSupported("ShapeCollection.addChartFromSpecification", _defaultApiSetName, "99.9", _hostName);
return _invokeMethod(this, "AddChartFromSpecification", 0 /* Default */, [specification, specType, options], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* 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.
*/
ShapeCollection.prototype.addGeometricShape = function (geometricShapeType, options) {
/* Begin_PlaceHolder_ShapeCollection_AddGeometricShape */
/* End_PlaceHolder_ShapeCollection_AddGeometricShape */
_throwIfApiNotSupported("ShapeCollection.addGeometricShape", _defaultApiSetName, "1.4", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddGeometricShape", 0 /* Default */, [geometricShapeType, options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Create a shape group for several shapes.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param values An array of shape IDs or `Shape` objects.
* @returns A `Shape` object that represents the shape group. Use the `Shape.group` property to access the `ShapeGroup` object for the group.
*/
ShapeCollection.prototype.addGroup = function (values) {
/* Begin_PlaceHolder_ShapeCollection_AddGroup */
/* End_PlaceHolder_ShapeCollection_AddGroup */
_throwIfApiNotSupported("ShapeCollection.addGroup", _defaultApiSetName, "1.8", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddGroup", 0 /* Default */, [values], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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.
*/
ShapeCollection.prototype.addLine = function (connectorType, options) {
/* Begin_PlaceHolder_ShapeCollection_AddLine */
/* End_PlaceHolder_ShapeCollection_AddLine */
_throwIfApiNotSupported("ShapeCollection.addLine", _defaultApiSetName, "1.4", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddLine", 0 /* Default */, [connectorType, options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Adds a picture to the slide. Returns a `Shape` object that represents the new picture.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param base64EncodedImage The base64-encoded image data.
* @param options Optional. Additional options such as the position of the picture.
* @returns The newly inserted shape.
*/
ShapeCollection.prototype.addPicture = function (base64EncodedImage, options) {
/* Begin_PlaceHolder_ShapeCollection_AddPicture */
/* End_PlaceHolder_ShapeCollection_AddPicture */
_throwIfApiNotSupported("ShapeCollection.addPicture", _defaultApiSetName, "1.11", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddPicture", 0 /* Default */, [base64EncodedImage, options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Adds a table to the slide. Returns a `Shape` object that represents the new table.
Use the `Shape.table` property to get the `Table` object for the shape.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param rowCount Number of rows in the table. Must be 1 or greater.
* @param columnCount Number of columns in the table. Must be 1 or greater.
* @param options Provides options describing the new table.
* @returns The newly inserted shape.
*/
ShapeCollection.prototype.addTable = function (rowCount, columnCount, options) {
/* Begin_PlaceHolder_ShapeCollection_AddTable */
/* End_PlaceHolder_ShapeCollection_AddTable */
_throwIfApiNotSupported("ShapeCollection.addTable", _defaultApiSetName, "1.8", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddTable", 0 /* Default */, [rowCount, columnCount, options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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.
*/
ShapeCollection.prototype.addTextBox = function (text, options) {
/* Begin_PlaceHolder_ShapeCollection_AddTextBox */
/* End_PlaceHolder_ShapeCollection_AddTextBox */
_throwIfApiNotSupported("ShapeCollection.addTextBox", _defaultApiSetName, "1.4", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "AddTextBox", 0 /* Default */, [text, options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Gets the number of shapes in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.3]
* @returns The number of shapes in the collection.
*/
ShapeCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_ShapeCollection_GetCount */
/* End_PlaceHolder_ShapeCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a shape using its unique ID. An error is thrown if the shape doesn't 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 doesn't exist, an error is thrown.
*/
ShapeCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_ShapeCollection_GetItem */
/* End_PlaceHolder_ShapeCollection_GetItem */
return _createIndexerObject(PowerPoint.Shape, this, [key]);
};
/**
* 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.
*/
ShapeCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_ShapeCollection_GetItemAt */
/* End_PlaceHolder_ShapeCollection_GetItemAt */
return _createMethodObject(PowerPoint.Shape, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a shape using its unique ID. If such a shape doesn't 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 shape.
* @returns The shape with the unique ID. If such a shape doesn't exist, an object with an `isNullObject` property set to true is returned.
*/
ShapeCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_ShapeCollection_GetItemOrNullObject */
/* End_PlaceHolder_ShapeCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Shape, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Inserts shapes from a base64-encoded presentation into the slide. Throws an `InvalidArgument` exception if the input file is corrupt or cannot be opened, or if any of the provided slides or shapes do not exist in the source presentation.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param base64File The base64-encoded string representing the source presentation. Throws an `InvalidArgument` exception if the input file is corrupt or cannot be opened.
* @param options An array of options that identify shapes in the source presentation. See {@link PowerPoint.InsertShapeFromBase64Options} for details. Throws an `InvalidArgument` exception if any of the provided slides or shapes do not exist in the source presentation.
* @returns The newly inserted shapes.
*/
ShapeCollection.prototype.insertFromBase64Presentation = function (base64File, options) {
/* Begin_PlaceHolder_ShapeCollection_InsertFromBase64Presentation */
/* End_PlaceHolder_ShapeCollection_InsertFromBase64Presentation */
_throwIfApiNotSupported("ShapeCollection.insertFromBase64Presentation", _defaultApiSetName, "1.11", _hostName);
return _createMethodObject(PowerPoint.ShapeScopedCollection, this, "InsertFromBase64Presentation", 0 /* Default */, [base64File, options], true /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/** Handle results returned from the document
* @private
*/
ShapeCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeCollection_HandleResult */
/* End_PlaceHolder_ShapeCollection_HandleResult */
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(PowerPoint.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);
};
/** Handle retrieve results
* @private
*/
ShapeCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeCollection_HandleRetrieveResult */
/* End_PlaceHolder_ShapeCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Shape, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ShapeCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
ShapeCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Shape, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return ShapeCollection;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeCollection = ShapeCollection;
/* Begin_PlaceHolder_ShapeCollection_AfterDeclaration */
/* End_PlaceHolder_ShapeCollection_AfterDeclaration */
/* Begin_PlaceHolder_SlideBackgroundGradientFillType_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundGradientFillType_BeforeDeclaration */
/**
* Specifies the gradient fill type for a {@link PowerPoint.SlideBackgroundGradientFill}.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundGradientFillType;
(function (SlideBackgroundGradientFillType) {
/**
* Unsupported gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["unsupported"] = "Unsupported";
/**
* Linear gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["linear"] = "Linear";
/**
* Radial gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["radial"] = "Radial";
/**
* Rectangular gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["rectangular"] = "Rectangular";
/**
* Path gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["path"] = "Path";
/**
* Shade from title gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundGradientFillType["shadeFromTitle"] = "ShadeFromTitle";
})(SlideBackgroundGradientFillType = PowerPoint.SlideBackgroundGradientFillType || (PowerPoint.SlideBackgroundGradientFillType = {}));
/* Begin_PlaceHolder_SlideBackgroundGradientFillType_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundGradientFillType_AfterDeclaration */
var _typeSlideBackgroundGradientFill = "SlideBackgroundGradientFill";
/* Begin_PlaceHolder_SlideBackgroundGradientFill_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundGradientFill_BeforeDeclaration */
/**
* Represents {@link PowerPoint.SlideBackground} gradient fill properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundGradientFill = /** @class */ (function (_super) {
__extends(SlideBackgroundGradientFill, _super);
function SlideBackgroundGradientFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackgroundGradientFill.prototype, "_className", {
get: function () {
return "SlideBackgroundGradientFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundGradientFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundGradientFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundGradientFill.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundGradientFill.prototype, "type", {
/* Begin_PlaceHolder_SlideBackgroundGradientFill_Custom_Members */
/* End_PlaceHolder_SlideBackgroundGradientFill_Custom_Members */
/**
* Specifies the type of gradient fill.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundGradientFill_Type_get */
/* End_PlaceHolder_SlideBackgroundGradientFill_Type_get */
_throwIfNotLoaded("type", this._T, _typeSlideBackgroundGradientFill, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundGradientFill_Type_set */
/* End_PlaceHolder_SlideBackgroundGradientFill_Type_set */
this._T = value;
_invokeSetProperty(this, "Type", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "type" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
SlideBackgroundGradientFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackgroundGradientFill_HandleResult */
/* End_PlaceHolder_SlideBackgroundGradientFill_HandleResult */
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_SlideBackgroundGradientFill_HandleResult_Prop_Type */
/* End_PlaceHolder_SlideBackgroundGradientFill_HandleResult_Prop_Type */
}
};
SlideBackgroundGradientFill.prototype.load = function (options) {
return _load(this, options);
};
SlideBackgroundGradientFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackgroundGradientFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackgroundGradientFill_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackgroundGradientFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackgroundGradientFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundGradientFillData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackgroundGradientFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackgroundGradientFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackgroundGradientFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackgroundGradientFill;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackgroundGradientFill = SlideBackgroundGradientFill;
/* Begin_PlaceHolder_SlideBackgroundGradientFillOptions_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundGradientFillOptions_AfterDeclaration */
/* Begin_PlaceHolder_SlideBackgroundPatternFillType_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundPatternFillType_BeforeDeclaration */
/**
* Specifies the pattern fill type for a {@link PowerPoint.SlideBackgroundPatternFill}.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundPatternFillType;
(function (SlideBackgroundPatternFillType) {
/**
* Unsupported pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["unsupported"] = "Unsupported";
/**
* 5 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent5"] = "Percent5";
/**
* 10 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent10"] = "Percent10";
/**
* 20 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent20"] = "Percent20";
/**
* 25 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent25"] = "Percent25";
/**
* 30 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent30"] = "Percent30";
/**
* 40 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent40"] = "Percent40";
/**
* 50 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent50"] = "Percent50";
/**
* 60 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent60"] = "Percent60";
/**
* 70 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent70"] = "Percent70";
/**
* 75 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent75"] = "Percent75";
/**
* 80 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent80"] = "Percent80";
/**
* 90 percent pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["percent90"] = "Percent90";
/**
* Horizontal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["horizontal"] = "Horizontal";
/**
* Vertical pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["vertical"] = "Vertical";
/**
* Light horizontal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["lightHorizontal"] = "LightHorizontal";
/**
* Light vertical pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["lightVertical"] = "LightVertical";
/**
* Dark horizontal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["darkHorizontal"] = "DarkHorizontal";
/**
* Dark vertical pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["darkVertical"] = "DarkVertical";
/**
* Narrow horizontal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["narrowHorizontal"] = "NarrowHorizontal";
/**
* Narrow vertical pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["narrowVertical"] = "NarrowVertical";
/**
* Dashed horizontal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dashedHorizontal"] = "DashedHorizontal";
/**
* Dashed vertical pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dashedVertical"] = "DashedVertical";
/**
* Cross pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["cross"] = "Cross";
/**
* Downward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["downwardDiagonal"] = "DownwardDiagonal";
/**
* Upward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["upwardDiagonal"] = "UpwardDiagonal";
/**
* Light downward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["lightDownwardDiagonal"] = "LightDownwardDiagonal";
/**
* Light upward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["lightUpwardDiagonal"] = "LightUpwardDiagonal";
/**
* Dark downward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["darkDownwardDiagonal"] = "DarkDownwardDiagonal";
/**
* Dark upward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["darkUpwardDiagonal"] = "DarkUpwardDiagonal";
/**
* Wide downward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["wideDownwardDiagonal"] = "WideDownwardDiagonal";
/**
* Wide upward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["wideUpwardDiagonal"] = "WideUpwardDiagonal";
/**
* Dashed downward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dashedDownwardDiagonal"] = "DashedDownwardDiagonal";
/**
* Dashed upward diagonal pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dashedUpwardDiagonal"] = "DashedUpwardDiagonal";
/**
* Diagonal cross pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["diagonalCross"] = "DiagonalCross";
/**
* Small checker board pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["smallCheckerBoard"] = "SmallCheckerBoard";
/**
* Large checker board pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["largeCheckerBoard"] = "LargeCheckerBoard";
/**
* Small grid pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["smallGrid"] = "SmallGrid";
/**
* Large grid pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["largeGrid"] = "LargeGrid";
/**
* Dotted grid pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dottedGrid"] = "DottedGrid";
/**
* Small confetti pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["smallConfetti"] = "SmallConfetti";
/**
* Large confetti pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["largeConfetti"] = "LargeConfetti";
/**
* Horizontal brick pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["horizontalBrick"] = "HorizontalBrick";
/**
* Diagonal brick pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["diagonalBrick"] = "DiagonalBrick";
/**
* Solid diamond pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["solidDiamond"] = "SolidDiamond";
/**
* Outlined diamond pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["outlinedDiamond"] = "OutlinedDiamond";
/**
* Dotted diamond pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["dottedDiamond"] = "DottedDiamond";
/**
* Plaid pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["plaid"] = "Plaid";
/**
* Sphere pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["sphere"] = "Sphere";
/**
* Weave pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["weave"] = "Weave";
/**
* Divot pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["divot"] = "Divot";
/**
* Shingle pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["shingle"] = "Shingle";
/**
* Wave pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["wave"] = "Wave";
/**
* Trellis pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["trellis"] = "Trellis";
/**
* Zig zag pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundPatternFillType["zigZag"] = "ZigZag";
})(SlideBackgroundPatternFillType = PowerPoint.SlideBackgroundPatternFillType || (PowerPoint.SlideBackgroundPatternFillType = {}));
/* Begin_PlaceHolder_SlideBackgroundPatternFillType_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundPatternFillType_AfterDeclaration */
var _typeSlideBackgroundPatternFill = "SlideBackgroundPatternFill";
/* Begin_PlaceHolder_SlideBackgroundPatternFill_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundPatternFill_BeforeDeclaration */
/**
* Represents {@link PowerPoint.SlideBackground} pattern fill properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundPatternFill = /** @class */ (function (_super) {
__extends(SlideBackgroundPatternFill, _super);
function SlideBackgroundPatternFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackgroundPatternFill.prototype, "_className", {
get: function () {
return "SlideBackgroundPatternFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["backgroundColor", "foregroundColor", "pattern"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["BackgroundColor", "ForegroundColor", "Pattern"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "backgroundColor", {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_Custom_Members */
/* End_PlaceHolder_SlideBackgroundPatternFill_Custom_Members */
/**
* Specifies the background color in HTML color format (e.g., "#FFFFFF" or "white").
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_BackgroundColor_get */
/* End_PlaceHolder_SlideBackgroundPatternFill_BackgroundColor_get */
_throwIfNotLoaded("backgroundColor", this._B, _typeSlideBackgroundPatternFill, this._isNull);
return this._B;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_BackgroundColor_set */
/* End_PlaceHolder_SlideBackgroundPatternFill_BackgroundColor_set */
this._B = value;
_invokeSetProperty(this, "BackgroundColor", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "foregroundColor", {
/**
* Specifies the foreground color in HTML color format (e.g., "#FFA500" or "orange").
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_ForegroundColor_get */
/* End_PlaceHolder_SlideBackgroundPatternFill_ForegroundColor_get */
_throwIfNotLoaded("foregroundColor", this._F, _typeSlideBackgroundPatternFill, this._isNull);
return this._F;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_ForegroundColor_set */
/* End_PlaceHolder_SlideBackgroundPatternFill_ForegroundColor_set */
this._F = value;
_invokeSetProperty(this, "ForegroundColor", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPatternFill.prototype, "pattern", {
/**
* Specifies the pattern type.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_Pattern_get */
/* End_PlaceHolder_SlideBackgroundPatternFill_Pattern_get */
_throwIfNotLoaded("pattern", this._P, _typeSlideBackgroundPatternFill, this._isNull);
return this._P;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundPatternFill_Pattern_set */
/* End_PlaceHolder_SlideBackgroundPatternFill_Pattern_set */
this._P = value;
_invokeSetProperty(this, "Pattern", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "backgroundColor" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "foregroundColor" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "pattern" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
SlideBackgroundPatternFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackgroundPatternFill_HandleResult */
/* End_PlaceHolder_SlideBackgroundPatternFill_HandleResult */
if (!_isUndefined(obj["BackgroundColor"])) {
this._B = obj["BackgroundColor"];
/* Begin_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_BackgroundColor */
/* End_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_BackgroundColor */
}
if (!_isUndefined(obj["ForegroundColor"])) {
this._F = obj["ForegroundColor"];
/* Begin_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_ForegroundColor */
/* End_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_ForegroundColor */
}
if (!_isUndefined(obj["Pattern"])) {
this._P = obj["Pattern"];
/* Begin_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_Pattern */
/* End_PlaceHolder_SlideBackgroundPatternFill_HandleResult_Prop_Pattern */
}
};
SlideBackgroundPatternFill.prototype.load = function (options) {
return _load(this, options);
};
SlideBackgroundPatternFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackgroundPatternFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackgroundPatternFill_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackgroundPatternFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackgroundPatternFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundPatternFillData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackgroundPatternFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackgroundPatternFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackgroundPatternFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackgroundPatternFill;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackgroundPatternFill = SlideBackgroundPatternFill;
/* Begin_PlaceHolder_SlideBackgroundPatternFillOptions_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundPatternFillOptions_AfterDeclaration */
var _typeSlideBackgroundPictureOrTextureFill = "SlideBackgroundPictureOrTextureFill";
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_BeforeDeclaration */
/**
* Represents {@link PowerPoint.SlideBackground} picture or texture fill properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundPictureOrTextureFill = /** @class */ (function (_super) {
__extends(SlideBackgroundPictureOrTextureFill, _super);
function SlideBackgroundPictureOrTextureFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackgroundPictureOrTextureFill.prototype, "_className", {
get: function () {
return "SlideBackgroundPictureOrTextureFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPictureOrTextureFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["transparency"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPictureOrTextureFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Transparency"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPictureOrTextureFill.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundPictureOrTextureFill.prototype, "transparency", {
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_Custom_Members */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_Custom_Members */
/**
* Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_Transparency_get */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_Transparency_get */
_throwIfNotLoaded("transparency", this._T, _typeSlideBackgroundPictureOrTextureFill, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_Transparency_set */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_Transparency_set */
this._T = value;
_invokeSetProperty(this, "Transparency", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "transparency" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Sets the image used to fill.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param base64EncodedImage A string that is a Base64 encoding of the image data.
*/
SlideBackgroundPictureOrTextureFill.prototype.setImage = function (base64EncodedImage) {
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_SetImage */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_SetImage */
_invokeMethod(this, "SetImage", 0 /* Default */, [base64EncodedImage], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideBackgroundPictureOrTextureFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleResult */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleResult */
if (!_isUndefined(obj["Transparency"])) {
this._T = obj["Transparency"];
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleResult_Prop_Transparency */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleResult_Prop_Transparency */
}
};
SlideBackgroundPictureOrTextureFill.prototype.load = function (options) {
return _load(this, options);
};
SlideBackgroundPictureOrTextureFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackgroundPictureOrTextureFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackgroundPictureOrTextureFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundPictureOrTextureFillData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackgroundPictureOrTextureFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackgroundPictureOrTextureFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackgroundPictureOrTextureFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackgroundPictureOrTextureFill;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackgroundPictureOrTextureFill = SlideBackgroundPictureOrTextureFill;
/* Begin_PlaceHolder_SlideBackgroundPictureOrTextureFillOptions_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundPictureOrTextureFillOptions_AfterDeclaration */
/* Begin_PlaceHolder_SlideBackgroundFillType_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundFillType_BeforeDeclaration */
/**
* Specifies the fill type for a {@link PowerPoint.SlideBackground}.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundFillType;
(function (SlideBackgroundFillType) {
/**
* Unsupported slide background fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundFillType["unsupported"] = "Unsupported";
/**
* Specifies that the slide background should have regular solid fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundFillType["solid"] = "Solid";
/**
* Specifies that the slide background should have gradient fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundFillType["gradient"] = "Gradient";
/**
* Specifies that the slide background should have picture or texture fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundFillType["pictureOrTexture"] = "PictureOrTexture";
/**
* Specifies that the slide background should have pattern fill.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackgroundFillType["pattern"] = "Pattern";
})(SlideBackgroundFillType = PowerPoint.SlideBackgroundFillType || (PowerPoint.SlideBackgroundFillType = {}));
/* Begin_PlaceHolder_SlideBackgroundFillType_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundFillType_AfterDeclaration */
var _typeSlideBackgroundSolidFill = "SlideBackgroundSolidFill";
/* Begin_PlaceHolder_SlideBackgroundSolidFill_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundSolidFill_BeforeDeclaration */
/**
* Represents {@link PowerPoint.SlideBackground} solid fill properties.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundSolidFill = /** @class */ (function (_super) {
__extends(SlideBackgroundSolidFill, _super);
function SlideBackgroundSolidFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackgroundSolidFill.prototype, "_className", {
get: function () {
return "SlideBackgroundSolidFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundSolidFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["color", "transparency"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundSolidFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Color", "Transparency"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundSolidFill.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundSolidFill.prototype, "color", {
/* Begin_PlaceHolder_SlideBackgroundSolidFill_Custom_Members */
/* End_PlaceHolder_SlideBackgroundSolidFill_Custom_Members */
/**
* Specifies the fill color in HTML color format (e.g., "#FFA500" or "orange").
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundSolidFill_Color_get */
/* End_PlaceHolder_SlideBackgroundSolidFill_Color_get */
_throwIfNotLoaded("color", this._C, _typeSlideBackgroundSolidFill, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundSolidFill_Color_set */
/* End_PlaceHolder_SlideBackgroundSolidFill_Color_set */
this._C = value;
_invokeSetProperty(this, "Color", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundSolidFill.prototype, "transparency", {
/**
* Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundSolidFill_Transparency_get */
/* End_PlaceHolder_SlideBackgroundSolidFill_Transparency_get */
_throwIfNotLoaded("transparency", this._T, _typeSlideBackgroundSolidFill, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackgroundSolidFill_Transparency_set */
/* End_PlaceHolder_SlideBackgroundSolidFill_Transparency_set */
this._T = value;
_invokeSetProperty(this, "Transparency", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "color" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "transparency" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
SlideBackgroundSolidFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackgroundSolidFill_HandleResult */
/* End_PlaceHolder_SlideBackgroundSolidFill_HandleResult */
if (!_isUndefined(obj["Color"])) {
this._C = obj["Color"];
/* Begin_PlaceHolder_SlideBackgroundSolidFill_HandleResult_Prop_Color */
/* End_PlaceHolder_SlideBackgroundSolidFill_HandleResult_Prop_Color */
}
if (!_isUndefined(obj["Transparency"])) {
this._T = obj["Transparency"];
/* Begin_PlaceHolder_SlideBackgroundSolidFill_HandleResult_Prop_Transparency */
/* End_PlaceHolder_SlideBackgroundSolidFill_HandleResult_Prop_Transparency */
}
};
SlideBackgroundSolidFill.prototype.load = function (options) {
return _load(this, options);
};
SlideBackgroundSolidFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackgroundSolidFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackgroundSolidFill_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackgroundSolidFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackgroundSolidFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundSolidFillData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackgroundSolidFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackgroundSolidFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackgroundSolidFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackgroundSolidFill;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackgroundSolidFill = SlideBackgroundSolidFill;
/* Begin_PlaceHolder_SlideBackgroundSolidFillOptions_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundSolidFillOptions_AfterDeclaration */
var _typeSlideBackgroundFill = "SlideBackgroundFill";
/* Begin_PlaceHolder_SlideBackgroundFill_BeforeDeclaration */
/* End_PlaceHolder_SlideBackgroundFill_BeforeDeclaration */
/**
* Represents the fill formatting of a slide background object.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackgroundFill = /** @class */ (function (_super) {
__extends(SlideBackgroundFill, _super);
function SlideBackgroundFill() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackgroundFill.prototype, "_className", {
get: function () {
return "SlideBackgroundFill";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundFill.prototype, "_scalarPropertyNames", {
get: function () {
return ["type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundFill.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackgroundFill.prototype, "type", {
/* Begin_PlaceHolder_SlideBackgroundFill_Custom_Members */
/* End_PlaceHolder_SlideBackgroundFill_Custom_Members */
/**
* Returns the fill type of the slide background. See {@link PowerPoint.SlideBackgroundFillType} for details.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackgroundFill_Type_get */
/* End_PlaceHolder_SlideBackgroundFill_Type_get */
_throwIfNotLoaded("type", this._T, _typeSlideBackgroundFill, this._isNull);
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/**
* Gets the gradient fill properties. If the fill type is not `gradient`, 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.10]
*/
SlideBackgroundFill.prototype.getGradientFillOrNullObject = function () {
/* Begin_PlaceHolder_SlideBackgroundFill_GetGradientFillOrNullObject */
/* End_PlaceHolder_SlideBackgroundFill_GetGradientFillOrNullObject */
return _createMethodObject(PowerPoint.SlideBackgroundGradientFill, this, "GetGradientFillOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets the pattern fill properties. If the fill type is not `pattern`, 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.10]
*/
SlideBackgroundFill.prototype.getPatternFillOrNullObject = function () {
/* Begin_PlaceHolder_SlideBackgroundFill_GetPatternFillOrNullObject */
/* End_PlaceHolder_SlideBackgroundFill_GetPatternFillOrNullObject */
return _createMethodObject(PowerPoint.SlideBackgroundPatternFill, this, "GetPatternFillOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets the picture or texture fill properties. If the fill type is not `pictureOrTexture`, 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.10]
*/
SlideBackgroundFill.prototype.getPictureOrTextureFillOrNullObject = function () {
/* Begin_PlaceHolder_SlideBackgroundFill_GetPictureOrTextureFillOrNullObject */
/* End_PlaceHolder_SlideBackgroundFill_GetPictureOrTextureFillOrNullObject */
return _createMethodObject(PowerPoint.SlideBackgroundPictureOrTextureFill, this, "GetPictureOrTextureFillOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets the solid fill properties. If the fill type is not `solid`, 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.10]
*/
SlideBackgroundFill.prototype.getSolidFillOrNullObject = function () {
/* Begin_PlaceHolder_SlideBackgroundFill_GetSolidFillOrNullObject */
/* End_PlaceHolder_SlideBackgroundFill_GetSolidFillOrNullObject */
return _createMethodObject(PowerPoint.SlideBackgroundSolidFill, this, "GetSolidFillOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Sets the fill formatting of the slide background to a gradient fill. This changes the fill type to `gradient`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Options for the gradient fill.
*/
SlideBackgroundFill.prototype.setGradientFill = function (options) {
/* Begin_PlaceHolder_SlideBackgroundFill_SetGradientFill */
/* End_PlaceHolder_SlideBackgroundFill_SetGradientFill */
_invokeMethod(this, "SetGradientFill", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/**
* Sets the fill formatting of the slide background to a pattern fill. This changes the fill type to `pattern`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Options for the pattern fill.
*/
SlideBackgroundFill.prototype.setPatternFill = function (options) {
/* Begin_PlaceHolder_SlideBackgroundFill_SetPatternFill */
/* End_PlaceHolder_SlideBackgroundFill_SetPatternFill */
_invokeMethod(this, "SetPatternFill", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/**
* Sets the fill formatting of the slide background to a picture or texture fill. This changes the fill type to `pictureOrTexture`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Options for the picture or texture fill.
*/
SlideBackgroundFill.prototype.setPictureOrTextureFill = function (options) {
/* Begin_PlaceHolder_SlideBackgroundFill_SetPictureOrTextureFill */
/* End_PlaceHolder_SlideBackgroundFill_SetPictureOrTextureFill */
_invokeMethod(this, "SetPictureOrTextureFill", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/**
* Sets the fill formatting of the slide background to a solid fill. This changes the fill type to `solid`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Options for the solid fill.
*/
SlideBackgroundFill.prototype.setSolidFill = function (options) {
/* Begin_PlaceHolder_SlideBackgroundFill_SetSolidFill */
/* End_PlaceHolder_SlideBackgroundFill_SetSolidFill */
_invokeMethod(this, "SetSolidFill", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideBackgroundFill.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackgroundFill_HandleResult */
/* End_PlaceHolder_SlideBackgroundFill_HandleResult */
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_SlideBackgroundFill_HandleResult_Prop_Type */
/* End_PlaceHolder_SlideBackgroundFill_HandleResult_Prop_Type */
}
};
SlideBackgroundFill.prototype.load = function (options) {
return _load(this, options);
};
SlideBackgroundFill.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackgroundFill.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackgroundFill_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackgroundFill_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackgroundFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundFillData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackgroundFill.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackgroundFill.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackgroundFill.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackgroundFill;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackgroundFill = SlideBackgroundFill;
/* Begin_PlaceHolder_SlideBackgroundFill_AfterDeclaration */
/* End_PlaceHolder_SlideBackgroundFill_AfterDeclaration */
var _typeSlideBackground = "SlideBackground";
/* Begin_PlaceHolder_SlideBackground_BeforeDeclaration */
/* End_PlaceHolder_SlideBackground_BeforeDeclaration */
/**
* Represents a background of a slide.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideBackground = /** @class */ (function (_super) {
__extends(SlideBackground, _super);
function SlideBackground() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideBackground.prototype, "_className", {
get: function () {
return "SlideBackground";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "_scalarPropertyNames", {
get: function () {
return ["areBackgroundGraphicsHidden", "isMasterBackgroundFollowed"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["AreBackgroundGraphicsHidden", "IsMasterBackgroundFollowed"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "_navigationPropertyNames", {
get: function () {
return ["fill"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "fill", {
/* Begin_PlaceHolder_SlideBackground_Custom_Members */
/* End_PlaceHolder_SlideBackground_Custom_Members */
/**
* Returns the fill formatting of the background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackground_Fill_get */
/* End_PlaceHolder_SlideBackground_Fill_get */
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.SlideBackgroundFill, this, "Fill", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideBackground_Fill_get_post */
/* End_PlaceHolder_SlideBackground_Fill_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "areBackgroundGraphicsHidden", {
/**
* Specifies whether the slide layout background fill hides or displays background graphic objects from the slide master.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackground_AreBackgroundGraphicsHidden_get */
/* End_PlaceHolder_SlideBackground_AreBackgroundGraphicsHidden_get */
_throwIfNotLoaded("areBackgroundGraphicsHidden", this._A, _typeSlideBackground, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackground_AreBackgroundGraphicsHidden_set */
/* End_PlaceHolder_SlideBackground_AreBackgroundGraphicsHidden_set */
this._A = value;
_invokeSetProperty(this, "AreBackgroundGraphicsHidden", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideBackground.prototype, "isMasterBackgroundFollowed", {
/**
* Specifies if the slide background follows the slide master background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideBackground_IsMasterBackgroundFollowed_get */
/* End_PlaceHolder_SlideBackground_IsMasterBackgroundFollowed_get */
_throwIfNotLoaded("isMasterBackgroundFollowed", this._I, _typeSlideBackground, this._isNull);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_SlideBackground_IsMasterBackgroundFollowed_set */
/* End_PlaceHolder_SlideBackground_IsMasterBackgroundFollowed_set */
this._I = value;
_invokeSetProperty(this, "IsMasterBackgroundFollowed", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "areBackgroundGraphicsHidden" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "fill" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "isMasterBackgroundFollowed" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Resets the fill formatting of the slide background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideBackground.prototype.reset = function () {
/* Begin_PlaceHolder_SlideBackground_Reset */
/* End_PlaceHolder_SlideBackground_Reset */
_invokeMethod(this, "Reset", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideBackground.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideBackground_HandleResult */
/* End_PlaceHolder_SlideBackground_HandleResult */
if (!_isUndefined(obj["AreBackgroundGraphicsHidden"])) {
this._A = obj["AreBackgroundGraphicsHidden"];
/* Begin_PlaceHolder_SlideBackground_HandleResult_Prop_AreBackgroundGraphicsHidden */
/* End_PlaceHolder_SlideBackground_HandleResult_Prop_AreBackgroundGraphicsHidden */
}
if (!_isUndefined(obj["IsMasterBackgroundFollowed"])) {
this._I = obj["IsMasterBackgroundFollowed"];
/* Begin_PlaceHolder_SlideBackground_HandleResult_Prop_IsMasterBackgroundFollowed */
/* End_PlaceHolder_SlideBackground_HandleResult_Prop_IsMasterBackgroundFollowed */
}
_handleNavigationPropertyResults(this, obj, ["fill", "Fill"]);
};
SlideBackground.prototype.load = function (options) {
return _load(this, options);
};
SlideBackground.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideBackground.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideBackground_HandleRetrieveResult */
/* End_PlaceHolder_SlideBackground_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideBackground` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideBackgroundData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideBackground.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideBackground.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideBackground.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideBackground;
}(OfficeExtension.ClientObject));
PowerPoint.SlideBackground = SlideBackground;
/* Begin_PlaceHolder_SlideGetImageOptions_AfterDeclaration */
/* End_PlaceHolder_SlideGetImageOptions_AfterDeclaration */
var _typeSlideLayoutBackground = "SlideLayoutBackground";
/* Begin_PlaceHolder_SlideLayoutBackground_BeforeDeclaration */
/* End_PlaceHolder_SlideLayoutBackground_BeforeDeclaration */
/**
* Represents the background of a slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideLayoutBackground = /** @class */ (function (_super) {
__extends(SlideLayoutBackground, _super);
function SlideLayoutBackground() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideLayoutBackground.prototype, "_className", {
get: function () {
return "SlideLayoutBackground";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "_scalarPropertyNames", {
get: function () {
return ["areBackgroundGraphicsHidden", "isMasterBackgroundFollowed"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["AreBackgroundGraphicsHidden", "IsMasterBackgroundFollowed"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "_navigationPropertyNames", {
get: function () {
return ["fill"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "fill", {
/* Begin_PlaceHolder_SlideLayoutBackground_Custom_Members */
/* End_PlaceHolder_SlideLayoutBackground_Custom_Members */
/**
* Returns the fill formatting of the background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayoutBackground_Fill_get */
/* End_PlaceHolder_SlideLayoutBackground_Fill_get */
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.SlideBackgroundFill, this, "Fill", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideLayoutBackground_Fill_get_post */
/* End_PlaceHolder_SlideLayoutBackground_Fill_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "areBackgroundGraphicsHidden", {
/**
* Specifies whether the slide layout background fill hides or displays background graphic objects from the slide master.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayoutBackground_AreBackgroundGraphicsHidden_get */
/* End_PlaceHolder_SlideLayoutBackground_AreBackgroundGraphicsHidden_get */
_throwIfNotLoaded("areBackgroundGraphicsHidden", this._A, _typeSlideLayoutBackground, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_SlideLayoutBackground_AreBackgroundGraphicsHidden_set */
/* End_PlaceHolder_SlideLayoutBackground_AreBackgroundGraphicsHidden_set */
this._A = value;
_invokeSetProperty(this, "AreBackgroundGraphicsHidden", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutBackground.prototype, "isMasterBackgroundFollowed", {
/**
* Specifies if the slide layout background follows the slide master background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayoutBackground_IsMasterBackgroundFollowed_get */
/* End_PlaceHolder_SlideLayoutBackground_IsMasterBackgroundFollowed_get */
_throwIfNotLoaded("isMasterBackgroundFollowed", this._I, _typeSlideLayoutBackground, this._isNull);
return this._I;
},
set: function (value) {
/* Begin_PlaceHolder_SlideLayoutBackground_IsMasterBackgroundFollowed_set */
/* End_PlaceHolder_SlideLayoutBackground_IsMasterBackgroundFollowed_set */
this._I = value;
_invokeSetProperty(this, "IsMasterBackgroundFollowed", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "areBackgroundGraphicsHidden" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "fill" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "isMasterBackgroundFollowed" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Resets the fill formatting of the slide layout background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
SlideLayoutBackground.prototype.reset = function () {
/* Begin_PlaceHolder_SlideLayoutBackground_Reset */
/* End_PlaceHolder_SlideLayoutBackground_Reset */
_invokeMethod(this, "Reset", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideLayoutBackground.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideLayoutBackground_HandleResult */
/* End_PlaceHolder_SlideLayoutBackground_HandleResult */
if (!_isUndefined(obj["AreBackgroundGraphicsHidden"])) {
this._A = obj["AreBackgroundGraphicsHidden"];
/* Begin_PlaceHolder_SlideLayoutBackground_HandleResult_Prop_AreBackgroundGraphicsHidden */
/* End_PlaceHolder_SlideLayoutBackground_HandleResult_Prop_AreBackgroundGraphicsHidden */
}
if (!_isUndefined(obj["IsMasterBackgroundFollowed"])) {
this._I = obj["IsMasterBackgroundFollowed"];
/* Begin_PlaceHolder_SlideLayoutBackground_HandleResult_Prop_IsMasterBackgroundFollowed */
/* End_PlaceHolder_SlideLayoutBackground_HandleResult_Prop_IsMasterBackgroundFollowed */
}
_handleNavigationPropertyResults(this, obj, ["fill", "Fill"]);
};
SlideLayoutBackground.prototype.load = function (options) {
return _load(this, options);
};
SlideLayoutBackground.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideLayoutBackground.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideLayoutBackground_HandleRetrieveResult */
/* End_PlaceHolder_SlideLayoutBackground_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideLayoutBackground` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideLayoutBackgroundData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideLayoutBackground.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideLayoutBackground.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideLayoutBackground.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideLayoutBackground;
}(OfficeExtension.ClientObject));
PowerPoint.SlideLayoutBackground = SlideLayoutBackground;
/* Begin_PlaceHolder_SlideLayoutBackground_AfterDeclaration */
/* End_PlaceHolder_SlideLayoutBackground_AfterDeclaration */
/* Begin_PlaceHolder_SlideLayoutType_BeforeDeclaration */
/* End_PlaceHolder_SlideLayoutType_BeforeDeclaration */
/**
* Specifies the type of a slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var SlideLayoutType;
(function (SlideLayoutType) {
/**
* Blank layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["blank"] = "Blank";
/**
* Chart layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["chart"] = "Chart";
/**
* Chart and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["chartAndText"] = "ChartAndText";
/**
* ClipArt and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["clipArtAndText"] = "ClipArtAndText";
/**
* ClipArt and vertical text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["clipArtAndVerticalText"] = "ClipArtAndVerticalText";
/**
* Comparison layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["comparison"] = "Comparison";
/**
* Content with caption layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["contentWithCaption"] = "ContentWithCaption";
/**
* Custom layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["custom"] = "Custom";
/**
* Four objects layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["fourObjects"] = "FourObjects";
/**
* Large object layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["largeObject"] = "LargeObject";
/**
* MediaClip and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["mediaClipAndText"] = "MediaClipAndText";
/**
* Mixed layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["mixed"] = "Mixed";
/**
* Object layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["object"] = "Object";
/**
* Object and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["objectAndText"] = "ObjectAndText";
/**
* Object and two objects layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["objectAndTwoObjects"] = "ObjectAndTwoObjects";
/**
* Object over text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["objectOverText"] = "ObjectOverText";
/**
* Organization chart layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["organizationChart"] = "OrganizationChart";
/**
* Picture with caption layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["pictureWithCaption"] = "PictureWithCaption";
/**
* Section header layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["sectionHeader"] = "SectionHeader";
/**
* Table layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["table"] = "Table";
/**
* Text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["text"] = "Text";
/**
* Text and chart layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textAndChart"] = "TextAndChart";
/**
* Text and ClipArt layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textAndClipArt"] = "TextAndClipArt";
/**
* Text and MediaClip layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textAndMediaClip"] = "TextAndMediaClip";
/**
* Text and object layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textAndObject"] = "TextAndObject";
/**
* Text and two objects layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textAndTwoObjects"] = "TextAndTwoObjects";
/**
* Text over object layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["textOverObject"] = "TextOverObject";
/**
* Title layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["title"] = "Title";
/**
* Title only layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["titleOnly"] = "TitleOnly";
/**
* Two-column text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["twoColumnText"] = "TwoColumnText";
/**
* Two objects layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["twoObjects"] = "TwoObjects";
/**
* Two objects and object layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["twoObjectsAndObject"] = "TwoObjectsAndObject";
/**
* Two objects and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["twoObjectsAndText"] = "TwoObjectsAndText";
/**
* Two objects over text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["twoObjectsOverText"] = "TwoObjectsOverText";
/**
* Vertical text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["verticalText"] = "VerticalText";
/**
* Vertical title and text layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["verticalTitleAndText"] = "VerticalTitleAndText";
/**
* Vertical title and text over chart layout.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
SlideLayoutType["verticalTitleAndTextOverChart"] = "VerticalTitleAndTextOverChart";
})(SlideLayoutType = PowerPoint.SlideLayoutType || (PowerPoint.SlideLayoutType = {}));
/* Begin_PlaceHolder_SlideLayoutType_AfterDeclaration */
/* End_PlaceHolder_SlideLayoutType_AfterDeclaration */
/* Begin_PlaceHolder_ThemeColor_BeforeDeclaration */
/* End_PlaceHolder_ThemeColor_BeforeDeclaration */
/**
* Specifies the theme colors used in PowerPoint.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var ThemeColor;
(function (ThemeColor) {
/**
* Specifies a mixed theme color.
Not applicable as input to {@link PowerPoint.ThemeColorScheme | ThemeColorScheme.getThemeColor} nor {@link PowerPoint.ThemeColorScheme| ThemeColorScheme.setThemeColor}.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["mixed"] = "Mixed";
/**
* Specifies no theme color.
Not applicable as input to {@link PowerPoint.ThemeColorScheme | ThemeColorScheme.getThemeColor} nor {@link PowerPoint.ThemeColorScheme| ThemeColorScheme.setThemeColor}.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["none"] = "None";
/**
* Specifies the Accent 1 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent1"] = "Accent1";
/**
* Specifies the Accent 2 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent2"] = "Accent2";
/**
* Specifies the Accent 3 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent3"] = "Accent3";
/**
* Specifies the Accent 4 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent4"] = "Accent4";
/**
* Specifies the Accent 5 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent5"] = "Accent5";
/**
* Specifies the Accent 6 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["accent6"] = "Accent6";
/**
* Specifies the Dark 1 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["dark1"] = "Dark1";
/**
* Specifies the Dark 2 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["dark2"] = "Dark2";
/**
* Specifies the clicked hyperlink theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["followedHyperlink"] = "FollowedHyperlink";
/**
* Specifies the hyperlink theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["hyperlink"] = "Hyperlink";
/**
* Specifies the Light 1 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["light1"] = "Light1";
/**
* Specifies the Light 2 theme color.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ThemeColor["light2"] = "Light2";
})(ThemeColor = PowerPoint.ThemeColor || (PowerPoint.ThemeColor = {}));
/* Begin_PlaceHolder_ThemeColor_AfterDeclaration */
/* End_PlaceHolder_ThemeColor_AfterDeclaration */
var _typeThemeColorScheme = "ThemeColorScheme";
/* Begin_PlaceHolder_ThemeColorScheme_BeforeDeclaration */
/* End_PlaceHolder_ThemeColorScheme_BeforeDeclaration */
/**
* Represents a theme color scheme.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var ThemeColorScheme = /** @class */ (function (_super) {
__extends(ThemeColorScheme, _super);
function ThemeColorScheme() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ThemeColorScheme.prototype, "_className", {
get: function () {
return "ThemeColorScheme";
},
enumerable: true,
configurable: true
});
/**
* Gets the color value for the specified `ThemeColor`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param color The theme color. The values `none` and `mixed` are invalid for this API.
* @returns The color value in #RRGGBB format (e.g., "FFA500").
*/
ThemeColorScheme.prototype.getThemeColor = function (color) {
/* Begin_PlaceHolder_ThemeColorScheme_GetThemeColor */
/* End_PlaceHolder_ThemeColorScheme_GetThemeColor */
return _invokeMethod(this, "GetThemeColor", 1 /* Read */, [color], 4 /* concurrent */, 0 /* none */);
};
/**
* Sets the color value for the specified `ThemeColor`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param color The theme color. The values `none` and `mixed` are invalid for this API.
* @param rgbColor The color value in #RRGGBB format (e.g., "FFA500") or as a named HTML color (e.g., "orange").
*/
ThemeColorScheme.prototype.setThemeColor = function (color, rgbColor) {
/* Begin_PlaceHolder_ThemeColorScheme_SetThemeColor */
/* End_PlaceHolder_ThemeColorScheme_SetThemeColor */
_invokeMethod(this, "SetThemeColor", 0 /* Default */, [color, rgbColor], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
ThemeColorScheme.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ThemeColorScheme_HandleResult */
/* End_PlaceHolder_ThemeColorScheme_HandleResult */
};
/** Handle retrieve results
* @private
*/
ThemeColorScheme.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ThemeColorScheme_HandleRetrieveResult */
/* End_PlaceHolder_ThemeColorScheme_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.ThemeColorScheme` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ThemeColorSchemeData`) that contains shallow copies of any loaded child properties from the original object.
*/
ThemeColorScheme.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
return ThemeColorScheme;
}(OfficeExtension.ClientObject));
PowerPoint.ThemeColorScheme = ThemeColorScheme;
/* Begin_PlaceHolder_ThemeColorScheme_AfterDeclaration */
/* End_PlaceHolder_ThemeColorScheme_AfterDeclaration */
var _typeSlideLayout = "SlideLayout";
/* Begin_PlaceHolder_SlideLayout_BeforeDeclaration */
/* End_PlaceHolder_SlideLayout_BeforeDeclaration */
/**
* Represents the layout of a slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var SlideLayout = /** @class */ (function (_super) {
__extends(SlideLayout, _super);
function SlideLayout() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideLayout.prototype, "_className", {
get: function () {
return "SlideLayout";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "name", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "Name", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "_navigationPropertyNames", {
get: function () {
return ["shapes", "customXmlParts", "background", "themeColorScheme"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "background", {
/* Begin_PlaceHolder_SlideLayout_Custom_Members */
/* End_PlaceHolder_SlideLayout_Custom_Members */
/**
* Gets the background of the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_Background_get */
/* End_PlaceHolder_SlideLayout_Background_get */
_throwIfApiNotSupported("SlideLayout.background", _defaultApiSetName, "1.10", _hostName);
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.SlideLayoutBackground, this, "Background", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideLayout_Background_get_post */
/* End_PlaceHolder_SlideLayout_Background_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "customXmlParts", {
/**
* Returns a collection of custom XML parts in the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_CustomXmlParts_get */
/* End_PlaceHolder_SlideLayout_CustomXmlParts_get */
_throwIfApiNotSupported("SlideLayout.customXmlParts", _defaultApiSetName, "1.7", _hostName);
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.CustomXmlPartCollection, this, "CustomXmlParts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideLayout_CustomXmlParts_get_post */
/* End_PlaceHolder_SlideLayout_CustomXmlParts_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "shapes", {
/**
* Returns a collection of shapes in the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_Shapes_get */
/* End_PlaceHolder_SlideLayout_Shapes_get */
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.ShapeCollection, this, "Shapes", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideLayout_Shapes_get_post */
/* End_PlaceHolder_SlideLayout_Shapes_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "themeColorScheme", {
/**
* Returns the `ThemeColorScheme` of the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_ThemeColorScheme_get */
/* End_PlaceHolder_SlideLayout_ThemeColorScheme_get */
_throwIfApiNotSupported("SlideLayout.themeColorScheme", _defaultApiSetName, "1.10", _hostName);
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.ThemeColorScheme, this, "ThemeColorScheme", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideLayout_ThemeColorScheme_get_post */
/* End_PlaceHolder_SlideLayout_ThemeColorScheme_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "id", {
/**
* Gets the unique ID of the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_Id_get */
/* End_PlaceHolder_SlideLayout_Id_get */
_throwIfNotLoaded("id", this._I, _typeSlideLayout, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "name", {
/**
* Gets the name of the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_Name_get */
/* End_PlaceHolder_SlideLayout_Name_get */
_throwIfNotLoaded("name", this._N, _typeSlideLayout, this._isNull);
return this._N;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayout.prototype, "type", {
/**
* Returns the type of the slide layout.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_SlideLayout_Type_get */
/* End_PlaceHolder_SlideLayout_Type_get */
_throwIfNotLoaded("type", this._Ty, _typeSlideLayout, this._isNull);
_throwIfApiNotSupported("SlideLayout.type", _defaultApiSetName, "1.8", _hostName);
return this._Ty;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "background" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "customXmlParts" /* COLLECTION; Collections may not have a "SET" method */,
// * "shapes" /* COLLECTION; Collections may not have a "SET" method */,
// * "themeColorScheme" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/**
* Deletes the slide layout from the presentation. Does nothing if the slide layout doesn't exist.
Throws the `GeneralException` error if the slide layout is in use.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SlideLayout.prototype.delete = function () {
/* Begin_PlaceHolder_SlideLayout_Delete */
/* End_PlaceHolder_SlideLayout_Delete */
_throwIfApiNotSupported("SlideLayout.delete", _defaultApiSetName, "1.11", _hostName);
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideLayout.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideLayout_HandleResult */
/* End_PlaceHolder_SlideLayout_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_SlideLayout_HandleResult_Prop_Id */
/* End_PlaceHolder_SlideLayout_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Name"])) {
this._N = obj["Name"];
/* Begin_PlaceHolder_SlideLayout_HandleResult_Prop_Name */
/* End_PlaceHolder_SlideLayout_HandleResult_Prop_Name */
}
if (!_isUndefined(obj["Type"])) {
this._Ty = obj["Type"];
/* Begin_PlaceHolder_SlideLayout_HandleResult_Prop_Type */
/* End_PlaceHolder_SlideLayout_HandleResult_Prop_Type */
}
_handleNavigationPropertyResults(this, obj, ["background", "Background", "customXmlParts", "CustomXmlParts", "shapes", "Shapes", "themeColorScheme", "ThemeColorScheme"]);
};
SlideLayout.prototype.load = function (options) {
return _load(this, options);
};
SlideLayout.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
SlideLayout.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_SlideLayout_HandleIdResult_Prop_Id */
/* End_PlaceHolder_SlideLayout_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
SlideLayout.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideLayout_HandleRetrieveResult */
/* End_PlaceHolder_SlideLayout_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideLayout.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideLayout.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideLayout.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideLayout;
}(OfficeExtension.ClientObject));
PowerPoint.SlideLayout = SlideLayout;
/* Begin_PlaceHolder_SlideLayout_AfterDeclaration */
/* End_PlaceHolder_SlideLayout_AfterDeclaration */
var _typeSlideLayoutCollection = "SlideLayoutCollection";
/* Begin_PlaceHolder_SlideLayoutCollection_BeforeDeclaration */
/* End_PlaceHolder_SlideLayoutCollection_BeforeDeclaration */
/**
* Represents the collection of layouts provided by the Slide Master for slides.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var SlideLayoutCollection = /** @class */ (function (_super) {
__extends(SlideLayoutCollection, _super);
function SlideLayoutCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideLayoutCollection.prototype, "_className", {
get: function () {
return "SlideLayoutCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideLayoutCollection.prototype, "items", {
/* Begin_PlaceHolder_SlideLayoutCollection_Custom_Members */
/* End_PlaceHolder_SlideLayoutCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_SlideLayoutCollection_items */
/* End_PlaceHolder_SlideLayoutCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeSlideLayoutCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because SlideLayoutCollection is a collection.
/**
* Gets the number of layouts in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.3]
* @returns The number of layouts in the collection.
*/
SlideLayoutCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_SlideLayoutCollection_GetCount */
/* End_PlaceHolder_SlideLayoutCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* 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 doesn't exist, an error is thrown.
*/
SlideLayoutCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_SlideLayoutCollection_GetItem */
/* End_PlaceHolder_SlideLayoutCollection_GetItem */
return _createIndexerObject(PowerPoint.SlideLayout, this, [key]);
};
/**
* 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.
*/
SlideLayoutCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_SlideLayoutCollection_GetItemAt */
/* End_PlaceHolder_SlideLayoutCollection_GetItemAt */
return _createMethodObject(PowerPoint.SlideLayout, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a layout using its unique ID. If such a layout doesn't 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.
*/
SlideLayoutCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_SlideLayoutCollection_GetItemOrNullObject */
/* End_PlaceHolder_SlideLayoutCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.SlideLayout, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideLayoutCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideLayoutCollection_HandleResult */
/* End_PlaceHolder_SlideLayoutCollection_HandleResult */
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(PowerPoint.SlideLayout, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
SlideLayoutCollection.prototype.load = function (options) {
return _load(this, options);
};
SlideLayoutCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideLayoutCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideLayoutCollection_HandleRetrieveResult */
/* End_PlaceHolder_SlideLayoutCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.SlideLayout, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideLayoutCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
SlideLayoutCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.SlideLayout, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return SlideLayoutCollection;
}(OfficeExtension.ClientObject));
PowerPoint.SlideLayoutCollection = SlideLayoutCollection;
/* Begin_PlaceHolder_SlideLayoutCollection_AfterDeclaration */
/* End_PlaceHolder_SlideLayoutCollection_AfterDeclaration */
var _typeSlideMasterBackground = "SlideMasterBackground";
/* Begin_PlaceHolder_SlideMasterBackground_BeforeDeclaration */
/* End_PlaceHolder_SlideMasterBackground_BeforeDeclaration */
/**
* Represents the background of a slide master.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var SlideMasterBackground = /** @class */ (function (_super) {
__extends(SlideMasterBackground, _super);
function SlideMasterBackground() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideMasterBackground.prototype, "_className", {
get: function () {
return "SlideMasterBackground";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMasterBackground.prototype, "_navigationPropertyNames", {
get: function () {
return ["fill"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMasterBackground.prototype, "fill", {
/* Begin_PlaceHolder_SlideMasterBackground_Custom_Members */
/* End_PlaceHolder_SlideMasterBackground_Custom_Members */
/**
* Returns the fill formatting of the background.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideMasterBackground_Fill_get */
/* End_PlaceHolder_SlideMasterBackground_Fill_get */
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.SlideBackgroundFill, this, "Fill", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMasterBackground_Fill_get_post */
/* End_PlaceHolder_SlideMasterBackground_Fill_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "fill" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
SlideMasterBackground.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideMasterBackground_HandleResult */
/* End_PlaceHolder_SlideMasterBackground_HandleResult */
_handleNavigationPropertyResults(this, obj, ["fill", "Fill"]);
};
SlideMasterBackground.prototype.load = function (options) {
return _load(this, options);
};
SlideMasterBackground.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideMasterBackground.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideMasterBackground_HandleRetrieveResult */
/* End_PlaceHolder_SlideMasterBackground_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SlideMasterBackground` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SlideMasterBackgroundData`) that contains shallow copies of any loaded child properties from the original object.
*/
SlideMasterBackground.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideMasterBackground.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideMasterBackground.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideMasterBackground;
}(OfficeExtension.ClientObject));
PowerPoint.SlideMasterBackground = SlideMasterBackground;
/* Begin_PlaceHolder_SlideMasterBackground_AfterDeclaration */
/* End_PlaceHolder_SlideMasterBackground_AfterDeclaration */
var _typeSlideMaster = "SlideMaster";
/* Begin_PlaceHolder_SlideMaster_BeforeDeclaration */
/* End_PlaceHolder_SlideMaster_BeforeDeclaration */
/**
* Represents the Slide Master of a slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var SlideMaster = /** @class */ (function (_super) {
__extends(SlideMaster, _super);
function SlideMaster() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideMaster.prototype, "_className", {
get: function () {
return "SlideMaster";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "name"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "Name"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "_navigationPropertyNames", {
get: function () {
return ["layouts", "shapes", "customXmlParts", "background", "themeColorScheme"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "background", {
/* Begin_PlaceHolder_SlideMaster_Custom_Members */
/* End_PlaceHolder_SlideMaster_Custom_Members */
/**
* Gets the background of the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_Background_get */
/* End_PlaceHolder_SlideMaster_Background_get */
_throwIfApiNotSupported("SlideMaster.background", _defaultApiSetName, "1.10", _hostName);
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.SlideMasterBackground, this, "Background", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMaster_Background_get_post */
/* End_PlaceHolder_SlideMaster_Background_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "customXmlParts", {
/**
* Returns a collection of custom XML parts in the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_CustomXmlParts_get */
/* End_PlaceHolder_SlideMaster_CustomXmlParts_get */
_throwIfApiNotSupported("SlideMaster.customXmlParts", _defaultApiSetName, "1.7", _hostName);
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.CustomXmlPartCollection, this, "CustomXmlParts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMaster_CustomXmlParts_get_post */
/* End_PlaceHolder_SlideMaster_CustomXmlParts_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "layouts", {
/**
* Gets the collection of layouts provided by the Slide Master for slides.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_Layouts_get */
/* End_PlaceHolder_SlideMaster_Layouts_get */
if (!this._L) {
this._L = _createPropertyObject(PowerPoint.SlideLayoutCollection, this, "Layouts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMaster_Layouts_get_post */
/* End_PlaceHolder_SlideMaster_Layouts_get_post */
return this._L;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "shapes", {
/**
* Returns a collection of shapes in the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_Shapes_get */
/* End_PlaceHolder_SlideMaster_Shapes_get */
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.ShapeCollection, this, "Shapes", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMaster_Shapes_get_post */
/* End_PlaceHolder_SlideMaster_Shapes_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "themeColorScheme", {
/**
* Returns the `ThemeColorScheme` of the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_ThemeColorScheme_get */
/* End_PlaceHolder_SlideMaster_ThemeColorScheme_get */
_throwIfApiNotSupported("SlideMaster.themeColorScheme", _defaultApiSetName, "1.10", _hostName);
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.ThemeColorScheme, this, "ThemeColorScheme", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SlideMaster_ThemeColorScheme_get_post */
/* End_PlaceHolder_SlideMaster_ThemeColorScheme_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "id", {
/**
* Gets the unique ID of the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_Id_get */
/* End_PlaceHolder_SlideMaster_Id_get */
_throwIfNotLoaded("id", this._I, _typeSlideMaster, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMaster.prototype, "name", {
/**
* Gets the unique name of the Slide Master.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_SlideMaster_Name_get */
/* End_PlaceHolder_SlideMaster_Name_get */
_throwIfNotLoaded("name", this._N, _typeSlideMaster, this._isNull);
return this._N;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "background" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "customXmlParts" /* COLLECTION; Collections may not have a "SET" method */,
// * "layouts" /* COLLECTION; Collections may not have a "SET" method */,
// * "shapes" /* COLLECTION; Collections may not have a "SET" method */,
// * "themeColorScheme" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/**
* Deletes the slide master and all child layouts from the presentation. Does nothing if the slide master doesn't exist.
Throws the `GeneralException` error if the slide master is in use.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SlideMaster.prototype.delete = function () {
/* Begin_PlaceHolder_SlideMaster_Delete */
/* End_PlaceHolder_SlideMaster_Delete */
_throwIfApiNotSupported("SlideMaster.delete", _defaultApiSetName, "1.11", _hostName);
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideMaster.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideMaster_HandleResult */
/* End_PlaceHolder_SlideMaster_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_SlideMaster_HandleResult_Prop_Id */
/* End_PlaceHolder_SlideMaster_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Name"])) {
this._N = obj["Name"];
/* Begin_PlaceHolder_SlideMaster_HandleResult_Prop_Name */
/* End_PlaceHolder_SlideMaster_HandleResult_Prop_Name */
}
_handleNavigationPropertyResults(this, obj, ["background", "Background", "customXmlParts", "CustomXmlParts", "layouts", "Layouts", "shapes", "Shapes", "themeColorScheme", "ThemeColorScheme"]);
};
SlideMaster.prototype.load = function (options) {
return _load(this, options);
};
SlideMaster.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
SlideMaster.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_SlideMaster_HandleIdResult_Prop_Id */
/* End_PlaceHolder_SlideMaster_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
SlideMaster.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideMaster_HandleRetrieveResult */
/* End_PlaceHolder_SlideMaster_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideMaster.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
SlideMaster.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SlideMaster.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SlideMaster;
}(OfficeExtension.ClientObject));
PowerPoint.SlideMaster = SlideMaster;
/* Begin_PlaceHolder_SlideMaster_AfterDeclaration */
/* End_PlaceHolder_SlideMaster_AfterDeclaration */
var _typeTag = "Tag";
/* Begin_PlaceHolder_Tag_BeforeDeclaration */
/* End_PlaceHolder_Tag_BeforeDeclaration */
/**
* Represents a single tag in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var Tag = /** @class */ (function (_super) {
__extends(Tag, _super);
function Tag() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Tag.prototype, "_className", {
get: function () {
return "Tag";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Tag.prototype, "_scalarPropertyNames", {
get: function () {
return ["key", "value"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Tag.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Key", "Value"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Tag.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Tag.prototype, "key", {
/* Begin_PlaceHolder_Tag_Custom_Members */
/* End_PlaceHolder_Tag_Custom_Members */
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_Tag_Key_get */
/* End_PlaceHolder_Tag_Key_get */
_throwIfNotLoaded("key", this._K, _typeTag, this._isNull);
return this._K;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Tag.prototype, "value", {
/**
* Gets the value of the tag.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Tag_Value_get */
/* End_PlaceHolder_Tag_Value_get */
_throwIfNotLoaded("value", this._V, _typeTag, this._isNull);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_Tag_Value_set */
/* End_PlaceHolder_Tag_Value_set */
this._V = value;
_invokeSetProperty(this, "Value", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "value" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
Tag.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Tag_HandleResult */
/* End_PlaceHolder_Tag_HandleResult */
if (!_isUndefined(obj["Key"])) {
this._K = obj["Key"];
/* Begin_PlaceHolder_Tag_HandleResult_Prop_Key */
/* End_PlaceHolder_Tag_HandleResult_Prop_Key */
}
if (!_isUndefined(obj["Value"])) {
this._V = obj["Value"];
/* Begin_PlaceHolder_Tag_HandleResult_Prop_Value */
/* End_PlaceHolder_Tag_HandleResult_Prop_Value */
}
};
Tag.prototype.load = function (options) {
return _load(this, options);
};
Tag.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Tag.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Tag_HandleRetrieveResult */
/* End_PlaceHolder_Tag_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
Tag.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Tag.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Tag.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Tag;
}(OfficeExtension.ClientObject));
PowerPoint.Tag = Tag;
/* Begin_PlaceHolder_Tag_AfterDeclaration */
/* End_PlaceHolder_Tag_AfterDeclaration */
var _typeTagCollection = "TagCollection";
/* Begin_PlaceHolder_TagCollection_BeforeDeclaration */
/* End_PlaceHolder_TagCollection_BeforeDeclaration */
/**
* Represents the collection of tags.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var TagCollection = /** @class */ (function (_super) {
__extends(TagCollection, _super);
function TagCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(TagCollection.prototype, "_className", {
get: function () {
return "TagCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(TagCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TagCollection.prototype, "items", {
/* Begin_PlaceHolder_TagCollection_Custom_Members */
/* End_PlaceHolder_TagCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_TagCollection_items */
/* End_PlaceHolder_TagCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeTagCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because TagCollection is a collection.
/**
* 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's always capitalized when saved in the document.
* @param value The value of the tag.
*/
TagCollection.prototype.add = function (key, value) {
/* Begin_PlaceHolder_TagCollection_Add */
/* End_PlaceHolder_TagCollection_Add */
_invokeMethod(this, "Add", 0 /* Default */, [key, value], 0 /* none */, 0 /* none */);
};
/**
* Deletes the tag with the given `key` in this collection. Does nothing if the `key` doesn't 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.
*/
TagCollection.prototype.delete = function (key) {
/* Begin_PlaceHolder_TagCollection_Delete */
/* End_PlaceHolder_TagCollection_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [key], 0 /* none */, 0 /* none */);
};
/**
* Gets the number of tags in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.3]
* @returns The number of tags in the collection.
*/
TagCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_TagCollection_GetCount */
/* End_PlaceHolder_TagCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a tag using its unique ID. An error is thrown if the tag doesn't 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 doesn't exist, an error is thrown.
*/
TagCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_TagCollection_GetItem */
/* End_PlaceHolder_TagCollection_GetItem */
return _createIndexerObject(PowerPoint.Tag, this, [key]);
};
/**
* 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.
*/
TagCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_TagCollection_GetItemAt */
/* End_PlaceHolder_TagCollection_GetItemAt */
return _createMethodObject(PowerPoint.Tag, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a tag using its unique ID. If such a tag doesn't 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 key The ID of the tag.
* @returns The tag with the unique ID. If such a tag doesn't exist, an object with an `isNullObject` property set to true is returned.
*/
TagCollection.prototype.getItemOrNullObject = function (key) {
/* Begin_PlaceHolder_TagCollection_GetItemOrNullObject */
/* End_PlaceHolder_TagCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Tag, this, "GetItemOrNullObject", 0 /* Default */, [key], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
TagCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_TagCollection_HandleResult */
/* End_PlaceHolder_TagCollection_HandleResult */
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(PowerPoint.Tag, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
TagCollection.prototype.load = function (options) {
return _load(this, options);
};
TagCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
TagCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_TagCollection_HandleRetrieveResult */
/* End_PlaceHolder_TagCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Tag, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
TagCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
TagCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Tag, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return TagCollection;
}(OfficeExtension.ClientObject));
PowerPoint.TagCollection = TagCollection;
/* Begin_PlaceHolder_TagCollection_AfterDeclaration */
/* End_PlaceHolder_TagCollection_AfterDeclaration */
var _typeSlide = "Slide";
/* Begin_PlaceHolder_Slide_BeforeDeclaration */
/* End_PlaceHolder_Slide_BeforeDeclaration */
/**
* Represents a single slide of a presentation.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
var Slide = /** @class */ (function (_super) {
__extends(Slide, _super);
function Slide() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Slide.prototype, "_className", {
get: function () {
return "Slide";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "index"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "Index"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "_navigationPropertyNames", {
get: function () {
return ["background", "comments", "customXmlParts", "hyperlinks", "layout", "shapes", "slideMaster", "tags", "themeColorScheme", "tasks"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "background", {
/* Begin_PlaceHolder_Slide_Custom_Members */
/* End_PlaceHolder_Slide_Custom_Members */
/**
* Gets the background of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Background_get */
/* End_PlaceHolder_Slide_Background_get */
_throwIfApiNotSupported("Slide.background", _defaultApiSetName, "1.10", _hostName);
if (!this._B) {
this._B = _createPropertyObject(PowerPoint.SlideBackground, this, "Background", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Background_get_post */
/* End_PlaceHolder_Slide_Background_get_post */
return this._B;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "comments", {
/**
* Gets the collection of all comments on the slide.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Comments_get */
/* End_PlaceHolder_Slide_Comments_get */
_throwIfApiNotSupported("Slide.comments", _defaultApiSetName, "1.11", _hostName);
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.CommentCollection, this, "Comments", true /*isCollection*/, 1 /* restrictedResourceAccess */ | 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Comments_get_post */
/* End_PlaceHolder_Slide_Comments_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "customXmlParts", {
/**
* Returns a collection of custom XML parts in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_Slide_CustomXmlParts_get */
/* End_PlaceHolder_Slide_CustomXmlParts_get */
_throwIfApiNotSupported("Slide.customXmlParts", _defaultApiSetName, "1.7", _hostName);
if (!this._Cu) {
this._Cu = _createPropertyObject(PowerPoint.CustomXmlPartCollection, this, "CustomXmlParts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_CustomXmlParts_get_post */
/* End_PlaceHolder_Slide_CustomXmlParts_get_post */
return this._Cu;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "hyperlinks", {
/**
* Returns a collection of hyperlinks in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.6]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Hyperlinks_get */
/* End_PlaceHolder_Slide_Hyperlinks_get */
_throwIfApiNotSupported("Slide.hyperlinks", _defaultApiSetName, "1.6", _hostName);
if (!this._H) {
this._H = _createPropertyObject(PowerPoint.HyperlinkCollection, this, "Hyperlinks", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Hyperlinks_get_post */
/* End_PlaceHolder_Slide_Hyperlinks_get_post */
return this._H;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "layout", {
/**
* Gets the layout of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Layout_get */
/* End_PlaceHolder_Slide_Layout_get */
_throwIfApiNotSupported("Slide.layout", _defaultApiSetName, "1.3", _hostName);
if (!this._L) {
this._L = _createPropertyObject(PowerPoint.SlideLayout, this, "Layout", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Layout_get_post */
/* End_PlaceHolder_Slide_Layout_get_post */
return this._L;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "shapes", {
/**
* Returns a collection of shapes in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Shapes_get */
/* End_PlaceHolder_Slide_Shapes_get */
_throwIfApiNotSupported("Slide.shapes", _defaultApiSetName, "1.3", _hostName);
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.ShapeCollection, this, "Shapes", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Shapes_get_post */
/* End_PlaceHolder_Slide_Shapes_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "slideMaster", {
/**
* Gets the `SlideMaster` object that represents the slide's default content.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Slide_SlideMaster_get */
/* End_PlaceHolder_Slide_SlideMaster_get */
_throwIfApiNotSupported("Slide.slideMaster", _defaultApiSetName, "1.3", _hostName);
if (!this._Sl) {
this._Sl = _createPropertyObject(PowerPoint.SlideMaster, this, "SlideMaster", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_SlideMaster_get_post */
/* End_PlaceHolder_Slide_SlideMaster_get_post */
return this._Sl;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "tags", {
/**
* Returns a collection of tags in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Tags_get */
/* End_PlaceHolder_Slide_Tags_get */
_throwIfApiNotSupported("Slide.tags", _defaultApiSetName, "1.3", _hostName);
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.TagCollection, this, "Tags", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Tags_get_post */
/* End_PlaceHolder_Slide_Tags_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "tasks", {
/**
* Gets the collection of all tasks on the slide.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Tasks_get */
/* End_PlaceHolder_Slide_Tasks_get */
_throwIfApiNotSupported("Slide.tasks", _defaultApiSetName, "1.11", _hostName);
if (!this._Ta) {
this._Ta = _createPropertyObject(PowerPoint.DocumentTaskCollection, this, "Tasks", true /*isCollection*/, 1 /* restrictedResourceAccess */ | 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_Tasks_get_post */
/* End_PlaceHolder_Slide_Tasks_get_post */
return this._Ta;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "themeColorScheme", {
/**
* Returns the `ThemeColorScheme` of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Slide_ThemeColorScheme_get */
/* End_PlaceHolder_Slide_ThemeColorScheme_get */
_throwIfApiNotSupported("Slide.themeColorScheme", _defaultApiSetName, "1.10", _hostName);
if (!this._Th) {
this._Th = _createPropertyObject(PowerPoint.ThemeColorScheme, this, "ThemeColorScheme", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Slide_ThemeColorScheme_get_post */
/* End_PlaceHolder_Slide_ThemeColorScheme_get_post */
return this._Th;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "id", {
/**
* Gets the unique ID of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Id_get */
/* End_PlaceHolder_Slide_Id_get */
_throwIfNotLoaded("id", this._I, _typeSlide, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Slide.prototype, "index", {
/**
* Returns the zero-based index of the slide representing its position in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Slide_Index_get */
/* End_PlaceHolder_Slide_Index_get */
_throwIfNotLoaded("index", this._In, _typeSlide, this._isNull);
_throwIfApiNotSupported("Slide.index", _defaultApiSetName, "1.8", _hostName);
return this._In;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "background" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "comments" /* COLLECTION; Collections may not have a "SET" method */,
// * "customXmlParts" /* COLLECTION; Collections may not have a "SET" method */,
// * "hyperlinks" /* COLLECTION; Collections may not have a "SET" method */,
// * "layout" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "shapes" /* COLLECTION; Collections may not have a "SET" method */,
// * "slideMaster" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "tags" /* COLLECTION; Collections may not have a "SET" method */,
// * "tasks" /* COLLECTION; Collections may not have a "SET" method */,
// * "themeColorScheme" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */
/**
* Applies the specified layout to the slide, changing its design and structure according to the chosen layout.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param slideLayout The layout to be applied to the slide. This is typically an instance of a predefined layout from the slide master.
*/
Slide.prototype.applyLayout = function (slideLayout) {
/* Begin_PlaceHolder_Slide_ApplyLayout */
/* End_PlaceHolder_Slide_ApplyLayout */
_throwIfApiNotSupported("Slide.applyLayout", _defaultApiSetName, "1.8", _hostName);
_invokeMethod(this, "ApplyLayout", 0 /* Default */, [slideLayout], 0 /* none */, 0 /* none */);
};
/**
* Deletes the slide from the presentation. Does nothing if the slide doesn't exist.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
Slide.prototype.delete = function () {
/* Begin_PlaceHolder_Slide_Delete */
/* End_PlaceHolder_Slide_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Exports the slide to its own presentation file, returned as Base64-encoded data.
Note: This method is optimized to export a single slide. Exporting multiple slides can impact performance.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
Slide.prototype.exportAsBase64 = function () {
/* Begin_PlaceHolder_Slide_ExportAsBase64 */
/* End_PlaceHolder_Slide_ExportAsBase64 */
_throwIfApiNotSupported("Slide.exportAsBase64", _defaultApiSetName, "1.8", _hostName);
return _invokeMethod(this, "ExportAsBase64", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Renders an image of the slide. The image is scaled to fit into the desired dimensions.
If width and height aren't specified, the true size of the slide is used. If only one
of either width or height is specified, the other will be calculated to preserve aspect ratio.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param options Optional. Options to specify the desired size of the slide image.
* @returns A Base64-encoded string of the slide image in PNG format.
*/
Slide.prototype.getImageAsBase64 = function (options) {
/* Begin_PlaceHolder_Slide_GetImageAsBase64 */
/* End_PlaceHolder_Slide_GetImageAsBase64 */
_throwIfApiNotSupported("Slide.getImageAsBase64", _defaultApiSetName, "1.8", _hostName);
return _invokeMethod(this, "GetImageAsBase64", 1 /* Read */, [options], 4 /* concurrent */, 0 /* none */);
};
/**
* Moves the slide to a new position within the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param slideIndex The zero-based index where the slide should be moved.
*/
Slide.prototype.moveTo = function (slideIndex) {
/* Begin_PlaceHolder_Slide_MoveTo */
/* End_PlaceHolder_Slide_MoveTo */
_throwIfApiNotSupported("Slide.moveTo", _defaultApiSetName, "1.8", _hostName);
_invokeMethod(this, "MoveTo", 0 /* Default */, [slideIndex], 0 /* none */, 0 /* none */);
};
/**
* Selects the specified shapes. Existing shape selection is replaced with the new selection.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*
* @param shapeIds List of shape IDs to select in the slide. If the list is empty, the selection is cleared.
*/
Slide.prototype.setSelectedShapes = function (shapeIds) {
/* Begin_PlaceHolder_Slide_SetSelectedShapes */
/* End_PlaceHolder_Slide_SetSelectedShapes */
_throwIfApiNotSupported("Slide.setSelectedShapes", _defaultApiSetName, "1.5", _hostName);
_invokeMethod(this, "SetSelectedShapes", 0 /* Default */, [shapeIds], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Slide.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Slide_HandleResult */
/* End_PlaceHolder_Slide_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Slide_HandleResult_Prop_Id */
/* End_PlaceHolder_Slide_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Index"])) {
this._In = obj["Index"];
/* Begin_PlaceHolder_Slide_HandleResult_Prop_Index */
/* End_PlaceHolder_Slide_HandleResult_Prop_Index */
}
_handleNavigationPropertyResults(this, obj, ["background", "Background", "comments", "Comments", "customXmlParts", "CustomXmlParts", "hyperlinks", "Hyperlinks", "layout", "Layout", "shapes", "Shapes", "slideMaster", "SlideMaster", "tags", "Tags", "tasks", "Tasks", "themeColorScheme", "ThemeColorScheme"]);
};
Slide.prototype.load = function (options) {
return _load(this, options);
};
Slide.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Slide.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Slide_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Slide_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Slide.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Slide_HandleRetrieveResult */
/* End_PlaceHolder_Slide_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
Slide.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Slide.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Slide.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Slide;
}(OfficeExtension.ClientObject));
PowerPoint.Slide = Slide;
/* Begin_PlaceHolder_ShapeGetImageFormatType_BeforeDeclaration */
/* End_PlaceHolder_ShapeGetImageFormatType_BeforeDeclaration */
/**
* Represents the format of an image.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var ShapeGetImageFormatType;
(function (ShapeGetImageFormatType) {
/**
* The picture is in PNG format.
* @remarks
* [Api set: PowerPointApi 1.10]
*/
ShapeGetImageFormatType["png"] = "Png";
})(ShapeGetImageFormatType = PowerPoint.ShapeGetImageFormatType || (PowerPoint.ShapeGetImageFormatType = {}));
/* Begin_PlaceHolder_ShapeGetImageOptions_AfterDeclaration */
/* End_PlaceHolder_ShapeGetImageOptions_AfterDeclaration */
var _typeShapeGroup = "ShapeGroup";
/* Begin_PlaceHolder_ShapeGroup_BeforeDeclaration */
/* End_PlaceHolder_ShapeGroup_BeforeDeclaration */
/**
* Represents a shape group inside a presentation. To get the corresponding Shape object, use `ShapeGroup.shape`.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var ShapeGroup = /** @class */ (function (_super) {
__extends(ShapeGroup, _super);
function ShapeGroup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ShapeGroup.prototype, "_className", {
get: function () {
return "ShapeGroup";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "creationId"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "CreationId"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "_navigationPropertyNames", {
get: function () {
return ["shape", "shapes"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "shape", {
/* Begin_PlaceHolder_ShapeGroup_Custom_Members */
/* End_PlaceHolder_ShapeGroup_Custom_Members */
/**
* Returns the `Shape` object associated with the group.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeGroup_Shape_get */
/* End_PlaceHolder_ShapeGroup_Shape_get */
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.Shape, this, "Shape", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_ShapeGroup_Shape_get_post */
/* End_PlaceHolder_ShapeGroup_Shape_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "shapes", {
/**
* Returns the collection of `Shape` objects in the group.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeGroup_Shapes_get */
/* End_PlaceHolder_ShapeGroup_Shapes_get */
if (!this._Sh) {
this._Sh = _createPropertyObject(PowerPoint.ShapeScopedCollection, this, "Shapes", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_ShapeGroup_Shapes_get_post */
/* End_PlaceHolder_ShapeGroup_Shapes_get_post */
return this._Sh;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "creationId", {
/**
* Gets the creation ID of the shape group. Returns `null` if the shape group has no creation ID.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_ShapeGroup_CreationId_get */
/* End_PlaceHolder_ShapeGroup_CreationId_get */
_throwIfNotLoaded("creationId", this._C, _typeShapeGroup, this._isNull);
_throwIfApiNotSupported("ShapeGroup.creationId", _defaultApiSetName, "1.10", _hostName);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeGroup.prototype, "id", {
/**
* Gets the unique ID of the shape group.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_ShapeGroup_Id_get */
/* End_PlaceHolder_ShapeGroup_Id_get */
_throwIfNotLoaded("id", this._I, _typeShapeGroup, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "shape" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "shapes" /* COLLECTION; Collections may not have a "SET" method */
/**
* Ungroups any grouped shapes in the specified shape group.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
ShapeGroup.prototype.ungroup = function () {
/* Begin_PlaceHolder_ShapeGroup_Ungroup */
/* End_PlaceHolder_ShapeGroup_Ungroup */
_invokeMethod(this, "Ungroup", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
ShapeGroup.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeGroup_HandleResult */
/* End_PlaceHolder_ShapeGroup_HandleResult */
if (!_isUndefined(obj["CreationId"])) {
this._C = obj["CreationId"];
/* Begin_PlaceHolder_ShapeGroup_HandleResult_Prop_CreationId */
/* End_PlaceHolder_ShapeGroup_HandleResult_Prop_CreationId */
}
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_ShapeGroup_HandleResult_Prop_Id */
/* End_PlaceHolder_ShapeGroup_HandleResult_Prop_Id */
}
_handleNavigationPropertyResults(this, obj, ["shape", "Shape", "shapes", "Shapes"]);
};
ShapeGroup.prototype.load = function (options) {
return _load(this, options);
};
ShapeGroup.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
ShapeGroup.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_ShapeGroup_HandleIdResult_Prop_Id */
/* End_PlaceHolder_ShapeGroup_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
ShapeGroup.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeGroup_HandleRetrieveResult */
/* End_PlaceHolder_ShapeGroup_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.ShapeGroup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object.
*/
ShapeGroup.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
ShapeGroup.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
ShapeGroup.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return ShapeGroup;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeGroup = ShapeGroup;
/* Begin_PlaceHolder_ShapeGroup_AfterDeclaration */
/* End_PlaceHolder_ShapeGroup_AfterDeclaration */
/* Begin_PlaceHolder_ShapeLineStyle_BeforeDeclaration */
/* End_PlaceHolder_ShapeLineStyle_BeforeDeclaration */
/**
* Specifies the style for a line.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
var ShapeLineStyle;
(function (ShapeLineStyle) {
/**
* Single line.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineStyle["single"] = "Single";
/**
* Thick line with a thin line on each side.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineStyle["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]
*/
ShapeLineStyle["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]
*/
ShapeLineStyle["thinThick"] = "ThinThick";
/**
* Two thin lines.
* @remarks
* [Api set: PowerPointApi 1.4]
*/
ShapeLineStyle["thinThin"] = "ThinThin";
})(ShapeLineStyle = PowerPoint.ShapeLineStyle || (PowerPoint.ShapeLineStyle = {}));
/* Begin_PlaceHolder_ShapeLineStyle_AfterDeclaration */
/* End_PlaceHolder_ShapeLineStyle_AfterDeclaration */
var _typeShapeLineFormat = "ShapeLineFormat";
/* Begin_PlaceHolder_ShapeLineFormat_BeforeDeclaration */
/* End_PlaceHolder_ShapeLineFormat_BeforeDeclaration */
/**
* 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]
*/
var ShapeLineFormat = /** @class */ (function (_super) {
__extends(ShapeLineFormat, _super);
function ShapeLineFormat() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(ShapeLineFormat.prototype, "_className", {
get: function () {
return "ShapeLineFormat";
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "_scalarPropertyNames", {
get: function () {
return ["color", "dashStyle", "style", "transparency", "visible", "weight"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Color", "DashStyle", "Style", "Transparency", "Visible", "Weight"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "color", {
/* Begin_PlaceHolder_ShapeLineFormat_Custom_Members */
/* End_PlaceHolder_ShapeLineFormat_Custom_Members */
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_Color_get */
/* End_PlaceHolder_ShapeLineFormat_Color_get */
_throwIfNotLoaded("color", this._C, _typeShapeLineFormat, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_Color_set */
/* End_PlaceHolder_ShapeLineFormat_Color_set */
this._C = value;
_invokeSetProperty(this, "Color", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "dashStyle", {
/**
* Represents the dash style of the line. Returns null when the line isn't visible or there are inconsistent dash styles. See {@link PowerPoint.ShapeLineDashStyle} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_DashStyle_get */
/* End_PlaceHolder_ShapeLineFormat_DashStyle_get */
_throwIfNotLoaded("dashStyle", this._D, _typeShapeLineFormat, this._isNull);
return this._D;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_DashStyle_set */
/* End_PlaceHolder_ShapeLineFormat_DashStyle_set */
this._D = value;
_invokeSetProperty(this, "DashStyle", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "style", {
/**
* Represents the line style of the shape. Returns null when the line isn't visible or there are inconsistent styles. See {@link PowerPoint.ShapeLineStyle} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_Style_get */
/* End_PlaceHolder_ShapeLineFormat_Style_get */
_throwIfNotLoaded("style", this._S, _typeShapeLineFormat, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_Style_set */
/* End_PlaceHolder_ShapeLineFormat_Style_set */
this._S = value;
_invokeSetProperty(this, "Style", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "transparency", {
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_Transparency_get */
/* End_PlaceHolder_ShapeLineFormat_Transparency_get */
_throwIfNotLoaded("transparency", this._T, _typeShapeLineFormat, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_Transparency_set */
/* End_PlaceHolder_ShapeLineFormat_Transparency_set */
this._T = value;
_invokeSetProperty(this, "Transparency", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "visible", {
/**
* 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]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_Visible_get */
/* End_PlaceHolder_ShapeLineFormat_Visible_get */
_throwIfNotLoaded("visible", this._V, _typeShapeLineFormat, this._isNull);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_Visible_set */
/* End_PlaceHolder_ShapeLineFormat_Visible_set */
this._V = value;
_invokeSetProperty(this, "Visible", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(ShapeLineFormat.prototype, "weight", {
/**
* Represents the weight of the line, in points. Returns `null` when the line isn't visible or there are inconsistent line weights.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_ShapeLineFormat_Weight_get */
/* End_PlaceHolder_ShapeLineFormat_Weight_get */
_throwIfNotLoaded("weight", this._W, _typeShapeLineFormat, this._isNull);
return this._W;
},
set: function (value) {
/* Begin_PlaceHolder_ShapeLineFormat_Weight_set */
/* End_PlaceHolder_ShapeLineFormat_Weight_set */
this._W = value;
_invokeSetProperty(this, "Weight", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "color" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "dashStyle" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "style" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "transparency" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "visible" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "weight" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
ShapeLineFormat.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult */
/* End_PlaceHolder_ShapeLineFormat_HandleResult */
if (!_isUndefined(obj["Color"])) {
this._C = obj["Color"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Color */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Color */
}
if (!_isUndefined(obj["DashStyle"])) {
this._D = obj["DashStyle"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_DashStyle */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_DashStyle */
}
if (!_isUndefined(obj["Style"])) {
this._S = obj["Style"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Style */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Style */
}
if (!_isUndefined(obj["Transparency"])) {
this._T = obj["Transparency"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Transparency */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Transparency */
}
if (!_isUndefined(obj["Visible"])) {
this._V = obj["Visible"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Visible */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Visible */
}
if (!_isUndefined(obj["Weight"])) {
this._W = obj["Weight"];
/* Begin_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Weight */
/* End_PlaceHolder_ShapeLineFormat_HandleResult_Prop_Weight */
}
};
ShapeLineFormat.prototype.load = function (options) {
return _load(this, options);
};
ShapeLineFormat.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
ShapeLineFormat.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_ShapeLineFormat_HandleRetrieveResult */
/* End_PlaceHolder_ShapeLineFormat_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
ShapeLineFormat.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
ShapeLineFormat.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
ShapeLineFormat.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return ShapeLineFormat;
}(OfficeExtension.ClientObject));
PowerPoint.ShapeLineFormat = ShapeLineFormat;
/* Begin_PlaceHolder_ShapeLineFormat_AfterDeclaration */
/* End_PlaceHolder_ShapeLineFormat_AfterDeclaration */
/* Begin_PlaceHolder_ShapeZOrder_BeforeDeclaration */
/* End_PlaceHolder_ShapeZOrder_BeforeDeclaration */
/**
* Use with `setZOrder` to move the specified shape up or down the collection's z-order, which shifts it in front of or behind other shapes.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var ShapeZOrder;
(function (ShapeZOrder) {
/**
* Brings the shape forward one spot in the z-order.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
ShapeZOrder["bringForward"] = "BringForward";
/**
* Brings the shape to the front of the z-order.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
ShapeZOrder["bringToFront"] = "BringToFront";
/**
* Sends the shape backward one spot in the z-order.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
ShapeZOrder["sendBackward"] = "SendBackward";
/**
* Sends the shape to the back of the z-order.
* @remarks
* [Api set: PowerPointApi 1.8]
*/
ShapeZOrder["sendToBack"] = "SendToBack";
})(ShapeZOrder = PowerPoint.ShapeZOrder || (PowerPoint.ShapeZOrder = {}));
/* Begin_PlaceHolder_ShapeZOrder_AfterDeclaration */
/* End_PlaceHolder_ShapeZOrder_AfterDeclaration */
var _typeImage = "Image";
/* Begin_PlaceHolder_Image_BeforeDeclaration */
/* End_PlaceHolder_Image_BeforeDeclaration */
/**
* Represents an image in a slide.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
var Image = /** @class */ (function (_super) {
__extends(Image, _super);
function Image() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Image.prototype, "_className", {
get: function () {
return "Image";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "_scalarPropertyNames", {
get: function () {
return ["cropBottom", "cropGeometry", "cropLeft", "cropRight", "cropTop"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["CropBottom", "CropGeometry", "CropLeft", "CropRight", "CropTop"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "_navigationPropertyNames", {
get: function () {
return ["shape"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "shape", {
/**
* Returns the `Shape` object associated with the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_Shape_get */
/* End_PlaceHolder_Image_Shape_get */
if (!this._S) {
this._S = _createPropertyObject(PowerPoint.Shape, this, "Shape", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Image_Shape_get_post */
/* End_PlaceHolder_Image_Shape_get_post */
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "cropBottom", {
/**
* Specifies the number of points that are cropped off the bottom of the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_CropBottom_get */
/* End_PlaceHolder_Image_CropBottom_get */
_throwIfNotLoaded("cropBottom", this._C, _typeImage, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_Image_CropBottom_set */
/* End_PlaceHolder_Image_CropBottom_set */
this._C = value;
_invokeSetProperty(this, "CropBottom", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "cropGeometry", {
/**
* Specifies the geometric shape type for the crop region of the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_CropGeometry_get */
/* End_PlaceHolder_Image_CropGeometry_get */
_throwIfNotLoaded("cropGeometry", this._Cr, _typeImage, this._isNull);
return this._Cr;
},
set: function (value) {
/* Begin_PlaceHolder_Image_CropGeometry_set */
/* End_PlaceHolder_Image_CropGeometry_set */
this._Cr = value;
_invokeSetProperty(this, "CropGeometry", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "cropLeft", {
/**
* Specifies the number of points that are cropped off the left side of the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_CropLeft_get */
/* End_PlaceHolder_Image_CropLeft_get */
_throwIfNotLoaded("cropLeft", this._Cro, _typeImage, this._isNull);
return this._Cro;
},
set: function (value) {
/* Begin_PlaceHolder_Image_CropLeft_set */
/* End_PlaceHolder_Image_CropLeft_set */
this._Cro = value;
_invokeSetProperty(this, "CropLeft", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "cropRight", {
/**
* Specifies the number of points that are cropped off the right side of the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_CropRight_get */
/* End_PlaceHolder_Image_CropRight_get */
_throwIfNotLoaded("cropRight", this._Crop, _typeImage, this._isNull);
return this._Crop;
},
set: function (value) {
/* Begin_PlaceHolder_Image_CropRight_set */
/* End_PlaceHolder_Image_CropRight_set */
this._Crop = value;
_invokeSetProperty(this, "CropRight", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Image.prototype, "cropTop", {
/**
* Specifies the number of points that are cropped off the top of the image.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Image_CropTop_get */
/* End_PlaceHolder_Image_CropTop_get */
_throwIfNotLoaded("cropTop", this._CropT, _typeImage, this._isNull);
return this._CropT;
},
set: function (value) {
/* Begin_PlaceHolder_Image_CropTop_set */
/* End_PlaceHolder_Image_CropTop_set */
this._CropT = value;
_invokeSetProperty(this, "CropTop", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
/**
* Returns a Base64-encoded string of the source image data. This is the original image before any crop or effects are applied.
*
* @remarks
* [Api set: PowerPointApi 99.9]
* @returns A Base64-encoded string of the source image.
*/
Image.prototype.getSourceImageAsBase64 = function () {
/* Begin_PlaceHolder_Image_GetSourceImageAsBase64 */
/* End_PlaceHolder_Image_GetSourceImageAsBase64 */
return _invokeMethod(this, "GetSourceImageAsBase64", 1 /* Read */, [], 4 /* concurrent */ | 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Replaces the image data with the specified Base64-encoded image.
Only replaces the image data and updates the size accordingly. All effects applied to the shape will persist.
Throws an `InvalidArgument` exception when `base64EncodedImage` is null or empty, or the Base64-encoded string isn't a valid image.
Throws an `UnsupportedFileType` exception when `base64EncodedImage` is a valid image but in a file format that isn't supported.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param base64EncodedImage A Base64-encoded string of the replacement image.
*/
Image.prototype.replace = function (base64EncodedImage) {
/* Begin_PlaceHolder_Image_Replace */
/* End_PlaceHolder_Image_Replace */
_invokeMethod(this, "Replace", 0 /* Default */, [base64EncodedImage], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Image.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Image_HandleResult */
/* End_PlaceHolder_Image_HandleResult */
if (!_isUndefined(obj["CropBottom"])) {
this._C = obj["CropBottom"];
/* Begin_PlaceHolder_Image_HandleResult_Prop_CropBottom */
/* End_PlaceHolder_Image_HandleResult_Prop_CropBottom */
}
if (!_isUndefined(obj["CropGeometry"])) {
this._Cr = obj["CropGeometry"];
/* Begin_PlaceHolder_Image_HandleResult_Prop_CropGeometry */
/* End_PlaceHolder_Image_HandleResult_Prop_CropGeometry */
}
if (!_isUndefined(obj["CropLeft"])) {
this._Cro = obj["CropLeft"];
/* Begin_PlaceHolder_Image_HandleResult_Prop_CropLeft */
/* End_PlaceHolder_Image_HandleResult_Prop_CropLeft */
}
if (!_isUndefined(obj["CropRight"])) {
this._Crop = obj["CropRight"];
/* Begin_PlaceHolder_Image_HandleResult_Prop_CropRight */
/* End_PlaceHolder_Image_HandleResult_Prop_CropRight */
}
if (!_isUndefined(obj["CropTop"])) {
this._CropT = obj["CropTop"];
/* Begin_PlaceHolder_Image_HandleResult_Prop_CropTop */
/* End_PlaceHolder_Image_HandleResult_Prop_CropTop */
}
_handleNavigationPropertyResults(this, obj, ["shape", "Shape"]);
};
Image.prototype.load = function (options) {
return _load(this, options);
};
Image.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
Image.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Image_HandleRetrieveResult */
/* End_PlaceHolder_Image_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Image` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ImageData`) that contains shallow copies of any loaded child properties from the original object.
*/
Image.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Image.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Image.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Image;
}(OfficeExtension.ClientObject));
PowerPoint.Image = Image;
var _typeShape = "Shape";
/* Begin_PlaceHolder_Shape_BeforeDeclaration */
/* End_PlaceHolder_Shape_BeforeDeclaration */
/**
* Represents a single shape in the slide.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var Shape = /** @class */ (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 ["id", "height", "left", "name", "top", "type", "width", "zOrderPosition", "level", "altTextDescription", "isDecorative", "altTextTitle", "rotation", "visible", "creationId"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "Height", "Left", "Name", "Top", "Type", "Width", "ZOrderPosition", "Level", "AltTextDescription", "IsDecorative", "AltTextTitle", "Rotation", "Visible", "CreationId"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, true, true, true, true, false, true, false, false, true, true, true, true, true, false];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "_navigationPropertyNames", {
get: function () {
return ["tags", "fill", "lineFormat", "textFrame", "customXmlParts", "group", "parentGroup", "placeholderFormat", "adjustments"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "adjustments", {
/* Begin_PlaceHolder_Shape_Custom_Members */
/* End_PlaceHolder_Shape_Custom_Members */
/**
* Returns an `Adjustments` object that contains adjustment values for all the adjustments in this shape.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Adjustments_get */
/* End_PlaceHolder_Shape_Adjustments_get */
_throwIfApiNotSupported("Shape.adjustments", _defaultApiSetName, "1.10", _hostName);
if (!this._A) {
this._A = _createPropertyObject(PowerPoint.Adjustments, this, "Adjustments", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_Adjustments_get_post */
/* End_PlaceHolder_Shape_Adjustments_get_post */
return this._A;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "customXmlParts", {
/**
* Returns a collection of custom XML parts in the shape.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_Shape_CustomXmlParts_get */
/* End_PlaceHolder_Shape_CustomXmlParts_get */
_throwIfApiNotSupported("Shape.customXmlParts", _defaultApiSetName, "1.7", _hostName);
if (!this._Cu) {
this._Cu = _createPropertyObject(PowerPoint.CustomXmlPartCollection, this, "CustomXmlParts", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_CustomXmlParts_get_post */
/* End_PlaceHolder_Shape_CustomXmlParts_get_post */
return this._Cu;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "fill", {
/**
* Returns the fill formatting of this shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Fill_get */
/* End_PlaceHolder_Shape_Fill_get */
_throwIfApiNotSupported("Shape.fill", _defaultApiSetName, "1.4", _hostName);
if (!this._F) {
this._F = _createPropertyObject(PowerPoint.ShapeFill, this, "Fill", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_Fill_get_post */
/* End_PlaceHolder_Shape_Fill_get_post */
return this._F;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "group", {
/**
* Returns the `ShapeGroup` associated with the shape.
If the shape type isn't `group`, then this method returns the `GeneralException` error.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Group_get */
/* End_PlaceHolder_Shape_Group_get */
_throwIfApiNotSupported("Shape.group", _defaultApiSetName, "1.8", _hostName);
if (!this._G) {
this._G = _createPropertyObject(PowerPoint.ShapeGroup, this, "Group", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_Group_get_post */
/* End_PlaceHolder_Shape_Group_get_post */
return this._G;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "lineFormat", {
/**
* Returns the line formatting of this shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_LineFormat_get */
/* End_PlaceHolder_Shape_LineFormat_get */
_throwIfApiNotSupported("Shape.lineFormat", _defaultApiSetName, "1.4", _hostName);
if (!this._Li) {
this._Li = _createPropertyObject(PowerPoint.ShapeLineFormat, this, "LineFormat", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_LineFormat_get_post */
/* End_PlaceHolder_Shape_LineFormat_get_post */
return this._Li;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "parentGroup", {
/**
* Returns the parent group of this shape.
If the shape isn't part of a group, then this method returns the `GeneralException` error.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Shape_ParentGroup_get */
/* End_PlaceHolder_Shape_ParentGroup_get */
_throwIfApiNotSupported("Shape.parentGroup", _defaultApiSetName, "1.8", _hostName);
if (!this._P) {
this._P = _createPropertyObject(PowerPoint.Shape, this, "ParentGroup", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_ParentGroup_get_post */
/* End_PlaceHolder_Shape_ParentGroup_get_post */
return this._P;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "placeholderFormat", {
/**
* Returns the properties that apply specifically to this placeholder.
If the shape type isn't `placeholder`, then this method returns the `GeneralException` error.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Shape_PlaceholderFormat_get */
/* End_PlaceHolder_Shape_PlaceholderFormat_get */
_throwIfApiNotSupported("Shape.placeholderFormat", _defaultApiSetName, "1.8", _hostName);
if (!this._Pl) {
this._Pl = _createPropertyObject(PowerPoint.PlaceholderFormat, this, "PlaceholderFormat", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_PlaceholderFormat_get_post */
/* End_PlaceHolder_Shape_PlaceholderFormat_get_post */
return this._Pl;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "tags", {
/**
* Returns a collection of tags in the shape.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Tags_get */
/* End_PlaceHolder_Shape_Tags_get */
if (!this._T) {
this._T = _createPropertyObject(PowerPoint.TagCollection, this, "Tags", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_Tags_get_post */
/* End_PlaceHolder_Shape_Tags_get_post */
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "textFrame", {
/**
* Returns the {@link PowerPoint.TextFrame} object of this `Shape`. Throws an `InvalidArgument` exception if the shape doesn't support a `TextFrame`.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_TextFrame_get */
/* End_PlaceHolder_Shape_TextFrame_get */
_throwIfApiNotSupported("Shape.textFrame", _defaultApiSetName, "1.4", _hostName);
if (!this._Te) {
this._Te = _createPropertyObject(PowerPoint.TextFrame, this, "TextFrame", false /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_Shape_TextFrame_get_post */
/* End_PlaceHolder_Shape_TextFrame_get_post */
return this._Te;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "altTextDescription", {
/**
* The alt text description of the Shape.
Alt text provides alternative, text-based representations of the information contained in the Shape.
This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_AltTextDescription_get */
/* End_PlaceHolder_Shape_AltTextDescription_get */
_throwIfNotLoaded("altTextDescription", this._Al, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.altTextDescription", _defaultApiSetName, "1.10", _hostName);
return this._Al;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_AltTextDescription_set */
/* End_PlaceHolder_Shape_AltTextDescription_set */
this._Al = value;
_invokeSetProperty(this, "AltTextDescription", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "altTextTitle", {
/**
* The alt text title of the Shape.
Alt text provides alternative, text-based representations of the information contained in the Shape.
This information is useful for people with vision or cognitive impairments who may not be able to see or understand the shape.
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: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_AltTextTitle_get */
/* End_PlaceHolder_Shape_AltTextTitle_get */
_throwIfNotLoaded("altTextTitle", this._Alt, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.altTextTitle", _defaultApiSetName, "1.10", _hostName);
return this._Alt;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_AltTextTitle_set */
/* End_PlaceHolder_Shape_AltTextTitle_set */
this._Alt = value;
_invokeSetProperty(this, "AltTextTitle", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "creationId", {
/**
* Gets the creation ID of the shape. Returns `null` if the shape has no creation ID.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_CreationId_get */
/* End_PlaceHolder_Shape_CreationId_get */
_throwIfNotLoaded("creationId", this._C, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.creationId", _defaultApiSetName, "1.10", _hostName);
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "height", {
/**
* Specifies the height, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Height_get */
/* End_PlaceHolder_Shape_Height_get */
_throwIfNotLoaded("height", this._H, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.height", _defaultApiSetName, "1.4", _hostName);
return this._H;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Height_set */
/* End_PlaceHolder_Shape_Height_set */
this._H = value;
_invokeSetProperty(this, "Height", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "id", {
/**
* Gets the unique ID of the shape.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Id_get */
/* End_PlaceHolder_Shape_Id_get */
_throwIfNotLoaded("id", this._I, _typeShape, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "isDecorative", {
/**
* Represents whether the shape is decorative or not.
Decorative objects add visual interest but aren't informative (e.g. stylistic borders).
People using screen readers will hear these are decorative so they know they aren't missing any important information.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_IsDecorative_get */
/* End_PlaceHolder_Shape_IsDecorative_get */
_throwIfNotLoaded("isDecorative", this._Is, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.isDecorative", _defaultApiSetName, "1.10", _hostName);
return this._Is;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_IsDecorative_set */
/* End_PlaceHolder_Shape_IsDecorative_set */
this._Is = value;
_invokeSetProperty(this, "IsDecorative", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "left", {
/**
* The distance, in points, from the left side of the shape to the left side of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Left_get */
/* End_PlaceHolder_Shape_Left_get */
_throwIfNotLoaded("left", this._L, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.left", _defaultApiSetName, "1.4", _hostName);
return this._L;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Left_set */
/* End_PlaceHolder_Shape_Left_set */
this._L = value;
_invokeSetProperty(this, "Left", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "level", {
/**
* Returns the level of the specified shape.
- A level of 0 means the shape isn't part of a group.
- A level of 1 means the shape is part of a top-level group.
- A level greater than 1 indicates the shape is a nested group.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Level_get */
/* End_PlaceHolder_Shape_Level_get */
_throwIfNotLoaded("level", this._Le, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.level", _defaultApiSetName, "1.8", _hostName);
return this._Le;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "name", {
/**
* Specifies the name of this shape.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Name_get */
/* End_PlaceHolder_Shape_Name_get */
_throwIfNotLoaded("name", this._N, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.name", _defaultApiSetName, "1.4", _hostName);
return this._N;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Name_set */
/* End_PlaceHolder_Shape_Name_set */
this._N = value;
_invokeSetProperty(this, "Name", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "rotation", {
/**
* Specifies the rotation, in degrees, of the shape around the z-axis.
A positive value indicates clockwise rotation, and a negative value indicates counterclockwise rotation.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Rotation_get */
/* End_PlaceHolder_Shape_Rotation_get */
_throwIfNotLoaded("rotation", this._R, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.rotation", _defaultApiSetName, "1.10", _hostName);
return this._R;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Rotation_set */
/* End_PlaceHolder_Shape_Rotation_set */
this._R = value;
_invokeSetProperty(this, "Rotation", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "top", {
/**
* The distance, in points, from the top edge of the shape to the top edge of the slide.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Top_get */
/* End_PlaceHolder_Shape_Top_get */
_throwIfNotLoaded("top", this._To, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.top", _defaultApiSetName, "1.4", _hostName);
return this._To;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Top_set */
/* End_PlaceHolder_Shape_Top_set */
this._To = value;
_invokeSetProperty(this, "Top", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "type", {
/**
* Returns the type of this shape. See {@link PowerPoint.ShapeType} for details.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Type_get */
/* End_PlaceHolder_Shape_Type_get */
_throwIfNotLoaded("type", this._Ty, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.type", _defaultApiSetName, "1.4", _hostName);
return this._Ty;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "visible", {
/**
* Specifies if the shape is visible.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Visible_get */
/* End_PlaceHolder_Shape_Visible_get */
_throwIfNotLoaded("visible", this._V, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.visible", _defaultApiSetName, "1.10", _hostName);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Visible_set */
/* End_PlaceHolder_Shape_Visible_set */
this._V = value;
_invokeSetProperty(this, "Visible", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "width", {
/**
* Specifies the width, in points, of the shape. Throws an `InvalidArgument` exception when set with a negative value.
*
* @remarks
* [Api set: PowerPointApi 1.4]
*/
get: function () {
/* Begin_PlaceHolder_Shape_Width_get */
/* End_PlaceHolder_Shape_Width_get */
_throwIfNotLoaded("width", this._W, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.width", _defaultApiSetName, "1.4", _hostName);
return this._W;
},
set: function (value) {
/* Begin_PlaceHolder_Shape_Width_set */
/* End_PlaceHolder_Shape_Width_set */
this._W = value;
_invokeSetProperty(this, "Width", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Shape.prototype, "zOrderPosition", {
/**
* Returns the z-order position of the shape, with 0 representing the bottom of the order stack. Every shape on a slide has a unique z-order, but
each slide also has a unique z-order stack, so two shapes on separate slides could have the same z-order number.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Shape_ZOrderPosition_get */
/* End_PlaceHolder_Shape_ZOrderPosition_get */
_throwIfNotLoaded("zOrderPosition", this._Z, _typeShape, this._isNull);
_throwIfApiNotSupported("Shape.zOrderPosition", _defaultApiSetName, "1.8", _hostName);
return this._Z;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "adjustments" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "altTextDescription" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "altTextTitle" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "customXmlParts" /* COLLECTION; Collections may not have a "SET" method */,
// * "fill" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "group" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "height" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "isDecorative" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "left" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "lineFormat" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "name" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "parentGroup" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "placeholderFormat" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "rotation" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "tags" /* COLLECTION; Collections may not have a "SET" method */,
// * "textFrame" /* NAVIGATION; EXPLICITYLY non-JSON-stringify */,
// * "top" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "visible" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "width" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes the shape from the shape collection. Does nothing if the shape doesn't exist.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
Shape.prototype.delete = function () {
/* Begin_PlaceHolder_Shape_Delete */
/* End_PlaceHolder_Shape_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Duplicates this shape. The duplicated shape is inserted at the top of the z-order. When no options are provided, the shape is duplicated on the same slide at the same position as the original. The target slide, position, and size can be overridden by the options.
Throws an `InvalidArgument` exception if the provided `targetSlideId` does not exist in the presentation.
Throws an `InvalidArgument` exception when `width` or `height` is set with a negative value.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param options Optional. Options to specify the target slide and the position and size of the duplicated shape. Throws an `InvalidArgument` exception if the provided `targetSlideId` does not exist in the presentation. Throws an `InvalidArgument` exception when `width` or `height` is set with a negative value.
* @returns The newly duplicated {@link PowerPoint.Shape} object.
*/
Shape.prototype.duplicate = function (options) {
/* Begin_PlaceHolder_Shape_Duplicate */
/* End_PlaceHolder_Shape_Duplicate */
_throwIfApiNotSupported("Shape.duplicate", _defaultApiSetName, "1.11", _hostName);
return _createMethodObject(PowerPoint.Shape, this, "Duplicate", 0 /* Default */, [options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 1 /* restrictedResourceAccess */);
};
/**
* Returns the {@link PowerPoint.Chart} object if this shape is a chart. If this shape isn't a chart, 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 99.9]
*/
Shape.prototype.getChartOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetChartOrNullObject */
/* End_PlaceHolder_Shape_GetChartOrNullObject */
_throwIfApiNotSupported("Shape.getChartOrNullObject", _defaultApiSetName, "99.9", _hostName);
return _createMethodObject(PowerPoint.Chart, this, "GetChartOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Returns a {@link PowerPoint.Graphic} object if this shape is a {@link PowerPoint.ShapeType| ShapeType.graphic}. If this shape isn't a `Graphic`, 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.11]
*/
Shape.prototype.getGraphicOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetGraphicOrNullObject */
/* End_PlaceHolder_Shape_GetGraphicOrNullObject */
_throwIfApiNotSupported("Shape.getGraphicOrNullObject", _defaultApiSetName, "1.11", _hostName);
return _createMethodObject(PowerPoint.Graphic, this, "GetGraphicOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Renders an image of the shape.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Optional. Options to specify the desired output image properties.
* @returns A Base64-encoded string of the shape image in the specified format.
*/
Shape.prototype.getImageAsBase64 = function (options) {
/* Begin_PlaceHolder_Shape_GetImageAsBase64 */
/* End_PlaceHolder_Shape_GetImageAsBase64 */
_throwIfApiNotSupported("Shape.getImageAsBase64", _defaultApiSetName, "1.10", _hostName);
return _invokeMethod(this, "GetImageAsBase64", 1 /* Read */, [options], 4 /* concurrent */, 0 /* none */);
};
/**
* Returns a {@link PowerPoint.Image} object if this shape is a {@link PowerPoint.ShapeType| ShapeType.image}. If this shape isn't an `Image`, 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 99.9]
*/
Shape.prototype.getImageOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetImageOrNullObject */
/* End_PlaceHolder_Shape_GetImageOrNullObject */
_throwIfApiNotSupported("Shape.getImageOrNullObject", _defaultApiSetName, "99.9", _hostName);
return _createMethodObject(PowerPoint.Image, this, "GetImageOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */ | 1 /* restrictedResourceAccess */);
};
/**
* Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. Throws an exception if this shape doesn't belong to a `Slide`.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
Shape.prototype.getParentSlide = function () {
/* Begin_PlaceHolder_Shape_GetParentSlide */
/* End_PlaceHolder_Shape_GetParentSlide */
_throwIfApiNotSupported("Shape.getParentSlide", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.Slide, this, "GetParentSlide", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. Throws an exception if this shape doesn't belong to a `SlideLayout`.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
Shape.prototype.getParentSlideLayout = function () {
/* Begin_PlaceHolder_Shape_GetParentSlideLayout */
/* End_PlaceHolder_Shape_GetParentSlideLayout */
_throwIfApiNotSupported("Shape.getParentSlideLayout", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.SlideLayout, this, "GetParentSlideLayout", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.SlideLayout} object that holds this `Shape`. If this shape doesn't belong to a `SlideLayout`, 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.5]
*/
Shape.prototype.getParentSlideLayoutOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetParentSlideLayoutOrNullObject */
/* End_PlaceHolder_Shape_GetParentSlideLayoutOrNullObject */
_throwIfApiNotSupported("Shape.getParentSlideLayoutOrNullObject", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.SlideLayout, this, "GetParentSlideLayoutOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. Throws an exception if this shape doesn't belong to a `SlideMaster`.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
Shape.prototype.getParentSlideMaster = function () {
/* Begin_PlaceHolder_Shape_GetParentSlideMaster */
/* End_PlaceHolder_Shape_GetParentSlideMaster */
_throwIfApiNotSupported("Shape.getParentSlideMaster", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.SlideMaster, this, "GetParentSlideMaster", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.SlideMaster} object that holds this `Shape`. If this shape doesn't belong to a `SlideMaster`, 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.5]
*/
Shape.prototype.getParentSlideMasterOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetParentSlideMasterOrNullObject */
/* End_PlaceHolder_Shape_GetParentSlideMasterOrNullObject */
_throwIfApiNotSupported("Shape.getParentSlideMasterOrNullObject", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.SlideMaster, this, "GetParentSlideMasterOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the parent {@link PowerPoint.Slide} object that holds this `Shape`. If this shape doesn't belong to a `Slide`, 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.5]
*/
Shape.prototype.getParentSlideOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetParentSlideOrNullObject */
/* End_PlaceHolder_Shape_GetParentSlideOrNullObject */
_throwIfApiNotSupported("Shape.getParentSlideOrNullObject", _defaultApiSetName, "1.5", _hostName);
return _createMethodObject(PowerPoint.Slide, this, "GetParentSlideOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Returns the `Table` object if this shape is a table.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
Shape.prototype.getTable = function () {
/* Begin_PlaceHolder_Shape_GetTable */
/* End_PlaceHolder_Shape_GetTable */
_throwIfApiNotSupported("Shape.getTable", _defaultApiSetName, "1.8", _hostName);
return _createMethodObject(PowerPoint.Table, this, "GetTable", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Returns the {@link PowerPoint.TextFrame} object of this `Shape`. If the shape doesn't support a `TextFrame`, 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.10]
*/
Shape.prototype.getTextFrameOrNullObject = function () {
/* Begin_PlaceHolder_Shape_GetTextFrameOrNullObject */
/* End_PlaceHolder_Shape_GetTextFrameOrNullObject */
_throwIfApiNotSupported("Shape.getTextFrameOrNullObject", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.TextFrame, this, "GetTextFrameOrNullObject", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Resizes the shape to the specified width and height, in points.
Throws an `InvalidArgument` exception if `width` or `height` is set to a negative value.
If `maintainAspectRatio` is `true` and both `width` and `height` are provided, `width` takes precedence and `height` is calculated proportionally.
If `shapeResizeOptions` is not provided, or if neither `width` nor `height` is specified in the options, the method does nothing.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param shapeResizeOptions Optional. The options that specify the new dimensions and aspect ratio behavior for the shape.
*/
Shape.prototype.resize = function (shapeResizeOptions) {
/* Begin_PlaceHolder_Shape_Resize */
/* End_PlaceHolder_Shape_Resize */
_throwIfApiNotSupported("Shape.resize", _defaultApiSetName, "99.9", _hostName);
_invokeMethod(this, "Resize", 0 /* Default */, [shapeResizeOptions], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Sets a hyperlink on this `Shape` with the specified options. This will delete any existing hyperlink on this `Shape`.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param options Optional. The options for the hyperlink.
* @returns The newly created {@link PowerPoint.Hyperlink} object.
*/
Shape.prototype.setHyperlink = function (options) {
/* Begin_PlaceHolder_Shape_SetHyperlink */
/* End_PlaceHolder_Shape_SetHyperlink */
_throwIfApiNotSupported("Shape.setHyperlink", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.Hyperlink, this, "SetHyperlink", 0 /* Default */, [options], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* 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: PowerPointApi 1.8]
*
* @param position Specifies how to move the shape within the z-order stack. Uses the `ShapeZOrder` enum.
*/
Shape.prototype.setZOrder = function (position) {
/* Begin_PlaceHolder_Shape_SetZOrder */
/* End_PlaceHolder_Shape_SetZOrder */
_throwIfApiNotSupported("Shape.setZOrder", _defaultApiSetName, "1.8", _hostName);
_invokeMethod(this, "SetZOrder", 0 /* Default */, [position], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Shape.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Shape_HandleResult */
/* End_PlaceHolder_Shape_HandleResult */
if (!_isUndefined(obj["AltTextDescription"])) {
this._Al = obj["AltTextDescription"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_AltTextDescription */
/* End_PlaceHolder_Shape_HandleResult_Prop_AltTextDescription */
}
if (!_isUndefined(obj["AltTextTitle"])) {
this._Alt = obj["AltTextTitle"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_AltTextTitle */
/* End_PlaceHolder_Shape_HandleResult_Prop_AltTextTitle */
}
if (!_isUndefined(obj["CreationId"])) {
this._C = obj["CreationId"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_CreationId */
/* End_PlaceHolder_Shape_HandleResult_Prop_CreationId */
}
if (!_isUndefined(obj["Height"])) {
this._H = obj["Height"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Height */
/* End_PlaceHolder_Shape_HandleResult_Prop_Height */
}
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Id */
/* End_PlaceHolder_Shape_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["IsDecorative"])) {
this._Is = obj["IsDecorative"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_IsDecorative */
/* End_PlaceHolder_Shape_HandleResult_Prop_IsDecorative */
}
if (!_isUndefined(obj["Left"])) {
this._L = obj["Left"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Left */
/* End_PlaceHolder_Shape_HandleResult_Prop_Left */
}
if (!_isUndefined(obj["Level"])) {
this._Le = obj["Level"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Level */
/* End_PlaceHolder_Shape_HandleResult_Prop_Level */
}
if (!_isUndefined(obj["Name"])) {
this._N = obj["Name"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Name */
/* End_PlaceHolder_Shape_HandleResult_Prop_Name */
}
if (!_isUndefined(obj["Rotation"])) {
this._R = obj["Rotation"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Rotation */
/* End_PlaceHolder_Shape_HandleResult_Prop_Rotation */
}
if (!_isUndefined(obj["Top"])) {
this._To = obj["Top"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Top */
/* End_PlaceHolder_Shape_HandleResult_Prop_Top */
}
if (!_isUndefined(obj["Type"])) {
this._Ty = obj["Type"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Type */
/* End_PlaceHolder_Shape_HandleResult_Prop_Type */
}
if (!_isUndefined(obj["Visible"])) {
this._V = obj["Visible"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Visible */
/* End_PlaceHolder_Shape_HandleResult_Prop_Visible */
}
if (!_isUndefined(obj["Width"])) {
this._W = obj["Width"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_Width */
/* End_PlaceHolder_Shape_HandleResult_Prop_Width */
}
if (!_isUndefined(obj["ZOrderPosition"])) {
this._Z = obj["ZOrderPosition"];
/* Begin_PlaceHolder_Shape_HandleResult_Prop_ZOrderPosition */
/* End_PlaceHolder_Shape_HandleResult_Prop_ZOrderPosition */
}
_handleNavigationPropertyResults(this, obj, ["adjustments", "Adjustments", "customXmlParts", "CustomXmlParts", "fill", "Fill", "group", "Group", "lineFormat", "LineFormat", "parentGroup", "ParentGroup", "placeholderFormat", "PlaceholderFormat", "tags", "Tags", "textFrame", "TextFrame"]);
};
Shape.prototype.load = function (options) {
return _load(this, options);
};
Shape.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Shape.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Shape_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Shape_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Shape.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Shape_HandleRetrieveResult */
/* End_PlaceHolder_Shape_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
Shape.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Shape.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Shape.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Shape;
}(OfficeExtension.ClientObject));
PowerPoint.Shape = Shape;
/* Begin_PlaceHolder_Shape_AfterDeclaration */
/* End_PlaceHolder_Shape_AfterDeclaration */
var _typeBinding = "Binding";
/* Begin_PlaceHolder_Binding_BeforeDeclaration */
/* End_PlaceHolder_Binding_BeforeDeclaration */
/**
* Represents an Office.js binding that is defined in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var Binding = /** @class */ (function (_super) {
__extends(Binding, _super);
function Binding() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Binding.prototype, "_className", {
get: function () {
return "Binding";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "_scalarPropertyNames", {
get: function () {
return ["id", "type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id", "Type"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "id", {
/* Begin_PlaceHolder_Binding_Custom_Members */
/* End_PlaceHolder_Binding_Custom_Members */
/**
* Represents the binding identifier.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Binding_Id_get */
/* End_PlaceHolder_Binding_Id_get */
_throwIfNotLoaded("id", this._I, _typeBinding, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Binding.prototype, "type", {
/**
* Returns the type of the binding. See `BindingType` for details.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
get: function () {
/* Begin_PlaceHolder_Binding_Type_get */
/* End_PlaceHolder_Binding_Type_get */
_throwIfNotLoaded("type", this._T, _typeBinding, this._isNull);
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
/**
* Deletes the binding.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
Binding.prototype.delete = function () {
/* Begin_PlaceHolder_Binding_Delete */
/* End_PlaceHolder_Binding_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Returns the shape represented by the binding. Throws an error if the binding isn't of the correct type.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
Binding.prototype.getShape = function () {
/* Begin_PlaceHolder_Binding_GetShape */
/* End_PlaceHolder_Binding_GetShape */
return _createMethodObject(PowerPoint.Shape, this, "GetShape", 0 /* Default */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Binding.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Binding_HandleResult */
/* End_PlaceHolder_Binding_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Binding_HandleResult_Prop_Id */
/* End_PlaceHolder_Binding_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_Binding_HandleResult_Prop_Type */
/* End_PlaceHolder_Binding_HandleResult_Prop_Type */
}
};
Binding.prototype.load = function (options) {
return _load(this, options);
};
Binding.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Binding.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Binding_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Binding_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Binding.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Binding_HandleRetrieveResult */
/* End_PlaceHolder_Binding_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Binding` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BindingData`) that contains shallow copies of any loaded child properties from the original object.
*/
Binding.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Binding.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Binding.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Binding;
}(OfficeExtension.ClientObject));
PowerPoint.Binding = Binding;
/* Begin_PlaceHolder_Binding_AfterDeclaration */
/* End_PlaceHolder_Binding_AfterDeclaration */
var _typeBindingCollection = "BindingCollection";
/* Begin_PlaceHolder_BindingCollection_BeforeDeclaration */
/* End_PlaceHolder_BindingCollection_BeforeDeclaration */
/**
* Represents the collection of all the binding objects that are part of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
var BindingCollection = /** @class */ (function (_super) {
__extends(BindingCollection, _super);
function BindingCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(BindingCollection.prototype, "_className", {
get: function () {
return "BindingCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(BindingCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(BindingCollection.prototype, "items", {
/* Begin_PlaceHolder_BindingCollection_Custom_Members */
/* End_PlaceHolder_BindingCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_BindingCollection_items */
/* End_PlaceHolder_BindingCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
/**
* Adds a new binding to a particular Shape. If the provided ID is already being used by a binding, the existing binding will be overwritten.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param shape Shape to which the binding is added.
* @param bindingType Type of binding. See `BindingType`.
* @param id ID of the binding.
*/
BindingCollection.prototype.add = function (shape, bindingType, id) {
/* Begin_PlaceHolder_BindingCollection_Add */
/* End_PlaceHolder_BindingCollection_Add */
return _createMethodObject(PowerPoint.Binding, this, "Add", 0 /* Default */, [shape, bindingType, id], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Adds a new binding based on the current selection.
If the selection has multiple areas, the `InvalidReference` error will be returned.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param bindingType Type of binding. See `BindingType`.
* @param id ID of the binding.
*/
BindingCollection.prototype.addFromSelection = function (bindingType, id) {
/* Begin_PlaceHolder_BindingCollection_AddFromSelection */
/* End_PlaceHolder_BindingCollection_AddFromSelection */
return _createMethodObject(PowerPoint.Binding, this, "AddFromSelection", 0 /* Default */, [bindingType, id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Gets the number of bindings in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*/
BindingCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_BindingCollection_GetCount */
/* End_PlaceHolder_BindingCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a binding object by ID. Throws an ItemNotFoundException if there's no binding with that ID.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param key ID of the binding object to be retrieved.
*/
BindingCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_BindingCollection_GetItem */
/* End_PlaceHolder_BindingCollection_GetItem */
return _createIndexerObject(PowerPoint.Binding, this, [key]);
};
/**
* Gets a binding object based on its position in the items array. Throws an InvalidArgumentException if the index less than 0, or greater than or equal to the count of items in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param index Index value of the object to be retrieved. Zero-indexed.
*/
BindingCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_BindingCollection_GetItemAt */
/* End_PlaceHolder_BindingCollection_GetItemAt */
return _createMethodObject(PowerPoint.Binding, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a binding object by ID. If the binding object doesn't exist, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.8]
*
* @param id ID of the binding object to be retrieved.
*/
BindingCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_BindingCollection_GetItemOrNullObject */
/* End_PlaceHolder_BindingCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Binding, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
BindingCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_BindingCollection_HandleResult */
/* End_PlaceHolder_BindingCollection_HandleResult */
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(PowerPoint.Binding, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
BindingCollection.prototype.load = function (options) {
return _load(this, options);
};
BindingCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
BindingCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_BindingCollection_HandleRetrieveResult */
/* End_PlaceHolder_BindingCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Binding, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.BindingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.BindingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
BindingCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
BindingCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Binding, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return BindingCollection;
}(OfficeExtension.ClientObject));
PowerPoint.BindingCollection = BindingCollection;
/* Begin_PlaceHolder_DocumentPropertyType_BeforeDeclaration */
/* End_PlaceHolder_DocumentPropertyType_BeforeDeclaration */
/**
* Specifies the document property type for custom properties.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var DocumentPropertyType;
(function (DocumentPropertyType) {
/**
* The Boolean document property type.
* @remarks
* [Api set: PowerPointApi 1.7]
*/
DocumentPropertyType["boolean"] = "Boolean";
/**
* The Date document property type.
* @remarks
* [Api set: PowerPointApi 1.7]
*/
DocumentPropertyType["date"] = "Date";
/**
* The Number document property type.
* @remarks
* [Api set: PowerPointApi 1.7]
*/
DocumentPropertyType["number"] = "Number";
/**
* The String document property type.
* @remarks
* [Api set: PowerPointApi 1.7]
*/
DocumentPropertyType["string"] = "String";
})(DocumentPropertyType = PowerPoint.DocumentPropertyType || (PowerPoint.DocumentPropertyType = {}));
/* Begin_PlaceHolder_DocumentPropertyType_AfterDeclaration */
/* End_PlaceHolder_DocumentPropertyType_AfterDeclaration */
var _typeCustomProperty = "CustomProperty";
/* Begin_PlaceHolder_CustomProperty_BeforeDeclaration */
/* End_PlaceHolder_CustomProperty_BeforeDeclaration */
/**
* Represents a custom property.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var CustomProperty = /** @class */ (function (_super) {
__extends(CustomProperty, _super);
function CustomProperty() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CustomProperty.prototype, "_className", {
get: function () {
return "CustomProperty";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "_scalarPropertyNames", {
get: function () {
return ["key", "type", "value"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Key", "Type", "Value"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [false, false, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "key", {
/* Begin_PlaceHolder_CustomProperty_Custom_Members */
/* End_PlaceHolder_CustomProperty_Custom_Members */
/**
* The string that uniquely identifies the custom property.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_CustomProperty_Key_get */
/* End_PlaceHolder_CustomProperty_Key_get */
_throwIfNotLoaded("key", this._K, _typeCustomProperty, this._isNull);
return this._K;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "type", {
/**
* The type of the value used for the custom property.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_CustomProperty_Type_get */
/* End_PlaceHolder_CustomProperty_Type_get */
_throwIfNotLoaded("type", this._T, _typeCustomProperty, this._isNull);
return this._T;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomProperty.prototype, "value", {
/**
* The value of the custom property.
If the value is a string, the maximum length 255 characters. Larger strings cause the operation to fail with an `InvalidArgument` error.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_CustomProperty_Value_get */
/* End_PlaceHolder_CustomProperty_Value_get */
_throwIfNotLoaded("value", this._V, _typeCustomProperty, this._isNull);
return this._V;
},
set: function (value) {
/* Begin_PlaceHolder_CustomProperty_Value_set */
/* End_PlaceHolder_CustomProperty_Value_set */
this._V = value;
_invokeSetProperty(this, "Value", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "value" /* SCALAR; EXPLICITLY non-JSON-stringify */
/**
* Deletes the custom property.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomProperty.prototype.delete = function () {
/* Begin_PlaceHolder_CustomProperty_Delete */
/* End_PlaceHolder_CustomProperty_Delete */
_invokeMethod(this, "Delete", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
CustomProperty.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CustomProperty_HandleResult */
/* End_PlaceHolder_CustomProperty_HandleResult */
if (!_isUndefined(obj["Key"])) {
this._K = obj["Key"];
/* Begin_PlaceHolder_CustomProperty_HandleResult_Prop_Key */
/* End_PlaceHolder_CustomProperty_HandleResult_Prop_Key */
}
if (!_isUndefined(obj["Type"])) {
this._T = obj["Type"];
/* Begin_PlaceHolder_CustomProperty_HandleResult_Prop_Type */
/* End_PlaceHolder_CustomProperty_HandleResult_Prop_Type */
}
if (!_isUndefined(obj["Value"])) {
this._V = obj["Value"];
/* Begin_PlaceHolder_CustomProperty_HandleResult_Prop_Value */
/* End_PlaceHolder_CustomProperty_HandleResult_Prop_Value */
}
};
CustomProperty.prototype.load = function (options) {
return _load(this, options);
};
CustomProperty.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
CustomProperty.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CustomProperty_HandleRetrieveResult */
/* End_PlaceHolder_CustomProperty_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object.
*/
CustomProperty.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
CustomProperty.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
CustomProperty.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return CustomProperty;
}(OfficeExtension.ClientObject));
PowerPoint.CustomProperty = CustomProperty;
/* Begin_PlaceHolder_CustomProperty_AfterDeclaration */
/* End_PlaceHolder_CustomProperty_AfterDeclaration */
var _typeCustomPropertyCollection = "CustomPropertyCollection";
/* Begin_PlaceHolder_CustomPropertyCollection_BeforeDeclaration */
/* End_PlaceHolder_CustomPropertyCollection_BeforeDeclaration */
/**
* A collection of custom properties.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var CustomPropertyCollection = /** @class */ (function (_super) {
__extends(CustomPropertyCollection, _super);
function CustomPropertyCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(CustomPropertyCollection.prototype, "_className", {
get: function () {
return "CustomPropertyCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomPropertyCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(CustomPropertyCollection.prototype, "items", {
/* Begin_PlaceHolder_CustomPropertyCollection_Custom_Members */
/* End_PlaceHolder_CustomPropertyCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_CustomPropertyCollection_items */
/* End_PlaceHolder_CustomPropertyCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeCustomPropertyCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because CustomPropertyCollection is a collection.
/**
* Creates a new `CustomProperty` or updates the property with the given key.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param key The string that identifies the `CustomProperty` object. It's case-insensitive.
* The maximum key length is 255 characters. Larger strings cause the operation to fail with an `InvalidArgument` error.
* @param value The value of the `CustomProperty`.
* If the value is a string, the maximum length 255 characters. Larger strings cause the operation to fail with an `InvalidArgument` error.
*/
CustomPropertyCollection.prototype.add = function (key, value) {
/* Begin_PlaceHolder_CustomPropertyCollection_Add */
/* End_PlaceHolder_CustomPropertyCollection_Add */
return _createMethodObject(PowerPoint.CustomProperty, this, "Add", 0 /* Default */, [key, value], false /*isCollection*/, true /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/**
* Deletes all custom properties in this collection.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
CustomPropertyCollection.prototype.deleteAll = function () {
/* Begin_PlaceHolder_CustomPropertyCollection_DeleteAll */
/* End_PlaceHolder_CustomPropertyCollection_DeleteAll */
_invokeMethod(this, "DeleteAll", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Gets the number of custom properties in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.7]
* @returns The number of custom properties in the collection.
*/
CustomPropertyCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_CustomPropertyCollection_GetCount */
/* End_PlaceHolder_CustomPropertyCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a `CustomProperty` by its key.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param key The string that identifies the `CustomProperty` object. It's case-insensitive.
* Keys have a maximum length of 255 characters. If the argument exceeds 255 characters, then this method returns the `InvalidArgument` error.
*/
CustomPropertyCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_CustomPropertyCollection_GetItem */
/* End_PlaceHolder_CustomPropertyCollection_GetItem */
return _createIndexerObject(PowerPoint.CustomProperty, this, [key]);
};
/**
* Gets a `CustomProperty` by its zero-based index in the collection.
Throws an `InvalidArgument` exception when the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param index The index of the custom property in the collection.
* @returns The custom property at the given index.
*/
CustomPropertyCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_CustomPropertyCollection_GetItemAt */
/* End_PlaceHolder_CustomPropertyCollection_GetItemAt */
_throwIfApiNotSupported("CustomPropertyCollection.getItemAt", _defaultApiSetName, "1.10", _hostName);
return _createMethodObject(PowerPoint.CustomProperty, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a `CustomProperty` by its key.
If the `CustomProperty` doesn't exist, then this method returns 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}.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*
* @param key The string that identifies the `CustomProperty` object. It's case-insensitive.
* Keys have a maximum length of 255 characters. If the argument exceeds 255 characters, then this method returns the `InvalidArgument` error.
*/
CustomPropertyCollection.prototype.getItemOrNullObject = function (key) {
/* Begin_PlaceHolder_CustomPropertyCollection_GetItemOrNullObject */
/* End_PlaceHolder_CustomPropertyCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.CustomProperty, this, "GetItemOrNullObject", 1 /* Read */, [key], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
CustomPropertyCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_CustomPropertyCollection_HandleResult */
/* End_PlaceHolder_CustomPropertyCollection_HandleResult */
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(PowerPoint.CustomProperty, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
CustomPropertyCollection.prototype.load = function (options) {
return _load(this, options);
};
CustomPropertyCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
CustomPropertyCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_CustomPropertyCollection_HandleRetrieveResult */
/* End_PlaceHolder_CustomPropertyCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomProperty, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
CustomPropertyCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
CustomPropertyCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.CustomProperty, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return CustomPropertyCollection;
}(OfficeExtension.ClientObject));
PowerPoint.CustomPropertyCollection = CustomPropertyCollection;
/* Begin_PlaceHolder_CustomPropertyCollection_AfterDeclaration */
/* End_PlaceHolder_CustomPropertyCollection_AfterDeclaration */
var _typeDocumentProperties = "DocumentProperties";
/* Begin_PlaceHolder_DocumentProperties_BeforeDeclaration */
/* End_PlaceHolder_DocumentProperties_BeforeDeclaration */
/**
* Represents presentation properties.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
var DocumentProperties = /** @class */ (function (_super) {
__extends(DocumentProperties, _super);
function DocumentProperties() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(DocumentProperties.prototype, "_className", {
get: function () {
return "DocumentProperties";
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "_scalarPropertyNames", {
get: function () {
return ["author", "category", "comments", "company", "creationDate", "keywords", "lastAuthor", "manager", "revisionNumber", "subject", "title"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Author", "Category", "Comments", "Company", "CreationDate", "Keywords", "LastAuthor", "Manager", "RevisionNumber", "Subject", "Title"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true, true, true, false, true, false, true, true, true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "_navigationPropertyNames", {
get: function () {
return ["customProperties"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "customProperties", {
/* Begin_PlaceHolder_DocumentProperties_Custom_Members */
/* End_PlaceHolder_DocumentProperties_Custom_Members */
/**
* The collection of custom properties of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_CustomProperties_get */
/* End_PlaceHolder_DocumentProperties_CustomProperties_get */
if (!this._Cu) {
this._Cu = _createPropertyObject(PowerPoint.CustomPropertyCollection, this, "CustomProperties", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_DocumentProperties_CustomProperties_get_post */
/* End_PlaceHolder_DocumentProperties_CustomProperties_get_post */
return this._Cu;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "author", {
/**
* The author of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Author_get */
/* End_PlaceHolder_DocumentProperties_Author_get */
_throwIfNotLoaded("author", this._A, _typeDocumentProperties, this._isNull);
return this._A;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Author_set */
/* End_PlaceHolder_DocumentProperties_Author_set */
this._A = value;
_invokeSetProperty(this, "Author", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "category", {
/**
* The category of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Category_get */
/* End_PlaceHolder_DocumentProperties_Category_get */
_throwIfNotLoaded("category", this._C, _typeDocumentProperties, this._isNull);
return this._C;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Category_set */
/* End_PlaceHolder_DocumentProperties_Category_set */
this._C = value;
_invokeSetProperty(this, "Category", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "comments", {
/**
* The Comments field in the metadata of the presentation. These have no connection to comments made in slides.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Comments_get */
/* End_PlaceHolder_DocumentProperties_Comments_get */
_throwIfNotLoaded("comments", this._Co, _typeDocumentProperties, this._isNull);
return this._Co;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Comments_set */
/* End_PlaceHolder_DocumentProperties_Comments_set */
this._Co = value;
_invokeSetProperty(this, "Comments", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "company", {
/**
* The company of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Company_get */
/* End_PlaceHolder_DocumentProperties_Company_get */
_throwIfNotLoaded("company", this._Com, _typeDocumentProperties, this._isNull);
return this._Com;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Company_set */
/* End_PlaceHolder_DocumentProperties_Company_set */
this._Com = value;
_invokeSetProperty(this, "Company", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "creationDate", {
/**
* The creation date of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_CreationDate_get */
/* End_PlaceHolder_DocumentProperties_CreationDate_get */
_throwIfNotLoaded("creationDate", this._Cr, _typeDocumentProperties, this._isNull);
return this._Cr;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "keywords", {
/**
* The keywords of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Keywords_get */
/* End_PlaceHolder_DocumentProperties_Keywords_get */
_throwIfNotLoaded("keywords", this._K, _typeDocumentProperties, this._isNull);
return this._K;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Keywords_set */
/* End_PlaceHolder_DocumentProperties_Keywords_set */
this._K = value;
_invokeSetProperty(this, "Keywords", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "lastAuthor", {
/**
* The last author of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_LastAuthor_get */
/* End_PlaceHolder_DocumentProperties_LastAuthor_get */
_throwIfNotLoaded("lastAuthor", this._L, _typeDocumentProperties, this._isNull);
return this._L;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "manager", {
/**
* The manager of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Manager_get */
/* End_PlaceHolder_DocumentProperties_Manager_get */
_throwIfNotLoaded("manager", this._M, _typeDocumentProperties, this._isNull);
return this._M;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Manager_set */
/* End_PlaceHolder_DocumentProperties_Manager_set */
this._M = value;
_invokeSetProperty(this, "Manager", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "revisionNumber", {
/**
* The revision number of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_RevisionNumber_get */
/* End_PlaceHolder_DocumentProperties_RevisionNumber_get */
_throwIfNotLoaded("revisionNumber", this._R, _typeDocumentProperties, this._isNull);
return this._R;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_RevisionNumber_set */
/* End_PlaceHolder_DocumentProperties_RevisionNumber_set */
this._R = value;
_invokeSetProperty(this, "RevisionNumber", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "subject", {
/**
* The subject of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Subject_get */
/* End_PlaceHolder_DocumentProperties_Subject_get */
_throwIfNotLoaded("subject", this._S, _typeDocumentProperties, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Subject_set */
/* End_PlaceHolder_DocumentProperties_Subject_set */
this._S = value;
_invokeSetProperty(this, "Subject", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DocumentProperties.prototype, "title", {
/**
* The title of the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.7]
*/
get: function () {
/* Begin_PlaceHolder_DocumentProperties_Title_get */
/* End_PlaceHolder_DocumentProperties_Title_get */
_throwIfNotLoaded("title", this._T, _typeDocumentProperties, this._isNull);
return this._T;
},
set: function (value) {
/* Begin_PlaceHolder_DocumentProperties_Title_set */
/* End_PlaceHolder_DocumentProperties_Title_set */
this._T = value;
_invokeSetProperty(this, "Title", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "author" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "category" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "comments" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "company" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "customProperties" /* COLLECTION; Collections may not have a "SET" method */,
// * "keywords" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "manager" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "revisionNumber" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "subject" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "title" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
DocumentProperties.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_DocumentProperties_HandleResult */
/* End_PlaceHolder_DocumentProperties_HandleResult */
if (!_isUndefined(obj["Author"])) {
this._A = obj["Author"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Author */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Author */
}
if (!_isUndefined(obj["Category"])) {
this._C = obj["Category"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Category */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Category */
}
if (!_isUndefined(obj["Comments"])) {
this._Co = obj["Comments"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Comments */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Comments */
}
if (!_isUndefined(obj["Company"])) {
this._Com = obj["Company"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Company */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Company */
}
if (!_isUndefined(obj["CreationDate"])) {
this._Cr = _adjustToDateTime(obj["CreationDate"]);
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_CreationDate */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_CreationDate */
}
if (!_isUndefined(obj["Keywords"])) {
this._K = obj["Keywords"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Keywords */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Keywords */
}
if (!_isUndefined(obj["LastAuthor"])) {
this._L = obj["LastAuthor"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_LastAuthor */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_LastAuthor */
}
if (!_isUndefined(obj["Manager"])) {
this._M = obj["Manager"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Manager */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Manager */
}
if (!_isUndefined(obj["RevisionNumber"])) {
this._R = obj["RevisionNumber"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_RevisionNumber */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_RevisionNumber */
}
if (!_isUndefined(obj["Subject"])) {
this._S = obj["Subject"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Subject */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Subject */
}
if (!_isUndefined(obj["Title"])) {
this._T = obj["Title"];
/* Begin_PlaceHolder_DocumentProperties_HandleResult_Prop_Title */
/* End_PlaceHolder_DocumentProperties_HandleResult_Prop_Title */
}
_handleNavigationPropertyResults(this, obj, ["customProperties", "CustomProperties"]);
};
DocumentProperties.prototype.load = function (options) {
return _load(this, options);
};
DocumentProperties.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
DocumentProperties.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
if (_isNullOrUndefined(value))
return;
var obj = value;
/* Begin_PlaceHolder_DocumentProperties_HandleRetrieveResult */
/* End_PlaceHolder_DocumentProperties_HandleRetrieveResult */
if (!_isUndefined(obj["CreationDate"])) {
obj["creationDate"] = _adjustToDateTime(obj["creationDate"]);
}
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object.
*/
DocumentProperties.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
DocumentProperties.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
DocumentProperties.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return DocumentProperties;
}(OfficeExtension.ClientObject));
PowerPoint.DocumentProperties = DocumentProperties;
var _typeExperiment = "Experiment";
/* Begin_PlaceHolder_Experiment_BeforeDeclaration */
/* End_PlaceHolder_Experiment_BeforeDeclaration */
/**
* Sandbox container for new or incubating internal operations from the PowerPoint agent.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
var Experiment = /** @class */ (function (_super) {
__extends(Experiment, _super);
function Experiment() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(Experiment.prototype, "_className", {
get: function () {
return "Experiment";
},
enumerable: true,
configurable: true
});
Object.defineProperty(Experiment.prototype, "_scalarPropertyNames", {
get: function () {
return ["id"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Experiment.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Id"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(Experiment.prototype, "id", {
/**
* Gets the ID of the `Experiment` container. Used by the eventing infrastructure as the target ID for `actionCompleted` registration.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
get: function () {
/* Begin_PlaceHolder_Experiment_Id_get */
/* End_PlaceHolder_Experiment_Id_get */
_throwIfNotLoaded("id", this._I, _typeExperiment, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
/**
* Executes an experimental internal operation defined by the payload. The payload is expected to be generated by the PowerPoint agent.
Returns a custom payload as a response to running the operation.
Throws an `InvalidArgument` exception if `action` isn't a recognized category, or if `payload` can't be recognized or applied in the current document state.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param action Category of the payload that defines how the payload should be processed. Throws an `InvalidArgument` exception if the action isn't a recognized category.
* @param payload Custom payload to execute operations within the host. Throws an `InvalidArgument` exception if the payload can't be recognized or applied in the current document state.
*/
Experiment.prototype.runAction = function (action, payload) {
/* Begin_PlaceHolder_Experiment_RunAction */
/* End_PlaceHolder_Experiment_RunAction */
return _invokeMethod(this, "RunAction", 0 /* Default */, [action, payload], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Asynchronously runs experimental internal operations defined by the payload. Raises the `actionCompleted` event when execution completes.
Returns the `requestId`, which will be provided with the {@link PowerPoint.ExperimentActionCompletedEventArgs} when execution completes. This `requestId` can be used to wait for the results.
Throws an `InvalidArgument` exception if `action` isn't a recognized category, or if `payload` can't be recognized or applied in the current document state.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @param action Category of the payload that defines how the payload should be processed. Throws an `InvalidArgument` exception if the action isn't a recognized category.
* @param payload Custom payload to run operations within the host. Throws an `InvalidArgument` exception if the payload can't be recognized or applied in the current document state.
*/
Experiment.prototype.runActionAsync = function (action, payload) {
/* Begin_PlaceHolder_Experiment_RunActionAsync */
/* End_PlaceHolder_Experiment_RunActionAsync */
return _invokeMethod(this, "RunActionAsync", 0 /* Default */, [action, payload], 1 /* restrictedResourceAccess */, 0 /* none */);
};
/**
* Register Event actionCompleted
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
Experiment.prototype._RegisterEventActionCompleted = function () {
/* Begin_PlaceHolder_Experiment__RegisterEventActionCompleted */
/* End_PlaceHolder_Experiment__RegisterEventActionCompleted */
_invokeMethod(this, "_RegisterEventActionCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/**
* Register Event actionCompleted
*
* @remarks
* [Api set: PowerPointApi 99.9]
*/
Experiment.prototype._UnregisterEventActionCompleted = function () {
/* Begin_PlaceHolder_Experiment__UnregisterEventActionCompleted */
/* End_PlaceHolder_Experiment__UnregisterEventActionCompleted */
_invokeMethod(this, "_UnregisterEventActionCompleted", 0 /* Default */, [], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
Experiment.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_Experiment_HandleResult */
/* End_PlaceHolder_Experiment_HandleResult */
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_Experiment_HandleResult_Prop_Id */
/* End_PlaceHolder_Experiment_HandleResult_Prop_Id */
}
};
Experiment.prototype.load = function (options) {
return _load(this, options);
};
Experiment.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
Experiment.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_Experiment_HandleIdResult_Prop_Id */
/* End_PlaceHolder_Experiment_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
Experiment.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_Experiment_HandleRetrieveResult */
/* End_PlaceHolder_Experiment_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
Object.defineProperty(Experiment.prototype, "onActionCompleted", {
/**
* Occurs when the background operation started by `runActionAsync` has finished.
*
* @remarks
* [Api set: PowerPointApi 99.9]
*
* @eventproperty
*/
get: function () {
// Event - Experiment ActionCompleted PowerPoint.ExperimentActionCompletedEventArgs
var _this = this;
if (!this.m_actionCompleted) {
this.m_actionCompleted = new OfficeExtension.GenericEventHandlers(this.context, this, "ActionCompleted", {
eventType: 5 /* experimentActionCompletedEvent */,
registerFunc: function () { return _this._RegisterEventActionCompleted(); },
unregisterFunc: function () { return _this._UnregisterEventActionCompleted(); },
getTargetIdFunc: function () { return _this.id; },
eventArgsTransformFunc: function (value) {
var event = {
requestId: value.requestId,
result: value.result
};
return OfficeExtension.Utility._createPromiseFromResult(event);
}
});
}
return this.m_actionCompleted;
},
enumerable: true,
configurable: true
});
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.Experiment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.ExperimentData`) that contains shallow copies of any loaded child properties from the original object.
*/
Experiment.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
Experiment.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
Experiment.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return Experiment;
}(OfficeExtension.ClientObject));
PowerPoint.Experiment = Experiment;
/* Begin_PlaceHolder_InsertSlideFormatting_BeforeDeclaration */
/* End_PlaceHolder_InsertSlideFormatting_BeforeDeclaration */
/**
* Specifies the formatting options for when slides are inserted.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
var InsertSlideFormatting;
(function (InsertSlideFormatting) {
/**
* Copy the source theme into the target presentation and use that theme.
* @remarks
* [Api set: PowerPointApi 1.2]
*/
InsertSlideFormatting["keepSourceFormatting"] = "KeepSourceFormatting";
/**
* Use the existing theme in the target presentation.
* @remarks
* [Api set: PowerPointApi 1.2]
*/
InsertSlideFormatting["useDestinationTheme"] = "UseDestinationTheme";
})(InsertSlideFormatting = PowerPoint.InsertSlideFormatting || (PowerPoint.InsertSlideFormatting = {}));
/* Begin_PlaceHolder_InsertSlideOptions_AfterDeclaration */
/* End_PlaceHolder_InsertSlideOptions_AfterDeclaration */
/* Begin_PlaceHolder_LabelingCapability_BeforeDeclaration */
/* End_PlaceHolder_LabelingCapability_BeforeDeclaration */
/**
* Specifies a labeling capability.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var LabelingCapability;
(function (LabelingCapability) {
/**
* Represents there's no valid licenses.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
LabelingCapability["noLicense"] = "NoLicense";
/**
* Represents labeling being disabled.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
LabelingCapability["labelingDisabled"] = "LabelingDisabled";
/**
* Represents labeling policy not found.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
LabelingCapability["labelingPolicyNotFound"] = "LabelingPolicyNotFound";
/**
* Represents labeling being enabled.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
LabelingCapability["labelingEnabled"] = "LabelingEnabled";
/**
* Represents attribute-based access control (ABAC) being supported by the host. When returned with `labelingEnabled`, an add-in may use ABAC-specific APIs on sensitivity labels.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
LabelingCapability["attributeBasedAccessControlEnabled"] = "AttributeBasedAccessControlEnabled";
})(LabelingCapability = PowerPoint.LabelingCapability || (PowerPoint.LabelingCapability = {}));
/* Begin_PlaceHolder_LabelingCapability_AfterDeclaration */
/* End_PlaceHolder_LabelingCapability_AfterDeclaration */
var _typePageSetup = "PageSetup";
/* Begin_PlaceHolder_PageSetup_BeforeDeclaration */
/* End_PlaceHolder_PageSetup_BeforeDeclaration */
/**
* Represents the page setup information for the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
var PageSetup = /** @class */ (function (_super) {
__extends(PageSetup, _super);
function PageSetup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(PageSetup.prototype, "_className", {
get: function () {
return "PageSetup";
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageSetup.prototype, "_scalarPropertyNames", {
get: function () {
return ["slideHeight", "slideWidth"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageSetup.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["SlideHeight", "SlideWidth"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageSetup.prototype, "_scalarPropertyUpdateable", {
get: function () {
return [true, true];
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageSetup.prototype, "slideHeight", {
/* Begin_PlaceHolder_PageSetup_Custom_Members */
/* End_PlaceHolder_PageSetup_Custom_Members */
/**
* Specifies the height of the slides in the presentation, in points.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_PageSetup_SlideHeight_get */
/* End_PlaceHolder_PageSetup_SlideHeight_get */
_throwIfNotLoaded("slideHeight", this._S, _typePageSetup, this._isNull);
return this._S;
},
set: function (value) {
/* Begin_PlaceHolder_PageSetup_SlideHeight_set */
/* End_PlaceHolder_PageSetup_SlideHeight_set */
this._S = value;
_invokeSetProperty(this, "SlideHeight", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
Object.defineProperty(PageSetup.prototype, "slideWidth", {
/**
* Specifies the width of the slides in the presentation, in points.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*/
get: function () {
/* Begin_PlaceHolder_PageSetup_SlideWidth_get */
/* End_PlaceHolder_PageSetup_SlideWidth_get */
_throwIfNotLoaded("slideWidth", this._Sl, _typePageSetup, this._isNull);
return this._Sl;
},
set: function (value) {
/* Begin_PlaceHolder_PageSetup_SlideWidth_set */
/* End_PlaceHolder_PageSetup_SlideWidth_set */
this._Sl = value;
_invokeSetProperty(this, "SlideWidth", value, 0 /* none */);
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "slideHeight" /* SCALAR; EXPLICITLY non-JSON-stringify */,
// * "slideWidth" /* SCALAR; EXPLICITLY non-JSON-stringify */
/** Handle results returned from the document
* @private
*/
PageSetup.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_PageSetup_HandleResult */
/* End_PlaceHolder_PageSetup_HandleResult */
if (!_isUndefined(obj["SlideHeight"])) {
this._S = obj["SlideHeight"];
/* Begin_PlaceHolder_PageSetup_HandleResult_Prop_SlideHeight */
/* End_PlaceHolder_PageSetup_HandleResult_Prop_SlideHeight */
}
if (!_isUndefined(obj["SlideWidth"])) {
this._Sl = obj["SlideWidth"];
/* Begin_PlaceHolder_PageSetup_HandleResult_Prop_SlideWidth */
/* End_PlaceHolder_PageSetup_HandleResult_Prop_SlideWidth */
}
};
PageSetup.prototype.load = function (options) {
return _load(this, options);
};
PageSetup.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
PageSetup.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_PageSetup_HandleRetrieveResult */
/* End_PlaceHolder_PageSetup_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.PageSetup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.PageSetupData`) that contains shallow copies of any loaded child properties from the original object.
*/
PageSetup.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
/**
* Set mock data
*/
PageSetup.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
PageSetup.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return PageSetup;
}(OfficeExtension.ClientObject));
PowerPoint.PageSetup = PageSetup;
/* Begin_PlaceHolder_SensitivityLabelAbacAttributeValue_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelAbacAttributeValue_AfterDeclaration */
var _typeSensitivityLabelDetailsCollection = "SensitivityLabelDetailsCollection";
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_BeforeDeclaration */
/**
* Represents the collection of {@link PowerPoint.SensitivityLabelDetails} objects.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelDetailsCollection = /** @class */ (function (_super) {
__extends(SensitivityLabelDetailsCollection, _super);
function SensitivityLabelDetailsCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SensitivityLabelDetailsCollection.prototype, "_className", {
get: function () {
return "SensitivityLabelDetailsCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetailsCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetailsCollection.prototype, "items", {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_Custom_Members */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_items */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeSensitivityLabelDetailsCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because SensitivityLabelDetailsCollection is a collection.
/**
* Gets the number of {@link PowerPoint.SensitivityLabelDetails} objects in this collection.
*
* @remarks
* [Api set: PowerPointApi 1.11]
* @returns The number of `SensitivityLabelDetails` objects.
*/
SensitivityLabelDetailsCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_GetCount */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the specified `SensitivityLabelDetails` object in this collection. Throws an `ItemNotFound` error if an item with the specified ID isn't found.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the sensitivity label.
* @returns The specified `SensitivityLabelDetails` object.
*/
SensitivityLabelDetailsCollection.prototype.getItem = function (id) {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_GetItem */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_GetItem */
return _createIndexerObject(PowerPoint.SensitivityLabelDetails, this, [id]);
};
/**
* Gets the `SensitivityLabelDetails` object at the specified index in this collection. Throws an `IndexOutOfRange` error if the index is out of range.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param index The index of the item to retrieve. Zero-indexed.
* @returns The `SensitivityLabelDetails` object at the specified index.
*/
SensitivityLabelDetailsCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_GetItemAt */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_GetItemAt */
return _createMethodObject(PowerPoint.SensitivityLabelDetails, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets the specified `SensitivityLabelDetails` object in this collection. If an item with the specified ID isn't found, 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}.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param id The ID of the sensitivity label.
* @returns The specified `SensitivityLabelDetails` object.
*/
SensitivityLabelDetailsCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_GetItemOrNullObject */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.SensitivityLabelDetails, this, "GetItemOrNullObject", 1 /* Read */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/** Handle results returned from the document
* @private
*/
SensitivityLabelDetailsCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_HandleResult */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_HandleResult */
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(PowerPoint.SensitivityLabelDetails, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
SensitivityLabelDetailsCollection.prototype.load = function (options) {
return _load(this, options);
};
SensitivityLabelDetailsCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SensitivityLabelDetailsCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_HandleRetrieveResult */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.SensitivityLabelDetails, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SensitivityLabelDetailsCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SensitivityLabelDetailsCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
*/
SensitivityLabelDetailsCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
SensitivityLabelDetailsCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.SensitivityLabelDetails, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return SensitivityLabelDetailsCollection;
}(OfficeExtension.ClientObject));
PowerPoint.SensitivityLabelDetailsCollection = SensitivityLabelDetailsCollection;
/* Begin_PlaceHolder_SensitivityLabelDetailsCollection_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelDetailsCollection_AfterDeclaration */
/* Begin_PlaceHolder_SensitivityLabelProtectionType_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelProtectionType_BeforeDeclaration */
/**
* Represents the protection type.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelProtectionType;
(function (SensitivityLabelProtectionType) {
/**
* No protection is applied by this label.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelProtectionType["noProtection"] = "NoProtection";
/**
* Protection is defined by an administrator.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelProtectionType["adminDefined"] = "AdminDefined";
/**
* Protection is defined by the user.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelProtectionType["userDefined"] = "UserDefined";
})(SensitivityLabelProtectionType = PowerPoint.SensitivityLabelProtectionType || (PowerPoint.SensitivityLabelProtectionType = {}));
/* Begin_PlaceHolder_SensitivityLabelProtectionType_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelProtectionType_AfterDeclaration */
var _typeSensitivityLabelDetails = "SensitivityLabelDetails";
/* Begin_PlaceHolder_SensitivityLabelDetails_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelDetails_BeforeDeclaration */
/**
* Represents the properties of available sensitivity labels in PowerPoint.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelDetails = /** @class */ (function (_super) {
__extends(SensitivityLabelDetails, _super);
function SensitivityLabelDetails() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SensitivityLabelDetails.prototype, "_className", {
get: function () {
return "SensitivityLabelDetails";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "_scalarPropertyNames", {
get: function () {
return ["color", "id", "name", "order", "siteId", "tooltip", "isEnabled", "protectionType", "isAbacAttributesRequired", "isAbacEnabled", "abacAttributeValues"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "_scalarPropertyOriginalNames", {
get: function () {
return ["Color", "Id", "Name", "Order", "SiteId", "Tooltip", "IsEnabled", "ProtectionType", "IsAbacAttributesRequired", "IsAbacEnabled", "AbacAttributeValues"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "_navigationPropertyNames", {
get: function () {
return ["children"];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "children", {
/* Begin_PlaceHolder_SensitivityLabelDetails_Custom_Members */
/* End_PlaceHolder_SensitivityLabelDetails_Custom_Members */
/**
* Gets the sublabels of the sensitivity label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Children_get */
/* End_PlaceHolder_SensitivityLabelDetails_Children_get */
if (!this._C) {
this._C = _createPropertyObject(PowerPoint.SensitivityLabelDetailsCollection, this, "Children", true /*isCollection*/, 4 /* concurrent */);
}
/* Begin_PlaceHolder_SensitivityLabelDetails_Children_get_post */
/* End_PlaceHolder_SensitivityLabelDetails_Children_get_post */
return this._C;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "abacAttributeValues", {
/**
* Gets the attribute-based access control (ABAC) attribute values currently applied to this sensitivity label. Returns an empty array when no ABAC attributes are applied or this label is not ABAC-enabled.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_AbacAttributeValues_get */
/* End_PlaceHolder_SensitivityLabelDetails_AbacAttributeValues_get */
_throwIfNotLoaded("abacAttributeValues", this._A, _typeSensitivityLabelDetails, this._isNull);
return this._A;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "color", {
/**
* Gets the color of the sensitivity label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Color_get */
/* End_PlaceHolder_SensitivityLabelDetails_Color_get */
_throwIfNotLoaded("color", this._Co, _typeSensitivityLabelDetails, this._isNull);
return this._Co;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "id", {
/**
* Gets the unique ID of the sensitivity label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Id_get */
/* End_PlaceHolder_SensitivityLabelDetails_Id_get */
_throwIfNotLoaded("id", this._I, _typeSensitivityLabelDetails, this._isNull);
return this._I;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "isAbacAttributesRequired", {
/**
* Gets whether ABAC attribute selections are required to apply this label. If `true`, callers must supply attribute values when applying the label; otherwise the update result has a `status` of `SensitivityLabelUpdateStatus.abacAttributesRequired`.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_IsAbacAttributesRequired_get */
/* End_PlaceHolder_SensitivityLabelDetails_IsAbacAttributesRequired_get */
_throwIfNotLoaded("isAbacAttributesRequired", this._Is, _typeSensitivityLabelDetails, this._isNull);
return this._Is;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "isAbacEnabled", {
/**
* Gets whether this label is attribute-based access control (ABAC) enabled. Returns `false` when the host's labeling capabilities don't include `attributeBasedAccessControlEnabled`.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_IsAbacEnabled_get */
/* End_PlaceHolder_SensitivityLabelDetails_IsAbacEnabled_get */
_throwIfNotLoaded("isAbacEnabled", this._IsA, _typeSensitivityLabelDetails, this._isNull);
return this._IsA;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "isEnabled", {
/**
* Gets a value indicating whether the label is enabled.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_IsEnabled_get */
/* End_PlaceHolder_SensitivityLabelDetails_IsEnabled_get */
_throwIfNotLoaded("isEnabled", this._IsE, _typeSensitivityLabelDetails, this._isNull);
return this._IsE;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "name", {
/**
* Gets the name of the sensitivity label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Name_get */
/* End_PlaceHolder_SensitivityLabelDetails_Name_get */
_throwIfNotLoaded("name", this._N, _typeSensitivityLabelDetails, this._isNull);
return this._N;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "order", {
/**
* Gets the priority of the sensitivity label, with 0 as lowest priority.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Order_get */
/* End_PlaceHolder_SensitivityLabelDetails_Order_get */
_throwIfNotLoaded("order", this._O, _typeSensitivityLabelDetails, this._isNull);
return this._O;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "protectionType", {
/**
* Gets a value indicating the protection type provided by this label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_ProtectionType_get */
/* End_PlaceHolder_SensitivityLabelDetails_ProtectionType_get */
_throwIfNotLoaded("protectionType", this._P, _typeSensitivityLabelDetails, this._isNull);
return this._P;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "siteId", {
/**
* Gets the unique ID of the tenant which the sensitivity label is belonged.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_SiteId_get */
/* End_PlaceHolder_SensitivityLabelDetails_SiteId_get */
_throwIfNotLoaded("siteId", this._S, _typeSensitivityLabelDetails, this._isNull);
return this._S;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SensitivityLabelDetails.prototype, "tooltip", {
/**
* Gets the description of the sensitivity label.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
get: function () {
/* Begin_PlaceHolder_SensitivityLabelDetails_Tooltip_get */
/* End_PlaceHolder_SensitivityLabelDetails_Tooltip_get */
_throwIfNotLoaded("tooltip", this._T, _typeSensitivityLabelDetails, this._isNull);
return this._T;
},
enumerable: true,
configurable: true
});
// SET method is absent, because no settable properties on self or children.
// * "children" /* COLLECTION; Collections may not have a "SET" method */
/** Handle results returned from the document
* @private
*/
SensitivityLabelDetails.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult */
if (!_isUndefined(obj["AbacAttributeValues"])) {
this._A = obj["AbacAttributeValues"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_AbacAttributeValues */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_AbacAttributeValues */
}
if (!_isUndefined(obj["Color"])) {
this._Co = obj["Color"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Color */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Color */
}
if (!_isUndefined(obj["Id"])) {
this._I = obj["Id"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Id */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Id */
}
if (!_isUndefined(obj["IsAbacAttributesRequired"])) {
this._Is = obj["IsAbacAttributesRequired"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsAbacAttributesRequired */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsAbacAttributesRequired */
}
if (!_isUndefined(obj["IsAbacEnabled"])) {
this._IsA = obj["IsAbacEnabled"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsAbacEnabled */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsAbacEnabled */
}
if (!_isUndefined(obj["IsEnabled"])) {
this._IsE = obj["IsEnabled"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsEnabled */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_IsEnabled */
}
if (!_isUndefined(obj["Name"])) {
this._N = obj["Name"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Name */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Name */
}
if (!_isUndefined(obj["Order"])) {
this._O = obj["Order"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Order */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Order */
}
if (!_isUndefined(obj["ProtectionType"])) {
this._P = obj["ProtectionType"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_ProtectionType */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_ProtectionType */
}
if (!_isUndefined(obj["SiteId"])) {
this._S = obj["SiteId"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_SiteId */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_SiteId */
}
if (!_isUndefined(obj["Tooltip"])) {
this._T = obj["Tooltip"];
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Tooltip */
/* End_PlaceHolder_SensitivityLabelDetails_HandleResult_Prop_Tooltip */
}
_handleNavigationPropertyResults(this, obj, ["children", "Children"]);
};
SensitivityLabelDetails.prototype.load = function (options) {
return _load(this, options);
};
SensitivityLabelDetails.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle identity results returned from the document
* @private
*/
SensitivityLabelDetails.prototype._handleIdResult = function (value) {
_super.prototype._handleIdResult.call(this, value);
if (_isNullOrUndefined(value)) {
return;
}
if (!_isUndefined(value["Id"])) {
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleIdResult_Prop_Id */
/* End_PlaceHolder_SensitivityLabelDetails_HandleIdResult_Prop_Id */
this._I = value["Id"];
}
};
/** Handle retrieve results
* @private
*/
SensitivityLabelDetails.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SensitivityLabelDetails_HandleRetrieveResult */
/* End_PlaceHolder_SensitivityLabelDetails_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SensitivityLabelDetails` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SensitivityLabelDetailsData`) that contains shallow copies of any loaded child properties from the original object.
*/
SensitivityLabelDetails.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {
"abacAttributeValues": this._A,
"color": this._Co,
"id": this._I,
"isAbacAttributesRequired": this._Is,
"isAbacEnabled": this._IsA,
"isEnabled": this._IsE,
"name": this._N,
"order": this._O,
"protectionType": this._P,
"siteId": this._S,
"tooltip": this._T,
},
/* navigationProperties: */ {
"children": this._C,
});
};
/**
* Set mock data
*/
SensitivityLabelDetails.prototype.setMockData = function (data) {
_setMockData(this, data);
};
/**
* Queues up a command to ensure the object's state is not changed.
*/
SensitivityLabelDetails.prototype.ensureUnchanged = function (data) {
_invokeEnsureUnchanged(this, data);
return;
};
return SensitivityLabelDetails;
}(OfficeExtension.ClientObject));
PowerPoint.SensitivityLabelDetails = SensitivityLabelDetails;
/* Begin_PlaceHolder_SensitivityLabelDetails_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelDetails_AfterDeclaration */
/* Begin_PlaceHolder_SensitivityLabelUpdateStatus_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelUpdateStatus_BeforeDeclaration */
/**
* Represents the outcome status of an attempt to update the sensitivity label on the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelUpdateStatus;
(function (SensitivityLabelUpdateStatus) {
/**
* The sensitivity label was successfully updated.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["success"] = "Success";
/**
* The update failed due to an unspecified error.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["unspecifiedFailure"] = "UnspecifiedFailure";
/**
* The specified sensitivity label could not be found.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["labelNotFound"] = "LabelNotFound";
/**
* The presentation is read-only and can't be modified.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["documentReadOnly"] = "DocumentReadOnly";
/**
* The user does not have sufficient permissions to update the label.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["insufficientPermission"] = "InsufficientPermission";
/**
* The label update failed due to unsupported Double Key Encryption (DKE).
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["unsupportedDoubleKeyEncryption"] = "UnsupportedDoubleKeyEncryption";
/**
* The label update failed because native labeling is not enabled for the user or installed SKU.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["labelingDisabled"] = "LabelingDisabled";
/**
* The label update failed because the user's identity could not be found to validate for applying a label.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["userNotFound"] = "UserNotFound";
/**
* The label update failed due to unsupported User-defined Permissions (UDP).
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["unsupportedUdp"] = "UnsupportedUdp";
/**
* The label update failed because the specified label is a parent label, which cannot be applied.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["parentLabelNotSupported"] = "ParentLabelNotSupported";
/**
* The label update failed because the document doesn't belong to the same tenant as the user.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["crossTenant"] = "CrossTenant";
/**
* ABAC attribute values were supplied, but the target label is not ABAC-enabled.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["abacAttributesNotAllowed"] = "AbacAttributesNotAllowed";
/**
* The target label is ABAC-enabled and requires attribute selections, but no ABAC attribute values were supplied.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["abacAttributesRequired"] = "AbacAttributesRequired";
/**
* The label update failed due to unsupported attribute-based access control (ABAC).
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["unsupportedAbac"] = "UnsupportedAbac";
/**
* The label update failed because the specified label is disabled or not applicable to the user.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["labelDisabled"] = "LabelDisabled";
/**
* The label update failed because removing the sensitivity label is not supported.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelUpdateStatus["removingLabelNotSupported"] = "RemovingLabelNotSupported";
})(SensitivityLabelUpdateStatus = PowerPoint.SensitivityLabelUpdateStatus || (PowerPoint.SensitivityLabelUpdateStatus = {}));
/* Begin_PlaceHolder_SensitivityLabelUpdateResult_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelUpdateResult_AfterDeclaration */
/* Begin_PlaceHolder_SensitivityLabelAbacAttributeDataType_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabelAbacAttributeDataType_BeforeDeclaration */
/**
* Represents the data type of an attribute-based access control (ABAC) attribute.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabelAbacAttributeDataType;
(function (SensitivityLabelAbacAttributeDataType) {
/**
* The data type is unknown or not recognized.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelAbacAttributeDataType["unknown"] = "Unknown";
/**
* The attribute value is a string.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelAbacAttributeDataType["stringValue"] = "StringValue";
/**
* The attribute value is Boolean.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelAbacAttributeDataType["booleanValue"] = "BooleanValue";
/**
* The attribute value is a number.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelAbacAttributeDataType["numberValue"] = "NumberValue";
/**
* The attribute value is a date.
* @remarks
* [Api set: PowerPointApi 1.11]
*/
SensitivityLabelAbacAttributeDataType["dateValue"] = "DateValue";
})(SensitivityLabelAbacAttributeDataType = PowerPoint.SensitivityLabelAbacAttributeDataType || (PowerPoint.SensitivityLabelAbacAttributeDataType = {}));
/* Begin_PlaceHolder_SensitivityLabelTryUpdateOptions_AfterDeclaration */
/* End_PlaceHolder_SensitivityLabelTryUpdateOptions_AfterDeclaration */
var _typeSensitivityLabel = "SensitivityLabel";
/* Begin_PlaceHolder_SensitivityLabel_BeforeDeclaration */
/* End_PlaceHolder_SensitivityLabel_BeforeDeclaration */
/**
* Represents the sensitivity label on the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*/
var SensitivityLabel = /** @class */ (function (_super) {
__extends(SensitivityLabel, _super);
function SensitivityLabel() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SensitivityLabel.prototype, "_className", {
get: function () {
return "SensitivityLabel";
},
enumerable: true,
configurable: true
});
/* Begin_PlaceHolder_SensitivityLabel_Custom_Members */
/* End_PlaceHolder_SensitivityLabel_Custom_Members */
// SET method is absent, because no settable properties on self or children.
/**
* Gets the current label information that exists on the presentation for the user.
If there's no sensitivity label on the current presentation, 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.11]
* @returns The current `SensitivityLabelDetails` object.
*/
SensitivityLabel.prototype.getCurrentOrNullObject = function () {
/* Begin_PlaceHolder_SensitivityLabel_GetCurrentOrNullObject */
/* End_PlaceHolder_SensitivityLabel_GetCurrentOrNullObject */
return _createMethodObject(PowerPoint.SensitivityLabelDetails, this, "GetCurrentOrNullObject", 1 /* Read */, [], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Tries to update to the provided sensitivity label on the presentation for the user. For ABAC-enabled labels, pass the desired attribute selections via `options.abacAttributes`.
*
* @remarks
* [Api set: PowerPointApi 1.11]
*
* @param labelId The ID of the label to apply.
* @param options Optional. Additional inputs that influence the update, such as ABAC attribute selections for ABAC-enabled labels.
* @returns The `SensitivityLabelUpdateResult` object.
*/
SensitivityLabel.prototype.tryToUpdate = function (labelId, options) {
/* Begin_PlaceHolder_SensitivityLabel_TryToUpdate */
/* End_PlaceHolder_SensitivityLabel_TryToUpdate */
return _invokeMethod(this, "TryToUpdate", 0 /* Default */, [labelId, options], 0 /* none */, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SensitivityLabel.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SensitivityLabel_HandleResult */
/* End_PlaceHolder_SensitivityLabel_HandleResult */
};
/** Handle retrieve results
* @private
*/
SensitivityLabel.prototype._handleRetrieveResult = function (value, result) {
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SensitivityLabel_HandleRetrieveResult */
/* End_PlaceHolder_SensitivityLabel_HandleRetrieveResult */
_processRetrieveResult(this, value, result);
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.)
* Whereas the original `PowerPoint.SensitivityLabel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `PowerPoint.Interfaces.SensitivityLabelData`) that contains shallow copies of any loaded child properties from the original object.
*/
SensitivityLabel.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {});
};
return SensitivityLabel;
}(OfficeExtension.ClientObject));
PowerPoint.SensitivityLabel = SensitivityLabel;
var _typeSlideCollection = "SlideCollection";
/* Begin_PlaceHolder_SlideCollection_BeforeDeclaration */
/* End_PlaceHolder_SlideCollection_BeforeDeclaration */
/**
* Represents the collection of slides in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.2]
*/
var SlideCollection = /** @class */ (function (_super) {
__extends(SlideCollection, _super);
function SlideCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideCollection.prototype, "_className", {
get: function () {
return "SlideCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideCollection.prototype, "items", {
/* Begin_PlaceHolder_SlideCollection_Custom_Members */
/* End_PlaceHolder_SlideCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_SlideCollection_items */
/* End_PlaceHolder_SlideCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeSlideCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because SlideCollection is a collection.
/**
* Adds a new slide to the collection.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*
* @param options Optional. Options for configuring the properties of the new slide.
*/
SlideCollection.prototype.add = function (options) {
/* Begin_PlaceHolder_SlideCollection_Add */
/* End_PlaceHolder_SlideCollection_Add */
_throwIfApiNotSupported("SlideCollection.add", _defaultApiSetName, "1.3", _hostName);
_invokeMethod(this, "Add", 0 /* Default */, [options], 0 /* none */, 0 /* none */);
};
/**
* Exports one or more slides found in this collection to their own presentation file, returned as Base64-encoded data.
Throws an `InvalidArgument` exception if provided slide IDs or `Slide` objects are not found in this collection.
*
* @remarks
* [Api set: PowerPointApi 1.10]
*
* @param values An array of slide IDs or `Slide` objects.
* @returns A Base64-encoded string.
*/
SlideCollection.prototype.exportAsBase64Presentation = function (values) {
/* Begin_PlaceHolder_SlideCollection_ExportAsBase64Presentation */
/* End_PlaceHolder_SlideCollection_ExportAsBase64Presentation */
_throwIfApiNotSupported("SlideCollection.exportAsBase64Presentation", _defaultApiSetName, "1.10", _hostName);
return _invokeMethod(this, "ExportAsBase64Presentation", 1 /* Read */, [values], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the number of slides in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.2]
* @returns The number of slides in the collection.
*/
SlideCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_SlideCollection_GetCount */
/* End_PlaceHolder_SlideCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* 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 doesn't exist, an error is thrown.
*/
SlideCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_SlideCollection_GetItem */
/* End_PlaceHolder_SlideCollection_GetItem */
return _createIndexerObject(PowerPoint.Slide, this, [key]);
};
/**
* 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.
*/
SlideCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_SlideCollection_GetItemAt */
/* End_PlaceHolder_SlideCollection_GetItemAt */
return _createMethodObject(PowerPoint.Slide, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a slide using its unique ID. If such a slide doesn't 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.
*/
SlideCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_SlideCollection_GetItemOrNullObject */
/* End_PlaceHolder_SlideCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Slide, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideCollection_HandleResult */
/* End_PlaceHolder_SlideCollection_HandleResult */
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(PowerPoint.Slide, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
SlideCollection.prototype.load = function (options) {
return _load(this, options);
};
SlideCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideCollection_HandleRetrieveResult */
/* End_PlaceHolder_SlideCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Slide, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
SlideCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Slide, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return SlideCollection;
}(OfficeExtension.ClientObject));
PowerPoint.SlideCollection = SlideCollection;
/* Begin_PlaceHolder_SlideCollection_AfterDeclaration */
/* End_PlaceHolder_SlideCollection_AfterDeclaration */
var _typeSlideScopedCollection = "SlideScopedCollection";
/* Begin_PlaceHolder_SlideScopedCollection_BeforeDeclaration */
/* End_PlaceHolder_SlideScopedCollection_BeforeDeclaration */
/**
* Represents a collection of slides in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*/
var SlideScopedCollection = /** @class */ (function (_super) {
__extends(SlideScopedCollection, _super);
function SlideScopedCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideScopedCollection.prototype, "_className", {
get: function () {
return "SlideScopedCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideScopedCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideScopedCollection.prototype, "items", {
/* Begin_PlaceHolder_SlideScopedCollection_Custom_Members */
/* End_PlaceHolder_SlideScopedCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_SlideScopedCollection_items */
/* End_PlaceHolder_SlideScopedCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeSlideScopedCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because SlideScopedCollection is a collection.
/**
* Exports all slides in this collection to their own presentation file, returned as Base64-encoded data.
*
* @remarks
* [Api set: PowerPointApi 1.10]
* @returns A Base64-encoded string.
*/
SlideScopedCollection.prototype.exportAsBase64Presentation = function () {
/* Begin_PlaceHolder_SlideScopedCollection_ExportAsBase64Presentation */
/* End_PlaceHolder_SlideScopedCollection_ExportAsBase64Presentation */
_throwIfApiNotSupported("SlideScopedCollection.exportAsBase64Presentation", _defaultApiSetName, "1.10", _hostName);
return _invokeMethod(this, "ExportAsBase64Presentation", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets the number of slides in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.5]
* @returns The number of slides in the collection.
*/
SlideScopedCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_SlideScopedCollection_GetCount */
/* End_PlaceHolder_SlideScopedCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* Gets a slide using its unique ID.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*
* @param key The ID of the slide.
* @returns The slide with the unique ID. If such a slide doesn't exist, an error is thrown.
*/
SlideScopedCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_SlideScopedCollection_GetItem */
/* End_PlaceHolder_SlideScopedCollection_GetItem */
return _createIndexerObject(PowerPoint.Slide, this, [key]);
};
/**
* Gets a slide using its zero-based index in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.5]
*
* @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.
*/
SlideScopedCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_SlideScopedCollection_GetItemAt */
/* End_PlaceHolder_SlideScopedCollection_GetItemAt */
return _createMethodObject(PowerPoint.Slide, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a slide using its unique ID. If such a slide doesn't 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.5]
*
* @param id The ID of the slide.
* @returns The slide with the unique ID.
*/
SlideScopedCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_SlideScopedCollection_GetItemOrNullObject */
/* End_PlaceHolder_SlideScopedCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.Slide, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideScopedCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideScopedCollection_HandleResult */
/* End_PlaceHolder_SlideScopedCollection_HandleResult */
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(PowerPoint.Slide, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
SlideScopedCollection.prototype.load = function (options) {
return _load(this, options);
};
SlideScopedCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideScopedCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideScopedCollection_HandleRetrieveResult */
/* End_PlaceHolder_SlideScopedCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.Slide, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideScopedCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
SlideScopedCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.Slide, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return SlideScopedCollection;
}(OfficeExtension.ClientObject));
PowerPoint.SlideScopedCollection = SlideScopedCollection;
/* Begin_PlaceHolder_SlideSelectionChangedEventArgs_AfterDeclaration */
/* End_PlaceHolder_SlideSelectionChangedEventArgs_AfterDeclaration */
var _typeSlideMasterCollection = "SlideMasterCollection";
/* Begin_PlaceHolder_SlideMasterCollection_BeforeDeclaration */
/* End_PlaceHolder_SlideMasterCollection_BeforeDeclaration */
/**
* Represents the collection of Slide Masters in the presentation.
*
* @remarks
* [Api set: PowerPointApi 1.3]
*/
var SlideMasterCollection = /** @class */ (function (_super) {
__extends(SlideMasterCollection, _super);
function SlideMasterCollection() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(SlideMasterCollection.prototype, "_className", {
get: function () {
return "SlideMasterCollection";
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMasterCollection.prototype, "_isCollection", {
get: function () {
return true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SlideMasterCollection.prototype, "items", {
/* Begin_PlaceHolder_SlideMasterCollection_Custom_Members */
/* End_PlaceHolder_SlideMasterCollection_Custom_Members */
/** Gets the loaded child items in this collection. */
get: function () {
/* Begin_PlaceHolder_SlideMasterCollection_items */
/* End_PlaceHolder_SlideMasterCollection_items */
_throwIfNotLoaded("items", this.m__items, _typeSlideMasterCollection, this._isNull);
return this.m__items;
},
enumerable: true,
configurable: true
});
// SET method is absent, because SlideMasterCollection is a collection.
/**
* Gets the number of Slide Masters in the collection.
*
* @remarks
* [Api set: PowerPointApi 1.3]
* @returns The number of Slide Masters in the collection.
*/
SlideMasterCollection.prototype.getCount = function () {
/* Begin_PlaceHolder_SlideMasterCollection_GetCount */
/* End_PlaceHolder_SlideMasterCollection_GetCount */
return _invokeMethod(this, "GetCount", 1 /* Read */, [], 4 /* concurrent */, 0 /* none */);
};
/**
* 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 doesn't exist, an error is thrown.
*/
SlideMasterCollection.prototype.getItem = function (key) {
/* Begin_PlaceHolder_SlideMasterCollection_GetItem */
/* End_PlaceHolder_SlideMasterCollection_GetItem */
return _createIndexerObject(PowerPoint.SlideMaster, this, [key]);
};
/**
* 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.
*/
SlideMasterCollection.prototype.getItemAt = function (index) {
/* Begin_PlaceHolder_SlideMasterCollection_GetItemAt */
/* End_PlaceHolder_SlideMasterCollection_GetItemAt */
return _createMethodObject(PowerPoint.SlideMaster, this, "GetItemAt", 1 /* Read */, [index], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 4 /* concurrent */);
};
/**
* Gets a Slide Master using its unique ID. If such a Slide Master doesn't 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.
*/
SlideMasterCollection.prototype.getItemOrNullObject = function (id) {
/* Begin_PlaceHolder_SlideMasterCollection_GetItemOrNullObject */
/* End_PlaceHolder_SlideMasterCollection_GetItemOrNullObject */
return _createMethodObject(PowerPoint.SlideMaster, this, "GetItemOrNullObject", 0 /* Default */, [id], false /*isCollection*/, false /*isInvalidAfterRequest*/, null /*getByIdMethodName*/, 0 /* none */);
};
/** Handle results returned from the document
* @private
*/
SlideMasterCollection.prototype._handleResult = function (value) {
_super.prototype._handleResult.call(this, value);
if (_isNullOrUndefined(value))
return;
var obj = value;
_fixObjectPathIfNecessary(this, obj);
/* Begin_PlaceHolder_SlideMasterCollection_HandleResult */
/* End_PlaceHolder_SlideMasterCollection_HandleResult */
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(PowerPoint.SlideMaster, true, this, _data[i], i);
_item._handleResult(_data[i]);
this.m__items.push(_item);
}
}
};
SlideMasterCollection.prototype.load = function (options) {
return _load(this, options);
};
SlideMasterCollection.prototype.retrieve = function (option) {
return _retrieve(this, option);
};
/** Handle retrieve results
* @private
*/
SlideMasterCollection.prototype._handleRetrieveResult = function (value, result) {
var _this = this;
_super.prototype._handleRetrieveResult.call(this, value, result);
/* Begin_PlaceHolder_SlideMasterCollection_HandleRetrieveResult */
/* End_PlaceHolder_SlideMasterCollection_HandleRetrieveResult */
_processRetrieveResult(this, value, result, function (childItemData, index) { return _createChildItemObject(PowerPoint.SlideMaster, true, _this, childItemData, index); });
};
/**
* Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's 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.
*/
SlideMasterCollection.prototype.toJSON = function () {
return _toJson(this,
/* scalarProperties: */ {},
/* navigationProperties: */ {}, this.m__items);
};
/**
* Set mock data
*/
SlideMasterCollection.prototype.setMockData = function (data) {
var _this = this;
_setMockData(this, data, function (childItemData, index) { return _createChildItemObject(PowerPoint.SlideMaster, true, _this, childItemData, index); }, function (items) { return _this.m__items = items; });
};
return SlideMasterCollection;
}(OfficeExtension.ClientObject));
PowerPoint.SlideMasterCollection = SlideMasterCollection;
/* Begin_PlaceHolder_SlideMasterCollection_AfterDeclaration */
/* End_PlaceHolder_SlideMasterCollection_AfterDeclaration */
/* Begin_PlaceHolder_ErrorCodesTypeName */
var ErrorCodes;
(function (ErrorCodes) {
ErrorCodes["generalException"] = "GeneralException";
/* Begin_PlaceHolder_ErrorCodesAdditional */
/* End_PlaceHolder_ErrorCodesAdditional */
})(ErrorCodes = PowerPoint.ErrorCodes || (PowerPoint.ErrorCodes = {}));
var Interfaces;
(function (Interfaces) {
})(Interfaces = PowerPoint.Interfaces || (PowerPoint.Interfaces = {}));
})(PowerPoint || (PowerPoint = {})); // PowerPoint
/* Begin_PlaceHolder_GlobalFooter */
/* End_PlaceHolder_GlobalFooter */
var PowerPoint;
(function (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.
*/
var RequestContext = /** @class */ (function (_super) {
__extends(RequestContext, _super);
function RequestContext(url) {
var _this = _super.call(this, url) || this;
_this.m_presentation = new PowerPoint.Presentation(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this));
_this._rootObject = _this.m_presentation;
return _this;
}
Object.defineProperty(RequestContext.prototype, "presentation", {
get: function () {
return this.m_presentation;
},
enumerable: true,
configurable: true
});
Object.defineProperty(RequestContext.prototype, "application", {
get: function () {
if (this.m_application == null) {
this.m_application = new PowerPoint.Application(this, OfficeExtension.ObjectPathFactory.createNewObjectObjectPath(this, "Microsoft.Office.PowerPoint.Application", false /*isCollection*/));
}
return this.m_application;
},
enumerable: true,
configurable: true
});
Object.defineProperty(RequestContext.prototype, "sensitivityLabelsCatalog", {
get: function () {
if (this.m_sensitivityLabelsCatalog == null) {
var sensitivityLabelsCatalogClass = PowerPoint.SensitivityLabelsCatalog;
if (sensitivityLabelsCatalogClass) {
this.m_sensitivityLabelsCatalog = new sensitivityLabelsCatalogClass(this, OfficeExtension.ObjectPathFactory.createNewObjectObjectPath(this, "Microsoft.Office.PowerPoint.SensitivityLabelsCatalog", false /*isCollection*/));
}
}
return this.m_sensitivityLabelsCatalog;
},
enumerable: true,
configurable: true
});
return RequestContext;
}(OfficeCore.RequestContext));
PowerPoint.RequestContext = RequestContext;
function run(arg1, arg2) {
return OfficeExtension.ClientRequestContext._runBatch("PowerPoint.run", arguments, function () { return new PowerPoint.RequestContext(); });
}
PowerPoint.run = run;
})(PowerPoint || (PowerPoint = {}));
export {
PowerPoint
};