@mikw99/node-emberplus-custom 1.0.5

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.
Files changed (210) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/lib/ber.d.ts +42 -0
  4. package/lib/ber.js +237 -0
  5. package/lib/ber.js.map +1 -0
  6. package/lib/client/ember-client-logs.d.ts +4 -0
  7. package/lib/client/ember-client-logs.js +214 -0
  8. package/lib/client/ember-client-logs.js.map +1 -0
  9. package/lib/client/ember-client.d.ts +62 -0
  10. package/lib/client/ember-client.events.d.ts +8 -0
  11. package/lib/client/ember-client.events.js +12 -0
  12. package/lib/client/ember-client.events.js.map +1 -0
  13. package/lib/client/ember-client.js +678 -0
  14. package/lib/client/ember-client.js.map +1 -0
  15. package/lib/client/ember-client.request.d.ts +12 -0
  16. package/lib/client/ember-client.request.js +22 -0
  17. package/lib/client/ember-client.request.js.map +1 -0
  18. package/lib/common/command.d.ts +37 -0
  19. package/lib/common/command.js +95 -0
  20. package/lib/common/command.js.map +1 -0
  21. package/lib/common/common.d.ts +71 -0
  22. package/lib/common/common.js +310 -0
  23. package/lib/common/common.js.map +1 -0
  24. package/lib/common/constants.d.ts +10 -0
  25. package/lib/common/constants.js +13 -0
  26. package/lib/common/constants.js.map +1 -0
  27. package/lib/common/element.base.d.ts +13 -0
  28. package/lib/common/element.base.js +36 -0
  29. package/lib/common/element.base.js.map +1 -0
  30. package/lib/common/element.d.ts +6 -0
  31. package/lib/common/element.js +23 -0
  32. package/lib/common/element.js.map +1 -0
  33. package/lib/common/function/function-argument.d.ts +26 -0
  34. package/lib/common/function/function-argument.js +75 -0
  35. package/lib/common/function/function-argument.js.map +1 -0
  36. package/lib/common/function/function-contents.d.ts +30 -0
  37. package/lib/common/function/function-contents.js +138 -0
  38. package/lib/common/function/function-contents.js.map +1 -0
  39. package/lib/common/function/function.d.ts +31 -0
  40. package/lib/common/function/function.js +75 -0
  41. package/lib/common/function/function.js.map +1 -0
  42. package/lib/common/function/qualified-function.d.ts +19 -0
  43. package/lib/common/function/qualified-function.js +73 -0
  44. package/lib/common/function/qualified-function.js.map +1 -0
  45. package/lib/common/invocation-result.d.ts +23 -0
  46. package/lib/common/invocation-result.js +101 -0
  47. package/lib/common/invocation-result.js.map +1 -0
  48. package/lib/common/invocation.d.ts +20 -0
  49. package/lib/common/invocation.js +73 -0
  50. package/lib/common/invocation.js.map +1 -0
  51. package/lib/common/label.d.ts +14 -0
  52. package/lib/common/label.js +55 -0
  53. package/lib/common/label.js.map +1 -0
  54. package/lib/common/matrix/matrix-connection.d.ts +26 -0
  55. package/lib/common/matrix/matrix-connection.js +123 -0
  56. package/lib/common/matrix/matrix-connection.js.map +1 -0
  57. package/lib/common/matrix/matrix-contents.d.ts +38 -0
  58. package/lib/common/matrix/matrix-contents.js +173 -0
  59. package/lib/common/matrix/matrix-contents.js.map +1 -0
  60. package/lib/common/matrix/matrix-disposition.d.ts +9 -0
  61. package/lib/common/matrix/matrix-disposition.js +14 -0
  62. package/lib/common/matrix/matrix-disposition.js.map +1 -0
  63. package/lib/common/matrix/matrix-mode.d.ts +8 -0
  64. package/lib/common/matrix/matrix-mode.js +23 -0
  65. package/lib/common/matrix/matrix-mode.js.map +1 -0
  66. package/lib/common/matrix/matrix-node.d.ts +13 -0
  67. package/lib/common/matrix/matrix-node.js +90 -0
  68. package/lib/common/matrix/matrix-node.js.map +1 -0
  69. package/lib/common/matrix/matrix-operation.d.ts +8 -0
  70. package/lib/common/matrix/matrix-operation.js +13 -0
  71. package/lib/common/matrix/matrix-operation.js.map +1 -0
  72. package/lib/common/matrix/matrix-type.d.ts +9 -0
  73. package/lib/common/matrix/matrix-type.js +24 -0
  74. package/lib/common/matrix/matrix-type.js.map +1 -0
  75. package/lib/common/matrix/matrix.d.ts +91 -0
  76. package/lib/common/matrix/matrix.js +429 -0
  77. package/lib/common/matrix/matrix.js.map +1 -0
  78. package/lib/common/matrix/qualified-matrix.d.ts +17 -0
  79. package/lib/common/matrix/qualified-matrix.js +97 -0
  80. package/lib/common/matrix/qualified-matrix.js.map +1 -0
  81. package/lib/common/node-contents.d.ts +24 -0
  82. package/lib/common/node-contents.js +87 -0
  83. package/lib/common/node-contents.js.map +1 -0
  84. package/lib/common/node.d.ts +27 -0
  85. package/lib/common/node.js +67 -0
  86. package/lib/common/node.js.map +1 -0
  87. package/lib/common/parameter-access.d.ts +10 -0
  88. package/lib/common/parameter-access.js +25 -0
  89. package/lib/common/parameter-access.js.map +1 -0
  90. package/lib/common/parameter-contents.d.ts +55 -0
  91. package/lib/common/parameter-contents.js +167 -0
  92. package/lib/common/parameter-contents.js.map +1 -0
  93. package/lib/common/parameter-type.d.ts +15 -0
  94. package/lib/common/parameter-type.js +54 -0
  95. package/lib/common/parameter-type.js.map +1 -0
  96. package/lib/common/parameter.d.ts +76 -0
  97. package/lib/common/parameter.js +174 -0
  98. package/lib/common/parameter.js.map +1 -0
  99. package/lib/common/qualified-element.d.ts +10 -0
  100. package/lib/common/qualified-element.js +36 -0
  101. package/lib/common/qualified-element.js.map +1 -0
  102. package/lib/common/qualified-node.d.ts +16 -0
  103. package/lib/common/qualified-node.js +67 -0
  104. package/lib/common/qualified-node.js.map +1 -0
  105. package/lib/common/qualified-parameter.d.ts +52 -0
  106. package/lib/common/qualified-parameter.js +177 -0
  107. package/lib/common/qualified-parameter.js.map +1 -0
  108. package/lib/common/qualified-template.d.ts +17 -0
  109. package/lib/common/qualified-template.js +58 -0
  110. package/lib/common/qualified-template.js.map +1 -0
  111. package/lib/common/stream/stream-collection.d.ts +20 -0
  112. package/lib/common/stream/stream-collection.js +57 -0
  113. package/lib/common/stream/stream-collection.js.map +1 -0
  114. package/lib/common/stream/stream-description.d.ts +15 -0
  115. package/lib/common/stream/stream-description.js +45 -0
  116. package/lib/common/stream/stream-description.js.map +1 -0
  117. package/lib/common/stream/stream-entry.d.ts +15 -0
  118. package/lib/common/stream/stream-entry.js +49 -0
  119. package/lib/common/stream/stream-entry.js.map +1 -0
  120. package/lib/common/stream/stream-format.d.ts +23 -0
  121. package/lib/common/stream/stream-format.js +28 -0
  122. package/lib/common/stream/stream-format.js.map +1 -0
  123. package/lib/common/string-integer-collection.d.ts +12 -0
  124. package/lib/common/string-integer-collection.js +51 -0
  125. package/lib/common/string-integer-collection.js.map +1 -0
  126. package/lib/common/string-integer-pair.d.ts +18 -0
  127. package/lib/common/string-integer-pair.js +67 -0
  128. package/lib/common/string-integer-pair.js.map +1 -0
  129. package/lib/common/template-element.d.ts +12 -0
  130. package/lib/common/template-element.js +53 -0
  131. package/lib/common/template-element.js.map +1 -0
  132. package/lib/common/template.d.ts +16 -0
  133. package/lib/common/template.js +58 -0
  134. package/lib/common/template.js.map +1 -0
  135. package/lib/common/tree-node.d.ts +85 -0
  136. package/lib/common/tree-node.js +461 -0
  137. package/lib/common/tree-node.js.map +1 -0
  138. package/lib/error/errors.d.ts +57 -0
  139. package/lib/error/errors.js +150 -0
  140. package/lib/error/errors.js.map +1 -0
  141. package/lib/fixture/utils.d.ts +7 -0
  142. package/lib/fixture/utils.js +185 -0
  143. package/lib/fixture/utils.js.map +1 -0
  144. package/lib/index.d.ts +41 -0
  145. package/lib/index.js +15 -0
  146. package/lib/index.js.map +1 -0
  147. package/lib/logging/logging.service.d.ts +45 -0
  148. package/lib/logging/logging.service.js +110 -0
  149. package/lib/logging/logging.service.js.map +1 -0
  150. package/lib/server/client-request.d.ts +9 -0
  151. package/lib/server/client-request.js +10 -0
  152. package/lib/server/client-request.js.map +1 -0
  153. package/lib/server/element-handlers.d.ts +20 -0
  154. package/lib/server/element-handlers.js +105 -0
  155. package/lib/server/element-handlers.js.map +1 -0
  156. package/lib/server/ember-server.d.ts +84 -0
  157. package/lib/server/ember-server.events.d.ts +23 -0
  158. package/lib/server/ember-server.events.js +46 -0
  159. package/lib/server/ember-server.events.js.map +1 -0
  160. package/lib/server/ember-server.interface.d.ts +26 -0
  161. package/lib/server/ember-server.interface.js +3 -0
  162. package/lib/server/ember-server.interface.js.map +1 -0
  163. package/lib/server/ember-server.js +422 -0
  164. package/lib/server/ember-server.js.map +1 -0
  165. package/lib/server/ember-server.logs.d.ts +4 -0
  166. package/lib/server/ember-server.logs.js +274 -0
  167. package/lib/server/ember-server.logs.js.map +1 -0
  168. package/lib/server/json.parser.d.ts +13 -0
  169. package/lib/server/json.parser.js +209 -0
  170. package/lib/server/json.parser.js.map +1 -0
  171. package/lib/server/matrix.handlers.d.ts +10 -0
  172. package/lib/server/matrix.handlers.js +103 -0
  173. package/lib/server/matrix.handlers.js.map +1 -0
  174. package/lib/server/node.handlers.d.ts +12 -0
  175. package/lib/server/node.handlers.js +85 -0
  176. package/lib/server/node.handlers.js.map +1 -0
  177. package/lib/server/qualified.handlers.d.ts +15 -0
  178. package/lib/server/qualified.handlers.js +54 -0
  179. package/lib/server/qualified.handlers.js.map +1 -0
  180. package/lib/socket/s101.client.d.ts +17 -0
  181. package/lib/socket/s101.client.js +53 -0
  182. package/lib/socket/s101.client.js.map +1 -0
  183. package/lib/socket/s101.codec.d.ts +32 -0
  184. package/lib/socket/s101.codec.js +301 -0
  185. package/lib/socket/s101.codec.js.map +1 -0
  186. package/lib/socket/s101.packet-stats.socket.d.ts +31 -0
  187. package/lib/socket/s101.packet-stats.socket.js +74 -0
  188. package/lib/socket/s101.packet-stats.socket.js.map +1 -0
  189. package/lib/socket/s101.server.d.ts +28 -0
  190. package/lib/socket/s101.server.js +87 -0
  191. package/lib/socket/s101.server.js.map +1 -0
  192. package/lib/socket/s101.socket.d.ts +75 -0
  193. package/lib/socket/s101.socket.js +300 -0
  194. package/lib/socket/s101.socket.js.map +1 -0
  195. package/lib/socket/stats-collector.d.ts +19 -0
  196. package/lib/socket/stats-collector.js +63 -0
  197. package/lib/socket/stats-collector.js.map +1 -0
  198. package/lib/tools/debug.d.ts +2 -0
  199. package/lib/tools/debug.js +21 -0
  200. package/lib/tools/debug.js.map +1 -0
  201. package/lib/tools/jsontree.d.ts +1 -0
  202. package/lib/tools/jsontree.js +36 -0
  203. package/lib/tools/jsontree.js.map +1 -0
  204. package/lib/tools/monitoring-client.d.ts +2 -0
  205. package/lib/tools/monitoring-client.js +186 -0
  206. package/lib/tools/monitoring-client.js.map +1 -0
  207. package/lib/tools/serve.d.ts +1 -0
  208. package/lib/tools/serve.js +129 -0
  209. package/lib/tools/serve.js.map +1 -0
  210. package/package.json +105 -0
