mftsccs-browser 1.1.46-beta → 1.1.48-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
CHANGED
|
@@ -11966,7 +11966,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11966
11966
|
/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* binding */ GetAllTheConnectionsByTypeAndOfTheConcept)
|
|
11967
11967
|
/* harmony export */ });
|
|
11968
11968
|
/* harmony import */ var _Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsFromTheConcept */ "./src/Api/GetAllLinkerConnectionsFromTheConcept.ts");
|
|
11969
|
-
/* harmony import */ var
|
|
11969
|
+
/* harmony import */ var _Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsToTheConcept */ "./src/Api/GetAllLinkerConnectionsToTheConcept.ts");
|
|
11970
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ "./src/app.ts");
|
|
11970
11971
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11971
11972
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11972
11973
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -11978,19 +11979,20 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
11978
11979
|
};
|
|
11979
11980
|
|
|
11980
11981
|
|
|
11982
|
+
|
|
11981
11983
|
function DeleteConnectionByType(id, linker) {
|
|
11982
11984
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11983
|
-
if (
|
|
11984
|
-
const res = yield (0,
|
|
11985
|
+
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
11986
|
+
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('DeleteConnectionByType', { id, linker });
|
|
11985
11987
|
// console.log('data received from sw', res)
|
|
11986
11988
|
return res.data;
|
|
11987
11989
|
}
|
|
11988
11990
|
let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
|
|
11989
11991
|
for (let i = 0; i < externalConnections.length; i++) {
|
|
11990
|
-
|
|
11992
|
+
_app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);
|
|
11991
11993
|
}
|
|
11992
|
-
let connections = yield
|
|
11993
|
-
let concept = yield (0,
|
|
11994
|
+
let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);
|
|
11995
|
+
let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);
|
|
11994
11996
|
let toDelete = [];
|
|
11995
11997
|
for (let i = 0; i < connections.length; i++) {
|
|
11996
11998
|
if (connections[i].typeId == concept.id) {
|
|
@@ -11998,7 +12000,7 @@ function DeleteConnectionByType(id, linker) {
|
|
|
11998
12000
|
}
|
|
11999
12001
|
}
|
|
12000
12002
|
for (let i = 0; i < toDelete.length; i++) {
|
|
12001
|
-
(0,
|
|
12003
|
+
(0,_app__WEBPACK_IMPORTED_MODULE_2__.DeleteConnectionById)(toDelete[i].id);
|
|
12002
12004
|
}
|
|
12003
12005
|
});
|
|
12004
12006
|
}
|
|
@@ -12008,23 +12010,34 @@ function DeleteConnectionByType(id, linker) {
|
|
|
12008
12010
|
* @param linker the connection type
|
|
12009
12011
|
* @returns Array of connections
|
|
12010
12012
|
*/
|
|
12011
|
-
function GetAllTheConnectionsByTypeAndOfTheConcept(
|
|
12012
|
-
return __awaiter(this,
|
|
12013
|
-
if (
|
|
12014
|
-
const res = yield (0,
|
|
12013
|
+
function GetAllTheConnectionsByTypeAndOfTheConcept(id_1, linker_1) {
|
|
12014
|
+
return __awaiter(this, arguments, void 0, function* (id, linker, reverse = false) {
|
|
12015
|
+
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
12016
|
+
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetAllTheConnectionsByTypeAndOfTheConcept', { id, linker, reverse });
|
|
12015
12017
|
// console.log('data received from sw', res)
|
|
12016
12018
|
return res.data;
|
|
12017
12019
|
}
|
|
12018
|
-
let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
|
|
12019
|
-
for (let i = 0; i < externalConnections.length; i++) {
|
|
12020
|
-
_app__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.AddConnection(externalConnections[i]);
|
|
12021
|
-
}
|
|
12022
12020
|
let toDelete = [];
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12021
|
+
if (reverse) {
|
|
12022
|
+
let externalConnections = yield (0,_Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__.GetAllLinkerConnectionsToTheConcept)(id);
|
|
12023
|
+
let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.MakeTheTypeConceptApi)(linker, 999);
|
|
12024
|
+
for (let i = 0; i < externalConnections.length; i++) {
|
|
12025
|
+
if (externalConnections[i].typeId == concept.id) {
|
|
12026
|
+
toDelete.push(externalConnections[i]);
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
12029
|
+
}
|
|
12030
|
+
else {
|
|
12031
|
+
let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
|
|
12032
|
+
for (let i = 0; i < externalConnections.length; i++) {
|
|
12033
|
+
_app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);
|
|
12034
|
+
}
|
|
12035
|
+
let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);
|
|
12036
|
+
let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);
|
|
12037
|
+
for (let i = 0; i < connections.length; i++) {
|
|
12038
|
+
if (connections[i].typeId == concept.id) {
|
|
12039
|
+
toDelete.push(connections[i]);
|
|
12040
|
+
}
|
|
12028
12041
|
}
|
|
12029
12042
|
}
|
|
12030
12043
|
return toDelete;
|
|
@@ -14662,7 +14675,7 @@ function CreateTheConnectionLocal(ofTheConceptId_1, toTheConceptId_1, typeId_1)
|
|
|
14662
14675
|
connection = new _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_0__.Connection(randomid, realOfTheConceptId, realToTheConceptId, userId, typeId, orderId, accessId);
|
|
14663
14676
|
connection.isTemp = true;
|
|
14664
14677
|
connection.typeCharacter = typeString;
|
|
14665
|
-
|
|
14678
|
+
_app__WEBPACK_IMPORTED_MODULE_3__.LocalSyncData.AddConnection(connection);
|
|
14666
14679
|
_DataStructures_Local_LocalConnectionData__WEBPACK_IMPORTED_MODULE_1__.LocalConnectionData.AddConnection(connection);
|
|
14667
14680
|
actions.connections.push(connection);
|
|
14668
14681
|
//storeToDatabase("localconnection", connection);
|