@microsoft/teams.cards 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -41
- package/dist/actions/index.d.mts +2 -2
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/show-card.d.mts +1 -1
- package/dist/actions/show-card.d.ts +1 -1
- package/dist/actions/submit/collab-stage.js +1 -1
- package/dist/actions/submit/collab-stage.js.map +1 -1
- package/dist/actions/submit/collab-stage.mjs +1 -1
- package/dist/actions/submit/collab-stage.mjs.map +1 -1
- package/dist/actions/submit/im-back.js +1 -1
- package/dist/actions/submit/im-back.js.map +1 -1
- package/dist/actions/submit/im-back.mjs +1 -1
- package/dist/actions/submit/im-back.mjs.map +1 -1
- package/dist/actions/submit/index.d.mts +1 -1
- package/dist/actions/submit/index.d.ts +1 -1
- package/dist/actions/submit/invoke.js +1 -1
- package/dist/actions/submit/invoke.js.map +1 -1
- package/dist/actions/submit/invoke.mjs +1 -1
- package/dist/actions/submit/invoke.mjs.map +1 -1
- package/dist/actions/submit/message-back.js +1 -1
- package/dist/actions/submit/message-back.js.map +1 -1
- package/dist/actions/submit/message-back.mjs +1 -1
- package/dist/actions/submit/message-back.mjs.map +1 -1
- package/dist/actions/submit/sign-in.js +1 -1
- package/dist/actions/submit/sign-in.js.map +1 -1
- package/dist/actions/submit/sign-in.mjs +1 -1
- package/dist/actions/submit/sign-in.mjs.map +1 -1
- package/dist/actions/submit/submit.js +10 -3
- package/dist/actions/submit/submit.js.map +1 -1
- package/dist/actions/submit/submit.mjs +10 -3
- package/dist/actions/submit/submit.mjs.map +1 -1
- package/dist/actions/submit/task-fetch.d.mts +15 -15
- package/dist/actions/submit/task-fetch.d.ts +15 -15
- package/dist/actions/submit/task-fetch.js +16 -11
- package/dist/actions/submit/task-fetch.js.map +1 -1
- package/dist/actions/submit/task-fetch.mjs +16 -11
- package/dist/actions/submit/task-fetch.mjs.map +1 -1
- package/dist/base.d.mts +1 -1
- package/dist/base.d.ts +1 -1
- package/dist/card.d.mts +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/card.js +0 -1
- package/dist/card.js.map +1 -1
- package/dist/card.mjs +0 -1
- package/dist/card.mjs.map +1 -1
- package/dist/charts/donut.d.mts +2281 -24
- package/dist/charts/donut.d.ts +2281 -24
- package/dist/charts/donut.js.map +1 -1
- package/dist/charts/donut.mjs.map +1 -1
- package/dist/charts/index.d.mts +1 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/line.d.mts +1 -1
- package/dist/charts/line.d.ts +1 -1
- package/dist/charts/line.js.map +1 -1
- package/dist/charts/line.mjs.map +1 -1
- package/dist/containers/action-set.d.mts +1 -1
- package/dist/containers/action-set.d.ts +1 -1
- package/dist/containers/base.d.mts +1 -1
- package/dist/containers/base.d.ts +1 -1
- package/dist/containers/carousel.d.mts +1 -1
- package/dist/containers/carousel.d.ts +1 -1
- package/dist/containers/carousel.js.map +1 -1
- package/dist/containers/carousel.mjs.map +1 -1
- package/dist/containers/column-set.d.mts +1 -1
- package/dist/containers/column-set.d.ts +1 -1
- package/dist/containers/column-set.js.map +1 -1
- package/dist/containers/column-set.mjs.map +1 -1
- package/dist/containers/column.d.mts +1 -1
- package/dist/containers/column.d.ts +1 -1
- package/dist/containers/column.js.map +1 -1
- package/dist/containers/column.mjs.map +1 -1
- package/dist/containers/container.d.mts +1 -1
- package/dist/containers/container.d.ts +1 -1
- package/dist/containers/container.js.map +1 -1
- package/dist/containers/container.mjs.map +1 -1
- package/dist/containers/fact-set.d.mts +1 -1
- package/dist/containers/fact-set.d.ts +1 -1
- package/dist/containers/image-set.d.mts +1 -1
- package/dist/containers/image-set.d.ts +1 -1
- package/dist/containers/index.d.mts +1 -1
- package/dist/containers/index.d.ts +1 -1
- package/dist/element.d.mts +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/inputs/base.d.mts +1 -1
- package/dist/inputs/base.d.ts +1 -1
- package/dist/inputs/choice-set.d.mts +1 -1
- package/dist/inputs/choice-set.d.ts +1 -1
- package/dist/inputs/date.d.mts +1 -1
- package/dist/inputs/date.d.ts +1 -1
- package/dist/inputs/index.d.mts +1 -1
- package/dist/inputs/index.d.ts +1 -1
- package/dist/inputs/number.d.mts +1 -1
- package/dist/inputs/number.d.ts +1 -1
- package/dist/inputs/text.d.mts +1 -1
- package/dist/inputs/text.d.ts +1 -1
- package/dist/inputs/text.js.map +1 -1
- package/dist/inputs/text.mjs.map +1 -1
- package/dist/inputs/time.d.mts +1 -1
- package/dist/inputs/time.d.ts +1 -1
- package/dist/inputs/toggle.d.mts +1 -1
- package/dist/inputs/toggle.d.ts +1 -1
- package/dist/medias/badge.d.mts +1 -1
- package/dist/medias/badge.d.ts +1 -1
- package/dist/medias/code-block.d.mts +1 -1
- package/dist/medias/code-block.d.ts +1 -1
- package/dist/medias/icon.d.mts +24 -2281
- package/dist/medias/icon.d.ts +24 -2281
- package/dist/medias/image.d.mts +1 -1
- package/dist/medias/image.d.ts +1 -1
- package/dist/medias/index.d.mts +1 -1
- package/dist/medias/index.d.ts +1 -1
- package/dist/medias/media.d.mts +1 -1
- package/dist/medias/media.d.ts +1 -1
- package/dist/medias/progress-bar.d.mts +1 -1
- package/dist/medias/progress-bar.d.ts +1 -1
- package/dist/medias/progress-ring.d.mts +1 -1
- package/dist/medias/progress-ring.d.ts +1 -1
- package/dist/medias/rich-text-block.d.mts +1 -1
- package/dist/medias/rich-text-block.d.ts +1 -1
- package/dist/medias/text-block.d.mts +1 -1
- package/dist/medias/text-block.d.ts +1 -1
- package/dist/medias/text-run.d.mts +1 -1
- package/dist/medias/text-run.d.ts +1 -1
- package/package.json +3 -2
|
@@ -5,6 +5,12 @@ import '../base.js';
|
|
|
5
5
|
type TaskFetchActionOptions = SubmitActionOptions & {
|
|
6
6
|
data: MSTeamsData<ITaskFetchData>;
|
|
7
7
|
};
|
|
8
|
+
type TaskFetchDataValues = {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
} & {
|
|
11
|
+
/** type is special so we shouldn't allow overriding it */
|
|
12
|
+
type?: never;
|
|
13
|
+
};
|
|
8
14
|
interface ITaskFetchAction extends ISubmitAction {
|
|
9
15
|
/**
|
|
10
16
|
* Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.
|
|
@@ -16,25 +22,19 @@ declare class TaskFetchAction extends SubmitAction implements ITaskFetchAction {
|
|
|
16
22
|
* Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.
|
|
17
23
|
*/
|
|
18
24
|
data: MSTeamsData<ITaskFetchData>;
|
|
19
|
-
constructor(value?:
|
|
25
|
+
constructor(value?: TaskFetchDataValues, options?: SubmitActionOptions);
|
|
20
26
|
static from(options: TaskFetchActionOptions): TaskFetchAction;
|
|
21
|
-
withData(value: ITaskFetchData): this;
|
|
22
|
-
withValue(value:
|
|
27
|
+
withData(value: MSTeamsData<ITaskFetchData>): this;
|
|
28
|
+
withValue(value: TaskFetchDataValues): this;
|
|
23
29
|
}
|
|
24
30
|
interface ITaskFetchData {
|
|
25
31
|
type: 'task/fetch';
|
|
26
|
-
/**
|
|
27
|
-
* The data value sent with the `task/fetch` invoke.
|
|
28
|
-
*/
|
|
29
|
-
data?: any;
|
|
30
32
|
}
|
|
31
|
-
declare class TaskFetchData implements ITaskFetchData {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
data?: any;
|
|
37
|
-
constructor(data?: any);
|
|
33
|
+
declare class TaskFetchData implements MSTeamsData<ITaskFetchData> {
|
|
34
|
+
msteams: {
|
|
35
|
+
type: "task/fetch";
|
|
36
|
+
};
|
|
37
|
+
constructor(data?: TaskFetchDataValues);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export { type ITaskFetchAction, type ITaskFetchData, TaskFetchAction, type TaskFetchActionOptions, TaskFetchData };
|
|
40
|
+
export { type ITaskFetchAction, type ITaskFetchData, TaskFetchAction, type TaskFetchActionOptions, TaskFetchData, type TaskFetchDataValues };
|
|
@@ -10,29 +10,34 @@ class TaskFetchAction extends submit.SubmitAction {
|
|
|
10
10
|
constructor(value, options = {}) {
|
|
11
11
|
super(options);
|
|
12
12
|
Object.assign(this, options);
|
|
13
|
-
this.data = {
|
|
13
|
+
this.data = {
|
|
14
|
+
...value,
|
|
15
|
+
msteams: {
|
|
16
|
+
type: "task/fetch"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
14
19
|
}
|
|
15
20
|
static from(options) {
|
|
16
|
-
return new TaskFetchAction(options.data
|
|
21
|
+
return new TaskFetchAction(options.data, options);
|
|
17
22
|
}
|
|
18
23
|
withData(value) {
|
|
19
|
-
this.data
|
|
24
|
+
this.data = value;
|
|
20
25
|
return this;
|
|
21
26
|
}
|
|
22
27
|
withValue(value) {
|
|
23
|
-
|
|
28
|
+
super.withData({ ...value, msteams: { type: "task/fetch" } });
|
|
24
29
|
return this;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
class TaskFetchData {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
data;
|
|
33
|
+
msteams = {
|
|
34
|
+
type: "task/fetch"
|
|
35
|
+
};
|
|
33
36
|
constructor(data) {
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
if (data) {
|
|
38
|
+
const { msteams, ...rest } = data;
|
|
39
|
+
Object.assign(this, rest);
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/submit/task-fetch.ts"],"names":["SubmitAction"],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/submit/task-fetch.ts"],"names":["SubmitAction"],"mappings":";;;;AAkBO,MAAM,wBAAwBA,mBAAyC,CAAA;AAAA;AAAA;AAAA;AAAA,EAI5E,IAAA;AAAA,EAEA,WAAY,CAAA,KAAA,EAA6B,OAA+B,GAAA,EAAI,EAAA;AAC1E,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAC3B,IAAA,IAAA,CAAK,IAAO,GAAA;AAAA,MACV,GAAG,KAAA;AAAA,MACH,OAAS,EAAA;AAAA,QACP,IAAM,EAAA;AAAA;AACR,KACF;AAAA;AACF,EAEA,OAAO,KAAK,OAAiC,EAAA;AAC3C,IAAA,OAAO,IAAI,eAAA,CAAgB,OAAQ,CAAA,IAAA,EAAM,OAAO,CAAA;AAAA;AAClD,EAEA,SAAS,KAAoC,EAAA;AAC3C,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAA4B,EAAA;AACpC,IAAM,KAAA,CAAA,QAAA,CAAS,EAAE,GAAG,KAAA,EAAO,SAAS,EAAE,IAAA,EAAM,YAAa,EAAA,EAAG,CAAA;AAC5D,IAAO,OAAA,IAAA;AAAA;AAEX;AAMO,MAAM,aAAqD,CAAA;AAAA,EAChE,OAAU,GAAA;AAAA,IACR,IAAM,EAAA;AAAA,GACR;AAAA,EAEA,YAAY,IAA4B,EAAA;AAEtC,IAAA,IAAI,IAAM,EAAA;AACR,MAAA,MAAM,EAAE,OAAA,EAAS,GAAG,IAAA,EAAS,GAAA,IAAA;AAC7B,MAAO,MAAA,CAAA,MAAA,CAAO,MAAM,IAAI,CAAA;AAAA;AAC1B;AAEJ","file":"task-fetch.js","sourcesContent":["import { ISubmitAction, MSTeamsData, SubmitAction, SubmitActionOptions } from './submit';\n\nexport type TaskFetchActionOptions = SubmitActionOptions & { data: MSTeamsData<ITaskFetchData> };\n\nexport type TaskFetchDataValues = {\n [key: string]: any;\n} & {\n /** type is special so we shouldn't allow overriding it */\n type?: never;\n};\n\nexport interface ITaskFetchAction extends ISubmitAction {\n /**\n * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n */\n data: MSTeamsData<ITaskFetchData>;\n}\n\nexport class TaskFetchAction extends SubmitAction implements ITaskFetchAction {\n /**\n * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n */\n data: MSTeamsData<ITaskFetchData>;\n\n constructor(value?: TaskFetchDataValues, options: SubmitActionOptions = {}) {\n super(options);\n Object.assign(this, options);\n this.data = {\n ...value,\n msteams: {\n type: 'task/fetch',\n },\n };\n }\n\n static from(options: TaskFetchActionOptions) {\n return new TaskFetchAction(options.data, options);\n }\n\n withData(value: MSTeamsData<ITaskFetchData>) {\n this.data = value;\n return this;\n }\n\n withValue(value: TaskFetchDataValues) {\n super.withData({ ...value, msteams: { type: 'task/fetch' } });\n return this;\n }\n}\n\nexport interface ITaskFetchData {\n type: 'task/fetch';\n}\n\nexport class TaskFetchData implements MSTeamsData<ITaskFetchData> {\n msteams = {\n type: 'task/fetch' as const,\n };\n\n constructor(data?: TaskFetchDataValues) {\n // omit the msteams property if it exists\n if (data) {\n const { msteams, ...rest } = data;\n Object.assign(this, rest);\n }\n }\n}\n"]}
|
|
@@ -8,29 +8,34 @@ class TaskFetchAction extends SubmitAction {
|
|
|
8
8
|
constructor(value, options = {}) {
|
|
9
9
|
super(options);
|
|
10
10
|
Object.assign(this, options);
|
|
11
|
-
this.data = {
|
|
11
|
+
this.data = {
|
|
12
|
+
...value,
|
|
13
|
+
msteams: {
|
|
14
|
+
type: "task/fetch"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
12
17
|
}
|
|
13
18
|
static from(options) {
|
|
14
|
-
return new TaskFetchAction(options.data
|
|
19
|
+
return new TaskFetchAction(options.data, options);
|
|
15
20
|
}
|
|
16
21
|
withData(value) {
|
|
17
|
-
this.data
|
|
22
|
+
this.data = value;
|
|
18
23
|
return this;
|
|
19
24
|
}
|
|
20
25
|
withValue(value) {
|
|
21
|
-
|
|
26
|
+
super.withData({ ...value, msteams: { type: "task/fetch" } });
|
|
22
27
|
return this;
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
class TaskFetchData {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
data;
|
|
31
|
+
msteams = {
|
|
32
|
+
type: "task/fetch"
|
|
33
|
+
};
|
|
31
34
|
constructor(data) {
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
if (data) {
|
|
36
|
+
const { msteams, ...rest } = data;
|
|
37
|
+
Object.assign(this, rest);
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/submit/task-fetch.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/submit/task-fetch.ts"],"names":[],"mappings":";;AAkBO,MAAM,wBAAwB,YAAyC,CAAA;AAAA;AAAA;AAAA;AAAA,EAI5E,IAAA;AAAA,EAEA,WAAY,CAAA,KAAA,EAA6B,OAA+B,GAAA,EAAI,EAAA;AAC1E,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAC3B,IAAA,IAAA,CAAK,IAAO,GAAA;AAAA,MACV,GAAG,KAAA;AAAA,MACH,OAAS,EAAA;AAAA,QACP,IAAM,EAAA;AAAA;AACR,KACF;AAAA;AACF,EAEA,OAAO,KAAK,OAAiC,EAAA;AAC3C,IAAA,OAAO,IAAI,eAAA,CAAgB,OAAQ,CAAA,IAAA,EAAM,OAAO,CAAA;AAAA;AAClD,EAEA,SAAS,KAAoC,EAAA;AAC3C,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,UAAU,KAA4B,EAAA;AACpC,IAAM,KAAA,CAAA,QAAA,CAAS,EAAE,GAAG,KAAA,EAAO,SAAS,EAAE,IAAA,EAAM,YAAa,EAAA,EAAG,CAAA;AAC5D,IAAO,OAAA,IAAA;AAAA;AAEX;AAMO,MAAM,aAAqD,CAAA;AAAA,EAChE,OAAU,GAAA;AAAA,IACR,IAAM,EAAA;AAAA,GACR;AAAA,EAEA,YAAY,IAA4B,EAAA;AAEtC,IAAA,IAAI,IAAM,EAAA;AACR,MAAA,MAAM,EAAE,OAAA,EAAS,GAAG,IAAA,EAAS,GAAA,IAAA;AAC7B,MAAO,MAAA,CAAA,MAAA,CAAO,MAAM,IAAI,CAAA;AAAA;AAC1B;AAEJ","file":"task-fetch.mjs","sourcesContent":["import { ISubmitAction, MSTeamsData, SubmitAction, SubmitActionOptions } from './submit';\n\nexport type TaskFetchActionOptions = SubmitActionOptions & { data: MSTeamsData<ITaskFetchData> };\n\nexport type TaskFetchDataValues = {\n [key: string]: any;\n} & {\n /** type is special so we shouldn't allow overriding it */\n type?: never;\n};\n\nexport interface ITaskFetchAction extends ISubmitAction {\n /**\n * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n */\n data: MSTeamsData<ITaskFetchData>;\n}\n\nexport class TaskFetchAction extends SubmitAction implements ITaskFetchAction {\n /**\n * Initial data that input fields will be combined with. These are essentially ‘hidden’ properties.\n */\n data: MSTeamsData<ITaskFetchData>;\n\n constructor(value?: TaskFetchDataValues, options: SubmitActionOptions = {}) {\n super(options);\n Object.assign(this, options);\n this.data = {\n ...value,\n msteams: {\n type: 'task/fetch',\n },\n };\n }\n\n static from(options: TaskFetchActionOptions) {\n return new TaskFetchAction(options.data, options);\n }\n\n withData(value: MSTeamsData<ITaskFetchData>) {\n this.data = value;\n return this;\n }\n\n withValue(value: TaskFetchDataValues) {\n super.withData({ ...value, msteams: { type: 'task/fetch' } });\n return this;\n }\n}\n\nexport interface ITaskFetchData {\n type: 'task/fetch';\n}\n\nexport class TaskFetchData implements MSTeamsData<ITaskFetchData> {\n msteams = {\n type: 'task/fetch' as const,\n };\n\n constructor(data?: TaskFetchDataValues) {\n // omit the msteams property if it exists\n if (data) {\n const { msteams, ...rest } = data;\n Object.assign(this, rest);\n }\n }\n}\n"]}
|
package/dist/base.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './common/horizontal-alignment.mjs';
|
|
2
2
|
import './common/spacing.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { b3 as Element, b2 as IElement } from './charts/donut.mjs';
|
|
4
4
|
import './common/target-width.mjs';
|
|
5
5
|
import './actions/execute.mjs';
|
|
6
6
|
import './common/associated-inputs.mjs';
|
package/dist/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './common/horizontal-alignment.js';
|
|
2
2
|
import './common/spacing.js';
|
|
3
|
-
export {
|
|
3
|
+
export { b3 as Element, b2 as IElement } from './charts/donut.js';
|
|
4
4
|
import './common/target-width.js';
|
|
5
5
|
import './actions/execute.js';
|
|
6
6
|
import './common/associated-inputs.js';
|
package/dist/card.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aX as Card, aW as CardOptions, aU as ICard, aV as MSTeamsCardInfo, aY as isCard } from './charts/donut.mjs';
|
|
2
2
|
import './common/vertical-alignment.mjs';
|
|
3
3
|
import './common/refresh.mjs';
|
|
4
4
|
import './common/auth/auth.mjs';
|
package/dist/card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aX as Card, aW as CardOptions, aU as ICard, aV as MSTeamsCardInfo, aY as isCard } from './charts/donut.js';
|
|
2
2
|
import './common/vertical-alignment.js';
|
|
3
3
|
import './common/refresh.js';
|
|
4
4
|
import './common/auth/auth.js';
|
package/dist/card.js
CHANGED
package/dist/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/card.ts"],"names":[],"mappings":";;AAwHO,MAAM,IAAsB,CAAA;AAAA,EACjC,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAA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S,OAAO,KAA4B,EAAA;AACjD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAY,IAAA,KAAA,CAAM,IAAS,KAAA,cAAA;AACrD","file":"card.js","sourcesContent":["import { Action, SelectAction } from './actions';\r\nimport { IAuth, Refresh, VerticalAlignment } from './common';\r\nimport { Element } from './element';\r\nimport { IBackgroundImage } from './medias';\r\n\r\n/**\r\n * An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.\r\n */\r\nexport interface ICard {\r\n type: 'AdaptiveCard';\r\n\r\n /**\r\n * The Adaptive Card schema.\r\n */\r\n $schema?: string;\r\n\r\n /**\r\n * Schema version that this card requires. If a client is lower than this version, the fallbackText will be rendered. NOTE: Version is not required for cards within an Action.ShowCard. However, it is required for the top-level card.\r\n */\r\n version: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6';\r\n\r\n /**\r\n * Defines how the card can be refreshed by making a request to the target Bot.\r\n */\r\n refresh?: Refresh;\r\n\r\n /**\r\n * Defines authentication information to enable on-behalf-of single sign on or just-in-time OAuth.\r\n */\r\n authentication?: IAuth;\r\n\r\n /**\r\n * The card elements to show in the primary card region.\r\n */\r\n body?: Element[];\r\n\r\n /**\r\n * The Actions to show in the card’s action bar.\r\n */\r\n actions?: Action[];\r\n\r\n /**\r\n * An Action that will be invoked when the card is tapped or selected. Action.ShowCard is not supported.\r\n */\r\n selectAction?: SelectAction;\r\n\r\n /**\r\n * Text shown when the client doesn’t support the version specified (may contain markdown).\r\n */\r\n fallbackText?: string;\r\n\r\n /**\r\n * Specifies the background image of the card.\r\n */\r\n backgroundImage?: IBackgroundImage | string;\r\n\r\n /**\r\n * Specifies the minimum height of the card.\r\n */\r\n minHeight?: string;\r\n\r\n /**\r\n * When true content in this Adaptive Card should be presented right to left. When ‘false’ content in this Adaptive Card should be presented left to right. If unset, the default platform behavior will apply.\r\n */\r\n rtl?: boolean;\r\n\r\n /**\r\n * Specifies what should be spoken for this entire card. This is simple text or SSML fragment.\r\n */\r\n speak?: string;\r\n\r\n /**\r\n * The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions.\r\n */\r\n lang?: string;\r\n\r\n /**\r\n * Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a minHeight specified.\r\n */\r\n verticalContentAlignment?: VerticalAlignment;\r\n\r\n /**\r\n * Extra Teams data for the card.\r\n */\r\n msteams?: MSTeamsCardInfo;\r\n}\r\n\r\n/**\r\n * Card metadata for Microsoft Teams.\r\n */\r\nexport type MSTeamsCardInfo = {\r\n /**\r\n * Expands the card to take up the full width of the message.\r\n */\r\n width?: 'Full';\r\n\r\n /**\r\n * Conditional visibility of elements on different viewports.\r\n */\r\n targetWidth?:\r\n | 'veryNarrow'\r\n | 'narrow'\r\n | 'standard'\r\n | 'wide'\r\n | 'atLeast:veryNarrow'\r\n | 'atLeast:narrow'\r\n | 'atLeast:standard'\r\n | 'atLeast:wide'\r\n | 'atMost:veryNarrow'\r\n | 'atMost:narrow'\r\n | 'atMost:standard'\r\n | 'atMost:wide';\r\n};\r\n\r\nexport type CardOptions = Omit<Partial<ICard>, 'body' | 'type' | 'msteams'> &\r\n Partial<MSTeamsCardInfo>;\r\n\r\n/**\r\n * An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.\r\n */\r\nexport class Card implements ICard {\r\n type: 'AdaptiveCard';\r\n\r\n /**\r\n * The Adaptive Card schema.\r\n */\r\n $schema?: string;\r\n\r\n /**\r\n * Schema version that this card requires. If a client is lower than this version, the fallbackText will be rendered. NOTE: Version is not required for cards within an Action.ShowCard. However, it is required for the top-level card.\r\n */\r\n version: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6';\r\n\r\n /**\r\n * Defines how the card can be refreshed by making a request to the target Bot.\r\n */\r\n refresh?: Refresh;\r\n\r\n /**\r\n * Defines authentication information to enable on-behalf-of single sign on or just-in-time OAuth.\r\n */\r\n authentication?: IAuth;\r\n\r\n /**\r\n * The card elements to show in the primary card region.\r\n */\r\n body: Element[];\r\n\r\n /**\r\n * The Actions to show in the card’s action bar.\r\n */\r\n actions?: Action[];\r\n\r\n /**\r\n * An Action that will be invoked when the card is tapped or selected. Action.ShowCard is not supported.\r\n */\r\n selectAction?: SelectAction;\r\n\r\n /**\r\n * Text shown when the client doesn’t support the version specified (may contain markdown).\r\n */\r\n fallbackText?: string;\r\n\r\n /**\r\n * Specifies the background image of the card.\r\n */\r\n backgroundImage?: IBackgroundImage | string;\r\n\r\n /**\r\n * Specifies the minimum height of the card.\r\n */\r\n minHeight?: string;\r\n\r\n /**\r\n * When true content in this Adaptive Card should be presented right to left. When ‘false’ content in this Adaptive Card should be presented left to right. If unset, the default platform behavior will apply.\r\n */\r\n rtl?: boolean;\r\n\r\n /**\r\n * Specifies what should be spoken for this entire card. This is simple text or SSML fragment.\r\n */\r\n speak?: string;\r\n\r\n /**\r\n * The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions.\r\n */\r\n lang?: string;\r\n\r\n /**\r\n * Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a minHeight specified.\r\n */\r\n verticalContentAlignment?: VerticalAlignment;\r\n\r\n /**\r\n * Extra Teams data for the card.\r\n */\r\n msteams?: MSTeamsCardInfo;\r\n\r\n constructor(...body: Element[]) {\r\n this.type = 'AdaptiveCard';\r\n this.body = body;\r\n this.version = '1.6';\r\n }\r\n\r\n withOptions(value: CardOptions) {\r\n Object.assign(this, value);\r\n return this;\r\n }\r\n\r\n withSchema(value: string) {\r\n this.$schema = value;\r\n return this;\r\n }\r\n\r\n withVersion(value: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6') {\r\n this.version = value;\r\n return this;\r\n }\r\n\r\n withRefresh(value: Refresh) {\r\n this.refresh = value;\r\n return this;\r\n }\r\n\r\n withAuth(value: IAuth) {\r\n this.authentication = value;\r\n return this;\r\n }\r\n\r\n withSelectedAction(value: SelectAction) {\r\n this.selectAction = value;\r\n return this;\r\n }\r\n\r\n withBody(...value: Element[]) {\r\n this.body = value;\r\n return this;\r\n }\r\n\r\n addCards(...value: Element[]) {\r\n this.body.push(...value);\r\n return this;\r\n }\r\n\r\n addActions(...value: Action[]) {\r\n if (!this.actions) {\r\n this.actions = [];\r\n }\r\n\r\n this.actions.push(...value);\r\n return this;\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n * @internal\r\n *\r\n * Type guard to check if a value is a Card.\r\n * @param value value to compare\r\n * @returns true if value is type of Card\r\n */\r\nexport function isCard(value: any): value is ICard {\r\n return typeof value === 'object' && value.type === 'AdaptiveCard';\r\n}\r\n"]}
|
package/dist/card.mjs
CHANGED
package/dist/card.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/card.ts"],"names":[],"mappings":"AAwHO,MAAM,IAAsB,CAAA;AAAA,EACjC,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,cAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA;AAAA;AAAA;AAAA,EAKA,eAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA;AAAA;AAAA;AAAA,EAKA,GAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,wBAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAA;AAAA,EAEA,eAAe,IAAiB,EAAA;AAC9B,IAAA,IAAA,CAAK,IAAO,GAAA,cAAA;AACZ,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA;AACZ,IAAA,IAAA,CAAK,OAAU,GAAA,
|
|
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,KAAc,EAAA;AACrB,IAAA,IAAA,CAAK,cAAiB,GAAA,KAAA;AACtB,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,mBAAmB,KAAqB,EAAA;AACtC,IAAA,IAAA,CAAK,YAAe,GAAA,KAAA;AACpB,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,YAAY,KAAkB,EAAA;AAC5B,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,YAAY,KAAkB,EAAA;AAC5B,IAAK,IAAA,CAAA,IAAA,CAAK,IAAK,CAAA,GAAG,KAAK,CAAA;AACvB,IAAO,OAAA,IAAA;AAAA;AACT,EAEA,cAAc,KAAiB,EAAA;AAC7B,IAAI,IAAA,CAAC,KAAK,OAAS,EAAA;AACjB,MAAA,IAAA,CAAK,UAAU,EAAC;AAAA;AAGlB,IAAK,IAAA,CAAA,OAAA,CAAQ,IAAK,CAAA,GAAG,KAAK,CAAA;AAC1B,IAAO,OAAA,IAAA;AAAA;AAEX;AAUO,SAAS,OAAO,KAA4B,EAAA;AACjD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAY,IAAA,KAAA,CAAM,IAAS,KAAA,cAAA;AACrD","file":"card.mjs","sourcesContent":["import { Action, SelectAction } from './actions';\r\nimport { IAuth, Refresh, VerticalAlignment } from './common';\r\nimport { Element } from './element';\r\nimport { IBackgroundImage } from './medias';\r\n\r\n/**\r\n * An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.\r\n */\r\nexport interface ICard {\r\n type: 'AdaptiveCard';\r\n\r\n /**\r\n * The Adaptive Card schema.\r\n */\r\n $schema?: string;\r\n\r\n /**\r\n * Schema version that this card requires. If a client is lower than this version, the fallbackText will be rendered. NOTE: Version is not required for cards within an Action.ShowCard. However, it is required for the top-level card.\r\n */\r\n version: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6';\r\n\r\n /**\r\n * Defines how the card can be refreshed by making a request to the target Bot.\r\n */\r\n refresh?: Refresh;\r\n\r\n /**\r\n * Defines authentication information to enable on-behalf-of single sign on or just-in-time OAuth.\r\n */\r\n authentication?: IAuth;\r\n\r\n /**\r\n * The card elements to show in the primary card region.\r\n */\r\n body?: Element[];\r\n\r\n /**\r\n * The Actions to show in the card’s action bar.\r\n */\r\n actions?: Action[];\r\n\r\n /**\r\n * An Action that will be invoked when the card is tapped or selected. Action.ShowCard is not supported.\r\n */\r\n selectAction?: SelectAction;\r\n\r\n /**\r\n * Text shown when the client doesn’t support the version specified (may contain markdown).\r\n */\r\n fallbackText?: string;\r\n\r\n /**\r\n * Specifies the background image of the card.\r\n */\r\n backgroundImage?: IBackgroundImage | string;\r\n\r\n /**\r\n * Specifies the minimum height of the card.\r\n */\r\n minHeight?: string;\r\n\r\n /**\r\n * When true content in this Adaptive Card should be presented right to left. When ‘false’ content in this Adaptive Card should be presented left to right. If unset, the default platform behavior will apply.\r\n */\r\n rtl?: boolean;\r\n\r\n /**\r\n * Specifies what should be spoken for this entire card. This is simple text or SSML fragment.\r\n */\r\n speak?: string;\r\n\r\n /**\r\n * The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions.\r\n */\r\n lang?: string;\r\n\r\n /**\r\n * Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a minHeight specified.\r\n */\r\n verticalContentAlignment?: VerticalAlignment;\r\n\r\n /**\r\n * Extra Teams data for the card.\r\n */\r\n msteams?: MSTeamsCardInfo;\r\n}\r\n\r\n/**\r\n * Card metadata for Microsoft Teams.\r\n */\r\nexport type MSTeamsCardInfo = {\r\n /**\r\n * Expands the card to take up the full width of the message.\r\n */\r\n width?: 'Full';\r\n\r\n /**\r\n * Conditional visibility of elements on different viewports.\r\n */\r\n targetWidth?:\r\n | 'veryNarrow'\r\n | 'narrow'\r\n | 'standard'\r\n | 'wide'\r\n | 'atLeast:veryNarrow'\r\n | 'atLeast:narrow'\r\n | 'atLeast:standard'\r\n | 'atLeast:wide'\r\n | 'atMost:veryNarrow'\r\n | 'atMost:narrow'\r\n | 'atMost:standard'\r\n | 'atMost:wide';\r\n};\r\n\r\nexport type CardOptions = Omit<Partial<ICard>, 'body' | 'type' | 'msteams'> &\r\n Partial<MSTeamsCardInfo>;\r\n\r\n/**\r\n * An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.\r\n */\r\nexport class Card implements ICard {\r\n type: 'AdaptiveCard';\r\n\r\n /**\r\n * The Adaptive Card schema.\r\n */\r\n $schema?: string;\r\n\r\n /**\r\n * Schema version that this card requires. If a client is lower than this version, the fallbackText will be rendered. NOTE: Version is not required for cards within an Action.ShowCard. However, it is required for the top-level card.\r\n */\r\n version: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6';\r\n\r\n /**\r\n * Defines how the card can be refreshed by making a request to the target Bot.\r\n */\r\n refresh?: Refresh;\r\n\r\n /**\r\n * Defines authentication information to enable on-behalf-of single sign on or just-in-time OAuth.\r\n */\r\n authentication?: IAuth;\r\n\r\n /**\r\n * The card elements to show in the primary card region.\r\n */\r\n body: Element[];\r\n\r\n /**\r\n * The Actions to show in the card’s action bar.\r\n */\r\n actions?: Action[];\r\n\r\n /**\r\n * An Action that will be invoked when the card is tapped or selected. Action.ShowCard is not supported.\r\n */\r\n selectAction?: SelectAction;\r\n\r\n /**\r\n * Text shown when the client doesn’t support the version specified (may contain markdown).\r\n */\r\n fallbackText?: string;\r\n\r\n /**\r\n * Specifies the background image of the card.\r\n */\r\n backgroundImage?: IBackgroundImage | string;\r\n\r\n /**\r\n * Specifies the minimum height of the card.\r\n */\r\n minHeight?: string;\r\n\r\n /**\r\n * When true content in this Adaptive Card should be presented right to left. When ‘false’ content in this Adaptive Card should be presented left to right. If unset, the default platform behavior will apply.\r\n */\r\n rtl?: boolean;\r\n\r\n /**\r\n * Specifies what should be spoken for this entire card. This is simple text or SSML fragment.\r\n */\r\n speak?: string;\r\n\r\n /**\r\n * The 2-letter ISO-639-1 language used in the card. Used to localize any date/time functions.\r\n */\r\n lang?: string;\r\n\r\n /**\r\n * Defines how the content should be aligned vertically within the container. Only relevant for fixed-height cards, or cards with a minHeight specified.\r\n */\r\n verticalContentAlignment?: VerticalAlignment;\r\n\r\n /**\r\n * Extra Teams data for the card.\r\n */\r\n msteams?: MSTeamsCardInfo;\r\n\r\n constructor(...body: Element[]) {\r\n this.type = 'AdaptiveCard';\r\n this.body = body;\r\n this.version = '1.6';\r\n }\r\n\r\n withOptions(value: CardOptions) {\r\n Object.assign(this, value);\r\n return this;\r\n }\r\n\r\n withSchema(value: string) {\r\n this.$schema = value;\r\n return this;\r\n }\r\n\r\n withVersion(value: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6') {\r\n this.version = value;\r\n return this;\r\n }\r\n\r\n withRefresh(value: Refresh) {\r\n this.refresh = value;\r\n return this;\r\n }\r\n\r\n withAuth(value: IAuth) {\r\n this.authentication = value;\r\n return this;\r\n }\r\n\r\n withSelectedAction(value: SelectAction) {\r\n this.selectAction = value;\r\n return this;\r\n }\r\n\r\n withBody(...value: Element[]) {\r\n this.body = value;\r\n return this;\r\n }\r\n\r\n addCards(...value: Element[]) {\r\n this.body.push(...value);\r\n return this;\r\n }\r\n\r\n addActions(...value: Action[]) {\r\n if (!this.actions) {\r\n this.actions = [];\r\n }\r\n\r\n this.actions.push(...value);\r\n return this;\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n * @internal\r\n *\r\n * Type guard to check if a value is a Card.\r\n * @param value value to compare\r\n * @returns true if value is type of Card\r\n */\r\nexport function isCard(value: any): value is ICard {\r\n return typeof value === 'object' && value.type === 'AdaptiveCard';\r\n}\r\n"]}
|