logitude-dashboard-library 3.2.27 → 3.2.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 +14 -0
- package/dist/index.js +55 -22
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +55 -22
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +14 -0
- package/package.json +1 -1
|
@@ -1200,4 +1200,18 @@ $dark-grey: #717585;
|
|
|
1200
1200
|
color: #1E4AC4 !important;
|
|
1201
1201
|
cursor: pointer;
|
|
1202
1202
|
text-decoration: underline;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.table-cell-datetime {
|
|
1206
|
+
font-family: 'Manrope';
|
|
1207
|
+
font-weight: 500;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.date-time-value-container{
|
|
1211
|
+
display: flex;
|
|
1212
|
+
flex-direction: row;
|
|
1213
|
+
gap: 10px;
|
|
1214
|
+
display: block;
|
|
1215
|
+
overflow: hidden;
|
|
1216
|
+
text-overflow: ellipsis;
|
|
1203
1217
|
}
|
package/dist/index.js
CHANGED
|
@@ -1332,13 +1332,26 @@ var TableChart = function TableChart(props) {
|
|
|
1332
1332
|
return _value.charAt(0).toUpperCase() + _value.slice(1);
|
|
1333
1333
|
};
|
|
1334
1334
|
|
|
1335
|
-
var getDateTimeValue = function getDateTimeValue(value) {
|
|
1335
|
+
var getDateTimeValue = function getDateTimeValue(value, datePart) {
|
|
1336
|
+
if (datePart === void 0) {
|
|
1337
|
+
datePart = null;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1336
1340
|
if (!value) return value;
|
|
1337
1341
|
|
|
1338
1342
|
var _date = moment(value);
|
|
1339
1343
|
|
|
1340
1344
|
if (!_date || !_date.isValid()) return value;
|
|
1341
|
-
|
|
1345
|
+
|
|
1346
|
+
if (!datePart) {
|
|
1347
|
+
return _date.format("DD MMM YYYY") + " " + _date.format("HH:mm");
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
if (datePart == 'Date') {
|
|
1351
|
+
return "" + _date.format("DD MMM YYYY");
|
|
1352
|
+
} else {
|
|
1353
|
+
return "" + _date.format("HH:mm");
|
|
1354
|
+
}
|
|
1342
1355
|
};
|
|
1343
1356
|
|
|
1344
1357
|
var fillTableData = function fillTableData(tableData) {
|
|
@@ -1577,26 +1590,46 @@ var TableChart = function TableChart(props) {
|
|
|
1577
1590
|
|
|
1578
1591
|
var cellTemplateBody = function cellTemplateBody(data, column) {
|
|
1579
1592
|
if (!column || !column.FieldCode) return "";
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1593
|
+
|
|
1594
|
+
if (column.DataTypeCode == "DateTime" || column.DataTypeCode == "Date") {
|
|
1595
|
+
var fontColor = getTableFormattingPropertyValue("TableCellFontColor");
|
|
1596
|
+
var fontSizeWithoutUnit = getTableFormattingPropertyValue("TableCellFontSize");
|
|
1597
|
+
var fontSizeWitUnit = getTableFormattingPropertyValue("TableCellFontSize", "px");
|
|
1598
|
+
var width = fontSizeWithoutUnit ? fontSizeWithoutUnit * 6 + "px" : 70 + "px";
|
|
1599
|
+
return React__default.createElement("div", {
|
|
1600
|
+
title: getDateTimeValue(data[column.FieldCode]),
|
|
1601
|
+
className: "date-time-value-container",
|
|
1602
|
+
style: {
|
|
1603
|
+
color: fontColor
|
|
1604
|
+
}
|
|
1605
|
+
}, React__default.createElement("span", {
|
|
1606
|
+
className: "table-cell-datetime",
|
|
1607
|
+
style: {
|
|
1608
|
+
fontSize: fontSizeWitUnit,
|
|
1609
|
+
width: width,
|
|
1610
|
+
display: 'inline-block'
|
|
1611
|
+
}
|
|
1612
|
+
}, getDateTimeValue(data[column.FieldCode], 'Date')), React__default.createElement("span", {
|
|
1613
|
+
className: "table-cell-datetime",
|
|
1614
|
+
style: {
|
|
1615
|
+
fontSize: fontSizeWitUnit
|
|
1616
|
+
}
|
|
1617
|
+
}, getDateTimeValue(data[column.FieldCode], 'Time')));
|
|
1618
|
+
} else {
|
|
1619
|
+
return React__default.createElement("span", {
|
|
1620
|
+
onClick: function onClick() {
|
|
1621
|
+
return tableCellClicked(data, column.FieldCode);
|
|
1622
|
+
},
|
|
1623
|
+
title: getCellValue(data, column),
|
|
1624
|
+
className: "table-cell " + (isClickableCell(column.FieldCode) ? 'table-link-cell' : ''),
|
|
1625
|
+
style: {
|
|
1626
|
+
color: getTableFormattingPropertyValue("TableCellFontColor"),
|
|
1627
|
+
backgroundColor: getCellPropertyByRule(column, data[column.FieldCode], 'RuleBackgroundColor'),
|
|
1628
|
+
fontSize: getTableFormattingPropertyValue("TableCellFontSize", "px"),
|
|
1629
|
+
"float": getCellFloatAlignment(column)
|
|
1630
|
+
}
|
|
1631
|
+
}, getCellValue(data, column));
|
|
1632
|
+
}
|
|
1600
1633
|
};
|
|
1601
1634
|
|
|
1602
1635
|
var headerTemplate = function headerTemplate(column) {
|