mftsccs-browser 1.1.61-beta → 1.1.63-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 +1042 -148
- package/dist/main.bundle.js.map +1 -1
- package/dist/serviceWorker.bundle.js +1040 -147
- package/dist/serviceWorker.bundle.js.map +1 -1
- package/dist/types/AccessTracker/accessTracker.d.ts +3 -1
- package/dist/types/DataStructures/BaseUrl.d.ts +2 -0
- package/dist/types/Middleware/ApplicationMonitor.d.ts +8 -0
- package/dist/types/Middleware/ErrorHandling.d.ts +19 -0
- package/dist/types/Middleware/logger.service.d.ts +117 -0
- package/dist/types/Services/DeleteConnectionByType.d.ts +6 -0
- package/dist/types/Services/Local/CreateConnectionBetweenTwoConceptsLocal.d.ts +2 -1
- package/dist/types/Services/Local/MakeTheInstanceConceptLocal.d.ts +1 -1
- package/dist/types/Services/Search/DataIdFormat.d.ts +22 -0
- package/dist/types/Services/Search/JustIdFormat.d.ts +22 -0
- package/dist/types/Validator/validator.d.ts +19 -0
- package/dist/types/app.d.ts +5 -1
- package/package.json +1 -1
package/dist/main.bundle.js
CHANGED
|
@@ -29,15 +29,29 @@ class AccessTracker {
|
|
|
29
29
|
* Increments the count for a specific conceptId.
|
|
30
30
|
*/
|
|
31
31
|
static incrementConcept(conceptId) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
try {
|
|
33
|
+
if (conceptId) {
|
|
34
|
+
this.conceptsData[conceptId] = (this.conceptsData[conceptId] || 0) + 1;
|
|
35
|
+
this.saveDataToLocalStorage();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error("Failed on increment concept");
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
/**
|
|
36
43
|
* Increments the count for a specific connectionId.
|
|
37
44
|
*/
|
|
38
45
|
static incrementConnection(connectionId) {
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
try {
|
|
47
|
+
if (connectionId) {
|
|
48
|
+
this.connectionsData[connectionId] = (this.connectionsData[connectionId] || 0) + 1;
|
|
49
|
+
this.saveDataToLocalStorage();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error("Failed on increment connection");
|
|
54
|
+
}
|
|
41
55
|
}
|
|
42
56
|
/**
|
|
43
57
|
* Retrieves the top N concepts by their counts.
|
|
@@ -65,30 +79,42 @@ class AccessTracker {
|
|
|
65
79
|
concepts: this.conceptsData,
|
|
66
80
|
connections: this.connectionsData
|
|
67
81
|
};
|
|
68
|
-
localStorage.setItem(
|
|
82
|
+
localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem(this.accessData, JSON.stringify(data));
|
|
69
83
|
}
|
|
70
84
|
/**
|
|
71
85
|
* Loads the concept and connection data from localStorage.
|
|
72
86
|
*/
|
|
73
87
|
static loadDataFromLocalStorage() {
|
|
74
|
-
const savedData = localStorage.getItem(
|
|
88
|
+
const savedData = localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(this.accessData);
|
|
75
89
|
if (savedData) {
|
|
76
90
|
const data = JSON.parse(savedData);
|
|
77
91
|
this.conceptsData = data.concepts || {};
|
|
78
92
|
this.connectionsData = data.connections || {};
|
|
79
93
|
}
|
|
80
94
|
}
|
|
95
|
+
static sendToServer() {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
try {
|
|
98
|
+
const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;
|
|
99
|
+
yield this.syncToServer(accessToken);
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
console.error("Failed to process Access Tracker Sync with Server");
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
81
106
|
/**
|
|
82
107
|
* Syncs the concept and connection data with the server.
|
|
83
108
|
*/
|
|
84
109
|
static syncToServer(accessToken) {
|
|
85
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
111
|
try {
|
|
87
|
-
|
|
112
|
+
if (!Object.keys(this.conceptsData).length && !Object.keys(this.connectionsData).length) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
88
115
|
// Ensure conceptsData and connectionsData are not undefined or null
|
|
89
116
|
const conceptsToSend = this.conceptsData && Object.keys(this.conceptsData).length > 0 ? this.conceptsData : {};
|
|
90
117
|
const connectionsToSend = this.connectionsData && Object.keys(this.connectionsData).length > 0 ? this.connectionsData : {};
|
|
91
|
-
// console.log("I am getting url : ", BaseUrl.PostPrefetchConceptConnections());
|
|
92
118
|
const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostPrefetchConceptConnections(), {
|
|
93
119
|
method: 'POST',
|
|
94
120
|
headers: {
|
|
@@ -104,11 +130,11 @@ class AccessTracker {
|
|
|
104
130
|
throw new Error('Failed to sync data to the server.');
|
|
105
131
|
}
|
|
106
132
|
const serverData = yield response.json();
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
this.
|
|
110
|
-
// console.log(`Sync successful at ${new Date().toISOString()}`);
|
|
133
|
+
// console.log("Server Data after sync : ", serverData);
|
|
134
|
+
this.conceptsData = {};
|
|
135
|
+
this.connectionsData = {};
|
|
111
136
|
this.setNextSyncTime();
|
|
137
|
+
localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem(this.accessData);
|
|
112
138
|
}
|
|
113
139
|
catch (error) {
|
|
114
140
|
console.error('Sync error:', error);
|
|
@@ -119,9 +145,8 @@ class AccessTracker {
|
|
|
119
145
|
* Sets the next sync time based on the current time and sync interval.
|
|
120
146
|
*/
|
|
121
147
|
static setNextSyncTime() {
|
|
122
|
-
// Calculate next sync time (current time +
|
|
123
|
-
this.nextSyncTime = Date.now() + this.
|
|
124
|
-
console.log(`Next sync scheduled at: ${new Date(this.nextSyncTime).toISOString()}`); // Log next sync time
|
|
148
|
+
// Calculate next sync time (current time + time interval)
|
|
149
|
+
this.nextSyncTime = Date.now() + this.SYNC_INTERVAL_MS;
|
|
125
150
|
}
|
|
126
151
|
/**
|
|
127
152
|
* Starts auto-syncing to the server every specified time interval.
|
|
@@ -130,20 +155,16 @@ class AccessTracker {
|
|
|
130
155
|
static startAutoSync() {
|
|
131
156
|
const tokenString = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;
|
|
132
157
|
if (tokenString) {
|
|
133
|
-
// console.log("[AUTO-SYNC] Auto-sync initialized.");
|
|
134
158
|
this.syncNow().catch(console.error);
|
|
135
159
|
}
|
|
136
160
|
setInterval(() => {
|
|
137
161
|
const currentTime = Date.now();
|
|
138
|
-
|
|
162
|
+
console.log(`[CHECK] Current Time: ${new Date(currentTime).toISOString()}`);
|
|
139
163
|
if (currentTime >= this.nextSyncTime) {
|
|
140
164
|
// console.log(`[SYNC TRIGGER] Time to sync! Triggering sync at: ${new Date(currentTime).toISOString()}`);
|
|
141
165
|
this.syncNow().catch(console.error);
|
|
142
166
|
}
|
|
143
|
-
|
|
144
|
-
// console.log(`[WAIT] Not time to sync yet. Next Sync Time: ${new Date(this.nextSyncTime).toISOString()}`);
|
|
145
|
-
}
|
|
146
|
-
}, 300000); // Check every 5 minutes
|
|
167
|
+
}, 30000); // Check every 30 Seconds
|
|
147
168
|
}
|
|
148
169
|
/**
|
|
149
170
|
* Sync immediately (called by setInterval when time to sync has arrived).
|
|
@@ -152,7 +173,6 @@ class AccessTracker {
|
|
|
152
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
174
|
const tokenString = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;
|
|
154
175
|
if (tokenString) {
|
|
155
|
-
// console.log(`[MANUAL SYNC] Sync manually triggered at: ${new Date().toISOString()}`);
|
|
156
176
|
yield this.syncToServer(tokenString);
|
|
157
177
|
}
|
|
158
178
|
else {
|
|
@@ -243,11 +263,8 @@ class AccessTracker {
|
|
|
243
263
|
*/
|
|
244
264
|
static addConceptToBinaryTree(conceptsDataArray) {
|
|
245
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
246
|
-
// console.log("Concepts Data Array : ", conceptsDataArray);
|
|
247
266
|
try {
|
|
248
|
-
// console.log("Start Adding Concepts to Binary Tree...");
|
|
249
267
|
conceptsDataArray.forEach(conceptObject => {
|
|
250
|
-
// console.log("Concept Object : ", conceptObject);
|
|
251
268
|
_app__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(conceptObject);
|
|
252
269
|
});
|
|
253
270
|
}
|
|
@@ -262,9 +279,7 @@ class AccessTracker {
|
|
|
262
279
|
static addConnectionToBinaryTree(connectionsDataArray) {
|
|
263
280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
264
281
|
try {
|
|
265
|
-
// console.log("Start Adding Connections to Binary Tree...");
|
|
266
282
|
connectionsDataArray.forEach(connectionObject => {
|
|
267
|
-
// console.log("Connection Object : ", connectionObject);
|
|
268
283
|
_app__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.AddConnection(connectionObject);
|
|
269
284
|
});
|
|
270
285
|
}
|
|
@@ -277,10 +292,11 @@ class AccessTracker {
|
|
|
277
292
|
_a = AccessTracker;
|
|
278
293
|
AccessTracker.conceptsData = {};
|
|
279
294
|
AccessTracker.connectionsData = {};
|
|
280
|
-
AccessTracker.
|
|
295
|
+
AccessTracker.SYNC_INTERVAL_MS = 60 * 1000; // 60 Sec
|
|
281
296
|
AccessTracker.nextSyncTime = Date.now();
|
|
297
|
+
AccessTracker.accessData = "Access Data";
|
|
282
298
|
(() => {
|
|
283
|
-
// console.log(`[INIT] Next Sync Time set to: ${new Date(this.nextSyncTime).
|
|
299
|
+
// console.log(`[INIT] Next Sync Time set to: ${new Date(this.nextSyncTime).toLocaleString()}`);
|
|
284
300
|
_a.startAutoSync();
|
|
285
301
|
})();
|
|
286
302
|
|
|
@@ -1808,6 +1824,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
1808
1824
|
|
|
1809
1825
|
|
|
1810
1826
|
|
|
1827
|
+
|
|
1811
1828
|
/**
|
|
1812
1829
|
* This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts
|
|
1813
1830
|
* namely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from
|
|
@@ -1824,6 +1841,7 @@ function GetConceptBulk(passedConcepts) {
|
|
|
1824
1841
|
}
|
|
1825
1842
|
let result = [];
|
|
1826
1843
|
let setTime = new Date().getTime();
|
|
1844
|
+
let startTime = performance.now();
|
|
1827
1845
|
// let conceptIds = passedConcepts.filter((value, index, self) => {
|
|
1828
1846
|
// return self.indexOf(value) === index;
|
|
1829
1847
|
// });
|
|
@@ -1867,9 +1885,14 @@ function GetConceptBulk(passedConcepts) {
|
|
|
1867
1885
|
_DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);
|
|
1868
1886
|
}
|
|
1869
1887
|
}
|
|
1888
|
+
console.log("added the concepts");
|
|
1889
|
+
// Add Log
|
|
1890
|
+
// Logger.logInfo(startTime, "unknown", "read", "unknown", undefined, 200, result, "GetConceptBulk", ['passedConcepts'], "unknown", undefined)
|
|
1870
1891
|
}
|
|
1871
1892
|
else {
|
|
1872
1893
|
console.log("Get Concept Bulk error", response.status);
|
|
1894
|
+
// Add Log
|
|
1895
|
+
_app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, "unknown", "read", "unknown", undefined, response.status, response, "GetConceptBulk", ['passedConcepts'], "unknown", undefined);
|
|
1873
1896
|
(0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);
|
|
1874
1897
|
}
|
|
1875
1898
|
}
|
|
@@ -1882,6 +1905,8 @@ function GetConceptBulk(passedConcepts) {
|
|
|
1882
1905
|
else {
|
|
1883
1906
|
console.log('Get Concept Bulk unexpected error: ', error);
|
|
1884
1907
|
}
|
|
1908
|
+
// Add Log
|
|
1909
|
+
_app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, "unknown", "read", "unknown", undefined, 500, error, "GetConceptBulk", ['passedConcepts'], "unknown", undefined);
|
|
1885
1910
|
(0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl());
|
|
1886
1911
|
}
|
|
1887
1912
|
return result;
|
|
@@ -3266,9 +3291,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3266
3291
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3267
3292
|
/* harmony export */ SearchLinkMultipleApi: () => (/* binding */ SearchLinkMultipleApi)
|
|
3268
3293
|
/* harmony export */ });
|
|
3269
|
-
/* harmony import */ var
|
|
3270
|
-
/* harmony import */ var
|
|
3271
|
-
/* harmony import */ var
|
|
3294
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ "./src/app.ts");
|
|
3295
|
+
/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/BaseUrl */ "./src/DataStructures/BaseUrl.ts");
|
|
3296
|
+
/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
|
|
3297
|
+
/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Services/Security/GetRequestHeader */ "./src/Services/Security/GetRequestHeader.ts");
|
|
3272
3298
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3273
3299
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3274
3300
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -3281,10 +3307,12 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
3281
3307
|
|
|
3282
3308
|
|
|
3283
3309
|
|
|
3310
|
+
|
|
3284
3311
|
function SearchLinkMultipleApi(searchQuery_1) {
|
|
3285
3312
|
return __awaiter(this, arguments, void 0, function* (searchQuery, token = "") {
|
|
3286
|
-
|
|
3287
|
-
|
|
3313
|
+
let startTime = performance.now();
|
|
3314
|
+
var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeaderWithAuthorization)("application/json", token);
|
|
3315
|
+
const queryUrl = _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.SearchLinkMultipleAllApiUrl();
|
|
3288
3316
|
const body = JSON.stringify(searchQuery);
|
|
3289
3317
|
try {
|
|
3290
3318
|
const response = yield fetch(queryUrl, {
|
|
@@ -3294,17 +3322,21 @@ function SearchLinkMultipleApi(searchQuery_1) {
|
|
|
3294
3322
|
});
|
|
3295
3323
|
if (response.ok) {
|
|
3296
3324
|
let result = yield response.json();
|
|
3325
|
+
// Add Log
|
|
3326
|
+
// Logger.logInfo(startTime, "unknown", "search", "unknown", undefined, 200, result, "SearchLinkMultipleApi", ['searchQuery', 'token'], "unknown", undefined )
|
|
3297
3327
|
return result;
|
|
3298
3328
|
}
|
|
3299
3329
|
else {
|
|
3300
|
-
(0,
|
|
3330
|
+
(0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);
|
|
3301
3331
|
console.log("This is the searching multiple error", response.status);
|
|
3332
|
+
_app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, "unknown", "search", "unknown", undefined, response.status, response, "SearchLinkMultipleApi", ['searchQuery', 'token'], "unknown", undefined);
|
|
3302
3333
|
return [];
|
|
3303
3334
|
}
|
|
3304
3335
|
}
|
|
3305
3336
|
catch (ex) {
|
|
3306
3337
|
console.log("This is the searching multiple error", ex);
|
|
3307
|
-
(
|
|
3338
|
+
_app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, "unknown", "search", "unknown", undefined, 500, ex, "SearchLinkMultipleApi", ['searchQuery', 'token'], "unknown", undefined);
|
|
3339
|
+
(0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(ex, queryUrl);
|
|
3308
3340
|
}
|
|
3309
3341
|
});
|
|
3310
3342
|
}
|
|
@@ -4043,6 +4075,12 @@ class BaseUrl {
|
|
|
4043
4075
|
static GetSuggestedConnections() {
|
|
4044
4076
|
return this.NODE_URL + '/api/v1/access-tracker/list-connections-file';
|
|
4045
4077
|
}
|
|
4078
|
+
static PostLogger() {
|
|
4079
|
+
return this.NODE_URL + '/api/v1/logger/logs';
|
|
4080
|
+
}
|
|
4081
|
+
static GetLogger() {
|
|
4082
|
+
return this.NODE_URL + '/api/v1/logger/logs';
|
|
4083
|
+
}
|
|
4046
4084
|
static GetAllPrefetchConnectionsUrl() {
|
|
4047
4085
|
return this.BASE_URL + '/api/get_all_connections_of_user?inpage=500';
|
|
4048
4086
|
}
|
|
@@ -8262,6 +8300,7 @@ class LocalSyncData {
|
|
|
8262
8300
|
}
|
|
8263
8301
|
static SyncDataOnline(transactionId, actions) {
|
|
8264
8302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8303
|
+
let startTime = performance.now();
|
|
8265
8304
|
try {
|
|
8266
8305
|
console.log('sw triggered');
|
|
8267
8306
|
if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
|
|
@@ -8318,9 +8357,12 @@ class LocalSyncData {
|
|
|
8318
8357
|
_LocalConnectionData__WEBPACK_IMPORTED_MODULE_4__.LocalConnectionData.AddPermanentConnection(connections[i]);
|
|
8319
8358
|
}
|
|
8320
8359
|
//}
|
|
8360
|
+
// Logger.logInfo(startTime, "unknown", undefined, "unknown", undefined, 200, conceptsArray, "SyncDataOnline", [], "unknown", undefined )
|
|
8321
8361
|
return conceptsArray;
|
|
8322
8362
|
}
|
|
8323
8363
|
catch (error) {
|
|
8364
|
+
// Add Log
|
|
8365
|
+
_app__WEBPACK_IMPORTED_MODULE_3__.Logger.logError(startTime, "unknown", undefined, "unknown", undefined, 500, error, "SyncDataOnline", [], "unknown", undefined);
|
|
8324
8366
|
throw error;
|
|
8325
8367
|
}
|
|
8326
8368
|
});
|
|
@@ -11049,6 +11091,603 @@ function InsertUniqueNumber(Array, toInsert) {
|
|
|
11049
11091
|
}
|
|
11050
11092
|
|
|
11051
11093
|
|
|
11094
|
+
/***/ }),
|
|
11095
|
+
|
|
11096
|
+
/***/ "./src/Middleware/ApplicationMonitor.ts":
|
|
11097
|
+
/*!**********************************************!*\
|
|
11098
|
+
!*** ./src/Middleware/ApplicationMonitor.ts ***!
|
|
11099
|
+
\**********************************************/
|
|
11100
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11101
|
+
|
|
11102
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11103
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11104
|
+
/* harmony export */ ApplicationMonitor: () => (/* binding */ ApplicationMonitor)
|
|
11105
|
+
/* harmony export */ });
|
|
11106
|
+
/* harmony import */ var _logger_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger.service */ "./src/Middleware/logger.service.ts");
|
|
11107
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11108
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11109
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11110
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11111
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11112
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11113
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11114
|
+
});
|
|
11115
|
+
};
|
|
11116
|
+
|
|
11117
|
+
class ApplicationMonitor {
|
|
11118
|
+
static initialize() {
|
|
11119
|
+
console.log("Initialized Application Moniroring...");
|
|
11120
|
+
// Log unhandled errors
|
|
11121
|
+
window.addEventListener("error", (event) => {
|
|
11122
|
+
var _a, _b;
|
|
11123
|
+
// console.log("error called...");
|
|
11124
|
+
const errorDetails = {
|
|
11125
|
+
error: ((_a = event.error) === null || _a === void 0 ? void 0 : _a.message) || event.message,
|
|
11126
|
+
source: event.filename,
|
|
11127
|
+
line: event.lineno,
|
|
11128
|
+
column: event.colno,
|
|
11129
|
+
stack: (_b = event.error) === null || _b === void 0 ? void 0 : _b.stack
|
|
11130
|
+
};
|
|
11131
|
+
const message = "Unhandled Error";
|
|
11132
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("Error", message, errorDetails);
|
|
11133
|
+
});
|
|
11134
|
+
// Log unhandled promise rejections
|
|
11135
|
+
window.addEventListener("unhandledrejection", (event) => {
|
|
11136
|
+
var _a;
|
|
11137
|
+
// console.log("unhandledrejection called...");
|
|
11138
|
+
const errorDetails = {
|
|
11139
|
+
reason: event.reason,
|
|
11140
|
+
stack: (_a = event.reason) === null || _a === void 0 ? void 0 : _a.stack,
|
|
11141
|
+
};
|
|
11142
|
+
const message = "Unhandled Promise Rejection";
|
|
11143
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("Error", message, errorDetails);
|
|
11144
|
+
});
|
|
11145
|
+
// Log user interactions
|
|
11146
|
+
this.logUserInteractions();
|
|
11147
|
+
// Log network requests requires interception with Service Worker or monkey-patching
|
|
11148
|
+
this.logNetworkRequests();
|
|
11149
|
+
// Log application state changes for SPAs
|
|
11150
|
+
this.logRouteChanges();
|
|
11151
|
+
}
|
|
11152
|
+
// Log user interactions
|
|
11153
|
+
static logUserInteractions() {
|
|
11154
|
+
document.addEventListener("click", (event) => {
|
|
11155
|
+
var _a;
|
|
11156
|
+
const target = event.target;
|
|
11157
|
+
const message = "User Click";
|
|
11158
|
+
const details = {
|
|
11159
|
+
element: target.tagName,
|
|
11160
|
+
id: target.id,
|
|
11161
|
+
classes: target.className,
|
|
11162
|
+
text: (_a = target.innerText) === null || _a === void 0 ? void 0 : _a.slice(0, 50),
|
|
11163
|
+
};
|
|
11164
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, details);
|
|
11165
|
+
});
|
|
11166
|
+
document.addEventListener("input", (event) => {
|
|
11167
|
+
const target = event.target;
|
|
11168
|
+
const message = "User Input";
|
|
11169
|
+
const details = {
|
|
11170
|
+
element: target.tagName,
|
|
11171
|
+
id: target.id,
|
|
11172
|
+
value: target.value,
|
|
11173
|
+
};
|
|
11174
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, details);
|
|
11175
|
+
});
|
|
11176
|
+
window === null || window === void 0 ? void 0 : window.addEventListener("scroll", () => {
|
|
11177
|
+
const message = "User Scroll";
|
|
11178
|
+
const details = {
|
|
11179
|
+
position: window.scrollY,
|
|
11180
|
+
};
|
|
11181
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, details);
|
|
11182
|
+
});
|
|
11183
|
+
}
|
|
11184
|
+
static logNetworkRequests() {
|
|
11185
|
+
const originalFetch = window === null || window === void 0 ? void 0 : window.fetch;
|
|
11186
|
+
window.fetch = (...args) => __awaiter(this, void 0, void 0, function* () {
|
|
11187
|
+
const [url, options] = args;
|
|
11188
|
+
const urlString = url instanceof Request ? url.url : (url instanceof URL ? url.toString() : url);
|
|
11189
|
+
// console.log("Custom fetch called for:", urlString);
|
|
11190
|
+
let networkDetails = {
|
|
11191
|
+
"request": {
|
|
11192
|
+
type: "REQUEST",
|
|
11193
|
+
message: "Network Request",
|
|
11194
|
+
method: (options === null || options === void 0 ? void 0 : options.method) || "GET",
|
|
11195
|
+
url: urlString,
|
|
11196
|
+
body: options === null || options === void 0 ? void 0 : options.body,
|
|
11197
|
+
}
|
|
11198
|
+
};
|
|
11199
|
+
try {
|
|
11200
|
+
const response = yield originalFetch(...args);
|
|
11201
|
+
// Add response details to the network log
|
|
11202
|
+
networkDetails["response"] = {
|
|
11203
|
+
type: "RESPONSE",
|
|
11204
|
+
message: "Network Response",
|
|
11205
|
+
url: urlString,
|
|
11206
|
+
status: response.status,
|
|
11207
|
+
};
|
|
11208
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", "Network Request", networkDetails);
|
|
11209
|
+
return response;
|
|
11210
|
+
}
|
|
11211
|
+
catch (error) {
|
|
11212
|
+
console.error("Fetch failed for:", urlString, error); // Debugging log
|
|
11213
|
+
// Add error details to the network log
|
|
11214
|
+
networkDetails["response"] = {
|
|
11215
|
+
type: "ERROR",
|
|
11216
|
+
message: "Network Request Failed",
|
|
11217
|
+
url: urlString,
|
|
11218
|
+
error: error instanceof Error ? error.message : String(error),
|
|
11219
|
+
};
|
|
11220
|
+
// Log or process networkDetails if needed
|
|
11221
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("ERROR", "Network Request", networkDetails);
|
|
11222
|
+
// Throw a standard Error object (not the networkDetails object)
|
|
11223
|
+
throw new Error(`Network request failed for ${urlString}: ${error.message}`);
|
|
11224
|
+
}
|
|
11225
|
+
});
|
|
11226
|
+
}
|
|
11227
|
+
static logPerformanceMetrics() {
|
|
11228
|
+
window === null || window === void 0 ? void 0 : window.addEventListener("load", () => {
|
|
11229
|
+
const timing = performance.timing;
|
|
11230
|
+
const details = {
|
|
11231
|
+
loadTime: timing.loadEventEnd - timing.navigationStart,
|
|
11232
|
+
domContentLoadedTime: timing.domContentLoadedEventEnd - timing.navigationStart,
|
|
11233
|
+
};
|
|
11234
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", "Performance Metrics", details);
|
|
11235
|
+
});
|
|
11236
|
+
}
|
|
11237
|
+
// Log route changes (SPAs)
|
|
11238
|
+
static logRouteChanges() {
|
|
11239
|
+
const pushState = history.pushState;
|
|
11240
|
+
history.pushState = function (...args) {
|
|
11241
|
+
var _a;
|
|
11242
|
+
const urlChange = {
|
|
11243
|
+
url: (_a = args[2]) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
11244
|
+
};
|
|
11245
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", "Route Change", urlChange);
|
|
11246
|
+
return pushState.apply(this, args);
|
|
11247
|
+
};
|
|
11248
|
+
window === null || window === void 0 ? void 0 : window.addEventListener("popstate", () => {
|
|
11249
|
+
const urlChange = {
|
|
11250
|
+
url: location.href
|
|
11251
|
+
};
|
|
11252
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", "Route Changed (Back/Forward)", urlChange);
|
|
11253
|
+
});
|
|
11254
|
+
}
|
|
11255
|
+
// Log WebSocket events
|
|
11256
|
+
static logWebSocketEvents() {
|
|
11257
|
+
const originalWebSocket = WebSocket;
|
|
11258
|
+
window.WebSocket = class extends originalWebSocket {
|
|
11259
|
+
constructor(url, protocols) {
|
|
11260
|
+
super(url, protocols);
|
|
11261
|
+
const message = "WebSocket Open";
|
|
11262
|
+
const data = {
|
|
11263
|
+
"url": url.toString()
|
|
11264
|
+
};
|
|
11265
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, data);
|
|
11266
|
+
this.addEventListener("message", (event) => {
|
|
11267
|
+
const message = "WebSocket Message";
|
|
11268
|
+
const data = {
|
|
11269
|
+
"url": url,
|
|
11270
|
+
"data": event.data
|
|
11271
|
+
};
|
|
11272
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, data);
|
|
11273
|
+
});
|
|
11274
|
+
this.addEventListener("error", (error) => {
|
|
11275
|
+
const message = "WebSocket Error";
|
|
11276
|
+
const data = {
|
|
11277
|
+
"url": url,
|
|
11278
|
+
"error": error instanceof Error ? error.message : String(error),
|
|
11279
|
+
};
|
|
11280
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, data);
|
|
11281
|
+
});
|
|
11282
|
+
this.addEventListener("close", () => {
|
|
11283
|
+
const message = "WebSocket Closed";
|
|
11284
|
+
const data = {
|
|
11285
|
+
"url": url,
|
|
11286
|
+
};
|
|
11287
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.logApplication("INFO", message, data);
|
|
11288
|
+
});
|
|
11289
|
+
}
|
|
11290
|
+
};
|
|
11291
|
+
}
|
|
11292
|
+
}
|
|
11293
|
+
|
|
11294
|
+
|
|
11295
|
+
/***/ }),
|
|
11296
|
+
|
|
11297
|
+
/***/ "./src/Middleware/ErrorHandling.ts":
|
|
11298
|
+
/*!*****************************************!*\
|
|
11299
|
+
!*** ./src/Middleware/ErrorHandling.ts ***!
|
|
11300
|
+
\*****************************************/
|
|
11301
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11302
|
+
|
|
11303
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11304
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11305
|
+
/* harmony export */ HandleEventError: () => (/* binding */ HandleEventError),
|
|
11306
|
+
/* harmony export */ HandleFunctionError: () => (/* binding */ HandleFunctionError),
|
|
11307
|
+
/* harmony export */ HandleNetworkError: () => (/* binding */ HandleNetworkError)
|
|
11308
|
+
/* harmony export */ });
|
|
11309
|
+
/* harmony import */ var _logger_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger.service */ "./src/Middleware/logger.service.ts");
|
|
11310
|
+
|
|
11311
|
+
/**
|
|
11312
|
+
* Handles errors in function execution by logging relevant details.
|
|
11313
|
+
* @param error The error object caught during execution.
|
|
11314
|
+
* @param data Additional context or data to log with the error.
|
|
11315
|
+
*/
|
|
11316
|
+
function HandleFunctionError(error, data) {
|
|
11317
|
+
if (error) {
|
|
11318
|
+
const errorDetails = {
|
|
11319
|
+
message: error.message || "Unknown function error",
|
|
11320
|
+
stack: error.stack || "No stack trace",
|
|
11321
|
+
context: data || "No context provided",
|
|
11322
|
+
};
|
|
11323
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.log("ERROR", "Function Error", errorDetails);
|
|
11324
|
+
}
|
|
11325
|
+
}
|
|
11326
|
+
/**
|
|
11327
|
+
* Handles network errors by logging request and response details.
|
|
11328
|
+
* Extend this to handle network-specific errors in `fetch` or `XMLHttpRequest`.
|
|
11329
|
+
* @param request Details of the network request.
|
|
11330
|
+
* @param error The error object or response details.
|
|
11331
|
+
*/
|
|
11332
|
+
function HandleNetworkError(request, error) {
|
|
11333
|
+
const networkErrorDetails = {
|
|
11334
|
+
message: "Network Error",
|
|
11335
|
+
request: {
|
|
11336
|
+
method: request.method || "Unknown",
|
|
11337
|
+
url: request.url || "Unknown URL",
|
|
11338
|
+
body: request.body || "No body provided",
|
|
11339
|
+
},
|
|
11340
|
+
response: error.response || "No response details",
|
|
11341
|
+
stack: error.stack || "No stack trace",
|
|
11342
|
+
};
|
|
11343
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.log("ERROR", "Network Error", networkErrorDetails);
|
|
11344
|
+
}
|
|
11345
|
+
/**
|
|
11346
|
+
* Handles errors during DOM or event interactions by logging event-specific details.
|
|
11347
|
+
* @param event The event object where the error occurred.
|
|
11348
|
+
* @param error The error object caught during execution.
|
|
11349
|
+
*/
|
|
11350
|
+
function HandleEventError(event, error) {
|
|
11351
|
+
var _a;
|
|
11352
|
+
const target = event.target;
|
|
11353
|
+
const eventErrorDetails = {
|
|
11354
|
+
message: "Event Error",
|
|
11355
|
+
eventType: event.type,
|
|
11356
|
+
element: {
|
|
11357
|
+
tagName: (target === null || target === void 0 ? void 0 : target.tagName) || "Unknown",
|
|
11358
|
+
id: (target === null || target === void 0 ? void 0 : target.id) || "No ID",
|
|
11359
|
+
classes: (target === null || target === void 0 ? void 0 : target.className) || "No classes",
|
|
11360
|
+
text: ((_a = target === null || target === void 0 ? void 0 : target.innerText) === null || _a === void 0 ? void 0 : _a.slice(0, 50)) || "No text",
|
|
11361
|
+
},
|
|
11362
|
+
errorDetails: {
|
|
11363
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || "Unknown error",
|
|
11364
|
+
stack: (error === null || error === void 0 ? void 0 : error.stack) || "No stack trace",
|
|
11365
|
+
},
|
|
11366
|
+
};
|
|
11367
|
+
_logger_service__WEBPACK_IMPORTED_MODULE_0__.Logger.log("ERROR", "Event Error", eventErrorDetails);
|
|
11368
|
+
}
|
|
11369
|
+
|
|
11370
|
+
|
|
11371
|
+
/***/ }),
|
|
11372
|
+
|
|
11373
|
+
/***/ "./src/Middleware/logger.service.ts":
|
|
11374
|
+
/*!******************************************!*\
|
|
11375
|
+
!*** ./src/Middleware/logger.service.ts ***!
|
|
11376
|
+
\******************************************/
|
|
11377
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11378
|
+
|
|
11379
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11380
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11381
|
+
/* harmony export */ Logger: () => (/* binding */ Logger),
|
|
11382
|
+
/* harmony export */ getCookie: () => (/* binding */ getCookie)
|
|
11383
|
+
/* harmony export */ });
|
|
11384
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ "./src/app.ts");
|
|
11385
|
+
/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/Security/TokenStorage */ "./src/DataStructures/Security/TokenStorage.ts");
|
|
11386
|
+
/* harmony import */ var _ErrorHandling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ErrorHandling */ "./src/Middleware/ErrorHandling.ts");
|
|
11387
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11388
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11389
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11390
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11391
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11392
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11393
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11394
|
+
});
|
|
11395
|
+
};
|
|
11396
|
+
|
|
11397
|
+
|
|
11398
|
+
|
|
11399
|
+
class Logger {
|
|
11400
|
+
/**
|
|
11401
|
+
* Automatically starts the auto-sync mechanism.
|
|
11402
|
+
* This is private and does not need external interaction.
|
|
11403
|
+
*/
|
|
11404
|
+
static startAutoSync() {
|
|
11405
|
+
if (this.autoSyncInterval) {
|
|
11406
|
+
console.warn("Auto-sync is already running.");
|
|
11407
|
+
return;
|
|
11408
|
+
}
|
|
11409
|
+
Logger.nextSyncTime = Date.now() + Logger.SYNC_INTERVAL_MS;
|
|
11410
|
+
// console.log("NextTimeToSync for Upcoming : ", this.nextSyncTime)
|
|
11411
|
+
this.autoSyncInterval = window === null || window === void 0 ? void 0 : window.setInterval(() => {
|
|
11412
|
+
const currentTime = Date.now();
|
|
11413
|
+
// console.log("Current Time : ",currentTime);
|
|
11414
|
+
if (Logger.nextSyncTime && currentTime >= Logger.nextSyncTime) {
|
|
11415
|
+
Logger.nextSyncTime = currentTime + Logger.SYNC_INTERVAL_MS;
|
|
11416
|
+
Logger.sendLogsToServer();
|
|
11417
|
+
Logger.sendApplicationLogsToServer();
|
|
11418
|
+
}
|
|
11419
|
+
}, 60000); // Check every minute
|
|
11420
|
+
}
|
|
11421
|
+
/**
|
|
11422
|
+
* Automatically stops the auto-sync mechanism when required.
|
|
11423
|
+
*/
|
|
11424
|
+
static stopAutoSync() {
|
|
11425
|
+
if (this.autoSyncInterval !== null) {
|
|
11426
|
+
clearInterval(this.autoSyncInterval);
|
|
11427
|
+
this.autoSyncInterval = null;
|
|
11428
|
+
Logger.nextSyncTime = null;
|
|
11429
|
+
}
|
|
11430
|
+
}
|
|
11431
|
+
/**
|
|
11432
|
+
* Set the log level (e.g., "DEBUG", "INFO", "WARNING", "ERROR").
|
|
11433
|
+
*/
|
|
11434
|
+
static setLogLevel(level) {
|
|
11435
|
+
Logger.logLevel = level;
|
|
11436
|
+
}
|
|
11437
|
+
/**
|
|
11438
|
+
* Determines whether the current log level permits the given level to be logged.
|
|
11439
|
+
*/
|
|
11440
|
+
static shouldLog(level) {
|
|
11441
|
+
return Logger.LOG_LEVELS.indexOf(level) >= Logger.LOG_LEVELS.indexOf(Logger.logLevel);
|
|
11442
|
+
}
|
|
11443
|
+
/**
|
|
11444
|
+
* Logs a message with optional additional structured data.
|
|
11445
|
+
*/
|
|
11446
|
+
static formatLogData(level, message, data) {
|
|
11447
|
+
if (!Logger.shouldLog(level))
|
|
11448
|
+
return;
|
|
11449
|
+
const logEntry = Object.assign({ timestamp: new Date().toLocaleString(), level,
|
|
11450
|
+
message }, data);
|
|
11451
|
+
Logger.logs.push(logEntry);
|
|
11452
|
+
// this.saveToLocalStorage(logEntry)
|
|
11453
|
+
this.saveLogToLocalStorage(this.mftsccsBrowser, logEntry);
|
|
11454
|
+
}
|
|
11455
|
+
static log(level, message, data) {
|
|
11456
|
+
try {
|
|
11457
|
+
Logger.formatLogData(level, message, data || null);
|
|
11458
|
+
}
|
|
11459
|
+
catch (error) {
|
|
11460
|
+
console.error("Error on Logger Log : ", error);
|
|
11461
|
+
}
|
|
11462
|
+
}
|
|
11463
|
+
static logInfo(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {
|
|
11464
|
+
const sessionId = getCookie("SessionId");
|
|
11465
|
+
const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;
|
|
11466
|
+
const responseSize = responseData ? `${JSON.stringify(responseData).length}` : "0";
|
|
11467
|
+
const logData = {
|
|
11468
|
+
userId,
|
|
11469
|
+
operationType,
|
|
11470
|
+
requestFrom,
|
|
11471
|
+
requestIP,
|
|
11472
|
+
responseStatus,
|
|
11473
|
+
responseTime,
|
|
11474
|
+
responseSize,
|
|
11475
|
+
sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),
|
|
11476
|
+
functionName,
|
|
11477
|
+
functionParameters,
|
|
11478
|
+
userAgent,
|
|
11479
|
+
conceptsUsed,
|
|
11480
|
+
};
|
|
11481
|
+
Logger.log("INFO", `Information logged for ${functionName}`, logData);
|
|
11482
|
+
}
|
|
11483
|
+
static logError(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {
|
|
11484
|
+
const sessionId = getCookie("SessionId");
|
|
11485
|
+
const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;
|
|
11486
|
+
const responseSize = responseData ? `${JSON.stringify(responseData).length}` : "0";
|
|
11487
|
+
const logData = {
|
|
11488
|
+
userId,
|
|
11489
|
+
operationType,
|
|
11490
|
+
requestFrom,
|
|
11491
|
+
requestIP,
|
|
11492
|
+
responseStatus,
|
|
11493
|
+
responseTime,
|
|
11494
|
+
responseSize,
|
|
11495
|
+
sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),
|
|
11496
|
+
functionName,
|
|
11497
|
+
functionParameters,
|
|
11498
|
+
userAgent,
|
|
11499
|
+
conceptsUsed,
|
|
11500
|
+
};
|
|
11501
|
+
Logger.formatLogData("ERROR", `Information logged for ${functionName}`, logData);
|
|
11502
|
+
}
|
|
11503
|
+
static logWarning(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {
|
|
11504
|
+
const sessionId = getCookie("SessionId");
|
|
11505
|
+
const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;
|
|
11506
|
+
const responseSize = responseData ? `${JSON.stringify(responseData).length}` : "0";
|
|
11507
|
+
const logData = {
|
|
11508
|
+
userId,
|
|
11509
|
+
operationType,
|
|
11510
|
+
requestFrom,
|
|
11511
|
+
requestIP,
|
|
11512
|
+
responseStatus,
|
|
11513
|
+
responseTime,
|
|
11514
|
+
responseSize,
|
|
11515
|
+
sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),
|
|
11516
|
+
functionName,
|
|
11517
|
+
functionParameters,
|
|
11518
|
+
userAgent,
|
|
11519
|
+
conceptsUsed,
|
|
11520
|
+
};
|
|
11521
|
+
Logger.formatLogData("WARNING", `Information logged for ${functionName}`, logData);
|
|
11522
|
+
}
|
|
11523
|
+
static logDebug(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {
|
|
11524
|
+
const sessionId = getCookie("SessionId");
|
|
11525
|
+
const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;
|
|
11526
|
+
const responseSize = responseData ? `${JSON.stringify(responseData).length}` : "0";
|
|
11527
|
+
const logData = {
|
|
11528
|
+
userId,
|
|
11529
|
+
operationType,
|
|
11530
|
+
requestFrom,
|
|
11531
|
+
requestIP,
|
|
11532
|
+
responseStatus,
|
|
11533
|
+
responseTime,
|
|
11534
|
+
responseSize,
|
|
11535
|
+
sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),
|
|
11536
|
+
functionName,
|
|
11537
|
+
functionParameters,
|
|
11538
|
+
userAgent,
|
|
11539
|
+
conceptsUsed,
|
|
11540
|
+
};
|
|
11541
|
+
Logger.formatLogData("DEBUG", `Information logged for ${functionName}`, logData);
|
|
11542
|
+
}
|
|
11543
|
+
// Log Application Activity
|
|
11544
|
+
static logApplication(type, message, data) {
|
|
11545
|
+
try {
|
|
11546
|
+
const timestamp = new Date().toLocaleString();
|
|
11547
|
+
const logEntry = {
|
|
11548
|
+
timestamp: timestamp,
|
|
11549
|
+
type: type,
|
|
11550
|
+
message: message,
|
|
11551
|
+
data: data || null,
|
|
11552
|
+
};
|
|
11553
|
+
// const existingLogs = JSON.parse(localStorage?.getItem(this.appLogs) || "[]");
|
|
11554
|
+
// existingLogs.push(logEntry);
|
|
11555
|
+
// localStorage?.setItem(this.appLogs, JSON.stringify(existingLogs));
|
|
11556
|
+
this.saveLogToLocalStorage(this.appLogs, logEntry);
|
|
11557
|
+
}
|
|
11558
|
+
catch (error) {
|
|
11559
|
+
console.error("Failed to log application activity:", error);
|
|
11560
|
+
}
|
|
11561
|
+
}
|
|
11562
|
+
/**
|
|
11563
|
+
* Helper method to save logs to localStorage.
|
|
11564
|
+
*/
|
|
11565
|
+
static saveLogToLocalStorage(logType, logMessage) {
|
|
11566
|
+
try {
|
|
11567
|
+
const logs = JSON.parse((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(logType)) || "[]");
|
|
11568
|
+
logs.push(logMessage);
|
|
11569
|
+
localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem(logType, JSON.stringify(logs));
|
|
11570
|
+
}
|
|
11571
|
+
catch (error) {
|
|
11572
|
+
console.error("Error on saving log in localstorage");
|
|
11573
|
+
Logger.log("ERROR", "Error while saving log in local storage");
|
|
11574
|
+
}
|
|
11575
|
+
}
|
|
11576
|
+
/**
|
|
11577
|
+
* Helper method to send logs to the server.
|
|
11578
|
+
*/
|
|
11579
|
+
static sendApplicationLogsToServer() {
|
|
11580
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11581
|
+
try {
|
|
11582
|
+
if (this.logs.length < 0) {
|
|
11583
|
+
return;
|
|
11584
|
+
}
|
|
11585
|
+
const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;
|
|
11586
|
+
const storedLogs = JSON.parse((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(this.appLogs)) || "[]");
|
|
11587
|
+
if (storedLogs.length === 0)
|
|
11588
|
+
return;
|
|
11589
|
+
// console.log("Stored Logs : ", storedLogs);
|
|
11590
|
+
const chunkSize = 50;
|
|
11591
|
+
for (let i = 0; i < storedLogs.length; i += chunkSize) {
|
|
11592
|
+
const chunk = storedLogs.slice(i, i + chunkSize);
|
|
11593
|
+
const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {
|
|
11594
|
+
method: "POST",
|
|
11595
|
+
headers: {
|
|
11596
|
+
"Content-Type": "application/json",
|
|
11597
|
+
Authorization: `Bearer ${accessToken}`
|
|
11598
|
+
},
|
|
11599
|
+
body: JSON.stringify({
|
|
11600
|
+
logType: this.appLogs,
|
|
11601
|
+
logData: chunk
|
|
11602
|
+
})
|
|
11603
|
+
});
|
|
11604
|
+
if (!response.ok) {
|
|
11605
|
+
const responseBody = yield response.text();
|
|
11606
|
+
console.error("Failed to send app-logs:-", response.status, response.statusText, responseBody);
|
|
11607
|
+
return;
|
|
11608
|
+
}
|
|
11609
|
+
}
|
|
11610
|
+
localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem(this.appLogs);
|
|
11611
|
+
}
|
|
11612
|
+
catch (error) {
|
|
11613
|
+
console.error("Error while sending logs to server:", error);
|
|
11614
|
+
}
|
|
11615
|
+
});
|
|
11616
|
+
}
|
|
11617
|
+
static sendLogsToServer() {
|
|
11618
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
11619
|
+
try {
|
|
11620
|
+
console.log("Log sending to server...");
|
|
11621
|
+
const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;
|
|
11622
|
+
const storedLogs = JSON.parse((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(this.mftsccsBrowser)) || "[]");
|
|
11623
|
+
if (storedLogs.length === 0)
|
|
11624
|
+
return;
|
|
11625
|
+
const chunkSize = 50;
|
|
11626
|
+
for (let i = 0; i < storedLogs.length; i += chunkSize) {
|
|
11627
|
+
const chunk = storedLogs.slice(i, i + chunkSize);
|
|
11628
|
+
// const response = await fetch(Logger.SERVER_URL, {
|
|
11629
|
+
const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {
|
|
11630
|
+
method: "POST",
|
|
11631
|
+
headers: {
|
|
11632
|
+
"Content-Type": "application/json",
|
|
11633
|
+
Authorization: `Bearer ${accessToken}`
|
|
11634
|
+
},
|
|
11635
|
+
body: JSON.stringify({
|
|
11636
|
+
logType: this.mftsccsBrowser,
|
|
11637
|
+
logData: chunk
|
|
11638
|
+
}),
|
|
11639
|
+
});
|
|
11640
|
+
if (!response.ok) {
|
|
11641
|
+
const responseBody = yield response.text();
|
|
11642
|
+
console.error("Failed to send logs:-", response.status, response.statusText, responseBody);
|
|
11643
|
+
return;
|
|
11644
|
+
}
|
|
11645
|
+
}
|
|
11646
|
+
localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem(this.mftsccsBrowser);
|
|
11647
|
+
}
|
|
11648
|
+
catch (error) {
|
|
11649
|
+
console.error("Error while sending logs to server:", error);
|
|
11650
|
+
(0,_ErrorHandling__WEBPACK_IMPORTED_MODULE_2__.HandleNetworkError)("Request", error);
|
|
11651
|
+
}
|
|
11652
|
+
});
|
|
11653
|
+
}
|
|
11654
|
+
}
|
|
11655
|
+
Logger.logLevel = "INFO";
|
|
11656
|
+
Logger.logs = [];
|
|
11657
|
+
Logger.LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR"];
|
|
11658
|
+
Logger.SYNC_INTERVAL_MS = 60 * 1000; // 60 Sec
|
|
11659
|
+
Logger.nextSyncTime = null;
|
|
11660
|
+
Logger.appLogs = "app";
|
|
11661
|
+
Logger.mftsccsBrowser = "mftsccs";
|
|
11662
|
+
// Private auto-sync interval management
|
|
11663
|
+
Logger.autoSyncInterval = null;
|
|
11664
|
+
// Ensure logs are managed automatically
|
|
11665
|
+
(() => {
|
|
11666
|
+
// console.log("Initializing Logger with auto-sync mechanism.");
|
|
11667
|
+
Logger.startAutoSync();
|
|
11668
|
+
})();
|
|
11669
|
+
/**
|
|
11670
|
+
*
|
|
11671
|
+
* @param cname The name of the cookie
|
|
11672
|
+
* @returns Cookie value
|
|
11673
|
+
*/
|
|
11674
|
+
function getCookie(cname) {
|
|
11675
|
+
let name = cname + "=";
|
|
11676
|
+
let decodedCookie = decodeURIComponent(document.cookie);
|
|
11677
|
+
let ca = decodedCookie.split(';');
|
|
11678
|
+
for (let i = 0; i < ca.length; i++) {
|
|
11679
|
+
let c = ca[i];
|
|
11680
|
+
while (c.charAt(0) == ' ') {
|
|
11681
|
+
c = c.substring(1);
|
|
11682
|
+
}
|
|
11683
|
+
if (c.indexOf(name) == 0) {
|
|
11684
|
+
return c.substring(name.length, c.length);
|
|
11685
|
+
}
|
|
11686
|
+
}
|
|
11687
|
+
return "";
|
|
11688
|
+
}
|
|
11689
|
+
|
|
11690
|
+
|
|
11052
11691
|
/***/ }),
|
|
11053
11692
|
|
|
11054
11693
|
/***/ "./src/Services/CheckForConnectionDeletion.ts":
|
|
@@ -11862,6 +12501,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
11862
12501
|
function CreateConnectionBetweenTwoConcepts(ofTheConcept_1, toTheConcept_1, linker_1) {
|
|
11863
12502
|
return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, both = false, count = false) {
|
|
11864
12503
|
var _a, _b;
|
|
12504
|
+
let startTime = performance.now();
|
|
11865
12505
|
if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {
|
|
11866
12506
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('CreateConnectionBetweenTwoConcepts', { ofTheConcept, toTheConcept, linker, both, count });
|
|
11867
12507
|
// console.log('data received from sw', res)
|
|
@@ -11889,6 +12529,11 @@ function CreateConnectionBetweenTwoConcepts(ofTheConcept_1, toTheConcept_1, link
|
|
|
11889
12529
|
let connectionConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_8__["default"])("connection", forwardLinker, false, 999, 999, 999);
|
|
11890
12530
|
let newConnection = new _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_2__.Connection(0, ofTheConcept.id, toTheConcept.id, userId, connectionConcept.id, 1000, accessId);
|
|
11891
12531
|
_DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_3__.SyncData.AddConnection(newConnection);
|
|
12532
|
+
// Add Log
|
|
12533
|
+
// Logger.logInfo(startTime, "unknown", "create", "unknown", undefined, 500, newConnection, "CreateConnectionBetweenTwoConcepts",
|
|
12534
|
+
// [ofTheConcept, toTheConcept, linker, both, count],
|
|
12535
|
+
// "unknown", undefined
|
|
12536
|
+
// )
|
|
11892
12537
|
return newConnection;
|
|
11893
12538
|
});
|
|
11894
12539
|
}
|
|
@@ -12398,6 +13043,12 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
12398
13043
|
|
|
12399
13044
|
|
|
12400
13045
|
|
|
13046
|
+
/**
|
|
13047
|
+
*
|
|
13048
|
+
* @param id
|
|
13049
|
+
* @param linker
|
|
13050
|
+
* @returns
|
|
13051
|
+
*/
|
|
12401
13052
|
function DeleteConnectionByType(id, linker) {
|
|
12402
13053
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12403
13054
|
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
@@ -14228,12 +14879,14 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
14228
14879
|
|
|
14229
14880
|
function GetConnectionById(id) {
|
|
14230
14881
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14882
|
+
let startTime = performance.now();
|
|
14231
14883
|
// Add connection id in access tracker
|
|
14232
14884
|
try {
|
|
14233
14885
|
_AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.incrementConnection(id);
|
|
14234
14886
|
}
|
|
14235
14887
|
catch (_a) {
|
|
14236
|
-
console.error("Error adding
|
|
14888
|
+
console.error("Error adding connection in access tracker");
|
|
14889
|
+
_app__WEBPACK_IMPORTED_MODULE_2__.Logger.log("ERROR", "Error Adding Connection");
|
|
14237
14890
|
}
|
|
14238
14891
|
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
14239
14892
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConnectionById', { id });
|
|
@@ -14245,6 +14898,8 @@ function GetConnectionById(id) {
|
|
|
14245
14898
|
let connectionString = yield (0,_Api_GetConnection__WEBPACK_IMPORTED_MODULE_1__.GetConnection)(id);
|
|
14246
14899
|
connection = connectionString;
|
|
14247
14900
|
}
|
|
14901
|
+
// Add Log
|
|
14902
|
+
// Logger.logInfo(startTime, "unknown", "read", "unknown", undefined, 200, connection, "GetConnectionById", [id], "unknown", undefined )
|
|
14248
14903
|
return connection;
|
|
14249
14904
|
});
|
|
14250
14905
|
}
|
|
@@ -14361,8 +15016,12 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
14361
15016
|
function GetLink(id_1, linker_1) {
|
|
14362
15017
|
return __awaiter(this, arguments, void 0, function* (id, linker, inpage = 10, page = 1) {
|
|
14363
15018
|
var _a;
|
|
15019
|
+
let startTime = performance.now();
|
|
14364
15020
|
if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {
|
|
14365
15021
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetLink', { id, linker, inpage, page });
|
|
15022
|
+
console.log('data received from sw', res);
|
|
15023
|
+
// Add Log
|
|
15024
|
+
// Logger.logInfo(startTime, "unknown", "read", "unknown", undefined, 200, res, "GetLink", ['id', 'linker', 'inpage', 'page'], "unknown", undefined )
|
|
14366
15025
|
// console.log('data received from sw', res)
|
|
14367
15026
|
return res.data;
|
|
14368
15027
|
}
|
|
@@ -14386,6 +15045,8 @@ function GetLink(id_1, linker_1) {
|
|
|
14386
15045
|
output.push(newComposition);
|
|
14387
15046
|
}
|
|
14388
15047
|
}
|
|
15048
|
+
// Add Log
|
|
15049
|
+
// Logger.logInfo(startTime, "unknown", "read", "unknown", undefined, 200, output, "GetLink", ['id', 'linker', 'inpage', 'page'], "unknown", undefined )
|
|
14389
15050
|
return output;
|
|
14390
15051
|
});
|
|
14391
15052
|
}
|
|
@@ -14600,9 +15261,15 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
14600
15261
|
*/
|
|
14601
15262
|
function GetTheConcept(id_1) {
|
|
14602
15263
|
return __awaiter(this, arguments, void 0, function* (id, userId = 999) {
|
|
15264
|
+
let startTime = performance.now();
|
|
14603
15265
|
try {
|
|
14604
|
-
//
|
|
14605
|
-
|
|
15266
|
+
// Add concept id in access tracker
|
|
15267
|
+
try {
|
|
15268
|
+
_AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.incrementConcept(id);
|
|
15269
|
+
}
|
|
15270
|
+
catch (_a) {
|
|
15271
|
+
console.error("Error adding concepts in access tracker");
|
|
15272
|
+
}
|
|
14606
15273
|
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
14607
15274
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetTheConcept', { id, userId });
|
|
14608
15275
|
// console.log('data received from sw', res)
|
|
@@ -14629,10 +15296,14 @@ function GetTheConcept(id_1) {
|
|
|
14629
15296
|
}
|
|
14630
15297
|
}
|
|
14631
15298
|
}
|
|
15299
|
+
// Add Log
|
|
15300
|
+
// Logger.logInfo(startTime, userId, "read", "unknown", undefined, 200, concept, "GetTheConcept", ['id', 'userId'], "unknown", undefined )
|
|
14632
15301
|
return concept;
|
|
14633
15302
|
}
|
|
14634
15303
|
catch (err) {
|
|
14635
15304
|
console.error("this is the error in the getting concept", err);
|
|
15305
|
+
// Add Log
|
|
15306
|
+
_app__WEBPACK_IMPORTED_MODULE_2__.Logger.logError(startTime, userId, "read", "unknown", undefined, 500, err, "GetTheConcept", [id, userId], "unknown", undefined);
|
|
14636
15307
|
throw err;
|
|
14637
15308
|
}
|
|
14638
15309
|
});
|
|
@@ -14745,6 +15416,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14745
15416
|
/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* binding */ CreateConnectionBetweenTwoConceptsLocal)
|
|
14746
15417
|
/* harmony export */ });
|
|
14747
15418
|
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ "./src/app.ts");
|
|
15419
|
+
/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Middleware/logger.service */ "./src/Middleware/logger.service.ts");
|
|
14748
15420
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14749
15421
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14750
15422
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14755,9 +15427,11 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
14755
15427
|
});
|
|
14756
15428
|
};
|
|
14757
15429
|
|
|
15430
|
+
|
|
14758
15431
|
function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1, linker_1) {
|
|
14759
15432
|
return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, both = false, actions = { concepts: [], connections: [] }) {
|
|
14760
15433
|
var _a, _b, _c, _d, _e, _f;
|
|
15434
|
+
let startTime = performance.now();
|
|
14761
15435
|
try {
|
|
14762
15436
|
if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
|
|
14763
15437
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateConnectionBetweenTwoConceptsLocal', { ofTheConcept, toTheConcept, linker, both, actions });
|
|
@@ -14787,9 +15461,25 @@ function CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1,
|
|
|
14787
15461
|
// }
|
|
14788
15462
|
var connectionConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.MakeTheInstanceConceptLocal)("connection", forwardLinker, false, 999, 999, 999, undefined, actions);
|
|
14789
15463
|
let newConnection = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.CreateTheConnectionLocal)(ofTheConcept.id, toTheConcept.id, connectionConcept.id, 1000, undefined, undefined, actions);
|
|
15464
|
+
// Add Log
|
|
15465
|
+
// Logger.logInfo(
|
|
15466
|
+
// startTime,
|
|
15467
|
+
// userId,
|
|
15468
|
+
// 'create',
|
|
15469
|
+
// undefined,
|
|
15470
|
+
// undefined,
|
|
15471
|
+
// 200,
|
|
15472
|
+
// newConnection,
|
|
15473
|
+
// 'CreateConnectionBetweenTwoConceptsLocal',
|
|
15474
|
+
// ['ofTheConceptId', 'toTheConceptId', 'linker', 'both'],
|
|
15475
|
+
// undefined,
|
|
15476
|
+
// undefined
|
|
15477
|
+
// )
|
|
14790
15478
|
return newConnection;
|
|
14791
15479
|
}
|
|
14792
15480
|
catch (ex) {
|
|
15481
|
+
// Add Log
|
|
15482
|
+
_Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__.Logger.logError(startTime, ofTheConcept.userId, 'create', undefined, undefined, 500, ex, 'CreateConnectionBetweenTwoConceptsLocal', [ofTheConcept, toTheConcept, linker, both], undefined, undefined);
|
|
14793
15483
|
throw ex;
|
|
14794
15484
|
}
|
|
14795
15485
|
});
|
|
@@ -15039,6 +15729,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15039
15729
|
function CreateTheCompositionLocal(json_1) {
|
|
15040
15730
|
return __awaiter(this, arguments, void 0, function* (json, ofTheConceptId = null, ofTheConceptUserId = null, mainKey = null, userId = null, accessId = null, sessionInformationId = null, automaticSync = false, actions = { concepts: [], connections: [] }) {
|
|
15041
15731
|
var _a, _b, _c, _d;
|
|
15732
|
+
let startTime = performance.now();
|
|
15042
15733
|
if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
|
|
15043
15734
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheCompositionLocal', { json, ofTheConceptId, ofTheConceptUserId, mainKey, userId, accessId, sessionInformationId, actions });
|
|
15044
15735
|
// console.log('data received from sw', res)
|
|
@@ -15083,6 +15774,12 @@ function CreateTheCompositionLocal(json_1) {
|
|
|
15083
15774
|
yield (0,_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_2__.CreateTheConnectionLocal)(ofThe, concept.id, localMainKey, undefined, undefined, undefined, actions);
|
|
15084
15775
|
}
|
|
15085
15776
|
}
|
|
15777
|
+
// Add Log
|
|
15778
|
+
// Logger.logInfo(startTime, userId || "unknown", "create", "unknown", undefined, 200, MainConcept, "CreateTheCompositionLocal",
|
|
15779
|
+
// ['json', 'ofTheConceptId', 'ofTheConceptUserId', 'mainKey', 'userId', 'accessId', 'sessionInformationId', 'automaticSync' ],
|
|
15780
|
+
// "unknown",
|
|
15781
|
+
// undefined
|
|
15782
|
+
// )
|
|
15086
15783
|
return MainConcept;
|
|
15087
15784
|
});
|
|
15088
15785
|
}
|
|
@@ -15104,6 +15801,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15104
15801
|
/* harmony import */ var _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/Concept */ "./src/DataStructures/Concept.ts");
|
|
15105
15802
|
/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataStructures/Local/LocalConceptData */ "./src/DataStructures/Local/LocalConceptData.ts");
|
|
15106
15803
|
/* harmony import */ var _DataStructures_Local_LocalId__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../DataStructures/Local/LocalId */ "./src/DataStructures/Local/LocalId.ts");
|
|
15804
|
+
/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Middleware/logger.service */ "./src/Middleware/logger.service.ts");
|
|
15107
15805
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15108
15806
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15109
15807
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -15117,6 +15815,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15117
15815
|
|
|
15118
15816
|
|
|
15119
15817
|
|
|
15818
|
+
|
|
15120
15819
|
/**
|
|
15121
15820
|
* This function creates the concept in the local system (Local memory and IndexDb) but not in the backend database
|
|
15122
15821
|
* To create this concept in the backend database you need to sync the local data to the backend by LocalSyncData class.
|
|
@@ -15140,6 +15839,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15140
15839
|
function CreateTheConceptLocal(referent_1, typecharacter_1, userId_1, categoryId_1, typeId_1, accessId_1) {
|
|
15141
15840
|
return __awaiter(this, arguments, void 0, function* (referent, typecharacter, userId, categoryId, typeId, accessId, isComposition = false, referentId = 0, actions = { concepts: [], connections: [] }) {
|
|
15142
15841
|
var _a, _b, _c, _d;
|
|
15842
|
+
let startTime = performance.now();
|
|
15143
15843
|
try {
|
|
15144
15844
|
if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {
|
|
15145
15845
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateTheConceptLocal', { referent, typecharacter, userId, categoryId, typeId, accessId, isComposition, referentId });
|
|
@@ -15166,9 +15866,12 @@ function CreateTheConceptLocal(referent_1, typecharacter_1, userId_1, categoryId
|
|
|
15166
15866
|
_DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__.LocalConceptsData.AddConcept(concept);
|
|
15167
15867
|
actions.concepts.push(concept);
|
|
15168
15868
|
//storeToDatabase("localconcept",concept);
|
|
15869
|
+
// Add Log
|
|
15870
|
+
// Logger.logInfo(startTime, userId, "create", "unknown", "unknown", 200, concept, "createTheConceptLocal", ['referent', 'typecharacter', 'composition', 'userId', 'categoryId', 'typeId', 'accessId', 'sessionInformationId', 'isComposition', 'referentId'], undefined)
|
|
15169
15871
|
return concept;
|
|
15170
15872
|
}
|
|
15171
15873
|
catch (error) {
|
|
15874
|
+
_Middleware_logger_service__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, userId, "create", "unknown", "unknown", 500, undefined, "createTheConceptLocal", [referent, typecharacter, userId, categoryId, typeId, accessId, isComposition], undefined);
|
|
15172
15875
|
throw error;
|
|
15173
15876
|
}
|
|
15174
15877
|
});
|
|
@@ -15190,7 +15893,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15190
15893
|
/* harmony import */ var _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DataStructures/Connection */ "./src/DataStructures/Connection.ts");
|
|
15191
15894
|
/* harmony import */ var _DataStructures_Local_LocalConnectionData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/Local/LocalConnectionData */ "./src/DataStructures/Local/LocalConnectionData.ts");
|
|
15192
15895
|
/* harmony import */ var _DataStructures_Local_LocalId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataStructures/Local/LocalId */ "./src/DataStructures/Local/LocalId.ts");
|
|
15193
|
-
/* harmony import */ var
|
|
15896
|
+
/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Middleware/logger.service */ "./src/Middleware/logger.service.ts");
|
|
15897
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../app */ "./src/app.ts");
|
|
15194
15898
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15195
15899
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15196
15900
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -15204,6 +15908,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15204
15908
|
|
|
15205
15909
|
|
|
15206
15910
|
|
|
15911
|
+
|
|
15207
15912
|
/**
|
|
15208
15913
|
* This function creates a connection for the concept connection system. This connection will only be created in real sense
|
|
15209
15914
|
* once the data is synced using LocalSyncData.SyncDataOnline()
|
|
@@ -15220,8 +15925,9 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15220
15925
|
function CreateTheConnectionLocal(ofTheConceptId_1, toTheConceptId_1, typeId_1) {
|
|
15221
15926
|
return __awaiter(this, arguments, void 0, function* (ofTheConceptId, toTheConceptId, typeId, orderId = 1, typeString = "", userId = 999, actions = { concepts: [], connections: [] }) {
|
|
15222
15927
|
var _a, _b, _c, _d;
|
|
15223
|
-
|
|
15224
|
-
|
|
15928
|
+
let startTime = performance.now();
|
|
15929
|
+
if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
|
|
15930
|
+
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('CreateTheConnectionLocal', { ofTheConceptId, toTheConceptId, typeId, orderId, typeString, userId, actions });
|
|
15225
15931
|
// console.log('data received from sw', res)
|
|
15226
15932
|
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)
|
|
15227
15933
|
actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));
|
|
@@ -15244,14 +15950,29 @@ function CreateTheConnectionLocal(ofTheConceptId_1, toTheConceptId_1, typeId_1)
|
|
|
15244
15950
|
connection = new _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_0__.Connection(randomid, realOfTheConceptId, realToTheConceptId, userId, typeId, orderId, accessId);
|
|
15245
15951
|
connection.isTemp = true;
|
|
15246
15952
|
connection.typeCharacter = typeString;
|
|
15247
|
-
|
|
15953
|
+
_app__WEBPACK_IMPORTED_MODULE_4__.LocalSyncData.AddConnection(connection);
|
|
15248
15954
|
_DataStructures_Local_LocalConnectionData__WEBPACK_IMPORTED_MODULE_1__.LocalConnectionData.AddConnection(connection);
|
|
15249
15955
|
actions.connections.push(connection);
|
|
15250
15956
|
//storeToDatabase("localconnection", connection);
|
|
15251
15957
|
}
|
|
15958
|
+
// Add Log
|
|
15959
|
+
// Logger.logInfo(
|
|
15960
|
+
// startTime,
|
|
15961
|
+
// userId,
|
|
15962
|
+
// "create",
|
|
15963
|
+
// "Unknown",
|
|
15964
|
+
// "Unknown",
|
|
15965
|
+
// 200,
|
|
15966
|
+
// connection,
|
|
15967
|
+
// "CreateTheConnectionLocal",
|
|
15968
|
+
// ['ofTheConceptId', 'toTheConceptId', 'typeId', 'orderId', 'typeString', 'userId'],
|
|
15969
|
+
// "UnknownUserAgent",
|
|
15970
|
+
// []
|
|
15971
|
+
// );
|
|
15252
15972
|
return connection;
|
|
15253
15973
|
}
|
|
15254
15974
|
catch (error) {
|
|
15975
|
+
_Middleware_logger_service__WEBPACK_IMPORTED_MODULE_3__.Logger.logError(startTime, userId, "create", "Unknown", "Unknown", 500, undefined, "CreateTheConnectionLocal", [ofTheConceptId, toTheConceptId, typeId, orderId, typeString, userId], "UnknownUserAgent", []);
|
|
15255
15976
|
throw error;
|
|
15256
15977
|
}
|
|
15257
15978
|
});
|
|
@@ -15773,6 +16494,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15773
16494
|
*/
|
|
15774
16495
|
function GetTheConceptLocal(id) {
|
|
15775
16496
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16497
|
+
let startTime = performance.now();
|
|
15776
16498
|
try {
|
|
15777
16499
|
if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {
|
|
15778
16500
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetTheConceptLocal', { id });
|
|
@@ -15796,9 +16518,12 @@ function GetTheConceptLocal(id) {
|
|
|
15796
16518
|
let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(id);
|
|
15797
16519
|
lconcept = (0,_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_3__.convertFromConceptToLConcept)(concept);
|
|
15798
16520
|
}
|
|
16521
|
+
// Add Log
|
|
16522
|
+
// Logger.logInfo(startTime, "unknown", "read", "unknown", undefined, 200, lconcept, "GetTheConceptLocal", [id], "unknown", undefined )
|
|
15799
16523
|
return lconcept;
|
|
15800
16524
|
}
|
|
15801
16525
|
catch (error) {
|
|
16526
|
+
_app__WEBPACK_IMPORTED_MODULE_2__.Logger.logError(startTime, "unknown", "read", "unknown", undefined, 200, undefined, "GetTheConceptLocal", [id], "unknown", undefined);
|
|
15802
16527
|
throw error;
|
|
15803
16528
|
}
|
|
15804
16529
|
});
|
|
@@ -15909,6 +16634,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
15909
16634
|
function MakeTheInstanceConceptLocal(type_1, referent_1) {
|
|
15910
16635
|
return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, accessId, sessionInformationId = 999, referentId = 0, actions = { concepts: [], connections: [] }) {
|
|
15911
16636
|
var _a, _b, _c, _d;
|
|
16637
|
+
let startTime = performance.now();
|
|
15912
16638
|
if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {
|
|
15913
16639
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('MakeTheInstanceConceptLocal', { type, referent, composition, userId, accessId, sessionInformationId, referentId, actions });
|
|
15914
16640
|
// console.log('data received from sw', res)
|
|
@@ -15960,10 +16686,25 @@ function MakeTheInstanceConceptLocal(type_1, referent_1) {
|
|
|
15960
16686
|
}
|
|
15961
16687
|
concept.type = typeConcept;
|
|
15962
16688
|
_app__WEBPACK_IMPORTED_MODULE_3__.LocalSyncData.AddConcept(concept);
|
|
16689
|
+
// Add Log
|
|
16690
|
+
// Logger.logInfo(
|
|
16691
|
+
// startTime,
|
|
16692
|
+
// userId,
|
|
16693
|
+
// "create",
|
|
16694
|
+
// "Unknown",
|
|
16695
|
+
// "Unknown",
|
|
16696
|
+
// 200,
|
|
16697
|
+
// concept,
|
|
16698
|
+
// "MakeTheInstanceConceptLocal",
|
|
16699
|
+
// ['type', 'referent', 'composition', 'userId', 'accessId', 'sessionInformationId', 'referentId'],
|
|
16700
|
+
// "UnknownUserAgent",
|
|
16701
|
+
// []
|
|
16702
|
+
// );
|
|
15963
16703
|
actions.concepts.push(concept);
|
|
15964
16704
|
return concept;
|
|
15965
16705
|
}
|
|
15966
16706
|
catch (error) {
|
|
16707
|
+
_app__WEBPACK_IMPORTED_MODULE_3__.Logger.logError(startTime, userId, "create", "Unknown", "Unknown", 500, undefined, "MakeTheInstanceConceptLocal", [type, referent, composition, userId, accessId, sessionInformationId, referentId], "UnknownUserAgent", []);
|
|
15967
16708
|
throw error;
|
|
15968
16709
|
}
|
|
15969
16710
|
});
|
|
@@ -16098,6 +16839,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
16098
16839
|
function UpdateCompositionLocal(patcherStructure_1) {
|
|
16099
16840
|
return __awaiter(this, arguments, void 0, function* (patcherStructure, actions = { concepts: [], connections: [] }) {
|
|
16100
16841
|
var _a, _b, _c, _d;
|
|
16842
|
+
let startTime = performance.now();
|
|
16101
16843
|
if (_app__WEBPACK_IMPORTED_MODULE_7__.serviceWorker) {
|
|
16102
16844
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_7__.sendMessage)("UpdateCompositionLocal", {
|
|
16103
16845
|
patcherStructure,
|
|
@@ -16193,6 +16935,8 @@ function UpdateCompositionLocal(patcherStructure_1) {
|
|
|
16193
16935
|
// delete the connection in the backend
|
|
16194
16936
|
yield (0,_DeleteConnection__WEBPACK_IMPORTED_MODULE_4__.DeleteConnectionById)(toDeleteConnections[j].id);
|
|
16195
16937
|
}
|
|
16938
|
+
// Add Log
|
|
16939
|
+
// Logger.logInfo(startTime, userId, "update", "unknown", undefined, 200, object, "UpdateCompositionLocal", ['patcherStructure'], "unknown", undefined )
|
|
16196
16940
|
yield _app__WEBPACK_IMPORTED_MODULE_7__.LocalSyncData.SyncDataOnline(undefined, actions);
|
|
16197
16941
|
});
|
|
16198
16942
|
}
|
|
@@ -16385,6 +17129,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
16385
17129
|
*/
|
|
16386
17130
|
function MakeTheInstanceConcept(type_1, referent_1) {
|
|
16387
17131
|
return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, passedAccessId = 4, passedSessionId = 999, referentId = 0) {
|
|
17132
|
+
let startTime = performance.now();
|
|
16388
17133
|
if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {
|
|
16389
17134
|
const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)("MakeTheInstanceConcept", {
|
|
16390
17135
|
type,
|
|
@@ -16459,6 +17204,12 @@ function MakeTheInstanceConcept(type_1, referent_1) {
|
|
|
16459
17204
|
// }
|
|
16460
17205
|
// }
|
|
16461
17206
|
concept.type = typeConcept;
|
|
17207
|
+
// Add Log
|
|
17208
|
+
// Logger.logInfo(startTime, "unknown", "create", "unknown", undefined, 200, concept, "MakeTheInstanceConcept",
|
|
17209
|
+
// ['type', 'referent', 'composition', 'userId', 'passedAccessId', 'passedSessionId', 'referentId'],
|
|
17210
|
+
// "unknown",
|
|
17211
|
+
// undefined
|
|
17212
|
+
// )
|
|
16462
17213
|
return concept;
|
|
16463
17214
|
});
|
|
16464
17215
|
}
|
|
@@ -16958,7 +17709,9 @@ function FormatFromConnectionsAlteredArrayExternalJustId(connections_1, composit
|
|
|
16958
17709
|
let isComp = compositionData[connections[i].ofTheConceptId];
|
|
16959
17710
|
if (isComp) {
|
|
16960
17711
|
let data = compositionData[connections[i].ofTheConceptId];
|
|
16961
|
-
data
|
|
17712
|
+
if (data) {
|
|
17713
|
+
data["id"] = ofTheConcept.id;
|
|
17714
|
+
}
|
|
16962
17715
|
let reverseCharater = linkerConcept.characterValue + "_reverse";
|
|
16963
17716
|
if (Array.isArray(newData[key][reverseCharater])) {
|
|
16964
17717
|
newData[key][reverseCharater].push(data);
|
|
@@ -17006,7 +17759,9 @@ function FormatFromConnectionsAlteredArrayExternalJustId(connections_1, composit
|
|
|
17006
17759
|
let isComp = compositionData[connections[i].toTheConceptId];
|
|
17007
17760
|
if (isComp) {
|
|
17008
17761
|
let data = compositionData[connections[i].toTheConceptId];
|
|
17009
|
-
data
|
|
17762
|
+
if (data) {
|
|
17763
|
+
data["id"] = toTheConcept.id;
|
|
17764
|
+
}
|
|
17010
17765
|
if (Array.isArray(newData[key][linkerConcept.characterValue])) {
|
|
17011
17766
|
newData[key][linkerConcept.characterValue].push(data);
|
|
17012
17767
|
}
|
|
@@ -17033,7 +17788,9 @@ function FormatFromConnectionsAlteredArrayExternalJustId(connections_1, composit
|
|
|
17033
17788
|
let mymainData = {};
|
|
17034
17789
|
console.log("this is the main compositions DATA", compositionData[mainComposition[i]]);
|
|
17035
17790
|
mymainData = compositionData[mainComposition[i]];
|
|
17036
|
-
mymainData
|
|
17791
|
+
if (mymainData) {
|
|
17792
|
+
mymainData["id"] = mainComposition[i];
|
|
17793
|
+
}
|
|
17037
17794
|
mainData.push(mymainData);
|
|
17038
17795
|
}
|
|
17039
17796
|
return mainData;
|
|
@@ -18949,8 +19706,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18949
19706
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18950
19707
|
/* harmony export */ Validator: () => (/* binding */ Validator)
|
|
18951
19708
|
/* harmony export */ });
|
|
18952
|
-
/* harmony import */ var
|
|
18953
|
-
/* harmony import */ var
|
|
19709
|
+
/* harmony import */ var _Middleware_ErrorHandling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Middleware/ErrorHandling */ "./src/Middleware/ErrorHandling.ts");
|
|
19710
|
+
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
|
|
19711
|
+
/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ "./src/Validator/constant.ts");
|
|
18954
19712
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18955
19713
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18956
19714
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -18962,6 +19720,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
18962
19720
|
};
|
|
18963
19721
|
|
|
18964
19722
|
|
|
19723
|
+
|
|
18965
19724
|
class Validator {
|
|
18966
19725
|
/**
|
|
18967
19726
|
* Checks if a concept with the given type and value is unique.
|
|
@@ -18979,10 +19738,10 @@ class Validator {
|
|
|
18979
19738
|
const sessionUserId = 999;
|
|
18980
19739
|
const userId = 999;
|
|
18981
19740
|
// Create the type concept based on session data
|
|
18982
|
-
let type_concept = yield (0,
|
|
19741
|
+
let type_concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptApi)(type, userId);
|
|
18983
19742
|
let type_concept_id = type_concept.id;
|
|
18984
19743
|
// Check if the concept exists for the provided value and type_concept_id
|
|
18985
|
-
let concept = yield (0,
|
|
19744
|
+
let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacterAndType)(value, type_concept_id);
|
|
18986
19745
|
console.log("This is the concept for validator", concept);
|
|
18987
19746
|
if (concept.id > 0) {
|
|
18988
19747
|
return false;
|
|
@@ -19009,59 +19768,81 @@ class Validator {
|
|
|
19009
19768
|
validateField(fieldName_1, fieldType_1, dataType_1, value_1, pattern_1, conceptType_1, maxLength_1, minLength_1, minValue_1, maxValue_1, accept_1, file_1, required_1) {
|
|
19010
19769
|
return __awaiter(this, arguments, void 0, function* (fieldName, fieldType, dataType, value, pattern, conceptType, maxLength, minLength, minValue, maxValue, accept, file, required, isUnique = false) {
|
|
19011
19770
|
var _a;
|
|
19012
|
-
|
|
19013
|
-
|
|
19014
|
-
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
if (
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
// 3. Check if the provided pattern match with the value or not
|
|
19025
|
-
if (pattern && value) {
|
|
19026
|
-
const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern;
|
|
19027
|
-
if (value !== '' && !regex.test(value)) {
|
|
19028
|
-
errors['pattern'] = `Pattern doesn't match with data`;
|
|
19029
|
-
}
|
|
19030
|
-
}
|
|
19031
|
-
// 4. Validate maxLength
|
|
19032
|
-
if (value && maxLength !== null && value.length > maxLength) {
|
|
19033
|
-
errors['maxLength'] = `length exceeds the maximum length of ${maxLength}`;
|
|
19034
|
-
}
|
|
19035
|
-
// 5. Validate minLength
|
|
19036
|
-
if (value && minLength !== null && value.length < minLength) {
|
|
19037
|
-
errors['minLength'] = `length must be at least ${minLength} characters long`;
|
|
19038
|
-
}
|
|
19039
|
-
// 6. Validate minValue (only for numeric fields)
|
|
19040
|
-
if (minValue !== null && value && !isNaN(Number(value)) && Number(value) < minValue) {
|
|
19041
|
-
errors['minValue'] = `value must be greater than or equal to ${minValue}`;
|
|
19042
|
-
}
|
|
19043
|
-
// 7. Validate maxValue (only for numeric fields)
|
|
19044
|
-
if (maxValue !== null && value && !isNaN(Number(value)) && Number(value) > maxValue) {
|
|
19045
|
-
errors['maxValue'] = `value must be less than or equal to ${maxValue}`;
|
|
19046
|
-
}
|
|
19047
|
-
// 8. File validation: Check if this is a file input
|
|
19048
|
-
if (file) {
|
|
19049
|
-
if (fieldType && accept) {
|
|
19050
|
-
const acceptedTypes = accept.split(',').map(type => type.trim().toLowerCase());
|
|
19051
|
-
const fileExtension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
19052
|
-
if (fileExtension && !acceptedTypes.includes(fileExtension)) {
|
|
19053
|
-
errors['accept'] = `file must be a valid file type: ${acceptedTypes.join(', ')}`;
|
|
19771
|
+
try {
|
|
19772
|
+
let startTime = performance.now();
|
|
19773
|
+
const errors = {};
|
|
19774
|
+
// 1. Validate required field (must not be empty)
|
|
19775
|
+
if (required && (value === null || value === '')) {
|
|
19776
|
+
errors['required'] = `This is required field`;
|
|
19777
|
+
}
|
|
19778
|
+
// 2. Validate using regex pattern for the data type
|
|
19779
|
+
if (dataType && value) {
|
|
19780
|
+
let pattern = _constant__WEBPACK_IMPORTED_MODULE_2__.DATA_TYPES_RULES[dataType];
|
|
19781
|
+
if (pattern && value !== '' && !pattern.test(value)) {
|
|
19782
|
+
errors['dataType'] = `Invalid value for ${dataType}`;
|
|
19054
19783
|
}
|
|
19055
19784
|
}
|
|
19056
|
-
|
|
19057
|
-
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19785
|
+
// 3. Check if the provided pattern match with the value or not
|
|
19786
|
+
if (pattern && value) {
|
|
19787
|
+
const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern;
|
|
19788
|
+
if (value !== '' && !regex.test(value)) {
|
|
19789
|
+
errors['pattern'] = `Pattern doesn't match with value`;
|
|
19790
|
+
}
|
|
19791
|
+
}
|
|
19792
|
+
// 4. Validate maxLength
|
|
19793
|
+
if (value && maxLength !== null && value.length > maxLength) {
|
|
19794
|
+
errors['maxLength'] = `Length exceeds the maximum length of ${maxLength}`;
|
|
19795
|
+
}
|
|
19796
|
+
// 5. Validate minLength
|
|
19797
|
+
if (value && minLength !== null && value.length < minLength) {
|
|
19798
|
+
errors['minLength'] = `Length must be at least ${minLength} characters long`;
|
|
19799
|
+
}
|
|
19800
|
+
// 6. Validate minValue (only for numeric fields)
|
|
19801
|
+
if (minValue !== null && value && !isNaN(Number(value)) && Number(value) < minValue) {
|
|
19802
|
+
errors['minValue'] = `Value must be greater than or equal to ${minValue}`;
|
|
19803
|
+
}
|
|
19804
|
+
// 7. Validate maxValue (only for numeric fields)
|
|
19805
|
+
if (maxValue !== null && value && !isNaN(Number(value)) && Number(value) > maxValue) {
|
|
19806
|
+
errors['maxValue'] = `Value must be less than or equal to ${maxValue}`;
|
|
19807
|
+
}
|
|
19808
|
+
// 8. File validation: Check if this is a file input
|
|
19809
|
+
if (file) {
|
|
19810
|
+
if (fieldType && accept) {
|
|
19811
|
+
const acceptedTypes = accept.split(',').map(type => type.trim().toLowerCase());
|
|
19812
|
+
const fileExtension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
19813
|
+
if (fileExtension && !acceptedTypes.includes(fileExtension)) {
|
|
19814
|
+
errors['accept'] = `File must be a valid file type: ${acceptedTypes.join(', ')}`;
|
|
19815
|
+
}
|
|
19816
|
+
}
|
|
19817
|
+
}
|
|
19818
|
+
// 9. Check if the field needs to be unique and perform uniqueness validation
|
|
19819
|
+
if (conceptType && isUnique && value) {
|
|
19820
|
+
const isUniqueValue = yield this.checkUniqueness(conceptType, value);
|
|
19821
|
+
if (!isUniqueValue) {
|
|
19822
|
+
errors['unique'] = `Value is not unique`;
|
|
19823
|
+
}
|
|
19062
19824
|
}
|
|
19825
|
+
// Add Log
|
|
19826
|
+
// Logger.logInfo(
|
|
19827
|
+
// startTime,
|
|
19828
|
+
// "",
|
|
19829
|
+
// undefined,
|
|
19830
|
+
// "Unknown",
|
|
19831
|
+
// "Unknown",
|
|
19832
|
+
// 200,
|
|
19833
|
+
// errors,
|
|
19834
|
+
// "validateField",
|
|
19835
|
+
// ['fieldName', 'fieldType', 'dataType', 'value', 'pattern', 'conceptType', 'minLength', 'maxLength', 'minValue', 'maxValue', 'accept', 'file', 'required', 'isUnique'], // Function parameters
|
|
19836
|
+
// "UnknownUserAgent",
|
|
19837
|
+
// []
|
|
19838
|
+
// );
|
|
19839
|
+
return errors;
|
|
19840
|
+
}
|
|
19841
|
+
catch (error) {
|
|
19842
|
+
console.error("Error on validate field..");
|
|
19843
|
+
(0,_Middleware_ErrorHandling__WEBPACK_IMPORTED_MODULE_0__.HandleFunctionError)(error, "Validation Field Error");
|
|
19844
|
+
throw error;
|
|
19063
19845
|
}
|
|
19064
|
-
return errors;
|
|
19065
19846
|
});
|
|
19066
19847
|
}
|
|
19067
19848
|
/**
|
|
@@ -19076,17 +19857,56 @@ class Validator {
|
|
|
19076
19857
|
*/
|
|
19077
19858
|
validateForm(formData) {
|
|
19078
19859
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
|
|
19084
|
-
|
|
19085
|
-
|
|
19086
|
-
|
|
19087
|
-
|
|
19088
|
-
|
|
19860
|
+
try {
|
|
19861
|
+
let startTime = performance.now();
|
|
19862
|
+
const validationErrors = {};
|
|
19863
|
+
// Iterate through the fields in the form data
|
|
19864
|
+
for (const fieldName in formData) {
|
|
19865
|
+
const { value, fieldType, dataType, pattern, conceptType, maxLength = null, minLength = null, minValue = null, maxValue = null, accept = null, file = null, required, isUnique } = formData[fieldName];
|
|
19866
|
+
// Call the validateField function to validate each field
|
|
19867
|
+
const fieldErrors = yield this.validateField(fieldName, fieldType, dataType, value, pattern, conceptType, maxLength, minLength, minValue, maxValue, accept, file, required, isUnique);
|
|
19868
|
+
if (Object.keys(fieldErrors).length > 0)
|
|
19869
|
+
validationErrors[fieldName] = fieldErrors;
|
|
19870
|
+
}
|
|
19871
|
+
return validationErrors;
|
|
19872
|
+
}
|
|
19873
|
+
catch (error) {
|
|
19874
|
+
(0,_Middleware_ErrorHandling__WEBPACK_IMPORTED_MODULE_0__.HandleFunctionError)(error, "");
|
|
19875
|
+
throw error;
|
|
19876
|
+
}
|
|
19877
|
+
});
|
|
19878
|
+
}
|
|
19879
|
+
/**
|
|
19880
|
+
*
|
|
19881
|
+
* @param fieldName
|
|
19882
|
+
* @param fieldType
|
|
19883
|
+
* @param dataType
|
|
19884
|
+
* @param value
|
|
19885
|
+
* @param pattern
|
|
19886
|
+
* @param conceptType
|
|
19887
|
+
* @param maxLength
|
|
19888
|
+
* @param minLength
|
|
19889
|
+
* @param minValue
|
|
19890
|
+
* @param maxValue
|
|
19891
|
+
* @param accept
|
|
19892
|
+
* @param file
|
|
19893
|
+
* @param required
|
|
19894
|
+
* @param isUnique
|
|
19895
|
+
* @returns Object with status and details
|
|
19896
|
+
*/
|
|
19897
|
+
validate(fieldName, fieldType, dataType, value, pattern, conceptType, maxLength, minLength, minValue, maxValue, accept, file, required, isUnique = false) {
|
|
19898
|
+
let error = {};
|
|
19899
|
+
this.validateField(fieldName, fieldType, dataType, value, pattern, conceptType, maxLength, minLength, minValue, maxValue, accept, file, required, isUnique).then((err) => {
|
|
19900
|
+
if (Object.keys(err).length > 0) {
|
|
19901
|
+
error['status'] = false;
|
|
19902
|
+
error['details'] = err;
|
|
19903
|
+
}
|
|
19904
|
+
else {
|
|
19905
|
+
error['status'] = true;
|
|
19906
|
+
}
|
|
19089
19907
|
});
|
|
19908
|
+
console.error("Error on validate object");
|
|
19909
|
+
return error;
|
|
19090
19910
|
}
|
|
19091
19911
|
}
|
|
19092
19912
|
|
|
@@ -20122,7 +20942,23 @@ class GetCompositionListObservable extends _DepenedencyObserver__WEBPACK_IMPORTE
|
|
|
20122
20942
|
* This function will give you the list of the concepts by composition name with a listener to any data change.
|
|
20123
20943
|
*/
|
|
20124
20944
|
function GetCompositionListListener(compositionName, userId, inpage, page, format = _app__WEBPACK_IMPORTED_MODULE_1__.JUSTDATA) {
|
|
20125
|
-
|
|
20945
|
+
let startTime = performance.now();
|
|
20946
|
+
const compositionResult = new GetCompositionListObservable(compositionName, userId, inpage, page, format);
|
|
20947
|
+
// Add Log
|
|
20948
|
+
// Logger.logInfo(
|
|
20949
|
+
// startTime,
|
|
20950
|
+
// userId,
|
|
20951
|
+
// "read",
|
|
20952
|
+
// "Unknown",
|
|
20953
|
+
// "Unknown",
|
|
20954
|
+
// 200,
|
|
20955
|
+
// compositionResult,
|
|
20956
|
+
// "GetCompositionListListener",
|
|
20957
|
+
// ['compositionName', 'userId', 'inpage', 'page', 'format'],
|
|
20958
|
+
// "UnknownUserAgent",
|
|
20959
|
+
// []
|
|
20960
|
+
// );
|
|
20961
|
+
return compositionResult;
|
|
20126
20962
|
}
|
|
20127
20963
|
|
|
20128
20964
|
|
|
@@ -20811,12 +21647,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20811
21647
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20812
21648
|
/* harmony export */ ADMIN: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_66__.ADMIN),
|
|
20813
21649
|
/* harmony export */ ALLID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_65__.ALLID),
|
|
20814
|
-
/* harmony export */ AccessTracker: () => (/* reexport safe */
|
|
21650
|
+
/* harmony export */ AccessTracker: () => (/* reexport safe */ _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_115__.AccessTracker),
|
|
20815
21651
|
/* harmony export */ AddGhostConcept: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_50__.AddGhostConcept),
|
|
20816
|
-
/* harmony export */ Anomaly: () => (/* reexport safe */
|
|
21652
|
+
/* harmony export */ Anomaly: () => (/* reexport safe */ _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_106__.Anomaly),
|
|
20817
21653
|
/* harmony export */ BaseUrl: () => (/* reexport safe */ _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_98__.BaseUrl),
|
|
20818
21654
|
/* harmony export */ BinaryTree: () => (/* reexport safe */ _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_83__.BinaryTree),
|
|
20819
|
-
/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */
|
|
21655
|
+
/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */ _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_104__.BuilderStatefulWidget),
|
|
20820
21656
|
/* harmony export */ Composition: () => (/* reexport safe */ _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_87__.Composition),
|
|
20821
21657
|
/* harmony export */ CompositionBinaryTree: () => (/* reexport safe */ _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_88__.CompositionBinaryTree),
|
|
20822
21658
|
/* harmony export */ CompositionNode: () => (/* reexport safe */ _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_89__.CompositionNode),
|
|
@@ -20843,17 +21679,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20843
21679
|
/* harmony export */ DeleteConceptById: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteConceptById),
|
|
20844
21680
|
/* harmony export */ DeleteConceptLocal: () => (/* reexport safe */ _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_61__.DeleteConceptLocal),
|
|
20845
21681
|
/* harmony export */ DeleteConnectionById: () => (/* reexport safe */ _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__.DeleteConnectionById),
|
|
20846
|
-
/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */
|
|
21682
|
+
/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_110__.DeleteConnectionByType),
|
|
20847
21683
|
/* harmony export */ DeleteUser: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteUser),
|
|
20848
21684
|
/* harmony export */ DependencyObserver: () => (/* reexport safe */ _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_68__.DependencyObserver),
|
|
20849
21685
|
/* harmony export */ FilterSearch: () => (/* reexport safe */ _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_92__.FilterSearch),
|
|
20850
21686
|
/* harmony export */ FormatFromConnections: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_51__.FormatFromConnections),
|
|
20851
21687
|
/* harmony export */ FormatFromConnectionsAltered: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_51__.FormatFromConnectionsAltered),
|
|
20852
|
-
/* harmony export */ FreeschemaQuery: () => (/* reexport safe */
|
|
20853
|
-
/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */
|
|
21688
|
+
/* harmony export */ FreeschemaQuery: () => (/* reexport safe */ _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_111__.FreeschemaQuery),
|
|
21689
|
+
/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */ _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_112__.FreeschemaQueryApi),
|
|
20854
21690
|
/* harmony export */ GetAllConnectionsOfComposition: () => (/* reexport safe */ _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__.GetAllConnectionsOfComposition),
|
|
20855
21691
|
/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* reexport safe */ _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_33__.GetAllConnectionsOfCompositionBulk),
|
|
20856
|
-
/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */
|
|
21692
|
+
/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_110__.GetAllTheConnectionsByTypeAndOfTheConcept),
|
|
20857
21693
|
/* harmony export */ GetComposition: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetComposition),
|
|
20858
21694
|
/* harmony export */ GetCompositionBulk: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulk),
|
|
20859
21695
|
/* harmony export */ GetCompositionBulkWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulkWithDataId),
|
|
@@ -20908,7 +21744,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20908
21744
|
/* harmony export */ LISTNORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_65__.LISTNORMAL),
|
|
20909
21745
|
/* harmony export */ LocalConceptsData: () => (/* reexport safe */ _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_94__.LocalConceptsData),
|
|
20910
21746
|
/* harmony export */ LocalSyncData: () => (/* reexport safe */ _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_90__.LocalSyncData),
|
|
20911
|
-
/* harmony export */ LocalTransaction: () => (/* reexport safe */
|
|
21747
|
+
/* harmony export */ LocalTransaction: () => (/* reexport safe */ _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_105__.LocalTransaction),
|
|
21748
|
+
/* harmony export */ Logger: () => (/* reexport safe */ _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_101__.Logger),
|
|
20912
21749
|
/* harmony export */ LoginToBackend: () => (/* reexport safe */ _Api_Login__WEBPACK_IMPORTED_MODULE_34__.LoginToBackend),
|
|
20913
21750
|
/* harmony export */ MakeTheInstanceConcept: () => (/* reexport safe */ _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__["default"]),
|
|
20914
21751
|
/* harmony export */ MakeTheInstanceConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__.MakeTheInstanceConceptLocal),
|
|
@@ -20927,7 +21764,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20927
21764
|
/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRawFullLinker),
|
|
20928
21765
|
/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiWithInternalConnections),
|
|
20929
21766
|
/* harmony export */ RecursiveSearchListener: () => (/* reexport safe */ _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_74__.RecursiveSearchListener),
|
|
20930
|
-
/* harmony export */ SchemaQueryListener: () => (/* reexport safe */
|
|
21767
|
+
/* harmony export */ SchemaQueryListener: () => (/* reexport safe */ _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_113__.SchemaQueryListener),
|
|
20931
21768
|
/* harmony export */ SearchAllConcepts: () => (/* reexport safe */ _Api_Search_Search__WEBPACK_IMPORTED_MODULE_39__.SearchAllConcepts),
|
|
20932
21769
|
/* harmony export */ SearchLinkInternal: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_59__.SearchLinkInternal),
|
|
20933
21770
|
/* harmony export */ SearchLinkInternalAll: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_59__.SearchLinkInternalAll),
|
|
@@ -20944,19 +21781,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20944
21781
|
/* harmony export */ Signup: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_36__["default"]),
|
|
20945
21782
|
/* harmony export */ SignupEntity: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_36__.SignupEntity),
|
|
20946
21783
|
/* harmony export */ SplitStrings: () => (/* reexport safe */ _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__.SplitStrings),
|
|
20947
|
-
/* harmony export */ StatefulWidget: () => (/* reexport safe */
|
|
21784
|
+
/* harmony export */ StatefulWidget: () => (/* reexport safe */ _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_109__.StatefulWidget),
|
|
20948
21785
|
/* harmony export */ SyncData: () => (/* reexport safe */ _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_76__.SyncData),
|
|
20949
21786
|
/* harmony export */ TrashTheConcept: () => (/* reexport safe */ _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__.TrashTheConcept),
|
|
20950
21787
|
/* harmony export */ UpdateComposition: () => (/* reexport safe */ _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_38__["default"]),
|
|
20951
21788
|
/* harmony export */ UpdateCompositionLocal: () => (/* reexport safe */ _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_53__.UpdateCompositionLocal),
|
|
20952
21789
|
/* harmony export */ UserBinaryTree: () => (/* reexport safe */ _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_91__.UserBinaryTree),
|
|
20953
|
-
/* harmony export */ Validator: () => (/* reexport safe */
|
|
21790
|
+
/* harmony export */ Validator: () => (/* reexport safe */ _Validator_validator__WEBPACK_IMPORTED_MODULE_107__.Validator),
|
|
20954
21791
|
/* harmony export */ ViewInternalData: () => (/* reexport safe */ _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_56__.ViewInternalData),
|
|
20955
21792
|
/* harmony export */ ViewInternalDataApi: () => (/* reexport safe */ _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_57__.ViewInternalDataApi),
|
|
20956
|
-
/* harmony export */ WidgetTree: () => (/* reexport safe */
|
|
21793
|
+
/* harmony export */ WidgetTree: () => (/* reexport safe */ _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_114__.WidgetTree),
|
|
20957
21794
|
/* harmony export */ convertFromConceptToLConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_58__.convertFromConceptToLConcept),
|
|
20958
21795
|
/* harmony export */ convertFromLConceptToConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_58__.convertFromLConceptToConcept),
|
|
20959
|
-
/* harmony export */ createFormFieldData: () => (/* reexport safe */
|
|
21796
|
+
/* harmony export */ createFormFieldData: () => (/* reexport safe */ _Validator_utils__WEBPACK_IMPORTED_MODULE_108__.createFormFieldData),
|
|
20960
21797
|
/* harmony export */ dispatchIdEvent: () => (/* binding */ dispatchIdEvent),
|
|
20961
21798
|
/* harmony export */ getFromDatabaseWithType: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getFromDatabaseWithType),
|
|
20962
21799
|
/* harmony export */ getObjectsFromIndexDb: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getObjectsFromIndexDb),
|
|
@@ -21071,19 +21908,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21071
21908
|
/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./DataStructures/BaseUrl */ "./src/DataStructures/BaseUrl.ts");
|
|
21072
21909
|
/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./DataStructures/Security/TokenStorage */ "./src/DataStructures/Security/TokenStorage.ts");
|
|
21073
21910
|
/* harmony import */ var _Constants_general_const__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./Constants/general.const */ "./src/Constants/general.const.ts");
|
|
21074
|
-
/* harmony import */ var
|
|
21075
|
-
/* harmony import */ var
|
|
21076
|
-
/* harmony import */ var
|
|
21077
|
-
/* harmony import */ var
|
|
21078
|
-
/* harmony import */ var
|
|
21079
|
-
/* harmony import */ var
|
|
21080
|
-
/* harmony import */ var
|
|
21081
|
-
/* harmony import */ var
|
|
21082
|
-
/* harmony import */ var
|
|
21083
|
-
/* harmony import */ var
|
|
21084
|
-
/* harmony import */ var
|
|
21085
|
-
/* harmony import */ var
|
|
21086
|
-
/* harmony import */ var
|
|
21911
|
+
/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Middleware/logger.service */ "./src/Middleware/logger.service.ts");
|
|
21912
|
+
/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
|
|
21913
|
+
/* harmony import */ var _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./Middleware/ApplicationMonitor */ "./src/Middleware/ApplicationMonitor.ts");
|
|
21914
|
+
/* harmony import */ var _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./Widgets/BuilderStatefulWidget */ "./src/Widgets/BuilderStatefulWidget.ts");
|
|
21915
|
+
/* harmony import */ var _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./Services/Transaction/LocalTransaction */ "./src/Services/Transaction/LocalTransaction.ts");
|
|
21916
|
+
/* harmony import */ var _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./Anomaly/anomaly */ "./src/Anomaly/anomaly.ts");
|
|
21917
|
+
/* harmony import */ var _Validator_validator__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./Validator/validator */ "./src/Validator/validator.ts");
|
|
21918
|
+
/* harmony import */ var _Validator_utils__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./Validator/utils */ "./src/Validator/utils.ts");
|
|
21919
|
+
/* harmony import */ var _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./Widgets/StatefulWidget */ "./src/Widgets/StatefulWidget.ts");
|
|
21920
|
+
/* harmony import */ var _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./Services/DeleteConnectionByType */ "./src/Services/DeleteConnectionByType.ts");
|
|
21921
|
+
/* harmony import */ var _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./DataStructures/Search/FreeschemaQuery */ "./src/DataStructures/Search/FreeschemaQuery.ts");
|
|
21922
|
+
/* harmony import */ var _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./Api/Search/FreeschemaQueryApi */ "./src/Api/Search/FreeschemaQueryApi.ts");
|
|
21923
|
+
/* harmony import */ var _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./WrapperFunctions/SchemaQueryObservable */ "./src/WrapperFunctions/SchemaQueryObservable.ts");
|
|
21924
|
+
/* harmony import */ var _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./Widgets/WidgetTree */ "./src/Widgets/WidgetTree.ts");
|
|
21925
|
+
/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./AccessTracker/accessTracker */ "./src/AccessTracker/accessTracker.ts");
|
|
21087
21926
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21088
21927
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21089
21928
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -21213,6 +22052,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
21213
22052
|
|
|
21214
22053
|
|
|
21215
22054
|
|
|
22055
|
+
|
|
22056
|
+
|
|
21216
22057
|
|
|
21217
22058
|
|
|
21218
22059
|
|
|
@@ -21243,7 +22084,7 @@ function updateAccessToken(accessToken = "") {
|
|
|
21243
22084
|
* @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope
|
|
21244
22085
|
*/
|
|
21245
22086
|
function init() {
|
|
21246
|
-
return __awaiter(this, arguments, void 0, function* (url = "", aiurl = "", accessToken = "", nodeUrl = "", enableAi = true, applicationName = "", enableSW = undefined,
|
|
22087
|
+
return __awaiter(this, arguments, void 0, function* (url = "", aiurl = "", accessToken = "", nodeUrl = "", enableAi = true, applicationName = "", enableSW = undefined, flag = { logApplication: false, isTest: false }) {
|
|
21247
22088
|
try {
|
|
21248
22089
|
_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_98__.BaseUrl.BASE_URL = url;
|
|
21249
22090
|
_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_98__.BaseUrl.AI_URL = aiurl;
|
|
@@ -21254,7 +22095,7 @@ function init() {
|
|
|
21254
22095
|
// BaseUrl.BASE_RANDOMIZER = randomizer;
|
|
21255
22096
|
// BaseUrl.BASE_RANDOMIZER = 999;
|
|
21256
22097
|
_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_98__.BaseUrl.setRandomizer(randomizer);
|
|
21257
|
-
if (isTest) {
|
|
22098
|
+
if (flag.isTest) {
|
|
21258
22099
|
_DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isDataLoaded = true;
|
|
21259
22100
|
_DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isCharacterLoaded = true;
|
|
21260
22101
|
_DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isTypeLoaded = true;
|
|
@@ -21266,6 +22107,10 @@ function init() {
|
|
|
21266
22107
|
_DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;
|
|
21267
22108
|
return true;
|
|
21268
22109
|
}
|
|
22110
|
+
if (flag.logApplication) {
|
|
22111
|
+
_Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_103__.ApplicationMonitor.initialize();
|
|
22112
|
+
console.log("Application log started...");
|
|
22113
|
+
}
|
|
21269
22114
|
if (!("serviceWorker" in navigator)) {
|
|
21270
22115
|
yield initConceptConnection();
|
|
21271
22116
|
console.warn("Service Worker not supported in this browser.");
|
|
@@ -21285,7 +22130,7 @@ function init() {
|
|
|
21285
22130
|
nodeUrl,
|
|
21286
22131
|
enableAi,
|
|
21287
22132
|
applicationName,
|
|
21288
|
-
|
|
22133
|
+
flag
|
|
21289
22134
|
});
|
|
21290
22135
|
resolve('done');
|
|
21291
22136
|
}))
|
|
@@ -21347,7 +22192,7 @@ function init() {
|
|
|
21347
22192
|
nodeUrl,
|
|
21348
22193
|
enableAi,
|
|
21349
22194
|
applicationName,
|
|
21350
|
-
|
|
22195
|
+
flag
|
|
21351
22196
|
});
|
|
21352
22197
|
processMessageQueue();
|
|
21353
22198
|
resolve();
|
|
@@ -21373,11 +22218,12 @@ function init() {
|
|
|
21373
22218
|
nodeUrl,
|
|
21374
22219
|
enableAi,
|
|
21375
22220
|
applicationName,
|
|
21376
|
-
|
|
22221
|
+
flag
|
|
21377
22222
|
});
|
|
21378
22223
|
}
|
|
21379
22224
|
}));
|
|
21380
22225
|
}
|
|
22226
|
+
// Add Listeners before initializing the service worker
|
|
21381
22227
|
// Listen for updates to the service worker
|
|
21382
22228
|
console.log("update listen start");
|
|
21383
22229
|
registration.onupdatefound = () => {
|
|
@@ -21386,8 +22232,13 @@ function init() {
|
|
|
21386
22232
|
if (newWorker) {
|
|
21387
22233
|
newWorker.onstatechange = () => __awaiter(this, void 0, void 0, function* () {
|
|
21388
22234
|
console.log("on state change triggered", (newWorker.state === "installed" || newWorker.state === "activated" || newWorker.state === 'redundant'), navigator.serviceWorker.controller);
|
|
22235
|
+
if (newWorker.state === "installing") {
|
|
22236
|
+
console.log("Service Worker installing");
|
|
22237
|
+
serviceWorker = undefined;
|
|
22238
|
+
serviceWorkerReady = false;
|
|
22239
|
+
}
|
|
21389
22240
|
// if (newWorker.state === 'activated' && navigator.serviceWorker.controller) {
|
|
21390
|
-
if ((newWorker.state === "
|
|
22241
|
+
if ((newWorker.state === "activated" || newWorker.state === 'redundant') && navigator.serviceWorker.controller) {
|
|
21391
22242
|
// && navigator.serviceWorker.controller) {
|
|
21392
22243
|
console.log("New Service Worker is active", registration);
|
|
21393
22244
|
serviceWorker = newWorker;
|
|
@@ -21400,7 +22251,7 @@ function init() {
|
|
|
21400
22251
|
nodeUrl,
|
|
21401
22252
|
enableAi,
|
|
21402
22253
|
applicationName,
|
|
21403
|
-
|
|
22254
|
+
flag
|
|
21404
22255
|
});
|
|
21405
22256
|
success = true;
|
|
21406
22257
|
serviceWorkerReady = true;
|
|
@@ -21423,12 +22274,55 @@ function init() {
|
|
|
21423
22274
|
nodeUrl,
|
|
21424
22275
|
enableAi,
|
|
21425
22276
|
applicationName,
|
|
21426
|
-
|
|
22277
|
+
flag
|
|
21427
22278
|
});
|
|
21428
22279
|
// The new service worker is now controlling the page
|
|
21429
22280
|
// You can reload the page if necessary or handle the update process here
|
|
21430
22281
|
}
|
|
21431
22282
|
}));
|
|
22283
|
+
// state change
|
|
22284
|
+
if (registration.installing || registration.waiting || registration.active) {
|
|
22285
|
+
registration.addEventListener('statechange', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
22286
|
+
var _a;
|
|
22287
|
+
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.state) === 'activating') {
|
|
22288
|
+
serviceWorker = navigator.serviceWorker.controller;
|
|
22289
|
+
console.log('Service Worker is activating statechange');
|
|
22290
|
+
yield sendMessage("init", {
|
|
22291
|
+
url,
|
|
22292
|
+
aiurl,
|
|
22293
|
+
accessToken,
|
|
22294
|
+
nodeUrl,
|
|
22295
|
+
enableAi,
|
|
22296
|
+
applicationName,
|
|
22297
|
+
flag,
|
|
22298
|
+
});
|
|
22299
|
+
}
|
|
22300
|
+
}));
|
|
22301
|
+
}
|
|
22302
|
+
// If the service worker is already active, mark it as ready
|
|
22303
|
+
if (registration.active) {
|
|
22304
|
+
serviceWorkerReady = true;
|
|
22305
|
+
console.log("active sw");
|
|
22306
|
+
serviceWorker = registration.active;
|
|
22307
|
+
yield sendMessage("init", {
|
|
22308
|
+
url,
|
|
22309
|
+
aiurl,
|
|
22310
|
+
accessToken,
|
|
22311
|
+
nodeUrl,
|
|
22312
|
+
enableAi,
|
|
22313
|
+
applicationName,
|
|
22314
|
+
flag,
|
|
22315
|
+
});
|
|
22316
|
+
processMessageQueue();
|
|
22317
|
+
resolve();
|
|
22318
|
+
}
|
|
22319
|
+
else {
|
|
22320
|
+
// Handle if on state change didn't trigger
|
|
22321
|
+
setTimeout(() => {
|
|
22322
|
+
if (!success)
|
|
22323
|
+
reject("Not Completed Initialization");
|
|
22324
|
+
}, 5000);
|
|
22325
|
+
}
|
|
21432
22326
|
}))
|
|
21433
22327
|
.catch((error) => __awaiter(this, void 0, void 0, function* () {
|
|
21434
22328
|
yield initConceptConnection();
|
|
@@ -21481,10 +22375,10 @@ function sendMessage(type, payload) {
|
|
|
21481
22375
|
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
|
|
21482
22376
|
if (!event.data.success) {
|
|
21483
22377
|
if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {
|
|
21484
|
-
reject((0,
|
|
22378
|
+
reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_102__.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 })));
|
|
21485
22379
|
}
|
|
21486
22380
|
else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {
|
|
21487
|
-
reject((0,
|
|
22381
|
+
reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_102__.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 })));
|
|
21488
22382
|
}
|
|
21489
22383
|
else {
|
|
21490
22384
|
reject(`Failed to handle action ${type} ${JSON.stringify(payload)}`);
|
|
@@ -21717,7 +22611,6 @@ function dispatchIdEvent(id, data = {}) {
|
|
|
21717
22611
|
if (serviceWorker) {
|
|
21718
22612
|
// let event = new Event(`${id}`);
|
|
21719
22613
|
let event = new CustomEvent(`${id}`, data);
|
|
21720
|
-
console.log("event fired from", event);
|
|
21721
22614
|
dispatchEvent(event);
|
|
21722
22615
|
}
|
|
21723
22616
|
else {
|
|
@@ -21897,6 +22790,7 @@ function processMessageQueue() {
|
|
|
21897
22790
|
/******/ var __webpack_exports__LocalConceptsData = __webpack_exports__.LocalConceptsData;
|
|
21898
22791
|
/******/ var __webpack_exports__LocalSyncData = __webpack_exports__.LocalSyncData;
|
|
21899
22792
|
/******/ var __webpack_exports__LocalTransaction = __webpack_exports__.LocalTransaction;
|
|
22793
|
+
/******/ var __webpack_exports__Logger = __webpack_exports__.Logger;
|
|
21900
22794
|
/******/ var __webpack_exports__LoginToBackend = __webpack_exports__.LoginToBackend;
|
|
21901
22795
|
/******/ var __webpack_exports__MakeTheInstanceConcept = __webpack_exports__.MakeTheInstanceConcept;
|
|
21902
22796
|
/******/ var __webpack_exports__MakeTheInstanceConceptLocal = __webpack_exports__.MakeTheInstanceConceptLocal;
|
|
@@ -21957,7 +22851,7 @@ function processMessageQueue() {
|
|
|
21957
22851
|
/******/ var __webpack_exports__storeToDatabase = __webpack_exports__.storeToDatabase;
|
|
21958
22852
|
/******/ var __webpack_exports__subscribedListeners = __webpack_exports__.subscribedListeners;
|
|
21959
22853
|
/******/ var __webpack_exports__updateAccessToken = __webpack_exports__.updateAccessToken;
|
|
21960
|
-
/******/ export { __webpack_exports__ADMIN as ADMIN, __webpack_exports__ALLID as ALLID, __webpack_exports__AccessTracker as AccessTracker, __webpack_exports__AddGhostConcept as AddGhostConcept, __webpack_exports__Anomaly as Anomaly, __webpack_exports__BaseUrl as BaseUrl, __webpack_exports__BinaryTree as BinaryTree, __webpack_exports__BuilderStatefulWidget as BuilderStatefulWidget, __webpack_exports__Composition as Composition, __webpack_exports__CompositionBinaryTree as CompositionBinaryTree, __webpack_exports__CompositionNode as CompositionNode, __webpack_exports__Concept as Concept, __webpack_exports__ConceptsData as ConceptsData, __webpack_exports__Connection as Connection, __webpack_exports__ConnectionData as ConnectionData, __webpack_exports__CreateComposition as CreateComposition, __webpack_exports__CreateConnectionBetweenTwoConcepts as CreateConnectionBetweenTwoConcepts, __webpack_exports__CreateConnectionBetweenTwoConceptsGeneral as CreateConnectionBetweenTwoConceptsGeneral, __webpack_exports__CreateConnectionBetweenTwoConceptsLocal as CreateConnectionBetweenTwoConceptsLocal, __webpack_exports__CreateDefaultConcept as CreateDefaultConcept, __webpack_exports__CreateDefaultLConcept as CreateDefaultLConcept, __webpack_exports__CreateSession as CreateSession, __webpack_exports__CreateSessionVisit as CreateSessionVisit, __webpack_exports__CreateTheCompositionLocal as CreateTheCompositionLocal, __webpack_exports__CreateTheCompositionWithCache as CreateTheCompositionWithCache, __webpack_exports__CreateTheConnection as CreateTheConnection, __webpack_exports__CreateTheConnectionGeneral as CreateTheConnectionGeneral, __webpack_exports__CreateTheConnectionLocal as CreateTheConnectionLocal, __webpack_exports__DATAID as DATAID, __webpack_exports__DATAIDDATE as DATAIDDATE, __webpack_exports__DelayFunctionExecution as DelayFunctionExecution, __webpack_exports__DeleteConceptById as DeleteConceptById, __webpack_exports__DeleteConceptLocal as DeleteConceptLocal, __webpack_exports__DeleteConnectionById as DeleteConnectionById, __webpack_exports__DeleteConnectionByType as DeleteConnectionByType, __webpack_exports__DeleteUser as DeleteUser, __webpack_exports__DependencyObserver as DependencyObserver, __webpack_exports__FilterSearch as FilterSearch, __webpack_exports__FormatFromConnections as FormatFromConnections, __webpack_exports__FormatFromConnectionsAltered as FormatFromConnectionsAltered, __webpack_exports__FreeschemaQuery as FreeschemaQuery, __webpack_exports__FreeschemaQueryApi as FreeschemaQueryApi, __webpack_exports__GetAllConnectionsOfComposition as GetAllConnectionsOfComposition, __webpack_exports__GetAllConnectionsOfCompositionBulk as GetAllConnectionsOfCompositionBulk, __webpack_exports__GetAllTheConnectionsByTypeAndOfTheConcept as GetAllTheConnectionsByTypeAndOfTheConcept, __webpack_exports__GetComposition as GetComposition, __webpack_exports__GetCompositionBulk as GetCompositionBulk, __webpack_exports__GetCompositionBulkWithDataId as GetCompositionBulkWithDataId, __webpack_exports__GetCompositionFromConnectionsWithDataId as GetCompositionFromConnectionsWithDataId, __webpack_exports__GetCompositionFromConnectionsWithDataIdFromConnections as GetCompositionFromConnectionsWithDataIdFromConnections, __webpack_exports__GetCompositionFromConnectionsWithDataIdInObject as GetCompositionFromConnectionsWithDataIdInObject, __webpack_exports__GetCompositionFromConnectionsWithDataIdIndex as GetCompositionFromConnectionsWithDataIdIndex, __webpack_exports__GetCompositionFromConnectionsWithIndex as GetCompositionFromConnectionsWithIndex, __webpack_exports__GetCompositionFromConnectionsWithIndexFromConnections as GetCompositionFromConnectionsWithIndexFromConnections, __webpack_exports__GetCompositionFromMemoryWithConnections as GetCompositionFromMemoryWithConnections, __webpack_exports__GetCompositionList as GetCompositionList, __webpack_exports__GetCompositionListAll as GetCompositionListAll, __webpack_exports__GetCompositionListAllWithId as GetCompositionListAllWithId, __webpack_exports__GetCompositionListListener as GetCompositionListListener, __webpack_exports__GetCompositionListLocal as GetCompositionListLocal, __webpack_exports__GetCompositionListLocalWithId as GetCompositionListLocalWithId, __webpack_exports__GetCompositionListWithId as GetCompositionListWithId, __webpack_exports__GetCompositionListWithIdUpdated as GetCompositionListWithIdUpdated, __webpack_exports__GetCompositionListener as GetCompositionListener, __webpack_exports__GetCompositionLocal as GetCompositionLocal, __webpack_exports__GetCompositionLocalWithId as GetCompositionLocalWithId, __webpack_exports__GetCompositionWithAllIds as GetCompositionWithAllIds, __webpack_exports__GetCompositionWithCache as GetCompositionWithCache, __webpack_exports__GetCompositionWithDataIdBulk as GetCompositionWithDataIdBulk, __webpack_exports__GetCompositionWithDataIdWithCache as GetCompositionWithDataIdWithCache, __webpack_exports__GetCompositionWithId as GetCompositionWithId, __webpack_exports__GetCompositionWithIdAndDateFromMemory as GetCompositionWithIdAndDateFromMemory, __webpack_exports__GetConceptBulk as GetConceptBulk, __webpack_exports__GetConceptByCharacter as GetConceptByCharacter, __webpack_exports__GetConceptByCharacterAndCategoryLocal as GetConceptByCharacterAndCategoryLocal, __webpack_exports__GetConceptByCharacterAndType as GetConceptByCharacterAndType, __webpack_exports__GetConnectionBetweenTwoConceptsLinker as GetConnectionBetweenTwoConceptsLinker, __webpack_exports__GetConnectionBulk as GetConnectionBulk, __webpack_exports__GetConnectionById as GetConnectionById, __webpack_exports__GetConnectionDataPrefetch as GetConnectionDataPrefetch, __webpack_exports__GetConnectionOfTheConcept as GetConnectionOfTheConcept, __webpack_exports__GetLink as GetLink, __webpack_exports__GetLinkListListener as GetLinkListListener, __webpack_exports__GetLinkListener as GetLinkListener, __webpack_exports__GetLinkRaw as GetLinkRaw, __webpack_exports__GetLinkerConnectionFromConcepts as GetLinkerConnectionFromConcepts, __webpack_exports__GetLinkerConnectionToConcepts as GetLinkerConnectionToConcepts, __webpack_exports__GetRelation as GetRelation, __webpack_exports__GetRelationLocal as GetRelationLocal, __webpack_exports__GetRelationRaw as GetRelationRaw, __webpack_exports__GetTheConcept as GetTheConcept, __webpack_exports__GetTheConceptLocal as GetTheConceptLocal, __webpack_exports__GetUserGhostId as GetUserGhostId, __webpack_exports__JUSTDATA as JUSTDATA, __webpack_exports__LConcept as LConcept, __webpack_exports__LConnection as LConnection, __webpack_exports__LISTNORMAL as LISTNORMAL, __webpack_exports__LocalConceptsData as LocalConceptsData, __webpack_exports__LocalSyncData as LocalSyncData, __webpack_exports__LocalTransaction as LocalTransaction, __webpack_exports__LoginToBackend as LoginToBackend, __webpack_exports__MakeTheInstanceConcept as MakeTheInstanceConcept, __webpack_exports__MakeTheInstanceConceptLocal as MakeTheInstanceConceptLocal, __webpack_exports__MakeTheTimestamp as MakeTheTimestamp, __webpack_exports__MakeTheTypeConcept as MakeTheTypeConcept, __webpack_exports__MakeTheTypeConceptApi as MakeTheTypeConceptApi, __webpack_exports__MakeTheTypeConceptLocal as MakeTheTypeConceptLocal, __webpack_exports__NORMAL as NORMAL, __webpack_exports__PRIVATE as PRIVATE, __webpack_exports__PUBLIC as PUBLIC, __webpack_exports__PatcherStructure as PatcherStructure, __webpack_exports__RAW as RAW, __webpack_exports__RecursiveSearchApi as RecursiveSearchApi, __webpack_exports__RecursiveSearchApiNewRawFullLinker as RecursiveSearchApiNewRawFullLinker, __webpack_exports__RecursiveSearchApiRaw as RecursiveSearchApiRaw, __webpack_exports__RecursiveSearchApiRawFullLinker as RecursiveSearchApiRawFullLinker, __webpack_exports__RecursiveSearchApiWithInternalConnections as RecursiveSearchApiWithInternalConnections, __webpack_exports__RecursiveSearchListener as RecursiveSearchListener, __webpack_exports__SchemaQueryListener as SchemaQueryListener, __webpack_exports__SearchAllConcepts as SearchAllConcepts, __webpack_exports__SearchLinkInternal as SearchLinkInternal, __webpack_exports__SearchLinkInternalAll as SearchLinkInternalAll, __webpack_exports__SearchLinkMultipleAll as SearchLinkMultipleAll, __webpack_exports__SearchLinkMultipleAllObservable as SearchLinkMultipleAllObservable, __webpack_exports__SearchLinkMultipleApi as SearchLinkMultipleApi, __webpack_exports__SearchQuery as SearchQuery, __webpack_exports__SearchStructure as SearchStructure, __webpack_exports__SearchWithLinker as SearchWithLinker, __webpack_exports__SearchWithTypeAndLinker as SearchWithTypeAndLinker, __webpack_exports__SearchWithTypeAndLinkerApi as SearchWithTypeAndLinkerApi, __webpack_exports__SessionData as SessionData, __webpack_exports__Signin as Signin, __webpack_exports__Signup as Signup, __webpack_exports__SignupEntity as SignupEntity, __webpack_exports__SplitStrings as SplitStrings, __webpack_exports__StatefulWidget as StatefulWidget, __webpack_exports__SyncData as SyncData, __webpack_exports__TrashTheConcept as TrashTheConcept, __webpack_exports__UpdateComposition as UpdateComposition, __webpack_exports__UpdateCompositionLocal as UpdateCompositionLocal, __webpack_exports__UserBinaryTree as UserBinaryTree, __webpack_exports__Validator as Validator, __webpack_exports__ViewInternalData as ViewInternalData, __webpack_exports__ViewInternalDataApi as ViewInternalDataApi, __webpack_exports__WidgetTree as WidgetTree, __webpack_exports__convertFromConceptToLConcept as convertFromConceptToLConcept, __webpack_exports__convertFromLConceptToConcept as convertFromLConceptToConcept, __webpack_exports__createFormFieldData as createFormFieldData, __webpack_exports__dispatchIdEvent as dispatchIdEvent, __webpack_exports__getFromDatabaseWithType as getFromDatabaseWithType, __webpack_exports__getObjectsFromIndexDb as getObjectsFromIndexDb, __webpack_exports__init as init, __webpack_exports__recursiveFetch as recursiveFetch, __webpack_exports__recursiveFetchNew as recursiveFetchNew, __webpack_exports__searchLinkMultipleListener as searchLinkMultipleListener, __webpack_exports__sendMessage as sendMessage, __webpack_exports__serviceWorker as serviceWorker, __webpack_exports__storeToDatabase as storeToDatabase, __webpack_exports__subscribedListeners as subscribedListeners, __webpack_exports__updateAccessToken as updateAccessToken };
|
|
22854
|
+
/******/ export { __webpack_exports__ADMIN as ADMIN, __webpack_exports__ALLID as ALLID, __webpack_exports__AccessTracker as AccessTracker, __webpack_exports__AddGhostConcept as AddGhostConcept, __webpack_exports__Anomaly as Anomaly, __webpack_exports__BaseUrl as BaseUrl, __webpack_exports__BinaryTree as BinaryTree, __webpack_exports__BuilderStatefulWidget as BuilderStatefulWidget, __webpack_exports__Composition as Composition, __webpack_exports__CompositionBinaryTree as CompositionBinaryTree, __webpack_exports__CompositionNode as CompositionNode, __webpack_exports__Concept as Concept, __webpack_exports__ConceptsData as ConceptsData, __webpack_exports__Connection as Connection, __webpack_exports__ConnectionData as ConnectionData, __webpack_exports__CreateComposition as CreateComposition, __webpack_exports__CreateConnectionBetweenTwoConcepts as CreateConnectionBetweenTwoConcepts, __webpack_exports__CreateConnectionBetweenTwoConceptsGeneral as CreateConnectionBetweenTwoConceptsGeneral, __webpack_exports__CreateConnectionBetweenTwoConceptsLocal as CreateConnectionBetweenTwoConceptsLocal, __webpack_exports__CreateDefaultConcept as CreateDefaultConcept, __webpack_exports__CreateDefaultLConcept as CreateDefaultLConcept, __webpack_exports__CreateSession as CreateSession, __webpack_exports__CreateSessionVisit as CreateSessionVisit, __webpack_exports__CreateTheCompositionLocal as CreateTheCompositionLocal, __webpack_exports__CreateTheCompositionWithCache as CreateTheCompositionWithCache, __webpack_exports__CreateTheConnection as CreateTheConnection, __webpack_exports__CreateTheConnectionGeneral as CreateTheConnectionGeneral, __webpack_exports__CreateTheConnectionLocal as CreateTheConnectionLocal, __webpack_exports__DATAID as DATAID, __webpack_exports__DATAIDDATE as DATAIDDATE, __webpack_exports__DelayFunctionExecution as DelayFunctionExecution, __webpack_exports__DeleteConceptById as DeleteConceptById, __webpack_exports__DeleteConceptLocal as DeleteConceptLocal, __webpack_exports__DeleteConnectionById as DeleteConnectionById, __webpack_exports__DeleteConnectionByType as DeleteConnectionByType, __webpack_exports__DeleteUser as DeleteUser, __webpack_exports__DependencyObserver as DependencyObserver, __webpack_exports__FilterSearch as FilterSearch, __webpack_exports__FormatFromConnections as FormatFromConnections, __webpack_exports__FormatFromConnectionsAltered as FormatFromConnectionsAltered, __webpack_exports__FreeschemaQuery as FreeschemaQuery, __webpack_exports__FreeschemaQueryApi as FreeschemaQueryApi, __webpack_exports__GetAllConnectionsOfComposition as GetAllConnectionsOfComposition, __webpack_exports__GetAllConnectionsOfCompositionBulk as GetAllConnectionsOfCompositionBulk, __webpack_exports__GetAllTheConnectionsByTypeAndOfTheConcept as GetAllTheConnectionsByTypeAndOfTheConcept, __webpack_exports__GetComposition as GetComposition, __webpack_exports__GetCompositionBulk as GetCompositionBulk, __webpack_exports__GetCompositionBulkWithDataId as GetCompositionBulkWithDataId, __webpack_exports__GetCompositionFromConnectionsWithDataId as GetCompositionFromConnectionsWithDataId, __webpack_exports__GetCompositionFromConnectionsWithDataIdFromConnections as GetCompositionFromConnectionsWithDataIdFromConnections, __webpack_exports__GetCompositionFromConnectionsWithDataIdInObject as GetCompositionFromConnectionsWithDataIdInObject, __webpack_exports__GetCompositionFromConnectionsWithDataIdIndex as GetCompositionFromConnectionsWithDataIdIndex, __webpack_exports__GetCompositionFromConnectionsWithIndex as GetCompositionFromConnectionsWithIndex, __webpack_exports__GetCompositionFromConnectionsWithIndexFromConnections as GetCompositionFromConnectionsWithIndexFromConnections, __webpack_exports__GetCompositionFromMemoryWithConnections as GetCompositionFromMemoryWithConnections, __webpack_exports__GetCompositionList as GetCompositionList, __webpack_exports__GetCompositionListAll as GetCompositionListAll, __webpack_exports__GetCompositionListAllWithId as GetCompositionListAllWithId, __webpack_exports__GetCompositionListListener as GetCompositionListListener, __webpack_exports__GetCompositionListLocal as GetCompositionListLocal, __webpack_exports__GetCompositionListLocalWithId as GetCompositionListLocalWithId, __webpack_exports__GetCompositionListWithId as GetCompositionListWithId, __webpack_exports__GetCompositionListWithIdUpdated as GetCompositionListWithIdUpdated, __webpack_exports__GetCompositionListener as GetCompositionListener, __webpack_exports__GetCompositionLocal as GetCompositionLocal, __webpack_exports__GetCompositionLocalWithId as GetCompositionLocalWithId, __webpack_exports__GetCompositionWithAllIds as GetCompositionWithAllIds, __webpack_exports__GetCompositionWithCache as GetCompositionWithCache, __webpack_exports__GetCompositionWithDataIdBulk as GetCompositionWithDataIdBulk, __webpack_exports__GetCompositionWithDataIdWithCache as GetCompositionWithDataIdWithCache, __webpack_exports__GetCompositionWithId as GetCompositionWithId, __webpack_exports__GetCompositionWithIdAndDateFromMemory as GetCompositionWithIdAndDateFromMemory, __webpack_exports__GetConceptBulk as GetConceptBulk, __webpack_exports__GetConceptByCharacter as GetConceptByCharacter, __webpack_exports__GetConceptByCharacterAndCategoryLocal as GetConceptByCharacterAndCategoryLocal, __webpack_exports__GetConceptByCharacterAndType as GetConceptByCharacterAndType, __webpack_exports__GetConnectionBetweenTwoConceptsLinker as GetConnectionBetweenTwoConceptsLinker, __webpack_exports__GetConnectionBulk as GetConnectionBulk, __webpack_exports__GetConnectionById as GetConnectionById, __webpack_exports__GetConnectionDataPrefetch as GetConnectionDataPrefetch, __webpack_exports__GetConnectionOfTheConcept as GetConnectionOfTheConcept, __webpack_exports__GetLink as GetLink, __webpack_exports__GetLinkListListener as GetLinkListListener, __webpack_exports__GetLinkListener as GetLinkListener, __webpack_exports__GetLinkRaw as GetLinkRaw, __webpack_exports__GetLinkerConnectionFromConcepts as GetLinkerConnectionFromConcepts, __webpack_exports__GetLinkerConnectionToConcepts as GetLinkerConnectionToConcepts, __webpack_exports__GetRelation as GetRelation, __webpack_exports__GetRelationLocal as GetRelationLocal, __webpack_exports__GetRelationRaw as GetRelationRaw, __webpack_exports__GetTheConcept as GetTheConcept, __webpack_exports__GetTheConceptLocal as GetTheConceptLocal, __webpack_exports__GetUserGhostId as GetUserGhostId, __webpack_exports__JUSTDATA as JUSTDATA, __webpack_exports__LConcept as LConcept, __webpack_exports__LConnection as LConnection, __webpack_exports__LISTNORMAL as LISTNORMAL, __webpack_exports__LocalConceptsData as LocalConceptsData, __webpack_exports__LocalSyncData as LocalSyncData, __webpack_exports__LocalTransaction as LocalTransaction, __webpack_exports__Logger as Logger, __webpack_exports__LoginToBackend as LoginToBackend, __webpack_exports__MakeTheInstanceConcept as MakeTheInstanceConcept, __webpack_exports__MakeTheInstanceConceptLocal as MakeTheInstanceConceptLocal, __webpack_exports__MakeTheTimestamp as MakeTheTimestamp, __webpack_exports__MakeTheTypeConcept as MakeTheTypeConcept, __webpack_exports__MakeTheTypeConceptApi as MakeTheTypeConceptApi, __webpack_exports__MakeTheTypeConceptLocal as MakeTheTypeConceptLocal, __webpack_exports__NORMAL as NORMAL, __webpack_exports__PRIVATE as PRIVATE, __webpack_exports__PUBLIC as PUBLIC, __webpack_exports__PatcherStructure as PatcherStructure, __webpack_exports__RAW as RAW, __webpack_exports__RecursiveSearchApi as RecursiveSearchApi, __webpack_exports__RecursiveSearchApiNewRawFullLinker as RecursiveSearchApiNewRawFullLinker, __webpack_exports__RecursiveSearchApiRaw as RecursiveSearchApiRaw, __webpack_exports__RecursiveSearchApiRawFullLinker as RecursiveSearchApiRawFullLinker, __webpack_exports__RecursiveSearchApiWithInternalConnections as RecursiveSearchApiWithInternalConnections, __webpack_exports__RecursiveSearchListener as RecursiveSearchListener, __webpack_exports__SchemaQueryListener as SchemaQueryListener, __webpack_exports__SearchAllConcepts as SearchAllConcepts, __webpack_exports__SearchLinkInternal as SearchLinkInternal, __webpack_exports__SearchLinkInternalAll as SearchLinkInternalAll, __webpack_exports__SearchLinkMultipleAll as SearchLinkMultipleAll, __webpack_exports__SearchLinkMultipleAllObservable as SearchLinkMultipleAllObservable, __webpack_exports__SearchLinkMultipleApi as SearchLinkMultipleApi, __webpack_exports__SearchQuery as SearchQuery, __webpack_exports__SearchStructure as SearchStructure, __webpack_exports__SearchWithLinker as SearchWithLinker, __webpack_exports__SearchWithTypeAndLinker as SearchWithTypeAndLinker, __webpack_exports__SearchWithTypeAndLinkerApi as SearchWithTypeAndLinkerApi, __webpack_exports__SessionData as SessionData, __webpack_exports__Signin as Signin, __webpack_exports__Signup as Signup, __webpack_exports__SignupEntity as SignupEntity, __webpack_exports__SplitStrings as SplitStrings, __webpack_exports__StatefulWidget as StatefulWidget, __webpack_exports__SyncData as SyncData, __webpack_exports__TrashTheConcept as TrashTheConcept, __webpack_exports__UpdateComposition as UpdateComposition, __webpack_exports__UpdateCompositionLocal as UpdateCompositionLocal, __webpack_exports__UserBinaryTree as UserBinaryTree, __webpack_exports__Validator as Validator, __webpack_exports__ViewInternalData as ViewInternalData, __webpack_exports__ViewInternalDataApi as ViewInternalDataApi, __webpack_exports__WidgetTree as WidgetTree, __webpack_exports__convertFromConceptToLConcept as convertFromConceptToLConcept, __webpack_exports__convertFromLConceptToConcept as convertFromLConceptToConcept, __webpack_exports__createFormFieldData as createFormFieldData, __webpack_exports__dispatchIdEvent as dispatchIdEvent, __webpack_exports__getFromDatabaseWithType as getFromDatabaseWithType, __webpack_exports__getObjectsFromIndexDb as getObjectsFromIndexDb, __webpack_exports__init as init, __webpack_exports__recursiveFetch as recursiveFetch, __webpack_exports__recursiveFetchNew as recursiveFetchNew, __webpack_exports__searchLinkMultipleListener as searchLinkMultipleListener, __webpack_exports__sendMessage as sendMessage, __webpack_exports__serviceWorker as serviceWorker, __webpack_exports__storeToDatabase as storeToDatabase, __webpack_exports__subscribedListeners as subscribedListeners, __webpack_exports__updateAccessToken as updateAccessToken };
|
|
21961
22855
|
/******/
|
|
21962
22856
|
|
|
21963
22857
|
//# sourceMappingURL=main.bundle.js.map
|