pace-table-lib 1.0.72 → 1.0.73

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.
@@ -0,0 +1 @@
1
+ export declare function getSparkLineStyleObj(sparkline: any): import("./StaticTable/SparkLine/jQuerySparkLine.types").SL_STYLE_OBJ_TYPE;
@@ -0,0 +1,3 @@
1
+ import { PivotTableProps } from "./NewPivotTable.types";
2
+ import "./NewPivotTable.scss";
3
+ export default function NewPivotTable({ tableData, tableStyleProps, tableWidth, tableHeight, measureFormatConfigs }: PivotTableProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { MeasureFormatObj } from "../StaticTable/StaticTableTypeDec.types";
2
+ export interface ColGroupInfo {
3
+ groupName: string;
4
+ parentDataIdx: number;
5
+ childDataIndices: number[];
6
+ }
7
+ export interface PivotNode {
8
+ id: string;
9
+ label: string;
10
+ level: number;
11
+ valueArr?: any;
12
+ styleJsonArr?: any[];
13
+ isExpanded?: boolean;
14
+ }
15
+ export interface PivotModel {
16
+ rowTree: PivotNode[];
17
+ columnTree: PivotNode[];
18
+ visibleRows: PivotNode[];
19
+ visibleColumns: PivotNode[];
20
+ values: number[][];
21
+ rowTotals: number[];
22
+ columnTotals: number[];
23
+ meta: {
24
+ min: number;
25
+ max: number;
26
+ };
27
+ }
28
+ export type PivotTableProps = {
29
+ tableData: PivotTableData;
30
+ leftFixedCellNameList: string[];
31
+ tableStyleProps: any;
32
+ tableWidth: number;
33
+ tableHeight: number;
34
+ measureFormatConfigs: MeasureFormatObj[];
35
+ };
36
+ export interface PivotTableData {
37
+ rowData: number[][];
38
+ rowHeaders: string[];
39
+ columnHeaders: string[];
40
+ minValuesInRows: number[];
41
+ maxValuesInRows: number[];
42
+ minValuesInColumns: number[];
43
+ maxValuesInColumns: number[];
44
+ minValueInTable: number;
45
+ maxValueInTable: number;
46
+ rowTotal: number[];
47
+ columnTotal: number[];
48
+ uniqueTitleMembers: string[];
49
+ }
@@ -0,0 +1,5 @@
1
+ import { ColGroupInfo, PivotNode } from "./NewPivotTable.types";
2
+ export declare function parseColGroups(columnHeaders: string[]): ColGroupInfo[];
3
+ export declare function createRowTree(tableData: any, isRowHeaderVisible: boolean): PivotNode[];
4
+ export declare function createColumnHeaders(tableData: any, isRowTotalOn: boolean, isHeaderAtStart: boolean, isSparkLineVisible: boolean, isSlAtStart: boolean, sparkLineText: string): PivotNode[];
5
+ export declare function getNumberArr(valArr?: (string | number)[]): number[];
@@ -0,0 +1 @@
1
+ export declare const SUBTOTAL = "!subtotal";
@@ -31,6 +31,7 @@ export declare const COLOR_BAND_TYPE: {
31
31
  SINGLE: string;
32
32
  ROW_BAND: string;
33
33
  COLUMN_BAND: string;
34
+ ALT_ROW: string;
34
35
  };
35
36
  export declare const BACKGROUND_COLOR_KEY_MAP: Record<"row" | "dataField" | "column", {
36
37
  backgroundKey: string;
@@ -7919,7 +7919,8 @@ const COLOR_BAND_TYPE = {
7919
7919
  NO_FILL: "No Fill",
7920
7920
  SINGLE: "Single",
7921
7921
  ROW_BAND: "Row Band",
7922
- COLUMN_BAND: "Column Band"
7922
+ COLUMN_BAND: "Column Band",
7923
+ ALT_ROW: "Alternate Rows"
7923
7924
  };
7924
7925
  const BACKGROUND_COLOR_KEY_MAP = {
7925
7926
  row: {
@@ -8064,6 +8065,7 @@ function getBgColor(obj, type) {
8064
8065
  result.oddColor = obj[map.customKey];
8065
8066
  result.evenColor = obj[map.customKey];
8066
8067
  break;
8068
+ case COLOR_BAND_TYPE.ALT_ROW:
8067
8069
  case map.bandType:
8068
8070
  result.oddColor = obj[map.oddKey];
8069
8071
  result.evenColor = obj[map.evenKey];
@@ -8086,12 +8088,12 @@ function toDateFromExcel(value) {
8086
8088
  function formatDate(value, formatKey) {
8087
8089
  try {
8088
8090
  const date = toDateFromExcel(value);
8089
- const day = pad(date.getDate());
8090
- const month = pad(date.getMonth() + 1);
8091
- const year = date.getFullYear();
8091
+ const day = pad(date.getUTCDate());
8092
+ const month = pad(date.getUTCMonth() + 1);
8093
+ const year = date.getUTCFullYear();
8092
8094
  const shortYear = year.toString().slice(-2);
8093
- const monthShort = MONTHS_SHORT[date.getMonth()];
8094
- const monthFull = MONTHS_FULL[date.getMonth()];
8095
+ const monthShort = MONTHS_SHORT[date.getUTCMonth()];
8096
+ const monthFull = MONTHS_FULL[date.getUTCMonth()];
8095
8097
  switch (formatKey) {
8096
8098
  case DATE_FORMAT_OBJ.DD_MM_YYYY:
8097
8099
  return `${day}-${month}-${year}`;
@@ -8244,6 +8246,7 @@ function interpolateColor$1(minColor, maxColor, ratio) {
8244
8246
  const rMix = Math.round(r2(minColor) + (r2(maxColor) - r2(minColor)) * ratio);
8245
8247
  const gMix = Math.round(g(minColor) + (g(maxColor) - g(minColor)) * ratio);
8246
8248
  const bMix = Math.round(b(minColor) + (b(maxColor) - b(minColor)) * ratio);
8249
+ if (isNaN(rMix) || isNaN(gMix) || isNaN(bMix)) return "rgb(255, 255, 255)";
8247
8250
  return `rgb(${rMix},${gMix},${bMix})`;
8248
8251
  }
8249
8252
  function computeMatrix(rawDataMatrix, mode, transformFn) {