mftsccs-browser 1.1.11 → 1.1.13
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
|
@@ -6491,6 +6491,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6491
6491
|
/* harmony import */ var _ConceptData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ConceptData */ "./src/DataStructures/ConceptData.ts");
|
|
6492
6492
|
/* harmony import */ var _LocalGhostIdTree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./LocalGhostIdTree */ "./src/DataStructures/Local/LocalGhostIdTree.ts");
|
|
6493
6493
|
/* harmony import */ var _LocalConnectionData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./LocalConnectionData */ "./src/DataStructures/Local/LocalConnectionData.ts");
|
|
6494
|
+
/* harmony import */ var _LocalSyncData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LocalSyncData */ "./src/DataStructures/Local/LocalSyncData.ts");
|
|
6494
6495
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6495
6496
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6496
6497
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -6508,6 +6509,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
6508
6509
|
|
|
6509
6510
|
|
|
6510
6511
|
|
|
6512
|
+
|
|
6511
6513
|
class LocalConceptsData {
|
|
6512
6514
|
constructor() {
|
|
6513
6515
|
this.name = "conceptsArray";
|
|
@@ -6546,6 +6548,23 @@ class LocalConceptsData {
|
|
|
6546
6548
|
}
|
|
6547
6549
|
});
|
|
6548
6550
|
}
|
|
6551
|
+
static RemoveConceptById(conceptId) {
|
|
6552
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6553
|
+
try {
|
|
6554
|
+
let concept = yield LocalConceptsData.GetConcept(conceptId);
|
|
6555
|
+
if (concept.id != 0) {
|
|
6556
|
+
_LocalBinaryTree__WEBPACK_IMPORTED_MODULE_1__.LocalBinaryTree.removeNodeFromTree(conceptId);
|
|
6557
|
+
_LocalBinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.LocalBinaryCharacterTree.removeConceptType(concept.characterValue, concept.ghostId);
|
|
6558
|
+
_LocalBinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.LocalBinaryTypeTree.removeConceptType(concept.typeId, concept.ghostId);
|
|
6559
|
+
_LocalSyncData__WEBPACK_IMPORTED_MODULE_8__.LocalSyncData.RemoveConcept(concept);
|
|
6560
|
+
// await removeFromDatabase("localconcept", concept.ghostId);
|
|
6561
|
+
}
|
|
6562
|
+
}
|
|
6563
|
+
catch (error) {
|
|
6564
|
+
throw error;
|
|
6565
|
+
}
|
|
6566
|
+
});
|
|
6567
|
+
}
|
|
6549
6568
|
static AddConceptToMemory(concept) {
|
|
6550
6569
|
if (concept.id != 0) {
|
|
6551
6570
|
_LocalBinaryTree__WEBPACK_IMPORTED_MODULE_1__.LocalBinaryTree.addConceptToTree(concept);
|
|
@@ -6679,6 +6698,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6679
6698
|
/* harmony import */ var _Services_Local_ConvertFromLConnectionToConnection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Services/Local/ConvertFromLConnectionToConnection */ "./src/Services/Local/ConvertFromLConnectionToConnection.ts");
|
|
6680
6699
|
/* harmony import */ var _ConnectionData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ConnectionData */ "./src/DataStructures/ConnectionData.ts");
|
|
6681
6700
|
/* harmony import */ var _IdentifierFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IdentifierFlags */ "./src/DataStructures/IdentifierFlags.ts");
|
|
6701
|
+
/* harmony import */ var _LocalSyncData__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LocalSyncData */ "./src/DataStructures/Local/LocalSyncData.ts");
|
|
6682
6702
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6683
6703
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6684
6704
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -6693,6 +6713,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
6693
6713
|
|
|
6694
6714
|
|
|
6695
6715
|
|
|
6716
|
+
|
|
6696
6717
|
class LocalConnectionData {
|
|
6697
6718
|
constructor() {
|
|
6698
6719
|
this.name = "Connection Array";
|
|
@@ -6727,7 +6748,6 @@ class LocalConnectionData {
|
|
|
6727
6748
|
this.connectionDictionary[connection.id] = connection;
|
|
6728
6749
|
}
|
|
6729
6750
|
static RemoveConnection(connection) {
|
|
6730
|
-
console.log("this is removing", connection);
|
|
6731
6751
|
for (var i = 0; i < this.connectionArray.length; i++) {
|
|
6732
6752
|
if (this.connectionArray[i].id == connection.id) {
|
|
6733
6753
|
this.connectionArray.splice(i, 1);
|
|
@@ -6737,6 +6757,14 @@ class LocalConnectionData {
|
|
|
6737
6757
|
// removeFromDatabase("connection",connection.id);
|
|
6738
6758
|
}
|
|
6739
6759
|
}
|
|
6760
|
+
static RemoveConnectionById(connectionId) {
|
|
6761
|
+
for (var i = 0; i < this.connectionArray.length; i++) {
|
|
6762
|
+
if (this.connectionArray[i].id == connectionId) {
|
|
6763
|
+
this.connectionArray.splice(i, 1);
|
|
6764
|
+
}
|
|
6765
|
+
}
|
|
6766
|
+
_LocalSyncData__WEBPACK_IMPORTED_MODULE_4__.LocalSyncData.RemoveConnectionById(connectionId);
|
|
6767
|
+
}
|
|
6740
6768
|
static AddPermanentConnection(connection) {
|
|
6741
6769
|
if (connection.id > 0) {
|
|
6742
6770
|
(0,_Database_indexdblocal__WEBPACK_IMPORTED_MODULE_0__.removeFromDatabase)("localconnection", connection.ghostId);
|
|
@@ -7281,6 +7309,13 @@ class LocalSyncData {
|
|
|
7281
7309
|
}
|
|
7282
7310
|
}
|
|
7283
7311
|
}
|
|
7312
|
+
static RemoveConnectionById(connectionId) {
|
|
7313
|
+
for (var i = 0; i < this.connectionSyncArray.length; i++) {
|
|
7314
|
+
if (this.connectionSyncArray[i].id == connectionId) {
|
|
7315
|
+
this.connectionSyncArray.splice(i, 1);
|
|
7316
|
+
}
|
|
7317
|
+
}
|
|
7318
|
+
}
|
|
7284
7319
|
static syncDataLocalDb() {
|
|
7285
7320
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7286
7321
|
if (this.conceptsSyncArray.length > 0) {
|
|
@@ -10971,7 +11006,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10971
11006
|
/* harmony import */ var _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/BinaryTree */ "./src/DataStructures/BinaryTree.ts");
|
|
10972
11007
|
/* harmony import */ var _DataStructures_BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/BinaryTypeTree */ "./src/DataStructures/BinaryTypeTree.ts");
|
|
10973
11008
|
/* harmony import */ var _DataStructures_ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DataStructures/ConnectionBinaryTree/ConnectionOfTheTree */ "./src/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.ts");
|
|
10974
|
-
/* harmony import */ var
|
|
11009
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ "./src/app.ts");
|
|
11010
|
+
/* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GetTheConcept */ "./src/Services/GetTheConcept.ts");
|
|
10975
11011
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10976
11012
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10977
11013
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10987,17 +11023,23 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
10987
11023
|
|
|
10988
11024
|
|
|
10989
11025
|
|
|
11026
|
+
|
|
10990
11027
|
function DeleteConceptById(id) {
|
|
10991
11028
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11029
|
+
if (id > 0) {
|
|
11030
|
+
var concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_6__["default"])(id);
|
|
11031
|
+
var typeId = concept.typeId;
|
|
11032
|
+
var character = concept.characterValue;
|
|
11033
|
+
yield _DataStructures_BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.removeTypeConcept(typeId, id);
|
|
11034
|
+
yield _DataStructures_BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_1__.BinaryCharacterTree.removeNodeByCharacter(character, id);
|
|
11035
|
+
//removeFromDatabase("concept",id);
|
|
11036
|
+
yield (0,_Api_DeleteTheConcept__WEBPACK_IMPORTED_MODULE_0__["default"])(id);
|
|
11037
|
+
yield _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_2__.BinaryTree.removeNodeFromTree(id);
|
|
11038
|
+
yield _DataStructures_ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionOfTheTree.removeNodeFromTree(id);
|
|
11039
|
+
}
|
|
11040
|
+
else {
|
|
11041
|
+
_app__WEBPACK_IMPORTED_MODULE_5__.LocalConceptsData.RemoveConceptById(id);
|
|
11042
|
+
}
|
|
11001
11043
|
});
|
|
11002
11044
|
}
|
|
11003
11045
|
|
|
@@ -11016,7 +11058,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11016
11058
|
/* harmony export */ });
|
|
11017
11059
|
/* harmony import */ var _Api_DeleteTheConnection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/DeleteTheConnection */ "./src/Api/DeleteTheConnection.ts");
|
|
11018
11060
|
/* harmony import */ var _DataStructures_ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConnectionBinaryTree/ConnectionBinaryTree */ "./src/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.ts");
|
|
11019
|
-
/* harmony import */ var
|
|
11061
|
+
/* harmony import */ var _DataStructures_Local_LocalConnectionData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/Local/LocalConnectionData */ "./src/DataStructures/Local/LocalConnectionData.ts");
|
|
11062
|
+
/* harmony import */ var _GetConnections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GetConnections */ "./src/Services/GetConnections.ts");
|
|
11020
11063
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11021
11064
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11022
11065
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -11029,12 +11072,18 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
11029
11072
|
|
|
11030
11073
|
|
|
11031
11074
|
|
|
11075
|
+
|
|
11032
11076
|
function DeleteConnectionById(id) {
|
|
11033
11077
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11078
|
+
if (id > 0) {
|
|
11079
|
+
let connection = yield (0,_GetConnections__WEBPACK_IMPORTED_MODULE_3__.GetConnectionById)(id);
|
|
11080
|
+
yield (0,_Api_DeleteTheConnection__WEBPACK_IMPORTED_MODULE_0__["default"])(id);
|
|
11081
|
+
//removeFromDatabase("connection",id);
|
|
11082
|
+
_DataStructures_ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_1__.ConnectionBinaryTree.removeNodeFromTree(id);
|
|
11083
|
+
}
|
|
11084
|
+
else {
|
|
11085
|
+
_DataStructures_Local_LocalConnectionData__WEBPACK_IMPORTED_MODULE_2__.LocalConnectionData.RemoveConnectionById(id);
|
|
11086
|
+
}
|
|
11038
11087
|
//ConnectionTypeTree.removeTypeConcept(connection.typeId,id);
|
|
11039
11088
|
});
|
|
11040
11089
|
}
|
|
@@ -13244,7 +13293,7 @@ function PopulateTheLocalConceptsToMemory() {
|
|
|
13244
13293
|
_DataStructures_Local_LocalId__WEBPACK_IMPORTED_MODULE_2__.LocalId.AddConceptId(idList[0]);
|
|
13245
13294
|
// update the indexdb with the new concept value that other programs can use and
|
|
13246
13295
|
// reserve the 10 ids for this program.
|
|
13247
|
-
|
|
13296
|
+
// await UpdateToDatabase("localid", {"id": 0, "value": localConceptIdValue - 10});
|
|
13248
13297
|
}
|
|
13249
13298
|
else {
|
|
13250
13299
|
// incase there is invalid id then choose a random id .
|
|
@@ -16593,6 +16642,7 @@ class GetLinkObservable extends _DepenedencyObserver__WEBPACK_IMPORTED_MODULE_3_
|
|
|
16593
16642
|
}
|
|
16594
16643
|
build() {
|
|
16595
16644
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16645
|
+
this.connections = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetConnectionBulk)(this.linkers);
|
|
16596
16646
|
for (var i = 0; i < this.connections.length; i++) {
|
|
16597
16647
|
let toConceptId = this.connections[i].toTheConceptId;
|
|
16598
16648
|
let toConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(toConceptId);
|
|
@@ -17268,11 +17318,16 @@ function init() {
|
|
|
17268
17318
|
* is only valid for the browser that creates this. We have a translator in our node server.
|
|
17269
17319
|
* This function does this process in initlization.
|
|
17270
17320
|
*/
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
|
|
17321
|
+
(0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_96__.PopulateTheLocalConceptsToMemory)().then(() => {
|
|
17322
|
+
}).catch((event) => {
|
|
17323
|
+
console.log("This is the error in populating binary tree");
|
|
17324
|
+
throw event;
|
|
17325
|
+
});
|
|
17326
|
+
(0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_96__.PopulateTheLocalConnectionToMemory)().then(() => {
|
|
17327
|
+
}).catch((event) => {
|
|
17328
|
+
console.log("This is the error in populating binary tree");
|
|
17329
|
+
throw event;
|
|
17330
|
+
});
|
|
17276
17331
|
/**
|
|
17277
17332
|
* This process gets the connections from indexdb and loads it to the connections array which is inside of
|
|
17278
17333
|
* a static class called ConnectionData.
|