labsense-ui-kit 1.2.64 → 1.2.66

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/index.js CHANGED
@@ -9106,8 +9106,10 @@ var CircularProgress = function CircularProgress(_ref) {
9106
9106
  var radius = (viewBoxSize - strokeWidth) / 2;
9107
9107
  var circumference = 2 * Math.PI * radius;
9108
9108
  var parseVolumeData = function parseVolumeData(threshold, totalCapacity, usedCapacity) {
9109
+ var total = Number(totalCapacity) || 0;
9110
+ var used = Number(usedCapacity) || 0;
9109
9111
  var thresholdValue = threshold != null ? threshold : 100;
9110
- var progress = usedCapacity / totalCapacity * 100;
9112
+ var progress = total > 0 ? used / total * 100 : 0;
9111
9113
  return {
9112
9114
  progress: Math.min(Math.max(Math.round(progress), 0), 100),
9113
9115
  processedThreshold: Math.min(Math.max(thresholdValue, 0), 100)
@@ -9162,7 +9164,7 @@ var CircularProgress = function CircularProgress(_ref) {
9162
9164
  "$fontSize": '12px',
9163
9165
  "$fontWeight": '500',
9164
9166
  "$color": progressColor || themeColors.vms["default"].primary
9165
- }, progress + "%"));
9167
+ }, progress === 0 ? '-' : progress + "%"));
9166
9168
  };
9167
9169
 
9168
9170
  var _templateObject$m, _templateObject2$i;