mftsccs-browser 1.1.21 → 1.1.22-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.
Files changed (47) hide show
  1. package/dist/main.bundle.js +62 -142
  2. package/dist/main.bundle.js.map +1 -1
  3. package/dist/serviceWorker.bundle.js +77 -218
  4. package/dist/serviceWorker.bundle.js.map +1 -1
  5. package/dist/types/Api/GetAllConnectionsOfCompositionBulk.d.ts +1 -1
  6. package/dist/types/Api/GetCompositionConnectionsBetweenTwoConcepts.d.ts +1 -2
  7. package/dist/types/Api/GetConcept.d.ts +1 -2
  8. package/dist/types/Api/GetConceptByCharacterAndType.d.ts +1 -2
  9. package/dist/types/Api/GetConnectionOfTheConcept.d.ts +1 -2
  10. package/dist/types/Api/RecursiveSearch.d.ts +1 -1
  11. package/dist/types/DataStructures/BaseUrl.d.ts +3 -1
  12. package/dist/types/DataStructures/ConnectionData.d.ts +3 -3
  13. package/dist/types/DataStructures/Local/LocalSyncData.d.ts +12 -1
  14. package/dist/types/DataStructures/Search/FreeschemaQuery.d.ts +0 -2
  15. package/dist/types/DataStructures/SyncData.d.ts +1 -1
  16. package/dist/types/Services/CreateConnectionBetweenTwoConcepts.d.ts +1 -1
  17. package/dist/types/Services/CreateTheComposition.d.ts +1 -2
  18. package/dist/types/Services/DeleteConcept.d.ts +1 -1
  19. package/dist/types/Services/DeleteConnection.d.ts +1 -1
  20. package/dist/types/Services/DeleteConnectionByType.d.ts +1 -1
  21. package/dist/types/Services/GetComposition.d.ts +1 -4
  22. package/dist/types/Services/GetCompositionBulk.d.ts +1 -1
  23. package/dist/types/Services/GetConnectionBetweenTwoConceptsLinker.d.ts +2 -2
  24. package/dist/types/Services/GetConnections.d.ts +1 -2
  25. package/dist/types/Services/GetLink.d.ts +1 -1
  26. package/dist/types/Services/GetTheConcept.d.ts +1 -2
  27. package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +2 -2
  28. package/dist/types/Services/Local/CreateTheCompositionLocal.d.ts +2 -2
  29. package/dist/types/Services/Local/CreateTheConceptLocal.d.ts +2 -2
  30. package/dist/types/Services/Local/CreateTheConnectionLocal.d.ts +2 -2
  31. package/dist/types/Services/Local/DeleteConceptLocal.d.ts +1 -1
  32. package/dist/types/Services/Local/GetConceptByCharacterLocal.d.ts +1 -1
  33. package/dist/types/Services/Local/GetTheConceptLocal.d.ts +1 -2
  34. package/dist/types/Services/Local/MakeTheConceptLocal.d.ts +2 -2
  35. package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +3 -2
  36. package/dist/types/Services/Local/MakeTheTypeLocal.d.ts +3 -1
  37. package/dist/types/Services/Local/UpdateCompositionLocal.d.ts +3 -2
  38. package/dist/types/Services/MakeTheInstanceConcept.d.ts +1 -2
  39. package/dist/types/Services/MakeTheTimestamp.d.ts +1 -2
  40. package/dist/types/Services/MakeTheTypeConcept.d.ts +1 -2
  41. package/dist/types/Services/Search/FormatData.d.ts +2 -36
  42. package/dist/types/Services/Search/SearchWithTypeAndLinker.d.ts +0 -20
  43. package/dist/types/Services/UpdateComposition.d.ts +1 -1
  44. package/dist/types/WrapperFunctions/RecursiveSearchObservable.d.ts +7 -0
  45. package/dist/types/app.d.ts +18 -1
  46. package/package.json +9 -4
  47. package/scripts/postinstall.js +68 -0
