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/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=c

39 lines (36 loc) 1.09 kB
'use strict'; var core = require('../../core'); class CollabStageAction extends core.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 = new core.SubmitActionData({ msteams: new core.InvokeSubmitActionData( tab ? new core.CollabStageInvokeDataValue({ tabInfo: tab }) : void 0 ) }); } static from(options) { const msteams = options.data.msteams; const value = msteams?.value; return new CollabStageAction(value?.tabInfo, options); } withData(value) { super.withData(new core.SubmitActionData({ msteams: value })); return this; } withValue(value) { const msteams = this.data.msteams; if (msteams) { msteams.value = new core.CollabStageInvokeDataValue({ tabInfo: value }); } return this; } } exports.CollabStageAction = CollabStageAction; //# sourceMappingURL=collab-stage.js.map //# sourceMappingURL=collab-stage.js.map