logitude-dashboard-library 3.2.61 → 3.2.63

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.
@@ -903,7 +903,8 @@ $dark-grey: #717585;
903
903
  left: 0;
904
904
  bottom: 0;
905
905
 
906
- * {
906
+ .pivot-grid-element:not(.dl-ag-pivot-grid),
907
+ .pivot-grid-element:not(.dl-ag-pivot-grid) * {
907
908
  border-color: #e0e0e0 !important;
908
909
  }
909
910
 
@@ -916,6 +917,111 @@ $dark-grey: #717585;
916
917
  scrollbar-color: initial;
917
918
  }
918
919
 
920
+ .dl-ag-pivot-grid {
921
+ width: calc(100% - 16px);
922
+ height: 100%;
923
+ margin: 0 auto;
924
+ overflow-x: auto;
925
+ overflow-y: hidden;
926
+ font-family: "Manrope", sans-serif;
927
+ }
928
+
929
+ .dl-ag-pivot-grid .ag-root-wrapper {
930
+ border: 1px solid #e0e0e0;
931
+ }
932
+
933
+ .dl-ag-pivot-grid {
934
+ --ag-border-color: #e0e0e0;
935
+ --ag-row-border-color: #e0e0e0;
936
+ --ag-header-background-color: #ffffff;
937
+ }
938
+
939
+ .dl-ag-pivot-grid.ag-theme-balham .ag-header {
940
+ background-color: #ffffff !important;
941
+ }
942
+
943
+ .dl-ag-pivot-grid.ag-theme-balham .ag-header-cell,
944
+ .dl-ag-pivot-grid.ag-theme-balham .ag-header-group-cell {
945
+ font-family: "Manrope";
946
+ font-size: 12px;
947
+ font-weight: 600;
948
+ text-align: center;
949
+ color: #222222;
950
+ background-color: #ffffff !important;
951
+ }
952
+
953
+ .dl-ag-pivot-grid .ag-header-cell[col-id^="ag-Grid-AutoColumn"] {
954
+ text-align: left;
955
+ }
956
+
957
+ .dl-ag-pivot-grid .ag-header-cell[col-id^="PivotRowTotal_"],
958
+ .dl-ag-pivot-grid .ag-header-group-cell.dl-pivot-row-grand-total-group-header,
959
+ .dl-ag-pivot-grid .ag-header-group-cell.dl-pivot-row-grand-total-group-header-sibling {
960
+ background-color: #f5f5f5 !important;
961
+ }
962
+
963
+ .dl-ag-pivot-grid.ag-theme-balham .ag-cell {
964
+ border: none !important;
965
+ border-right: 1px solid #e0e0e0 !important;
966
+ }
967
+
968
+ .dl-ag-pivot-grid.ag-theme-balham .ag-row {
969
+ border-bottom: 1px solid #e0e0e0 !important;
970
+ }
971
+
972
+ .dl-ag-pivot-grid .dl-ag-pivot-data-cell,
973
+ .dl-ag-pivot-grid .ag-cell.dl-ag-pivot-data-cell {
974
+ text-align: right !important;
975
+ cursor: pointer;
976
+ }
977
+
978
+ .dl-ag-pivot-grid .dl-ag-pivot-row-label-cell,
979
+ .dl-ag-pivot-grid .ag-cell.dl-ag-pivot-row-label-cell {
980
+ text-align: left !important;
981
+ justify-content: flex-start;
982
+ background-color: #ffffff;
983
+ }
984
+
985
+ .dl-ag-pivot-grid .ag-row-footer .ag-cell,
986
+ .dl-ag-pivot-grid .ag-row-group-footer .ag-cell {
987
+ font-weight: 500;
988
+ }
989
+
990
+ .dl-ag-pivot-grid .ag-row-footer .dl-ag-pivot-row-label-cell,
991
+ .dl-ag-pivot-grid .ag-row-group-footer .dl-ag-pivot-row-label-cell {
992
+ text-align: left !important;
993
+ }
994
+
995
+ .dl-ag-pivot-grid .ag-cell {
996
+ font-family: "Manrope";
997
+ font-size: 12px;
998
+ font-weight: 500;
999
+ color: #46494A;
1000
+ padding: 6px 8px 5px 8px;
1001
+ }
1002
+
1003
+ .dl-ag-pivot-grid .ag-row-group .ag-cell {
1004
+ text-align: left;
1005
+ background-color: #ffffff;
1006
+ }
1007
+
1008
+ .dl-ag-pivot-grid .ag-row:not(.ag-row-group) .ag-cell:not(.dl-ag-pivot-data-cell) {
1009
+ text-align: left;
1010
+ }
1011
+
1012
+ .dl-ag-pivot-grid .ag-row-footer,
1013
+ .dl-ag-pivot-grid .ag-row-group-footer {
1014
+ background-color: #f5f5f5 !important;
1015
+ }
1016
+
1017
+ .dl-ag-pivot-grid .dl-pivot-row-grand-total-group-header {
1018
+ overflow: visible;
1019
+ }
1020
+
1021
+ .dl-ag-pivot-grid .dl-pivot-row-grand-total-group-header-sibling .ag-header-group-text {
1022
+ visibility: hidden;
1023
+ }
1024
+
919
1025
  .dx-scrollbar-hoverable .dx-scrollable-scroll.dx-state-invisible .dx-scrollable-scroll-content {
920
1026
  background-color: rgba(191, 191, 191, .7);
921
1027
  }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import 'ag-grid-enterprise';
