@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 • 4.09 kB
Source Map (JSON)
{"version":3,"sources":["../../src/containers/column.ts"],"names":[],"mappings":";;AA2CO,MAAM,eAAe,gBAAoC,CAAA;AAAA,EAC9D,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA,EAKA,wBAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA,EAEA,eAAe,KAAkB,EAAA;AAC/B,IAAM,KAAA,EAAA;AACN,IAAA,IAAA,CAAK,IAAO,GAAA,QAAA;AACZ,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AAAA;AACf,EAEA,YAAY,KAAsB,EAAA;AAChC,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,KAAK,CAAA;AACzB,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,cAAc,KAAe,EAAA;AAC3B,IAAA,IAAA,CAAK,SAAY,GAAA,KAAA;AACjB,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAAuB,EAAA;AAC/B,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,sBAAsB,KAA0B,EAAA;AAC9C,IAAA,IAAA,CAAK,wBAA2B,GAAA,KAAA;AAChC,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAAuE,EAAA;AAC/E,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA;AACb,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,YAAY,KAAkB,EAAA;AAC5B,IAAK,IAAA,CAAA,KAAA,CAAM,IAAK,CAAA,GAAG,KAAK,CAAA;AACxB,IAAO,OAAA,IAAA;AAAA;AAEX","file":"column.mjs","sourcesContent":["import { VerticalAlignment } from '../common';\nimport { Element } from '../element';\n\nimport { IContainerElement, ContainerElement } from './base';\nimport { ContainerStyle } from './container';\n\n/**\n * Defines a container that is part of a ColumnSet.\n */\nexport interface IColumn extends IContainerElement {\n type: 'Column';\n\n /**\n * The card elements to render inside the `Column`.\n */\n items?: Element[];\n\n /**\n * Specifies the minimum height of the column in pixels, like `\\\"80px\\\"`.\n */\n minHeight?: string;\n\n /**\n * Style hint for `Column`.\n */\n style?: ContainerStyle | null;\n\n /**\n * Defines how the content should be aligned vertically within the column. When not specified, the value of verticalContentAlignment is inherited from the parent container. If no parent container has verticalContentAlignment set, it defaults to Top.\n */\n verticalContentAlignment?: VerticalAlignment | null;\n\n /**\n * `\\\"auto\\\"`, `\\\"stretch\\\"`, a number representing relative width of the column in the column group, or in version 1.1 and higher, a specific pixel width, like `\\\"50px\\\"`.\n */\n width?: 'auto' | 'stretch' | Omit<string | number, 'auto' | 'stretch'>;\n}\n\nexport type ColumnOptions = Omit<IColumn, 'type' | 'items'>;\n\n/**\n * Defines a container that is part of a ColumnSet.\n */\nexport class Column extends ContainerElement implements IColumn {\n type: 'Column';\n\n /**\n * The card elements to render inside the `Column`.\n */\n items: Element[];\n\n /**\n * Specifies the minimum height of the column in pixels, like `\\\"80px\\\"`.\n */\n minHeight?: string;\n\n /**\n * Style hint for `Column`.\n */\n style?: ContainerStyle | null;\n\n /**\n * Defines how the content should be aligned vertically within the column. When not specified, the value of verticalContentAlignment is inherited from the parent container. If no parent container has verticalContentAlignment set, it defaults to Top.\n */\n verticalContentAlignment?: VerticalAlignment | null;\n\n /**\n * `\\\"auto\\\"`, `\\\"stretch\\\"`, a number representing relative width of the column in the column group, or in version 1.1 and higher, a specific pixel width, like `\\\"50px\\\"`.\n */\n width?: 'auto' | 'stretch' | Omit<string | number, 'auto' | 'stretch'>;\n\n constructor(...items: Element[]) {\n super();\n this.type = 'Column';\n this.items = items;\n }\n\n withOptions(value: ColumnOptions) {\n Object.assign(this, value);\n return this;\n }\n\n withMinHeight(value: string) {\n this.minHeight = value;\n return this;\n }\n\n withStyle(value: ContainerStyle) {\n this.style = value;\n return this;\n }\n\n withVerticalAlignment(value: VerticalAlignment) {\n this.verticalContentAlignment = value;\n return this;\n }\n\n withWidth(value: 'auto' | 'stretch' | Omit<string | number, 'auto' | 'stretch'>) {\n this.width = value;\n return this;\n }\n\n addCards(...value: Element[]) {\n this.items.push(...value);\n return this;\n }\n}\n"]}