@@ -1003,7 +1003,7 @@ function GetAllConnectionsOfCompositionBulk() {
1003
1003
  return __awaiter(this, arguments, void 0, function* (composition_ids = []) {
1004
1004
  if (_app__WEBPACK_IMPORTED_MODULE_7__.serviceWorker) {
1005
1005
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_7__.sendMessage)('GetAllConnectionsOfCompositionBulk', { composition_ids });
1006
- // console.log('data received from sw', res)
1006
+ console.log('data received from sw', res);
1007
1007
  return res.data;
1008
1008
  }
1009
1009
  var connectionList = [];
@@ -1214,7 +1214,7 @@ function GetCompositionConnectionsBetweenTwoConcepts(ofConceptId, toConcept, mai
1214
1214
  return __awaiter(this, void 0, void 0, function* () {
1215
1215
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1216
1216
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetCompositionConnectionsBetweenTwoConcepts', { ofConceptId, toConcept, mainKey });
1217
- // console.log('data received from sw', res)
1217
+ console.log('data received from sw', res);
1218
1218
  return res.data;
1219
1219
  }
1220
1220
  var connectionList = [];
@@ -1295,7 +1295,7 @@ function GetConcept(id) {
1295
1295
  try {
1296
1296
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1297
1297
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConcept', { id });
1298
- // console.log('data received from sw', res)
1298
+ console.log('data received from sw', res);
1299
1299
  return res.data;
1300
1300
  }
1301
1301
  let result = (0,_app__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();
@@ -1359,7 +1359,6 @@ __webpack_require__.r(__webpack_exports__);
1359
1359
  /* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ "./src/DataStructures/BaseUrl.ts");
1360
1360
  /* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ "./src/Services/Security/GetRequestHeader.ts");
1361
1361
  /* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
1362
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ "./src/app.ts");
1363
1362
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
1364
1363
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1365
1364
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -1373,7 +1372,6 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
1373
1372
 
1374
1373
 
1375
1374
 
1376
-
1377
1375
  /**
1378
1376
  * This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts
1379
1377
  * namely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from
@@ -1383,11 +1381,6 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
1383
1381
  */
1384
1382
  function GetConceptBulk(passedConcepts) {
1385
1383
  return __awaiter(this, void 0, void 0, function* () {
1386
- if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
1387
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptBulk', { passedConcepts });
1388
- // console.log('data received from sw', res)
1389
- return res.data;
1390
- }
1391
1384
  let result = [];
1392
1385
  let setTime = new Date().getTime();
1393
1386
  // let conceptIds = passedConcepts.filter((value, index, self) => {
@@ -1534,7 +1527,7 @@ function GetConceptByCharacterAndType(characterValue, typeId) {
1534
1527
  try {
1535
1528
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
1536
1529
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptByCharacterAndType', { characterValue, typeId });
1537
- // console.log('data received from sw', res)
1530
+ console.log('data received from sw', res);
1538
1531
  return res.data;
1539
1532
  }
1540
1533
  let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, typeId);
@@ -1751,7 +1744,7 @@ function GetConnectionBulk() {
1751
1744
  return __awaiter(this, arguments, void 0, function* (connectionIds = []) {
1752
1745
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
1753
1746
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConnectionBulk', { connectionIds });
1754
- // console.log('data received from sw', res)
1747
+ console.log('data received from sw', res);
1755
1748
  return res.data;
1756
1749
  }
1757
1750
  let connectionList = [];
@@ -1849,7 +1842,7 @@ function GetConnectionOfTheConcept(typeId_1, ofTheConceptId_1, userId_1) {
1849
1842
  return __awaiter(this, arguments, void 0, function* (typeId, ofTheConceptId, userId, inpage = 10, page = 1) {
1850
1843
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
1851
1844
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConnectionOfTheConcept', { typeId, ofTheConceptId, userId, inpage, page });
1852
- // console.log('data received from sw', res)
1845
+ console.log('data received from sw', res);
1853
1846
  return res.data;
1854
1847
  }
1855
1848
  let connectionList = [];
@@ -2318,7 +2311,7 @@ function RecursiveSearchApi() {
2318
2311
  listLinkers,
2319
2312
  textSearch,
2320
2313
  });
2321
- // console.log("data received from sw", res);
2314
+ console.log("data received from sw", res);
2322
2315
  return res.data;
2323
2316
  }
2324
2317
  let concepts = [];
@@ -2367,7 +2360,7 @@ function RecursiveSearchApiRaw() {
2367
2360
  listLinkers,
2368
2361
  textSearch,
2369
2362
  });
2370
- // console.log("data received from sw", res);
2363
+ console.log("data received from sw", res);
2371
2364
  return res.data;
2372
2365
  }
2373
2366
  let concepts = [];
@@ -2416,7 +2409,7 @@ function RecursiveSearchApiRawFullLinker() {
2416
2409
  fullLinkers,
2417
2410
  textSearch,
2418
2411
  });
2419
- // console.log("data received from sw", res);
2412
+ console.log("data received from sw", res);
2420
2413
  return res.data;
2421
2414
  }
2422
2415
  let concepts = [];
@@ -2465,7 +2458,7 @@ function RecursiveSearchApiNewRawFullLinker() {
2465
2458
  fullLinkers,
2466
2459
  textSearch,
2467
2460
  });
2468
- // console.log("data received from sw", res);
2461
+ console.log("data received from sw", res);
2469
2462
  return res.data;
2470
2463
  }
2471
2464
  let concepts = [];
@@ -4474,7 +4467,6 @@ __webpack_require__.r(__webpack_exports__);
4474
4467
  /* harmony import */ var _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BinaryCharacterTree */ "./src/DataStructures/BinaryCharacterTree.ts");
4475
4468
  /* harmony import */ var _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BinaryTypeTree */ "./src/DataStructures/BinaryTypeTree.ts");
4476
4469
  /* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ "./src/Services/CreateDefaultConcept.ts");
4477
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ "./src/app.ts");
4478
4470
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
4479
4471
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4480
4472
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -4489,7 +4481,6 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
4489
4481
 
4490
4482
 
4491
4483
 
4492
-
4493
4484
  class ConceptsData {
4494
4485
  constructor() {
4495
4486
  this.name = "conceptsArray";
@@ -4528,11 +4519,6 @@ class ConceptsData {
4528
4519
  });
4529
4520
  }
4530
4521
  static AddConcept(concept) {
4531
- if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4532
- const res = (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('AddConcept', { concept }); // is async function
4533
- // console.log('data received from sw', res)
4534
- // return res.data // remove comment when this function is async
4535
- }
4536
4522
  if (concept.id > 0) {
4537
4523
  // console.log("added the concept to the tree", concept);
4538
4524
  //var contains = this.CheckContains(concept);
@@ -4577,11 +4563,6 @@ class ConceptsData {
4577
4563
  }
4578
4564
  static GetConcept(id) {
4579
4565
  return __awaiter(this, void 0, void 0, function* () {
4580
- if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4581
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConcept', { id });
4582
- // console.log('data received from sw', res)
4583
- return res.data;
4584
- }
4585
4566
  var myConcept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();
4586
4567
  var node = yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getNodeFromTree(id);
4587
4568
  if (node === null || node === void 0 ? void 0 : node.value) {
@@ -4652,11 +4633,6 @@ class ConceptsData {
4652
4633
  }
4653
4634
  static GetConceptsByTypeIdAndUser(typeId, userId) {
4654
4635
  return __awaiter(this, void 0, void 0, function* () {
4655
- if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
4656
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConceptsByTypeIdAndUser', { typeId, userId });
4657
- // console.log('data received from sw', res)
4658
- return res.data;
4659
- }
4660
4636
  let ConceptList = [];
4661
4637
  ConceptList = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsFromTreeWithUserIdNew(typeId, userId);
4662
4638
  return ConceptList;
@@ -5822,7 +5798,7 @@ class ConnectionData {
5822
5798
  return __awaiter(this, void 0, void 0, function* () {
5823
5799
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5824
5800
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionByOfTheConceptAndType", { ofTheConceptId, typeId });
5825
- // console.log("data received from sw", res);
5801
+ console.log("data received from sw", res);
5826
5802
  return res.data;
5827
5803
  }
5828
5804
  let connections = _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionOfTheTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);
@@ -5854,7 +5830,7 @@ class ConnectionData {
5854
5830
  return __awaiter(this, void 0, void 0, function* () {
5855
5831
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5856
5832
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('ConnectionData__GetConnection', { id });
5857
- // console.log('data received from sw', res)
5833
+ console.log('data received from sw', res);
5858
5834
  return res.data;
5859
5835
  }
5860
5836
  // var myConcept: Connection|null;
@@ -5891,7 +5867,7 @@ class ConnectionData {
5891
5867
  return __awaiter(this, void 0, void 0, function* () {
5892
5868
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5893
5869
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionsOfCompositionLocal", { id });
5894
- // console.log("data received from sw", res);
5870
+ console.log("data received from sw", res);
5895
5871
  return res.data;
5896
5872
  }
5897
5873
  let connections = [];
@@ -5920,11 +5896,6 @@ class ConnectionData {
5920
5896
  }
5921
5897
  static GetConnectionsOfConcept(id) {
5922
5898
  return __awaiter(this, void 0, void 0, function* () {
5923
- if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
5924
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("ConnectionData__GetConnectionsOfConcept", { id });
5925
- // console.log("data received from sw", res);
5926
- return res.data;
5927
- }
5928
5899
  let connectionIds = [];
5929
5900
  let connections = [];
5930
5901
  connectionIds = yield ConnectionData.GetConnectionByOfTheConceptAndType(id, id);
@@ -8737,7 +8708,6 @@ class FreeschemaQuery {
8737
8708
  this.typeConnection = "";
8738
8709
  this.outputFormat = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_0__.NORMAL;
8739
8710
  this.name = "";
8740
- this.reverse = false;
8741
8711
  }
8742
8712
  }
8743
8713
 
@@ -11209,7 +11179,7 @@ function CreateConnectionBetweenTwoConcepts(ofTheConcept_1, toTheConcept_1, link
11209
11179
  var _a, _b;
11210
11180
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
11211
11181
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('CreateConnectionBetweenTwoConcepts', { ofTheConcept, toTheConcept, linker, both, count });
11212
- // console.log('data received from sw', res)
11182
+ console.log('data received from sw', res);
11213
11183
  return res.data;
11214
11184
  }
11215
11185
  let userId = ofTheConcept.userId;
@@ -11361,7 +11331,7 @@ function CreateTheComposition(json_1) {
11361
11331
  return __awaiter(this, arguments, void 0, function* (json, ofTheConceptId = null, ofTheConceptUserId = null, mainKey = null, userId = null, accessId = null, sessionInformationId = null) {
11362
11332
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
11363
11333
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheComposition', { json, ofTheConceptId, ofTheConceptUserId, mainKey, userId, accessId, sessionInformationId });
11364
- // console.log('data received from sw', res)
11334
+ console.log('data received from sw', res);
11365
11335
  return res.data;
11366
11336
  }
11367
11337
  let localUserId = userId !== null && userId !== void 0 ? userId : 999;
@@ -11622,7 +11592,7 @@ function DeleteConceptById(id) {
11622
11592
  return __awaiter(this, void 0, void 0, function* () {
11623
11593
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
11624
11594
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('DeleteConceptById', { id });
11625
- // console.log('data received from sw', res)
11595
+ console.log('data received from sw', res);
11626
11596
  return res.data;
11627
11597
  }
11628
11598
  if (id > 0) {
@@ -11678,7 +11648,7 @@ function DeleteConnectionById(id) {
11678
11648
  return __awaiter(this, void 0, void 0, function* () {
11679
11649
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
11680
11650
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('DeleteConnectionById', { id });
11681
- // console.log('data received from sw', res)
11651
+ console.log('data received from sw', res);
11682
11652
  return res.data;
11683
11653
  }
11684
11654
  if (id > 0) {
@@ -11724,7 +11694,7 @@ function DeleteConnectionByType(id, linker) {
11724
11694
  return __awaiter(this, void 0, void 0, function* () {
11725
11695
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
11726
11696
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('DeleteConnectionByType', { id, linker });
11727
- // console.log('data received from sw', res)
11697
+ console.log('data received from sw', res);
11728
11698
  return res.data;
11729
11699
  }
11730
11700
  let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);
@@ -11803,8 +11773,7 @@ __webpack_require__.r(__webpack_exports__);
11803
11773
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11804
11774
  /* harmony export */ FindConnectionsOfCompositionsBulkInMemory: () => (/* binding */ FindConnectionsOfCompositionsBulkInMemory)
11805
11775
  /* harmony export */ });
