@cellaware/utils 8.11.5 → 8.11.6
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.
|
@@ -170,6 +170,7 @@ export declare function mapTeamsStyles(columnNames: string[], htmlRowStyles: str
|
|
|
170
170
|
export declare function mapTeamsTransposeStyles(htmlColumnStyle: HtmlColumnStyle): TeamsColumnStyle;
|
|
171
171
|
export declare function createTeamsTableColumns(columnNames: string[]): {
|
|
172
172
|
type: string;
|
|
173
|
+
separator: boolean;
|
|
173
174
|
cells: {
|
|
174
175
|
type: string;
|
|
175
176
|
items: {
|
|
@@ -196,12 +197,12 @@ export declare function createTeamsTableRow(columnNames: string[], values: any[]
|
|
|
196
197
|
}[];
|
|
197
198
|
}[];
|
|
198
199
|
};
|
|
199
|
-
export declare function
|
|
200
|
+
export declare function createTeamsTransposeTableRow(row: {
|
|
200
201
|
key: string;
|
|
201
202
|
value: any;
|
|
202
203
|
}, columnStyle: TeamsColumnStyle): {
|
|
203
204
|
type: string;
|
|
204
|
-
|
|
205
|
+
cells: any[];
|
|
205
206
|
};
|
|
206
207
|
/**
|
|
207
208
|
* **Important:** `html` and `teamsRows` output will be limited to **1,000 rows/24 rows** and **8 columns**, respectively.
|
package/dist/chatwms/datagrid.js
CHANGED
|
@@ -1108,6 +1108,7 @@ function createTeamsTableColumnText(columnName) {
|
|
|
1108
1108
|
export function createTeamsTableColumns(columnNames) {
|
|
1109
1109
|
return {
|
|
1110
1110
|
type: "TableRow",
|
|
1111
|
+
separator: true,
|
|
1111
1112
|
cells: columnNames.map((columnName) => ({
|
|
1112
1113
|
type: "TableCell",
|
|
1113
1114
|
items: [createTeamsTableColumnText(columnName)]
|
|
@@ -1143,7 +1144,7 @@ function createTeamsTableCellText(value, columnStyle) {
|
|
|
1143
1144
|
isSubtle
|
|
1144
1145
|
};
|
|
1145
1146
|
}
|
|
1146
|
-
function
|
|
1147
|
+
function createTeamsTransposeTableCellText(value, key, columnStyle) {
|
|
1147
1148
|
// Same as ^^^, just a couple minor tweaks.
|
|
1148
1149
|
let color = undefined;
|
|
1149
1150
|
let weight = undefined;
|
|
@@ -1198,10 +1199,10 @@ export function createTeamsTableRow(columnNames, values, rowStyles, columnStyles
|
|
|
1198
1199
|
})
|
|
1199
1200
|
};
|
|
1200
1201
|
}
|
|
1201
|
-
export function
|
|
1202
|
-
const
|
|
1203
|
-
type: "
|
|
1204
|
-
items: [
|
|
1202
|
+
export function createTeamsTransposeTableRow(row, columnStyle) {
|
|
1203
|
+
const keyCell = {
|
|
1204
|
+
type: "TableCell",
|
|
1205
|
+
items: [createTeamsTransposeTableCellText(row.key, true, {
|
|
1205
1206
|
columnName: 'key',
|
|
1206
1207
|
styles: [{ weight: 'Bolder' }]
|
|
1207
1208
|
})]
|
|
@@ -1212,14 +1213,14 @@ export function createTeamsTransposeColumnSet(row, columnStyle) {
|
|
|
1212
1213
|
style = styles.style;
|
|
1213
1214
|
}
|
|
1214
1215
|
}
|
|
1215
|
-
const
|
|
1216
|
-
type: "
|
|
1216
|
+
const valueCell = {
|
|
1217
|
+
type: "TableCell",
|
|
1217
1218
|
style,
|
|
1218
|
-
items: [
|
|
1219
|
+
items: [createTeamsTransposeTableCellText(row.value, false, columnStyle)]
|
|
1219
1220
|
};
|
|
1220
1221
|
return {
|
|
1221
|
-
type: "
|
|
1222
|
-
|
|
1222
|
+
type: "TableRow",
|
|
1223
|
+
cells: [keyCell, valueCell]
|
|
1223
1224
|
};
|
|
1224
1225
|
}
|
|
1225
1226
|
/**
|
|
@@ -1324,7 +1325,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
|
|
|
1324
1325
|
}));
|
|
1325
1326
|
for (let i = 0; i < transposedRows.length; i++) {
|
|
1326
1327
|
htmlTransposeBuf += buildHtmlTransposeRow(transposedRows[i], htmlTransposeColumnStyles[i]);
|
|
1327
|
-
teamsTranspose.push(
|
|
1328
|
+
teamsTranspose.push(createTeamsTransposeTableRow(transposedRows[i], mapTeamsTransposeStyles(htmlTransposeColumnStyles[i])));
|
|
1328
1329
|
}
|
|
1329
1330
|
}
|
|
1330
1331
|
rowIdx++;
|
|
@@ -1383,7 +1384,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
|
|
|
1383
1384
|
}));
|
|
1384
1385
|
for (let i = 0; i < transposedRows.length; i++) {
|
|
1385
1386
|
htmlTransposeBuf += buildHtmlTransposeRow(transposedRows[i], htmlTransposeColumnStyles[i]);
|
|
1386
|
-
teamsTranspose.push(
|
|
1387
|
+
teamsTranspose.push(createTeamsTransposeTableRow(transposedRows[i], mapTeamsTransposeStyles(htmlTransposeColumnStyles[i])));
|
|
1387
1388
|
}
|
|
1388
1389
|
}
|
|
1389
1390
|
rowIdx++;
|
package/dist/chatwms/teams.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function createTeamsTableItem(rows: any[]): ({
|
|
2
2
|
type: string;
|
|
3
|
+
separator: boolean;
|
|
3
4
|
cells: {
|
|
4
5
|
type: string;
|
|
5
6
|
items: {
|
|
@@ -118,7 +119,7 @@ export declare function createTeamsReportValueCard(lineTitle: string, columnName
|
|
|
118
119
|
}[];
|
|
119
120
|
})[];
|
|
120
121
|
};
|
|
121
|
-
export declare function createTeamsReportRowCard(lineTitle: string,
|
|
122
|
+
export declare function createTeamsReportRowCard(lineTitle: string, table: any[], summary: string, reportTitle: string): {
|
|
122
123
|
type: string;
|
|
123
124
|
version: string;
|
|
124
125
|
msteams: {
|
|
@@ -138,8 +139,12 @@ export declare function createTeamsReportRowCard(lineTitle: string, columnSets:
|
|
|
138
139
|
wrap: boolean;
|
|
139
140
|
} | {
|
|
140
141
|
type: string;
|
|
142
|
+
showGridLines: boolean;
|
|
141
143
|
roundedCorners: boolean;
|
|
142
|
-
|
|
144
|
+
columns: {
|
|
145
|
+
width: number;
|
|
146
|
+
}[];
|
|
147
|
+
rows: any[];
|
|
143
148
|
})[];
|
|
144
149
|
};
|
|
145
150
|
export declare function createTeamsReportChartCard(lineTitle: string, png: string, summary: string, reportTitle: string): {
|
|
@@ -192,6 +197,7 @@ export declare function createTeamsAlertTableCard(condition: string, rows: any[]
|
|
|
192
197
|
}[];
|
|
193
198
|
rows: ({
|
|
194
199
|
type: string;
|
|
200
|
+
separator: boolean;
|
|
195
201
|
cells: {
|
|
196
202
|
type: string;
|
|
197
203
|
items: {
|
package/dist/chatwms/teams.js
CHANGED
|
@@ -136,7 +136,7 @@ export function createTeamsReportValueCard(lineTitle, columnName, value, styles,
|
|
|
136
136
|
]
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
export function createTeamsReportRowCard(lineTitle,
|
|
139
|
+
export function createTeamsReportRowCard(lineTitle, table, summary, reportTitle) {
|
|
140
140
|
return {
|
|
141
141
|
type: "AdaptiveCard",
|
|
142
142
|
version: "1.5",
|
|
@@ -144,9 +144,11 @@ export function createTeamsReportRowCard(lineTitle, columnSets, summary, reportT
|
|
|
144
144
|
body: [
|
|
145
145
|
createTeamsTitleItem(reportTitle, lineTitle),
|
|
146
146
|
{
|
|
147
|
-
type: "
|
|
147
|
+
type: "Table",
|
|
148
|
+
showGridLines: false,
|
|
148
149
|
roundedCorners: true,
|
|
149
|
-
|
|
150
|
+
columns: [{ width: 1 }, { width: 2 }],
|
|
151
|
+
rows: table
|
|
150
152
|
},
|
|
151
153
|
createTeamsSummaryItem(summary)
|
|
152
154
|
]
|