@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
1 lines • 2.66 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/common/auth/auth-card-button.ts"],"names":[],"mappings":"AA8BO,MAAM,cAA0C,CAAA;AAAA;AAAA;AAAA;AAAA,EAIrD,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA,EAEA,WAAY,CAAA,IAAA,EAAc,KAAe,EAAA,OAAA,GAAiC,EAAI,EAAA;AAC5E,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA;AACZ,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA;AAC7B,EAEA,SAAS,KAAe,EAAA;AACtB,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAAe,EAAA;AACvB,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAAe,EAAA;AACvB,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAAe,EAAA;AACvB,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,OAAA,IAAA;AAAA;AAEX","file":"auth-card-button.mjs","sourcesContent":["/**\n * Defines a button as displayed when prompting a user to authenticate. This maps to the cardAction type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.cardaction).\n */\nexport interface IAuthCardButton {\n /**\n * The type of the button.\n */\n type: string;\n\n /**\n * The value associated with the button. The meaning of value depends on the button’s type.\n */\n value: string;\n\n /**\n * The caption of the button.\n */\n title?: string;\n\n /**\n * A URL to an image to display alongside the button’s caption.\n */\n image?: string;\n}\n\nexport type AuthCardButtonOptions = Omit<IAuthCardButton, 'type' | 'value'>;\n\n/**\n * Defines a button as displayed when prompting a user to authenticate. This maps to the cardAction type defined by the Bot Framework (https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.cardaction).\n */\nexport class AuthCardbutton implements IAuthCardButton {\n /**\n * The type of the button.\n */\n type: string;\n\n /**\n * The value associated with the button. The meaning of value depends on the button’s type.\n */\n value: string;\n\n /**\n * The caption of the button.\n */\n title?: string;\n\n /**\n * A URL to an image to display alongside the button’s caption.\n */\n image?: string;\n\n constructor(type: string, value: string, options: AuthCardButtonOptions = {}) {\n this.type = type;\n this.value = value;\n Object.assign(this, options);\n }\n\n withType(value: string) {\n this.type = value;\n return this;\n }\n\n withValue(value: string) {\n this.value = value;\n return this;\n }\n\n withTitle(value: string) {\n this.title = value;\n return this;\n }\n\n withImage(value: string) {\n this.image = value;\n return this;\n }\n}\n"]}