ps-toolkit-ui 0.2.37 → 0.2.38
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/bundles/ps-toolkit-ui.umd.js +7 -1
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/helper.class.js +7 -1
- package/esm2015/lib/components/table/row/table.row.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +7 -1
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/helper.class.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1160,6 +1160,12 @@
|
|
|
1160
1160
|
}
|
|
1161
1161
|
return data;
|
|
1162
1162
|
};
|
|
1163
|
+
HelperClass.getColorByBgColor = function (bgColor) {
|
|
1164
|
+
if (!bgColor) {
|
|
1165
|
+
return '';
|
|
1166
|
+
}
|
|
1167
|
+
return (parseInt(bgColor.replace('#', ''), 16) > 0xffffff / 2) ? '#000' : '#fff';
|
|
1168
|
+
};
|
|
1163
1169
|
return HelperClass;
|
|
1164
1170
|
}());
|
|
1165
1171
|
|
|
@@ -2820,7 +2826,7 @@
|
|
|
2820
2826
|
return HelperClass.getTime(cv);
|
|
2821
2827
|
}
|
|
2822
2828
|
else if (col.type === exports.TableCollType.Color) {
|
|
2823
|
-
return '<div class="color" style="background-color: ' + cv + '">' + cv + '</div>';
|
|
2829
|
+
return '<div class="color" style="background-color: ' + cv + '; color: ' + HelperClass.getColorByBgColor(cv) + '">' + cv + '</div>';
|
|
2824
2830
|
}
|
|
2825
2831
|
else if (col.type === exports.TableCollType.Url) {
|
|
2826
2832
|
return '<a target="_blank" href="' + cv + '">' + cv + '</a>';
|