@senx/discovery-widgets
Version:
Discovery Widgets Elements
785 lines (784 loc) • 34.2 kB
JavaScript
/*
* Copyright 2022-2025 SenX S.A.S.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { h } from "@stencil/core";
import { DataModel } from "../../model/types";
import { Param } from "../../model/param";
import * as echarts from "echarts";
import { Logger } from "../../utils/logger";
import { GTSLib } from "../../utils/gts.lib";
import { ColorLib } from "../../utils/color-lib";
import { Utils } from "../../utils/utils";
export class DiscoveryGauge {
constructor() {
this.options = new Param();
this.debug = false;
this.parsing = false;
this.rendering = false;
this.defOptions = new Param();
this.innerWidth = 0;
this.innerHeight = 0;
}
updateRes() {
this.chartOpts = this.convert(GTSLib.getData(this.result) || new DataModel());
this.setOpts(true);
}
optionsUpdate(newValue, oldValue) {
var _a, _b, _c;
(_a = this.LOG) === null || _a === void 0 ? void 0 : _a.debug(['optionsUpdate'], newValue, oldValue);
let opts = newValue;
if (!!newValue && typeof newValue === 'string') {
opts = JSON.parse(newValue);
}
if (!Utils.deepEqual(opts, this.innerOptions)) {
this.innerOptions = Object.assign({}, opts);
if (this.myChart) {
this.chartOpts = this.convert((_b = this.result) !== null && _b !== void 0 ? _b : new DataModel());
this.setOpts(true);
}
(_c = this.LOG) === null || _c === void 0 ? void 0 : _c.debug(['optionsUpdate 2'], { options: this.innerOptions, newValue, oldValue }, this.chartOpts);
}
}
async resize() {
const dims = Utils.getContentBounds(this.el.parentElement);
const width = dims.w - 4;
const height = dims.h;
if (this.myChart && (this.innerWidth !== width || this.innerHeight !== dims.h)) {
this.innerWidth = width;
this.innerHeight = this.innerHeight !== dims.h ? height - this.el.parentElement.offsetTop : this.innerHeight;
this.myChart.resize({ width: this.innerWidth, height: this.innerHeight, silent: true });
}
return Promise.resolve();
}
async show(regexp) {
this.myChart.dispatchAction({
type: 'legendSelect',
batch: this.myChart.getOption().series.filter(s => new RegExp(regexp).test(s.name)),
});
return Promise.resolve();
}
async hide(regexp) {
this.myChart.dispatchAction({
type: 'legendUnSelect',
batch: this.myChart.getOption().series.filter(s => new RegExp(regexp).test(s.name)),
});
return Promise.resolve();
}
async hideById(id) {
if (this.myChart) {
this.myChart.dispatchAction({
type: 'legendUnSelect',
batch: this.myChart.getOption().series
.filter((s, i) => new RegExp(id.toString()).test((s.id || i).toString())),
});
}
return Promise.resolve();
}
async showById(id) {
if (this.myChart) {
this.myChart.dispatchAction({
type: 'legendSelect',
batch: this.myChart.getOption().series
.filter((s, i) => new RegExp(id.toString()).test((s.id || i).toString())),
});
}
return Promise.resolve();
}
// noinspection JSUnusedGlobalSymbols
componentWillLoad() {
var _a;
this.parsing = true;
this.LOG = new Logger(DiscoveryGauge, this.debug);
if (typeof this.options === 'string') {
this.innerOptions = JSON.parse(this.options);
}
else {
this.innerOptions = this.options;
}
this.chartOpts = this.convert(GTSLib.getData(this.result) || new DataModel());
this.setOpts();
(_a = this.LOG) === null || _a === void 0 ? void 0 : _a.debug(['componentWillLoad'], {
type: this.type,
options: this.innerOptions,
chartOpts: this.chartOpts,
});
}
setOpts(notMerge = false) {
var _a, _b, _c;
const series = [];
((_a = this.chartOpts) === null || _a === void 0 ? void 0 : _a.series).forEach(s => {
s.detail.fontSize = this.autoFontSize(this.chartOpts.series.length);
series.push(s);
});
this.chartOpts.series = series;
if (((_c = (_b = this.chartOpts) === null || _b === void 0 ? void 0 : _b.series) !== null && _c !== void 0 ? _c : []).length === 0) {
this.chartOpts.title = {
show: true,
textStyle: { color: Utils.getLabelColor(this.el), fontSize: 20 },
text: this.innerOptions.noDataLabel || '',
left: 'center',
top: 'center',
};
this.chartOpts.xAxis = { show: false };
this.chartOpts.yAxis = { show: false };
this.chartOpts.tooltip = { show: false };
}
else {
this.chartOpts.title = Object.assign(Object.assign({}, this.chartOpts.title || {}), { show: false });
}
setTimeout(() => {
if (this.myChart) {
this.myChart.setOption(this.chartOpts || {}, notMerge, true);
}
});
}
getCommonSeriesParam(color) {
const datasetNoAlpha = this.innerOptions.datasetNoAlpha;
return {
type: 'gauge',
animation: true,
large: true,
clip: false,
startAngle: 180,
endAngle: 0,
lineStyle: { color },
toolbox: {
show: this.innerOptions.showControls,
feature: {
saveAsImage: { type: 'png', excludeComponents: ['toolbox'] },
},
},
splitLine: { show: false },
splitNumber: 4, // The number of split segments on the axis
itemStyle: {
opacity: 0.8,
borderColor: color,
color: {
type: 'linear', x: 0, y: 0, x2: 1, y2: 1,
colorStops: [
{ offset: 0, color },
{ offset: 1, color: ColorLib.transparentize(color, datasetNoAlpha ? 1 : 0.4) },
],
global: false, // false by default
},
},
};
}
convert(data) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
let options = Utils.mergeDeep(this.defOptions, this.innerOptions || {});
options = Utils.mergeDeep(options || {}, data.globalParams);
this.innerOptions = Object.assign({}, options);
const series = [];
// noinspection JSUnusedAssignment
let gtsList = [];
if (GTSLib.isArray(data.data)) {
data.data = GTSLib.flatDeep(data.data);
(_a = this.LOG) === null || _a === void 0 ? void 0 : _a.debug(['convert', 'isArray']);
if (data.data.length > 0 && GTSLib.isGts(data.data[0])) {
(_b = this.LOG) === null || _b === void 0 ? void 0 : _b.debug(['convert', 'isArray 2']);
gtsList = GTSLib.flattenGtsIdArray(data.data, 0).res;
}
else {
(_c = this.LOG) === null || _c === void 0 ? void 0 : _c.debug(['convert', 'isArray 3']);
gtsList = data.data;
}
}
else {
(_d = this.LOG) === null || _d === void 0 ? void 0 : _d.debug(['convert', 'not array']);
gtsList = [data.data];
}
(_e = this.LOG) === null || _e === void 0 ? void 0 : _e.debug(['convert'], { options: this.innerOptions, gtsList });
const gtsCount = gtsList.length;
let overallMax = this.innerOptions.maxValue || Number.MIN_VALUE;
const dataStruct = [];
for (let i = 0; i < gtsCount; i++) {
const gts = gtsList[i];
if (GTSLib.isGts(gts)) {
let max = Number.MIN_VALUE;
const values = (gts.v || []);
const val = (_f = values[values.length - 1]) !== null && _f !== void 0 ? _f : [];
let value = 0;
if (val.length > 0) {
value = val[val.length - 1];
if ((_g = this.innerOptions.gauge) === null || _g === void 0 ? void 0 : _g.decimals) {
const dec = Math.pow(10, (_j = (_h = this.innerOptions.gauge) === null || _h === void 0 ? void 0 : _h.decimals) !== null && _j !== void 0 ? _j : 2);
value = Math.round(parseFloat(value + '') * dec) / dec;
}
}
if (!!data.params && !!data.params[i] && !!data.params[i].maxValue) {
max = data.params[i].maxValue;
}
else {
if (overallMax < value) {
overallMax = value;
}
}
let min = 0;
if (!!data.params && !!data.params[i] && !!data.params[i].minValue) {
min = data.params[i].minValue;
}
dataStruct.push({
id: gts.id,
name: (_l = (((_k = data.params) !== null && _k !== void 0 ? _k : [])[i] || { key: undefined }).key) !== null && _l !== void 0 ? _l : GTSLib.serializeGtsMetadata(gts),
key: (_o = (((_m = data.params) !== null && _m !== void 0 ? _m : [])[i] || { key: undefined }).key) !== null && _o !== void 0 ? _o : GTSLib.serializeGtsMetadata(gts),
value,
max,
min,
});
}
else {
// custom data format
let max = (_p = this.innerOptions.maxValue) !== null && _p !== void 0 ? _p : Number.MIN_VALUE;
if (!!data.params && !!data.params[i] && !!data.params[i].maxValue) {
max = data.params[i].maxValue;
overallMax = Math.max(max, overallMax);
}
else {
overallMax = Math.max((_q = (gts.hasOwnProperty('value') ? gts.value : gts)) !== null && _q !== void 0 ? _q : Number.MIN_VALUE, overallMax);
}
let min = 0;
if (!!data.params && !!data.params[i] && !!data.params[i].minValue) {
min = data.params[i].minValue;
}
let value = 0;
if (gts.hasOwnProperty('value')) {
value = (_r = gts.value) !== null && _r !== void 0 ? _r : 0;
}
else {
value = gts !== null && gts !== void 0 ? gts : 0;
}
if ((_s = this.innerOptions.gauge) === null || _s === void 0 ? void 0 : _s.decimals) {
const dec = Math.pow(10, (_u = (_t = this.innerOptions.gauge) === null || _t === void 0 ? void 0 : _t.decimals) !== null && _u !== void 0 ? _u : 2);
value = Math.round(parseFloat(value + '') * dec) / dec;
}
dataStruct.push({ key: (_v = gts.key) !== null && _v !== void 0 ? _v : '', value, max, min });
}
}
const radius = Math.round(100 / Math.ceil(gtsCount / 2)) * (this.type === 'compass' ? 0.8 : 0.8);
let floor = 1;
dataStruct.forEach((d, i) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
if (i % 2 === 0) {
floor++;
}
const c = ColorLib.getColor(i, this.innerOptions.scheme);
const color = (_c = (_b = ((_a = data.params) !== null && _a !== void 0 ? _a : [])[i]) === null || _b === void 0 ? void 0 : _b.datasetColor) !== null && _c !== void 0 ? _c : c;
let axisLineColor;
if (((_f = (_e = ((_d = data.params) !== null && _d !== void 0 ? _d : [])[i]) === null || _e === void 0 ? void 0 : _e.gauge) === null || _f === void 0 ? void 0 : _f.color) || ((_g = this.innerOptions.gauge) === null || _g === void 0 ? void 0 : _g.color)) {
if (GTSLib.isArray(((_k = (_j = ((_h = data.params) !== null && _h !== void 0 ? _h : [])[i]) === null || _j === void 0 ? void 0 : _j.gauge) === null || _k === void 0 ? void 0 : _k.color) || ((_l = this.innerOptions.gauge) === null || _l === void 0 ? void 0 : _l.color))) {
axisLineColor = (_q = (_p = (_o = ((_m = data.params) !== null && _m !== void 0 ? _m : [])[i]) === null || _o === void 0 ? void 0 : _o.gauge) === null || _p === void 0 ? void 0 : _p.color) !== null && _q !== void 0 ? _q : (_r = this.innerOptions.gauge) === null || _r === void 0 ? void 0 : _r.color;
// eslint-disable-next-line no-unsafe-optional-chaining
}
else if (ColorLib.heatMaps[(((_u = (_t = ((_s = data.params) !== null && _s !== void 0 ? _s : [])[i]) === null || _t === void 0 ? void 0 : _t.gauge) === null || _u === void 0 ? void 0 : _u.color) || ((_v = this.innerOptions.gauge) === null || _v === void 0 ? void 0 : _v.color)).toString()]) {
// eslint-disable-next-line no-unsafe-optional-chaining
const heatMap = ColorLib.heatMaps[((_y = (_x = (_w = (data.params || [])[i]) === null || _w === void 0 ? void 0 : _w.gauge) === null || _x === void 0 ? void 0 : _x.color) !== null && _y !== void 0 ? _y : (_z = this.innerOptions.gauge) === null || _z === void 0 ? void 0 : _z.color).toString()];
axisLineColor = heatMap.map((c, i) => [(i + 1) / heatMap.length, c]);
}
}
const unit = ((data.params || [])[i] || {}).unit || this.innerOptions.unit || this.unit || '';
const angles = DiscoveryGauge.getAngles(this.type);
series.push(Object.assign(Object.assign({}, this.getCommonSeriesParam(color)), { name: d.key, min: d.min, id: d.id, max: d.max === Number.MIN_VALUE ? overallMax : d.max, startAngle: angles.s, endAngle: angles.e, tooltip: {
backgroundColor: Utils.getCSSColor(this.el, '--warp-view-tooltip-bg-color', 'white'),
hideDelay: this.innerOptions.tooltipDelay || 100,
formatter: '{a} <br/>{b} : {c}%',
}, title: {
fontSize: 12,
offsetCenter: this.type === 'compass' ? [0, '110%'] : [0, 10],
color: Utils.getLabelColor(this.el),
}, axisLine: this.type === 'compass'
? { lineStyle: { color: [[1, Utils.getGridColor(this.el)]], width: 1 } }
: axisLineColor
? {
lineStyle: {
color: axisLineColor,
width: (_5 = (_2 = (_1 = (_0 = (data.params || [])[i]) === null || _0 === void 0 ? void 0 : _0.gauge) === null || _1 === void 0 ? void 0 : _1.width) !== null && _2 !== void 0 ? _2 : (_4 = (_3 = this.innerOptions) === null || _3 === void 0 ? void 0 : _3.gauge) === null || _4 === void 0 ? void 0 : _4.width) !== null && _5 !== void 0 ? _5 : 20,
},
}
: {
roundCap: false,
lineStyle: { width: (_11 = (_8 = (_7 = (_6 = (data.params || [])[i]) === null || _6 === void 0 ? void 0 : _6.gauge) === null || _7 === void 0 ? void 0 : _7.width) !== null && _8 !== void 0 ? _8 : (_10 = (_9 = this.innerOptions) === null || _9 === void 0 ? void 0 : _9.gauge) === null || _10 === void 0 ? void 0 : _10.width) !== null && _11 !== void 0 ? _11 : 20 },
}, axisTick: this.type === 'compass' ? {
distance: 0,
length: 10,
lineStyle: { color: Utils.getGridColor(this.el) },
} : {
distance: 0,
splitNumber: 4,
lineStyle: { width: 1, color: Utils.getGridColor(this.el) },
}, axisLabel: this.type === 'compass' ? {
hideOverlap: true,
color: Utils.getLabelColor(this.el),
distance: 0,
formatter: (value) => value === d.max ? '' : `${value}`,
} : { show: false }, progress: this.type === 'compass'
? { show: false }
: {
show: !(((_13 = (_12 = (data.params || [])[i]) === null || _12 === void 0 ? void 0 : _12.gauge) === null || _13 === void 0 ? void 0 : _13.pointer) || ((_15 = (_14 = this.innerOptions) === null || _14 === void 0 ? void 0 : _14.gauge) === null || _15 === void 0 ? void 0 : _15.pointer)),
roundCap: false,
width: (_21 = (_18 = (_17 = (_16 = (data.params || [])[i]) === null || _16 === void 0 ? void 0 : _16.gauge) === null || _17 === void 0 ? void 0 : _17.width) !== null && _18 !== void 0 ? _18 : (_20 = (_19 = this.innerOptions) === null || _19 === void 0 ? void 0 : _19.gauge) === null || _20 === void 0 ? void 0 : _20.width) !== null && _21 !== void 0 ? _21 : 20,
}, data: [{ value: d.value, name: d.key }], anchor: this.type === 'compass' ? {
show: true,
size: 10,
itemStyle: { borderColor: color, borderWidth: 10 },
} : { show: false }, pointer: this.type === 'compass'
? {
offsetCenter: [0, '40%'],
length: '140%',
itemStyle: { color },
}
: {
show: ((_23 = (_22 = (data.params || [])[i]) === null || _22 === void 0 ? void 0 : _22.gauge) === null || _23 === void 0 ? void 0 : _23.pointer) || ((_25 = (_24 = this.innerOptions) === null || _24 === void 0 ? void 0 : _24.gauge) === null || _25 === void 0 ? void 0 : _25.pointer),
icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z',
length: '12%',
width: 20,
offsetCenter: [0, `-${radius - 10}%`],
itemStyle: { color: 'auto' },
}, radius: `${radius}%`, detail: {
formatter: '{value}' + unit,
fontSize: 12,
offsetCenter: [0, this.type === 'gauge' ? '-20%' : this.type === 'compass' ? 40 : 0],
color: Utils.getLabelColor(this.el),
}, center: [
(gtsCount === 1 ? '50' : i % 2 === 0 ? '25' : '75') + '%',
`${(gtsCount === 1
? (this.type === 'gauge' ? '65' : '50')
: (radius * (floor - 1) - radius / 2 + (floor > 2 ? 15 : 5)))}%`,
] }));
});
return Object.assign({ grid: {
left: 10, top: 10, bottom: 10, right: 10,
containLabel: true,
}, legend: { show: false }, series }, ((_x = (_w = this.innerOptions) === null || _w === void 0 ? void 0 : _w.extra) === null || _x === void 0 ? void 0 : _x.chartOpts) || {});
}
autoFontSize(size) {
if (this.el.getBoundingClientRect().height > 0) {
const count = size > 1;
return (this.el.getBoundingClientRect().height >= 700) ? 50 : (this.el.getBoundingClientRect().height / 10) / (count ? 4 : 1);
}
else {
return 12;
}
}
;
// noinspection JSUnusedGlobalSymbols
componentDidLoad() {
setTimeout(() => {
this.parsing = false;
this.rendering = true;
let initial = false;
this.myChart = echarts.init(this.graph, null, {
width: undefined,
height: this.height,
});
this.myChart.on('rendered', () => {
this.rendering = false;
if (initial) {
setTimeout(() => this.draw.emit());
initial = false;
}
});
this.myChart.on('mouseover', (event) => {
this.dataPointOver.emit({ date: event.value[0], name: event.seriesName, value: event.value[1], meta: {} });
});
this.el.addEventListener('mouseout', () => this.dataPointOver.emit({}));
this.myChart.on('click', (event) => {
this.dataPointSelected.emit({ date: event.value[0], name: event.seriesName, value: event.value[1], meta: {} });
});
this.setOpts();
initial = true;
});
}
async export(type = 'png') {
return Promise.resolve(this.myChart ? this.myChart.getDataURL({
type,
excludeComponents: ['toolbox'],
}) : undefined);
}
render() {
return h("div", { key: 'e384b05a90a0652f60c6df33839589ebc19d6b51', style: { width: '100%', height: '100%' } }, h("div", { key: '51dcce8720f89304f97d8cab7ed298a6ea469c05', ref: (el) => this.graph = el }), this.parsing ? h("div", { class: "discovery-chart-spinner" }, h("discovery-spinner", null, "Parsing data...")) : '', this.rendering ? h("div", { class: "discovery-chart-spinner" }, h("discovery-spinner", null, "Rendering data...")) : '');
}
static getAngles(type) {
switch (type) {
case 'compass':
return { s: 90, e: -270 };
case 'gauge':
return { s: 180, e: 0 };
default:
return { s: 270, e: -90 };
}
}
static get is() { return "discovery-gauge"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["discovery-gauge.scss"]
};
}
static get styleUrls() {
return {
"$": ["discovery-gauge.css"]
};
}
static get properties() {
return {
"result": {
"type": "string",
"mutable": false,
"complexType": {
"original": "DataModel | string",
"resolved": "DataModel | string",
"references": {
"DataModel": {
"location": "import",
"path": "../../model/types",
"id": "src/model/types.ts::DataModel"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "result",
"reflect": false
},
"type": {
"type": "string",
"mutable": false,
"complexType": {
"original": "ChartType",
"resolved": "string",
"references": {
"ChartType": {
"location": "import",
"path": "../../model/types",
"id": "src/model/types.ts::ChartType"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "type",
"reflect": false
},
"options": {
"type": "string",
"mutable": true,
"complexType": {
"original": "Param | string",
"resolved": "Param | string",
"references": {
"Param": {
"location": "import",
"path": "../../model/param",
"id": "src/model/param.ts::Param"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "options",
"reflect": false,
"defaultValue": "new Param()"
},
"width": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "width",
"reflect": false
},
"height": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "height",
"reflect": false
},
"debug": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "debug",
"reflect": false,
"defaultValue": "false"
},
"unit": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"attribute": "unit",
"reflect": false
}
};
}
static get states() {
return {
"parsing": {},
"rendering": {},
"innerOptions": {}
};
}
static get events() {
return [{
"method": "draw",
"name": "draw",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "void",
"resolved": "void",
"references": {}
}
}, {
"method": "dataPointOver",
"name": "dataPointOver",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}, {
"method": "dataPointSelected",
"name": "dataPointSelected",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}];
}
static get methods() {
return {
"resize": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"show": {
"complexType": {
"signature": "(regexp: string) => Promise<void>",
"parameters": [{
"name": "regexp",
"type": "string",
"docs": ""
}],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"hide": {
"complexType": {
"signature": "(regexp: string) => Promise<void>",
"parameters": [{
"name": "regexp",
"type": "string",
"docs": ""
}],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"hideById": {
"complexType": {
"signature": "(id: number | string) => Promise<void>",
"parameters": [{
"name": "id",
"type": "string | number",
"docs": ""
}],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"showById": {
"complexType": {
"signature": "(id: number | string) => Promise<void>",
"parameters": [{
"name": "id",
"type": "string | number",
"docs": ""
}],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"export": {
"complexType": {
"signature": "(type?: \"png\" | \"svg\") => Promise<string>",
"parameters": [{
"name": "type",
"type": "\"svg\" | \"png\"",
"docs": ""
}],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<string>"
},
"docs": {
"text": "",
"tags": []
}
}
};
}
static get elementRef() { return "el"; }
static get watchers() {
return [{
"propName": "result",
"methodName": "updateRes"
}, {
"propName": "options",
"methodName": "optionsUpdate"
}];
}
}
//# sourceMappingURL=discovery-gauge.js.map