3
+ import 'ag-grid-community/dist/styles/ag-grid.css';
4
+ import 'ag-grid-community/dist/styles/ag-theme-balham.css';
5
+ import { CustomChartProps } from './CustomChart';
6
+ declare type PivotChartProps = {
7
+ customChartProps: CustomChartProps;
8
+ };
9
+ declare const AgPivotGrid: React.ForwardRefExoticComponent<PivotChartProps & React.RefAttributes<unknown>>;
10
+ export default AgPivotGrid;
@@ -8,6 +8,7 @@ export declare type CustomChartProps = {
8
8
  dataBinding: DashboardDataBinding;
9
9
  isPreviewModeActive?: boolean;
10
10
  isInEditMode?: boolean;
11
+ useAgGridPivot?: boolean;
11
12
  onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
12
13
  onShowError?: (errorMsg: string | null) => void;
13
14
  };
@@ -0,0 +1,45 @@
1
+ export declare type PivotApiField = {
2
+ FieldId: string;
3
+ FieldCode?: string;
4
+ PivotCode: string;
5
+ PivotName: string;
6
+ DisplayName: string;
7
+ DataTypeCode?: string;
8
+ DateCode: string | null;
9
+ FieldType: string | null;
10
+ };
11
+ export declare type PivotApiMeasure = {
12
+ PivotMeasureCode: string;
13
+ MeasureCode: string;
14
+ MeasureFieldId?: string;
15
+ MeasureFieldDataType?: string | null;
16
+ DisplayName: string;
17
+ FieldType?: string;
18
+ };
19
+ export declare const isRowPivotField: (field: PivotApiField) => boolean;
20
+ export declare const truncateToTwoDecimals: (value: any) => number;
21
+ export declare const isPivotMeasureValueEmpty: (value: any) => boolean;
22
+ export declare const logitudeSumAgg: (params: {
23
+ values: any[];
24
+ }) => number | null;
25
+ export declare const formatPivotMeasureValue: (value: any, measure: PivotApiMeasure) => string;
26
+ export declare const getPivotGroupFooterLabel: (node: any, fieldCode: string | null | undefined, rawValue: any, lookupDisplayName: (fieldCode: string, rawValue: any) => string) => string;
27
+ export declare const compareDimensionValues: (aValue: any, bValue: any, dateCode: string | null, aText?: any, bText?: any) => number;
28
+ export declare const getPivotDisplayName: (pivotData: any[], fieldName: string, dataField: string, dataFieldValue: any) => string;
29
+ export declare const isPivotRowGrandTotalColumnDef: (colDef: any) => boolean;
30
+ export declare const isPivotRowGrandTotalGroupDef: (colGroupDef: any) => boolean;
31
+ export declare const resolvePivotGroupHeaderName: (colGroupDef: any, columnFields: PivotApiField[], lookupDisplayName: (field: PivotApiField, rawValue: any) => string) => string | null;
32
+ export declare const getPivotValueColumnId: (pivotValueColumn: any) => string | null;
33
+ export declare const resolveMeasureFromPivotValueColumn: (colDef: any, measures: PivotApiMeasure[]) => PivotApiMeasure | undefined;
34
+ export declare const resolvePivotLeafHeaderName: (colDef: any, columnFields: PivotApiField[], lookupDisplayName: (field: PivotApiField, rawValue: any) => string, measureCount: number, measures: PivotApiMeasure[]) => string | null;
35
+ export declare const resolveMeasureForSecondaryColDef: (colDef: any, measures: PivotApiMeasure[]) => PivotApiMeasure | undefined;
36
+ export declare const applyPivotRowGrandTotalGroupHeaderLabel: (gridRootElement: HTMLElement | null, columnApi: any, measureCount: number, columnPivotFieldCount: number) => void;
37
+ export declare const applyPivotRowGrandTotalHeader: (colDef: any, measureCount: number, measures: PivotApiMeasure[]) => void;
38
+ export declare const collectPivotRowPath: (startNode: any) => {
39
+ field: string;
40
+ key: any;
41
+ }[];
42
+ export declare const buildPivotDrillDownPivotFields: (colDef: any, startNode: any, apiFields: PivotApiField[]) => any[];
43
+ export declare const getMeasureCaption: (measure: PivotApiMeasure) => string;
44
+ export declare const parseJsonArray: (json: string | null | undefined) => any[];
45
+ export declare const parsePivotTotalsSettings: (json: string | null | undefined) => any;
@@ -22,6 +22,7 @@ declare type DashboardDesignerProps = {
22
22
  onCopyWidgetToClipboard?: (key: string, widget: ReactWidgetPM) => void;
23
23
  dataBinding: DashboardDataBinding;
24
24
  onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
25
+ useAgGridPivot?: boolean;
25
26
  };
26
27
  declare const DashboardDesigner: (props: DashboardDesignerProps) => React.JSX.Element;
27
28
  export declare const layoutGridProps: {
@@ -15,6 +15,7 @@ declare type WidgetCardProps = {
15
15
  dataBinding: DashboardDataBinding;
16
16
  isInEditMode: boolean;
17
17
  isPreviewModeActive?: boolean;
18
+ useAgGridPivot?: boolean;
18
19
  onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
19
20
  };
20
21
  declare const WidgetCard: React.ForwardRefExoticComponent<WidgetCardProps & React.RefAttributes<unknown>>;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,8 @@ declare type DashboardProps = {
22
22
  onCopyWidgetToClipboard?: (key: string, widget: ReactWidgetPM) => void;
23
23
  openDeleteWidgetConfirmWindow: (deleteProps: DeleteWidgetProps) => void;
24
24
  onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
25
+ useAgGridPivot?: boolean;
26
+ agGridLicenseKey?: string;
25
27
  };
26
28
  declare const Dashboard: (props: DashboardProps) => React.JSX.Element;
27
29
  export default Dashboard;