raain-model 0.4.1 → 1.10.25
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/README.md +7 -11
- package/RELEASE.md +2 -0
- package/cartesian/CartesianMeasureValue.d.ts +41 -0
- package/{cartesians → cartesian}/CartesianMeasureValue.js +39 -21
- package/cartesian/CartesianMeasureValue.js.map +1 -0
- package/cartesian/CartesianValue.d.ts +9 -0
- package/cartesian/CartesianValue.js +12 -0
- package/cartesian/CartesianValue.js.map +1 -0
- package/cartesian/ICartesianMeasureValue.d.ts +29 -0
- package/cartesian/ICartesianMeasureValue.js.map +1 -0
- package/cartesian/LatLng.d.ts +12 -0
- package/cartesian/LatLng.js +31 -0
- package/cartesian/LatLng.js.map +1 -0
- package/{cartesians → cartesian}/RadarCartesianMeasureValue.d.ts +8 -4
- package/cartesian/RadarCartesianMeasureValue.js +22 -0
- package/cartesian/RadarCartesianMeasureValue.js.map +1 -0
- package/{cartesians → cartesian}/RainCartesianMeasureValue.d.ts +9 -5
- package/cartesian/RainCartesianMeasureValue.js +25 -0
- package/cartesian/RainCartesianMeasureValue.js.map +1 -0
- package/gauge/GaugeMeasure.d.ts +20 -0
- package/gauge/GaugeMeasure.js +24 -0
- package/gauge/GaugeMeasure.js.map +1 -0
- package/gauge/GaugeNode.d.ts +24 -0
- package/gauge/GaugeNode.js +31 -0
- package/gauge/GaugeNode.js.map +1 -0
- package/{gauges → gauge}/GaugeNodeMap.d.ts +11 -3
- package/{gauges → gauge}/GaugeNodeMap.js +3 -10
- package/gauge/GaugeNodeMap.js.map +1 -0
- package/index.d.ts +39 -30
- package/index.js +39 -30
- package/index.js.map +1 -1
- package/{organizations → organization}/EventNode.d.ts +9 -1
- package/{organizations → organization}/EventNode.js +8 -8
- package/organization/EventNode.js.map +1 -0
- package/{organizations → organization}/IVersion.js.map +1 -1
- package/organization/Link.js.map +1 -0
- package/organization/Measure.d.ts +20 -0
- package/organization/Measure.js +35 -0
- package/organization/Measure.js.map +1 -0
- package/{organizations → organization}/PeopleNode.d.ts +8 -2
- package/organization/PeopleNode.js +26 -0
- package/organization/PeopleNode.js.map +1 -0
- package/{organizations → organization}/RaainNode.d.ts +7 -3
- package/{organizations → organization}/RaainNode.js +7 -18
- package/organization/RaainNode.js.map +1 -0
- package/organization/TeamNode.d.ts +22 -0
- package/organization/TeamNode.js +32 -0
- package/organization/TeamNode.js.map +1 -0
- package/package.json +10 -7
- package/{polars → polar}/AbstractPolarMeasureValue.d.ts +13 -3
- package/{polars → polar}/AbstractPolarMeasureValue.js +24 -19
- package/polar/AbstractPolarMeasureValue.js.map +1 -0
- package/{polars → polar}/GaugePolarMeasureValue.d.ts +3 -1
- package/{polars → polar}/GaugePolarMeasureValue.js +2 -2
- package/polar/GaugePolarMeasureValue.js.map +1 -0
- package/{polars → polar}/IPolarMeasureValue.d.ts +9 -2
- package/polar/IPolarMeasureValue.js.map +1 -0
- package/{polars → polar}/MeasureValuePolarContainer.d.ts +5 -1
- package/polar/MeasureValuePolarContainer.js +22 -0
- package/polar/MeasureValuePolarContainer.js.map +1 -0
- package/{polars → polar}/PolarMeasureValue.d.ts +13 -3
- package/{polars → polar}/PolarMeasureValue.js +22 -16
- package/polar/PolarMeasureValue.js.map +1 -0
- package/polar/PolarValue.d.ts +10 -0
- package/polar/PolarValue.js +12 -0
- package/polar/PolarValue.js.map +1 -0
- package/{polars → polar}/RadarPolarMeasureValue.d.ts +4 -1
- package/{polars → polar}/RadarPolarMeasureValue.js +8 -8
- package/polar/RadarPolarMeasureValue.js.map +1 -0
- package/{polars → polar}/RainPolarMeasureValue.d.ts +6 -2
- package/{polars → polar}/RainPolarMeasureValue.js +15 -5
- package/polar/RainPolarMeasureValue.js.map +1 -0
- package/quality/QualityPoint.d.ts +35 -0
- package/quality/QualityPoint.js +63 -0
- package/quality/QualityPoint.js.map +1 -0
- package/quality/SpeedMatrix.d.ts +79 -0
- package/quality/SpeedMatrix.js +251 -0
- package/quality/SpeedMatrix.js.map +1 -0
- package/quality/SpeedMatrixContainer.d.ts +76 -0
- package/quality/SpeedMatrixContainer.js +310 -0
- package/quality/SpeedMatrixContainer.js.map +1 -0
- package/quality/history/CartesianGaugeHistory.d.ts +15 -0
- package/quality/history/CartesianGaugeHistory.js +14 -0
- package/quality/history/CartesianGaugeHistory.js.map +1 -0
- package/quality/history/CartesianRainHistory.d.ts +11 -0
- package/quality/history/CartesianRainHistory.js +12 -0
- package/quality/history/CartesianRainHistory.js.map +1 -0
- package/quality/history/PositionHistory.d.ts +20 -0
- package/quality/history/PositionHistory.js +17 -0
- package/quality/history/PositionHistory.js.map +1 -0
- package/quality/position/Position.d.ts +22 -0
- package/quality/position/Position.js +50 -0
- package/quality/position/Position.js.map +1 -0
- package/quality/position/PositionValue.d.ts +9 -0
- package/quality/position/PositionValue.js +12 -0
- package/quality/position/PositionValue.js.map +1 -0
- package/quality/tools/QualityTools.d.ts +24 -0
- package/quality/tools/QualityTools.js +182 -0
- package/quality/tools/QualityTools.js.map +1 -0
- package/radar/RadarMeasure.d.ts +17 -0
- package/radar/RadarMeasure.js +18 -0
- package/radar/RadarMeasure.js.map +1 -0
- package/radar/RadarNode.d.ts +24 -0
- package/radar/RadarNode.js +31 -0
- package/radar/RadarNode.js.map +1 -0
- package/radar/RadarNodeMap.d.ts +28 -0
- package/{radars → radar}/RadarNodeMap.js +5 -12
- package/radar/RadarNodeMap.js.map +1 -0
- package/rain/RainComputation.d.ts +34 -0
- package/{rains → rain}/RainComputation.js +8 -13
- package/rain/RainComputation.js.map +1 -0
- package/{rains → rain}/RainComputationAbstract.d.ts +9 -10
- package/rain/RainComputationAbstract.js +102 -0
- package/rain/RainComputationAbstract.js.map +1 -0
- package/rain/RainComputationMap.d.ts +32 -0
- package/{rains → rain}/RainComputationMap.js +3 -8
- package/rain/RainComputationMap.js.map +1 -0
- package/{rains → rain}/RainComputationQuality.d.ts +21 -8
- package/{rains → rain}/RainComputationQuality.js +3 -8
- package/rain/RainComputationQuality.js.map +1 -0
- package/rain/RainMeasure.d.ts +18 -0
- package/rain/RainMeasure.js +19 -0
- package/rain/RainMeasure.js.map +1 -0
- package/rain/RainNode.d.ts +38 -0
- package/rain/RainNode.js +127 -0
- package/rain/RainNode.js.map +1 -0
- package/cartesians/CartesianMeasureValue.d.ts +0 -27
- package/cartesians/CartesianMeasureValue.js.map +0 -1
- package/cartesians/CartesianValue.d.ts +0 -6
- package/cartesians/CartesianValue.js +0 -12
- package/cartesians/CartesianValue.js.map +0 -1
- package/cartesians/ICartesianMeasureValue.d.ts +0 -17
- package/cartesians/ICartesianMeasureValue.js.map +0 -1
- package/cartesians/RadarCartesianMeasureValue.js +0 -37
- package/cartesians/RadarCartesianMeasureValue.js.map +0 -1
- package/cartesians/RainCartesianMeasureValue.js +0 -40
- package/cartesians/RainCartesianMeasureValue.js.map +0 -1
- package/gauges/GaugeMeasure.d.ts +0 -12
- package/gauges/GaugeMeasure.js +0 -31
- package/gauges/GaugeMeasure.js.map +0 -1
- package/gauges/GaugeNode.d.ts +0 -15
- package/gauges/GaugeNode.js +0 -37
- package/gauges/GaugeNode.js.map +0 -1
- package/gauges/GaugeNodeMap.js.map +0 -1
- package/organizations/EventNode.js.map +0 -1
- package/organizations/Link.js.map +0 -1
- package/organizations/Measure.d.ts +0 -12
- package/organizations/Measure.js +0 -29
- package/organizations/Measure.js.map +0 -1
- package/organizations/PeopleNode.js +0 -34
- package/organizations/PeopleNode.js.map +0 -1
- package/organizations/QualityPoint.d.ts +0 -17
- package/organizations/QualityPoint.js +0 -16
- package/organizations/QualityPoint.js.map +0 -1
- package/organizations/RaainNode.js.map +0 -1
- package/organizations/TeamNode.d.ts +0 -15
- package/organizations/TeamNode.js +0 -38
- package/organizations/TeamNode.js.map +0 -1
- package/polars/AbstractPolarMeasureValue.js.map +0 -1
- package/polars/GaugePolarMeasureValue.js.map +0 -1
- package/polars/IPolarMeasureValue.js.map +0 -1
- package/polars/MeasureValuePolarContainer.js +0 -28
- package/polars/MeasureValuePolarContainer.js.map +0 -1
- package/polars/PolarMeasureValue.js.map +0 -1
- package/polars/PolarValue.d.ts +0 -6
- package/polars/PolarValue.js +0 -12
- package/polars/PolarValue.js.map +0 -1
- package/polars/RadarPolarMeasureValue.js.map +0 -1
- package/polars/RainPolarMeasureValue.js.map +0 -1
- package/radars/RadarMeasure.d.ts +0 -11
- package/radars/RadarMeasure.js +0 -24
- package/radars/RadarMeasure.js.map +0 -1
- package/radars/RadarNode.d.ts +0 -14
- package/radars/RadarNode.js +0 -35
- package/radars/RadarNode.js.map +0 -1
- package/radars/RadarNodeMap.d.ts +0 -16
- package/radars/RadarNodeMap.js.map +0 -1
- package/rains/RainComputation.d.ts +0 -34
- package/rains/RainComputation.js.map +0 -1
- package/rains/RainComputationAbstract.js +0 -113
- package/rains/RainComputationAbstract.js.map +0 -1
- package/rains/RainComputationMap.d.ts +0 -16
- package/rains/RainComputationMap.js.map +0 -1
- package/rains/RainComputationQuality.js.map +0 -1
- package/rains/RainMeasure.d.ts +0 -12
- package/rains/RainMeasure.js +0 -25
- package/rains/RainMeasure.js.map +0 -1
- package/rains/RainNode.d.ts +0 -23
- package/rains/RainNode.js +0 -116
- package/rains/RainNode.js.map +0 -1
- /package/{cartesians → cartesian}/ICartesianMeasureValue.js +0 -0
- /package/{organizations → organization}/IVersion.d.ts +0 -0
- /package/{organizations → organization}/IVersion.js +0 -0
- /package/{organizations → organization}/Link.d.ts +0 -0
- /package/{organizations → organization}/Link.js +0 -0
- /package/{polars → polar}/IPolarMeasureValue.js +0 -0
package/index.js
CHANGED
|
@@ -14,34 +14,43 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./
|
|
27
|
-
__exportStar(require("./
|
|
28
|
-
__exportStar(require("./
|
|
29
|
-
__exportStar(require("./
|
|
30
|
-
__exportStar(require("./
|
|
31
|
-
__exportStar(require("./
|
|
32
|
-
__exportStar(require("./
|
|
33
|
-
__exportStar(require("./
|
|
34
|
-
__exportStar(require("./
|
|
35
|
-
__exportStar(require("./
|
|
36
|
-
__exportStar(require("./
|
|
37
|
-
__exportStar(require("./
|
|
38
|
-
__exportStar(require("./
|
|
39
|
-
__exportStar(require("./
|
|
40
|
-
__exportStar(require("./
|
|
41
|
-
__exportStar(require("./
|
|
42
|
-
__exportStar(require("./
|
|
43
|
-
__exportStar(require("./
|
|
44
|
-
__exportStar(require("./
|
|
45
|
-
__exportStar(require("./
|
|
46
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./organization/Measure"), exports);
|
|
18
|
+
__exportStar(require("./organization/EventNode"), exports);
|
|
19
|
+
__exportStar(require("./organization/PeopleNode"), exports);
|
|
20
|
+
__exportStar(require("./organization/Link"), exports);
|
|
21
|
+
__exportStar(require("./organization/RaainNode"), exports);
|
|
22
|
+
__exportStar(require("./organization/TeamNode"), exports);
|
|
23
|
+
__exportStar(require("./quality/QualityPoint"), exports);
|
|
24
|
+
__exportStar(require("./quality/SpeedMatrix"), exports);
|
|
25
|
+
__exportStar(require("./quality/SpeedMatrixContainer"), exports);
|
|
26
|
+
__exportStar(require("./quality/history/CartesianGaugeHistory"), exports);
|
|
27
|
+
__exportStar(require("./quality/history/CartesianRainHistory"), exports);
|
|
28
|
+
__exportStar(require("./quality/history/PositionHistory"), exports);
|
|
29
|
+
__exportStar(require("./quality/tools/QualityTools"), exports);
|
|
30
|
+
__exportStar(require("./cartesian/LatLng"), exports);
|
|
31
|
+
__exportStar(require("./quality/position/Position"), exports);
|
|
32
|
+
__exportStar(require("./quality/position/PositionValue"), exports);
|
|
33
|
+
__exportStar(require("./gauge/GaugeNode"), exports);
|
|
34
|
+
__exportStar(require("./gauge/GaugeMeasure"), exports);
|
|
35
|
+
__exportStar(require("./gauge/GaugeNodeMap"), exports);
|
|
36
|
+
__exportStar(require("./radar/RadarMeasure"), exports);
|
|
37
|
+
__exportStar(require("./radar/RadarNodeMap"), exports);
|
|
38
|
+
__exportStar(require("./radar/RadarNode"), exports);
|
|
39
|
+
__exportStar(require("./rain/RainMeasure"), exports);
|
|
40
|
+
__exportStar(require("./rain/RainNode"), exports);
|
|
41
|
+
__exportStar(require("./rain/RainComputationQuality"), exports);
|
|
42
|
+
__exportStar(require("./rain/RainComputation"), exports);
|
|
43
|
+
__exportStar(require("./rain/RainComputationMap"), exports);
|
|
44
|
+
__exportStar(require("./polar/GaugePolarMeasureValue"), exports);
|
|
45
|
+
__exportStar(require("./polar/MeasureValuePolarContainer"), exports);
|
|
46
|
+
__exportStar(require("./polar/PolarMeasureValue"), exports);
|
|
47
|
+
__exportStar(require("./polar/PolarValue"), exports);
|
|
48
|
+
__exportStar(require("./polar/RadarPolarMeasureValue"), exports);
|
|
49
|
+
__exportStar(require("./polar/RainPolarMeasureValue"), exports);
|
|
50
|
+
__exportStar(require("./polar/IPolarMeasureValue"), exports);
|
|
51
|
+
__exportStar(require("./cartesian/CartesianValue"), exports);
|
|
52
|
+
__exportStar(require("./cartesian/CartesianMeasureValue"), exports);
|
|
53
|
+
__exportStar(require("./cartesian/RadarCartesianMeasureValue"), exports);
|
|
54
|
+
__exportStar(require("./cartesian/RainCartesianMeasureValue"), exports);
|
|
55
|
+
__exportStar(require("./cartesian/ICartesianMeasureValue"), exports);
|
|
47
56
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,2DAAyC;AACzC,4DAA0C;AAC1C,sDAAoC;AACpC,2DAAyC;AACzC,0DAAwC;AAExC,yDAAuC;AACvC,wDAAsC;AACtC,iEAA+C;AAC/C,0EAAwD;AACxD,yEAAuD;AACvD,oEAAkD;AAClD,+DAA6C;AAC7C,qDAAmC;AACnC,8DAA4C;AAC5C,mEAAiD;AAEjD,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AAErC,uDAAqC;AACrC,uDAAqC;AACrC,oDAAkC;AAElC,qDAAmC;AACnC,kDAAgC;AAChC,gEAA8C;AAC9C,yDAAuC;AACvC,4DAA0C;AAE1C,iEAA+C;AAC/C,qEAAmD;AACnD,4DAA0C;AAC1C,qDAAmC;AACnC,iEAA+C;AAC/C,gEAA8C;AAC9C,6DAA2C;AAE3C,6DAA2C;AAC3C,oEAAkD;AAClD,yEAAuD;AACvD,wEAAsD;AACtD,qEAAmD"}
|
|
@@ -9,6 +9,14 @@ export declare class EventNode {
|
|
|
9
9
|
description: string;
|
|
10
10
|
created: Date;
|
|
11
11
|
modified: Date;
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(json: {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
status: number;
|
|
16
|
+
red: boolean;
|
|
17
|
+
description: string;
|
|
18
|
+
created: Date;
|
|
19
|
+
modified: Date;
|
|
20
|
+
});
|
|
13
21
|
toJSON(): JSON;
|
|
14
22
|
}
|
|
@@ -5,14 +5,14 @@ exports.EventNode = void 0;
|
|
|
5
5
|
* api/notifications/:id
|
|
6
6
|
*/
|
|
7
7
|
class EventNode {
|
|
8
|
-
constructor(
|
|
9
|
-
this.id = id;
|
|
10
|
-
this.title = title;
|
|
11
|
-
this.status = status;
|
|
12
|
-
this.red = red;
|
|
13
|
-
this.description = description;
|
|
14
|
-
this.created = created;
|
|
15
|
-
this.modified = modified;
|
|
8
|
+
constructor(json) {
|
|
9
|
+
this.id = json.id;
|
|
10
|
+
this.title = json.title;
|
|
11
|
+
this.status = json.status;
|
|
12
|
+
this.red = json.red;
|
|
13
|
+
this.description = json.description;
|
|
14
|
+
this.created = json.created;
|
|
15
|
+
this.modified = json.modified;
|
|
16
16
|
}
|
|
17
17
|
toJSON() {
|
|
18
18
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventNode.js","sourceRoot":"","sources":["../../src/organization/EventNode.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,SAAS;IASlB,YAAY,IAQC;QAET,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAClC,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;CACJ;AAvCD,8BAuCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IVersion.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"IVersion.js","sourceRoot":"","sources":["../../src/organization/IVersion.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/organization/Link.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,MAAa,IAAI;IACb,YACW,GAAW,EACX,IAAY;QADZ,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAQ;IAEvB,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,MAAW;QACjC,OAAO,MAAM,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC;IAC/C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAW;QAC3B,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK;QACR,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,+CAA+C;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC;IAEM,WAAW;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,+CAA+C;QAC/C,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;CACJ;AA1BD,oBA0BC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IPolarMeasureValue } from '../polar/IPolarMeasureValue';
|
|
2
|
+
import { RaainNode } from './RaainNode';
|
|
3
|
+
import { ICartesianMeasureValue } from '../cartesian/ICartesianMeasureValue';
|
|
4
|
+
export declare class Measure extends RaainNode {
|
|
5
|
+
date: Date;
|
|
6
|
+
values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[];
|
|
7
|
+
validity: number;
|
|
8
|
+
private configurationAsJSON;
|
|
9
|
+
constructor(json: {
|
|
10
|
+
id: string;
|
|
11
|
+
values: IPolarMeasureValue[] | ICartesianMeasureValue[] | Measure[] | number[];
|
|
12
|
+
date?: Date;
|
|
13
|
+
validity?: number;
|
|
14
|
+
configurationAsJSON?: string | any;
|
|
15
|
+
});
|
|
16
|
+
setConfiguration(configuration: string | any): void;
|
|
17
|
+
toJSON(options?: {
|
|
18
|
+
removeValues?: boolean;
|
|
19
|
+
}): JSON;
|
|
20
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Measure = void 0;
|
|
4
|
+
const RaainNode_1 = require("./RaainNode");
|
|
5
|
+
class Measure extends RaainNode_1.RaainNode {
|
|
6
|
+
constructor(json) {
|
|
7
|
+
super(json);
|
|
8
|
+
this.values = json.values ? json.values : [];
|
|
9
|
+
this.date = json.date ? new Date(json.date) : undefined;
|
|
10
|
+
this.validity = json.validity >= 0 ? json.validity : -1;
|
|
11
|
+
this.setConfiguration(json.configurationAsJSON);
|
|
12
|
+
}
|
|
13
|
+
setConfiguration(configuration) {
|
|
14
|
+
let conf = configuration;
|
|
15
|
+
try {
|
|
16
|
+
conf = JSON.parse(configuration);
|
|
17
|
+
}
|
|
18
|
+
catch (ignored) {
|
|
19
|
+
}
|
|
20
|
+
this.configurationAsJSON = JSON.stringify(conf);
|
|
21
|
+
}
|
|
22
|
+
toJSON(options = {}) {
|
|
23
|
+
var _a;
|
|
24
|
+
const json = super.toJSON();
|
|
25
|
+
json['date'] = (_a = this.date) === null || _a === void 0 ? void 0 : _a.toISOString();
|
|
26
|
+
json['validity'] = this.validity;
|
|
27
|
+
json['configurationAsJSON'] = this.configurationAsJSON;
|
|
28
|
+
if (!(options === null || options === void 0 ? void 0 : options.removeValues)) {
|
|
29
|
+
json['values'] = this.values;
|
|
30
|
+
}
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Measure = Measure;
|
|
35
|
+
//# sourceMappingURL=Measure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Measure.js","sourceRoot":"","sources":["../../src/organization/Measure.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAGtC,MAAa,OAAQ,SAAQ,qBAAS;IAQlC,YAAY,IAMC;QAET,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACxD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAEM,gBAAgB,CAAC,aAA2B;QAC/C,IAAI,IAAI,GAAG,aAAa,CAAC;QACzB,IAAI;YACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SACpC;QAAC,OAAO,OAAO,EAAE;SACjB;QAED,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAEM,MAAM,CAAC,UAAsC,EAAE;;QAClD,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,MAAA,IAAI,CAAC,IAAI,0CAAE,WAAW,EAAE,CAAC;QACxC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAEvD,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAA,EAAE;YACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA5CD,0BA4CC"}
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
* api/teams/:id => contacts
|
|
3
3
|
*/
|
|
4
4
|
export declare class PeopleNode {
|
|
5
|
-
id:
|
|
5
|
+
id: string;
|
|
6
6
|
role: string;
|
|
7
7
|
email: string;
|
|
8
8
|
name: string;
|
|
9
9
|
comments: string;
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(json: {
|
|
11
|
+
id: string;
|
|
12
|
+
role: string;
|
|
13
|
+
email: string;
|
|
14
|
+
name: string;
|
|
15
|
+
comments: string;
|
|
16
|
+
});
|
|
11
17
|
toJSON(): JSON;
|
|
12
18
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PeopleNode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* api/teams/:id => contacts
|
|
6
|
+
*/
|
|
7
|
+
class PeopleNode {
|
|
8
|
+
constructor(json) {
|
|
9
|
+
this.id = json.id;
|
|
10
|
+
this.role = json.role;
|
|
11
|
+
this.email = json.email;
|
|
12
|
+
this.name = json.name;
|
|
13
|
+
this.comments = json.comments;
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
id: this.id,
|
|
18
|
+
role: this.role,
|
|
19
|
+
email: this.email,
|
|
20
|
+
name: this.name,
|
|
21
|
+
comments: this.comments,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.PeopleNode = PeopleNode;
|
|
26
|
+
//# sourceMappingURL=PeopleNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeopleNode.js","sourceRoot":"","sources":["../../src/organization/PeopleNode.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,UAAU;IAQnB,YAAY,IAMC;QAET,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAClC,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;CACJ;AAhCD,gCAgCC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Link } from './Link';
|
|
2
2
|
import { IVersion } from './IVersion';
|
|
3
3
|
export declare class RaainNode implements IVersion {
|
|
4
|
-
id: string;
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly version: string;
|
|
5
6
|
private links;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
constructor(json: {
|
|
8
|
+
id: string;
|
|
9
|
+
links?: Link[] | RaainNode[];
|
|
10
|
+
version?: string;
|
|
11
|
+
});
|
|
8
12
|
private static _getPurifiedLinks;
|
|
9
13
|
toJSON(): JSON;
|
|
10
14
|
getId(): string;
|
|
@@ -3,23 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RaainNode = void 0;
|
|
4
4
|
const Link_1 = require("./Link");
|
|
5
5
|
class RaainNode {
|
|
6
|
-
constructor(
|
|
7
|
-
if (!
|
|
6
|
+
constructor(json) {
|
|
7
|
+
if (!(json === null || json === void 0 ? void 0 : json.id)) {
|
|
8
8
|
throw new Error('RaainNode needs a valid Object or ID');
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.setLinks(idOrObjectToCopy.links);
|
|
14
|
-
this.version = idOrObjectToCopy.version ? idOrObjectToCopy.version : undefined;
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
if (typeof idOrObjectToCopy === 'string') {
|
|
19
|
-
this.id = idOrObjectToCopy;
|
|
20
|
-
}
|
|
21
|
-
this.version = version ? version : undefined;
|
|
22
|
-
this.setLinks(links);
|
|
10
|
+
this.id = json.id;
|
|
11
|
+
this.setLinks(json.links ? json.links : []);
|
|
12
|
+
this.version = json.version ? json.version : undefined;
|
|
23
13
|
}
|
|
24
14
|
static _getPurifiedLinks(linksToPurify) {
|
|
25
15
|
if (!linksToPurify || linksToPurify.length === 0) {
|
|
@@ -35,7 +25,7 @@ class RaainNode {
|
|
|
35
25
|
});
|
|
36
26
|
function uniqBy(a, key) {
|
|
37
27
|
const seen = {};
|
|
38
|
-
return a.filter(
|
|
28
|
+
return a.filter((item) => {
|
|
39
29
|
if (!item) {
|
|
40
30
|
return false;
|
|
41
31
|
}
|
|
@@ -43,8 +33,7 @@ class RaainNode {
|
|
|
43
33
|
return seen.hasOwnProperty(k) ? false : (seen[k] = true);
|
|
44
34
|
});
|
|
45
35
|
}
|
|
46
|
-
|
|
47
|
-
return finalLinks;
|
|
36
|
+
return uniqBy(linksPurified, JSON.stringify);
|
|
48
37
|
}
|
|
49
38
|
toJSON() {
|
|
50
39
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RaainNode.js","sourceRoot":"","sources":["../../src/organization/RaainN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
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PeopleNode } from './PeopleNode';
|
|
2
|
+
import { RaainNode } from './RaainNode';
|
|
3
|
+
/**
|
|
4
|
+
* api/teams?name=customerTeam
|
|
5
|
+
*/
|
|
6
|
+
export declare class TeamNode extends RaainNode {
|
|
7
|
+
static TYPE: string;
|
|
8
|
+
id: any | string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
contracts: string[];
|
|
12
|
+
contacts: PeopleNode[];
|
|
13
|
+
constructor(json: {
|
|
14
|
+
id: any | string;
|
|
15
|
+
name?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
contracts?: string[];
|
|
18
|
+
contacts?: PeopleNode[];
|
|
19
|
+
});
|
|
20
|
+
toJSON(): JSON;
|
|
21
|
+
protected getLinkType(): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamNode = void 0;
|
|
4
|
+
const RaainNode_1 = require("./RaainNode");
|
|
5
|
+
/**
|
|
6
|
+
* api/teams?name=customerTeam
|
|
7
|
+
*/
|
|
8
|
+
class TeamNode extends RaainNode_1.RaainNode {
|
|
9
|
+
constructor(json) {
|
|
10
|
+
super(json);
|
|
11
|
+
this.id = json.id;
|
|
12
|
+
this.name = json.name;
|
|
13
|
+
this.description = json.description;
|
|
14
|
+
this.contracts = json.contracts;
|
|
15
|
+
this.contacts = json.contacts;
|
|
16
|
+
}
|
|
17
|
+
toJSON() {
|
|
18
|
+
return {
|
|
19
|
+
id: this.id,
|
|
20
|
+
name: this.name,
|
|
21
|
+
description: this.description,
|
|
22
|
+
contracts: this.contracts,
|
|
23
|
+
contacts: this.contacts,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
getLinkType() {
|
|
27
|
+
return TeamNode.TYPE;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
TeamNode.TYPE = 'team';
|
|
31
|
+
exports.TeamNode = TeamNode;
|
|
32
|
+
//# sourceMappingURL=TeamNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamNode.js","sourceRoot":"","sources":["../../src/organization/TeamNode.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAEtC;;GAEG;AACH,MAAa,QAAS,SAAQ,qBAAS;IAUnC,YAAY,IAMX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAClC,CAAC;IAEM,MAAM;QACT,OAAO;YACH,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACnB,CAAC;IACb,CAAC;IAES,WAAW;QACjB,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;;AApCa,aAAI,GAAG,MAAM,CAAC;AAFnB,4BAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raain-model",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.10.25",
|
|
4
4
|
"author": "contact@raain.io",
|
|
5
5
|
"homepage": "https://github.com/raainio/raain-model",
|
|
6
6
|
"description": "raain.io api model",
|
|
@@ -15,17 +15,20 @@
|
|
|
15
15
|
"dependencies": {},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"assert": "^2.0.0",
|
|
18
|
-
"chai": "^4.
|
|
18
|
+
"@types/chai": "^4.3.10",
|
|
19
|
+
"@types/mocha": "^10.0.1",
|
|
20
|
+
"@types/node": "^20.8.8",
|
|
21
|
+
"chai": "^4.3.10",
|
|
19
22
|
"chai-as-promised": "^7.1.1",
|
|
20
|
-
"chai-spies": "^1.
|
|
21
|
-
"mocha": "^10.
|
|
23
|
+
"chai-spies": "^1.1.0",
|
|
24
|
+
"mocha": "^10.2.0",
|
|
25
|
+
"mocha-typescript": "^1.1.17",
|
|
22
26
|
"ts-node": "^8.10.2",
|
|
23
27
|
"tslint": "^6.1.3",
|
|
24
28
|
"typescript": "^5.0.4"
|
|
25
29
|
},
|
|
26
30
|
"scripts": {
|
|
27
|
-
"build": "rm -rf dist/ && npx tsc && cp package.json dist/ && cp *.md dist/",
|
|
28
|
-
"test": "
|
|
29
|
-
"test-example": "ts-node examples/creation.example.ts"
|
|
31
|
+
"build": "rm -rf dist/ && npm version patch --no-git-tag-version && npx tsc && cp package.json dist/ && cp *.md dist/",
|
|
32
|
+
"test": "mocha --require ts-node/register 'specs/**/**.spec.ts'"
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -4,13 +4,23 @@ import { PolarMeasureValue } from './PolarMeasureValue';
|
|
|
4
4
|
import { PolarValue } from './PolarValue';
|
|
5
5
|
export declare class AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
6
6
|
protected polars: PolarMeasureValue;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(json: {
|
|
8
|
+
polars: AbstractPolarMeasureValue | PolarMeasureValue | string;
|
|
9
|
+
});
|
|
8
10
|
getPolarsStringified(): string;
|
|
9
11
|
getPolars(): MeasureValuePolarContainer[];
|
|
10
12
|
setPolarsAsString(s: string): void;
|
|
11
13
|
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
12
|
-
getPolarValue(
|
|
13
|
-
|
|
14
|
+
getPolarValue(json: {
|
|
15
|
+
azimuthIndex: number;
|
|
16
|
+
edgeIndex: number;
|
|
17
|
+
strict?: boolean;
|
|
18
|
+
}): PolarValue;
|
|
19
|
+
setPolarValue(json: {
|
|
20
|
+
azimuthIndex: number;
|
|
21
|
+
edgeIndex: number;
|
|
22
|
+
value: number;
|
|
23
|
+
}): void;
|
|
14
24
|
getAzimuthsCount(): number;
|
|
15
25
|
getPolarEdgesCount(): number;
|
|
16
26
|
getDistance(): number;
|
|
@@ -3,35 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbstractPolarMeasureValue = void 0;
|
|
4
4
|
const PolarMeasureValue_1 = require("./PolarMeasureValue");
|
|
5
5
|
class AbstractPolarMeasureValue {
|
|
6
|
-
constructor(
|
|
7
|
-
if (!polars) {
|
|
6
|
+
constructor(json) {
|
|
7
|
+
if (!(json === null || json === void 0 ? void 0 : json.polars)) {
|
|
8
8
|
throw new Error('PolarMeasureValue needs polars');
|
|
9
9
|
}
|
|
10
|
+
let polars = json.polars;
|
|
10
11
|
if (typeof polars === 'string') {
|
|
11
12
|
if (polars.indexOf('polars') > 0) {
|
|
12
|
-
|
|
13
|
-
if (polarsObject.polars && typeof polarsObject.polars === 'string') {
|
|
14
|
-
this.setPolarsAsString(polarsObject.polars);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
this.setPolarsAsContainer(polarsObject.polars);
|
|
18
|
-
}
|
|
13
|
+
polars = JSON.parse(polars);
|
|
19
14
|
}
|
|
20
15
|
else {
|
|
21
16
|
this.setPolarsAsString(polars);
|
|
17
|
+
return;
|
|
22
18
|
}
|
|
19
|
+
}
|
|
20
|
+
if (polars instanceof PolarMeasureValue_1.PolarMeasureValue) {
|
|
21
|
+
this.setPolarsAsContainer(polars.getPolars());
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
24
|
+
if (polars && polars['polars']) {
|
|
25
|
+
polars = polars['polars'];
|
|
26
|
+
}
|
|
25
27
|
if (polars instanceof PolarMeasureValue_1.PolarMeasureValue) {
|
|
26
28
|
this.setPolarsAsContainer(polars.getPolars());
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
if (polars
|
|
30
|
-
this.
|
|
31
|
+
if (typeof polars === 'string') {
|
|
32
|
+
this.setPolarsAsString(polars);
|
|
33
|
+
return;
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
this.
|
|
35
|
+
if (Array.isArray(polars)) {
|
|
36
|
+
this.setPolarsAsContainer(polars);
|
|
37
|
+
return;
|
|
34
38
|
}
|
|
39
|
+
throw new Error('PolarMeasureValue needs valid typed polars');
|
|
35
40
|
}
|
|
36
41
|
getPolarsStringified() {
|
|
37
42
|
return this.polars.getPolarsStringified();
|
|
@@ -40,16 +45,16 @@ class AbstractPolarMeasureValue {
|
|
|
40
45
|
return this.polars.getPolars();
|
|
41
46
|
}
|
|
42
47
|
setPolarsAsString(s) {
|
|
43
|
-
this.polars = new PolarMeasureValue_1.PolarMeasureValue(s);
|
|
48
|
+
this.polars = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers: s });
|
|
44
49
|
}
|
|
45
50
|
setPolarsAsContainer(s) {
|
|
46
|
-
this.polars = new PolarMeasureValue_1.PolarMeasureValue(s);
|
|
51
|
+
this.polars = new PolarMeasureValue_1.PolarMeasureValue({ measureValuePolarContainers: s });
|
|
47
52
|
}
|
|
48
|
-
getPolarValue(
|
|
49
|
-
return this.polars.getPolarValue(
|
|
53
|
+
getPolarValue(json) {
|
|
54
|
+
return this.polars.getPolarValue(json);
|
|
50
55
|
}
|
|
51
|
-
setPolarValue(
|
|
52
|
-
return this.polars.setPolarValue(
|
|
56
|
+
setPolarValue(json) {
|
|
57
|
+
return this.polars.setPolarValue(json);
|
|
53
58
|
}
|
|
54
59
|
getAzimuthsCount() {
|
|
55
60
|
return this.polars.getPolars().length;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/AbstractPolarMeasureValue.ts"],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E;YACX,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;SACrD;QAED,MAAM,IAAI,GAAQ;YACd,MAAM;SACT,CAAC;QACF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,0BAA0B;QAC7B,MAAM,IAAI,GAAQ,IAAI,CAAC,MAAM,CAAC,0BAA0B,EAAE,CAAC;QAC3D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA7GD,8DA6GC"}
|
|
@@ -5,5 +5,7 @@ import { PolarMeasureValue } from './PolarMeasureValue';
|
|
|
5
5
|
* Gauge with single polar value container
|
|
6
6
|
*/
|
|
7
7
|
export declare class GaugePolarMeasureValue extends AbstractPolarMeasureValue implements IPolarMeasureValue {
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(json: {
|
|
9
|
+
polars: string | PolarMeasureValue | AbstractPolarMeasureValue;
|
|
10
|
+
});
|
|
9
11
|
}
|
|
@@ -6,8 +6,8 @@ const AbstractPolarMeasureValue_1 = require("./AbstractPolarMeasureValue");
|
|
|
6
6
|
* Gauge with single polar value container
|
|
7
7
|
*/
|
|
8
8
|
class GaugePolarMeasureValue extends AbstractPolarMeasureValue_1.AbstractPolarMeasureValue {
|
|
9
|
-
constructor(
|
|
10
|
-
super(
|
|
9
|
+
constructor(json) {
|
|
10
|
+
super(json);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.GaugePolarMeasureValue = GaugePolarMeasureValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GaugePolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/GaugePolarMeasureValue.ts"],"names":[],"mappings":";;;AACA,2EAAsE;AAGtE;;GAEG;AACH,MAAa,sBAAuB,SAAQ,qDAAyB;IAEjE,YAAY,IAEX;QACG,KAAK,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;CACJ;AAPD,wDAOC"}
|
|
@@ -7,6 +7,13 @@ export interface IPolarMeasureValue {
|
|
|
7
7
|
setPolarsAsContainer(s: MeasureValuePolarContainer[]): void;
|
|
8
8
|
toJSON(): JSON;
|
|
9
9
|
toJSONWithPolarStringified(): JSON;
|
|
10
|
-
getPolarValue(
|
|
11
|
-
|
|
10
|
+
getPolarValue(json: {
|
|
11
|
+
azimuthIndex: number;
|
|
12
|
+
edgeIndex: number;
|
|
13
|
+
}): PolarValue;
|
|
14
|
+
setPolarValue(json: {
|
|
15
|
+
azimuthIndex: number;
|
|
16
|
+
edgeIndex: number;
|
|
17
|
+
value: number;
|
|
18
|
+
}): void;
|
|
12
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPolarMeasureValue.js","sourceRoot":"","sources":["../../src/polar/IPolarMeasureValue.ts"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,10 @@ export declare class MeasureValuePolarContainer {
|
|
|
2
2
|
azimuth: number;
|
|
3
3
|
distance: number;
|
|
4
4
|
polarEdges: number[];
|
|
5
|
-
constructor(
|
|
5
|
+
constructor(json: {
|
|
6
|
+
azimuth: number;
|
|
7
|
+
distance: number;
|
|
8
|
+
polarEdges: number[];
|
|
9
|
+
});
|
|
6
10
|
toJSON(): JSON;
|
|
7
11
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeasureValuePolarContainer = void 0;
|
|
4
|
+
class MeasureValuePolarContainer {
|
|
5
|
+
constructor(json) {
|
|
6
|
+
if (typeof (json === null || json === void 0 ? void 0 : json.azimuth) === 'undefined') {
|
|
7
|
+
throw new Error('MeasureValuePolarContainer needs a valid Object');
|
|
8
|
+
}
|
|
9
|
+
this.azimuth = json.azimuth;
|
|
10
|
+
this.distance = json.distance;
|
|
11
|
+
this.polarEdges = json.polarEdges;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return {
|
|
15
|
+
azimuth: this.azimuth,
|
|
16
|
+
distance: this.distance,
|
|
17
|
+
polarEdges: this.polarEdges,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MeasureValuePolarContainer = MeasureValuePolarContainer;
|
|
22
|
+
//# sourceMappingURL=MeasureValuePolarContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MeasureValuePolarContainer.js","sourceRoot":"","sources":["../../src/polar/MeasureValuePolarContainer.ts"],"names":[],"mappings":";;;AAAA,MAAa,0BAA0B;IAKnC,YAAY,IAIX;QAEG,IAAI,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAA,KAAK,WAAW,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,CAAC;IAEM,MAAM;QACT,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;SACvB,CAAC;IACb,CAAC;CACJ;AA3BD,gEA2BC"}
|