@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) • 912 B
JavaScript
import { SubmitAction } from '../../core.mjs';
class IMBackAction 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 IMBackData(value) };
}
static from(options) {
return new IMBackAction(options.data.msteams.value, options);
}
withData(value) {
super.withData({ msteams: value });
return this;
}
withValue(value) {
this.data.msteams.value = value;
return this;
}
}
class IMBackData {
type;
/**
* String that needs to be echoed back in the chat.
*/
value;
constructor(value) {
this.type = "imBack";
this.value = value;
}
}
export { IMBackAction, IMBackData };
//# sourceMappingURL=im-back.mjs.map
//# sourceMappingURL=im-back.mjs.map