11806
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ "./src/app.ts");
11807
- /* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ "./src/DataStructures/ConnectionData.ts");
11776
+ /* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ "./src/DataStructures/ConnectionData.ts");
11808
11777
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11809
11778
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11810
11779
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -11815,18 +11784,12 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
11815
11784
  });
11816
11785
  };
11817
11786
 
11818
-
11819
11787
  function FindConnectionsOfCompositionsBulkInMemory() {
11820
11788
  return __awaiter(this, arguments, void 0, function* (composition_ids = []) {
11821
- if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
11822
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('FindConnectionsOfCompositionsBulkInMemory', { composition_ids });
11823
- // console.log('data received from sw', res)
11824
- return res.data;
11825
- }
11826
11789
  let FinalConnectionList = [];
11827
11790
  for (let i = 0; i < composition_ids.length; i++) {
11828
11791
  // let connectionList = await ConnectionData.GetConnectionsOfCompositionLocal(composition_ids[i]);
11829
- let connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.GetConnectionsOfConcept(composition_ids[i]);
11792
+ let connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.GetConnectionsOfConcept(composition_ids[i]);
11830
11793
  FinalConnectionList.push(...connectionList);
11831
11794
  }
11832
11795
  return FinalConnectionList;
@@ -11886,7 +11849,7 @@ function GetCompositionById(id) {
11886
11849
  return __awaiter(this, void 0, void 0, function* () {
11887
11850
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
11888
11851
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionById', { id });
11889
- // console.log('data received from sw', res)
11852
+ console.log('data received from sw', res);
11890
11853
  return res.data;
11891
11854
  }
11892
11855
  let connectionList = [];
@@ -11989,7 +11952,7 @@ function GetComposition(id) {
11989
11952
  var _a, _b;
11990
11953
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
11991
11954
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetComposition', { id });
11992
- // console.log('data received from sw', res)
11955
+ console.log('data received from sw', res);
11993
11956
  return res.data;
11994
11957
  }
11995
11958
  let connectionList = [];
@@ -12053,7 +12016,7 @@ function GetCompositionFromMemory(id) {
12053
12016
  var _a, _b;
12054
12017
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12055
12018
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemory', { id });
12056
- // console.log('data received from sw', res)
12019
+ console.log('data received from sw', res);
12057
12020
  return res.data;
12058
12021
  }
12059
12022
  let connectionList = [];
@@ -12089,11 +12052,6 @@ function GetCompositionFromMemory(id) {
12089
12052
  function GetCompositionFromMemoryNormal(id) {
12090
12053
  return __awaiter(this, void 0, void 0, function* () {
12091
12054
  var _a, _b;
12092
- if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12093
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryNormal', { id });
12094
- // console.log('data received from sw', res)
12095
- return res.data;
12096
- }
12097
12055
  let connectionList = [];
12098
12056
  let returnOutput = {};
12099
12057
  //connectionList = await ConnectionData.GetConnectionsOfConcept(id);
@@ -12127,7 +12085,7 @@ function GetCompositionWithIdFromMemory(id) {
12127
12085
  var _a, _b;
12128
12086
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12129
12087
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });
12130
- // console.log('data received from sw', res)
12088
+ console.log('data received from sw', res);
12131
12089
  return res.data;
12132
12090
  }
12133
12091
  let connectionList = [];
@@ -12166,11 +12124,6 @@ function GetCompositionWithIdFromMemory(id) {
12166
12124
  function GetCompositionWithIdFromMemoryNew(id) {
12167
12125
  return __awaiter(this, void 0, void 0, function* () {
12168
12126
  var _a, _b;
12169
- if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12170
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemoryNew', { id });
12171
- // console.log('data received from sw', res)
12172
- return res.data;
12173
- }
12174
12127
  let connectionList = [];
12175
12128
  let returnOutput = {};
12176
12129
  //connectionList = await ConnectionData.GetConnectionsOfConcept(id);
@@ -12212,7 +12165,7 @@ function GetCompositionWithIdAndDateFromMemory(id) {
12212
12165
  var _a, _b;
12213
12166
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12214
12167
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdAndDateFromMemory', { id });
12215
- // console.log('data received from sw', res)
12168
+ console.log('data received from sw', res);
12216
12169
  return res.data;
12217
12170
  }
12218
12171
  let connectionList = [];
@@ -12276,7 +12229,7 @@ function GetCompositionWithId(id) {
12276
12229
  var _a, _b;
12277
12230
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
12278
12231
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithId', { id });
12279
- // console.log('data received from sw', res)
12232
+ console.log('data received from sw', res);
12280
12233
  return res.data;
12281
12234
  }
12282
12235
  let connectionList = [];
@@ -12775,7 +12728,7 @@ function GetCompositionFromConnectionsWithDataId() {
12775
12728
  return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {
12776
12729
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12777
12730
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataId', { conceptIds, connectionIds });
12778
- // console.log('data received from sw', res)
12731
+ console.log('data received from sw', res);
12779
12732
  return res.data;
12780
12733
  }
12781
12734
  let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);
@@ -12800,7 +12753,7 @@ function GetCompositionFromConnectionsWithDataIdIndex() {
12800
12753
  return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {
12801
12754
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12802
12755
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdIndex', { conceptIds, connectionIds });
12803
- // console.log('data received from sw', res)
12756
+ console.log('data received from sw', res);
12804
12757
  return res.data;
12805
12758
  }
12806
12759
  let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);
@@ -12843,11 +12796,6 @@ function GetCompositionFromConnectionsWithIndex() {
12843
12796
  */
