logitude-dashboard-library 3.1.46 → 3.1.48
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/assets/styles/dl-dashboard.scss +108 -4
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/PivotGrid.d.ts +1 -1
- package/dist/index.js +62 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +63 -24
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +108 -4
- package/package.json +1 -1
|
@@ -276,6 +276,13 @@ $dark-grey: #717585;
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
.pivot-header {
|
|
280
|
+
&::after {
|
|
281
|
+
content: "";
|
|
282
|
+
border-bottom: 0px !important;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
279
286
|
.header-contents {
|
|
280
287
|
display: flex;
|
|
281
288
|
|
|
@@ -811,17 +818,109 @@ $dark-grey: #717585;
|
|
|
811
818
|
align-items: flex-start;
|
|
812
819
|
}
|
|
813
820
|
|
|
821
|
+
.force-overflow-hidden {
|
|
822
|
+
overflow: hidden !important;
|
|
823
|
+
}
|
|
824
|
+
|
|
814
825
|
.dl-pivot-chart-container {
|
|
815
826
|
overflow: auto;
|
|
827
|
+
height: calc(100% - 12px);
|
|
828
|
+
width: 100%;
|
|
829
|
+
margin: 0 auto;
|
|
830
|
+
display: block;
|
|
816
831
|
position: absolute;
|
|
817
|
-
top:
|
|
832
|
+
top: 0;
|
|
818
833
|
right: 0;
|
|
819
834
|
left: 0;
|
|
820
835
|
bottom: 0;
|
|
821
|
-
height: calc(100% - 10px);
|
|
822
|
-
width: 100%;
|
|
823
|
-
margin: 0 auto;
|
|
824
836
|
|
|
837
|
+
.pivot-grid-element {
|
|
838
|
+
width: 100%;
|
|
839
|
+
height: 100%;
|
|
840
|
+
margin: 0 auto;
|
|
841
|
+
overflow-x: auto;
|
|
842
|
+
overflow-y: hidden;
|
|
843
|
+
scrollbar-color: initial;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.dx-scrollbar-hoverable .dx-scrollable-scroll.dx-state-invisible .dx-scrollable-scroll-content {
|
|
847
|
+
background-color: rgba(191,191,191,.7);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.dx-pivotgrid-fields-area-head td .dx-area-field,
|
|
851
|
+
.dx-pivotgrid-horizontal-headers td,
|
|
852
|
+
.dx-pivotgrid .dx-area-description-cell.dx-pivotgrid-background {
|
|
853
|
+
background-color: #F1F1F1;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.dx-pivotgrid-horizontal-headers td {
|
|
857
|
+
text-align: left;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.dx-pivotgrid-fields-area-head td .dx-area-field {
|
|
861
|
+
border-bottom: 0;
|
|
862
|
+
border-right: 0;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.dx-pivotgrid .dx-pivotgrid-area td {
|
|
866
|
+
padding: 4px 8px;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.dx-pivotgrid-fields-area-head .dx-area-field-content,
|
|
870
|
+
.dx-pivotgrid-horizontal-headers tr td span {
|
|
871
|
+
font-family: "Manrope";
|
|
872
|
+
font-size: 13px;
|
|
873
|
+
font-weight: 600;
|
|
874
|
+
text-align: left;
|
|
875
|
+
color: #222222;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.dx-pivotgrid .dx-pivotgrid-vertical-headers td {
|
|
879
|
+
background: #FAFAFA;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.dx-pivotgrid .dx-pivotgrid-vertical-headers td > span {
|
|
883
|
+
font-family: "Manrope";
|
|
884
|
+
font-size: 13px;
|
|
885
|
+
font-weight: 500;
|
|
886
|
+
text-align: left;
|
|
887
|
+
color: #46494A;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.dx-pivotgrid .dx-pivotgrid-vertical-headers td div > span {
|
|
891
|
+
font-weight: 600 !important;
|
|
892
|
+
color: #46494A !important;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.dx-pivotgrid .dx-pivotgrid-area-data tbody td {
|
|
896
|
+
font-family: "Manrope";
|
|
897
|
+
font-size: 13px;
|
|
898
|
+
font-weight: 500;
|
|
899
|
+
text-align: right;
|
|
900
|
+
color: #46494A;
|
|
901
|
+
border-left: 0px !important;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.dx-widget {
|
|
905
|
+
&::-webkit-scrollbar {
|
|
906
|
+
width: 10px;
|
|
907
|
+
height: 10px
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
&::-webkit-scrollbar-thumb {
|
|
911
|
+
border: 1px solid rgba(0, 0, 0, 0);
|
|
912
|
+
background-clip: padding-box;
|
|
913
|
+
border-radius: 9999px;
|
|
914
|
+
background-color: #D9D9D9;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
&::-webkit-scrollbar-track {
|
|
918
|
+
background: #F3F3F3;
|
|
919
|
+
border: 1px solid white;
|
|
920
|
+
border-radius: 9999px;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
825
924
|
.dx-area-field-container {
|
|
826
925
|
.dx-pivotgrid-fields-area-head {
|
|
827
926
|
td {
|
|
@@ -829,6 +928,7 @@ $dark-grey: #717585;
|
|
|
829
928
|
}
|
|
830
929
|
}
|
|
831
930
|
}
|
|
931
|
+
|
|
832
932
|
&::-webkit-scrollbar {
|
|
833
933
|
width: 10px;
|
|
834
934
|
height: 10px
|
|
@@ -1043,6 +1143,10 @@ $dark-grey: #717585;
|
|
|
1043
1143
|
padding-left: 12px !important;
|
|
1044
1144
|
}
|
|
1045
1145
|
|
|
1146
|
+
.min-width-105 {
|
|
1147
|
+
min-width: 105px !important;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1046
1150
|
.table-link-cell {
|
|
1047
1151
|
color: #1E4AC4 !important;
|
|
1048
1152
|
cursor: pointer;
|
|
@@ -3,5 +3,5 @@ import { CustomChartProps } from './CustomChart';
|
|
|
3
3
|
declare type PivotChartProps = {
|
|
4
4
|
customChartProps: CustomChartProps;
|
|
5
5
|
};
|
|
6
|
-
declare const PivotTable:
|
|
6
|
+
declare const PivotTable: React.ForwardRefExoticComponent<PivotChartProps & React.RefAttributes<unknown>>;
|
|
7
7
|
export default PivotTable;
|
package/dist/index.js
CHANGED
|
@@ -1492,7 +1492,7 @@ var TableChart = function TableChart(props) {
|
|
|
1492
1492
|
}));
|
|
1493
1493
|
};
|
|
1494
1494
|
|
|
1495
|
-
var PivotTable = function
|
|
1495
|
+
var PivotTable = React.forwardRef(function (props, comRef) {
|
|
1496
1496
|
var _useState = React.useState(),
|
|
1497
1497
|
setWidget = _useState[1];
|
|
1498
1498
|
|
|
@@ -1502,6 +1502,7 @@ var PivotTable = function PivotTable(props) {
|
|
|
1502
1502
|
|
|
1503
1503
|
var widgetRefData = React.useRef(null);
|
|
1504
1504
|
var tabledata = React.useRef();
|
|
1505
|
+
var pivotGridRef = React.useRef(null);
|
|
1505
1506
|
|
|
1506
1507
|
var _useState3 = React.useState(new PivotGridDataSource({
|
|
1507
1508
|
store: [],
|
|
@@ -1525,7 +1526,40 @@ var PivotTable = function PivotTable(props) {
|
|
|
1525
1526
|
if ((updatedWidget === null || updatedWidget === void 0 ? void 0 : updatedWidget.key) != ((_widgetRefData$curren = widgetRefData.current) === null || _widgetRefData$curren === void 0 ? void 0 : _widgetRefData$curren.key)) return;
|
|
1526
1527
|
setWidget(_extends({}, updatedWidget));
|
|
1527
1528
|
});
|
|
1529
|
+
document.addEventListener("resizeStop", handleResize);
|
|
1530
|
+
return function () {
|
|
1531
|
+
document.removeEventListener("resizeStop", handleResize);
|
|
1532
|
+
};
|
|
1528
1533
|
}, []);
|
|
1534
|
+
React.useEffect(function () {
|
|
1535
|
+
if (props.customChartProps.isInEditMode) {
|
|
1536
|
+
var _pivotGridRef$current;
|
|
1537
|
+
|
|
1538
|
+
if (pivotGridRef.current && (_pivotGridRef$current = pivotGridRef.current) !== null && _pivotGridRef$current !== void 0 && _pivotGridRef$current.instance && pivotGridRef.current.instance.element && pivotGridRef.current.instance.element().classList) {
|
|
1539
|
+
pivotGridRef.current.instance.element().classList.add('force-overflow-hidden');
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
setTimeout(function () {
|
|
1543
|
+
var _pivotGridRef$current2;
|
|
1544
|
+
|
|
1545
|
+
handleResize();
|
|
1546
|
+
|
|
1547
|
+
if (pivotGridRef.current && (_pivotGridRef$current2 = pivotGridRef.current) !== null && _pivotGridRef$current2 !== void 0 && _pivotGridRef$current2.instance && pivotGridRef.current.instance.element && pivotGridRef.current.instance.element().classList) {
|
|
1548
|
+
pivotGridRef.current.instance.element().classList.remove('force-overflow-hidden');
|
|
1549
|
+
}
|
|
1550
|
+
}, 5);
|
|
1551
|
+
}
|
|
1552
|
+
}, [props.customChartProps.isInEditMode]);
|
|
1553
|
+
|
|
1554
|
+
var handleResize = function handleResize() {
|
|
1555
|
+
var _pivotGridRef$current3, _pivotGridRef$current4;
|
|
1556
|
+
|
|
1557
|
+
if (pivotGridRef.current && (_pivotGridRef$current3 = pivotGridRef.current) !== null && _pivotGridRef$current3 !== void 0 && _pivotGridRef$current3.instance && (_pivotGridRef$current4 = pivotGridRef.current) !== null && _pivotGridRef$current4 !== void 0 && _pivotGridRef$current4.instance.repaint) {
|
|
1558
|
+
var _pivotGridRef$current5;
|
|
1559
|
+
|
|
1560
|
+
(_pivotGridRef$current5 = pivotGridRef.current) === null || _pivotGridRef$current5 === void 0 ? void 0 : _pivotGridRef$current5.instance.repaint();
|
|
1561
|
+
}
|
|
1562
|
+
};
|
|
1529
1563
|
|
|
1530
1564
|
var getPivotTableData = function getPivotTableData(widget) {
|
|
1531
1565
|
if (Session.Tenant == 0) {
|
|
@@ -1585,6 +1619,7 @@ var PivotTable = function PivotTable(props) {
|
|
|
1585
1619
|
allowFiltering: false,
|
|
1586
1620
|
area: field.PivotCode && field.PivotCode.includes('Row') ? 'row' : 'column',
|
|
1587
1621
|
expanded: true,
|
|
1622
|
+
wordWrapEnabled: true,
|
|
1588
1623
|
customizeText: function customizeText(cellInfo) {
|
|
1589
1624
|
return getColumnNameByColumnId(field.PivotName, field.PivotCode, cellInfo.value);
|
|
1590
1625
|
}
|
|
@@ -1593,19 +1628,13 @@ var PivotTable = function PivotTable(props) {
|
|
|
1593
1628
|
var pivotDataCellsFields = tabledata.current.PivotMeasures.map(function (measure) {
|
|
1594
1629
|
return {
|
|
1595
1630
|
dataField: measure.PivotMeasureCode,
|
|
1596
|
-
dataType: 'string',
|
|
1597
1631
|
area: 'data',
|
|
1632
|
+
dataType: 'number',
|
|
1633
|
+
summaryType: 'sum',
|
|
1634
|
+
wordWrapEnabled: true,
|
|
1598
1635
|
caption: measure.DisplayName
|
|
1599
1636
|
};
|
|
1600
1637
|
});
|
|
1601
|
-
var fakeCellDataObject = {
|
|
1602
|
-
dataField: 'PivotData0',
|
|
1603
|
-
dataType: 'string',
|
|
1604
|
-
area: 'data',
|
|
1605
|
-
caption: "",
|
|
1606
|
-
visible: false
|
|
1607
|
-
};
|
|
1608
|
-
pivotDataCellsFields.push(fakeCellDataObject);
|
|
1609
1638
|
var AllfieldsData = [].concat(pivotRowsAndColumnsFields, pivotDataCellsFields);
|
|
1610
1639
|
setDataSource(new PivotGridDataSource({
|
|
1611
1640
|
store: tabledata.current.PivotData,
|
|
@@ -1625,32 +1654,33 @@ var PivotTable = function PivotTable(props) {
|
|
|
1625
1654
|
animationDuration: "2s"
|
|
1626
1655
|
})) : React__default.createElement(PivotGrid__default, {
|
|
1627
1656
|
id: "pivotGridId",
|
|
1657
|
+
ref: pivotGridRef,
|
|
1628
1658
|
dataSource: dataSource,
|
|
1629
1659
|
allowExpandAll: true,
|
|
1630
1660
|
showBorders: true,
|
|
1631
|
-
|
|
1632
|
-
style: {
|
|
1633
|
-
margin: "0 auto"
|
|
1634
|
-
},
|
|
1661
|
+
className: 'pivot-grid-element',
|
|
1635
1662
|
onCellClick: onCellClick,
|
|
1636
1663
|
showRowGrandTotals: false,
|
|
1637
1664
|
showColumnGrandTotals: false,
|
|
1638
1665
|
showRowTotals: false,
|
|
1639
|
-
showColumnTotals: false
|
|
1666
|
+
showColumnTotals: false,
|
|
1667
|
+
wordWrapEnabled: true
|
|
1640
1668
|
}, React__default.createElement(PivotGrid.FieldPanel, {
|
|
1641
1669
|
showColumnFields: false,
|
|
1642
1670
|
showDataFields: false,
|
|
1643
1671
|
showFilterFields: false,
|
|
1644
1672
|
showRowFields: true,
|
|
1673
|
+
texts: {
|
|
1674
|
+
rowFieldArea: ""
|
|
1675
|
+
},
|
|
1645
1676
|
allowFieldDragging: false,
|
|
1646
1677
|
visible: true
|
|
1647
1678
|
}), React__default.createElement(PivotGrid.FieldChooser, {
|
|
1648
1679
|
enabled: false
|
|
1649
1680
|
}), React__default.createElement(PivotGrid.Scrolling, {
|
|
1650
|
-
mode: "virtual"
|
|
1651
|
-
useNative: true
|
|
1681
|
+
mode: "virtual"
|
|
1652
1682
|
})));
|
|
1653
|
-
};
|
|
1683
|
+
});
|
|
1654
1684
|
|
|
1655
1685
|
var CustomChart = function CustomChart(props) {
|
|
1656
1686
|
var _props$widget2, _props$widget3;
|
|
@@ -3111,7 +3141,7 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
3111
3141
|
|
|
3112
3142
|
if (isLoading || !((_widget$current4 = widget.current) !== null && _widget$current4 !== void 0 && _widget$current4.TypeCode)) return "";
|
|
3113
3143
|
if (((_widget$current5 = widget.current) === null || _widget$current5 === void 0 ? void 0 : _widget$current5.TypeCode) == "kpi" || ((_widget$current6 = widget.current) === null || _widget$current6 === void 0 ? void 0 : _widget$current6.TypeCode) == "table" || ((_widget$current7 = widget.current) === null || _widget$current7 === void 0 ? void 0 : _widget$current7.TypeCode) == "pivot") return React__default.createElement(CustomChart, {
|
|
3114
|
-
isInEditMode:
|
|
3144
|
+
isInEditMode: props.isInEditMode,
|
|
3115
3145
|
isPreviewModeActive: props.isPreviewModeActive,
|
|
3116
3146
|
dataBinding: props.dataBinding,
|
|
3117
3147
|
widget: widget.current,
|
|
@@ -3138,6 +3168,10 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
3138
3168
|
return widget && widget.current && widget.current.TypeCode == 'table';
|
|
3139
3169
|
};
|
|
3140
3170
|
|
|
3171
|
+
var isPivotWidget = function isPivotWidget() {
|
|
3172
|
+
return widget && widget.current && widget.current.TypeCode == 'pivot';
|
|
3173
|
+
};
|
|
3174
|
+
|
|
3141
3175
|
var isTableOrPivotWidget = function isTableOrPivotWidget() {
|
|
3142
3176
|
return widget && widget.current && (widget.current.TypeCode == 'table' || widget.current.TypeCode == 'pivot');
|
|
3143
3177
|
};
|
|
@@ -3171,8 +3205,12 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
3171
3205
|
|
|
3172
3206
|
var tableHintMessage = function tableHintMessage() {
|
|
3173
3207
|
return React__default.createElement("span", {
|
|
3174
|
-
className: "table-hint-container " + (isTitleAligmentRight() ? "padding-left-12" : "")
|
|
3175
|
-
}, React__default.createElement("span",
|
|
3208
|
+
className: "table-hint-container " + (isPivotWidget() ? "min-width-105" : "") + " " + (isTitleAligmentRight() ? "padding-left-12" : "")
|
|
3209
|
+
}, React__default.createElement("span", {
|
|
3210
|
+
style: {
|
|
3211
|
+
visibility: isTableWidget() ? "visible" : "hidden"
|
|
3212
|
+
}
|
|
3213
|
+
}, isTableWidget() ? "Showing the first 100 rows" : ""), !props.isInEditMode && !props.isPreviewModeActive && isTableWidget() && React__default.createElement(React__default.Fragment, null, React__default.createElement("span", null, "("), React__default.createElement("span", {
|
|
3176
3214
|
onClick: drilldownToTableData,
|
|
3177
3215
|
className: "show-more-records"
|
|
3178
3216
|
}, " Show More Records "), React__default.createElement("span", null, ")")));
|
|
@@ -3187,9 +3225,9 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
3187
3225
|
key: props.el.i
|
|
3188
3226
|
}, React__default.createElement("header", {
|
|
3189
3227
|
key: triggerId,
|
|
3190
|
-
className: "widget-header"
|
|
3228
|
+
className: "widget-header " + (isPivotWidget() ? "pivot-header" : "")
|
|
3191
3229
|
}, React__default.createElement("div", {
|
|
3192
|
-
className: "header-contents " + (
|
|
3230
|
+
className: "header-contents " + (isTableWidget() ? "border-bottom-light-white" : "")
|
|
3193
3231
|
}, isTitleAligmentRight() && isTableOrPivotWidget() && tableHintMessage(), React__default.createElement("div", {
|
|
3194
3232
|
style: {
|
|
3195
3233
|
cursor: props.isInEditMode ? "move" : "default",
|
|
@@ -3356,6 +3394,7 @@ var DashboardDesigner = function DashboardDesigner(props) {
|
|
|
3356
3394
|
function onResizeStop(event, oldItem) {
|
|
3357
3395
|
var _widgetCardRef$curren, _widgetCardRef$curren2;
|
|
3358
3396
|
|
|
3397
|
+
document.dispatchEvent(new CustomEvent("resizeStop", {}));
|
|
3359
3398
|
widgetCardRef === null || widgetCardRef === void 0 ? void 0 : (_widgetCardRef$curren = widgetCardRef.current) === null || _widgetCardRef$curren === void 0 ? void 0 : (_widgetCardRef$curren2 = _widgetCardRef$curren.find(function (x) {
|
|
3360
3399
|
return x.i == oldItem.i;
|
|
3361
3400
|
})) === null || _widgetCardRef$curren2 === void 0 ? void 0 : _widgetCardRef$curren2.ref.onResizeFinish(widgetsDictionaryRef.current[oldItem.i].key);
|