UNPKG

@microsoft/teams.cards

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta

62 lines (59 loc) 1.43 kB
'use strict'; var submit = require('./submit'); class CollabStageAction extends submit.SubmitAction { /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data; constructor(tab, options = {}) { super(options); Object.assign(this, options); this.data = { msteams: { type: "invoke", value: tab ? { type: "tab/tabInfoAction", tabInfo: tab } : void 0 } }; } static from(options) { return new CollabStageAction(options.data.msteams.value?.tabInfo, options); } withData(value) { super.withData({ msteams: value }); return this; } withValue(value) { this.data.msteams.value = new CollabStageValueData(value); return this; } } class CollabStageData { type; /** * Set the value to send with the invoke */ value; constructor(value) { this.type = "invoke"; this.value = value; } } class CollabStageValueData { type; /** * Information about the iFrame content, rendered in the collab stage popout window. */ tabInfo; constructor(tab) { this.type = "tab/tabInfoAction"; this.tabInfo = tab; } } exports.CollabStageAction = CollabStageAction; exports.CollabStageData = CollabStageData; exports.CollabStageValueData = CollabStageValueData; //# sourceMappingURL=collab-stage.js.map //# sourceMappingURL=collab-stage.js.map