@gisce/ooui 0.2.11 → 0.3.1
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/Graph/GraphIndicator.d.ts +2 -0
- package/dist/Graph/GraphIndicator.js +9 -0
- package/dist/Graph/GraphIndicator.js.map +1 -1
- package/package.json +1 -1
- package/src/Graph/GraphIndicator.ts +6 -0
- package/src/{Graph → spec}/Graph.spec.ts +1 -2
- package/dist/Graph/Graph.spec.d.ts +0 -1
- package/dist/Graph/Graph.spec.js +0 -26
- package/dist/Graph/Graph.spec.js.map +0 -1
|
@@ -20,9 +20,11 @@ var GraphIndicator = /** @class */ (function (_super) {
|
|
|
20
20
|
_this._icon = null;
|
|
21
21
|
_this._totalDomain = null;
|
|
22
22
|
_this._showPercent = false;
|
|
23
|
+
_this._suffix = null;
|
|
23
24
|
_this._type = "indicator";
|
|
24
25
|
_this._color = element.getAttribute("color");
|
|
25
26
|
_this._icon = element.getAttribute("icon");
|
|
27
|
+
_this._suffix = element.getAttribute("suffix");
|
|
26
28
|
_this._totalDomain = element.getAttribute("totalDomain");
|
|
27
29
|
var showPercent = element.getAttribute("showPercent");
|
|
28
30
|
if (showPercent &&
|
|
@@ -60,6 +62,13 @@ var GraphIndicator = /** @class */ (function (_super) {
|
|
|
60
62
|
enumerable: false,
|
|
61
63
|
configurable: true
|
|
62
64
|
});
|
|
65
|
+
Object.defineProperty(GraphIndicator.prototype, "suffix", {
|
|
66
|
+
get: function () {
|
|
67
|
+
return this._suffix;
|
|
68
|
+
},
|
|
69
|
+
enumerable: false,
|
|
70
|
+
configurable: true
|
|
71
|
+
});
|
|
63
72
|
return GraphIndicator;
|
|
64
73
|
}(Graph));
|
|
65
74
|
export { GraphIndicator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphIndicator.js","sourceRoot":"","sources":["../../src/Graph/GraphIndicator.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAA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Af;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;;;OAAA;IAGD,sBAAI,uCAAW;aAAf;YACE,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;;;OAAA;IAGD,sBAAI,kCAAM;aAAV;YACE,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;;;OAAA;IAoBH,qBAAC;AAAD,CAAC,AA5CD,CAAoC,KAAK,GA4CxC"}
|
package/package.json
CHANGED
|
@@ -21,12 +21,18 @@ export class GraphIndicator extends Graph {
|
|
|
21
21
|
return this._showPercent;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
_suffix: string | null = null;
|
|
25
|
+
get suffix(): string | null {
|
|
26
|
+
return this._suffix;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
constructor(element: HTMLElement) {
|
|
25
30
|
super(element);
|
|
26
31
|
|
|
27
32
|
this._type = "indicator";
|
|
28
33
|
this._color = element.getAttribute("color");
|
|
29
34
|
this._icon = element.getAttribute("icon");
|
|
35
|
+
this._suffix = element.getAttribute("suffix");
|
|
30
36
|
this._totalDomain = element.getAttribute("totalDomain");
|
|
31
37
|
const showPercent = element.getAttribute("showPercent");
|
|
32
38
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/Graph/Graph.spec.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { parseGraph } from "..";
|
|
2
|
-
describe("A Graph", function () {
|
|
3
|
-
it("should parse a basic XML title and type indicator", function () {
|
|
4
|
-
var xml = "<?xml version=\"1.0\"?>\n <graph string=\"My indicator\" type=\"indicator\" color=\"red:debt>0;green:debt==0\" icon=\"slack\" />\n ";
|
|
5
|
-
var graph = parseGraph(xml);
|
|
6
|
-
expect(graph.string).toBe("My indicator");
|
|
7
|
-
expect(graph.type).toBe("indicator");
|
|
8
|
-
expect(graph.color).toBe("red:debt>0;green:debt==0");
|
|
9
|
-
expect(graph.icon).toBe("slack");
|
|
10
|
-
});
|
|
11
|
-
it("should parse a chart graph XML with type line", function () {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13
|
-
var xml = "<?xml version=\"1.0\"?>\n <graph type=\"line\">\n <field name=\"data_alta\" axis=\"x\"/>\n <field name=\"data_alta\" operator=\"+\" axis=\"y\"/>\n </graph>\n ";
|
|
14
|
-
var graph = parseGraph(xml);
|
|
15
|
-
expect(graph.type).toBe("line");
|
|
16
|
-
expect(graph.x).toBeDefined();
|
|
17
|
-
expect(graph.y).toBeDefined();
|
|
18
|
-
expect((_a = graph.x) === null || _a === void 0 ? void 0 : _a.name).toBe("data_alta");
|
|
19
|
-
expect((_b = graph.y) === null || _b === void 0 ? void 0 : _b.name).toBe("data_alta");
|
|
20
|
-
expect((_c = graph.x) === null || _c === void 0 ? void 0 : _c.axis).toBe("x");
|
|
21
|
-
expect((_d = graph.y) === null || _d === void 0 ? void 0 : _d.axis).toBe("y");
|
|
22
|
-
expect((_e = graph.x) === null || _e === void 0 ? void 0 : _e.operator).toBeNull();
|
|
23
|
-
expect((_f = graph.y) === null || _f === void 0 ? void 0 : _f.operator).toBe("+");
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=Graph.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.spec.js","sourceRoot":"","sources":["../../src/Graph/Graph.spec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,QAAQ,CAAC,SAAS,EAAE;IAClB,EAAE,CAAC,mDAAmD,EAAE;QACtD,IAAM,GAAG,GAAG,2IAEX,CAAC;QAEF,IAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAmB,CAAC;QAEhD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WA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