http-request-manager 18.15.27 → 18.15.29
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.
|
@@ -6518,53 +6518,40 @@ class QueryParamsTrackerService {
|
|
|
6518
6518
|
sessionStorage.removeItem(TRACKER_SESSION_INIT_KEY);
|
|
6519
6519
|
}
|
|
6520
6520
|
}
|
|
6521
|
-
|
|
6522
|
-
this.
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
.subscribe((storedState) => {
|
|
6528
|
-
if (!storedState?.paths?.[pathKey])
|
|
6529
|
-
return;
|
|
6530
|
-
const updatedPaths = { ...storedState.paths };
|
|
6531
|
-
delete updatedPaths[pathKey];
|
|
6532
|
-
const updatedState = { ...storedState, paths: updatedPaths };
|
|
6533
|
-
this.localStorageManager.updateStore({ name: TRACKER_STORE_NAME, data: updatedState });
|
|
6534
|
-
if (this.stateRestored && this.state.paths[pathKey]) {
|
|
6535
|
-
delete this.state.paths[pathKey];
|
|
6536
|
-
}
|
|
6537
|
-
});
|
|
6521
|
+
clearTrackingForPath(pathKey) {
|
|
6522
|
+
this.ensureStateRestored();
|
|
6523
|
+
if (this.state.paths[pathKey]) {
|
|
6524
|
+
delete this.state.paths[pathKey];
|
|
6525
|
+
this.persistState();
|
|
6526
|
+
}
|
|
6538
6527
|
}
|
|
6539
6528
|
checkRequestOptions(requestOptions = [], options = {}) {
|
|
6540
6529
|
this.ensureStateRestored();
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
return !pathSeenBefore;
|
|
6554
|
-
}
|
|
6555
|
-
if (options.mode === 'exact') {
|
|
6556
|
-
return this.checkExact(normalized, options);
|
|
6530
|
+
if (!this.ready$.value) {
|
|
6531
|
+
return true;
|
|
6532
|
+
}
|
|
6533
|
+
const normalized = this.normalizeRequestOptions(requestOptions);
|
|
6534
|
+
if (!normalized.pathKey)
|
|
6535
|
+
return false;
|
|
6536
|
+
this.cleanupExpiredEntries();
|
|
6537
|
+
if (!normalized.hasQuery) {
|
|
6538
|
+
const pathState = this.ensurePathState(normalized.pathKey);
|
|
6539
|
+
const pathSeenBefore = Object.keys(pathState.consumedValuesByKey).length > 0;
|
|
6540
|
+
if (!pathSeenBefore) {
|
|
6541
|
+
this.persistState();
|
|
6557
6542
|
}
|
|
6558
|
-
return
|
|
6559
|
-
}
|
|
6543
|
+
return !pathSeenBefore;
|
|
6544
|
+
}
|
|
6545
|
+
if (options.mode === 'exact') {
|
|
6546
|
+
return this.checkExact(normalized, options);
|
|
6547
|
+
}
|
|
6548
|
+
return this.checkVariation(normalized, options);
|
|
6560
6549
|
}
|
|
6561
6550
|
matchesPath(requestOptions = [], expectedPathOptions = []) {
|
|
6562
6551
|
this.ensureStateRestored();
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
return Boolean(requestPath) && requestPath === expectedPath;
|
|
6567
|
-
}));
|
|
6552
|
+
const requestPath = this.normalizeRequestOptions(requestOptions).pathKey;
|
|
6553
|
+
const expectedPath = this.normalizeRequestOptions(expectedPathOptions).pathKey;
|
|
6554
|
+
return Boolean(requestPath) && requestPath === expectedPath;
|
|
6568
6555
|
}
|
|
6569
6556
|
checkExact(normalized, options) {
|
|
6570
6557
|
const pathState = this.ensurePathState(normalized.pathKey);
|
|
@@ -8464,7 +8451,7 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
8464
8451
|
}
|
|
8465
8452
|
}
|
|
8466
8453
|
if (Array.isArray(pathArray) && pathArray.length > 0) {
|
|
8467
|
-
this.queryParamsTrackerService.
|
|
8454
|
+
this.queryParamsTrackerService.clearTrackingForPath(pathArray.join('/'));
|
|
8468
8455
|
this._requestCachePaths.delete(tableName);
|
|
8469
8456
|
}
|
|
8470
8457
|
if (!storeData)
|
|
@@ -8602,10 +8589,10 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
8602
8589
|
}
|
|
8603
8590
|
checkTrackerAllowsRequest(tableName, path, options, storeData) {
|
|
8604
8591
|
if (options && 'watchParams' in options) {
|
|
8605
|
-
return this.queryParamsTrackerService.checkRequestOptions(path, {
|
|
8592
|
+
return of(this.queryParamsTrackerService.checkRequestOptions(path, {
|
|
8606
8593
|
watchParams: options.watchParams,
|
|
8607
8594
|
watchExpiresAt: options?.watchExpiresAt,
|
|
8608
|
-
});
|
|
8595
|
+
}));
|
|
8609
8596
|
}
|
|
8610
8597
|
const normalized = this.trackerNormalizePath(path);
|
|
8611
8598
|
const ignoreQueryParams = Array.isArray(options?.ignoreQueryParams) ? options.ignoreQueryParams : [];
|
|
@@ -12061,11 +12048,11 @@ class RequestManagerWsDemoComponent {
|
|
|
12061
12048
|
this.stateService.updateConnection(this.server, this.wsServer, this.jwtToken, this.user, this.path);
|
|
12062
12049
|
}
|
|
12063
12050
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RequestManagerWsDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12064
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RequestManagerWsDemoComponent, selector: "app-request-manager-ws-demo", inputs: { server: "server", wsServer: "wsServer", jwtToken: "jwtToken", user: "user", path: "path" }, ngImport: i0, template: "<div style=\"margin: 2rem;\">\n\n <h2 style=\"display: flex;\">\n <span style=\"flex:1\">HTTP Request State Manager - Websockets</span>\n @if ((connectionStatus$ | async); as connected) {\n <span>\n WS -\n <span style=\"color: green;\">Connected</span>\n </span>\n } @else {\n <span style=\"color: red;\">Disconnected {{ attempts$ | async }} - {{ nextRetry$ |async }}</span>\n }\n </h2>\n\n <div>\n\n @if ((user$ | async); as userInfo) {\n <div>\n <mat-toolbar>\n <div style=\"display: flex; flex:1\">\n <div style=\"flex:1\">{{ userInfo.name }}</div>\n <div>({{ userInfo.ldap }})</div>\n </div>\n </mat-toolbar>\n </div>\n }\n\n @if ((
|
|
12051
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RequestManagerWsDemoComponent, selector: "app-request-manager-ws-demo", inputs: { server: "server", wsServer: "wsServer", jwtToken: "jwtToken", user: "user", path: "path" }, ngImport: i0, template: "<div style=\"margin: 2rem;\">\n\n <h2 style=\"display: flex;\">\n <span style=\"flex:1\">HTTP Request State Manager - Websockets</span>\n @if ((connectionStatus$ | async); as connected) {\n <span>\n WS -\n <span style=\"color: green;\">Connected</span>\n </span>\n } @else {\n <span style=\"color: red;\">Disconnected {{ attempts$ | async }} - {{ nextRetry$ |async }}</span>\n }\n </h2>\n\n <div>\n\n @if ((user$ | async); as userInfo) {\n <div>\n <mat-toolbar>\n <div style=\"display: flex; flex:1\">\n <div style=\"flex:1\">{{ userInfo.name }}</div>\n <div>({{ userInfo.ldap }})</div>\n </div>\n </mat-toolbar>\n </div>\n }\n\n @if (!(connectionStatus$ | async)) {\n <div>\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n }\n\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"1\">\n\n <mat-tab label=\"WS - Data Control\">\n <!-- DATA CONTROL -->\n <app-ws-data-control\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n [path]=\"path\"\n ></app-ws-data-control>\n\n </mat-tab>\n\n <mat-tab label=\"WS - Messaging\">\n <!-- MESSAGING -->\n <app-ws-messaging\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n [path]=\"path\"\n ></app-ws-messaging>\n\n </mat-tab>\n\n <mat-tab label=\"WS - Notifications\">\n <!-- WS - Notifications -->\n <app-ws-notifications\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n ></app-ws-notifications>\n </mat-tab>\n\n <mat-tab label=\"WS - Chats\" [disabled]=\"true\">\n <!-- WS - Chats -->\n <app-ws-chats></app-ws-chats>\n </mat-tab>\n\n <mat-tab label=\"WS - AI Messaging\" [disabled]=\"true\">\n <!-- WS - AI Messaging -->\n <app-ws-ai-messaging></app-ws-ai-messaging>\n </mat-tab>\n\n </mat-tab-group>\n</div>\n\n</div>\n\n", styles: [""], dependencies: [{ kind: "component", type: i1$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i1$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i3$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: WsDataControlComponent, selector: "app-ws-data-control", inputs: ["server", "wsServer", "jwtToken", "user", "path"] }, { kind: "component", type: WsMessagingComponent, selector: "app-ws-messaging", inputs: ["server", "wsServer", "jwtToken", "user", "path"] }, { kind: "component", type: WsNotificationsComponent, selector: "app-ws-notifications", inputs: ["server", "wsServer", "jwtToken", "user"] }, { kind: "component", type: WsAiMessagingComponent, selector: "app-ws-ai-messaging" }, { kind: "component", type: WsChatsComponent, selector: "app-ws-chats" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
|
|
12065
12052
|
}
|
|
12066
12053
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RequestManagerWsDemoComponent, decorators: [{
|
|
12067
12054
|
type: Component,
|
|
12068
|
-
args: [{ selector: 'app-request-manager-ws-demo', standalone: false, template: "<div style=\"margin: 2rem;\">\n\n <h2 style=\"display: flex;\">\n <span style=\"flex:1\">HTTP Request State Manager - Websockets</span>\n @if ((connectionStatus$ | async); as connected) {\n <span>\n WS -\n <span style=\"color: green;\">Connected</span>\n </span>\n } @else {\n <span style=\"color: red;\">Disconnected {{ attempts$ | async }} - {{ nextRetry$ |async }}</span>\n }\n </h2>\n\n <div>\n\n @if ((user$ | async); as userInfo) {\n <div>\n <mat-toolbar>\n <div style=\"display: flex; flex:1\">\n <div style=\"flex:1\">{{ userInfo.name }}</div>\n <div>({{ userInfo.ldap }})</div>\n </div>\n </mat-toolbar>\n </div>\n }\n\n @if ((
|
|
12055
|
+
args: [{ selector: 'app-request-manager-ws-demo', standalone: false, template: "<div style=\"margin: 2rem;\">\n\n <h2 style=\"display: flex;\">\n <span style=\"flex:1\">HTTP Request State Manager - Websockets</span>\n @if ((connectionStatus$ | async); as connected) {\n <span>\n WS -\n <span style=\"color: green;\">Connected</span>\n </span>\n } @else {\n <span style=\"color: red;\">Disconnected {{ attempts$ | async }} - {{ nextRetry$ |async }}</span>\n }\n </h2>\n\n <div>\n\n @if ((user$ | async); as userInfo) {\n <div>\n <mat-toolbar>\n <div style=\"display: flex; flex:1\">\n <div style=\"flex:1\">{{ userInfo.name }}</div>\n <div>({{ userInfo.ldap }})</div>\n </div>\n </mat-toolbar>\n </div>\n }\n\n @if (!(connectionStatus$ | async)) {\n <div>\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n }\n\n <mat-tab-group animationDuration=\"0ms\" [selectedIndex]=\"1\">\n\n <mat-tab label=\"WS - Data Control\">\n <!-- DATA CONTROL -->\n <app-ws-data-control\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n [path]=\"path\"\n ></app-ws-data-control>\n\n </mat-tab>\n\n <mat-tab label=\"WS - Messaging\">\n <!-- MESSAGING -->\n <app-ws-messaging\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n [path]=\"path\"\n ></app-ws-messaging>\n\n </mat-tab>\n\n <mat-tab label=\"WS - Notifications\">\n <!-- WS - Notifications -->\n <app-ws-notifications\n [server]=\"server\"\n [wsServer]=\"wsServer\"\n [jwtToken]=\"jwtToken\"\n [user]=\"user\"\n ></app-ws-notifications>\n </mat-tab>\n\n <mat-tab label=\"WS - Chats\" [disabled]=\"true\">\n <!-- WS - Chats -->\n <app-ws-chats></app-ws-chats>\n </mat-tab>\n\n <mat-tab label=\"WS - AI Messaging\" [disabled]=\"true\">\n <!-- WS - AI Messaging -->\n <app-ws-ai-messaging></app-ws-ai-messaging>\n </mat-tab>\n\n </mat-tab-group>\n</div>\n\n</div>\n\n" }]
|
|
12069
12056
|
}], propDecorators: { server: [{
|
|
12070
12057
|
type: Input
|
|
12071
12058
|
}], wsServer: [{
|