@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 (37 loc) • 899 B
JavaScript
import { SubmitAction } from '../../core.mjs';
class InvokeAction extends SubmitAction {
/**
* Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.
*/
data;
constructor(value, options = {}) {
super(options);
Object.assign(this, options);
this.data = { msteams: new InvokeData(value) };
}
static from(options) {
return new InvokeAction(options.data.msteams.value, options);
}
withData(value) {
super.withData({ msteams: value });
return this;
}
withValue(value) {
this.data.msteams.value = value;
return this;
}
}
class InvokeData {
type;
/**
* Set the value to send with the invoke
*/
value;
constructor(value) {
this.type = "invoke";
this.value = value;
}
}
export { InvokeAction, InvokeData };
//# sourceMappingURL=invoke.mjs.map
//# sourceMappingURL=invoke.mjs.map