logitude-dashboard-library 1.4.7 → 1.4.9
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 +89 -34
- package/dist/features/Dashboard/ChartsComponents/ApexChart.d.ts +1 -0
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/CustomChart.d.ts +1 -0
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/KpiChart.d.ts +1 -0
- package/dist/features/Dashboard/ChartsComponents/FusionChartTest.d.ts +1 -0
- package/dist/features/Dashboard/ChartsComponents/FusionCharts/FusionChart.d.ts +1 -0
- package/dist/features/Dashboard/DashboardDesigner.d.ts +1 -0
- package/dist/features/Dashboard/WidgetCard.d.ts +1 -0
- package/dist/features/Dashboard/dashboard-dialog/dashboard-dialog-component.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +106 -69
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +106 -69
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -289,18 +289,24 @@ $dark-grey: #717585;
|
|
|
289
289
|
background-color: lightblue;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
.panel {
|
|
292
|
+
.dl-panel {
|
|
293
293
|
background: white !important;
|
|
294
294
|
box-shadow: 0px 0px 3px 1px #6273842b;
|
|
295
295
|
box-sizing: border-box;
|
|
296
296
|
position: relative;
|
|
297
297
|
height: 100%;
|
|
298
|
+
flex-direction: column;
|
|
299
|
+
box-sizing: border-box;
|
|
300
|
+
display: flex;
|
|
301
|
+
place-content: flex-start;
|
|
302
|
+
align-items: flex-start;
|
|
298
303
|
|
|
299
304
|
header {
|
|
300
305
|
display: flex;
|
|
301
306
|
justify-content: space-between;
|
|
302
307
|
align-items: center;
|
|
303
308
|
position: unset;
|
|
309
|
+
width: 100%;
|
|
304
310
|
|
|
305
311
|
i {
|
|
306
312
|
font-size: 18px;
|
|
@@ -310,7 +316,6 @@ $dark-grey: #717585;
|
|
|
310
316
|
|
|
311
317
|
h1 {
|
|
312
318
|
text-transform: capitalize;
|
|
313
|
-
font-size: 15px;
|
|
314
319
|
font-family: 'Manrope', sans-serif;
|
|
315
320
|
font-style: normal;
|
|
316
321
|
color: #292D30;
|
|
@@ -342,8 +347,13 @@ $dark-grey: #717585;
|
|
|
342
347
|
|
|
343
348
|
|
|
344
349
|
.dl-dashboard-widget {
|
|
345
|
-
height:
|
|
346
|
-
|
|
350
|
+
height: 100%;
|
|
351
|
+
width: 100%;
|
|
352
|
+
position: relative;
|
|
353
|
+
flex-direction: column;
|
|
354
|
+
display: flex;
|
|
355
|
+
place-content: flex-start;
|
|
356
|
+
align-items: flex-start;
|
|
347
357
|
}
|
|
348
358
|
|
|
349
359
|
|
|
@@ -436,15 +446,23 @@ $dark-grey: #717585;
|
|
|
436
446
|
}
|
|
437
447
|
|
|
438
448
|
|
|
439
|
-
.
|
|
449
|
+
.dl-kpi-container-click {
|
|
440
450
|
width: 100%;
|
|
441
451
|
height: 100%;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.dl-kpi-container {
|
|
456
|
+
margin-left: 12px;
|
|
457
|
+
margin-right: 12px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.dl-kpi-sub-container {
|
|
442
461
|
flex-direction: row;
|
|
443
462
|
box-sizing: border-box;
|
|
444
|
-
display:
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
463
|
+
display: flex;
|
|
464
|
+
place-content: flex-end flex-start;
|
|
465
|
+
align-items: flex-end;
|
|
448
466
|
}
|
|
449
467
|
|
|
450
468
|
.kpIHeader {
|
|
@@ -456,6 +474,12 @@ $dark-grey: #717585;
|
|
|
456
474
|
}
|
|
457
475
|
|
|
458
476
|
.db-fc-container {
|
|
477
|
+
width: 100%;
|
|
478
|
+
height: calc(100% - 5px);
|
|
479
|
+
padding-top: 12px;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.db-fc-container>*:first-child {
|
|
459
483
|
width: 100%;
|
|
460
484
|
height: 100%;
|
|
461
485
|
}
|
|
@@ -464,50 +488,59 @@ $dark-grey: #717585;
|
|
|
464
488
|
border-top: 1px solid #E7E7E7;
|
|
465
489
|
margin-left: 12px;
|
|
466
490
|
margin-right: 12px;
|
|
467
|
-
|
|
491
|
+
position: relative;
|
|
468
492
|
}
|
|
469
493
|
|
|
470
494
|
.dl-kpi-arrow-pic {
|
|
471
|
-
|
|
472
495
|
display: inline-block;
|
|
473
496
|
vertical-align: middle;
|
|
474
497
|
width: 0;
|
|
475
498
|
height: 0;
|
|
476
499
|
}
|
|
477
500
|
|
|
478
|
-
.dl-kpi-arrow-up {
|
|
501
|
+
.dl-kpi-arrow-up-green {
|
|
479
502
|
border-left: 5px solid transparent;
|
|
480
503
|
border-right: 5px solid transparent;
|
|
481
|
-
border-bottom:
|
|
504
|
+
border-bottom: 6px solid #4AC76F;
|
|
482
505
|
}
|
|
483
506
|
|
|
484
|
-
.dl-kpi-arrow-down {
|
|
507
|
+
.dl-kpi-arrow-down-green {
|
|
485
508
|
border-left: 5px solid transparent;
|
|
486
509
|
border-right: 5px solid transparent;
|
|
487
|
-
border-top:
|
|
510
|
+
border-top: 6px solid #4AC76F;
|
|
488
511
|
}
|
|
489
512
|
|
|
490
|
-
.dl-kpi-
|
|
491
|
-
|
|
492
|
-
|
|
513
|
+
.dl-kpi-arrow-up-red {
|
|
514
|
+
border-left: 5px solid transparent;
|
|
515
|
+
border-right: 5px solid transparent;
|
|
516
|
+
border-bottom: 6px solid red;
|
|
493
517
|
}
|
|
494
518
|
|
|
495
|
-
.dl-kpi-
|
|
496
|
-
|
|
519
|
+
.dl-kpi-arrow-down-red {
|
|
520
|
+
border-left: 5px solid transparent;
|
|
521
|
+
border-right: 5px solid transparent;
|
|
522
|
+
border-top: 6px solid red;
|
|
497
523
|
}
|
|
498
524
|
|
|
499
|
-
.dl-kpi-value{
|
|
500
|
-
height: 31px;
|
|
501
525
|
|
|
526
|
+
.dl-kpi-arrow-container {
|
|
527
|
+
flex-direction: column;
|
|
528
|
+
box-sizing: border-box;
|
|
529
|
+
display: flex;
|
|
530
|
+
place-content: flex-start flex-end;
|
|
531
|
+
align-items: flex-start;
|
|
532
|
+
margin-bottom: 2px;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.dl-kpi-value {
|
|
502
536
|
font-family: 'Manrope';
|
|
503
537
|
font-style: normal;
|
|
504
538
|
font-weight: 700;
|
|
505
539
|
font-size: 26px;
|
|
506
540
|
line-height: 120%;
|
|
507
541
|
color: #292D30;
|
|
508
|
-
padding-left: 12px;
|
|
509
|
-
|
|
510
542
|
}
|
|
543
|
+
|
|
511
544
|
.dl-kpi-unit {
|
|
512
545
|
font-family: 'Manrope';
|
|
513
546
|
font-style: normal;
|
|
@@ -515,27 +548,49 @@ $dark-grey: #717585;
|
|
|
515
548
|
font-size: 20px;
|
|
516
549
|
line-height: 125%;
|
|
517
550
|
color: #292D30;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
551
|
+
margin-left: 4.5px;
|
|
552
|
+
margin-bottom: 2px;
|
|
521
553
|
}
|
|
522
554
|
|
|
523
|
-
.dl-kpi-ratio {
|
|
524
|
-
|
|
555
|
+
.dl-kpi-ratio-container {
|
|
556
|
+
flex-direction: row;
|
|
557
|
+
box-sizing: border-box;
|
|
558
|
+
display: flex;
|
|
559
|
+
place-content: flex-end flex-start;
|
|
560
|
+
align-items: flex-end;
|
|
525
561
|
font-family: 'Manrope';
|
|
526
562
|
font-style: normal;
|
|
527
563
|
font-weight: 500;
|
|
528
564
|
font-size: 11px;
|
|
529
565
|
line-height: 15px;
|
|
530
|
-
text-align: right;
|
|
531
|
-
|
|
532
566
|
color: #A4A4A4;
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
567
|
+
margin-left: 4.5px;
|
|
568
|
+
margin-bottom: 4px;
|
|
569
|
+
flex-shrink: 0;
|
|
536
570
|
}
|
|
571
|
+
|
|
537
572
|
.dl-kpi-textTrimming {
|
|
538
573
|
overflow: hidden;
|
|
539
574
|
white-space: nowrap;
|
|
540
575
|
text-overflow: ellipsis;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.dl-custom-chart-container {
|
|
579
|
+
position: relative;
|
|
580
|
+
height: 100%;
|
|
581
|
+
width: 100%;
|
|
582
|
+
flex-direction: column;
|
|
583
|
+
box-sizing: border-box;
|
|
584
|
+
display: flex;
|
|
585
|
+
place-content: flex-start;
|
|
586
|
+
align-items: flex-start;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.dl-kpi-prev-text {
|
|
590
|
+
font-family: 'Manrope';
|
|
591
|
+
font-style: normal;
|
|
592
|
+
font-weight: 600;
|
|
593
|
+
font-size: 11px;
|
|
594
|
+
line-height: 15px;
|
|
595
|
+
color: #292D30;
|
|
541
596
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -202,6 +202,8 @@ var DashboardAnalyticsService = /*#__PURE__*/function () {
|
|
|
202
202
|
}();
|
|
203
203
|
|
|
204
204
|
var KpiChart = function KpiChart(props) {
|
|
205
|
+
var _widget$current9;
|
|
206
|
+
|
|
205
207
|
var _useState = React.useState(false),
|
|
206
208
|
dataLoaded = _useState[0],
|
|
207
209
|
setDataLoaded = _useState[1];
|
|
@@ -216,16 +218,6 @@ var KpiChart = function KpiChart(props) {
|
|
|
216
218
|
data = _useState3[0],
|
|
217
219
|
setData = _useState3[1];
|
|
218
220
|
|
|
219
|
-
var _useState4 = React.useState(),
|
|
220
|
-
arrowColorDirection = _useState4[0],
|
|
221
|
-
setArrowColorDirection = _useState4[1];
|
|
222
|
-
|
|
223
|
-
var _useState5 = React.useState(false),
|
|
224
|
-
checkValuesValidity = _useState5[0],
|
|
225
|
-
setCheckValuesValidity = _useState5[1];
|
|
226
|
-
|
|
227
|
-
var _useState6 = React.useState(false),
|
|
228
|
-
setVisibilityUnit = _useState6[1];
|
|
229
221
|
React.useEffect(function () {
|
|
230
222
|
widget.current = props.customChartProps.widget;
|
|
231
223
|
setDataLoaded(false);
|
|
@@ -243,9 +235,6 @@ var KpiChart = function KpiChart(props) {
|
|
|
243
235
|
dashboardAnalyticsService.getKpiData(postWidget).then(function (result) {
|
|
244
236
|
setData(result.data);
|
|
245
237
|
setDataLoaded(true);
|
|
246
|
-
setTimeOverTimeImage(result.data);
|
|
247
|
-
checkValues(result.data);
|
|
248
|
-
checkUnitVisible(result.data);
|
|
249
238
|
}, function (error) {
|
|
250
239
|
var _error$response, _error$response$data, _error$response2, _error$response2$data;
|
|
251
240
|
|
|
@@ -266,35 +255,65 @@ var KpiChart = function KpiChart(props) {
|
|
|
266
255
|
});
|
|
267
256
|
};
|
|
268
257
|
|
|
269
|
-
|
|
258
|
+
function getRatioComponent() {
|
|
270
259
|
var _widget$current3;
|
|
271
260
|
|
|
272
|
-
if (!(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}));
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
var checkValues = function checkValues(data) {
|
|
283
|
-
var _widget$current4, _widget$current5;
|
|
261
|
+
if (!((_widget$current3 = widget.current) !== null && _widget$current3 !== void 0 && _widget$current3.TimeOverTime)) return null;
|
|
262
|
+
return React__default.createElement("div", {
|
|
263
|
+
className: "dl-kpi-ratio-container"
|
|
264
|
+
}, getArrowComponent(), React__default.createElement("div", {
|
|
265
|
+
style: {
|
|
266
|
+
marginLeft: "2px"
|
|
267
|
+
}
|
|
268
|
+
}, data === null || data === void 0 ? void 0 : data.Ratio, " %"));
|
|
269
|
+
}
|
|
284
270
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
271
|
+
function getArrowComponent() {
|
|
272
|
+
var _widget$current4, _widget$current5, _widget$current6, _widget$current7;
|
|
273
|
+
|
|
274
|
+
if (!data) return null;
|
|
275
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) == 0 || data.Value == data.ComparisonValue || (data.Value == "0" || data.Value == 0) && (data.ComparisonValue == "0" || data.ComparisonValue == 0)) return React__default.createElement("div", {
|
|
276
|
+
className: "dl-kpi-arrow-container"
|
|
277
|
+
}, React__default.createElement("span", {
|
|
278
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-green"
|
|
279
|
+
}), React__default.createElement("span", {
|
|
280
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-red",
|
|
281
|
+
style: {
|
|
282
|
+
marginTop: "2px"
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) > 1 && ((_widget$current4 = widget.current) === null || _widget$current4 === void 0 ? void 0 : _widget$current4.Increase) == "Positive") return React__default.createElement("div", {
|
|
286
|
+
className: "dl-kpi-arrow-container"
|
|
287
|
+
}, React__default.createElement("span", {
|
|
288
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-green"
|
|
289
|
+
}));
|
|
290
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) > 1 && ((_widget$current5 = widget.current) === null || _widget$current5 === void 0 ? void 0 : _widget$current5.Increase) == "Negative") return React__default.createElement("div", {
|
|
291
|
+
className: "dl-kpi-arrow-container"
|
|
292
|
+
}, React__default.createElement("span", {
|
|
293
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-up-red"
|
|
294
|
+
}));
|
|
295
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) < 1 && ((_widget$current6 = widget.current) === null || _widget$current6 === void 0 ? void 0 : _widget$current6.Increase) == "Positive") return React__default.createElement("div", {
|
|
296
|
+
className: "dl-kpi-arrow-container"
|
|
297
|
+
}, React__default.createElement("span", {
|
|
298
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-red"
|
|
299
|
+
}));
|
|
300
|
+
if ((data === null || data === void 0 ? void 0 : data.Ratio) < 1 && ((_widget$current7 = widget.current) === null || _widget$current7 === void 0 ? void 0 : _widget$current7.Increase) == "Negative") return React__default.createElement("div", {
|
|
301
|
+
className: "dl-kpi-arrow-container"
|
|
302
|
+
}, React__default.createElement("span", {
|
|
303
|
+
className: "dl-kpi-arrow-pic dl-kpi-arrow-down-green"
|
|
304
|
+
}));
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
290
307
|
|
|
291
|
-
|
|
292
|
-
var _widget$
|
|
308
|
+
function getPreviousValueComponent() {
|
|
309
|
+
var _widget$current8;
|
|
293
310
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
311
|
+
if (!((_widget$current8 = widget.current) !== null && _widget$current8 !== void 0 && _widget$current8.TimeOverTime)) return null;
|
|
312
|
+
var prevtext = "Previous: " + (data === null || data === void 0 ? void 0 : data.ComparisonValue);
|
|
313
|
+
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
314
|
+
className: "dl-kpi-prev-text"
|
|
315
|
+
}, prevtext));
|
|
316
|
+
}
|
|
298
317
|
|
|
299
318
|
return !dataLoaded ? React__default.createElement("div", {
|
|
300
319
|
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
@@ -306,19 +325,20 @@ var KpiChart = function KpiChart(props) {
|
|
|
306
325
|
strokeWidth: "4",
|
|
307
326
|
animationDuration: "2s"
|
|
308
327
|
})) : !error ? React__default.createElement("div", {
|
|
309
|
-
className: "
|
|
328
|
+
className: "dl-kpi-container-click",
|
|
310
329
|
onClick: kpiClick
|
|
311
330
|
}, React__default.createElement("div", {
|
|
312
|
-
className: "dl-kpi-
|
|
331
|
+
className: "dl-kpi-container",
|
|
332
|
+
style: {
|
|
333
|
+
marginTop: (_widget$current9 = widget.current) !== null && _widget$current9 !== void 0 && _widget$current9.TimeOverTime ? '7px' : '15.4px'
|
|
334
|
+
}
|
|
335
|
+
}, React__default.createElement("div", {
|
|
336
|
+
className: "dl-kpi-sub-container"
|
|
313
337
|
}, React__default.createElement("div", {
|
|
314
338
|
className: "dl-kpi-value dl-kpi-textTrimming"
|
|
315
|
-
}, data === null || data === void 0 ? void 0 : data.Value), React__default.createElement("div", {
|
|
339
|
+
}, data === null || data === void 0 ? void 0 : data.Value), (data === null || data === void 0 ? void 0 : data.Unit) && React__default.createElement("div", {
|
|
316
340
|
className: "dl-kpi-unit"
|
|
317
|
-
},
|
|
318
|
-
className: "dl-kpi-same-line dl-kpi-ratio"
|
|
319
|
-
}, React__default.createElement("div", {
|
|
320
|
-
className: "dl-kpi-margin"
|
|
321
|
-
}, arrowColorDirection), React__default.createElement("div", null, data === null || data === void 0 ? void 0 : data.Ratio, " %")) : null)) : React__default.createElement("div", {
|
|
341
|
+
}, data === null || data === void 0 ? void 0 : data.Unit), getRatioComponent()), getPreviousValueComponent())) : React__default.createElement("div", {
|
|
322
342
|
className: "dl-flex-content-center dl-full-hight "
|
|
323
343
|
}, React__default.createElement("div", {
|
|
324
344
|
className: "dl-tooltip"
|
|
@@ -346,9 +366,7 @@ var CustomChart = function CustomChart(props) {
|
|
|
346
366
|
};
|
|
347
367
|
|
|
348
368
|
return React__default.createElement("div", {
|
|
349
|
-
|
|
350
|
-
height: '100%'
|
|
351
|
-
}
|
|
369
|
+
className: "dl-custom-chart-container"
|
|
352
370
|
}, project());
|
|
353
371
|
};
|
|
354
372
|
|
|
@@ -483,6 +501,8 @@ function getBarObject(seriesMeasures, widget) {
|
|
|
483
501
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
484
502
|
chartInfo.divLineDashed = "1";
|
|
485
503
|
chartInfo.divLineDashLen = "7";
|
|
504
|
+
chartInfo.chartTopMargin = "10";
|
|
505
|
+
chartInfo.chartBottomMargin = "10";
|
|
486
506
|
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
487
507
|
return chart;
|
|
488
508
|
}
|
|
@@ -501,6 +521,10 @@ function getLineObject(seriesMeasures, widget) {
|
|
|
501
521
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
502
522
|
chartInfo.divLineDashed = "1";
|
|
503
523
|
chartInfo.divLineDashLen = "7";
|
|
524
|
+
chartInfo.chartTopMargin = "10";
|
|
525
|
+
chartInfo.chartBottomMargin = "10";
|
|
526
|
+
chartInfo.chartLeftMargin = "20";
|
|
527
|
+
chartInfo.chartRightMargin = "50";
|
|
504
528
|
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
505
529
|
return chart;
|
|
506
530
|
}
|
|
@@ -547,6 +571,10 @@ function getColumnObject(seriesMeasures, widget) {
|
|
|
547
571
|
chartInfo.legendItemFontSize = defautFontSize;
|
|
548
572
|
chartInfo.divLineDashed = "1";
|
|
549
573
|
chartInfo.divLineDashLen = "7";
|
|
574
|
+
chartInfo.chartTopMargin = "10";
|
|
575
|
+
chartInfo.chartBottomMargin = "10";
|
|
576
|
+
chartInfo.chartLeftMargin = "20";
|
|
577
|
+
chartInfo.chartRightMargin = "50";
|
|
550
578
|
chart.dataSource = getCategoriesBasedDataSource(chartInfo, seriesMeasures);
|
|
551
579
|
return chart;
|
|
552
580
|
}
|
|
@@ -567,10 +595,10 @@ function getDefaultChartInfo(widget) {
|
|
|
567
595
|
chart.baseFontSize = defautFontSize;
|
|
568
596
|
chart.enableSlicing = "0";
|
|
569
597
|
chart.enableRotation = "0";
|
|
570
|
-
chart.
|
|
571
|
-
chart.
|
|
572
|
-
chart.
|
|
573
|
-
chart.
|
|
598
|
+
chart.chartTopMargin = "0";
|
|
599
|
+
chart.chartBottomMargin = "0";
|
|
600
|
+
chart.chartLeftMargin = "40";
|
|
601
|
+
chart.chartRightMargin = "40";
|
|
574
602
|
chart.toolTipBgColor = "#FFFFFF";
|
|
575
603
|
chart.showToolTipShadow = "1";
|
|
576
604
|
chart.plottooltext = getTooltip(widget);
|
|
@@ -638,15 +666,6 @@ var FusionChart = function FusionChart(props) {
|
|
|
638
666
|
setFchart = _useState4[1];
|
|
639
667
|
|
|
640
668
|
var id = (Math.random() + 1).toString(36).substring(7);
|
|
641
|
-
|
|
642
|
-
var _useState5 = React.useState(),
|
|
643
|
-
widgetWidth = _useState5[0],
|
|
644
|
-
setWidgetWidth = _useState5[1];
|
|
645
|
-
|
|
646
|
-
var _useState6 = React.useState(),
|
|
647
|
-
widgetHeight = _useState6[0],
|
|
648
|
-
setWidgetHeight = _useState6[1];
|
|
649
|
-
|
|
650
669
|
React.useEffect(function () {
|
|
651
670
|
widget.current = props.widget;
|
|
652
671
|
setTimeout(function () {
|
|
@@ -664,7 +683,6 @@ var FusionChart = function FusionChart(props) {
|
|
|
664
683
|
var chart = BuildFusionChartObject(result.data, widget.current);
|
|
665
684
|
setArgs(chart);
|
|
666
685
|
setDataLoaded(true);
|
|
667
|
-
if (widgetHeight && widgetWidth && fChart) fChart.resizeTo(widgetWidth, widgetHeight);
|
|
668
686
|
}, function (error) {
|
|
669
687
|
var _error$response, _error$response$data, _error$response2, _error$response2$data;
|
|
670
688
|
|
|
@@ -690,8 +708,6 @@ var FusionChart = function FusionChart(props) {
|
|
|
690
708
|
onResize: function onResize(_ref) {
|
|
691
709
|
var width = _ref.width,
|
|
692
710
|
height = _ref.height;
|
|
693
|
-
setWidgetWidth(width);
|
|
694
|
-
setWidgetHeight(height);
|
|
695
711
|
fChart.resizeTo(width, height);
|
|
696
712
|
}
|
|
697
713
|
}),
|
|
@@ -735,6 +751,9 @@ var WidgetCard = function WidgetCard(props, state) {
|
|
|
735
751
|
isLoading = _useState[0],
|
|
736
752
|
setIsLoading = _useState[1];
|
|
737
753
|
|
|
754
|
+
var _useState2 = React.useState(false),
|
|
755
|
+
showTooltip = _useState2[1];
|
|
756
|
+
|
|
738
757
|
var editWidget = function editWidget() {
|
|
739
758
|
var _moreBtnToggle$curren;
|
|
740
759
|
|
|
@@ -756,18 +775,32 @@ var WidgetCard = function WidgetCard(props, state) {
|
|
|
756
775
|
});
|
|
757
776
|
}, []);
|
|
758
777
|
return React__default.createElement("div", {
|
|
759
|
-
className: "panel",
|
|
778
|
+
className: "dl-panel",
|
|
760
779
|
key: props.el.i,
|
|
761
780
|
style: {
|
|
762
781
|
cursor: props.isInEditMode ? 'move' : 'default'
|
|
763
782
|
}
|
|
764
|
-
}, React__default.createElement("header", null, React__default.createElement(
|
|
783
|
+
}, React__default.createElement("header", null, React__default.createElement("div", {
|
|
784
|
+
style: {
|
|
785
|
+
display: 'flex',
|
|
786
|
+
width: 'calc(100% - 3rem)'
|
|
787
|
+
}
|
|
788
|
+
}, React__default.createElement(tooltip.Tooltip, {
|
|
765
789
|
target: ".h-tool-tip"
|
|
766
790
|
}), React__default.createElement("h1", {
|
|
767
791
|
"data-pr-tooltip": (_widget$current2 = widget.current) === null || _widget$current2 === void 0 ? void 0 : _widget$current2.Title,
|
|
768
792
|
"data-pr-position": "top",
|
|
769
|
-
className: "h-tool-tip"
|
|
770
|
-
|
|
793
|
+
className: "h-tool-tip",
|
|
794
|
+
onMouseEnter: function onMouseEnter() {
|
|
795
|
+
return showTooltip(true);
|
|
796
|
+
},
|
|
797
|
+
onMouseLeave: function onMouseLeave() {
|
|
798
|
+
showTooltip(false);
|
|
799
|
+
setTimeout(function () {
|
|
800
|
+
return showTooltip(true);
|
|
801
|
+
}, 50);
|
|
802
|
+
}
|
|
803
|
+
}, (_widget$current3 = widget.current) === null || _widget$current3 === void 0 ? void 0 : _widget$current3.Title)), props.isInEditMode ? React__default.createElement(button.Button, {
|
|
771
804
|
icon: "pi pi-ellipsis-v",
|
|
772
805
|
className: "p-button-rounded p-button-text",
|
|
773
806
|
onClick: function onClick(e) {
|
|
@@ -792,8 +825,12 @@ var WidgetCard = function WidgetCard(props, state) {
|
|
|
792
825
|
return props.deleteBtnClicked((_props$widget = props.widget) === null || _props$widget === void 0 ? void 0 : _props$widget.key);
|
|
793
826
|
}
|
|
794
827
|
}, "Remove")))), React__default.createElement("div", {
|
|
828
|
+
style: {
|
|
829
|
+
width: '100%'
|
|
830
|
+
}
|
|
831
|
+
}, React__default.createElement("div", {
|
|
795
832
|
className: "dl-line"
|
|
796
|
-
}), React__default.createElement("div", {
|
|
833
|
+
})), React__default.createElement("div", {
|
|
797
834
|
className: "dl-dashboard-widget"
|
|
798
835
|
}, " ", GetChartComponent(), " "));
|
|
799
836
|
|