logitude-dashboard-library 3.1.28 → 3.1.29
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 +27 -23
- package/dist/index.js +34 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +34 -16
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +27 -23
- 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,29 @@ $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
|
+
width: auto;
|
|
389
|
+
max-width: 300px;
|
|
390
|
+
text-overflow: ellipsis;
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
white-space: nowrap;
|
|
393
|
+
min-width: 1px;
|
|
394
|
+
padding-top: 2px;
|
|
395
|
+
line-height: 11px;
|
|
396
|
+
font-size: 11px;
|
|
397
|
+
color: #A4A4A4;
|
|
398
|
+
padding-right: 12px;
|
|
399
|
+
align-self: center;
|
|
400
|
+
|
|
401
|
+
.show-more-records {
|
|
402
|
+
color: #5FAFDA;
|
|
403
|
+
cursor: pointer;
|
|
404
|
+
}
|
|
400
405
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
406
|
+
& > span {
|
|
407
|
+
font-size: 12px;
|
|
404
408
|
}
|
|
405
409
|
}
|
|
406
410
|
|
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,6 +862,8 @@ 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;
|
|
866
|
+
|
|
862
867
|
if (!column || !column.FieldCode) return "";
|
|
863
868
|
return column.DataTypeCode == "DateTime" || column.DataTypeCode == "Date" ? React__default.createElement("span", {
|
|
864
869
|
className: "table-cell",
|
|
@@ -866,15 +871,15 @@ var TableChart = function TableChart(props) {
|
|
|
866
871
|
color: getTableFormattingPropertyValue("TableCellFontColor"),
|
|
867
872
|
fontSize: getTableFormattingPropertyValue("TableCellFontSize", "px")
|
|
868
873
|
}
|
|
869
|
-
}, getDateTimeValue(data[column.FieldCode])) : React__default.createElement("span", {
|
|
874
|
+
}, getDateTimeValue((_data$column$FieldCod = data[column.FieldCode]) === null || _data$column$FieldCod === void 0 ? void 0 : _data$column$FieldCod.Label)) : React__default.createElement("span", {
|
|
870
875
|
className: "table-cell",
|
|
871
876
|
style: {
|
|
872
877
|
color: getTableFormattingPropertyValue("TableCellFontColor"),
|
|
873
|
-
backgroundColor: getCellPropertyByRule(column, data[column.FieldCode], 'RuleBackgroundColor'),
|
|
878
|
+
backgroundColor: getCellPropertyByRule(column, (_data$column$FieldCod2 = data[column.FieldCode]) === null || _data$column$FieldCod2 === void 0 ? void 0 : _data$column$FieldCod2.Value, 'RuleBackgroundColor'),
|
|
874
879
|
fontSize: getTableFormattingPropertyValue("TableCellFontSize", "px"),
|
|
875
880
|
"float": getCellFloatAlignment(column)
|
|
876
881
|
}
|
|
877
|
-
}, data[column.FieldCode]);
|
|
882
|
+
}, (_data$column$FieldCod3 = data[column.FieldCode]) === null || _data$column$FieldCod3 === void 0 ? void 0 : _data$column$FieldCod3.Label);
|
|
878
883
|
};
|
|
879
884
|
|
|
880
885
|
var headerTemplate = function headerTemplate(column) {
|
|
@@ -2119,7 +2124,7 @@ function SvgCopyIcon(props) {
|
|
|
2119
2124
|
}
|
|
2120
2125
|
|
|
2121
2126
|
var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
2122
|
-
var _widget$
|
|
2127
|
+
var _widget$current11, _widget$current12, _widget$current13;
|
|
2123
2128
|
|
|
2124
2129
|
var widget = React.useRef();
|
|
2125
2130
|
|
|
@@ -2227,6 +2232,18 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2227
2232
|
});
|
|
2228
2233
|
};
|
|
2229
2234
|
|
|
2235
|
+
var isThereTitle = function isThereTitle() {
|
|
2236
|
+
var _widget$current7, _widget$current8;
|
|
2237
|
+
|
|
2238
|
+
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;
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
var isThereSubtitle = function isThereSubtitle() {
|
|
2242
|
+
var _widget$current9, _widget$current10;
|
|
2243
|
+
|
|
2244
|
+
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;
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2230
2247
|
return React__default.createElement("div", {
|
|
2231
2248
|
className: "dl-panel",
|
|
2232
2249
|
key: props.el.i
|
|
@@ -2237,7 +2254,8 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2237
2254
|
className: "header-contents " + (isTableWidget() ? "border-bottom-light-white" : "")
|
|
2238
2255
|
}, React__default.createElement("div", {
|
|
2239
2256
|
style: {
|
|
2240
|
-
cursor: props.isInEditMode ? "move" : "default"
|
|
2257
|
+
cursor: props.isInEditMode ? "move" : "default",
|
|
2258
|
+
justifyContent: isTableWidget() ? getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined) : undefined
|
|
2241
2259
|
},
|
|
2242
2260
|
className: getwidgetTitlesContainer()
|
|
2243
2261
|
}, React__default.createElement("div", {
|
|
@@ -2254,7 +2272,7 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2254
2272
|
color: getCSSPropertyValue(widget.current, 'TitleFontColor', ''),
|
|
2255
2273
|
textAlign: getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined)
|
|
2256
2274
|
}
|
|
2257
|
-
}, (_widget$
|
|
2275
|
+
}, (_widget$current11 = widget.current) === null || _widget$current11 === void 0 ? void 0 : _widget$current11.Title),
|
|
2258
2276
|
position: ['top center'],
|
|
2259
2277
|
arrowStyle: {
|
|
2260
2278
|
color: '#262626'
|
|
@@ -2263,23 +2281,23 @@ var WidgetCard = React.forwardRef(function (props, comRef) {
|
|
|
2263
2281
|
on: ['hover', 'focus']
|
|
2264
2282
|
}, React__default.createElement("span", {
|
|
2265
2283
|
className: "widget-title-tooltip-text"
|
|
2266
|
-
}, (_widget$
|
|
2284
|
+
}, (_widget$current12 = widget.current) === null || _widget$current12 === void 0 ? void 0 : _widget$current12.Title))), isTableWidget() && isThereTitle() && isThereSubtitle() && React__default.createElement("div", {
|
|
2267
2285
|
className: "titles-vertical-seeparator"
|
|
2268
2286
|
}), React__default.createElement("div", {
|
|
2269
|
-
className: (
|
|
2287
|
+
className: isThereSubtitle() ? "subtitle" : "subtitle margin-top-4",
|
|
2270
2288
|
style: {
|
|
2271
2289
|
fontSize: getCSSPropertyValue(widget.current, 'SubtitleFontSize', 'px'),
|
|
2272
2290
|
textAlign: getCSSPropertyValue(widget === null || widget === void 0 ? void 0 : widget.current, 'TitleAlignment', '', undefined),
|
|
2273
2291
|
color: getCSSPropertyValue(widget.current, 'SubtitleFontColor', ''),
|
|
2274
|
-
minWidth: (
|
|
2292
|
+
minWidth: isThereSubtitle() && isTableWidget() ? '5%' : undefined
|
|
2275
2293
|
}
|
|
2276
|
-
}, (_widget$
|
|
2294
|
+
}, (_widget$current13 = widget.current) === null || _widget$current13 === void 0 ? void 0 : _widget$current13.Subtitle)), isTableWidget() && React__default.createElement("span", {
|
|
2277
2295
|
className: "table-hint-container"
|
|
2278
2296
|
}, 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
2297
|
onClick: drilldownToTableData,
|
|
2280
2298
|
className: "show-more-records"
|
|
2281
|
-
}, " Show More Records "), React__default.createElement("span", null, ")")))
|
|
2282
|
-
className: (
|
|
2299
|
+
}, " Show More Records "), React__default.createElement("span", null, ")"))), props.isInEditMode && React__default.createElement("div", {
|
|
2300
|
+
className: isThereTitle() ? "widget-options-container" : "widget-options-container margin-top-6"
|
|
2283
2301
|
}, React__default.createElement(SvgEditIcon, {
|
|
2284
2302
|
onClick: function onClick() {
|
|
2285
2303
|
return editWidget();
|