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

45 lines (42 loc) 977 B
'use strict'; var base = require('../base'); class SubmitAction extends base.Action { type; /** * Controls which inputs are associated with the action. */ associatedInputs; /** * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties. */ data; constructor(options = {}) { super(); this.type = "Action.Submit"; Object.assign(this, options); } static from(options) { return new SubmitAction(options); } withAssociatedInputs(value) { this.associatedInputs = value; return this; } withData(value = { msteams: {} }) { const { msteams, ...rest } = value; if (!this.data) { this.data = { msteams }; } Object.assign(this.data, { msteams: { ...this.data.msteams, ...msteams }, ...rest }); return this; } } exports.SubmitAction = SubmitAction; //# sourceMappingURL=submit.js.map //# sourceMappingURL=submit.js.map