@@ -0,0 +1,9 @@
1
+ export declare enum MatrixDisposition {
2
+ tally = 0,
3
+ modified = 1,
4
+ pending = 2,
5
+ locked = 3
6
+ }
7
+ declare type MatrixDispositionStrings = keyof typeof MatrixDisposition;
8
+ export declare function matrixDispositionFromString(s: MatrixDispositionStrings): MatrixDisposition;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MatrixDisposition;
4
+ (function (MatrixDisposition) {
5
+ MatrixDisposition[MatrixDisposition["tally"] = 0] = "tally";
6
+ MatrixDisposition[MatrixDisposition["modified"] = 1] = "modified";
7
+ MatrixDisposition[MatrixDisposition["pending"] = 2] = "pending";
8
+ MatrixDisposition[MatrixDisposition["locked"] = 3] = "locked";
9
+ })(MatrixDisposition = exports.MatrixDisposition || (exports.MatrixDisposition = {}));
10
+ function matrixDispositionFromString(s) {
11
+ return MatrixDisposition[s];
12
+ }
13
+ exports.matrixDispositionFromString = matrixDispositionFromString;
14
+ //# sourceMappingURL=matrix-disposition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix-disposition.js","sourceRoot":"","sources":["../../../src/common/matrix/matrix-disposition.ts"],"names":[],"mappings":";;AASA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,2DAAS,CAAA;IACT,iEAAQ,CAAA;IACR,+DAAO,CAAA;IACP,6DAAM,CAAA;AACV,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AAGD,SAAgB,2BAA2B,CAAC,CAA2B;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC;AAFD,kEAEC"}
@@ -0,0 +1,8 @@
1
+ export declare enum MatrixMode {
2
+ linear = 0,
3
+ nonLinear = 1
4
+ }
5
+ declare type MatrixModeStrings = keyof typeof MatrixMode;
6
+ export declare function matrixModeFromString(s: MatrixModeStrings): MatrixMode;
7
+ export declare function matrixModeToString(m: MatrixMode): string;
8
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MatrixMode;
4
+ (function (MatrixMode) {
5
+ MatrixMode[MatrixMode["linear"] = 0] = "linear";
6
+ MatrixMode[MatrixMode["nonLinear"] = 1] = "nonLinear";
7
+ })(MatrixMode = exports.MatrixMode || (exports.MatrixMode = {}));
8
+ function matrixModeFromString(s) {
9
+ if (typeof (s) !== 'string') {
10
+ throw new Error(`matrixModeFromString: Invalid string ${s}`);
11
+ }
12
+ return MatrixMode[s];
13
+ }
14
+ exports.matrixModeFromString = matrixModeFromString;
15
+ function matrixModeToString(m) {
16
+ const num = Number(m);
17
+ if (isNaN(num) || num < MatrixMode.linear || num > MatrixMode.nonLinear) {
18
+ throw new Error(`matrixModeToString: Invalid parameter type ${m}`);
19
+ }
20
+ return MatrixMode[num];
21
+ }
22
+ exports.matrixModeToString = matrixModeToString;
23
+ //# sourceMappingURL=matrix-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix-mode.js","sourceRoot":"","sources":["../../../src/common/matrix/matrix-mode.ts"],"names":[],"mappings":";;AACA,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+CAAU,CAAA;IACV,qDAAS,CAAA;AACb,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAGD,SAAgB,oBAAoB,CAAC,CAAoB;IACrD,IAAI,OAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;KAChE;IACD,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AALD,oDAKC;AAED,SAAgB,kBAAkB,CAAC,CAAa;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,IAAI,GAAG,GAAG,UAAU,CAAC,SAAS,EAAE;QACrE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,EAAE,CAAC,CAAC;KACtE;IACD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAND,gDAMC"}
@@ -0,0 +1,13 @@
1
+ import { ExtendedReader as Reader, ExtendedWriter as Writer } from '../../ber';
2
+ import { Matrix } from './matrix';
3
+ import { QualifiedMatrix } from './qualified-matrix';
4
+ import { MatrixType } from './matrix-type';
5
+ import { MatrixMode } from './matrix-mode';
6
+ export declare class MatrixNode extends Matrix {
7
+ constructor(number: number, identifier?: string, type?: MatrixType, mode?: MatrixMode);
8
+ static decode(ber: Reader): MatrixNode;
9
+ encode(ber: Writer): void;
10
+ getMinimal(complete?: boolean): MatrixNode;
11
+ toQualified(): QualifiedMatrix;
12
+ static get BERID(): number;
13
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ber_1 = require("../../ber");
4
+ const matrix_contents_1 = require("./matrix-contents");
5
+ const matrix_1 = require("./matrix");
6
+ const qualified_matrix_1 = require("./qualified-matrix");
7
+ const errors_1 = require("../../error/errors");
8
+ const matrix_type_1 = require("./matrix-type");
9
+ const matrix_mode_1 = require("./matrix-mode");
10
+ class MatrixNode extends matrix_1.Matrix {
11
+ constructor(number, identifier = null, type = matrix_type_1.MatrixType.oneToN, mode = matrix_mode_1.MatrixMode.linear) {
12
+ super(identifier, type, mode);
13
+ this._number = number;
14
+ }
15
+ static decode(ber) {
16
+ const m = new MatrixNode(0);
17
+ ber = ber.getSequence(MatrixNode.BERID);
18
+ while (ber.remain > 0) {
19
+ const tag = ber.peek();
20
+ const seq = ber.getSequence(tag);
21
+ if (tag === ber_1.CONTEXT(0)) {
22
+ m.setNumber(seq.readInt());
23
+ }
24
+ else if (tag === ber_1.CONTEXT(1)) {
25
+ m.setContents(matrix_contents_1.MatrixContents.decode(seq));
26
+ }
27
+ else if (tag === ber_1.CONTEXT(2)) {
28
+ m.decodeChildren(seq);
29
+ }
30
+ else if (tag === ber_1.CONTEXT(3)) {
31
+ m.targets = matrix_1.Matrix.decodeTargets(seq);
32
+ }
33
+ else if (tag === ber_1.CONTEXT(4)) {
34
+ m.sources = matrix_1.Matrix.decodeSources(seq);
35
+ }
36
+ else if (tag === ber_1.CONTEXT(5)) {
37
+ m.connections = matrix_1.Matrix.decodeConnections(seq);
38
+ }
39
+ else {
40
+ throw new errors_1.UnimplementedEmberTypeError(tag);
41
+ }
42
+ }
43
+ return m;
44
+ }
45
+ encode(ber) {
46
+ ber.startSequence(MatrixNode.BERID);
47
+ ber.startSequence(ber_1.CONTEXT(0));
48
+ ber.writeInt(this.number);
49
+ ber.endSequence();
50
+ if (this.contents != null) {
51
+ ber.startSequence(ber_1.CONTEXT(1));
52
+ this.contents.encode(ber);
53
+ ber.endSequence();
54
+ }
55
+ this.encodeChildren(ber);
56
+ this.encodeTargets(ber);
57
+ this.encodeSources(ber);
58
+ this.encodeConnections(ber);
59
+ ber.endSequence();
60
+ }
61
+ getMinimal(complete = false) {
62
+ const number = this.getNumber();
63
+ const m = new MatrixNode(number);
64
+ if (complete) {
65
+ if (this.contents != null) {
66
+ m.setContents(this.contents);
67
+ }
68
+ if (this.targets != null) {
69
+ m.targets = this.targets;
70
+ }
71
+ if (this.sources != null) {
72
+ m.sources = this.sources;
73
+ }
74
+ if (this.connections != null) {
75
+ m.connections = this.connections;
76
+ }
77
+ }
78
+ return m;
79
+ }
80
+ toQualified() {
81
+ const qm = new qualified_matrix_1.QualifiedMatrix(this.getPath());
82
+ qm.update(this);
83
+ return qm;
84
+ }
85
+ static get BERID() {
86
+ return ber_1.APPLICATION(13);
87
+ }
88
+ }
89
+ exports.MatrixNode = MatrixNode;
90
+ //# sourceMappingURL=matrix-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix-node.js","sourceRoot":"","sources":["../../../src/common/matrix/matrix-node.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,8 @@
1
+ export declare enum MatrixOperation {
2
+ absolute = 0,
3
+ connect = 1,
4
+ disconnect = 2
5
+ }
6
+ declare type MatrixOperationStrings = keyof typeof MatrixOperation;
7
+ export declare function matrixOperationFromString(s: MatrixOperationStrings): MatrixOperation;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MatrixOperation;
4
+ (function (MatrixOperation) {
5
+ MatrixOperation[MatrixOperation["absolute"] = 0] = "absolute";
6
+ MatrixOperation[MatrixOperation["connect"] = 1] = "connect";
7
+ MatrixOperation[MatrixOperation["disconnect"] = 2] = "disconnect";
8
+ })(MatrixOperation = exports.MatrixOperation || (exports.MatrixOperation = {}));
9
+ function matrixOperationFromString(s) {
10
+ return MatrixOperation[s];
11
+ }
12
+ exports.matrixOperationFromString = matrixOperationFromString;
13
+ //# sourceMappingURL=matrix-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix-operation.js","sourceRoot":"","sources":["../../../src/common/matrix/matrix-operation.ts"],"names":[],"mappings":";;AASA,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,6DAAY,CAAA;IACZ,2DAAO,CAAA;IACP,iEAAU,CAAA;AACd,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAGD,SAAgB,yBAAyB,CAAC,CAAyB;IAC/D,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;AAC9B,CAAC;AAFD,8DAEC"}
@@ -0,0 +1,9 @@
1
+ export declare enum MatrixType {
2
+ oneToN = 0,
3
+ oneToOne = 1,
4
+ nToN = 2
5
+ }
6
+ declare type MatrixTypeStrings = keyof typeof MatrixType;
7
+ export declare function matrixTypeFromString(s: MatrixTypeStrings): MatrixType;
8
+ export declare function matrixTypeToString(t: MatrixType): string;
9
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MatrixType;
4
+ (function (MatrixType) {
5
+ MatrixType[MatrixType["oneToN"] = 0] = "oneToN";
6
+ MatrixType[MatrixType["oneToOne"] = 1] = "oneToOne";
7
+ MatrixType[MatrixType["nToN"] = 2] = "nToN";
8
+ })(MatrixType = exports.MatrixType || (exports.MatrixType = {}));
9
+ function matrixTypeFromString(s) {
10
+ if (typeof (s) !== 'string') {
11
+ throw new Error(`matrixTypeFromString: Invalid string ${s}`);
12
+ }
13
+ return MatrixType[s];
14
+ }
15
+ exports.matrixTypeFromString = matrixTypeFromString;
16
+ function matrixTypeToString(t) {
17
+ const num = Number(t);
18
+ if (isNaN(num) || num < MatrixType.oneToN || num > MatrixType.nToN) {
19
+ throw new Error(`parameterTypeToString: Invalid parameter type ${t}`);
20
+ }
21
+ return MatrixType[num];
22
+ }
23
+ exports.matrixTypeToString = matrixTypeToString;
24
+ //# sourceMappingURL=matrix-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix-type.js","sourceRoot":"","sources":["../../../src/common/matrix/matrix-type.ts"],"names":[],"mappings":";;AACA,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,+CAAU,CAAA;IACV,mDAAQ,CAAA;IACR,2CAAI,CAAA;AACR,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAGD,SAAgB,oBAAoB,CAAC,CAAoB;IACrD,IAAI,OAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,EAAE,CAAC,CAAC;KAChE;IACD,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AALD,oDAKC;AAED,SAAgB,kBAAkB,CAAC,CAAa;IAC5C,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,IAAI,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE;QAChE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,EAAE,CAAC,CAAC;KACzE;IACD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAND,gDAMC"}
@@ -0,0 +1,91 @@
1
+ import { ExtendedReader as Reader, ExtendedWriter as Writer } from '../../ber';
2
+ import { MatrixMode } from './matrix-mode';
3
+ import { MatrixOperation } from './matrix-operation';
4
+ import { MatrixType } from './matrix-type';
5
+ import { MatrixContents } from './matrix-contents';
6
+ import { MatrixConnection, JMatrixConnection } from './matrix-connection';
7
+ import { TreeNode } from '../tree-node';
8
+ import { Parameter } from '../parameter';
9
+ import { Label, LabelInterface } from '../label';
10
+ export interface MatrixConnections {
11
+ [index: number]: MatrixConnection;
12
+ }
13
+ export interface JMatrix {
14
+ number: number;
15
+ path: string;
16
+ type: string;
17
+ mode: string;
18
+ targets?: number[];
19
+ sources?: number[];
20
+ connections?: {
21
+ [index: number]: JMatrixConnection;
22
+ };
23
+ identifier?: string;
24
+ description?: string;
25
+ targetCount?: number;
26
+ sourceCount?: number;
27
+ maximumTotalConnects?: number;
28
+ maximumConnectsPerTarget?: number;
29
+ parametersLocation?: number | string;
30
+ gainParameterNumber?: number;
31
+ labels?: LabelInterface[];
32
+ schemaIdentifiers?: string;
33
+ templateReference?: string;
34
+ }
35
+ export declare class Matrix extends TreeNode {
36
+ get contents(): MatrixContents;
37
+ get type(): MatrixType;
38
+ set type(type: MatrixType);
39
+ get mode(): MatrixMode;
40
+ set mode(mode: MatrixMode);
41
+ get targetCount(): number | null;
42
+ set targetCount(targetCount: number);
43
+ get sourceCount(): number | null;
44
+ set sourceCount(sourceCount: number);
45
+ get maximumTotalConnects(): number | null;
46
+ set maximumTotalConnects(maximumTotalConnects: number);
47
+ get maximumConnectsPerTarget(): number | null;
48
+ set maximumConnectsPerTarget(maximumConnectsPerTarget: number);
49
+ get parametersLocation(): string | number | null;
50
+ set parametersLocation(parametersLocation: number | string);
51
+ get gainParameterNumber(): number | null;
52
+ set gainParameterNumber(gainParameterNumber: number);
53
+ get labels(): Label[] | null;
54
+ set labels(labels: Label[]);
55
+ get schemaIdentifiers(): string | null;
56
+ set schemaIdentifiers(schemaIdentifiers: string);
57
+ get templateReference(): string | null;
58
+ set templateReference(templateReference: string);
59
+ _connectedSources: {
60
+ [index: number]: Set<number>;
61
+ };
62
+ _numConnections: number;
63
+ targets?: number[];
64
+ sources?: number[];
65
+ connections?: MatrixConnections;
66
+ defaultSources?: Parameter[];
67
+ constructor(identifier?: string, _type?: MatrixType, _mode?: MatrixMode);
68
+ static canConnect(matrixNode: Matrix, targetID: number, sources: number[], operation?: MatrixOperation): boolean;
69
+ static connectSources(matrix: Matrix, targetID: number, sources: number[]): void;
70
+ static decodeTargets(ber: Reader): number[];
71
+ static decodeSources(ber: Reader): number[];
72
+ static decodeConnections(ber: Reader): MatrixConnections;
73
+ static disconnectSources(matrix: Matrix, targetID: number, sources: number[]): void;
74
+ static getSourceConnections(matrix: Matrix, source: number): number[];
75
+ static matrixUpdate(matrix: Matrix, newMatrix: Matrix): boolean;
76
+ static setSources(matrix: Matrix, targetID: number, sources: number[]): void;
77
+ static validateConnection(matrixNode: Matrix, targetID: number, sources?: number[]): void;
78
+ isMatrix(): boolean;
79
+ canConnect(targetID: number, sources: number[], operation: MatrixOperation): boolean;
80
+ connect(connections: MatrixConnections): TreeNode;
81
+ connectSources(targetID: number, sources: number[]): void;
82
+ disconnectSources(targetID: number, sources: number[]): void;
83
+ encodeConnections(ber: Writer): void;
84
+ encodeSources(ber: Writer): void;
85
+ encodeTargets(ber: Writer): void;
86
+ getSourceConnections(source: number): number[];
87
+ setSources(targetID: number, sources: number[]): void;
88
+ toJSON(): JMatrix;
89
+ update(other: Matrix): boolean;
90
+ validateConnection(targetID: number, sources: number[]): void;
91
+ }