12844
12797
  function GetConnectionDataPrefetch(connectionIds) {
12845
12798
  return __awaiter(this, void 0, void 0, function* () {
12846
- if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
12847
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConnectionDataPrefetch', { connectionIds });
12848
- // console.log('data received from sw', res)
12849
- return res.data;
12850
- }
12851
12799
  let remainingConnections = [];
12852
12800
  let connectionsAll = [];
12853
12801
  let remainingIds = {};
@@ -13014,7 +12962,7 @@ function GetCompositionList(compositionName_1, userId_1) {
13014
12962
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
13015
12963
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
13016
12964
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionList', { compositionName, userId, inpage, page });
13017
- // console.log('data received from sw', res)
12965
+ console.log('data received from sw', res);
13018
12966
  return res.data;
13019
12967
  }
13020
12968
  let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
@@ -13084,11 +13032,6 @@ function GetCompositionListAll(compositionName_1, userId_1) {
13084
13032
  // }
13085
13033
  function GetCompositionListAllWithId(compositionName_1, userId_1) {
13086
13034
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
13087
- if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
13088
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListAllWithId', { compositionName, userId, inpage, page });
13089
- // console.log('data received from sw', res)
13090
- return res.data;
13091
- }
13092
13035
  let conceptLocal = yield (0,_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__["default"])(compositionName);
13093
13036
  let conceptOnline = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
13094
13037
  let CompositionList = [];
@@ -13125,7 +13068,7 @@ function GetCompositionListWithId(compositionName_1, userId_1) {
13125
13068
  return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {
13126
13069
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
13127
13070
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListWithId', { compositionName, userId, inpage, page });
13128
- // console.log('data received from sw', res)
13071
+ console.log('data received from sw', res);
13129
13072
  return res.data;
13130
13073
  }
13131
13074
  let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__["default"])(compositionName);
@@ -13217,8 +13160,7 @@ __webpack_require__.r(__webpack_exports__);
13217
13160
  /* harmony export */ "default": () => (/* binding */ GetConceptByCharacter)
13218
13161
  /* harmony export */ });
13219
13162
  /* harmony import */ var _Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConceptByCharacterValue */ "./src/Api/GetConceptByCharacterValue.ts");
