@cellaware/utils 8.6.13 → 8.6.14
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 +7 -6
- package/package.json +1 -1
package/dist/chatwms/datagrid.js
CHANGED
|
@@ -780,9 +780,9 @@ function sortRows(data, sortModel) {
|
|
|
780
780
|
return 0;
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
|
-
function processHtmlStyles(value, columnFormat, rowStyles, columnStyles) {
|
|
783
|
+
function processHtmlStyles(value, columnName, columnFormat, rowStyles, columnStyles) {
|
|
784
784
|
let columnStyle = {
|
|
785
|
-
columnName
|
|
785
|
+
columnName,
|
|
786
786
|
styles: []
|
|
787
787
|
};
|
|
788
788
|
// Reminder: Value Formatting is performed **before** Conditional Formatting.
|
|
@@ -861,6 +861,7 @@ export function mapTeamsStyles(columnNames, htmlRowStyles, htmlColumnStyles, tea
|
|
|
861
861
|
return {};
|
|
862
862
|
}
|
|
863
863
|
};
|
|
864
|
+
console.log('COUNT: ' + htmlColumnStyles.length);
|
|
864
865
|
for (const htmlColumnStyle of htmlColumnStyles) {
|
|
865
866
|
teamsColumnStyles.push({
|
|
866
867
|
columnName: htmlColumnStyle.columnName,
|
|
@@ -1024,7 +1025,7 @@ function createTeamsTableRow(columnNames, values, rowStyles, columnStyles) {
|
|
|
1024
1025
|
style: rowStyle,
|
|
1025
1026
|
cells: values.map((value, idx) => {
|
|
1026
1027
|
const columnName = columnNames[idx];
|
|
1027
|
-
const columnStyle = columnStyles
|
|
1028
|
+
const columnStyle = columnStyles.find(cs => cs.columnName === columnName);
|
|
1028
1029
|
console.log('C.');
|
|
1029
1030
|
console.log(columnStyle);
|
|
1030
1031
|
let style = undefined;
|
|
@@ -1084,7 +1085,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
|
|
|
1084
1085
|
row[columnFormat.displayName] = formattedValue;
|
|
1085
1086
|
chartRow[columnFormat.displayName] = formatNumberEnabled(columnFormat.valueFormat) ? value : formattedValue;
|
|
1086
1087
|
htmlRowValues.push(formattedValue);
|
|
1087
|
-
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1088
|
+
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat.displayName, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1088
1089
|
[teamsRowStyles, teamsColumnStyles] = mapTeamsStyles(htmlColumnNames, htmlRowStyles, htmlColumnStyles, teamsRowStyles, teamsColumnStyles);
|
|
1089
1090
|
if (rowIdx === 0) {
|
|
1090
1091
|
htmlColumnNames.push(columnFormat.displayName);
|
|
@@ -1106,7 +1107,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
|
|
|
1106
1107
|
row[adjDisplayName] = formattedValue;
|
|
1107
1108
|
chartRow[adjDisplayName] = formatNumberEnabled(columnFormat.valueFormat) ? value : formattedValue;
|
|
1108
1109
|
htmlRowValues.push(formattedValue);
|
|
1109
|
-
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1110
|
+
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, adjDisplayName, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1110
1111
|
[teamsRowStyles, teamsColumnStyles] = mapTeamsStyles(htmlColumnNames, htmlRowStyles, htmlColumnStyles, teamsRowStyles, teamsColumnStyles);
|
|
1111
1112
|
if (rowIdx === 0) {
|
|
1112
1113
|
htmlColumnNames.push(adjDisplayName);
|
|
@@ -1165,7 +1166,7 @@ export function transformDatagrid(rows, datagridState, locale, condition) {
|
|
|
1165
1166
|
row[columnFormat.displayName] = formattedValue;
|
|
1166
1167
|
chartRow[columnFormat.displayName] = formatNumberEnabled(columnFormat.valueFormat) ? value : formattedValue;
|
|
1167
1168
|
htmlRowValues.push(formattedValue);
|
|
1168
|
-
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1169
|
+
[htmlRowStyles, htmlColumnStyles] = processHtmlStyles(formattedValue, columnFormat.displayName, columnFormat, htmlRowStyles, htmlColumnStyles);
|
|
1169
1170
|
[teamsRowStyles, teamsColumnStyles] = mapTeamsStyles(htmlColumnNames, htmlRowStyles, htmlColumnStyles, teamsRowStyles, teamsColumnStyles);
|
|
1170
1171
|
if (rowIdx === 0) {
|
|
1171
1172
|
htmlColumnNames.push(columnFormat.displayName);
|