moblor-vue 0.1.76 → 0.1.77
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.
|
@@ -4375,6 +4375,7 @@ var DataConvertor = /** @class */ (function () {
|
|
|
4375
4375
|
if (level2GroupingLabels.length === 0) {
|
|
4376
4376
|
return pieces;
|
|
4377
4377
|
}
|
|
4378
|
+
level2GroupingLabels.sort();
|
|
4378
4379
|
var refactoredPieces = [];
|
|
4379
4380
|
pieces.forEach(function (piece) {
|
|
4380
4381
|
var refactoredPiece = JSON.parse(JSON.stringify(piece));
|
|
@@ -6229,6 +6230,15 @@ var SFHorizontalBarChart = /** @class */ (function (_super) {
|
|
|
6229
6230
|
function SFHorizontalBarChart() {
|
|
6230
6231
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
6231
6232
|
}
|
|
6233
|
+
Object.defineProperty(SFHorizontalBarChart.prototype, "sortedData", {
|
|
6234
|
+
get: function () {
|
|
6235
|
+
return __spreadArrays(this.data).sort(
|
|
6236
|
+
// eslint-disable-next-line comma-dangle
|
|
6237
|
+
function (a, b) { return (b.values[0] || 0) - (a.values[0] || 0); });
|
|
6238
|
+
},
|
|
6239
|
+
enumerable: false,
|
|
6240
|
+
configurable: true
|
|
6241
|
+
});
|
|
6232
6242
|
Object.defineProperty(SFHorizontalBarChart.prototype, "isGrouped", {
|
|
6233
6243
|
get: function () {
|
|
6234
6244
|
return this.data.length > 0
|
|
@@ -6293,7 +6303,7 @@ var __vue_render__$d = function () {
|
|
|
6293
6303
|
return _vm.data.length > 0
|
|
6294
6304
|
? _c("bar-chart-horizontal", {
|
|
6295
6305
|
attrs: {
|
|
6296
|
-
data: _vm.
|
|
6306
|
+
data: _vm.sortedData,
|
|
6297
6307
|
"x-axis-mode": "vertical",
|
|
6298
6308
|
decimal: 1,
|
|
6299
6309
|
"value-position": "inner",
|
|
@@ -7081,14 +7091,42 @@ var SFReportChart = /** @class */ (function (_super) {
|
|
|
7081
7091
|
enumerable: false,
|
|
7082
7092
|
configurable: true
|
|
7083
7093
|
});
|
|
7094
|
+
Object.defineProperty(SFReportChart.prototype, "hasError", {
|
|
7095
|
+
get: function () {
|
|
7096
|
+
return this.data
|
|
7097
|
+
&& this.data.status
|
|
7098
|
+
&& this.data.status.errorCode;
|
|
7099
|
+
},
|
|
7100
|
+
enumerable: false,
|
|
7101
|
+
configurable: true
|
|
7102
|
+
});
|
|
7103
|
+
Object.defineProperty(SFReportChart.prototype, "isNegative", {
|
|
7104
|
+
get: function () {
|
|
7105
|
+
return (this.chartType === 'Pie'
|
|
7106
|
+
|| this.chartType === 'Donut'
|
|
7107
|
+
|| this.chartType === 'Funnel'
|
|
7108
|
+
|| this.chartType.includes('Stacked'))
|
|
7109
|
+
&& Array.isArray(this.refactoredData)
|
|
7110
|
+
&& !this.refactoredData.some(function (item) { return item.values[0] > 0; });
|
|
7111
|
+
},
|
|
7112
|
+
enumerable: false,
|
|
7113
|
+
configurable: true
|
|
7114
|
+
});
|
|
7084
7115
|
SFReportChart.prototype.render = function (createElement) {
|
|
7085
7116
|
var convertor = new ReportDataConvertor(this.data);
|
|
7086
7117
|
this.refactoredData = convertor.data;
|
|
7087
7118
|
this.refactoredMetadata = convertor.metadata;
|
|
7088
7119
|
var children = [];
|
|
7089
|
-
if (this.
|
|
7120
|
+
if (this.hasError) {
|
|
7121
|
+
var errorMessage = this.data.status.errorSeverity + ": " + this.data.status.errorMessage;
|
|
7122
|
+
children.push(this.renderError(createElement, errorMessage));
|
|
7123
|
+
}
|
|
7124
|
+
else if (this.isEmpty) {
|
|
7090
7125
|
children.push(this.renderPrompt(createElement, this.noDataText));
|
|
7091
7126
|
}
|
|
7127
|
+
else if (this.isNegative) {
|
|
7128
|
+
children.push(this.renderPrompt(createElement, this.negativeDataText));
|
|
7129
|
+
}
|
|
7092
7130
|
else {
|
|
7093
7131
|
children.push(this.renderChart(createElement));
|
|
7094
7132
|
}
|
|
@@ -7198,7 +7236,7 @@ var __vue_script__$l = SFReportChart;
|
|
|
7198
7236
|
/* style */
|
|
7199
7237
|
var __vue_inject_styles__$l = function (inject) {
|
|
7200
7238
|
if (!inject) { return }
|
|
7201
|
-
inject("data-v-
|
|
7239
|
+
inject("data-v-488a1915_0", { source: "/* Colors\n========================================================================== */\n/* Typography\n========================================================================== */\n/* Border Radius\n========================================================================== */\n/* Table */\n/* Safe Area */\n.sf-analytics-chart {\n width: 100%;\n padding: 10px;\n background-color: #fff;\n transform: translate3d(0, 0, 0);\n}\n.sf-analytics-chart .sf-analytics-text {\n width: 100%;\n height: 100%;\n min-height: 35rem;\n font-size: 1.4rem;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.sf-analytics-chart .sf-analytics-error {\n width: 100%;\n height: 100%;\n min-height: 35rem;\n font-size: 1.4rem;\n color: #d74c3b;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n@media (prefers-color-scheme: dark) {\n.sf-analytics-chart {\n background-color: #1c1c1e;\n}\n.sf-analytics-chart .sf-analytics-text {\n color: #6e6e6e;\n}\n}", map: undefined, media: undefined });
|
|
7202
7240
|
|
|
7203
7241
|
};
|
|
7204
7242
|
/* scoped */
|