13220
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
13221
- /* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ "./src/DataStructures/ConceptData.ts");
13163
+ /* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConceptData */ "./src/DataStructures/ConceptData.ts");
13222
13164
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13223
13165
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13224
13166
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13230,21 +13172,15 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
13230
13172
  };
13231
13173
 
13232
13174
 
13233
-
13234
13175
  function GetConceptByCharacter(characterValue) {
13235
13176
  return __awaiter(this, void 0, void 0, function* () {
13236
- if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13237
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConceptByCharacter', { characterValue });
13238
- // console.log('data received from sw', res)
13239
- return res.data;
13240
- }
13241
- let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13177
+ let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13242
13178
  let literalCharacter = `${characterValue}`;
13243
13179
  if ((concept == null || (concept === null || concept === void 0 ? void 0 : concept.id) == 0) && literalCharacter) {
13244
13180
  yield (0,_Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterValue)(characterValue);
13245
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, 51);
13181
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, 51);
13246
13182
  if (concept.id == 0) {
13247
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13183
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13248
13184
  }
13249
13185
  }
13250
13186
  return concept;
@@ -13252,16 +13188,11 @@ function GetConceptByCharacter(characterValue) {
13252
13188
  }
13253
13189
  function GetConceptByCharacterUpdated(characterValue) {
13254
13190
  return __awaiter(this, void 0, void 0, function* () {
13255
- if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13256
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConceptByCharacterUpdated', { characterValue });
13257
- // console.log('data received from sw', res)
13258
- return res.data;
13259
- }
13260
- let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13191
+ let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13261
13192
  let literalCharacter = `${characterValue}`;
13262
13193
  if ((concept == null || (concept === null || concept === void 0 ? void 0 : concept.id) == 0) && literalCharacter) {
13263
13194
  yield (0,_Api_GetConceptByCharacterValue__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterValue)(characterValue);
13264
- concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptByCharacter(characterValue);
13195
+ concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_1__.ConceptsData.GetConceptByCharacter(characterValue);
13265
13196
  }
13266
13197
  return concept;
13267
13198
  });
