logitude-dashboard-library 3.1.28 → 3.1.30
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 +44 -33
- package/dist/index.js +50 -21
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +50 -21
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +44 -33
- package/package.json +1 -1
|
@@ -332,9 +332,12 @@ $dark-grey: #717585;
|
|
|
332
332
|
flex: 1;
|
|
333
333
|
align-items: center;
|
|
334
334
|
justify-content: flex-start;
|
|
335
|
-
width: calc(100% - 70px);
|
|
336
335
|
padding: 0px 12px;
|
|
337
336
|
min-height: 40px;
|
|
337
|
+
min-width: 100px;
|
|
338
|
+
width: 100%;
|
|
339
|
+
max-width: calc(100% - 170px);
|
|
340
|
+
overflow: hidden;
|
|
338
341
|
|
|
339
342
|
.title-container {
|
|
340
343
|
display: flex;
|
|
@@ -344,7 +347,7 @@ $dark-grey: #717585;
|
|
|
344
347
|
overflow: hidden;
|
|
345
348
|
text-overflow: ellipsis;
|
|
346
349
|
width: auto;
|
|
347
|
-
max-width:
|
|
350
|
+
max-width: 60%;
|
|
348
351
|
|
|
349
352
|
.title {
|
|
350
353
|
text-transform: capitalize;
|
|
@@ -370,7 +373,7 @@ $dark-grey: #717585;
|
|
|
370
373
|
overflow: hidden;
|
|
371
374
|
text-overflow: ellipsis;
|
|
372
375
|
width: auto;
|
|
373
|
-
|
|
376
|
+
max-width: 40%;
|
|
374
377
|
}
|
|
375
378
|
|
|
376
379
|
.titles-vertical-seeparator {
|
|
@@ -379,28 +382,30 @@ $dark-grey: #717585;
|
|
|
379
382
|
background: #D9D9D9;
|
|
380
383
|
margin: 0px 6px;
|
|
381
384
|
}
|
|
385
|
+
}
|
|
382
386
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
387
|
+
.table-hint-container {
|
|
388
|
+
font-family: "Manrope";
|
|
389
|
+
width: auto;
|
|
390
|
+
max-width: 300px;
|
|
391
|
+
text-overflow: ellipsis;
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
min-width: 1px;
|
|
395
|
+
padding-top: 2px;
|
|
396
|
+
line-height: 11px;
|
|
397
|
+
font-size: 11px;
|
|
398
|
+
color: #A4A4A4;
|
|
399
|
+
padding-right: 12px;
|
|
400
|
+
align-self: center;
|
|
401
|
+
|
|
402
|
+
.show-more-records {
|
|
403
|
+
color: #5FAFDA;
|
|
404
|
+
cursor: pointer;
|
|
405
|
+
}
|
|
400
406
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
407
|
+
& > span {
|
|
408
|
+
font-size: 12px;
|
|
404
409
|
}
|
|
405
410
|
}
|
|
406
411
|
|
|
@@ -744,6 +749,7 @@ $dark-grey: #717585;
|
|
|
744
749
|
}
|
|
745
750
|
|
|
746
751
|
.table-cell {
|
|
752
|
+
font-family: 'Manrope';
|
|
747
753
|
padding: 0px 6px;
|
|
748
754
|
border-radius: 4px;
|
|
749
755
|
white-space: nowrap;
|
|
@@ -843,27 +849,27 @@ $dark-grey: #717585;
|
|
|
843
849
|
overflow-x: inherit;
|
|
844
850
|
}
|
|
845
851
|
|
|
846
|
-
|
|
847
|
-
td,
|
|
848
|
-
th {
|
|
849
|
-
border-bottom: 1px solid #E7E7E6 !important;
|
|
850
|
-
padding: 8px;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
852
|
th {
|
|
854
853
|
text-align: left;
|
|
855
854
|
font-weight: bold;
|
|
856
855
|
font-size: 14px;
|
|
857
856
|
white-space: nowrap;
|
|
858
857
|
padding: 0px !important;
|
|
858
|
+
position: sticky;
|
|
859
|
+
top: 0px;
|
|
860
|
+
z-index: 1;
|
|
861
|
+
border: 0px !important;
|
|
859
862
|
|
|
860
863
|
.p-column-header-content {
|
|
861
864
|
padding: 0;
|
|
865
|
+
border: 1px solid #E7E7E6;
|
|
866
|
+
border-width: 0 0 1px 0;
|
|
862
867
|
}
|
|
863
868
|
|
|
864
869
|
.p-column-title {
|
|
865
|
-
font-
|
|
866
|
-
font-
|
|
870
|
+
font-family: 'Manrope';
|
|
871
|
+
font-weight: 600 !important;
|
|
872
|
+
font-size: 13px;
|
|
867
873
|
flex: 1;
|
|
868
874
|
}
|
|
869
875
|
|
|
@@ -880,7 +886,8 @@ $dark-grey: #717585;
|
|
|
880
886
|
}
|
|
881
887
|
|
|
882
888
|
td {
|
|
883
|
-
border: 1px solid #
|
|
889
|
+
border: 1px solid #E7E7E6 !important;
|
|
890
|
+
border-width: 0 0 1px 0 !important;
|
|
884
891
|
padding: 0px 6px !important;
|
|
885
892
|
max-width: 1px;
|
|
886
893
|
height: 36px;
|
|
@@ -994,4 +1001,8 @@ $dark-grey: #717585;
|
|
|
994
1001
|
|
|
995
1002
|
.border-bottom-light-white {
|
|
996
1003
|
border-bottom: 1px solid #E7E7E6;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.padding-left-12 {
|
|
1007
|
+
padding-left: 12px !important;
|
|
997
1008
|
}
|
package/dist/index.js
CHANGED
|
@@ -645,11 +645,14 @@ var TableChart = function TableChart(props) {
|
|
|
645
645
|
};
|
|
646
646
|
|
|
647
647
|
var getBooleanStringValue = function getBooleanStringValue(value) {
|
|
648
|
-
if (isNullOrUndefined(value)) return "";
|
|
648
|
+
if (isNullOrUndefined(value) || isNullOrUndefined(value.Label)) return "";
|
|
649
649
|
|
|
650
|
-
var _value = value + "";
|
|
650
|
+
var _value = value.Label + "";
|
|
651
651
|
|
|
652
|
-
return
|
|
652
|
+
return {
|
|
653
|
+
Label: _value.charAt(0).toUpperCase() + _value.slice(1),
|
|
654
|
+
Value: _value.charAt(0).toUpperCase() + _value.slice(1)
|
|
655
|
+
};
|
|
653
656
|
};
|
|
654
657
|
|
|
655
658
|
var getDateTimeValue = function getDateTimeValue(value) {
|
|
@@ -679,7 +682,7 @@ var TableChart = function TableChart(props) {
|
|
|
679
682
|
|
|
680
683
|
var _value = valueType && valueType == "Boolean" ? getBooleanStringValue(item[key]) : item[key];
|
|
681
684
|
|
|
682
|
-
_tableRow[key] = isNullOrUndefined(_value) ? "" : _value;
|
|
685
|
+
_tableRow[key] = isNullOrUndefined(_value) || isNullOrUndefined(_value.Value) && isNullOrUndefined(_value.Label) ? "" : _value;
|
|
683
686
|
});
|
|
684
687
|
tableRecords.push(_tableRow);
|
|
685
688
|
});
|
|
@@ -859,22 +862,26 @@ var TableChart = function TableChart(props) {
|
|
|
859
862
|
};
|
|
860
863
|
|
|
861
864
|
var cellTemplateBody = function cellTemplateBody(data, column) {
|
|
865
|
+
var _data$column$FieldCod, _data$column$FieldCod2, _data$column$FieldCod3, _data$column$FieldCod4, _data$column$FieldCod5;
|
|
866
|
+
|
|
862
867
|
if (!column || !column.FieldCode) return "";
|
|
863
868
|
return column.DataTypeCode == "DateTime" || column.DataTypeCode == "Date" ? React__default.createElement("span", {
|
|
869
|
+
title: getDateTimeValue((_data$column$FieldCod = data[column.FieldCode]) === null || _data$column$FieldCod === void 0 ? void 0 : _data$column$FieldCod.Label),
|
|
864
870
|
className: "table-cell",
|
|
865
871
|
style: {
|
|
866
872
|
color: getTableFormattingPropertyValue("TableCellFontColor"),
|
|
867
873
|
fontSize: getTableFormattingPropertyValue("TableCellFontSize", "px")
|
|
868
874
|
}
|
|
869
|
-
}, getDateTimeValue(data[column.FieldCode])) : React__default.createElement("span", {
|
|
875
|
+
}, getDateTimeValue((_data$column$FieldCod2 = data[column.FieldCode]) === null || _data$column$FieldCod2 === void 0 ? void 0 : _data$column$FieldCod2.Label)) : React__default.createElement("span", {
|
|
876
|
+
title: (_data$column$FieldCod3 = data[column.FieldCode]) === null || _data$column$FieldCod3 === void 0 ? void 0 : _data$column$FieldCod3.Label,
|
|
870
877
|
className: "table-cell",
|
|
871
878
|
style: {
|
|
872
879
|
color: getTableFormattingPropertyValue("TableCellFontColor"),
|
|
873
|
-
backgroundColor: getCellPropertyByRule(column, data[column.FieldCode], 'RuleBackgroundColor'),
|
|
880
|
+
backgroundColor: getCellPropertyByRule(column, (_data$column$FieldCod4 = data[column.FieldCode]) === null || _data$column$FieldCod4 === void 0 ? void 0 : _data$column$FieldCod4.Value, 'RuleBackgroundColor'),
|
|
874
881
|
fontSize: getTableFormattingPropertyValue("TableCellFontSize", "px"),
|
|
875
882
|
"float": getCellFloatAlignment(column)
|
|
876
883
|
}
|
|
877
|
-
}, data[column.FieldCode]);
|
|
884
|
+
}, (_data$column$FieldCod5 = data[column.FieldCode]) === null || _data$column$FieldCod5 === void 0 ? void 0 : _data$column$FieldCod5.Label);
|
|
878
885
|
};
|
|
879
886
|
|
|
880
887
|
var headerTemplate = function headerTemplate(column) {
|
|
@@ -2119,7 +2126,7 @@ function SvgCopyIcon(props) {
|
|
|
2119
2126
|
}
|
|
2120
2127
|
|
|
2121
2128
|
var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
2122
|
-
var _widget$
|
|
2129
|
+
var _widget$current11, _widget$current12, _widget$current13;
|
|
2123
2130
|
|
|
2124
2131
|
var widget = React.useRef();
|
|
2125
2132
|
|
|
@@ -2227,6 +2234,31 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2227
2234
|
});
|
|
2228
2235
|
};
|
|
2229
2236
|
|
|
2237
|
+
var isThereTitle = function isThereTitle() {
|
|
2238
|
+
var _widget$current7, _widget$current8;
|
|
2239
|
+
|
|
2240
|
+
return ((_widget$current7 = widget.current) === null || _widget$current7 === void 0 ? void 0 : _widget$current7.Title) && ((_widget$current8 = widget.current) === null || _widget$current8 === void 0 ? void 0 : _widget$current8.Title.length) > 0;
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
var isThereSubtitle = function isThereSubtitle() {
|
|
2244
|
+
var _widget$current9, _widget$current10;
|
|
2245
|
+
|
|
2246
|
+
return ((_widget$current9 = widget.current) === null || _widget$current9 === void 0 ? void 0 : _widget$current9.Subtitle) && ((_widget$current10 = widget.current) === null || _widget$current10 === void 0 ? void 0 : _widget$current10.Subtitle.length) > 0;
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
var tableHintMessage = function tableHintMessage() {
|
|
2250
|
+
return React__default.createElement("span", {
|
|
2251
|
+
className: "table-hint-container " + (isTitleAligmentRight() ? "padding-left-12" : "")
|
|
2252
|
+
}, React__default.createElement("span", null, "Showing the first 100 rows"), !props.isInEditMode && !props.isPreviewModeActive && React__default.createElement(React__default.Fragment, null, React__default.createElement("span", null, "("), React__default.createElement("span", {
|
|
2253
|
+
onClick: drilldownToTableData,
|
|
2254
|
+
className: "show-more-records"
|
|
2255
|
+
}, " Show More Records "), React__default.createElement("span", null, ")")));
|
|
2256
|
+
};
|
|
2257
|
+
|
|
2258
|
+
var isTitleAligmentRight = function isTitleAligmentRight() {
|
|
2259
|
+
return widget && widget.current && widget.current.TitleAlignment && widget.current.TitleAlignment.toLowerCase() == 'right';
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2230
2262
|
return React__default.createElement("div", {
|
|
2231
2263
|
className: "dl-panel",
|
|
2232
2264
|
key: props.el.i
|
|
@@ -2235,9 +2267,11 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2235
2267
|
className: "widget-header"
|
|
2236
2268
|
}, React__default.createElement("div", {
|
|
2237
2269
|
className: "header-contents " + (isTableWidget() ? "border-bottom-light-white" : "")
|
|
2238
|
-
}, React__default.createElement("div", {
|
|
2270
|
+
}, isTitleAligmentRight() && isTableWidget() && tableHintMessage(), React__default.createElement("div", {
|
|
2239
2271
|
style: {
|
|
2240
|
-
cursor: props.isInEditMode ? "move" : "default"
|
|
2272
|
+
cursor: props.isInEditMode ? "move" : "default",
|
|
2273
|
+
justifyContent: isTableWidget() ? getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined) : undefined,
|
|
2274
|
+
flexDirection: isTitleAligmentRight() ? "row-reverse" : "row"
|
|
2241
2275
|
},
|
|
2242
2276
|
className: getwidgetTitlesContainer()
|
|
2243
2277
|
}, React__default.createElement("div", {
|
|
@@ -2254,7 +2288,7 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2254
2288
|
color: getCSSPropertyValue(widget.current, 'TitleFontColor', ''),
|
|
2255
2289
|
textAlign: getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined)
|
|
2256
2290
|
}
|
|
2257
|
-
}, (_widget$
|
|
2291
|
+
}, (_widget$current11 = widget.current) === null || _widget$current11 === void 0 ? void 0 : _widget$current11.Title),
|
|
2258
2292
|
position: ['top center'],
|
|
2259
2293
|
arrowStyle: {
|
|
2260
2294
|
color: '#262626'
|
|
@@ -2263,23 +2297,18 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2263
2297
|
on: ['hover', 'focus']
|
|
2264
2298
|
}, React__default.createElement("span", {
|
|
2265
2299
|
className: "widget-title-tooltip-text"
|
|
2266
|
-
}, (_widget$
|
|
2300
|
+
}, (_widget$current12 = widget.current) === null || _widget$current12 === void 0 ? void 0 : _widget$current12.Title))), isTableWidget() && isThereTitle() && isThereSubtitle() && React__default.createElement("div", {
|
|
2267
2301
|
className: "titles-vertical-seeparator"
|
|
2268
2302
|
}), React__default.createElement("div", {
|
|
2269
|
-
className: (
|
|
2303
|
+
className: isThereSubtitle() ? "subtitle" : "subtitle margin-top-4",
|
|
2270
2304
|
style: {
|
|
2271
2305
|
fontSize: getCSSPropertyValue(widget.current, 'SubtitleFontSize', 'px'),
|
|
2272
2306
|
textAlign: getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined),
|
|
2273
2307
|
color: getCSSPropertyValue(widget.current, 'SubtitleFontColor', ''),
|
|
2274
|
-
minWidth: (
|
|
2308
|
+
minWidth: isThereSubtitle() && isTableWidget() ? '5%' : undefined
|
|
2275
2309
|
}
|
|
2276
|
-
}, (_widget$
|
|
2277
|
-
className: "
|
|
2278
|
-
}, React__default.createElement("span", null, "Showing the first 100 rows"), !props.isInEditMode && !props.isPreviewModeActive && React__default.createElement(React__default.Fragment, null, React__default.createElement("span", null, "("), React__default.createElement("span", {
|
|
2279
|
-
onClick: drilldownToTableData,
|
|
2280
|
-
className: "show-more-records"
|
|
2281
|
-
}, " Show More Records "), React__default.createElement("span", null, ")")))), props.isInEditMode && React__default.createElement("div", {
|
|
2282
|
-
className: (_widget$current16 = widget.current) !== null && _widget$current16 !== void 0 && _widget$current16.Title && ((_widget$current17 = widget.current) === null || _widget$current17 === void 0 ? void 0 : _widget$current17.Title.length) > 0 ? "widget-options-container" : "widget-options-container margin-top-6"
|
|
2310
|
+
}, (_widget$current13 = widget.current) === null || _widget$current13 === void 0 ? void 0 : _widget$current13.Subtitle)), !isTitleAligmentRight() && isTableWidget() && tableHintMessage(), props.isInEditMode && React__default.createElement("div", {
|
|
2311
|
+
className: isThereTitle() ? "widget-options-container" : "widget-options-container margin-top-6"
|
|
2283
2312
|
}, React__default.createElement(SvgEditIcon, {
|
|
2284
2313
|
onClick: function onClick() {
|
|
2285
2314
|
return editWidget();
|