@cellaware/utils 8.6.15 → 8.6.17
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/dist/chatwms/datagrid.js +4 -7
- package/dist/chatwms/teams.d.ts +1 -1
- package/dist/chatwms/teams.js +14 -7
- package/package.json +1 -1
package/dist/chatwms/datagrid.js
CHANGED
|
@@ -879,18 +879,16 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
|
|
|
879
879
|
return {};
|
|
880
880
|
}
|
|
881
881
|
};
|
|
882
|
-
console.log('COUNT: ' + htmlColumnStyles.length);
|
|
883
882
|
for (const htmlColumnStyle of htmlColumnStyles) {
|
|
884
883
|
teamsColumnStyles.push({
|
|
885
884
|
columnName: htmlColumnStyle.columnName,
|
|
886
885
|
styles: htmlColumnStyle.styles.map(style => getColumnStyle(style))
|
|
887
886
|
});
|
|
888
887
|
}
|
|
889
|
-
console.log('A.');
|
|
890
|
-
console.log(JSON.stringify(teamsColumnStyles));
|
|
891
888
|
const applyRowStyleToColumns = (style) => {
|
|
892
889
|
for (const columnName of columnNames) {
|
|
893
890
|
const columnStyle = getColumnStyle(style);
|
|
891
|
+
console.log(columnStyle);
|
|
894
892
|
const teamsColumnStyle = teamsColumnStyles.find(c => c.columnName === columnName);
|
|
895
893
|
if (!!teamsColumnStyle) {
|
|
896
894
|
teamsColumnStyle.styles.push(columnStyle);
|
|
@@ -1020,6 +1018,9 @@ function createTeamsTableCellText(value, columnStyle) {
|
|
|
1020
1018
|
if (!!styles.isSubtle) {
|
|
1021
1019
|
isSubtle = styles.isSubtle;
|
|
1022
1020
|
}
|
|
1021
|
+
if (!!styles.italic) {
|
|
1022
|
+
italic = styles.italic;
|
|
1023
|
+
}
|
|
1023
1024
|
}
|
|
1024
1025
|
return {
|
|
1025
1026
|
type: "TextBlock",
|
|
@@ -1038,16 +1039,12 @@ function createTeamsTableRow(columnNames, values, rowStyles, columnStyles) {
|
|
|
1038
1039
|
for (const style of rowStyles) {
|
|
1039
1040
|
rowStyle = style;
|
|
1040
1041
|
}
|
|
1041
|
-
console.log('B.');
|
|
1042
|
-
console.log(JSON.stringify(columnStyles));
|
|
1043
1042
|
return {
|
|
1044
1043
|
type: "TableRow",
|
|
1045
1044
|
style: rowStyle,
|
|
1046
1045
|
cells: values.map((value, idx) => {
|
|
1047
1046
|
const columnName = columnNames[idx];
|
|
1048
1047
|
const columnStyle = columnStyles.find(cs => cs.columnName === columnName);
|
|
1049
|
-
console.log('C.');
|
|
1050
|
-
console.log(columnStyle);
|
|
1051
1048
|
let style = undefined;
|
|
1052
1049
|
for (const styles of columnStyle?.styles ?? []) {
|
|
1053
1050
|
if (!!styles.style) {
|
package/dist/chatwms/teams.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare function createTeamsValueCard(title: string, columnName: string,
|
|
|
43
43
|
} | {
|
|
44
44
|
type: string;
|
|
45
45
|
roundedCorners: boolean;
|
|
46
|
+
style: string | undefined;
|
|
46
47
|
items: {
|
|
47
48
|
type: string;
|
|
48
49
|
text: any;
|
|
@@ -51,7 +52,6 @@ export declare function createTeamsValueCard(title: string, columnName: string,
|
|
|
51
52
|
color: string | undefined;
|
|
52
53
|
weight: string | undefined;
|
|
53
54
|
}[];
|
|
54
|
-
style: string | undefined;
|
|
55
55
|
})[];
|
|
56
56
|
};
|
|
57
57
|
export declare function createTeamsChartCard(title: string, png: string, summary: string): {
|
package/dist/chatwms/teams.js
CHANGED
|
@@ -35,14 +35,18 @@ export function createTeamsTableCard(title, table, summary) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
export function createTeamsValueCard(title, columnName, value, styles, summary) {
|
|
38
|
-
let
|
|
39
|
-
let
|
|
40
|
-
[
|
|
38
|
+
let rowStyles = [];
|
|
39
|
+
let columnStyles = [];
|
|
40
|
+
[rowStyles, columnStyles] = mapTeamsStyles([columnName], styles, [], rowStyles, columnStyles);
|
|
41
|
+
console.log(styles);
|
|
42
|
+
console.log('--==--==--==--==--==--==--==--==--');
|
|
43
|
+
console.log(columnStyles);
|
|
41
44
|
let color = undefined;
|
|
42
45
|
let style = undefined;
|
|
43
46
|
let weight = undefined;
|
|
44
47
|
let isSubtle = undefined;
|
|
45
|
-
|
|
48
|
+
let italic = undefined;
|
|
49
|
+
for (const styles of columnStyles) {
|
|
46
50
|
if (!!styles.color) {
|
|
47
51
|
color = styles.color;
|
|
48
52
|
}
|
|
@@ -55,6 +59,9 @@ export function createTeamsValueCard(title, columnName, value, styles, summary)
|
|
|
55
59
|
if (!!styles.isSubtle) {
|
|
56
60
|
isSubtle = styles.isSubtle;
|
|
57
61
|
}
|
|
62
|
+
if (!!styles.italic) {
|
|
63
|
+
italic = styles.italic;
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
66
|
return {
|
|
60
67
|
type: "AdaptiveCard",
|
|
@@ -65,17 +72,17 @@ export function createTeamsValueCard(title, columnName, value, styles, summary)
|
|
|
65
72
|
{
|
|
66
73
|
type: "Container",
|
|
67
74
|
roundedCorners: true,
|
|
75
|
+
style,
|
|
68
76
|
items: [
|
|
69
77
|
{
|
|
70
78
|
type: "TextBlock",
|
|
71
|
-
text: value,
|
|
79
|
+
text: italic ? `*${value}*` : value,
|
|
72
80
|
wrap: true,
|
|
73
81
|
size: "ExtraLarge",
|
|
74
82
|
color,
|
|
75
83
|
weight
|
|
76
84
|
}
|
|
77
|
-
]
|
|
78
|
-
style
|
|
85
|
+
]
|
|
79
86
|
},
|
|
80
87
|
createTeamsSummaryItem(summary)
|
|
81
88
|
]
|