@@ -13309,7 +13240,7 @@ function GetConnectionBetweenTwoConceptsLinker(ofTheConcept_1, toTheConcept_1, l
13309
13240
  var _a, _b;
13310
13241
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13311
13242
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionBetweenTwoConceptsLinker', { ofTheConcept, toTheConcept, linker, fullLinker, forward });
13312
- // console.log('data received from sw', res)
13243
+ console.log('data received from sw', res);
13313
13244
  return res.data;
13314
13245
  }
13315
13246
  let typeConcept = (0,_app__WEBPACK_IMPORTED_MODULE_1__.CreateDefaultConcept)();
@@ -13369,7 +13300,7 @@ function GetConnectionById(id) {
13369
13300
  return __awaiter(this, void 0, void 0, function* () {
13370
13301
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13371
13302
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionById', { id });
13372
- // console.log('data received from sw', res)
13303
+ console.log('data received from sw', res);
13373
13304
  return res.data;
13374
13305
  }
13375
13306
  let connection = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnection(id);
@@ -13495,7 +13426,7 @@ function GetLink(id_1, linker_1) {
13495
13426
  var _a;
13496
13427
  if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13497
13428
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetLink', { id, linker, inpage, page });
13498
- // console.log('data received from sw', res)
13429
+ console.log('data received from sw', res);
13499
13430
  return res.data;
13500
13431
  }
13501
13432
  let output = [];
@@ -13619,7 +13550,6 @@ __webpack_require__.r(__webpack_exports__);
13619
13550
  /* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GetTheConcept */ "./src/Services/GetTheConcept.ts");
13620
13551
  /* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ "./src/Api/GetAllConnectionsOfCompositionBulk.ts");
13621
13552
  /* harmony import */ var _ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConceptFinding/GetConceptByCharacterAndCategory */ "./src/Services/ConceptFinding/GetConceptByCharacterAndCategory.ts");
