@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
43 lines (41 loc) • 950 B
JavaScript
import { Action } from '../base';
class SubmitAction extends 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;
}
}
export { SubmitAction };
//# sourceMappingURL=submit.mjs.map
//# sourceMappingURL=submit.mjs.map