mftsccs-browser 1.1.4 → 1.1.6

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/bundle.js CHANGED
@@ -4099,7 +4099,6 @@ class ConceptsData {
4099
4099
  // }
4100
4100
  //UpdateToDatabase("concept",concept);
4101
4101
  //IndexDbUpdate.UpdateConceptIndexDb(concept);
4102
- console.log("this is the added concept", concept);
4103
4102
  _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.addConceptToTree(concept);
4104
4103
  _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.addConceptToTree(concept);
4105
4104
  //BinaryCharacterTree.addConceptToTree(concept);
@@ -4891,6 +4890,7 @@ class ConnectionOfTheTree {
4891
4890
  // // console.log("dispatched the of the concecpt event", event);
4892
4891
  // dispatchEvent(event);
4893
4892
  let existingNode = this.node.getFromNode(key, this.node);
4893
+ console.log("oftree first", existingNode);
4894
4894
  if (existingNode) {
4895
4895
  let connectionList = existingNode === null || existingNode === void 0 ? void 0 : existingNode.value;
4896
4896
  if (connectionList.length == 0) {
@@ -4905,6 +4905,7 @@ class ConnectionOfTheTree {
4905
4905
  list.push(connection.id);
4906
4906
  let connectionNode = new _ConnectionOfNode__WEBPACK_IMPORTED_MODULE_0__.ConnectionOfNode(key, list, null, null);
4907
4907
  this.addNodeToTree(connectionNode);
4908
+ console.log("oftree second", connectionNode);
4908
4909
  }
4909
4910
  }
4910
4911
  else {
@@ -4912,6 +4913,7 @@ class ConnectionOfTheTree {
4912
4913
  list.push(connection.id);
4913
4914
  let connectionNode = new _ConnectionOfNode__WEBPACK_IMPORTED_MODULE_0__.ConnectionOfNode(key, list, null, null);
4914
4915
  this.addNodeToTree(connectionNode);
4916
+ console.log("oftree third", connectionNode);
4915
4917
  }
4916
4918
  }
4917
4919
  else {
@@ -5047,8 +5049,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
5047
5049
  };
5048
5050
 
5049
5051
  class ConnectionTypeTree {
5050
- static CreateCompositionKey(ofTheConceptId, typeId) {
5051
- return ofTheConceptId + "," + typeId;
5052
+ static CreateCompositionKey(typeId) {
5053
+ return typeId;
5052
5054
  }
5053
5055
  /**
5054
5056
  * This is a function to add the connectionNode to the existing tree
@@ -5075,7 +5077,7 @@ class ConnectionTypeTree {
5075
5077
  */
5076
5078
  static addConnectionToTree(connection) {
5077
5079
  if (connection.id > 0) {
5078
- let key = this.CreateCompositionKey(connection.ofTheConceptId, connection.typeId);
5080
+ let key = this.CreateCompositionKey(connection.typeId);
5079
5081
  if (this.connectionTypeRoot) {
5080
5082
  // let event = new Event(`${key}`);
5081
5083
  // // console.log("dispatched the of the concecpt event", event);
@@ -5122,7 +5124,7 @@ class ConnectionTypeTree {
5122
5124
  // return this.connectionTypeRoot;
5123
5125
  // }
5124
5126
  static GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId) {
5125
- let key = this.CreateCompositionKey(ofTheConceptId, typeId);
5127
+ let key = this.CreateCompositionKey(typeId);
5126
5128
  if (this.connectionTypeRoot) {
5127
5129
  let existingNode = this.connectionTypeRoot.getFromNode(key, this.connectionTypeRoot);
5128
5130
  if (existingNode) {
@@ -5423,7 +5425,6 @@ class ConnectionData {
5423
5425
  connections.push(conn.value);
5424
5426
  }
5425
5427
  }
5426
- console.log("these are the connections from the local", connections, connectionIds);
5427
5428
  return connections;
5428
5429
  //let node = await ConnectionTypeTree.getNodeFromTree(id);
5429
5430
  // if(node?.value){
@@ -5444,6 +5445,7 @@ class ConnectionData {
5444
5445
  let connectionIds = [];
5445
5446
  let connections = [];
5446
5447
  connectionIds = ConnectionData.GetConnectionByOfTheConceptAndType(id, id);
5448
+ console.log("this is the id", connectionIds);
5447
5449
  for (let i = 0; i < connectionIds.length; i++) {
5448
5450
  let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_2__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);
5449
5451
  if (conn) {
@@ -11035,7 +11037,8 @@ __webpack_require__.r(__webpack_exports__);
11035
11037
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11036
11038
  /* harmony export */ DeleteConnectionByType: () => (/* binding */ DeleteConnectionByType)
11037
11039
  /* harmony export */ });
11038
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ "./src/app.ts");
11040
+ /* harmony import */ var _Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsFromTheConcept */ "./src/Api/GetAllLinkerConnectionsFromTheConcept.ts");
11041
+ /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
11039
11042
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11040
11043
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11041
11044
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -11046,10 +11049,15 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
11046
11049
  });
11047
11050
  };
11048
11051
 
11052
+
11049
11053
  function DeleteConnectionByType(id, linker) {
11050
11054
  return __awaiter(this, void 0, void 0, function* () {
11051
- let connections = yield _app__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.GetConnectionsOfConcept(id);
11052
- let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacter)(linker);
11055
+ let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
11056
+ for (let i = 0; i < externalConnections.length; i++) {
11057
+ _app__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.AddConnection(externalConnections[i]);
11058
+ }
11059
+ let connections = yield _app__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.GetConnectionsOfConcept(id);
11060
+ let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacter)(linker);
11053
11061
  let toDelete = [];
11054
11062
  for (let i = 0; i < connections.length; i++) {
11055
11063
  if (connections[i].typeId == concept.id) {
@@ -11057,7 +11065,7 @@ function DeleteConnectionByType(id, linker) {
11057
11065
  }
11058
11066
  }
11059
11067
  for (let i = 0; i < toDelete.length; i++) {
11060
- (0,_app__WEBPACK_IMPORTED_MODULE_0__.DeleteConnectionById)(toDelete[i].id);
11068
+ (0,_app__WEBPACK_IMPORTED_MODULE_1__.DeleteConnectionById)(toDelete[i].id);
11061
11069
  }
11062
11070
  });
11063
11071
  }
@@ -12935,12 +12943,10 @@ function GetTheConcept(id_1) {
12935
12943
  return concept;
12936
12944
  }
12937
12945
  concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);
12938
- console.log("this is the concept form memory", concept);
12939
12946
  if ((concept == null || concept.id == 0) && id != null && id != undefined) {
12940
12947
  let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);
12941
12948
  concept = conceptString;
12942
12949
  }
12943
- console.log("this is the concept from network", concept);
12944
12950
  if (concept.id != 0) {
12945
12951
  if (concept.type == null) {
12946
12952
  let conceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(concept.typeId);