13622
- /* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ "./src/app.ts");
13623
13553
  var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
13624
13554
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13625
13555
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -13634,14 +13564,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
13634
13564
 
13635
13565
 
13636
13566
 
13637
-
13638
13567
  function GetRelation(id_1, relation_1) {
13639
13568
  return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {
13640
- if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13641
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelation', { id, relation, inpage, page });
13642
- // console.log('data received from sw', res)
13643
- return res.data;
13644
- }
13645
13569
  let output = [];
13646
13570
  let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__["default"])(id);
13647
13571
  let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);
@@ -13666,11 +13590,6 @@ function GetRelation(id_1, relation_1) {
13666
13590
  }
13667
13591
  function GetRelationRaw(id_1, relation_1) {
13668
13592
  return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {
13669
- if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
13670
- const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelationRaw', { id, relation, inpage, page });
13671
- // console.log('data received from sw', res)
13672
- return res.data;
13673
- }
13674
13593
  let output = [];
13675
13594
  let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__["default"])(id);
13676
13595
  let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);
@@ -13733,7 +13652,7 @@ function GetTheConcept(id_1) {
13733
13652
  try {
13734
13653
  if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
13735
13654
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetTheConcept', { id, userId });
13736
- // console.log('data received from sw', res)
13655
+ console.log('data received from sw', res);
13737
13656
  return res.data;
13738
13657
  }
13739
13658
  let concept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();
@@ -13889,7 +13808,7 @@ function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1,
13889
13808
  try {
13890
13809
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
13891
13810
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateConnectionBetweenTwoConceptsLocal', { ofTheConcept, toTheConcept, linker, both, actions });
13892
- // console.log('data received from sw', res)
13811
+ console.log('data received from sw', res);
13893
13812
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
13894
13813
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
13895
13814
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14167,7 +14086,7 @@ function CreateTheCompositionLocal(json_1) {
14167
14086
  var _a, _b, _c, _d;
14168
14087
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14169
14088
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheCompositionLocal', { json, ofTheConceptId, ofTheConceptUserId, mainKey, userId, accessId, sessionInformationId, actions });
14170
- // console.log('data received from sw', res)
14089
+ console.log('data received from sw', res);
14171
14090
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14172
14091
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14173
14092
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14269,7 +14188,7 @@ function CreateTheConceptLocal(referent_1, typecharacter_1, userId_1, categoryId
14269
14188
  try {
14270
14189
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14271
14190
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheConceptLocal', { referent, typecharacter, userId, categoryId, typeId, accessId, isComposition, referentId });
14272
- // console.log('data received from sw', res)
14191
+ console.log('data received from sw', res);
14273
14192
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14274
14193
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14275
14194
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14348,7 +14267,7 @@ function CreateTheConnectionLocal(ofTheConceptId_1, toTheConceptId_1, typeId_1)
14348
14267
  var _a, _b, _c, _d;
14349
14268
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
14350
14269
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('CreateTheConnectionLocal', { ofTheConceptId, toTheConceptId, typeId, orderId, typeString, userId, actions });
14351
- // console.log('data received from sw', res)
14270
+ console.log('data received from sw', res);
14352
14271
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14353
14272
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14354
14273
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -14415,7 +14334,7 @@ function DeleteConceptLocal(id) {
14415
14334
  return __awaiter(this, void 0, void 0, function* () {
14416
14335
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14417
14336
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('DeleteConceptLocal', { id });
14418
- // console.log('data received from sw', res)
14337
+ console.log('data received from sw', res);
14419
14338
  return res.data;
14420
14339
  }
14421
14340
  let concept = yield (0,_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_2__.GetTheConceptLocal)(id);
@@ -14464,7 +14383,7 @@ function GetCompositionListLocal(compositionName, userId) {
14464
14383
  return __awaiter(this, void 0, void 0, function* () {
14465
14384
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14466
14385
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('GetCompositionListLocal', { compositionName, userId });
14467
- // console.log('data received from sw', res)
14386
+ console.log('data received from sw', res);
14468
14387
  return res.data;
14469
14388
  }
14470
14389
  try {
@@ -14494,7 +14413,7 @@ function GetCompositionListLocalWithId(compositionName, userId) {
14494
14413
  return __awaiter(this, void 0, void 0, function* () {
14495
14414
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
14496
14415
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('GetCompositionListLocalWithId', { compositionName, userId });
14497
- // console.log('data received from sw', res)
14416
+ console.log('data received from sw', res);
14498
14417
  return res.data;
14499
14418
  }
14500
14419
  try {
@@ -14554,7 +14473,7 @@ function GetCompositionLocal(id) {
14554
14473
  try {
14555
14474
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
14556
14475
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionLocal', { id });
14557
- // console.log('data received from sw', res)
14476
+ console.log('data received from sw', res);
14558
14477
  return res.data;
14559
14478
  }
14560
14479
  let connectionList = [];
@@ -14590,7 +14509,7 @@ function GetCompositionLocalWithId(id) {
14590
14509
  try {
14591
14510
  if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
14592
14511
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionLocalWithId', { id });
14593
- // console.log('data received from sw', res)
14512
+ console.log('data received from sw', res);
14594
14513
  return res.data;
14595
14514
  }
14596
14515
  let connectionList = [];
@@ -14720,7 +14639,7 @@ function GetConceptByCharacterAndCategoryLocal(character) {
14720
14639
  return __awaiter(this, void 0, void 0, function* () {
14721
14640
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
14722
14641
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConceptByCharacterAndCategoryLocal', { character });
14723
- // console.log('data received from sw', res)
14642
+ console.log('data received from sw', res);
14724
14643
  return res.data;
14725
14644
  }
14726
14645
  let lconcept = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultLConcept)();
@@ -14838,7 +14757,7 @@ function GetRelationLocal(id, relation, userId) {
14838
14757
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("GetRelationLocal", {
14839
14758
  id, relation, userId
14840
14759
  });
14841
- // console.log("data received from sw", res);
14760
+ console.log("data received from sw", res);
14842
14761
  return res.data;
14843
14762
  }
14844
14763
  let typeConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetConceptByCharacterAndCategoryLocal)(relation);
@@ -14902,7 +14821,7 @@ function GetTheConceptLocal(id) {
14902
14821
  try {
14903
14822
  if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
14904
14823
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetTheConceptLocal', { id });
14905
- // console.log('data received from sw', res)
14824
+ console.log('data received from sw', res);
14906
14825
  return res.data;
14907
14826
  }
14908
14827
  let lconcept = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultLConcept)();
@@ -14965,7 +14884,7 @@ function MakeTheConceptLocal(referent_1, typeCharacter_1, userId_1, categoryId_1
14965
14884
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)("MakeTheConceptLocal", {
14966
14885
  referent, typeCharacter, userId, categoryId, typeId, actions
14967
14886
  });
14968
- // console.log("data received from sw", res);
14887
+ console.log("data received from sw", res);
14969
14888
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
14970
14889
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
14971
14890
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15037,7 +14956,7 @@ function MakeTheInstanceConceptLocal(type_1, referent_1) {
15037
14956
  var _a, _b, _c, _d;
15038
14957
  if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
15039
14958
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('MakeTheInstanceConceptLocal', { type, referent, composition, userId, accessId, sessionInformationId, referentId, actions });
15040
- // console.log('data received from sw', res)
14959
+ console.log('data received from sw', res);
15041
14960
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
15042
14961
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
15043
14962
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15147,7 +15066,7 @@ function MakeTheTypeConceptLocal(typeString_1, sessionId_1, sessionUserId_1, use
15147
15066
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)("MakeTheTypeConceptLocal", {
15148
15067
  typeString, sessionId, sessionUserId, userId, actions
15149
15068
  });
15150
- // console.log("data received from sw", res);
15069
+ console.log("data received from sw", res);
15151
15070
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
15152
15071
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
15153
15072
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15229,7 +15148,7 @@ function UpdateCompositionLocal(patcherStructure_1) {
15229
15148
  patcherStructure,
15230
15149
  actions
15231
15150
  });
15232
- // console.log("data received from sw", res);
15151
+ console.log("data received from sw", res);
15233
15152
  if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)
15234
15153
  actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
15235
15154
  if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)
@@ -15521,7 +15440,7 @@ function MakeTheInstanceConcept(type_1, referent_1) {
15521
15440
  passedSessionId,
15522
15441
  referentId,
15523
15442
  });
15524
- // console.log("data received from sw", res);
15443
+ console.log("data received from sw", res);
15525
15444
  return res.data;
15526
15445
  }
15527
15446
  let sessionInformationId = passedSessionId;
@@ -15621,7 +15540,7 @@ function MakeTheTimestamp(type_1, referent_1, userId_1) {
15621
15540
  return __awaiter(this, arguments, void 0, function* (type, referent, userId, accessId = 4, sessionInformationId = 999) {
15622
15541
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
15623
15542
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('MakeTheTimestamp', { type, referent, userId, accessId, sessionInformationId });
15624
- // console.log('data received from sw', res)
15543
+ console.log('data received from sw', res);
15625
15544
  return res.data;
15626
15545
  }
15627
15546
  let categoryId = 4;
@@ -15681,7 +15600,7 @@ function MakeTheTypeConcept(typeString, sessionId, sessionUserId, userId) {
15681
15600
  return __awaiter(this, void 0, void 0, function* () {
15682
15601
  if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
15683
15602
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('MakeTheTypeConcept', { typeString, sessionId, sessionUserId, userId });
15684
- // console.log('data received from sw', res)
15603
+ console.log('data received from sw', res);
15685
15604
  return res.data;
15686
15605
  }
15687
15606
  let referentId = 999;
@@ -16943,7 +16862,7 @@ function UpdateComposition(patcherStructure) {
16943
16862
  const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_13__.sendMessage)("UpdateComposition", {
16944
16863
  patcherStructure,
16945
16864
  });
16946
- // console.log("data received from sw", res);
16865
+ console.log("data received from sw", res);
16947
16866
  return res.data;
16948
16867
  }
16949
16868
  // get all the default userId, sessionId, accessId passed by the patcherStructure
@@ -19329,9 +19248,10 @@ function sendMessage(type, payload) {
19329
19248
  }
19330
19249
  // Timeout for waiting for the response (e.g., 5 seconds)
19331
19250
  setTimeout(() => {
19251
+ console.log('timeout', type);
19332
19252
  reject("No response from service worker after timeout");
19333
19253
  navigator.serviceWorker.removeEventListener("message", responseHandler);
19334
- }, 30000); // 30 sec
19254
+ }, 10000);
19335
19255
  // })
19336
19256
  // .catch(err => reject(err))
19337
19257
  // .finally(() => console.log('finally'))