pace-table-lib 1.0.67 → 1.0.68

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.
@@ -18212,10 +18212,10 @@ function StaticTable({
18212
18212
  });
18213
18213
  if (isSparkLineVisible && isSlAtStart && !headerAtStart) {
18214
18214
  const styleObj = {
18215
- width: widthForTheTotal,
18215
+ width: fixedColWidth,
18216
18216
  height: rowCellHeight,
18217
18217
  top: baseTop + measuresBySlice.length * rowCellHeight,
18218
- left: 80,
18218
+ left: widthForTheTotal,
18219
18219
  background: getBgColorForCell(rowCount - 1, rowColors),
18220
18220
  fontWeight: "bold"
18221
18221
  };
@@ -18401,40 +18401,42 @@ function StaticTable({
18401
18401
  return obj;
18402
18402
  }
18403
18403
  function shouldApplyFormat(value, format, type, level) {
18404
- if (!format.formattingScheme || format.formattingScheme.toLowerCase() !== "conditionally") {
18405
- return true;
18406
- }
18407
- const formattedValue = formatValue(value, void 0, DataFieldDecimalPrecision);
18408
- const operator = format.operator?.toLowerCase();
18409
- if (operator === "contains" && format.containsStr) {
18410
- return value?.toLowerCase().includes(format.containsStr.toLowerCase());
18411
- }
18412
- if (operator === "duplicate") {
18413
- const currentVal = value?.toLowerCase();
18414
- if (type === CONDITIONAL_FORMAT_FOR.ROW) {
18415
- const allChildren = measuresBySlice.map((item) => item.sliceMark[level]?.toLowerCase()).filter((v) => v);
18416
- return allChildren.filter((v) => v === currentVal).length > 1;
18417
- } else if (type === CONDITIONAL_FORMAT_FOR.COLUMN) {
18418
- return dimensionMarks.filter((row) => row.some((item) => item?.toLowerCase() === currentVal)).length > 1;
18404
+ try {
18405
+ if (!format.formattingScheme || format.formattingScheme.toLowerCase() !== "conditionally") {
18406
+ return true;
18419
18407
  }
18420
- }
18421
- if (type === CONDITIONAL_FORMAT_FOR.VALUE) {
18422
- try {
18408
+ const operator = format.operator?.toLowerCase();
18409
+ if (operator === "contains" && format.containsStr) {
18410
+ return value?.toLowerCase().includes(format.containsStr.toLowerCase());
18411
+ }
18412
+ if (operator === "duplicate") {
18413
+ const currentVal = value?.toLowerCase();
18414
+ if (type === CONDITIONAL_FORMAT_FOR.ROW) {
18415
+ const allChildren = measuresBySlice.map((item) => item.sliceMark[level]?.toLowerCase()).filter((v) => v);
18416
+ return allChildren.filter((v) => v === currentVal).length > 1;
18417
+ } else if (type === CONDITIONAL_FORMAT_FOR.COLUMN) {
18418
+ return dimensionMarks.filter((row) => row.some((item) => item?.toLowerCase() === currentVal)).length > 1;
18419
+ }
18420
+ }
18421
+ if (type === CONDITIONAL_FORMAT_FOR.VALUE) {
18422
+ const formattedValue = formatValue(value, void 0, DataFieldDecimalPrecision);
18423
+ const numericVal = Number(formattedValue);
18424
+ const checkVal1 = Number(format?.checkValue);
18425
+ const checkVal2 = Number(format?.secondCheckValue);
18423
18426
  if (operator === "in between") {
18424
- if (format.checkValue && format.secondCheckValue) {
18425
- return formattedValue >= format.checkValue && formattedValue <= format.secondCheckValue;
18427
+ if (checkVal1 && checkVal2) {
18428
+ return numericVal >= checkVal1 && numericVal <= checkVal2;
18426
18429
  }
18427
18430
  return false;
18428
18431
  } else if (operator === "not between") {
18429
- if (format.checkValue && format.secondCheckValue) {
18430
- return formattedValue < format.checkValue || formattedValue > format.secondCheckValue;
18432
+ if (checkVal1 && checkVal2) {
18433
+ return numericVal < checkVal1 || numericVal > checkVal2;
18431
18434
  }
18432
18435
  return false;
18433
18436
  }
18434
- return compareVal(Number(formattedValue), format?.operator, Number(format?.checkValue));
18435
- } catch {
18436
- return false;
18437
+ return compareVal(numericVal, format?.operator, Number(format?.checkValue));
18437
18438
  }
18439
+ } catch (error) {
18438
18440
  }
18439
18441
  return false;
18440
18442
  }