@databrainhq/plugin 0.6.8 → 0.6.10
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/index.es.js +47 -19
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -80797,11 +80797,11 @@ const GaugeChart = ({
|
|
|
80797
80797
|
enableSaveAs,
|
|
80798
80798
|
colors: colors2
|
|
80799
80799
|
}) => {
|
|
80800
|
-
|
|
80801
|
-
|
|
80802
|
-
|
|
80803
|
-
});
|
|
80804
|
-
const average = Math.floor(total /
|
|
80800
|
+
const newGuageData = Array.isArray(gaugeData) ? gaugeData : [];
|
|
80801
|
+
const total = newGuageData.reduce((sum2, item) => {
|
|
80802
|
+
return sum2 + item.value;
|
|
80803
|
+
}, 0);
|
|
80804
|
+
const average = Math.floor(total / newGuageData.length);
|
|
80805
80805
|
const option2 = {
|
|
80806
80806
|
toolbox: {
|
|
80807
80807
|
feature: {
|
|
@@ -81405,10 +81405,12 @@ const MetricChart = ({
|
|
|
81405
81405
|
legendSettings,
|
|
81406
81406
|
labelSettings,
|
|
81407
81407
|
axisSettings,
|
|
81408
|
+
customSettings,
|
|
81408
81409
|
enableSaveAs,
|
|
81409
81410
|
colors: colors2,
|
|
81410
81411
|
updateGroup,
|
|
81411
|
-
isEnableGroupBy
|
|
81412
|
+
isEnableGroupBy,
|
|
81413
|
+
backGroundColor
|
|
81412
81414
|
});
|
|
81413
81415
|
}
|
|
81414
81416
|
if (chartType2 === CHART_TYPES.bar) {
|
|
@@ -81435,7 +81437,9 @@ const MetricChart = ({
|
|
|
81435
81437
|
enableSaveAs,
|
|
81436
81438
|
colors: colors2,
|
|
81437
81439
|
updateGroup,
|
|
81438
|
-
isEnableGroupBy
|
|
81440
|
+
isEnableGroupBy,
|
|
81441
|
+
backGroundColor,
|
|
81442
|
+
customSettings
|
|
81439
81443
|
});
|
|
81440
81444
|
}
|
|
81441
81445
|
if (chartType2 === CHART_TYPES.histogram) {
|
|
@@ -81448,7 +81452,9 @@ const MetricChart = ({
|
|
|
81448
81452
|
enableSaveAs,
|
|
81449
81453
|
colors: colors2,
|
|
81450
81454
|
updateGroup,
|
|
81451
|
-
isEnableGroupBy
|
|
81455
|
+
isEnableGroupBy,
|
|
81456
|
+
backGroundColor,
|
|
81457
|
+
customSettings
|
|
81452
81458
|
});
|
|
81453
81459
|
}
|
|
81454
81460
|
if (chartType2 === CHART_TYPES.bubble) {
|
|
@@ -81461,7 +81467,9 @@ const MetricChart = ({
|
|
|
81461
81467
|
enableSaveAs,
|
|
81462
81468
|
colors: colors2,
|
|
81463
81469
|
updateGroup,
|
|
81464
|
-
isEnableGroupBy
|
|
81470
|
+
isEnableGroupBy,
|
|
81471
|
+
backGroundColor,
|
|
81472
|
+
customSettings
|
|
81465
81473
|
});
|
|
81466
81474
|
}
|
|
81467
81475
|
if (chartType2 === CHART_TYPES.scatter) {
|
|
@@ -81474,7 +81482,9 @@ const MetricChart = ({
|
|
|
81474
81482
|
enableSaveAs,
|
|
81475
81483
|
colors: colors2,
|
|
81476
81484
|
updateGroup,
|
|
81477
|
-
isEnableGroupBy
|
|
81485
|
+
isEnableGroupBy,
|
|
81486
|
+
backGroundColor,
|
|
81487
|
+
customSettings
|
|
81478
81488
|
});
|
|
81479
81489
|
}
|
|
81480
81490
|
if (chartType2 === CHART_TYPES.row) {
|
|
@@ -81486,7 +81496,9 @@ const MetricChart = ({
|
|
|
81486
81496
|
enableSaveAs,
|
|
81487
81497
|
colors: colors2,
|
|
81488
81498
|
updateGroup,
|
|
81489
|
-
isEnableGroupBy
|
|
81499
|
+
isEnableGroupBy,
|
|
81500
|
+
backGroundColor,
|
|
81501
|
+
customSettings
|
|
81490
81502
|
});
|
|
81491
81503
|
}
|
|
81492
81504
|
if (chartType2 === CHART_TYPES.area) {
|
|
@@ -81502,7 +81514,9 @@ const MetricChart = ({
|
|
|
81502
81514
|
enableSaveAs,
|
|
81503
81515
|
colors: colors2,
|
|
81504
81516
|
updateGroup,
|
|
81505
|
-
isEnableGroupBy
|
|
81517
|
+
isEnableGroupBy,
|
|
81518
|
+
backGroundColor,
|
|
81519
|
+
customSettings
|
|
81506
81520
|
});
|
|
81507
81521
|
}
|
|
81508
81522
|
if (chartType2 === CHART_TYPES.combo) {
|
|
@@ -81520,7 +81534,9 @@ const MetricChart = ({
|
|
|
81520
81534
|
enableSaveAs,
|
|
81521
81535
|
colors: colors2,
|
|
81522
81536
|
updateGroup,
|
|
81523
|
-
isEnableGroupBy
|
|
81537
|
+
isEnableGroupBy,
|
|
81538
|
+
backGroundColor,
|
|
81539
|
+
customSettings
|
|
81524
81540
|
});
|
|
81525
81541
|
}
|
|
81526
81542
|
if (chartType2 === CHART_TYPES.pie) {
|
|
@@ -81571,7 +81587,9 @@ const MetricChart = ({
|
|
|
81571
81587
|
enableSaveAs,
|
|
81572
81588
|
colors: colors2,
|
|
81573
81589
|
updateGroup,
|
|
81574
|
-
isEnableGroupBy
|
|
81590
|
+
isEnableGroupBy,
|
|
81591
|
+
backGroundColor,
|
|
81592
|
+
customSettings
|
|
81575
81593
|
});
|
|
81576
81594
|
}
|
|
81577
81595
|
if (chartType2 === CHART_TYPES.funnel) {
|
|
@@ -81600,7 +81618,8 @@ const MetricChart = ({
|
|
|
81600
81618
|
legendSettings,
|
|
81601
81619
|
labelSettings,
|
|
81602
81620
|
enableSaveAs,
|
|
81603
|
-
colors: colors2
|
|
81621
|
+
colors: colors2,
|
|
81622
|
+
backGroundColor
|
|
81604
81623
|
});
|
|
81605
81624
|
}
|
|
81606
81625
|
if (chartType2 === CHART_TYPES.singleValue) {
|
|
@@ -81619,7 +81638,8 @@ const MetricChart = ({
|
|
|
81619
81638
|
labelSettings,
|
|
81620
81639
|
axisSettings,
|
|
81621
81640
|
enableSaveAs,
|
|
81622
|
-
colors: colors2
|
|
81641
|
+
colors: colors2,
|
|
81642
|
+
customSettings
|
|
81623
81643
|
});
|
|
81624
81644
|
}
|
|
81625
81645
|
if (chartType2 === CHART_TYPES.table) {
|
|
@@ -82061,7 +82081,15 @@ const objectArrayToCsvString = (array) => {
|
|
|
82061
82081
|
const headers = Object.keys(objSchema);
|
|
82062
82082
|
columns.push(`S.No,${headers.join(",").toUpperCase()}`);
|
|
82063
82083
|
array.forEach((rowObj, index) => {
|
|
82064
|
-
const row2 = Object.values(rowObj)
|
|
82084
|
+
const row2 = Object.values(rowObj).map((value2) => {
|
|
82085
|
+
if (typeof value2 === "number") {
|
|
82086
|
+
return value2;
|
|
82087
|
+
}
|
|
82088
|
+
if (value2 == null ? void 0 : value2.includes(",")) {
|
|
82089
|
+
return `"${value2}"`;
|
|
82090
|
+
}
|
|
82091
|
+
return value2;
|
|
82092
|
+
});
|
|
82065
82093
|
columns.push(`${index + 1},${row2.join(",")}`);
|
|
82066
82094
|
});
|
|
82067
82095
|
const csvContent = columns.join("\n");
|
|
@@ -82187,7 +82215,7 @@ const updateGroupData = (data2, keys2, selectedGroupBy, setGroupedData) => {
|
|
|
82187
82215
|
};
|
|
82188
82216
|
const findKeys = (obj) => {
|
|
82189
82217
|
const numberEntries = Object.entries(obj).filter(
|
|
82190
|
-
([, value2]) =>
|
|
82218
|
+
([, value2]) => Number(value2) || Number(value2) === 0
|
|
82191
82219
|
);
|
|
82192
82220
|
const stringEntries = Object.entries(obj).filter(
|
|
82193
82221
|
([, value2]) => typeof value2 === "string" && !Number(value2) || value2 === null
|
|
@@ -90092,7 +90120,7 @@ const useEmbeddedDashboard = (token) => {
|
|
|
90092
90120
|
const mode = (_b2 = params == null ? void 0 : params.dashboard) == null ? void 0 : _b2.isLive;
|
|
90093
90121
|
const rlsSettings = params == null ? void 0 : params.rlsSettings;
|
|
90094
90122
|
const companyTenancyType = params == null ? void 0 : params.companyTenancyType;
|
|
90095
|
-
const isTestKey =
|
|
90123
|
+
const isTestKey = params == null ? void 0 : params.isTestKey;
|
|
90096
90124
|
const {
|
|
90097
90125
|
data: externalDashboardMetricsData,
|
|
90098
90126
|
isLoading: isExternalDashboardMetricsDataLoading
|