@ethlete/query 4.10.0 → 4.11.0
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/esm2022/lib/auth/auth-provider.types.mjs +1 -1
- package/esm2022/lib/auth/bearer-auth-provider.mjs +17 -7
- package/esm2022/lib/devtools/components/query-devtools/query-devtools.component.mjs +3 -3
- package/esm2022/lib/devtools/pipes/query-short-name.pipe.mjs +3 -3
- package/esm2022/lib/directives/infinity-query-trigger.directive.mjs +3 -3
- package/esm2022/lib/directives/infinity-query.directive.mjs +3 -3
- package/esm2022/lib/directives/query.directive.mjs +3 -3
- package/esm2022/lib/query-form/query-form.mjs +93 -76
- package/fesm2022/ethlete-query.mjs +217 -191
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/lib/auth/auth-provider.types.d.ts +18 -0
- package/lib/auth/bearer-auth-provider.d.ts +2 -0
- package/lib/query-form/query-form.d.ts +8 -28
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i1$1 from '@ethlete/core';
|
|
2
2
|
import { getCookie, setCookie, deleteCookie, createDestroy, nextFrame, DelayableDirective, RouterStateService, clone, equal, ET_PROPERTY_REMOVED } from '@ethlete/core';
|
|
3
|
-
import { Observable, BehaviorSubject, Subject, fromEvent, timer, takeUntil, take, filter, takeWhile, switchMap, of, tap, shareReplay, interval, skip, map, startWith, combineLatest, withLatestFrom, debounceTime,
|
|
3
|
+
import { Observable, BehaviorSubject, Subject, fromEvent, timer, takeUntil, take, filter, takeWhile, switchMap, of, tap, shareReplay, interval, skip, map, startWith, combineLatest, withLatestFrom, debounceTime, merge } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { isDevMode, Pipe, InjectionToken, inject, ChangeDetectorRef, signal, computed, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, TemplateRef, ViewContainerRef, ErrorHandler, Directive, Input, ElementRef, NgZone, assertInInjectionContext } from '@angular/core';
|
|
6
6
|
import { NgIf, NgFor, AsyncPipe, JsonPipe, NgClass } from '@angular/common';
|
|
@@ -1349,7 +1349,7 @@ class BearerAuthProvider {
|
|
|
1349
1349
|
if (this.tokens.token) {
|
|
1350
1350
|
this._prepareForRefresh();
|
|
1351
1351
|
if (this.tokens.refreshToken && this._config.refreshConfig?.cookieName && cookieEnabled) {
|
|
1352
|
-
|
|
1352
|
+
this._setCookie();
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
else if (this.tokens.refreshToken) {
|
|
@@ -1361,7 +1361,7 @@ class BearerAuthProvider {
|
|
|
1361
1361
|
this._destroy$.unsubscribe();
|
|
1362
1362
|
this._currentRefreshQuery$.next(null);
|
|
1363
1363
|
if (this._config.refreshConfig?.cookieName) {
|
|
1364
|
-
|
|
1364
|
+
this._deleteCookie();
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
1367
|
enableCookie() {
|
|
@@ -1372,14 +1372,24 @@ class BearerAuthProvider {
|
|
|
1372
1372
|
throw new Error('No refresh token was provided');
|
|
1373
1373
|
}
|
|
1374
1374
|
this._config.refreshConfig.cookieEnabled = true;
|
|
1375
|
-
|
|
1375
|
+
this._setCookie();
|
|
1376
1376
|
}
|
|
1377
1377
|
disableCookie() {
|
|
1378
1378
|
if (!this._config.refreshConfig?.cookieName) {
|
|
1379
1379
|
throw new Error('No cookie name was provided');
|
|
1380
1380
|
}
|
|
1381
1381
|
this._config.refreshConfig.cookieEnabled = false;
|
|
1382
|
-
|
|
1382
|
+
this._deleteCookie();
|
|
1383
|
+
}
|
|
1384
|
+
_setCookie() {
|
|
1385
|
+
if (!this._config.refreshConfig?.cookieName || !this.tokens.refreshToken)
|
|
1386
|
+
return;
|
|
1387
|
+
setCookie(this._config.refreshConfig.cookieName, this.tokens.refreshToken, this._config.refreshConfig.cookieExpiresInDays, this._config.refreshConfig.cookieDomain, this._config.refreshConfig.cookiePath);
|
|
1388
|
+
}
|
|
1389
|
+
_deleteCookie() {
|
|
1390
|
+
if (!this._config.refreshConfig?.cookieName)
|
|
1391
|
+
return;
|
|
1392
|
+
deleteCookie(this._config.refreshConfig.cookieName, this._config.refreshConfig.cookiePath, this._config.refreshConfig.cookieDomain);
|
|
1383
1393
|
}
|
|
1384
1394
|
_prepareForRefresh() {
|
|
1385
1395
|
if (!this.tokens.token || !this._config.refreshConfig) {
|
|
@@ -1443,14 +1453,14 @@ class BearerAuthProvider {
|
|
|
1443
1453
|
}
|
|
1444
1454
|
const cookieEnabled = this._config.refreshConfig?.cookieEnabled ?? true;
|
|
1445
1455
|
if (this._config.refreshConfig?.cookieName && this.tokens.refreshToken && cookieEnabled) {
|
|
1446
|
-
|
|
1456
|
+
this._setCookie();
|
|
1447
1457
|
}
|
|
1448
1458
|
this._prepareForRefresh();
|
|
1449
1459
|
}
|
|
1450
1460
|
else if (isQueryStateFailure(state)) {
|
|
1451
1461
|
this._tokens$.next({ token: null, refreshToken: null });
|
|
1452
1462
|
if (this._config.refreshConfig?.cookieName) {
|
|
1453
|
-
|
|
1463
|
+
this._deleteCookie();
|
|
1454
1464
|
}
|
|
1455
1465
|
}
|
|
1456
1466
|
}), takeUntilResponse(), takeUntil(this._destroy$))
|
|
@@ -1478,10 +1488,10 @@ class QueryShortNamePipe {
|
|
|
1478
1488
|
console.log(route);
|
|
1479
1489
|
return route;
|
|
1480
1490
|
}
|
|
1481
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
1482
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.
|
|
1491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryShortNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1492
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: QueryShortNamePipe, isStandalone: true, name: "queryShortName" }); }
|
|
1483
1493
|
}
|
|
1484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
1494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryShortNamePipe, decorators: [{
|
|
1485
1495
|
type: Pipe,
|
|
1486
1496
|
args: [{ name: 'queryShortName', standalone: true }]
|
|
1487
1497
|
}] });
|
|
@@ -1688,10 +1698,10 @@ class QueryDevtoolsComponent {
|
|
|
1688
1698
|
clearQueryHistory() {
|
|
1689
1699
|
this.queryHistory.set([]);
|
|
1690
1700
|
}
|
|
1691
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
1692
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: QueryDevtoolsComponent, isStandalone: true, selector: "et-query-devtools", host: { classAttribute: "et-query-devtools" }, ngImport: i0, template: "<button *ngIf=\"!isOpen()\" (click)=\"toggleOpen()\" class=\"et-query-devtools-open-btn et-qd-chip\">Open Devtools</button>\n\n<div\n *ngIf=\"isOpen()\"\n [class.et-query-devtools-container--transparent]=\"isTranslucent()\"\n class=\"et-query-devtools-container et-query-devtools-container--snap-{{ snapLayout() }}\"\n>\n <header class=\"et-qd-header\">\n <h3 class=\"et-qd-header__title\">Query Devtools</h3>\n\n <div class=\"et-qd-header__select\">\n <label for=\"et-query-client-instance\">Client instance</label>\n <select [formControl]=\"selectedClientIdCtrl\" id=\"et-query-client-instance\">\n <option *ngFor=\"let clientConfig of queryClientConfigs; index as i; trackBy: trackByClient\" [value]=\"i\">\n {{ clientConfig.displayName ?? clientConfig.client.config.baseRoute }}\n </option>\n </select>\n </div>\n\n <button (click)=\"toggleOpen()\" class=\"et-qd-btn et-qd-btn-secondary\">Close</button>\n </header>\n\n <div class=\"et-qd-sub-header\">\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !isTranslucent() }\"\n (click)=\"toggleTranslucent()\"\n class=\"et-qd-chip et-qd-translucent-clickable\"\n >\n Translucent\n </button>\n <div class=\"et-qd-sub-header__divider\"></div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'full' }\"\n (click)=\"selectSnapLayout('full')\"\n class=\"et-qd-chip\"\n >\n Fullscreen\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'top' }\"\n (click)=\"selectSnapLayout('top')\"\n class=\"et-qd-chip\"\n >\n Top\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'bottom' }\"\n (click)=\"selectSnapLayout('bottom')\"\n class=\"et-qd-chip\"\n >\n Bottom\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'left' }\"\n (click)=\"selectSnapLayout('left')\"\n class=\"et-qd-chip\"\n >\n Left\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'right' }\"\n (click)=\"selectSnapLayout('right')\"\n class=\"et-qd-chip\"\n >\n Right\n </button>\n </div>\n\n <div *ngIf=\"selectedClientConfig() as cfg\" class=\"et-qd-client\">\n <p class=\"et-qd-client__title\">{{ cfg.displayName ?? cfg.client.config.baseRoute }}</p>\n\n <div class=\"et-qd-client__actions\">\n <button (click)=\"cfg.client._store.refreshQueriesInUse()\" class=\"et-qd-chip\">Refresh all</button>\n <button (click)=\"cfg.client._store.refreshQueriesInUse({ ignoreCacheValidity: true })\" class=\"et-qd-chip\">\n Refresh all (ignore caches)\n </button>\n <button\n (click)=\"cfg.client._store.refreshQueriesInUse({ ignoreCacheValidity: true, purgeUnused: true })\"\n class=\"et-qd-chip\"\n >\n Refresh all (ignore caches & purge unused)\n </button>\n </div>\n </div>\n\n <div *ngIf=\"selectedClientConfig() as cfg\" class=\"et-qd-queries\">\n <p class=\"et-qd-queries__title\">Query browser</p>\n <div class=\"et-qd-queries__actions\">\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': queryListMode() !== 'live' }\"\n (click)=\"selectQueryListMode('live')\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Live ({{ queries()?.length ?? 0 }})\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': queryListMode() !== 'history' }\"\n (click)=\"selectQueryListMode('history')\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n History ({{ queryHistory().length }}/50)\n </button>\n <ng-container *ngIf=\"queryListMode() === 'history'\">\n <div class=\"et-qd-queries__divider\"></div>\n <button (click)=\"clearQueryHistory()\" class=\"et-qd-chip et-qd-chip-bordered\">Clear history</button>\n </ng-container>\n </div>\n\n <div class=\"et-qd-queries__browser\">\n <ul *ngIf=\"queryListMode() === 'live'\" class=\"et-qd-queries__browser-list\">\n <li *ngFor=\"let query of queries(); trackBy: trackByQuery\">\n <button [class.et-qd-query--active]=\"selectedQuery()?._id === query._id\" (click)=\"selectQuery(query)\">\n <span> {{ query._queryConfig.method }}</span>\n <span> {{ query | queryShortName }}</span>\n </button>\n </li>\n </ul>\n <ul *ngIf=\"queryListMode() === 'history'\" class=\"et-qd-queries__browser-list\">\n <li *ngFor=\"let query of queryHistory(); trackBy: trackByQuery\">\n <button [class.et-qd-query--active]=\"selectedQuery()?._id === query._id\" (click)=\"selectQuery(query)\">\n <span> {{ query._queryConfig.method }}</span>\n <span> {{ query | queryShortName }}</span>\n </button>\n </li>\n </ul>\n <div class=\"et-qd-queries__browser-detail\">\n <ng-container *ngIf=\"selectedQuery() as query\">\n <p class=\"et-qd-queries__browser-detail__title\">\n {{ query._queryConfig.method }} {{ query._routeWithParams }}\n </p>\n\n <div class=\"et-qd-queries__actions\">\n <button (click)=\"query.execute()\" class=\"et-qd-chip et-qd-chip-bordered\">Execute</button>\n <button (click)=\"query.execute({ skipCache: true })\" class=\"et-qd-chip et-qd-chip-bordered\">\n Execute (ignore cache)\n </button>\n\n <button (click)=\"query.abort()\" class=\"et-qd-chip et-qd-chip-bordered\">Abort</button>\n <div class=\"et-qd-queries__divider\"></div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !query.isPolling }\"\n (click)=\"query.poll({ interval: 5000, takeUntil: _destroy$ })\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Poll\n </button>\n\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': query.isPolling }\"\n (click)=\"query.stopPolling()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Stop polling\n </button>\n <ng-container *ngIf=\"query.isPolling || query._isPollingPaused\">\n <button (click)=\"query.pausePolling()\" class=\"et-qd-chip et-qd-chip-secondary et-qd-chip-bordered\">\n Pause polling\n </button>\n <button (click)=\"query.resumePolling()\" class=\"et-qd-chip et-qd-chip-secondary et-qd-chip-bordered\">\n Resume polling\n </button>\n </ng-container>\n </div>\n\n <div class=\"et-qd-list\">\n <div class=\"et-qd-list-item\">\n <p>State type</p>\n <pre>{{ query.rawState.type }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is expired</p>\n <pre>{{ query.isExpired }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is in use</p>\n <pre>{{ query.isInUse }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Subscriber count</p>\n <pre>{{ query._subscriberCount }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is polling</p>\n <pre>{{ query.isPolling }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is polling paused</p>\n <pre>{{ query._isPollingPaused }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Enable smart polling</p>\n <pre>{{ query._enableSmartPolling }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Arguments</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showArguments() }\"\n (click)=\"toggleShowArguments()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showArguments()\">{{ query._arguments | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>State</p>\n <p><i> Warning, this will cause a subscription if shown!</i></p>\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showResponse() }\"\n (click)=\"toggleShowResponse()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showResponse()\">{{ query.state$ | async | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Raw state</p>\n <p><i> The query state unaffected by entity stores</i></p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showRawResponse() }\"\n (click)=\"toggleShowRawResponse()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showRawResponse()\">{{ query.rawState | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Query config</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showQueryConfig() }\"\n (click)=\"toggleShowQueryConfig()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showQueryConfig()\">{{ stringifiedQueryConfig() | json }}</pre>\n </div>\n\n <div *ngIf=\"!!query._queryConfig.entity\" class=\"et-qd-list-item\">\n <p>Entity store value</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showEntityStoreValue() }\"\n (click)=\"toggleShowEntityStoreValue()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showEntityStoreValue()\">{{ selectedQueryEntityStoreValue$ | async | json }}</pre>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{position:fixed;top:0;z-index:1000000;font-size:14px;color:#fff}.et-query-devtools-container{position:fixed;inset:0;background-color:#25292e;z-index:10000;overflow:auto;font-family:monospace;display:grid;grid-template-rows:auto auto auto minmax(0,1fr)}.et-query-devtools-container.et-query-devtools-container--transparent{opacity:.25;pointer-events:none}.et-query-devtools-container.et-query-devtools-container--transparent .et-query-devtools-translucent-btn{pointer-events:all}.et-query-devtools-container.et-query-devtools-container--snap-left{inset-inline-start:0;inset-block-start:0;inset-block-end:0;width:50%;border-right:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-right{inset-inline-start:unset;inset-inline-end:0;inset-block-start:0;inset-block-end:0;width:50%;border-left:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-top{inset-inline-start:0;inset-block-start:0;inset-inline-end:0;height:50%;border-bottom:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-bottom{inset-inline-start:0;inset-block-start:unset;inset-block-end:0;inset-inline-end:0;height:50%;border-top:1px solid rgb(37,41,46)}.et-query-devtools-open-btn{position:fixed;inset-inline-start:0;inset-block-start:0;z-index:9999;all:unset;font-family:monospace}.et-qd-header{background-color:#00ffa1;padding:12px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}.et-qd-header__title{color:#25292e;margin:0;font-size:22px}.et-qd-header__select{display:grid;background-color:#25292e;border-radius:10px;overflow:hidden}.et-qd-header__select select{width:250px;color:#fff;padding:3px 10px 2px;border:none;background-color:#25292e;font-family:monospace}.et-qd-header__select label{padding:3px 10px;color:#25292e;font-size:12px;font-weight:700;color:#fff;border-bottom:1px solid gray}.et-qd-sub-header{background-color:#00b371;padding:12px;display:flex;gap:12px;flex-wrap:wrap}.et-qd-sub-header__divider{width:1px;background-color:#25292e}.et-qd-btn{background-color:#00ffa1;color:#25292e;border:none;padding:12px;cursor:pointer;font-size:14px;font-weight:700;text-align:center;text-decoration:none;display:inline-block;width:100%;transition:all .3s ease-in-out;font-family:monospace;border-radius:10px}.et-qd-btn:hover{background-color:#00cc81}.et-qd-btn.et-qd-btn-secondary{background-color:#25292e;color:#00ffa1}.et-qd-btn.et-qd-btn-secondary:hover{background-color:#3c424a}.et-qd-chip{background-color:#00ffa1;color:#25292e;border:none;padding:4px 9px;cursor:pointer;font-size:12px;font-weight:700;text-align:center;text-decoration:none;display:inline-block;transition:all .3s ease-in-out;font-family:monospace;border-radius:10px}.et-qd-chip:hover{background-color:#00cc81}.et-qd-chip.et-qd-chip-secondary{background-color:#25292e;color:#00ffa1}.et-qd-chip.et-qd-chip-secondary:hover{background-color:#3c424a}.et-qd-chip.et-qd-chip-bordered{border:1px solid rgb(0,255,161)}.et-qd-translucent-clickable{pointer-events:all}.et-qd-client{border-bottom:1px solid #3c424a;padding:12px}.et-qd-client__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-client__actions{display:flex;gap:12px;margin-top:12px}.et-qd-queries{padding:12px;display:grid;grid-template-rows:auto auto minmax(0,1fr)}.et-qd-queries__actions{display:flex;gap:12px;margin-top:12px;margin-bottom:16px}.et-qd-queries__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-queries__divider{width:1px;background-color:#3c424a}.et-qd-queries__browser{display:grid;grid-template-columns:1fr minmax(0,3fr);margin-left:-12px;margin-right:-12px;border-top:1px solid #3c424a;margin-bottom:-12px}.et-qd-queries__browser-list{border-right:1px solid #3c424a;list-style:none;padding:0;margin:0;display:grid;grid-auto-flow:row;grid-auto-rows:55px;overflow-y:auto;overflow-x:hidden}.et-qd-queries__browser-list li{margin:0}.et-qd-queries__browser-list li button{all:unset;font-family:monospace;box-sizing:border-box;width:100%;border:none;border-bottom:1px solid #3c424a;background-color:#25292e;color:#fff;text-align:left;padding:12px;height:100%;transition:all .3s ease-in-out;cursor:pointer;display:grid;gap:2px}.et-qd-queries__browser-list li button span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.et-qd-queries__browser-list li button span:first-of-type{font-weight:700}.et-qd-queries__browser-list li button:hover,.et-qd-queries__browser-list li button.et-qd-query--active{background-color:#30363c}.et-qd-queries__browser-detail{padding:12px;overflow-y:auto;overflow-x:hidden}.et-qd-queries__browser-detail__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-list{display:grid;gap:12px}.et-qd-list-item{display:grid}.et-qd-list-item p{font-weight:700;margin:0;padding-bottom:8px}.et-qd-list-item p+p{margin-top:-8px}.et-qd-list-item div+pre{margin-top:8px}.et-qd-list-item pre{margin:0;padding:4px;background-color:#0e1012;border-radius:4px;max-height:450px;overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: QueryShortNamePipe, name: "queryShortName" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom }); }
|
|
1701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryDevtoolsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: QueryDevtoolsComponent, isStandalone: true, selector: "et-query-devtools", host: { classAttribute: "et-query-devtools" }, ngImport: i0, template: "<button *ngIf=\"!isOpen()\" (click)=\"toggleOpen()\" class=\"et-query-devtools-open-btn et-qd-chip\">Open Devtools</button>\n\n<div\n *ngIf=\"isOpen()\"\n [class.et-query-devtools-container--transparent]=\"isTranslucent()\"\n class=\"et-query-devtools-container et-query-devtools-container--snap-{{ snapLayout() }}\"\n>\n <header class=\"et-qd-header\">\n <h3 class=\"et-qd-header__title\">Query Devtools</h3>\n\n <div class=\"et-qd-header__select\">\n <label for=\"et-query-client-instance\">Client instance</label>\n <select [formControl]=\"selectedClientIdCtrl\" id=\"et-query-client-instance\">\n <option *ngFor=\"let clientConfig of queryClientConfigs; index as i; trackBy: trackByClient\" [value]=\"i\">\n {{ clientConfig.displayName ?? clientConfig.client.config.baseRoute }}\n </option>\n </select>\n </div>\n\n <button (click)=\"toggleOpen()\" class=\"et-qd-btn et-qd-btn-secondary\">Close</button>\n </header>\n\n <div class=\"et-qd-sub-header\">\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !isTranslucent() }\"\n (click)=\"toggleTranslucent()\"\n class=\"et-qd-chip et-qd-translucent-clickable\"\n >\n Translucent\n </button>\n <div class=\"et-qd-sub-header__divider\"></div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'full' }\"\n (click)=\"selectSnapLayout('full')\"\n class=\"et-qd-chip\"\n >\n Fullscreen\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'top' }\"\n (click)=\"selectSnapLayout('top')\"\n class=\"et-qd-chip\"\n >\n Top\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'bottom' }\"\n (click)=\"selectSnapLayout('bottom')\"\n class=\"et-qd-chip\"\n >\n Bottom\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'left' }\"\n (click)=\"selectSnapLayout('left')\"\n class=\"et-qd-chip\"\n >\n Left\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': snapLayout() !== 'right' }\"\n (click)=\"selectSnapLayout('right')\"\n class=\"et-qd-chip\"\n >\n Right\n </button>\n </div>\n\n <div *ngIf=\"selectedClientConfig() as cfg\" class=\"et-qd-client\">\n <p class=\"et-qd-client__title\">{{ cfg.displayName ?? cfg.client.config.baseRoute }}</p>\n\n <div class=\"et-qd-client__actions\">\n <button (click)=\"cfg.client._store.refreshQueriesInUse()\" class=\"et-qd-chip\">Refresh all</button>\n <button (click)=\"cfg.client._store.refreshQueriesInUse({ ignoreCacheValidity: true })\" class=\"et-qd-chip\">\n Refresh all (ignore caches)\n </button>\n <button\n (click)=\"cfg.client._store.refreshQueriesInUse({ ignoreCacheValidity: true, purgeUnused: true })\"\n class=\"et-qd-chip\"\n >\n Refresh all (ignore caches & purge unused)\n </button>\n </div>\n </div>\n\n <div *ngIf=\"selectedClientConfig() as cfg\" class=\"et-qd-queries\">\n <p class=\"et-qd-queries__title\">Query browser</p>\n <div class=\"et-qd-queries__actions\">\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': queryListMode() !== 'live' }\"\n (click)=\"selectQueryListMode('live')\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Live ({{ queries()?.length ?? 0 }})\n </button>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': queryListMode() !== 'history' }\"\n (click)=\"selectQueryListMode('history')\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n History ({{ queryHistory().length }}/50)\n </button>\n <ng-container *ngIf=\"queryListMode() === 'history'\">\n <div class=\"et-qd-queries__divider\"></div>\n <button (click)=\"clearQueryHistory()\" class=\"et-qd-chip et-qd-chip-bordered\">Clear history</button>\n </ng-container>\n </div>\n\n <div class=\"et-qd-queries__browser\">\n <ul *ngIf=\"queryListMode() === 'live'\" class=\"et-qd-queries__browser-list\">\n <li *ngFor=\"let query of queries(); trackBy: trackByQuery\">\n <button [class.et-qd-query--active]=\"selectedQuery()?._id === query._id\" (click)=\"selectQuery(query)\">\n <span> {{ query._queryConfig.method }}</span>\n <span> {{ query | queryShortName }}</span>\n </button>\n </li>\n </ul>\n <ul *ngIf=\"queryListMode() === 'history'\" class=\"et-qd-queries__browser-list\">\n <li *ngFor=\"let query of queryHistory(); trackBy: trackByQuery\">\n <button [class.et-qd-query--active]=\"selectedQuery()?._id === query._id\" (click)=\"selectQuery(query)\">\n <span> {{ query._queryConfig.method }}</span>\n <span> {{ query | queryShortName }}</span>\n </button>\n </li>\n </ul>\n <div class=\"et-qd-queries__browser-detail\">\n <ng-container *ngIf=\"selectedQuery() as query\">\n <p class=\"et-qd-queries__browser-detail__title\">\n {{ query._queryConfig.method }} {{ query._routeWithParams }}\n </p>\n\n <div class=\"et-qd-queries__actions\">\n <button (click)=\"query.execute()\" class=\"et-qd-chip et-qd-chip-bordered\">Execute</button>\n <button (click)=\"query.execute({ skipCache: true })\" class=\"et-qd-chip et-qd-chip-bordered\">\n Execute (ignore cache)\n </button>\n\n <button (click)=\"query.abort()\" class=\"et-qd-chip et-qd-chip-bordered\">Abort</button>\n <div class=\"et-qd-queries__divider\"></div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !query.isPolling }\"\n (click)=\"query.poll({ interval: 5000, takeUntil: _destroy$ })\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Poll\n </button>\n\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': query.isPolling }\"\n (click)=\"query.stopPolling()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Stop polling\n </button>\n <ng-container *ngIf=\"query.isPolling || query._isPollingPaused\">\n <button (click)=\"query.pausePolling()\" class=\"et-qd-chip et-qd-chip-secondary et-qd-chip-bordered\">\n Pause polling\n </button>\n <button (click)=\"query.resumePolling()\" class=\"et-qd-chip et-qd-chip-secondary et-qd-chip-bordered\">\n Resume polling\n </button>\n </ng-container>\n </div>\n\n <div class=\"et-qd-list\">\n <div class=\"et-qd-list-item\">\n <p>State type</p>\n <pre>{{ query.rawState.type }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is expired</p>\n <pre>{{ query.isExpired }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is in use</p>\n <pre>{{ query.isInUse }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Subscriber count</p>\n <pre>{{ query._subscriberCount }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is polling</p>\n <pre>{{ query.isPolling }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Is polling paused</p>\n <pre>{{ query._isPollingPaused }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Enable smart polling</p>\n <pre>{{ query._enableSmartPolling }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Arguments</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showArguments() }\"\n (click)=\"toggleShowArguments()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showArguments()\">{{ query._arguments | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>State</p>\n <p><i> Warning, this will cause a subscription if shown!</i></p>\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showResponse() }\"\n (click)=\"toggleShowResponse()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showResponse()\">{{ query.state$ | async | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Raw state</p>\n <p><i> The query state unaffected by entity stores</i></p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showRawResponse() }\"\n (click)=\"toggleShowRawResponse()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showRawResponse()\">{{ query.rawState | json }}</pre>\n </div>\n\n <div class=\"et-qd-list-item\">\n <p>Query config</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showQueryConfig() }\"\n (click)=\"toggleShowQueryConfig()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showQueryConfig()\">{{ stringifiedQueryConfig() | json }}</pre>\n </div>\n\n <div *ngIf=\"!!query._queryConfig.entity\" class=\"et-qd-list-item\">\n <p>Entity store value</p>\n\n <div>\n <button\n [ngClass]=\"{ 'et-qd-chip-secondary': !showEntityStoreValue() }\"\n (click)=\"toggleShowEntityStoreValue()\"\n class=\"et-qd-chip et-qd-chip-bordered\"\n >\n Toggle\n </button>\n </div>\n <pre *ngIf=\"showEntityStoreValue()\">{{ selectedQueryEntityStoreValue$ | async | json }}</pre>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{position:fixed;top:0;z-index:1000000;font-size:14px;color:#fff}.et-query-devtools-container{position:fixed;inset:0;background-color:#25292e;z-index:10000;overflow:auto;font-family:monospace;display:grid;grid-template-rows:auto auto auto minmax(0,1fr)}.et-query-devtools-container.et-query-devtools-container--transparent{opacity:.25;pointer-events:none}.et-query-devtools-container.et-query-devtools-container--transparent .et-query-devtools-translucent-btn{pointer-events:all}.et-query-devtools-container.et-query-devtools-container--snap-left{inset-inline-start:0;inset-block-start:0;inset-block-end:0;width:50%;border-right:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-right{inset-inline-start:unset;inset-inline-end:0;inset-block-start:0;inset-block-end:0;width:50%;border-left:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-top{inset-inline-start:0;inset-block-start:0;inset-inline-end:0;height:50%;border-bottom:1px solid rgb(37,41,46)}.et-query-devtools-container.et-query-devtools-container--snap-bottom{inset-inline-start:0;inset-block-start:unset;inset-block-end:0;inset-inline-end:0;height:50%;border-top:1px solid rgb(37,41,46)}.et-query-devtools-open-btn{position:fixed;inset-inline-start:0;inset-block-start:0;z-index:9999;all:unset;font-family:monospace}.et-qd-header{background-color:#00ffa1;padding:12px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}.et-qd-header__title{color:#25292e;margin:0;font-size:22px}.et-qd-header__select{display:grid;background-color:#25292e;border-radius:10px;overflow:hidden}.et-qd-header__select select{width:250px;color:#fff;padding:3px 10px 2px;border:none;background-color:#25292e;font-family:monospace}.et-qd-header__select label{padding:3px 10px;color:#25292e;font-size:12px;font-weight:700;color:#fff;border-bottom:1px solid gray}.et-qd-sub-header{background-color:#00b371;padding:12px;display:flex;gap:12px;flex-wrap:wrap}.et-qd-sub-header__divider{width:1px;background-color:#25292e}.et-qd-btn{background-color:#00ffa1;color:#25292e;border:none;padding:12px;cursor:pointer;font-size:14px;font-weight:700;text-align:center;text-decoration:none;display:inline-block;width:100%;transition:all .3s ease-in-out;font-family:monospace;border-radius:10px}.et-qd-btn:hover{background-color:#00cc81}.et-qd-btn.et-qd-btn-secondary{background-color:#25292e;color:#00ffa1}.et-qd-btn.et-qd-btn-secondary:hover{background-color:#3c424a}.et-qd-chip{background-color:#00ffa1;color:#25292e;border:none;padding:4px 9px;cursor:pointer;font-size:12px;font-weight:700;text-align:center;text-decoration:none;display:inline-block;transition:all .3s ease-in-out;font-family:monospace;border-radius:10px}.et-qd-chip:hover{background-color:#00cc81}.et-qd-chip.et-qd-chip-secondary{background-color:#25292e;color:#00ffa1}.et-qd-chip.et-qd-chip-secondary:hover{background-color:#3c424a}.et-qd-chip.et-qd-chip-bordered{border:1px solid rgb(0,255,161)}.et-qd-translucent-clickable{pointer-events:all}.et-qd-client{border-bottom:1px solid #3c424a;padding:12px}.et-qd-client__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-client__actions{display:flex;gap:12px;margin-top:12px}.et-qd-queries{padding:12px;display:grid;grid-template-rows:auto auto minmax(0,1fr)}.et-qd-queries__actions{display:flex;gap:12px;margin-top:12px;margin-bottom:16px}.et-qd-queries__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-queries__divider{width:1px;background-color:#3c424a}.et-qd-queries__browser{display:grid;grid-template-columns:1fr minmax(0,3fr);margin-left:-12px;margin-right:-12px;border-top:1px solid #3c424a;margin-bottom:-12px}.et-qd-queries__browser-list{border-right:1px solid #3c424a;list-style:none;padding:0;margin:0;display:grid;grid-auto-flow:row;grid-auto-rows:55px;overflow-y:auto;overflow-x:hidden}.et-qd-queries__browser-list li{margin:0}.et-qd-queries__browser-list li button{all:unset;font-family:monospace;box-sizing:border-box;width:100%;border:none;border-bottom:1px solid #3c424a;background-color:#25292e;color:#fff;text-align:left;padding:12px;height:100%;transition:all .3s ease-in-out;cursor:pointer;display:grid;gap:2px}.et-qd-queries__browser-list li button span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.et-qd-queries__browser-list li button span:first-of-type{font-weight:700}.et-qd-queries__browser-list li button:hover,.et-qd-queries__browser-list li button.et-qd-query--active{background-color:#30363c}.et-qd-queries__browser-detail{padding:12px;overflow-y:auto;overflow-x:hidden}.et-qd-queries__browser-detail__title{margin:0;font-size:14px;color:#fff;font-weight:700}.et-qd-list{display:grid;gap:12px}.et-qd-list-item{display:grid}.et-qd-list-item p{font-weight:700;margin:0;padding-bottom:8px}.et-qd-list-item p+p{margin-top:-8px}.et-qd-list-item div+pre{margin-top:8px}.et-qd-list-item pre{margin:0;padding:4px;background-color:#0e1012;border-radius:4px;max-height:450px;overflow:auto}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: QueryShortNamePipe, name: "queryShortName" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom }); }
|
|
1693
1703
|
}
|
|
1694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
1704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryDevtoolsComponent, decorators: [{
|
|
1695
1705
|
type: Component,
|
|
1696
1706
|
args: [{ selector: 'et-query-devtools', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, host: {
|
|
1697
1707
|
class: 'et-query-devtools',
|
|
@@ -1796,10 +1806,10 @@ class QueryDirective {
|
|
|
1796
1806
|
this._viewContainerRef.createEmbeddedView(this._mainTemplateRef, this._viewContext);
|
|
1797
1807
|
}
|
|
1798
1808
|
}
|
|
1799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
1800
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.
|
|
1809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1810
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: QueryDirective, isStandalone: true, selector: "[etQuery]", inputs: { query: ["etQuery", "query"], cache: ["etQueryCache", "cache"] }, ngImport: i0 }); }
|
|
1801
1811
|
}
|
|
1802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
1812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: QueryDirective, decorators: [{
|
|
1803
1813
|
type: Directive,
|
|
1804
1814
|
args: [{
|
|
1805
1815
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -2128,10 +2138,10 @@ class InfinityQueryDirective {
|
|
|
2128
2138
|
this._viewContext.currentQuery = null;
|
|
2129
2139
|
this._data$.next([]);
|
|
2130
2140
|
}
|
|
2131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
2132
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.
|
|
2141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: InfinityQueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2142
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: InfinityQueryDirective, isStandalone: true, selector: "[etInfinityQuery]", inputs: { infinityQuery: ["etInfinityQuery", "infinityQuery"] }, providers: [{ provide: INFINITY_QUERY_TOKEN, useExisting: InfinityQueryDirective }], exportAs: ["etInfinityQuery"], hostDirectives: [{ directive: i1$1.DelayableDirective }], ngImport: i0 }); }
|
|
2133
2143
|
}
|
|
2134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: InfinityQueryDirective, decorators: [{
|
|
2135
2145
|
type: Directive,
|
|
2136
2146
|
args: [{
|
|
2137
2147
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -2182,10 +2192,10 @@ class InfinityQueryTriggerDirective {
|
|
|
2182
2192
|
});
|
|
2183
2193
|
this._observer.observe(this._elementRef.nativeElement);
|
|
2184
2194
|
}
|
|
2185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.
|
|
2186
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.
|
|
2195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: InfinityQueryTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2196
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: InfinityQueryTriggerDirective, isStandalone: true, selector: "[etInfinityQueryTrigger], et-infinity-query-trigger", inputs: { scrollContainerSelector: "scrollContainerSelector" }, ngImport: i0 }); }
|
|
2187
2197
|
}
|
|
2188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.
|
|
2198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: InfinityQueryTriggerDirective, decorators: [{
|
|
2189
2199
|
type: Directive,
|
|
2190
2200
|
args: [{
|
|
2191
2201
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -2346,54 +2356,107 @@ const removeFrom = (store, { where, id }) => {
|
|
|
2346
2356
|
.subscribe();
|
|
2347
2357
|
};
|
|
2348
2358
|
|
|
2349
|
-
const
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
patchValue(
|
|
2353
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2354
|
-
value, options) {
|
|
2355
|
-
super.patchValue(value, options);
|
|
2359
|
+
const transformToString = (value) => {
|
|
2360
|
+
if (typeof value === 'string') {
|
|
2361
|
+
return value;
|
|
2356
2362
|
}
|
|
2357
|
-
|
|
2363
|
+
return null;
|
|
2364
|
+
};
|
|
2365
|
+
const transformToStringArray = (value) => {
|
|
2366
|
+
if (Array.isArray(value)) {
|
|
2367
|
+
return value.map(transformToString).filter(Boolean);
|
|
2368
|
+
}
|
|
2369
|
+
else if (typeof value === 'string') {
|
|
2370
|
+
return [transformToString(value)];
|
|
2371
|
+
}
|
|
2372
|
+
return null;
|
|
2373
|
+
};
|
|
2374
|
+
const transformToNumber = (value) => {
|
|
2375
|
+
if (typeof value === 'number') {
|
|
2376
|
+
return value;
|
|
2377
|
+
}
|
|
2378
|
+
if (typeof value === 'string') {
|
|
2379
|
+
return Number(value);
|
|
2380
|
+
}
|
|
2381
|
+
return null;
|
|
2382
|
+
};
|
|
2383
|
+
const transformToNumberArray = (value) => {
|
|
2384
|
+
if (Array.isArray(value)) {
|
|
2385
|
+
return value.map(transformToNumber).filter((item) => item !== null);
|
|
2386
|
+
}
|
|
2387
|
+
else if (typeof value === 'number') {
|
|
2388
|
+
return [value];
|
|
2389
|
+
}
|
|
2390
|
+
return null;
|
|
2391
|
+
};
|
|
2392
|
+
const transformToBoolean = (value) => {
|
|
2393
|
+
if (typeof value === 'boolean') {
|
|
2394
|
+
return value;
|
|
2395
|
+
}
|
|
2396
|
+
if (typeof value === 'string') {
|
|
2397
|
+
return value === 'true' || value === '1';
|
|
2398
|
+
}
|
|
2399
|
+
return null;
|
|
2400
|
+
};
|
|
2401
|
+
const transformToBooleanArray = (value) => {
|
|
2402
|
+
if (Array.isArray(value)) {
|
|
2403
|
+
return value.map(transformToBoolean).filter((item) => item !== null);
|
|
2404
|
+
}
|
|
2405
|
+
else if (typeof value === 'string' || typeof value === 'boolean') {
|
|
2406
|
+
return [transformToBoolean(value)];
|
|
2407
|
+
}
|
|
2408
|
+
return null;
|
|
2409
|
+
};
|
|
2410
|
+
const transformToDate = (value) => {
|
|
2411
|
+
if (value instanceof Date) {
|
|
2412
|
+
return value;
|
|
2413
|
+
}
|
|
2414
|
+
if (typeof value === 'string') {
|
|
2415
|
+
const date = new Date(value);
|
|
2416
|
+
if (isNaN(date.getTime())) {
|
|
2417
|
+
return null;
|
|
2418
|
+
}
|
|
2419
|
+
return date;
|
|
2420
|
+
}
|
|
2421
|
+
return null;
|
|
2422
|
+
};
|
|
2423
|
+
const transformToDateArray = (value) => {
|
|
2424
|
+
if (Array.isArray(value)) {
|
|
2425
|
+
return value.map(transformToDate).filter((item) => item !== null);
|
|
2426
|
+
}
|
|
2427
|
+
else if (typeof value === 'string' || value instanceof Date) {
|
|
2428
|
+
return [transformToDate(value)];
|
|
2429
|
+
}
|
|
2430
|
+
return null;
|
|
2431
|
+
};
|
|
2432
|
+
const transformToSort = (value) => {
|
|
2433
|
+
if (typeof value === 'string') {
|
|
2434
|
+
const [active, direction] = value.split(':');
|
|
2435
|
+
return {
|
|
2436
|
+
active,
|
|
2437
|
+
direction: direction,
|
|
2438
|
+
};
|
|
2439
|
+
}
|
|
2440
|
+
return null;
|
|
2441
|
+
};
|
|
2442
|
+
const transformToSortQueryParam = (value) => {
|
|
2443
|
+
if (typeof value === 'string') {
|
|
2444
|
+
return value;
|
|
2445
|
+
}
|
|
2446
|
+
if (value && typeof value === 'object' && 'active' in value && 'direction' in value) {
|
|
2447
|
+
const valAsSort = value;
|
|
2448
|
+
return valAsSort.direction ? `${valAsSort.active}:${valAsSort.direction}` : null;
|
|
2449
|
+
}
|
|
2450
|
+
return null;
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
const ET_ARR_PREFIX = 'ET_ARR__';
|
|
2358
2454
|
class QueryField {
|
|
2359
2455
|
get control() {
|
|
2360
2456
|
return this.data.control;
|
|
2361
2457
|
}
|
|
2362
2458
|
constructor(data) {
|
|
2363
2459
|
this.data = data;
|
|
2364
|
-
this.changes$ = this._setupChangesObservable();
|
|
2365
|
-
this._currentDebounceTimeout = null;
|
|
2366
|
-
}
|
|
2367
|
-
setValue(value, options) {
|
|
2368
|
-
if (this._currentDebounceTimeout !== null) {
|
|
2369
|
-
clearTimeout(this._currentDebounceTimeout);
|
|
2370
|
-
this._currentDebounceTimeout = null;
|
|
2371
|
-
}
|
|
2372
|
-
if (value === this.control.value) {
|
|
2373
|
-
return;
|
|
2374
|
-
}
|
|
2375
|
-
if (this.data.debounce && !options?.skipDebounce) {
|
|
2376
|
-
this._currentDebounceTimeout = window.setTimeout(() => {
|
|
2377
|
-
this.control.setValue(value);
|
|
2378
|
-
}, this.data.debounce);
|
|
2379
|
-
}
|
|
2380
|
-
else {
|
|
2381
|
-
this.control.setValue(value);
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
_setupChangesObservable() {
|
|
2385
|
-
const obs = this.control.valueChanges.pipe(startWith(this.control.value));
|
|
2386
|
-
if (!this.data.debounce) {
|
|
2387
|
-
return obs;
|
|
2388
|
-
}
|
|
2389
|
-
// The initial value should get emitted immediately
|
|
2390
|
-
// concat switches to the debounced observable after the first observable is completed
|
|
2391
|
-
return concat(obs.pipe(take(1)), this.control.valueChanges.pipe(debounce((v) => {
|
|
2392
|
-
if ((this.data.disableDebounceIfFalsy && !v) || !this.data.debounce) {
|
|
2393
|
-
return of(0);
|
|
2394
|
-
}
|
|
2395
|
-
return timer(this.data.debounce);
|
|
2396
|
-
})));
|
|
2397
2460
|
}
|
|
2398
2461
|
}
|
|
2399
2462
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2416,23 +2479,16 @@ class QueryForm {
|
|
|
2416
2479
|
this._defaultValues = this._extractDefaultValues();
|
|
2417
2480
|
this._routerStateService = inject(RouterStateService);
|
|
2418
2481
|
this._zone = inject(NgZone);
|
|
2482
|
+
this._didValueChanges$ = new Subject();
|
|
2419
2483
|
this._isObserving = false;
|
|
2420
2484
|
this.form = this._setupFormGroup();
|
|
2421
2485
|
this._lastFormValue$ = new BehaviorSubject(null);
|
|
2422
|
-
this._currentFormValue$ = new BehaviorSubject(
|
|
2423
|
-
id: 0,
|
|
2424
|
-
data: this._formValue,
|
|
2425
|
-
});
|
|
2486
|
+
this._currentFormValue$ = new BehaviorSubject(this._formValue);
|
|
2426
2487
|
this._changes$ = new BehaviorSubject({
|
|
2427
2488
|
previousValue: null,
|
|
2428
2489
|
currentValue: this.form.getRawValue(),
|
|
2429
2490
|
});
|
|
2430
|
-
this.changes$ = this.
|
|
2431
|
-
return {
|
|
2432
|
-
previousValue: previousValueEvent?.data ?? null,
|
|
2433
|
-
currentValue: currentValueEvent.data,
|
|
2434
|
-
};
|
|
2435
|
-
}));
|
|
2491
|
+
this.changes$ = this._changes$.asObservable();
|
|
2436
2492
|
assertInInjectionContext(QueryForm);
|
|
2437
2493
|
}
|
|
2438
2494
|
observe(options) {
|
|
@@ -2443,38 +2499,75 @@ class QueryForm {
|
|
|
2443
2499
|
return;
|
|
2444
2500
|
}
|
|
2445
2501
|
this._isObserving = true;
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2502
|
+
if (options?.syncOnNavigation !== false) {
|
|
2503
|
+
const didChanges = this.setFormValueFromUrlQueryParams({
|
|
2504
|
+
queryParams: this._routerStateService.queryParams,
|
|
2505
|
+
});
|
|
2506
|
+
if (didChanges) {
|
|
2507
|
+
this._handleFormChange(true);
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
merge(...Object.values(this._fields).map((field) => field.control.valueChanges), this._didValueChanges$)
|
|
2511
|
+
.pipe(debounceTime(0), tap(() => {
|
|
2512
|
+
this._handleFormChange();
|
|
2453
2513
|
}), takeUntil(this._destroy$), takeUntil(this._unobserveTrigger$))
|
|
2454
2514
|
.subscribe();
|
|
2515
|
+
let changedFieldsInLastResetLoop = [];
|
|
2516
|
+
let currentUniqueChangedFields = [];
|
|
2455
2517
|
this._currentFormValue$
|
|
2456
|
-
.pipe(
|
|
2457
|
-
|
|
2458
|
-
|
|
2518
|
+
.pipe(map((currentValue) => {
|
|
2519
|
+
return {
|
|
2520
|
+
previousValue: clone(this._lastFormValue$.value),
|
|
2521
|
+
currentValue: clone(currentValue),
|
|
2522
|
+
};
|
|
2523
|
+
}), tap(({ currentValue, previousValue }) => {
|
|
2459
2524
|
if (options?.writeToQueryParams !== false) {
|
|
2460
|
-
this._syncViaUrlQueryParams(
|
|
2525
|
+
this._syncViaUrlQueryParams(currentValue, options?.replaceUrl);
|
|
2461
2526
|
}
|
|
2462
|
-
const didResetValues = this._handleQueryFormResets(
|
|
2463
|
-
|
|
2464
|
-
|
|
2527
|
+
const didResetValues = this._handleQueryFormResets(previousValue ?? null, currentValue);
|
|
2528
|
+
const changedFields = Object.keys(currentValue).filter((key) => !equal(previousValue?.[key], currentValue[key]));
|
|
2529
|
+
if (changedFieldsInLastResetLoop.length) {
|
|
2530
|
+
changedFields.push(...changedFieldsInLastResetLoop);
|
|
2531
|
+
changedFieldsInLastResetLoop = [];
|
|
2465
2532
|
}
|
|
2466
|
-
if (
|
|
2533
|
+
if (didResetValues) {
|
|
2534
|
+
this._didValueChanges$.next(true);
|
|
2535
|
+
changedFieldsInLastResetLoop = changedFields;
|
|
2536
|
+
}
|
|
2537
|
+
currentUniqueChangedFields = [...new Set(changedFields)];
|
|
2538
|
+
}), switchMap(({ currentValue, previousValue }) => {
|
|
2539
|
+
if (changedFieldsInLastResetLoop.length)
|
|
2540
|
+
return of(null).pipe(map(() => ({ currentValue, previousValue })));
|
|
2541
|
+
const debounceValues = currentUniqueChangedFields.map((key) => {
|
|
2542
|
+
const fieldData = this._fields[key].data;
|
|
2543
|
+
if (fieldData.disableDebounceIfFalsy === true && !currentValue[key]) {
|
|
2544
|
+
return null;
|
|
2545
|
+
}
|
|
2546
|
+
return fieldData.debounce ?? null;
|
|
2547
|
+
});
|
|
2548
|
+
currentUniqueChangedFields = [];
|
|
2549
|
+
if (debounceValues.some((v) => v === null) || !debounceValues.length) {
|
|
2550
|
+
return of(null).pipe(map(() => ({ currentValue, previousValue })));
|
|
2551
|
+
}
|
|
2552
|
+
const shortestDebounceTime = Math.min(...debounceValues.filter((v) => v !== null));
|
|
2553
|
+
return timer(shortestDebounceTime).pipe(map(() => ({ currentValue, previousValue })));
|
|
2554
|
+
}), tap(({ currentValue, previousValue }) => {
|
|
2555
|
+
if (changedFieldsInLastResetLoop.length)
|
|
2467
2556
|
return;
|
|
2468
|
-
}
|
|
2469
2557
|
this._changes$.next({
|
|
2470
|
-
previousValue:
|
|
2471
|
-
currentValue:
|
|
2558
|
+
previousValue: previousValue ?? null,
|
|
2559
|
+
currentValue: currentValue,
|
|
2472
2560
|
});
|
|
2473
2561
|
}), takeUntil(this._destroy$), takeUntil(this._unobserveTrigger$))
|
|
2474
2562
|
.subscribe();
|
|
2475
2563
|
if (options?.syncOnNavigation !== false) {
|
|
2476
2564
|
this._routerStateService.queryParamChanges$
|
|
2477
|
-
.pipe(takeUntil(this._destroy$), takeUntil(this._unobserveTrigger$), tap((changes) =>
|
|
2565
|
+
.pipe(takeUntil(this._destroy$), takeUntil(this._unobserveTrigger$), tap((changes) => {
|
|
2566
|
+
const didValueChanges = this.setFormValueFromUrlQueryParams({ queryParams: changes });
|
|
2567
|
+
if (didValueChanges) {
|
|
2568
|
+
this._didValueChanges$.next(true);
|
|
2569
|
+
}
|
|
2570
|
+
}))
|
|
2478
2571
|
.subscribe();
|
|
2479
2572
|
}
|
|
2480
2573
|
}
|
|
@@ -2500,7 +2593,7 @@ class QueryForm {
|
|
|
2500
2593
|
if (equal(defaultValueForKeyToReset, currentValueForKeyToReset)) {
|
|
2501
2594
|
continue;
|
|
2502
2595
|
}
|
|
2503
|
-
this.form.controls[formFieldKey].setValue(defaultValueForKeyToReset);
|
|
2596
|
+
this.form.controls[formFieldKey].setValue(defaultValueForKeyToReset, { emitEvent: false });
|
|
2504
2597
|
didResetValues = true;
|
|
2505
2598
|
break;
|
|
2506
2599
|
}
|
|
@@ -2512,6 +2605,7 @@ class QueryForm {
|
|
|
2512
2605
|
this._unobserveTrigger$.next(true);
|
|
2513
2606
|
}
|
|
2514
2607
|
setFormValueFromUrlQueryParams(options) {
|
|
2608
|
+
let didValueChanges = false;
|
|
2515
2609
|
for (const [key, field] of Object.entries(this._fields)) {
|
|
2516
2610
|
const value = options.queryParams[key];
|
|
2517
2611
|
const valueDoesNotExist = value === undefined;
|
|
@@ -2519,15 +2613,27 @@ class QueryForm {
|
|
|
2519
2613
|
continue;
|
|
2520
2614
|
const valueGotRemoved = value === ET_PROPERTY_REMOVED;
|
|
2521
2615
|
if (valueGotRemoved) {
|
|
2522
|
-
field.setValue(this._getDefaultValue(key), {
|
|
2616
|
+
field.control.setValue(this._getDefaultValue(key), { emitEvent: false });
|
|
2617
|
+
didValueChanges = true;
|
|
2523
2618
|
continue;
|
|
2524
2619
|
}
|
|
2525
|
-
|
|
2620
|
+
let deserializedValue = value;
|
|
2621
|
+
if (field.data.queryParamToValueTransformFn) {
|
|
2622
|
+
deserializedValue = field.data.queryParamToValueTransformFn(value);
|
|
2623
|
+
}
|
|
2624
|
+
else if (typeof this._getDefaultValue(key) === 'number') {
|
|
2625
|
+
deserializedValue = transformToNumber(value);
|
|
2626
|
+
}
|
|
2627
|
+
else if (typeof this._getDefaultValue(key) === 'boolean') {
|
|
2628
|
+
deserializedValue = transformToBoolean(value);
|
|
2629
|
+
}
|
|
2526
2630
|
const valueIsEqualToCurrent = equal(deserializedValue, field.control.value);
|
|
2527
2631
|
if (valueIsEqualToCurrent)
|
|
2528
2632
|
continue;
|
|
2529
|
-
field.setValue(deserializedValue, {
|
|
2633
|
+
field.control.setValue(deserializedValue, { emitEvent: false });
|
|
2634
|
+
didValueChanges = true;
|
|
2530
2635
|
}
|
|
2636
|
+
return didValueChanges;
|
|
2531
2637
|
}
|
|
2532
2638
|
_getDefaultValue(key) {
|
|
2533
2639
|
const val = this._defaultValues[key];
|
|
@@ -2541,7 +2647,7 @@ class QueryForm {
|
|
|
2541
2647
|
return this._getDefaultValue(key) === normalizedValue;
|
|
2542
2648
|
}
|
|
2543
2649
|
_setupFormGroup() {
|
|
2544
|
-
const group = new
|
|
2650
|
+
const group = new FormGroup({});
|
|
2545
2651
|
for (const [key, field] of Object.entries(this._fields)) {
|
|
2546
2652
|
group.addControl(key, field.control);
|
|
2547
2653
|
}
|
|
@@ -2586,101 +2692,21 @@ class QueryForm {
|
|
|
2586
2692
|
});
|
|
2587
2693
|
});
|
|
2588
2694
|
}
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
const
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
}
|
|
2595
|
-
return null;
|
|
2596
|
-
};
|
|
2597
|
-
const transformToStringArray = (value) => {
|
|
2598
|
-
if (Array.isArray(value)) {
|
|
2599
|
-
return value.map(transformToString).filter(Boolean);
|
|
2600
|
-
}
|
|
2601
|
-
else if (typeof value === 'string') {
|
|
2602
|
-
return [transformToString(value)];
|
|
2603
|
-
}
|
|
2604
|
-
return null;
|
|
2605
|
-
};
|
|
2606
|
-
const transformToNumber = (value) => {
|
|
2607
|
-
if (typeof value === 'number') {
|
|
2608
|
-
return value;
|
|
2609
|
-
}
|
|
2610
|
-
if (typeof value === 'string') {
|
|
2611
|
-
return Number(value);
|
|
2612
|
-
}
|
|
2613
|
-
return null;
|
|
2614
|
-
};
|
|
2615
|
-
const transformToNumberArray = (value) => {
|
|
2616
|
-
if (Array.isArray(value)) {
|
|
2617
|
-
return value.map(transformToNumber).filter((item) => item !== null);
|
|
2618
|
-
}
|
|
2619
|
-
else if (typeof value === 'number') {
|
|
2620
|
-
return [value];
|
|
2621
|
-
}
|
|
2622
|
-
return null;
|
|
2623
|
-
};
|
|
2624
|
-
const transformToBoolean = (value) => {
|
|
2625
|
-
if (typeof value === 'boolean') {
|
|
2626
|
-
return value;
|
|
2627
|
-
}
|
|
2628
|
-
if (typeof value === 'string') {
|
|
2629
|
-
return value === 'true' || value === '1';
|
|
2630
|
-
}
|
|
2631
|
-
return null;
|
|
2632
|
-
};
|
|
2633
|
-
const transformToBooleanArray = (value) => {
|
|
2634
|
-
if (Array.isArray(value)) {
|
|
2635
|
-
return value.map(transformToBoolean).filter((item) => item !== null);
|
|
2636
|
-
}
|
|
2637
|
-
else if (typeof value === 'string' || typeof value === 'boolean') {
|
|
2638
|
-
return [transformToBoolean(value)];
|
|
2639
|
-
}
|
|
2640
|
-
return null;
|
|
2641
|
-
};
|
|
2642
|
-
const transformToDate = (value) => {
|
|
2643
|
-
if (value instanceof Date) {
|
|
2644
|
-
return value;
|
|
2645
|
-
}
|
|
2646
|
-
if (typeof value === 'string') {
|
|
2647
|
-
const date = new Date(value);
|
|
2648
|
-
if (isNaN(date.getTime())) {
|
|
2649
|
-
return null;
|
|
2695
|
+
_handleFormChange(forceOverwrite = false) {
|
|
2696
|
+
const currentVal = clone(this._currentFormValue$.value);
|
|
2697
|
+
const newVal = clone(this._formValue);
|
|
2698
|
+
if (equal(currentVal, newVal)) {
|
|
2699
|
+
return;
|
|
2650
2700
|
}
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
}
|
|
2659
|
-
else if (typeof value === 'string' || value instanceof Date) {
|
|
2660
|
-
return [transformToDate(value)];
|
|
2661
|
-
}
|
|
2662
|
-
return null;
|
|
2663
|
-
};
|
|
2664
|
-
const transformToSort = (value) => {
|
|
2665
|
-
if (typeof value === 'string') {
|
|
2666
|
-
const [active, direction] = value.split(':');
|
|
2667
|
-
return {
|
|
2668
|
-
active,
|
|
2669
|
-
direction: direction,
|
|
2670
|
-
};
|
|
2671
|
-
}
|
|
2672
|
-
return null;
|
|
2673
|
-
};
|
|
2674
|
-
const transformToSortQueryParam = (value) => {
|
|
2675
|
-
if (typeof value === 'string') {
|
|
2676
|
-
return value;
|
|
2677
|
-
}
|
|
2678
|
-
if (value && typeof value === 'object' && 'active' in value && 'direction' in value) {
|
|
2679
|
-
const valAsSort = value;
|
|
2680
|
-
return valAsSort.direction ? `${valAsSort.active}:${valAsSort.direction}` : null;
|
|
2701
|
+
if (forceOverwrite) {
|
|
2702
|
+
this._lastFormValue$.next(newVal);
|
|
2703
|
+
}
|
|
2704
|
+
else {
|
|
2705
|
+
this._lastFormValue$.next(currentVal);
|
|
2706
|
+
}
|
|
2707
|
+
this._currentFormValue$.next(newVal);
|
|
2681
2708
|
}
|
|
2682
|
-
|
|
2683
|
-
};
|
|
2709
|
+
}
|
|
2684
2710
|
|
|
2685
2711
|
const deepFreeze = (object) => {
|
|
2686
2712
|
// check if object is actually an object or frozen
|
|
@@ -2711,5 +2737,5 @@ const def = () => null;
|
|
|
2711
2737
|
* Generated bundle index. Do not edit.
|
|
2712
2738
|
*/
|
|
2713
2739
|
|
|
2714
|
-
export { BasicAuthProvider, BearerAuthProvider, CustomHeaderAuthProvider, EntityStore, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, QUERY_CLIENT_DEVTOOLS_TOKEN, Query, QueryClient, QueryCreator, QueryDevtoolsComponent, QueryDirective, QueryError, QueryField, QueryForm,
|
|
2740
|
+
export { BasicAuthProvider, BearerAuthProvider, CustomHeaderAuthProvider, EntityStore, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, QUERY_CLIENT_DEVTOOLS_TOKEN, Query, QueryClient, QueryCreator, QueryDevtoolsComponent, QueryDirective, QueryError, QueryField, QueryForm, QueryShortNamePipe, QueryStore, buildErrorMessage, buildGqlCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, createInfinityQueryConfig, createQueryCollection, decryptBearer, deepFreeze, def, detectContentTypeHeader, extractExpiresInSeconds, extractQuery, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, getDefaultHeaders, getResponseUrl, gql, hasHeader, ignoreAutoRefresh, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCustomHeaderAuthProvider, isEmptyString, isGqlQueryConfig, isNaN$1 as isNaN, isQuery, isQueryCollection, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyPagerfantaOutOfRangeError, mapToPaginated, mergeHeaders, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, pathParamsMissingInRouteFunctionError, provideQueryClientForDevtools, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, removeFrom, request, resetPageOnError, serializeBody, shouldCacheQuery, shouldRetryRequest, skipPaginationPageParamCalculator, switchQueryCollectionState, switchQueryState, takeUntilResponse, transformGql, transformMethod, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray };
|
|
2715
2741
|
//# sourceMappingURL=ethlete-query.mjs.map
|