mftsccs-browser 1.1.54-beta → 1.1.56-beta
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/main.bundle.js +153 -91
- package/dist/main.bundle.js.map +1 -1
- package/dist/serviceWorker.bundle.js +154 -92
- package/dist/serviceWorker.bundle.js.map +1 -1
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.d.ts +1 -1
- package/dist/types/DataStructures/ConnectionBinaryTree/ConnectionNode.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.bundle.js
CHANGED
|
@@ -2261,9 +2261,7 @@ function LoginToBackend(email, password) {
|
|
|
2261
2261
|
});
|
|
2262
2262
|
if (response.ok) {
|
|
2263
2263
|
const result = yield response.json();
|
|
2264
|
-
console.log(result.data);
|
|
2265
2264
|
_DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken = result.data.token;
|
|
2266
|
-
console.log("this is the token", _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken);
|
|
2267
2265
|
return result;
|
|
2268
2266
|
}
|
|
2269
2267
|
else {
|
|
@@ -4611,8 +4609,8 @@ class CompositionNode {
|
|
|
4611
4609
|
const T2 = y.leftNode;
|
|
4612
4610
|
y.leftNode = x;
|
|
4613
4611
|
x.rightNode = T2;
|
|
4614
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
4615
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
4612
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
4613
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
4616
4614
|
return y;
|
|
4617
4615
|
}
|
|
4618
4616
|
//return y;
|
|
@@ -5028,12 +5026,18 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
5028
5026
|
|
|
5029
5027
|
class ConnectionBinaryTree {
|
|
5030
5028
|
static addNodeToTree(node) {
|
|
5031
|
-
|
|
5032
|
-
this.connectionroot
|
|
5033
|
-
|
|
5029
|
+
try {
|
|
5030
|
+
if (this.connectionroot == null) {
|
|
5031
|
+
this.connectionroot = node;
|
|
5032
|
+
return this.connectionroot;
|
|
5033
|
+
}
|
|
5034
|
+
else {
|
|
5035
|
+
this.connectionroot = this.connectionroot.addNode(node, this.connectionroot, this.connectionroot.height);
|
|
5036
|
+
}
|
|
5034
5037
|
}
|
|
5035
|
-
|
|
5036
|
-
|
|
5038
|
+
catch (error) {
|
|
5039
|
+
console.log("This is the error in making the tree", error);
|
|
5040
|
+
throw error;
|
|
5037
5041
|
}
|
|
5038
5042
|
}
|
|
5039
5043
|
static addConnectionToTree(connection) {
|
|
@@ -5072,11 +5076,16 @@ class ConnectionBinaryTree {
|
|
|
5072
5076
|
}
|
|
5073
5077
|
static getNodeFromTree(id) {
|
|
5074
5078
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5079
|
+
try {
|
|
5080
|
+
if (this.connectionroot) {
|
|
5081
|
+
let Node = this.connectionroot.getFromNode(id, this.connectionroot);
|
|
5082
|
+
return Node;
|
|
5083
|
+
}
|
|
5084
|
+
return this.connectionroot;
|
|
5085
|
+
}
|
|
5086
|
+
catch (ex) {
|
|
5087
|
+
console.log("this is the getNodeFromTree", id, this.connectionroot);
|
|
5078
5088
|
}
|
|
5079
|
-
return this.connectionroot;
|
|
5080
5089
|
});
|
|
5081
5090
|
}
|
|
5082
5091
|
static getConnectionListFromIds(ids, connectionArray, remainingIds) {
|
|
@@ -5106,6 +5115,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5106
5115
|
|
|
5107
5116
|
class ConnectionNode {
|
|
5108
5117
|
constructor(key, value, leftNode, rightNode) {
|
|
5118
|
+
this.leftNode = null;
|
|
5119
|
+
this.rightNode = null;
|
|
5109
5120
|
this.variants = [];
|
|
5110
5121
|
this.height = 1;
|
|
5111
5122
|
this.key = key;
|
|
@@ -5144,17 +5155,25 @@ class ConnectionNode {
|
|
|
5144
5155
|
//node.currentNode = this.addCurrentNode(passedNode, node.currentNode);
|
|
5145
5156
|
return node;
|
|
5146
5157
|
}
|
|
5158
|
+
getMax(a, b) {
|
|
5159
|
+
if (a > b) {
|
|
5160
|
+
return a;
|
|
5161
|
+
}
|
|
5162
|
+
return b;
|
|
5163
|
+
}
|
|
5147
5164
|
addNode(passedNode, node, height) {
|
|
5165
|
+
// try{
|
|
5148
5166
|
if (node == null) {
|
|
5149
|
-
node = passedNode;
|
|
5150
|
-
|
|
5167
|
+
//node = passedNode;
|
|
5168
|
+
//ConnectionBinaryTree.connectionAll.push(node.value);
|
|
5169
|
+
return passedNode;
|
|
5151
5170
|
}
|
|
5152
5171
|
let LeftNode = node.leftNode;
|
|
5153
5172
|
let RightNode = node.rightNode;
|
|
5154
|
-
if (
|
|
5173
|
+
if (passedNode.key < node.key) {
|
|
5155
5174
|
node.leftNode = this.addNode(passedNode, LeftNode, height);
|
|
5156
5175
|
}
|
|
5157
|
-
else if (
|
|
5176
|
+
else if (passedNode.key > node.key) {
|
|
5158
5177
|
node.rightNode = this.addNode(passedNode, RightNode, height);
|
|
5159
5178
|
}
|
|
5160
5179
|
// else if (node.key == passedNode.key && node.key != ""){
|
|
@@ -5163,31 +5182,38 @@ class ConnectionNode {
|
|
|
5163
5182
|
else {
|
|
5164
5183
|
return node;
|
|
5165
5184
|
}
|
|
5166
|
-
node.height = 1 +
|
|
5185
|
+
node.height = 1 + this.getMax(this.getHeight(node.leftNode), this.getHeight(node.rightNode));
|
|
5167
5186
|
let balancingFactor = this.getBalanceFactor(node);
|
|
5187
|
+
// this is left heavy
|
|
5168
5188
|
if (balancingFactor > 1) {
|
|
5169
5189
|
if (node.leftNode) {
|
|
5170
|
-
if (
|
|
5190
|
+
if (this.getBalanceFactor(node.leftNode) >= 0) {
|
|
5171
5191
|
return this.rightRotate(node);
|
|
5172
5192
|
}
|
|
5173
|
-
|
|
5193
|
+
if (this.getBalanceFactor(node.leftNode) < 0) {
|
|
5174
5194
|
node.leftNode = this.leftRotate(node.leftNode);
|
|
5175
5195
|
return this.rightRotate(node);
|
|
5176
5196
|
}
|
|
5177
5197
|
}
|
|
5178
5198
|
}
|
|
5199
|
+
// this is right heavy
|
|
5179
5200
|
if (balancingFactor < -1) {
|
|
5180
5201
|
if (node.rightNode) {
|
|
5181
|
-
if (
|
|
5202
|
+
if (this.getBalanceFactor(node.rightNode) <= 0) {
|
|
5182
5203
|
return this.leftRotate(node);
|
|
5183
5204
|
}
|
|
5184
|
-
|
|
5205
|
+
if (this.getBalanceFactor(node.rightNode) > 0) {
|
|
5185
5206
|
node.rightNode = this.rightRotate(node.rightNode);
|
|
5186
5207
|
return this.leftRotate(node);
|
|
5187
5208
|
}
|
|
5188
5209
|
}
|
|
5189
5210
|
}
|
|
5190
5211
|
return node;
|
|
5212
|
+
// }
|
|
5213
|
+
// catch(error){
|
|
5214
|
+
// console.log("this is the error in binary tree making", error, passedNode, node, height);
|
|
5215
|
+
// //throw error;
|
|
5216
|
+
// }
|
|
5191
5217
|
}
|
|
5192
5218
|
addTypeNode(passedNode, node, height) {
|
|
5193
5219
|
let debugFlag = false;
|
|
@@ -5226,7 +5252,7 @@ class ConnectionNode {
|
|
|
5226
5252
|
}
|
|
5227
5253
|
return node;
|
|
5228
5254
|
}
|
|
5229
|
-
node.height = 1 +
|
|
5255
|
+
node.height = 1 + this.getMax(this.getHeight(node.leftNode), this.getHeight(node.rightNode));
|
|
5230
5256
|
if (debugFlag) {
|
|
5231
5257
|
console.log("height here", node.height);
|
|
5232
5258
|
}
|
|
@@ -5290,10 +5316,12 @@ class ConnectionNode {
|
|
|
5290
5316
|
let T2 = x.rightNode;
|
|
5291
5317
|
y.leftNode = T2;
|
|
5292
5318
|
x.rightNode = y;
|
|
5293
|
-
y.height =
|
|
5294
|
-
x.height =
|
|
5319
|
+
y.height = this.getMax(this.getHeight(y.leftNode), this.getHeight(y.rightNode)) + 1;
|
|
5320
|
+
x.height = this.getMax(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
5295
5321
|
return x;
|
|
5296
5322
|
}
|
|
5323
|
+
console.log("this is the error in right rotation", y, x);
|
|
5324
|
+
throw new Error("Cannot perform right rotation: left node is null.");
|
|
5297
5325
|
// return x;
|
|
5298
5326
|
}
|
|
5299
5327
|
return y;
|
|
@@ -5305,10 +5333,12 @@ class ConnectionNode {
|
|
|
5305
5333
|
let T2 = y.leftNode;
|
|
5306
5334
|
y.leftNode = x;
|
|
5307
5335
|
x.rightNode = T2;
|
|
5308
|
-
x.height =
|
|
5309
|
-
y.height =
|
|
5336
|
+
x.height = this.getMax(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
5337
|
+
y.height = this.getMax(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
5310
5338
|
return y;
|
|
5311
5339
|
}
|
|
5340
|
+
console.log("this is the error in left rotation", x, y);
|
|
5341
|
+
throw new Error("Cannot perform left rotation: right node is null.");
|
|
5312
5342
|
//return y;
|
|
5313
5343
|
}
|
|
5314
5344
|
return x;
|
|
@@ -5326,23 +5356,29 @@ class ConnectionNode {
|
|
|
5326
5356
|
return this.getHeight(N.leftNode) - this.getHeight(N.rightNode);
|
|
5327
5357
|
}
|
|
5328
5358
|
getFromNode(id, node) {
|
|
5329
|
-
|
|
5330
|
-
if (
|
|
5331
|
-
|
|
5332
|
-
|
|
5359
|
+
try {
|
|
5360
|
+
if (node) {
|
|
5361
|
+
// console.log("this is the node test", id, node, node.leftNode, node.rightNode);
|
|
5362
|
+
if (id == node.key) {
|
|
5363
|
+
if (node.value.count) {
|
|
5364
|
+
node.value.count++;
|
|
5365
|
+
}
|
|
5366
|
+
else {
|
|
5367
|
+
node.value.count = 1;
|
|
5368
|
+
}
|
|
5369
|
+
return node;
|
|
5333
5370
|
}
|
|
5334
|
-
else {
|
|
5335
|
-
node.
|
|
5371
|
+
else if (id < node.key) {
|
|
5372
|
+
return this.getFromNode(id, node.leftNode);
|
|
5373
|
+
}
|
|
5374
|
+
else if (id > node.key) {
|
|
5375
|
+
return this.getFromNode(id, node.rightNode);
|
|
5336
5376
|
}
|
|
5337
5377
|
return node;
|
|
5338
5378
|
}
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
else if (id > node.key) {
|
|
5343
|
-
return this.getFromNode(id, node.rightNode);
|
|
5344
|
-
}
|
|
5345
|
-
return node;
|
|
5379
|
+
}
|
|
5380
|
+
catch (exception) {
|
|
5381
|
+
console.log("this is the exception", id, node, node === null || node === void 0 ? void 0 : node.leftNode, node === null || node === void 0 ? void 0 : node.rightNode);
|
|
5346
5382
|
}
|
|
5347
5383
|
return node;
|
|
5348
5384
|
}
|
|
@@ -5531,10 +5567,10 @@ class ConnectionOfNode extends _NodePrimitive__WEBPACK_IMPORTED_MODULE_0__.NodeP
|
|
|
5531
5567
|
}
|
|
5532
5568
|
addNode(passedNode, node, height) {
|
|
5533
5569
|
if (node == null) {
|
|
5534
|
-
node
|
|
5570
|
+
//node= passedNode;
|
|
5535
5571
|
// let event = new Event(`${passedNode.key}`);
|
|
5536
5572
|
// dispatchEvent(event);
|
|
5537
|
-
return
|
|
5573
|
+
return passedNode;
|
|
5538
5574
|
}
|
|
5539
5575
|
let LeftNode = node.leftNode;
|
|
5540
5576
|
let RightNode = node.rightNode;
|
|
@@ -5551,11 +5587,11 @@ class ConnectionOfNode extends _NodePrimitive__WEBPACK_IMPORTED_MODULE_0__.NodeP
|
|
|
5551
5587
|
let balancingFactor = this.getBalanceFactor(node);
|
|
5552
5588
|
if (balancingFactor > 1) {
|
|
5553
5589
|
if (node.leftNode) {
|
|
5554
|
-
if (
|
|
5590
|
+
if (this.getBalanceFactor(node.leftNode) >= 0) {
|
|
5555
5591
|
let returner = this.rightRotate(node);
|
|
5556
5592
|
return returner;
|
|
5557
5593
|
}
|
|
5558
|
-
|
|
5594
|
+
if (this.getBalanceFactor(node.leftNode) < 0) {
|
|
5559
5595
|
node.leftNode = this.leftRotate(node.leftNode);
|
|
5560
5596
|
let returner = this.rightRotate(node);
|
|
5561
5597
|
return returner;
|
|
@@ -5564,11 +5600,11 @@ class ConnectionOfNode extends _NodePrimitive__WEBPACK_IMPORTED_MODULE_0__.NodeP
|
|
|
5564
5600
|
}
|
|
5565
5601
|
if (balancingFactor < -1) {
|
|
5566
5602
|
if (node.rightNode) {
|
|
5567
|
-
if (
|
|
5603
|
+
if (this.getBalanceFactor(node.rightNode) <= 0) {
|
|
5568
5604
|
let returner = this.leftRotate(node);
|
|
5569
5605
|
return returner;
|
|
5570
5606
|
}
|
|
5571
|
-
|
|
5607
|
+
if (this.getBalanceFactor(node.rightNode) > 0) {
|
|
5572
5608
|
node.rightNode = this.rightRotate(node.rightNode);
|
|
5573
5609
|
let returner = this.leftRotate(node);
|
|
5574
5610
|
return returner;
|
|
@@ -5940,8 +5976,8 @@ class NodePrimitive {
|
|
|
5940
5976
|
let T2 = y.leftNode;
|
|
5941
5977
|
y.leftNode = x;
|
|
5942
5978
|
x.rightNode = T2;
|
|
5943
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
5944
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
5979
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
5980
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
5945
5981
|
return y;
|
|
5946
5982
|
}
|
|
5947
5983
|
//return y;
|
|
@@ -6073,9 +6109,15 @@ class ConnectionData {
|
|
|
6073
6109
|
// this.connectionArray.push(connection);
|
|
6074
6110
|
// if(!connection.isTemp){
|
|
6075
6111
|
//UpdateToDatabase("connection", connection);
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6112
|
+
try {
|
|
6113
|
+
_ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_3__.ConnectionBinaryTree.addConnectionToTree(connection);
|
|
6114
|
+
_ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionTypeTree.addConnectionToTree(connection);
|
|
6115
|
+
_ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionOfTheTree.addConnection(connection);
|
|
6116
|
+
}
|
|
6117
|
+
catch (error) {
|
|
6118
|
+
console.log("this is the error in making the connection");
|
|
6119
|
+
throw error;
|
|
6120
|
+
}
|
|
6079
6121
|
}
|
|
6080
6122
|
static AddConnectionToMemory(connection) {
|
|
6081
6123
|
if (!connection.isTemp) {
|
|
@@ -6180,14 +6222,19 @@ class ConnectionData {
|
|
|
6180
6222
|
return res.data;
|
|
6181
6223
|
}
|
|
6182
6224
|
let connections = [];
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
let
|
|
6187
|
-
|
|
6188
|
-
|
|
6225
|
+
try {
|
|
6226
|
+
let connectionIds = [];
|
|
6227
|
+
connectionIds = ConnectionData.GetConnectionByOfType(id, id);
|
|
6228
|
+
for (let i = 0; i < connectionIds.length; i++) {
|
|
6229
|
+
let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_3__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);
|
|
6230
|
+
if (conn) {
|
|
6231
|
+
connections.push(conn.value);
|
|
6232
|
+
}
|
|
6189
6233
|
}
|
|
6190
6234
|
}
|
|
6235
|
+
catch (error) {
|
|
6236
|
+
console.log("this is the error GetConnectionsOfCompositionLocal", id, connections);
|
|
6237
|
+
}
|
|
6191
6238
|
return connections;
|
|
6192
6239
|
//let node = await ConnectionTypeTree.getNodeFromTree(id);
|
|
6193
6240
|
// if(node?.value){
|
|
@@ -6677,8 +6724,8 @@ class LNode {
|
|
|
6677
6724
|
let T2 = y.leftNode;
|
|
6678
6725
|
y.leftNode = x;
|
|
6679
6726
|
x.rightNode = T2;
|
|
6680
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
6681
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
6727
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
6728
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
6682
6729
|
return y;
|
|
6683
6730
|
}
|
|
6684
6731
|
//return y;
|
|
@@ -8497,8 +8544,8 @@ class Node {
|
|
|
8497
8544
|
let T2 = y.leftNode;
|
|
8498
8545
|
y.leftNode = x;
|
|
8499
8546
|
x.rightNode = T2;
|
|
8500
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
8501
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
8547
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
8548
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
8502
8549
|
return y;
|
|
8503
8550
|
}
|
|
8504
8551
|
//return y;
|
|
@@ -9422,8 +9469,8 @@ class TypeNode {
|
|
|
9422
9469
|
let T2 = y.leftNode;
|
|
9423
9470
|
y.leftNode = x;
|
|
9424
9471
|
x.rightNode = T2;
|
|
9425
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
9426
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
9472
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
9473
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
9427
9474
|
return y;
|
|
9428
9475
|
}
|
|
9429
9476
|
//return y;
|
|
@@ -9705,8 +9752,8 @@ class UserNode {
|
|
|
9705
9752
|
let T2 = y.leftNode;
|
|
9706
9753
|
y.leftNode = x;
|
|
9707
9754
|
x.rightNode = T2;
|
|
9708
|
-
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode) + 1
|
|
9709
|
-
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode) + 1
|
|
9755
|
+
x.height = Math.max(this.getHeight(x.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
9756
|
+
y.height = Math.max(this.getHeight(y.leftNode), this.getHeight(x.rightNode)) + 1;
|
|
9710
9757
|
return y;
|
|
9711
9758
|
}
|
|
9712
9759
|
//return y;
|
|
@@ -12481,29 +12528,34 @@ function GetCompositionWithIdFromMemory(id) {
|
|
|
12481
12528
|
// console.log('data received from sw', res)
|
|
12482
12529
|
return res.data;
|
|
12483
12530
|
}
|
|
12531
|
+
let FinalReturn = {};
|
|
12484
12532
|
let connectionList = [];
|
|
12485
12533
|
let returnOutput = {};
|
|
12486
12534
|
// connectionList = await ConnectionData.GetConnectionsOfConcept(id);
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
compositionList.
|
|
12535
|
+
try {
|
|
12536
|
+
connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);
|
|
12537
|
+
let compositionList = [];
|
|
12538
|
+
for (let i = 0; i < connectionList.length; i++) {
|
|
12539
|
+
if (!compositionList.includes(connectionList[i].ofTheConceptId)) {
|
|
12540
|
+
compositionList.push(connectionList[i].ofTheConceptId);
|
|
12541
|
+
}
|
|
12542
|
+
}
|
|
12543
|
+
let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);
|
|
12544
|
+
if (concept.id == 0 && id != null && id != undefined) {
|
|
12545
|
+
let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);
|
|
12546
|
+
concept = conceptString;
|
|
12492
12547
|
}
|
|
12548
|
+
let output = yield recursiveFetchConcept(concept, connectionList, compositionList);
|
|
12549
|
+
// let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );
|
|
12550
|
+
let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : "";
|
|
12551
|
+
returnOutput[mainString] = output;
|
|
12552
|
+
FinalReturn['created_at'] = concept.entryTimeStamp;
|
|
12553
|
+
FinalReturn['data'] = returnOutput;
|
|
12554
|
+
FinalReturn['id'] = id;
|
|
12493
12555
|
}
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);
|
|
12497
|
-
concept = conceptString;
|
|
12556
|
+
catch (error) {
|
|
12557
|
+
console.log("this is the exception in GetCompositionWithIdFromMemory", id);
|
|
12498
12558
|
}
|
|
12499
|
-
let output = yield recursiveFetchConcept(concept, connectionList, compositionList);
|
|
12500
|
-
// let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );
|
|
12501
|
-
let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : "";
|
|
12502
|
-
returnOutput[mainString] = output;
|
|
12503
|
-
let FinalReturn = {};
|
|
12504
|
-
FinalReturn['created_at'] = concept.entryTimeStamp;
|
|
12505
|
-
FinalReturn['data'] = returnOutput;
|
|
12506
|
-
FinalReturn['id'] = id;
|
|
12507
12559
|
return FinalReturn;
|
|
12508
12560
|
});
|
|
12509
12561
|
}
|
|
@@ -12573,6 +12625,7 @@ function GetCompositionWithIdFromMemoryFromConnection(id, connectionList) {
|
|
|
12573
12625
|
concept = conceptString;
|
|
12574
12626
|
}
|
|
12575
12627
|
let output = yield recursiveFetchConcept(concept, connectionList, compositionList);
|
|
12628
|
+
console.log("this is the output", output, concept);
|
|
12576
12629
|
// let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );
|
|
12577
12630
|
let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : "";
|
|
12578
12631
|
returnOutput[mainString] = output;
|
|
@@ -16358,8 +16411,10 @@ function FormatConceptsAndConnectionsNormalList(connections_1, compositionData_1
|
|
|
16358
16411
|
}
|
|
16359
16412
|
for (let i = 0; i < mainComposition.length; i++) {
|
|
16360
16413
|
let mymainData = compositionData[mainComposition[i]];
|
|
16361
|
-
mymainData
|
|
16362
|
-
|
|
16414
|
+
if (mymainData) {
|
|
16415
|
+
mymainData["id"] = mainComposition[i];
|
|
16416
|
+
mainData.push(mymainData);
|
|
16417
|
+
}
|
|
16363
16418
|
}
|
|
16364
16419
|
return mainData;
|
|
16365
16420
|
});
|
|
@@ -17241,7 +17296,9 @@ function FormatConceptsAndConnections(connections_1, compositionData_1, mainComp
|
|
|
17241
17296
|
}
|
|
17242
17297
|
for (let i = 0; i < mainComposition.length; i++) {
|
|
17243
17298
|
let mymainData = compositionData[mainComposition[i]];
|
|
17244
|
-
|
|
17299
|
+
if (mymainData) {
|
|
17300
|
+
mainData.push(mymainData);
|
|
17301
|
+
}
|
|
17245
17302
|
}
|
|
17246
17303
|
return mainData;
|
|
17247
17304
|
});
|
|
@@ -17330,7 +17387,9 @@ function FormatFromConnectionsAlteredArray(connections_1, compositionData_1, con
|
|
|
17330
17387
|
}
|
|
17331
17388
|
for (let i = 0; i < mainComposition.length; i++) {
|
|
17332
17389
|
let mymainData = compositionData[mainComposition[i]];
|
|
17333
|
-
|
|
17390
|
+
if (mymainData) {
|
|
17391
|
+
mainData.push(mymainData);
|
|
17392
|
+
}
|
|
17334
17393
|
}
|
|
17335
17394
|
return mainData;
|
|
17336
17395
|
});
|
|
@@ -20759,19 +20818,22 @@ function sendMessage(type, payload) {
|
|
|
20759
20818
|
return new Promise((resolve, reject) => {
|
|
20760
20819
|
// navigator.serviceWorker.ready
|
|
20761
20820
|
// .then((registration) => {
|
|
20762
|
-
if (navigator.serviceWorker.controller) {
|
|
20821
|
+
if ((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')) {
|
|
20763
20822
|
const responseHandler = (event) => {
|
|
20764
|
-
var _a, _b, _c;
|
|
20823
|
+
var _a, _b, _c, _d, _e, _f;
|
|
20765
20824
|
if (((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.messageId) == messageId) { // Check if the message ID matches
|
|
20766
20825
|
if (!event.data.success) {
|
|
20767
|
-
if (event.data.status == 401) {
|
|
20768
|
-
reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_101__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (
|
|
20826
|
+
if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {
|
|
20827
|
+
reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_101__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.statusText })));
|
|
20828
|
+
}
|
|
20829
|
+
else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {
|
|
20830
|
+
reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_101__.HandleInternalError)(new Response('Unauthorized', { status: 401, statusText: (_e = event === null || event === void 0 ? void 0 : event.data) === null || _e === void 0 ? void 0 : _e.statusText })));
|
|
20769
20831
|
}
|
|
20770
20832
|
else {
|
|
20771
20833
|
reject(`Failed to handle action ${type} ${JSON.stringify(payload)}`);
|
|
20772
20834
|
}
|
|
20773
20835
|
}
|
|
20774
|
-
if ((
|
|
20836
|
+
if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.actions) {
|
|
20775
20837
|
payload.actions = JSON.parse(JSON.stringify(event.data.actions));
|
|
20776
20838
|
}
|
|
20777
20839
|
resolve(event.data);
|