@sumaris-net/ngx-components 2.6.21 → 2.6.22
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/esm2020/src/app/admin/users/users.mjs +2 -2
- package/esm2020/src/app/core/account/new-token.modal.mjs +19 -13
- package/esm2020/src/app/core/account/token.table.mjs +22 -18
- package/esm2020/src/app/core/graphql/graphql.service.mjs +29 -31
- package/esm2020/src/app/core/services/account.service.mjs +1 -2
- package/esm2020/src/app/core/services/config.service.mjs +10 -8
- package/esm2020/src/app/core/services/model/token.model.mjs +6 -2
- package/esm2020/src/app/core/services/network.service.mjs +55 -38
- package/esm2020/src/app/core/services/network.types.mjs +1 -1
- package/esm2020/src/app/core/services/platform.service.mjs +2 -1
- package/esm2020/src/app/shared/http/http.utils.mjs +15 -11
- package/esm2020/src/app/shared/services/memory-entity-service.class.mjs +6 -6
- package/esm2020/src/environments/environment.class.mjs +1 -1
- package/fesm2015/sumaris-net.ngx-components.mjs +126 -92
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +124 -92
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/account/new-token.modal.d.ts +1 -3
- package/src/app/core/account/token.table.d.ts +5 -3
- package/src/app/core/graphql/graphql.service.d.ts +20 -22
- package/src/app/core/services/model/token.model.d.ts +1 -0
- package/src/app/core/services/network.service.d.ts +11 -7
- package/src/app/shared/http/http.utils.d.ts +1 -0
- package/src/app/shared/services/memory-entity-service.class.d.ts +4 -2
- package/src/assets/manifest.json +1 -1
- package/src/environments/environment.class.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Directive, Injectable, EventEmitter, Output, Pipe, ChangeDetectorRef, forwardRef, Component, ChangeDetectionStrategy, Inject, Optional, Input, ViewChild, NgModule, HostBinding, HostListener, ElementRef, ViewChildren, CUSTOM_ELEMENTS_SCHEMA, ANIMATION_MODULE_TYPE, ViewEncapsulation, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import { __awaiter, __decorate, __param } from 'tslib';
|
|
4
|
-
import { firstValueFrom, shareReplay, tap, of, timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, from, noop as noop$9, Observable, forkJoin, defer, fromEventPattern, interval, combineLatest, mergeMap as mergeMap$1, EMPTY } from 'rxjs';
|
|
4
|
+
import { firstValueFrom, shareReplay, tap, of, timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, from, noop as noop$9, Observable, forkJoin, defer, timeout, fromEventPattern, interval, combineLatest, mergeMap as mergeMap$1, EMPTY } from 'rxjs';
|
|
5
5
|
import { catchError, filter, map, takeUntil, first, switchMap, tap as tap$1, debounceTime, startWith, distinctUntilChanged, mergeMap, throttleTime, skip, bufferWhen, mapTo, distinctUntilKeyChanged, take } from 'rxjs/operators';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
7
|
import { HttpEventType, HttpClient, HttpHeaders, HttpResponse, HttpClientModule } from '@angular/common/http';
|
|
@@ -15304,14 +15304,12 @@ class HttpUtils {
|
|
|
15304
15304
|
opts = opts || { responseType: 'text' };
|
|
15305
15305
|
// Force no cache
|
|
15306
15306
|
if (opts.nocache === true) {
|
|
15307
|
-
opts.headers =
|
|
15308
|
-
opts.headers
|
|
15309
|
-
.append('Cache-Control', 'no-cache')
|
|
15310
|
-
.append('Pragma', 'no-cache');
|
|
15307
|
+
opts.headers = opts.headers instanceof HttpHeaders ? opts.headers : new HttpHeaders(opts.headers);
|
|
15308
|
+
opts.headers.append('Cache-Control', 'no-cache').append('Pragma', 'no-cache');
|
|
15311
15309
|
}
|
|
15312
15310
|
// Use web http client
|
|
15313
15311
|
try {
|
|
15314
|
-
return
|
|
15312
|
+
return yield firstValueFrom(http.get(uri, Object.assign(Object.assign({}, opts), { responseType: 'text' })));
|
|
15315
15313
|
}
|
|
15316
15314
|
catch (err) {
|
|
15317
15315
|
if (err && err.message) {
|
|
@@ -15330,14 +15328,19 @@ class HttpUtils {
|
|
|
15330
15328
|
opts = opts || {};
|
|
15331
15329
|
// Force no cache
|
|
15332
15330
|
if (opts.nocache === true) {
|
|
15333
|
-
opts.headers =
|
|
15334
|
-
opts.headers
|
|
15335
|
-
.append('Cache-Control', 'no-cache')
|
|
15336
|
-
.append('Pragma', 'no-cache');
|
|
15331
|
+
opts.headers = opts.headers instanceof HttpHeaders ? opts.headers : new HttpHeaders(opts.headers);
|
|
15332
|
+
opts.headers.append('Cache-Control', 'no-cache').append('Pragma', 'no-cache');
|
|
15337
15333
|
}
|
|
15338
15334
|
// Use web http client
|
|
15339
15335
|
try {
|
|
15340
|
-
|
|
15336
|
+
let result;
|
|
15337
|
+
if (opts.timeout) {
|
|
15338
|
+
result = http.get(uri, Object.assign(Object.assign({}, opts), { responseType: 'json' })).pipe(timeout(opts === null || opts === void 0 ? void 0 : opts.timeout));
|
|
15339
|
+
}
|
|
15340
|
+
else {
|
|
15341
|
+
result = http.get(uri, Object.assign(Object.assign({}, opts), { responseType: 'json' }));
|
|
15342
|
+
}
|
|
15343
|
+
return yield firstValueFrom(result);
|
|
15341
15344
|
}
|
|
15342
15345
|
catch (err) {
|
|
15343
15346
|
if (err && err.message) {
|
|
@@ -15812,21 +15815,20 @@ const NetworkRefreshTimerPeriod = {
|
|
|
15812
15815
|
DESKTOP: 1000 * 60 * 5 /* every 5 min */,
|
|
15813
15816
|
};
|
|
15814
15817
|
const PEER_URL_REGEXP = /^(http|https):\/\/[^ "?#@]+$/;
|
|
15818
|
+
const NETWORK_DEFAULT_CONNECTION_TIMEOUT = 10000; // 10s - /!\ should be high (e.g. for poor connection)
|
|
15815
15819
|
/* -- DEV only (to debug refresh timer)
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
DESKTOP: 1000
|
|
15819
|
-
}*/
|
|
15820
|
+
NetworkRefreshTimerPeriod.MOBILE = 1000;
|
|
15821
|
+
NetworkRefreshTimerPeriod.DESKTOP = 1000; */
|
|
15820
15822
|
class NetworkService extends StartableObservableService {
|
|
15821
|
-
constructor(platform, modalCtrl, storage, settings, cache, http,
|
|
15823
|
+
constructor(_document, platform, modalCtrl, storage, settings, cache, http, environment, loggingService, network, translate, toastController) {
|
|
15822
15824
|
var _a;
|
|
15823
15825
|
super(platform);
|
|
15826
|
+
this._document = _document;
|
|
15824
15827
|
this.modalCtrl = modalCtrl;
|
|
15825
15828
|
this.storage = storage;
|
|
15826
15829
|
this.settings = settings;
|
|
15827
15830
|
this.cache = cache;
|
|
15828
15831
|
this.http = http;
|
|
15829
|
-
this._document = _document;
|
|
15830
15832
|
this.environment = environment;
|
|
15831
15833
|
this.loggingService = loggingService;
|
|
15832
15834
|
this.translate = translate;
|
|
@@ -15836,6 +15838,7 @@ class NetworkService extends StartableObservableService {
|
|
|
15836
15838
|
this.onResetNetworkCache = new EventEmitter(true);
|
|
15837
15839
|
this._listeners = {};
|
|
15838
15840
|
this._mobile = this.settings.mobile;
|
|
15841
|
+
this._connectionTimeout = environment.connectionTimeout || NETWORK_DEFAULT_CONNECTION_TIMEOUT;
|
|
15839
15842
|
this._logger = (_a = this.loggingService) === null || _a === void 0 ? void 0 : _a.getLogger('network');
|
|
15840
15843
|
if (this._mobile) {
|
|
15841
15844
|
this._timerRefreshPeriod = NetworkRefreshTimerPeriod.MOBILE;
|
|
@@ -15861,9 +15864,9 @@ class NetworkService extends StartableObservableService {
|
|
|
15861
15864
|
}
|
|
15862
15865
|
get connectionType() {
|
|
15863
15866
|
// If force offline: return 'none'
|
|
15864
|
-
return this._forceOffline
|
|
15867
|
+
return this._forceOffline ? 'none'
|
|
15865
15868
|
// Else, return device connection type (or unknown)
|
|
15866
|
-
|
|
15869
|
+
: (this.started && this._deviceConnectionType || 'unknown');
|
|
15867
15870
|
}
|
|
15868
15871
|
get peer() {
|
|
15869
15872
|
var _a;
|
|
@@ -15872,6 +15875,9 @@ class NetworkService extends StartableObservableService {
|
|
|
15872
15875
|
set peer(peer) {
|
|
15873
15876
|
this.restart(peer);
|
|
15874
15877
|
}
|
|
15878
|
+
get connectionTimeout() {
|
|
15879
|
+
return this._connectionTimeout;
|
|
15880
|
+
}
|
|
15875
15881
|
/**
|
|
15876
15882
|
* Register to network event
|
|
15877
15883
|
*
|
|
@@ -16000,7 +16006,7 @@ class NetworkService extends StartableObservableService {
|
|
|
16000
16006
|
* @param peer
|
|
16001
16007
|
* @param opts
|
|
16002
16008
|
*/
|
|
16003
|
-
checkPeerAlive(peer
|
|
16009
|
+
checkPeerAlive(peer) {
|
|
16004
16010
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16005
16011
|
peer = peer || this.peer;
|
|
16006
16012
|
if (!peer) {
|
|
@@ -16009,15 +16015,17 @@ class NetworkService extends StartableObservableService {
|
|
|
16009
16015
|
return undefined; // No peer define. Skip
|
|
16010
16016
|
peer = Peer.parseUrl(settings.peerUrl);
|
|
16011
16017
|
}
|
|
16012
|
-
return this.getNodeInfo(peer);
|
|
16018
|
+
return this.getNodeInfo(peer, { nocache: true, timeout: this._connectionTimeout });
|
|
16013
16019
|
});
|
|
16014
16020
|
}
|
|
16015
16021
|
checkPeerCompatible(peerInfo, opts) {
|
|
16016
16022
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16023
|
+
if (!peerInfo)
|
|
16024
|
+
return false; // Peer cannot be reached
|
|
16017
16025
|
if (!this.environment.peerMinVersion)
|
|
16018
16026
|
return true; // Skip compatibility check
|
|
16019
16027
|
// Check the min pod version, defined by the app
|
|
16020
|
-
const isCompatible = peerInfo
|
|
16028
|
+
const isCompatible = peerInfo.softwareVersion && VersionUtils.isCompatible(this.environment.peerMinVersion, peerInfo.softwareVersion);
|
|
16021
16029
|
// Display toast, if not compatible
|
|
16022
16030
|
if (!isCompatible && (!opts || opts.showToast !== false)) {
|
|
16023
16031
|
yield this.showToast({
|
|
@@ -16032,19 +16040,19 @@ class NetworkService extends StartableObservableService {
|
|
|
16032
16040
|
return isCompatible;
|
|
16033
16041
|
});
|
|
16034
16042
|
}
|
|
16035
|
-
getNodeInfo(peer) {
|
|
16043
|
+
getNodeInfo(peer, opts) {
|
|
16036
16044
|
var _a, _b, _c;
|
|
16037
16045
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16038
16046
|
const path = this.computePeerPath(peer, '/api/node/info');
|
|
16039
|
-
(_a = this._logger) === null || _a === void 0 ? void 0 : _a.debug('
|
|
16047
|
+
(_a = this._logger) === null || _a === void 0 ? void 0 : _a.debug('getNodeInfo', `Getting '${path}' ...`);
|
|
16040
16048
|
try {
|
|
16041
|
-
const data = yield this.get(path);
|
|
16042
|
-
(_b = this._logger) === null || _b === void 0 ? void 0 : _b.debug('
|
|
16049
|
+
const data = yield this.get(path, opts);
|
|
16050
|
+
(_b = this._logger) === null || _b === void 0 ? void 0 : _b.debug('getNodeInfo', `Response of '${path}':\n${JSON.stringify(data)}`);
|
|
16043
16051
|
return data;
|
|
16044
16052
|
}
|
|
16045
16053
|
catch (err) {
|
|
16046
16054
|
console.debug(`[network] Error while getting '${path}': ${err && err.message || err}`, err);
|
|
16047
|
-
(_c = this._logger) === null || _c === void 0 ? void 0 : _c.error('
|
|
16055
|
+
(_c = this._logger) === null || _c === void 0 ? void 0 : _c.error('getNodeInfo', `Error while getting '${path}': ${(err === null || err === void 0 ? void 0 : err.message) || ''}`);
|
|
16048
16056
|
return undefined;
|
|
16049
16057
|
}
|
|
16050
16058
|
});
|
|
@@ -16168,13 +16176,30 @@ class NetworkService extends StartableObservableService {
|
|
|
16168
16176
|
console.info('[network] Starting network...');
|
|
16169
16177
|
// Restoring local settings
|
|
16170
16178
|
peer = peer || (yield this.restoreLocally());
|
|
16171
|
-
|
|
16172
|
-
|
|
16179
|
+
if (!peer) {
|
|
16180
|
+
// Make sure to hide the splashscreen, before open the modal
|
|
16173
16181
|
yield SplashScreen.hide();
|
|
16174
|
-
|
|
16175
|
-
|
|
16176
|
-
|
|
16177
|
-
|
|
16182
|
+
// No peer in settings: ask user to choose
|
|
16183
|
+
while (!peer) {
|
|
16184
|
+
console.debug('[network] No peer defined. Asking user to choose a peer.');
|
|
16185
|
+
peer = yield this.showSelectPeerModal({ allowSelectDownPeer: false });
|
|
16186
|
+
}
|
|
16187
|
+
}
|
|
16188
|
+
else if (this.online) {
|
|
16189
|
+
// Check if alive. If not, force offline mode
|
|
16190
|
+
const alive = yield this.checkPeerAlive(peer);
|
|
16191
|
+
if (!alive) {
|
|
16192
|
+
// Peer not alive, but should be at the same URL, retrying each 1s
|
|
16193
|
+
if (this.environment.sameUrlPeer) {
|
|
16194
|
+
const retryMs = this._connectionTimeout > 0 ? this._connectionTimeout : 1000;
|
|
16195
|
+
yield firstValueFrom(timer(retryMs, retryMs)
|
|
16196
|
+
.pipe(takeUntil(this.stopSubject), tap$1(() => console.warn(`[network-service] Waiting peer be be alive, at {${peer.url}} ...`)), mergeMap(() => this.checkPeerAlive(peer)), filter(alive => !!alive), first()));
|
|
16197
|
+
}
|
|
16198
|
+
else {
|
|
16199
|
+
// Continue, in offline mode
|
|
16200
|
+
this.setForceOffline(true);
|
|
16201
|
+
}
|
|
16202
|
+
}
|
|
16178
16203
|
}
|
|
16179
16204
|
console.info(`[network] Starting service [OK] {peer: '${peer.url}', online: ${this.online}}`);
|
|
16180
16205
|
return peer;
|
|
@@ -16205,6 +16230,7 @@ class NetworkService extends StartableObservableService {
|
|
|
16205
16230
|
* Try to restore peer from the local storage
|
|
16206
16231
|
*/
|
|
16207
16232
|
restoreLocally() {
|
|
16233
|
+
var _a, _b;
|
|
16208
16234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16209
16235
|
// Restore from storage
|
|
16210
16236
|
let settings = yield this.storage.get(SETTINGS_STORAGE_KEY);
|
|
@@ -16217,19 +16243,14 @@ class NetworkService extends StartableObservableService {
|
|
|
16217
16243
|
if (this.environment.defaultPeer) {
|
|
16218
16244
|
return Peer.fromObject(this.environment.defaultPeer);
|
|
16219
16245
|
}
|
|
16220
|
-
// Else, if App is hosted, try the
|
|
16221
|
-
const location = this._document
|
|
16222
|
-
if (location
|
|
16246
|
+
// Else, if App is hosted, try the website as a peer
|
|
16247
|
+
const location = (_a = this._document) === null || _a === void 0 ? void 0 : _a.location;
|
|
16248
|
+
if ((_b = location === null || location === void 0 ? void 0 : location.protocol) === null || _b === void 0 ? void 0 : _b.startsWith('http')) {
|
|
16223
16249
|
const hostname = this._document.location.host;
|
|
16224
16250
|
const detectedPeer = Peer.parseUrl(`${this._document.location.protocol}${hostname}${this.environment.baseUrl}`);
|
|
16225
|
-
if (yield this.checkPeerAlive(detectedPeer)) {
|
|
16251
|
+
if (this.environment.sameUrlPeer || (yield this.checkPeerAlive(detectedPeer))) {
|
|
16226
16252
|
return detectedPeer;
|
|
16227
16253
|
}
|
|
16228
|
-
// Peer not alive, but should be at the same URL, retrying each 1s
|
|
16229
|
-
if (this.environment.sameUrlPeer) {
|
|
16230
|
-
return yield timer(1000, 1000)
|
|
16231
|
-
.pipe(takeUntil(this.stopSubject), tap$1(() => console.warn(`[network-service] Waiting peer be be alive, at {${detectedPeer.url}} ...`)), mergeMap(() => this.checkPeerAlive(detectedPeer)), filter(alive => !!alive), map(() => detectedPeer), first()).toPromise();
|
|
16232
|
-
}
|
|
16233
16254
|
}
|
|
16234
16255
|
return undefined;
|
|
16235
16256
|
});
|
|
@@ -16262,7 +16283,7 @@ class NetworkService extends StartableObservableService {
|
|
|
16262
16283
|
// Checkin if peer alive
|
|
16263
16284
|
tap$1(() => console.debug('[network] Checking connection to pod...')), mergeMap(() => this.checkPeerAlive(this.peer)),
|
|
16264
16285
|
// Filter to keep only changes
|
|
16265
|
-
filter(info =>
|
|
16286
|
+
filter(info => !equals(info, lastInfo)), tap$1(info => lastInfo = info),
|
|
16266
16287
|
// Check compatibility
|
|
16267
16288
|
mergeMap((info) => this.checkPeerCompatible(info, { showToast: true })))
|
|
16268
16289
|
.subscribe(alive => {
|
|
@@ -16370,16 +16391,16 @@ class NetworkService extends StartableObservableService {
|
|
|
16370
16391
|
});
|
|
16371
16392
|
}
|
|
16372
16393
|
}
|
|
16373
|
-
NetworkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NetworkService, deps: [{ token: i2$1.Platform }, { token: i2$1.ModalController }, { token: i2$3.Storage }, { token: LocalSettingsService }, { token: i4$1.CacheService }, { token: i2.HttpClient }, { token:
|
|
16394
|
+
NetworkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NetworkService, deps: [{ token: DOCUMENT }, { token: i2$1.Platform }, { token: i2$1.ModalController }, { token: i2$3.Storage }, { token: LocalSettingsService }, { token: i4$1.CacheService }, { token: i2.HttpClient }, { token: ENVIRONMENT }, { token: APP_LOGGING_SERVICE, optional: true }, { token: i6$4.Network, optional: true }, { token: i1$1.TranslateService, optional: true }, { token: i2$1.ToastController, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16374
16395
|
NetworkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NetworkService, providedIn: 'root' });
|
|
16375
16396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NetworkService, decorators: [{
|
|
16376
16397
|
type: Injectable,
|
|
16377
16398
|
args: [{ providedIn: 'root' }]
|
|
16378
16399
|
}], ctorParameters: function () {
|
|
16379
|
-
return [{ type:
|
|
16400
|
+
return [{ type: undefined, decorators: [{
|
|
16380
16401
|
type: Inject,
|
|
16381
16402
|
args: [DOCUMENT]
|
|
16382
|
-
}] }, { type: Environment, decorators: [{
|
|
16403
|
+
}] }, { type: i2$1.Platform }, { type: i2$1.ModalController }, { type: i2$3.Storage }, { type: LocalSettingsService }, { type: i4$1.CacheService }, { type: i2.HttpClient }, { type: Environment, decorators: [{
|
|
16383
16404
|
type: Inject,
|
|
16384
16405
|
args: [ENVIRONMENT]
|
|
16385
16406
|
}] }, { type: undefined, decorators: [{
|
|
@@ -16807,6 +16828,10 @@ let UserToken = UserToken_1 = class UserToken extends Entity {
|
|
|
16807
16828
|
this.lastUsedDate = null;
|
|
16808
16829
|
this.creationDate = null;
|
|
16809
16830
|
}
|
|
16831
|
+
static equals(t1, t2) {
|
|
16832
|
+
return (isNotNil(t1.id) && t1.id === (t2 === null || t2 === void 0 ? void 0 : t2.id))
|
|
16833
|
+
|| (t1 && (t1.pubkey && t1.pubkey === (t2 === null || t2 === void 0 ? void 0 : t2.pubkey)) && (t1.name === (t2 === null || t2 === void 0 ? void 0 : t2.name)));
|
|
16834
|
+
}
|
|
16810
16835
|
asObject(opts) {
|
|
16811
16836
|
const target = super.asObject(opts);
|
|
16812
16837
|
target.expirationDate = toDateISOString(this.expirationDate);
|
|
@@ -17235,14 +17260,13 @@ const loggerLink = unwrapESModule(loggerLinkImported);
|
|
|
17235
17260
|
const APP_GRAPHQL_TYPE_POLICIES = new InjectionToken('graphqlTypePolicies');
|
|
17236
17261
|
const APP_GRAPHQL_FRAGMENTS = new InjectionToken('graphqlFragments');
|
|
17237
17262
|
class GraphqlService extends StartableService {
|
|
17238
|
-
constructor(platform, apollo, httpLink, network, storage,
|
|
17263
|
+
constructor(platform, apollo, httpLink, network, storage, environment, typePolicies, fragments) {
|
|
17239
17264
|
super(platform); // Wait platform
|
|
17240
17265
|
this.platform = platform;
|
|
17241
17266
|
this.apollo = apollo;
|
|
17242
17267
|
this.httpLink = httpLink;
|
|
17243
17268
|
this.network = network;
|
|
17244
17269
|
this.storage = storage;
|
|
17245
|
-
this.cryptoService = cryptoService;
|
|
17246
17270
|
this.environment = environment;
|
|
17247
17271
|
this.typePolicies = typePolicies;
|
|
17248
17272
|
this.fragments = fragments;
|
|
@@ -17375,14 +17399,14 @@ class GraphqlService extends StartableService {
|
|
|
17375
17399
|
return res.data;
|
|
17376
17400
|
}
|
|
17377
17401
|
}
|
|
17378
|
-
const res = yield this.apollo.mutate({
|
|
17402
|
+
const res = yield firstValueFrom(this.apollo.mutate({
|
|
17379
17403
|
mutation: opts.mutation,
|
|
17380
17404
|
variables: opts.variables,
|
|
17381
17405
|
context: opts.context,
|
|
17382
17406
|
optimisticResponse: opts.optimisticResponse,
|
|
17383
17407
|
update: opts.update
|
|
17384
17408
|
})
|
|
17385
|
-
.pipe(catchError(error => this.onApolloError(error, opts.error)), first())
|
|
17409
|
+
.pipe(catchError(error => this.onApolloError(error, opts.error)), first()));
|
|
17386
17410
|
if (Array.isArray(res.errors)) {
|
|
17387
17411
|
throw res.errors[0];
|
|
17388
17412
|
}
|
|
@@ -17860,6 +17884,7 @@ class GraphqlService extends StartableService {
|
|
|
17860
17884
|
return of(this.toApolloError(err, defaultError));
|
|
17861
17885
|
}
|
|
17862
17886
|
toApolloError(err, defaultError) {
|
|
17887
|
+
var _a;
|
|
17863
17888
|
let error =
|
|
17864
17889
|
// If network error: try to convert to App (read as JSON), or create an UNKNOWN_NETWORK_ERROR
|
|
17865
17890
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
@@ -17873,7 +17898,7 @@ class GraphqlService extends StartableService {
|
|
|
17873
17898
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
17874
17899
|
|| err;
|
|
17875
17900
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
17876
|
-
if (error
|
|
17901
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === ErrorCodes.UNKNOWN_NETWORK_ERROR && ((_a = err.networkError) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
17877
17902
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
17878
17903
|
this.onNetworkError.next(error);
|
|
17879
17904
|
}
|
|
@@ -17955,7 +17980,7 @@ class GraphqlService extends StartableService {
|
|
|
17955
17980
|
return undefined;
|
|
17956
17981
|
}
|
|
17957
17982
|
}
|
|
17958
|
-
GraphqlService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GraphqlService, deps: [{ token: i2$1.Platform }, { token: i2$6.Apollo }, { token: i3$1.HttpLink }, { token: NetworkService }, { token: StorageService }, { token:
|
|
17983
|
+
GraphqlService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GraphqlService, deps: [{ token: i2$1.Platform }, { token: i2$6.Apollo }, { token: i3$1.HttpLink }, { token: NetworkService }, { token: StorageService }, { token: ENVIRONMENT }, { token: APP_GRAPHQL_TYPE_POLICIES, optional: true }, { token: APP_GRAPHQL_FRAGMENTS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17959
17984
|
GraphqlService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GraphqlService, providedIn: 'root' });
|
|
17960
17985
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GraphqlService, decorators: [{
|
|
17961
17986
|
type: Injectable,
|
|
@@ -17963,7 +17988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
17963
17988
|
providedIn: 'root'
|
|
17964
17989
|
}]
|
|
17965
17990
|
}], ctorParameters: function () {
|
|
17966
|
-
return [{ type: i2$1.Platform }, { type: i2$6.Apollo }, { type: i3$1.HttpLink }, { type: NetworkService }, { type: StorageService }, { type:
|
|
17991
|
+
return [{ type: i2$1.Platform }, { type: i2$6.Apollo }, { type: i3$1.HttpLink }, { type: NetworkService }, { type: StorageService }, { type: Environment, decorators: [{
|
|
17967
17992
|
type: Inject,
|
|
17968
17993
|
args: [ENVIRONMENT]
|
|
17969
17994
|
}] }, { type: undefined, decorators: [{
|
|
@@ -18319,7 +18344,6 @@ const Fragments = {
|
|
|
18319
18344
|
token: gql `fragment UserTokenFragment on UserTokenVO {
|
|
18320
18345
|
id
|
|
18321
18346
|
pubkey
|
|
18322
|
-
token
|
|
18323
18347
|
name
|
|
18324
18348
|
flags
|
|
18325
18349
|
expirationDate
|
|
@@ -19811,13 +19835,15 @@ class ConfigService extends BaseGraphqlService {
|
|
|
19811
19835
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19812
19836
|
let data;
|
|
19813
19837
|
let wasJustLoaded = false;
|
|
19814
|
-
|
|
19815
|
-
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19838
|
+
if (this.network.online) {
|
|
19839
|
+
try {
|
|
19840
|
+
data = yield this.loadDefault({ fetchPolicy: 'network-only' });
|
|
19841
|
+
wasJustLoaded = true;
|
|
19842
|
+
}
|
|
19843
|
+
catch (err) {
|
|
19844
|
+
// Log, then continue
|
|
19845
|
+
console.error(err && err.message || err, err);
|
|
19846
|
+
}
|
|
19821
19847
|
}
|
|
19822
19848
|
// Save it into local storage, for next startup
|
|
19823
19849
|
if (data) {
|
|
@@ -20119,6 +20145,7 @@ class PlatformService extends StartableService {
|
|
|
20119
20145
|
)
|
|
20120
20146
|
.subscribe(type => this.configureCache(type !== 'none')));
|
|
20121
20147
|
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, capacitor: ${this._capacitor}, web: ${this.isWeb()}, downloader: ${this.canDownload}} in ${Date.now() - now}ms`);
|
|
20148
|
+
// Pass auth token
|
|
20122
20149
|
this.registerSubscription(this.configService.config
|
|
20123
20150
|
.subscribe(config => {
|
|
20124
20151
|
if (!config)
|
|
@@ -23414,7 +23441,7 @@ class InMemoryEntitiesService extends StartableObservableService {
|
|
|
23414
23441
|
return undefined;
|
|
23415
23442
|
});
|
|
23416
23443
|
this._startByReadyFunction = false; // Need setValue() to be called, to start the service
|
|
23417
|
-
this.
|
|
23444
|
+
this.sortByReplacement = Object.assign({}, options.sortByReplacement);
|
|
23418
23445
|
}
|
|
23419
23446
|
set value(data) {
|
|
23420
23447
|
this.setValue(data);
|
|
@@ -23522,9 +23549,9 @@ class InMemoryEntitiesService extends StartableObservableService {
|
|
|
23522
23549
|
else {
|
|
23523
23550
|
excludedDataByPagination = (size > 0 && ((offset + size) < data.length))
|
|
23524
23551
|
// Slice using limit to size
|
|
23525
|
-
? data.slice(0, offset
|
|
23552
|
+
? data.slice(0, offset).concat(data.slice(offset + size))
|
|
23526
23553
|
// Slice without limit
|
|
23527
|
-
: data.slice(0, offset
|
|
23554
|
+
: data.slice(0, offset);
|
|
23528
23555
|
data = (size > 0 && ((offset + size) < data.length))
|
|
23529
23556
|
// Slice using limit to size
|
|
23530
23557
|
? data.slice(offset, offset + size)
|
|
@@ -23628,7 +23655,7 @@ class InMemoryEntitiesService extends StartableObservableService {
|
|
|
23628
23655
|
// Make sure to fill sortBy BEFORE checking in the replacement map
|
|
23629
23656
|
sortBy = sortBy || 'id';
|
|
23630
23657
|
// Replace sortBy, using the replacement map
|
|
23631
|
-
sortBy = this.
|
|
23658
|
+
sortBy = this.sortByReplacement[sortBy] || sortBy;
|
|
23632
23659
|
// Execute the sort
|
|
23633
23660
|
return EntityUtils.sort(data, sortBy, sortDirection);
|
|
23634
23661
|
}
|
|
@@ -23636,7 +23663,7 @@ class InMemoryEntitiesService extends StartableObservableService {
|
|
|
23636
23663
|
return EntityFilterUtils.fromObject(source, this.filterType);
|
|
23637
23664
|
}
|
|
23638
23665
|
addSortByReplacement(source, target) {
|
|
23639
|
-
this.
|
|
23666
|
+
this.sortByReplacement[source] = target;
|
|
23640
23667
|
}
|
|
23641
23668
|
equals(d1, d2) {
|
|
23642
23669
|
if (this._equalsFn)
|
|
@@ -32103,12 +32130,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
32103
32130
|
}] } });
|
|
32104
32131
|
|
|
32105
32132
|
class NewTokenModal extends AppEntityEditorModal {
|
|
32106
|
-
constructor(injector,
|
|
32133
|
+
constructor(injector, validator, accountService) {
|
|
32107
32134
|
super(injector, UserToken, { tabCount: 1 });
|
|
32108
32135
|
this.injector = injector;
|
|
32109
|
-
this.translate = translate;
|
|
32110
32136
|
this.validator = validator;
|
|
32111
32137
|
this.accountService = accountService;
|
|
32138
|
+
this.translate = injector.get(TranslateService);
|
|
32139
|
+
this.toastController = injector.get(ToastController);
|
|
32112
32140
|
this.tokenForm = validator.getFormGroup();
|
|
32113
32141
|
this.tokenAppForm = new AppForm(this.injector, this.tokenForm);
|
|
32114
32142
|
}
|
|
@@ -32179,7 +32207,9 @@ class NewTokenModal extends AppEntityEditorModal {
|
|
|
32179
32207
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32180
32208
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
32181
32209
|
yield Clipboard.write({ string: this.form.value.token });
|
|
32182
|
-
this.
|
|
32210
|
+
yield Toasts.show(this.toastController, this.translate, {
|
|
32211
|
+
type: 'info', message: 'ACCOUNT.TOKENS.CREATE.COPIED'
|
|
32212
|
+
});
|
|
32183
32213
|
});
|
|
32184
32214
|
}
|
|
32185
32215
|
getFlags(scopes) {
|
|
@@ -32190,29 +32220,31 @@ class NewTokenModal extends AppEntityEditorModal {
|
|
|
32190
32220
|
return flags;
|
|
32191
32221
|
}
|
|
32192
32222
|
}
|
|
32193
|
-
NewTokenModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NewTokenModal, deps: [{ token: i0.Injector }, { token:
|
|
32194
|
-
NewTokenModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NewTokenModal, selector: "app-new-token-modal", inputs: { tokenScopes: "tokenScopes", existingNames: "existingNames" }, usesInheritance: true, ngImport: i0, template: "<app-modal-toolbar modalName=\"NewTokenModal\"\n [title]=\"$title | async\"\n [color]=\"'secondary'\"\n [showSpinner]=\"loading\"\n [canValidate]=\"!loading && valid\"\n (cancel)=\"close($event)\"\n (validate)=\"saveAndClose($event)\"\n></app-modal-toolbar>\n\n<ion-content>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" lines=\"none\" class=\"ion-padding\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error | translate\"></ion-label>\n </ion-item>\n\n <h6 class=\"ion-padding\">{{ 'ACCOUNT.TOKENS.CREATE.DESCRIPTION' | translate }}</h6>\n\n <form class=\"form-container ion-no-padding\" [formGroup]=\"tokenForm\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <mat-form-field>\n <input matInput\n [appAutofocus]=\"true\"\n [autofocusDelay]=\"500\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.NAME'|translate\"\n formControlName=\"name\"\n autocomplete=\"off\"\n required\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n >\n <mat-error *ngIf=\"form.controls.name.hasError('required') && form.controls.name.dirty\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"form.controls.name.hasError('notAlreadyExists') && form.controls.name.dirty\" translate>ACCOUNT.TOKENS.CREATE.NAME_ALREADY_EXISTS</mat-error>\n </mat-form-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-chips-field\n formControlName=\"scopes\"\n appearance=\"legacy\"\n chipColor=\"primary\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.SCOPES' | translate\"\n [config]=\"tokenConfig\"\n [mobile]=\"mobile\"\n [debug]=\"false\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n ></mat-chips-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-date-field\n formControlName=\"expirationDate\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.EXPIRATION_DATE' | translate\"\n [mobile]=\"mobile\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n ></mat-date-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <ion-button\n *ngIf=\"tokenForm | formGetValue: 'token' | isNilOrBlank; else showToken\"\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_GENERATE_TITLE' | translate\"\n (click)=\"generate($event)\"\n [disabled]=\"tokenForm.invalid\"\n >\n {{ 'ACCOUNT.TOKENS.CREATE.BTN_GENERATE' | translate}}\n </ion-button>\n <ng-template #showToken>\n <h6>{{ 'ACCOUNT.TOKENS.CREATE.COPY_HELP' | translate }}</h6>\n <ion-text style=\"display: block; background-color: lightgray\">{{ tokenForm | formGetValue: 'token' }}</ion-text>\n <button\n mat-icon-button\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_COPY_TITLE' | translate\"\n (click)=\"copy($event)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n <ion-text>{{ copiedLabel | translate }}</ion-text>\n </ng-template>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n\n<ion-footer hidden-xs hidden-sm hidden-mobile>\n\n <ion-toolbar>\n <ion-row class=\"ion-no-padding\" nowrap>\n <ion-col>\n <ng-content></ng-content>\n </ion-col>\n\n <ion-col size=\"auto\">\n\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"close($event)\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n\n <ion-button [fill]=\"invalid ? 'clear' : 'solid'\"\n [disabled]=\"disabled || loading || invalid\"\n (click)=\"saveAndClose($event)\"\n (keyup.enter)=\"saveAndClose($event)\"\n color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n\n</ion-footer>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: MatDate, selector: "mat-date-field", inputs: ["mobile", "formControl", "formControlName", "placeholder", "floatLabel", "appearance", "required", "compact", "placeholderChar", "autofocus", "startDate", "clearable", "timezone", "datePickerFilter", "readonly", "tabindex"] }, { kind: "component", type: MatChipsField, selector: "mat-chips-field", inputs: ["equals", "logPrefix", "formControl", "formControlName", "floatLabel", "appearance", "placeholder", "suggestFn", "required", "mobile", "readonly", "clearable", "debounceTime", "displayWith", "displayAttributes", "displayColumnSizes", "displayColumnNames", "highlightAccent", "showAllOnFocus", "showPanelOnFocus", "autofocus", "config", "i18nPrefix", "noResultMessage", "class", "panelWidth", "matAutocompletePosition", "itemSize", "fetchMoreThreshold", "suggestLengthThreshold", "showLoadingSpinner", "chipColor", "debug", "filter", "tabindex", "items"], outputs: ["click", "blur", "focus", "dropButtonClick", "keydown.escape", "keyup.enter"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: ModalToolbarComponent, selector: "app-modal-toolbar", inputs: ["modalName", "title", "color", "showSpinner", "canValidate", "validateIcon"], outputs: ["cancel", "validate"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: IsNilOrBlankPipe, name: "isNilOrBlank" }, { kind: "pipe", type: IsNotNilOrBlankPipe, name: "isNotNilOrBlank" }, { kind: "pipe", type: FormGetValuePipe, name: "formGetValue" }] });
|
|
32223
|
+
NewTokenModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NewTokenModal, deps: [{ token: i0.Injector }, { token: UserTokenValidatorService }, { token: AccountService }], target: i0.ɵɵFactoryTarget.Component });
|
|
32224
|
+
NewTokenModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NewTokenModal, selector: "app-new-token-modal", inputs: { tokenScopes: "tokenScopes", existingNames: "existingNames" }, usesInheritance: true, ngImport: i0, template: "<app-modal-toolbar modalName=\"NewTokenModal\"\n [title]=\"$title | async\"\n [color]=\"'secondary'\"\n [showSpinner]=\"loading\"\n [canValidate]=\"!loading && valid\"\n (cancel)=\"close($event)\"\n (validate)=\"saveAndClose($event)\"\n></app-modal-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error | translate\"></ion-label>\n </ion-item>\n\n <p><b translate>ACCOUNT.TOKENS.CREATE.DESCRIPTION</b></p>\n\n <form class=\"form-container\" [formGroup]=\"tokenForm\">\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-form-field>\n <input matInput\n [appAutofocus]=\"true\"\n [autofocusDelay]=\"500\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.NAME'|translate\"\n formControlName=\"name\"\n autocomplete=\"off\"\n required\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n >\n <mat-error *ngIf=\"form.controls.name.hasError('required') && form.controls.name.touched\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"form.controls.name.hasError('notAlreadyExists') && form.controls.name.touched\" translate>ACCOUNT.TOKENS.CREATE.NAME_ALREADY_EXISTS</mat-error>\n </mat-form-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-chips-field\n formControlName=\"scopes\"\n appearance=\"legacy\"\n chipColor=\"primary\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.SCOPES' | translate\"\n [config]=\"tokenConfig\"\n [mobile]=\"mobile\"\n [debug]=\"false\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n >\n <mat-error *ngIf=\"form.controls.name.hasError('notEmptyArray') && form.controls.name.touched\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-chips-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-date-field\n formControlName=\"expirationDate\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.EXPIRATION_DATE' | translate\"\n [mobile]=\"mobile\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n ></mat-date-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <ion-button\n *ngIf=\"tokenForm | formGetValue: 'token' | isNilOrBlank; else showToken\"\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_GENERATE_TITLE' | translate\"\n (click)=\"generate($event)\"\n [disabled]=\"tokenForm.invalid\"\n >\n {{ 'ACCOUNT.TOKENS.CREATE.BTN_GENERATE' | translate}}\n </ion-button>\n <ng-template #showToken>\n <p><b translate>ACCOUNT.TOKENS.CREATE.COPY_HELP</b></p>\n <mat-form-field>\n <textarea matInput formControlName=\"token\" readonly style=\"height: auto; background-color: lightgray;\" rows=\"4\"></textarea>\n <button matSuffix\n mat-icon-button\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_COPY_TITLE' | translate\"\n (click)=\"copy($event)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </mat-form-field>\n </ng-template>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n\n<ion-footer hidden-xs hidden-sm hidden-mobile>\n\n <ion-toolbar>\n <ion-row class=\"ion-no-padding\" nowrap>\n <ion-col>\n <ng-content></ng-content>\n </ion-col>\n\n <ion-col size=\"auto\">\n\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"close($event)\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n\n <ion-button [fill]=\"invalid ? 'clear' : 'solid'\"\n [disabled]=\"disabled || loading || invalid\"\n (click)=\"saveAndClose($event)\"\n (keyup.enter)=\"saveAndClose($event)\"\n color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n\n</ion-footer>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonGrid, selector: "ion-grid", inputs: ["fixed"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: MatDate, selector: "mat-date-field", inputs: ["mobile", "formControl", "formControlName", "placeholder", "floatLabel", "appearance", "required", "compact", "placeholderChar", "autofocus", "startDate", "clearable", "timezone", "datePickerFilter", "readonly", "tabindex"] }, { kind: "component", type: MatChipsField, selector: "mat-chips-field", inputs: ["equals", "logPrefix", "formControl", "formControlName", "floatLabel", "appearance", "placeholder", "suggestFn", "required", "mobile", "readonly", "clearable", "debounceTime", "displayWith", "displayAttributes", "displayColumnSizes", "displayColumnNames", "highlightAccent", "showAllOnFocus", "showPanelOnFocus", "autofocus", "config", "i18nPrefix", "noResultMessage", "class", "panelWidth", "matAutocompletePosition", "itemSize", "fetchMoreThreshold", "suggestLengthThreshold", "showLoadingSpinner", "chipColor", "debug", "filter", "tabindex", "items"], outputs: ["click", "blur", "focus", "dropButtonClick", "keydown.escape", "keyup.enter"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus], input[appAutofocus]", inputs: ["appAutofocus", "autofocusDelay"] }, { kind: "component", type: ModalToolbarComponent, selector: "app-modal-toolbar", inputs: ["modalName", "title", "color", "showSpinner", "canValidate", "validateIcon"], outputs: ["cancel", "validate"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: IsNilOrBlankPipe, name: "isNilOrBlank" }, { kind: "pipe", type: IsNotNilOrBlankPipe, name: "isNotNilOrBlank" }, { kind: "pipe", type: FormGetValuePipe, name: "formGetValue" }] });
|
|
32195
32225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NewTokenModal, decorators: [{
|
|
32196
32226
|
type: Component,
|
|
32197
|
-
args: [{ selector: 'app-new-token-modal', template: "<app-modal-toolbar modalName=\"NewTokenModal\"\n [title]=\"$title | async\"\n [color]=\"'secondary'\"\n [showSpinner]=\"loading\"\n [canValidate]=\"!loading && valid\"\n (cancel)=\"close($event)\"\n (validate)=\"saveAndClose($event)\"\n></app-modal-toolbar>\n\n<ion-content>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" lines=\"none\"
|
|
32198
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type:
|
|
32227
|
+
args: [{ selector: 'app-new-token-modal', template: "<app-modal-toolbar modalName=\"NewTokenModal\"\n [title]=\"$title | async\"\n [color]=\"'secondary'\"\n [showSpinner]=\"loading\"\n [canValidate]=\"!loading && valid\"\n (cancel)=\"close($event)\"\n (validate)=\"saveAndClose($event)\"\n></app-modal-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error | translate\"></ion-label>\n </ion-item>\n\n <p><b translate>ACCOUNT.TOKENS.CREATE.DESCRIPTION</b></p>\n\n <form class=\"form-container\" [formGroup]=\"tokenForm\">\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-form-field>\n <input matInput\n [appAutofocus]=\"true\"\n [autofocusDelay]=\"500\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.NAME'|translate\"\n formControlName=\"name\"\n autocomplete=\"off\"\n required\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n >\n <mat-error *ngIf=\"form.controls.name.hasError('required') && form.controls.name.touched\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"form.controls.name.hasError('notAlreadyExists') && form.controls.name.touched\" translate>ACCOUNT.TOKENS.CREATE.NAME_ALREADY_EXISTS</mat-error>\n </mat-form-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-chips-field\n formControlName=\"scopes\"\n appearance=\"legacy\"\n chipColor=\"primary\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.SCOPES' | translate\"\n [config]=\"tokenConfig\"\n [mobile]=\"mobile\"\n [debug]=\"false\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n >\n <mat-error *ngIf=\"form.controls.name.hasError('notEmptyArray') && form.controls.name.touched\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-chips-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-date-field\n formControlName=\"expirationDate\"\n [placeholder]=\"'ACCOUNT.TOKENS.CREATE.EXPIRATION_DATE' | translate\"\n [mobile]=\"mobile\"\n [required]=\"true\"\n [readonly]=\"tokenForm | formGetValue: 'token' | isNotNilOrBlank\"\n ></mat-date-field>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <ion-button\n *ngIf=\"tokenForm | formGetValue: 'token' | isNilOrBlank; else showToken\"\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_GENERATE_TITLE' | translate\"\n (click)=\"generate($event)\"\n [disabled]=\"tokenForm.invalid\"\n >\n {{ 'ACCOUNT.TOKENS.CREATE.BTN_GENERATE' | translate}}\n </ion-button>\n <ng-template #showToken>\n <p><b translate>ACCOUNT.TOKENS.CREATE.COPY_HELP</b></p>\n <mat-form-field>\n <textarea matInput formControlName=\"token\" readonly style=\"height: auto; background-color: lightgray;\" rows=\"4\"></textarea>\n <button matSuffix\n mat-icon-button\n [title]=\"'ACCOUNT.TOKENS.CREATE.BTN_COPY_TITLE' | translate\"\n (click)=\"copy($event)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </mat-form-field>\n </ng-template>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n\n<ion-footer hidden-xs hidden-sm hidden-mobile>\n\n <ion-toolbar>\n <ion-row class=\"ion-no-padding\" nowrap>\n <ion-col>\n <ng-content></ng-content>\n </ion-col>\n\n <ion-col size=\"auto\">\n\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"close($event)\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n\n <ion-button [fill]=\"invalid ? 'clear' : 'solid'\"\n [disabled]=\"disabled || loading || invalid\"\n (click)=\"saveAndClose($event)\"\n (keyup.enter)=\"saveAndClose($event)\"\n color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n\n</ion-footer>\n" }]
|
|
32228
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: UserTokenValidatorService }, { type: AccountService }]; }, propDecorators: { tokenScopes: [{
|
|
32199
32229
|
type: Input
|
|
32200
32230
|
}], existingNames: [{
|
|
32201
32231
|
type: Input
|
|
32202
32232
|
}] } });
|
|
32203
32233
|
|
|
32204
32234
|
class UserTokenTable extends AppInMemoryTable {
|
|
32205
|
-
constructor(injector, formBuilder, validatorService, environment, tokenScopes) {
|
|
32206
|
-
super(injector, [...RESERVED_START_COLUMNS, 'name',
|
|
32207
|
-
filterFnFactory: () => () => true
|
|
32235
|
+
constructor(injector, formBuilder, validatorService, cd, environment, tokenScopes) {
|
|
32236
|
+
super(injector, [...RESERVED_START_COLUMNS, 'name', 'scopes', 'lastUsedDate', 'expirationDate', 'creationDate', ...RESERVED_END_COLUMNS], UserToken, new InMemoryEntitiesService(UserToken, undefined, {
|
|
32237
|
+
filterFnFactory: () => () => true,
|
|
32238
|
+
equals: UserToken.equals,
|
|
32208
32239
|
}), validatorService);
|
|
32209
32240
|
this.injector = injector;
|
|
32210
32241
|
this.formBuilder = formBuilder;
|
|
32211
32242
|
this.validatorService = validatorService;
|
|
32243
|
+
this.cd = cd;
|
|
32212
32244
|
this.tokenScopes = tokenScopes;
|
|
32213
32245
|
this.useSticky = false;
|
|
32214
32246
|
// this.readOnly = true;
|
|
32215
|
-
this.inlineEdition =
|
|
32247
|
+
this.inlineEdition = false;
|
|
32216
32248
|
this.defaultSortBy = 'creationDate';
|
|
32217
32249
|
this.defaultSortDirection = 'asc';
|
|
32218
32250
|
this.i18nColumnPrefix = 'ACCOUNT.TOKENS.TABLE.';
|
|
@@ -32235,10 +32267,10 @@ class UserTokenTable extends AppInMemoryTable {
|
|
|
32235
32267
|
}
|
|
32236
32268
|
setValue(value, opts) {
|
|
32237
32269
|
// Set scopes from flags
|
|
32238
|
-
value === null || value === void 0 ? void 0 : value.forEach(userToken => {
|
|
32270
|
+
value === null || value === void 0 ? void 0 : value.forEach((userToken) => {
|
|
32239
32271
|
const scopes = [];
|
|
32240
32272
|
if (userToken.flags) {
|
|
32241
|
-
this.tokenScopes.forEach(scope => {
|
|
32273
|
+
this.tokenScopes.forEach((scope) => {
|
|
32242
32274
|
// eslint-disable-next-line no-bitwise
|
|
32243
32275
|
if (userToken.flags & scope.flag) {
|
|
32244
32276
|
scopes.push(scope);
|
|
@@ -32252,6 +32284,9 @@ class UserTokenTable extends AppInMemoryTable {
|
|
|
32252
32284
|
addToken(event) {
|
|
32253
32285
|
var _a;
|
|
32254
32286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32287
|
+
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
32288
|
+
return; // Avoid multiple call
|
|
32289
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
32255
32290
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
32256
32291
|
const modal = yield this.modalCtrl.create({
|
|
32257
32292
|
component: NewTokenModal,
|
|
@@ -32260,9 +32295,9 @@ class UserTokenTable extends AppInMemoryTable {
|
|
|
32260
32295
|
isNew: true,
|
|
32261
32296
|
data: new UserToken(),
|
|
32262
32297
|
tokenScopes: this.tokenScopes || [],
|
|
32263
|
-
existingNames: (_a = this.value) === null || _a === void 0 ? void 0 : _a.map(v => v.name)
|
|
32298
|
+
existingNames: (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((v) => v.name),
|
|
32264
32299
|
},
|
|
32265
|
-
backdropDismiss: false
|
|
32300
|
+
backdropDismiss: false,
|
|
32266
32301
|
});
|
|
32267
32302
|
yield modal.present();
|
|
32268
32303
|
const { data } = yield modal.onDidDismiss();
|
|
@@ -32290,20 +32325,19 @@ class UserTokenTable extends AppInMemoryTable {
|
|
|
32290
32325
|
// // this.markAsDirty();
|
|
32291
32326
|
// }
|
|
32292
32327
|
display(scopes) {
|
|
32293
|
-
return scopes === null || scopes === void 0 ? void 0 : scopes.map(value => this.translate.instant(value.name)).join(', ');
|
|
32328
|
+
return scopes === null || scopes === void 0 ? void 0 : scopes.map((value) => this.translate.instant(value.name)).join(', ');
|
|
32329
|
+
}
|
|
32330
|
+
markForCheck() {
|
|
32331
|
+
this.cd.markForCheck();
|
|
32294
32332
|
}
|
|
32295
32333
|
}
|
|
32296
|
-
UserTokenTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserTokenTable, deps: [{ token: i0.Injector }, { token: i1$2.UntypedFormBuilder }, { token: i2$8.ValidatorService }, { token: ENVIRONMENT }, { token: APP_USER_TOKEN_SCOPES, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
32297
|
-
UserTokenTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserTokenTable, selector: "app-user-token-table", inputs: { useSticky: "useSticky" }, providers: [
|
|
32298
|
-
{ provide: ValidatorService, useClass: UserTokenValidatorService }
|
|
32299
|
-
], usesInheritance: true, ngImport: i0, template: "<mat-toolbar>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <ion-item *ngIf=\"!mobile && error; let error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <ng-container *ngIf=\"selection.isEmpty(); else hasSelection\">\n\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addToken($event)\">\n <mat-icon>add</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-template #hasSelection>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_DELETE' | translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n\n </ng-template>\n\n</mat-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <ion-refresher slot=\"fixed\" *ngIf=\"mobile\" (ionRefresh)=\"doRefresh($event)\">\n <ion-refresher-content></ion-refresher-content>\n </ion-refresher>\n\n <!-- table -->\n <div class=\"table-container\">\n <table #table mat-table matSort matSortDisableClear\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- name column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'NAME' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ (row.currentData | propertyGet : 'name') || (i18nColumnPrefix + 'UNKNOWN' | translate) }}\n </td>\n </ng-container>\n\n<!-- <ng-container matColumnDef=\"flags\">-->\n<!-- <th mat-header-cell *matHeaderCellDef mat-sort-header>-->\n<!-- <ion-label>{{ i18nColumnPrefix + 'FLAGS' | translate }}</ion-label>-->\n<!-- </th>-->\n<!-- <td mat-cell *matCellDef=\"let row\">-->\n<!-- {{ row.currentData | propertyGet : 'flags' }}-->\n<!-- </td>-->\n<!-- </ng-container>-->\n\n <ng-container matColumnDef=\"scopes\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'SCOPES' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ display(row.currentData | propertyGet : 'scopes') }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'CREATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'creationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expirationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'EXPIRATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'expirationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"lastUsedDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'LAST_USED_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'lastUsedDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"updateDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'UPDATE_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'updateDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-selected]=\"row.editing\"\n [class.mat-row-error]=\"row.validator?.invalid\"\n [class.mat-row-dirty]=\"row.validator?.dirty\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator?.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n\n </div>\n</ion-content>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addToken($event)\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n", styles: [".mat-cell-date-time{width:180px}.mat-column-id{width:90px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFab, selector: "ion-fab", inputs: ["activated", "edge", "horizontal", "vertical"] }, { kind: "component", type: i2$1.IonFabButton, selector: "ion-fab-button", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { kind: "component", type: i2$1.IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i6$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i7$3.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7$3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i8$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActionsColumnComponent, selector: "app-actions-column", inputs: ["stickyEnd", "canCancel", "canConfirm", "canDelete", "canBackward", "canForward", "canConfirmAndAdd", "dirtyIcon", "optionsTitle", "class", "cellTemplate"], outputs: ["optionsClick", "cancelOrDeleteClick", "confirmEditCreateClick", "confirmAndAddClick", "backward", "forward"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32334
|
+
UserTokenTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserTokenTable, deps: [{ token: i0.Injector }, { token: i1$2.UntypedFormBuilder }, { token: i2$8.ValidatorService }, { token: i0.ChangeDetectorRef }, { token: ENVIRONMENT }, { token: APP_USER_TOKEN_SCOPES, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
32335
|
+
UserTokenTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UserTokenTable, selector: "app-user-token-table", inputs: { useSticky: "useSticky" }, providers: [{ provide: ValidatorService, useClass: UserTokenValidatorService }], usesInheritance: true, ngImport: i0, template: "<mat-toolbar>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <ion-item *ngIf=\"!mobile && error; let error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <ng-container *ngIf=\"selection.isEmpty(); else hasSelection\">\n\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addToken($event)\">\n <mat-icon>add</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-template #hasSelection>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_DELETE' | translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n\n </ng-template>\n\n</mat-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <ion-refresher slot=\"fixed\" *ngIf=\"mobile\" (ionRefresh)=\"doRefresh($event)\">\n <ion-refresher-content></ion-refresher-content>\n </ion-refresher>\n\n <!-- table -->\n <div class=\"table-container\">\n <table #table mat-table matSort matSortDisableClear\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"cdk-visually-hidden\">\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"cdk-visually-hidden\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- name column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'NAME' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ (row.currentData | propertyGet : 'name') || (i18nColumnPrefix + 'UNKNOWN' | translate) }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"scopes\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'SCOPES' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ display(row.currentData | propertyGet : 'scopes') }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'CREATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'creationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expirationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'EXPIRATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'expirationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"lastUsedDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'LAST_USED_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'lastUsedDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-selected]=\"row.editing\"\n [class.mat-row-error]=\"row.validator?.invalid\"\n [class.mat-row-dirty]=\"row.validator?.dirty\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator?.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n\n </div>\n</ion-content>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addToken($event)\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n", styles: [".mat-cell-date-time{width:180px}.mat-column-id{width:90px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFab, selector: "ion-fab", inputs: ["activated", "edge", "horizontal", "vertical"] }, { kind: "component", type: i2$1.IonFabButton, selector: "ion-fab-button", inputs: ["activated", "closeIcon", "color", "disabled", "download", "href", "mode", "rel", "routerAnimation", "routerDirection", "show", "size", "target", "translucent", "type"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRefresher, selector: "ion-refresher", inputs: ["closeDuration", "disabled", "pullFactor", "pullMax", "pullMin", "snapbackDuration"] }, { kind: "component", type: i2$1.IonRefresherContent, selector: "ion-refresher-content", inputs: ["pullingIcon", "pullingText", "refreshingSpinner", "refreshingText"] }, { kind: "component", type: i2$1.IonSkeletonText, selector: "ion-skeleton-text", inputs: ["animated"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: i6$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i7$3.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7$3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i8$2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActionsColumnComponent, selector: "app-actions-column", inputs: ["stickyEnd", "canCancel", "canConfirm", "canDelete", "canBackward", "canForward", "canConfirmAndAdd", "dirtyIcon", "optionsTitle", "class", "cellTemplate"], outputs: ["optionsClick", "cancelOrDeleteClick", "confirmEditCreateClick", "confirmAndAddClick", "backward", "forward"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: PropertyGetPipe, name: "propertyGet" }, { kind: "pipe", type: DateFormatPipe, name: "dateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32300
32336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserTokenTable, decorators: [{
|
|
32301
32337
|
type: Component,
|
|
32302
|
-
args: [{ selector: 'app-user-token-table', providers: [
|
|
32303
|
-
{ provide: ValidatorService, useClass: UserTokenValidatorService }
|
|
32304
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <ion-item *ngIf=\"!mobile && error; let error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <ng-container *ngIf=\"selection.isEmpty(); else hasSelection\">\n\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addToken($event)\">\n <mat-icon>add</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-template #hasSelection>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_DELETE' | translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n\n </ng-template>\n\n</mat-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <ion-refresher slot=\"fixed\" *ngIf=\"mobile\" (ionRefresh)=\"doRefresh($event)\">\n <ion-refresher-content></ion-refresher-content>\n </ion-refresher>\n\n <!-- table -->\n <div class=\"table-container\">\n <table #table mat-table matSort matSortDisableClear\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- name column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'NAME' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ (row.currentData | propertyGet : 'name') || (i18nColumnPrefix + 'UNKNOWN' | translate) }}\n </td>\n </ng-container>\n\n<!-- <ng-container matColumnDef=\"flags\">-->\n<!-- <th mat-header-cell *matHeaderCellDef mat-sort-header>-->\n<!-- <ion-label>{{ i18nColumnPrefix + 'FLAGS' | translate }}</ion-label>-->\n<!-- </th>-->\n<!-- <td mat-cell *matCellDef=\"let row\">-->\n<!-- {{ row.currentData | propertyGet : 'flags' }}-->\n<!-- </td>-->\n<!-- </ng-container>-->\n\n <ng-container matColumnDef=\"scopes\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'SCOPES' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ display(row.currentData | propertyGet : 'scopes') }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'CREATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'creationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expirationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'EXPIRATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'expirationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"lastUsedDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'LAST_USED_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'lastUsedDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"updateDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'UPDATE_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'updateDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-selected]=\"row.editing\"\n [class.mat-row-error]=\"row.validator?.invalid\"\n [class.mat-row-dirty]=\"row.validator?.dirty\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator?.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n\n </div>\n</ion-content>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addToken($event)\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n", styles: [".mat-cell-date-time{width:180px}.mat-column-id{width:90px}\n"] }]
|
|
32338
|
+
args: [{ selector: 'app-user-token-table', providers: [{ provide: ValidatorService, useClass: UserTokenValidatorService }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-toolbar>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <ion-item *ngIf=\"!mobile && error; let error\" lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <ng-container *ngIf=\"selection.isEmpty(); else hasSelection\">\n\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addToken($event)\">\n <mat-icon>add</mat-icon>\n </button>\n\n </ng-container>\n\n <ng-template #hasSelection>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_DELETE' | translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n\n </ng-template>\n\n</mat-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <ion-refresher slot=\"fixed\" *ngIf=\"mobile\" (ionRefresh)=\"doRefresh($event)\">\n <ion-refresher-content></ion-refresher-content>\n </ion-refresher>\n\n <!-- table -->\n <div class=\"table-container\">\n <table #table mat-table matSort matSortDisableClear\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"cdk-visually-hidden\">\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"cdk-visually-hidden\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- name column -->\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'NAME' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ (row.currentData | propertyGet : 'name') || (i18nColumnPrefix + 'UNKNOWN' | translate) }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"scopes\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>{{ i18nColumnPrefix + 'SCOPES' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n {{ display(row.currentData | propertyGet : 'scopes') }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"creationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'CREATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'creationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"expirationDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'EXPIRATION_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'expirationDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"lastUsedDate\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"mat-cell-date-time\">\n <ion-label>{{ i18nColumnPrefix + 'LAST_USED_DATE' | translate }}</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"mat-cell-date-time\">\n {{ row.currentData | propertyGet : 'lastUsedDate' | dateFormat : {time: true} }}\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-selected]=\"row.editing\"\n [class.mat-row-error]=\"row.validator?.invalid\"\n [class.mat-row-dirty]=\"row.validator?.dirty\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator?.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n\n </div>\n</ion-content>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addToken($event)\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n", styles: [".mat-cell-date-time{width:180px}.mat-column-id{width:90px}\n"] }]
|
|
32305
32339
|
}], ctorParameters: function () {
|
|
32306
|
-
return [{ type: i0.Injector }, { type: i1$2.UntypedFormBuilder }, { type: i2$8.ValidatorService }, { type: Environment, decorators: [{
|
|
32340
|
+
return [{ type: i0.Injector }, { type: i1$2.UntypedFormBuilder }, { type: i2$8.ValidatorService }, { type: i0.ChangeDetectorRef }, { type: Environment, decorators: [{
|
|
32307
32341
|
type: Inject,
|
|
32308
32342
|
args: [ENVIRONMENT]
|
|
32309
32343
|
}] }, { type: undefined, decorators: [{
|
|
@@ -37714,7 +37748,7 @@ class UsersPage extends AppTable {
|
|
|
37714
37748
|
console.warn('[users] Unknown action=' + action);
|
|
37715
37749
|
break;
|
|
37716
37750
|
}
|
|
37717
|
-
// Mark as
|
|
37751
|
+
// Mark as consumed
|
|
37718
37752
|
this.router.navigate(['.'], {
|
|
37719
37753
|
relativeTo: this.route,
|
|
37720
37754
|
queryParams: Object.assign(Object.assign({}, queryParams), { action: undefined }),
|
|
@@ -41051,5 +41085,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
41051
41085
|
* Generated bundle index. Do not edit.
|
|
41052
41086
|
*/
|
|
41053
41087
|
|
|
41054
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_DEBUG_DATA_SERVICE, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_FRAGMENTS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_JOB_PROGRESSION_SERVICE, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_LOGGING_SERVICE, APP_MENU_ITEMS, APP_MENU_OPTIONS, APP_NAMED_FILTER_SERVICE, APP_PROGRESS_BAR_SERVICE, APP_SETTINGS_MENU_ITEMS, APP_STORAGE, APP_STORAGE_EXPLORER_PROTECTED_KEYS, APP_TESTING_PAGES, APP_USER_EVENT_LIST_INFINITE_SCROLL_THRESHOLD, APP_USER_EVENT_SERVICE, APP_USER_SETTINGS_OPTIONS, APP_USER_TOKEN_SCOPES, AboutModal, AbstractDateFormat, AbstractNamedFilterService, AbstractUserEventService, Account, AccountPage, AccountService, AccountToStringPipe, AccountUtils, ActionsColumnComponent, AdminModule, AdminRoutingModule, AdminUsersModule, Alerts, AndroidOsEnvironment, AnimationState, AppAboutModalModule, AppAccountModule, AppAsyncTable, AppAuthForm, AppAuthModal, AppAuthModule, AppEditor, AppEditorOptions, AppEntityEditor, AppEntityEditorModal, AppEntityEditorModalOptions, AppEntityFormModule, AppForm, AppFormArray, AppFormButtonsBarModule, AppFormField, AppFormModule, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppHomePageModule, AppIconComponent, AppIconModule, AppImageGalleryComponent, AppInMemoryTable, AppInstallUpgradeCard, AppInstallUpgradeCardModule, AppListForm, AppListFormModule, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppPropertiesFormModule, AppPropertiesTable, AppRegisterModule, AppSelectPeerModule, AppSettingsPageModule, AppTabEditor, AppTabEditorOptions, AppTable, AppTableModule, AppTableUtils, AppTextPopoverModule, AppUpdateOfflineModeCard, AppUpdateOfflineModeCardModule, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayJoinPipe, ArrayLengthPipe, ArrayPluckPipe, AsAnyPipe, AsArrayPipe, AsObservablePipe, AudioProvider, AudioTestingModule, AudioTestingPage, AuthGuardService, AutoTitleDirective, AutocompleteTestPage, AutofocusDirective, BadgeDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigFragments, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, CsvUtils, DATE_ISO_PATTERN, DATE_MATCH_REGEXP, DATE_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_MENU_SHOW_WHEN, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFormatService, DateFromNowPipe, DateShortTestPage, DateTestPage, DateTimeTestPage, DateUtils, DebugComponent, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ED25519_SEED_LENGTH, EMPTY_PLACEHOLDER_CHAR, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesAsyncTableDataSource, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, EnvironmentHttpLoader, EnvironmentLoader, ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetGroupPipe, FormGetPipe, FormGetValuePipe, GalleryTestPage, GeolocationUtils, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, IMAGE_DEFAULTS, IPosition, ImageAttachment, ImageAttachmentFilter, ImageAttachmentService, ImageGalleryModule, ImageGalleryTestingModule, ImageModule, ImageService, ImagesUtils, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNilOrNaNPipe, IsNilPipe, IsNotNilOrBlankPipe, IsNotNilOrNaNPipe, IsNotNilPipe, IsOnDeskPipe, IsOnFieldPipe, JobModule, JobProgression, JobProgressionComponent, JobProgressionIcon, JobProgressionList, JobProgressionService, JobProgressionTestService, JobProgressionTestingPage, JobTestingModule, JobUtils, JsonUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LogLevel, LogUtils, Logger, LoggingService, LoggingServiceModule, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MOMENT_NO_TIME_PROPERTY, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatAutocompleteFieldUtils, MatBooleanField, MatChipsField, MatColorPipe, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItem, MenuItems, MenuOptions, MenuService, MenuTestingModule, MenuTestingPage, Message, MessageFilter, MessageForm, MessageModal, MessageModule, MessageService, MessageTypeList, MessageTypes, MimeTypes, ModalToolbarComponent, NamedFilter, NamedFilterFilter, NamedFilterSelector, NetworkService, NewTokenModal, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, NumpadTestPage, ObservableTestPage, OddPipe, OtherMenuTestingPage, PEER_URL_REGEXP, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertiesFormTestPage, PropertiesFormTestingModule, PropertyEntity, PropertyEntityFilter, PropertyEntityValidator, PropertyFormatPipe, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, RegisterForm, RegisterModal, ResizableComponent, ResizableDirective, ResizableModule, SCRYPT_PARAMS, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_STORAGE_TESTING_PAGES, SHARED_TESTING_PAGES, SOCIAL_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, ServerErrorCodes, SettingsPage, SharedAsyncValidators, SharedBadgeModule, SharedDebugModule, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedNamedFilterModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedTextFormModule, SharedToolbarModule, SharedValidators, SocialErrorCodes, SocialModule, SocialModuleOptionsToken, SocialTestingModule, Software, StartableService, StatusById, StatusIds, StatusList, StorageDrivers, StorageExplorerComponent, StorageExplorerModule, StorageExplorerTestingModule, StorageExplorerTestingRoutingModule, StorageService, StrIncludesPipe, StrLengthPipe, SubMenuTabDirective, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TableValidatorService, TextForm, TextFormTestingPage, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, ToastTestingModule, ToastTestingPage, Toasts, TokenScope, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, TreeItemEntityUtils, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UriUtils, UserEventModule, UserEventNotificationIcon, UserEventNotificationList, UserEventTestService, UserEventTestingModule, UserEventTestingPage, UserSettings, UserToken, UserTokenTable, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, collectByProperty, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, escapeRegExp, fadeInAnimation, fadeInOutAnimation, fadeInSlowAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, findParentWithClass, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, initArrayControlsFromValues, isAndroid, isBlankString, isCapacitor, isControlHasInput, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilBoolean, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isStartableService, isTouchUi, isWindows, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setPropertyByPath, setTabIndex, sleep, slideInAnimation, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, undefinedIfNull, updateValueAndValidity, waitFor, waitForFalse, waitForTrue, waitIdle, waitWhilePending };
|
|
41088
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_DEBUG_DATA_SERVICE, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_FRAGMENTS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_JOB_PROGRESSION_SERVICE, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_LOGGING_SERVICE, APP_MENU_ITEMS, APP_MENU_OPTIONS, APP_NAMED_FILTER_SERVICE, APP_PROGRESS_BAR_SERVICE, APP_SETTINGS_MENU_ITEMS, APP_STORAGE, APP_STORAGE_EXPLORER_PROTECTED_KEYS, APP_TESTING_PAGES, APP_USER_EVENT_LIST_INFINITE_SCROLL_THRESHOLD, APP_USER_EVENT_SERVICE, APP_USER_SETTINGS_OPTIONS, APP_USER_TOKEN_SCOPES, AboutModal, AbstractDateFormat, AbstractNamedFilterService, AbstractUserEventService, Account, AccountPage, AccountService, AccountToStringPipe, AccountUtils, ActionsColumnComponent, AdminModule, AdminRoutingModule, AdminUsersModule, Alerts, AndroidOsEnvironment, AnimationState, AppAboutModalModule, AppAccountModule, AppAsyncTable, AppAuthForm, AppAuthModal, AppAuthModule, AppEditor, AppEditorOptions, AppEntityEditor, AppEntityEditorModal, AppEntityEditorModalOptions, AppEntityFormModule, AppForm, AppFormArray, AppFormButtonsBarModule, AppFormField, AppFormModule, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppHomePageModule, AppIconComponent, AppIconModule, AppImageGalleryComponent, AppInMemoryTable, AppInstallUpgradeCard, AppInstallUpgradeCardModule, AppListForm, AppListFormModule, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppPropertiesFormModule, AppPropertiesTable, AppRegisterModule, AppSelectPeerModule, AppSettingsPageModule, AppTabEditor, AppTabEditorOptions, AppTable, AppTableModule, AppTableUtils, AppTextPopoverModule, AppUpdateOfflineModeCard, AppUpdateOfflineModeCardModule, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayJoinPipe, ArrayLengthPipe, ArrayPluckPipe, AsAnyPipe, AsArrayPipe, AsObservablePipe, AudioProvider, AudioTestingModule, AudioTestingPage, AuthGuardService, AutoTitleDirective, AutocompleteTestPage, AutofocusDirective, BadgeDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigFragments, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, CsvUtils, DATE_ISO_PATTERN, DATE_MATCH_REGEXP, DATE_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_MENU_SHOW_WHEN, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFormatService, DateFromNowPipe, DateShortTestPage, DateTestPage, DateTimeTestPage, DateUtils, DebugComponent, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ED25519_SEED_LENGTH, EMPTY_PLACEHOLDER_CHAR, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesAsyncTableDataSource, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, EnvironmentHttpLoader, EnvironmentLoader, ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetGroupPipe, FormGetPipe, FormGetValuePipe, GalleryTestPage, GeolocationUtils, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, IMAGE_DEFAULTS, IPosition, ImageAttachment, ImageAttachmentFilter, ImageAttachmentService, ImageGalleryModule, ImageGalleryTestingModule, ImageModule, ImageService, ImagesUtils, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNilOrNaNPipe, IsNilPipe, IsNotNilOrBlankPipe, IsNotNilOrNaNPipe, IsNotNilPipe, IsOnDeskPipe, IsOnFieldPipe, JobModule, JobProgression, JobProgressionComponent, JobProgressionIcon, JobProgressionList, JobProgressionService, JobProgressionTestService, JobProgressionTestingPage, JobTestingModule, JobUtils, JsonUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LogLevel, LogUtils, Logger, LoggingService, LoggingServiceModule, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MOMENT_NO_TIME_PROPERTY, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatAutocompleteFieldUtils, MatBooleanField, MatChipsField, MatColorPipe, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItem, MenuItems, MenuOptions, MenuService, MenuTestingModule, MenuTestingPage, Message, MessageFilter, MessageForm, MessageModal, MessageModule, MessageService, MessageTypeList, MessageTypes, MimeTypes, ModalToolbarComponent, NETWORK_DEFAULT_CONNECTION_TIMEOUT, NamedFilter, NamedFilterFilter, NamedFilterSelector, NetworkService, NewTokenModal, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, NumpadTestPage, ObservableTestPage, OddPipe, OtherMenuTestingPage, PEER_URL_REGEXP, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertiesFormTestPage, PropertiesFormTestingModule, PropertyEntity, PropertyEntityFilter, PropertyEntityValidator, PropertyFormatPipe, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, RegisterForm, RegisterModal, ResizableComponent, ResizableDirective, ResizableModule, SCRYPT_PARAMS, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_STORAGE_TESTING_PAGES, SHARED_TESTING_PAGES, SOCIAL_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, ServerErrorCodes, SettingsPage, SharedAsyncValidators, SharedBadgeModule, SharedDebugModule, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedNamedFilterModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedTextFormModule, SharedToolbarModule, SharedValidators, SocialErrorCodes, SocialModule, SocialModuleOptionsToken, SocialTestingModule, Software, StartableService, StatusById, StatusIds, StatusList, StorageDrivers, StorageExplorerComponent, StorageExplorerModule, StorageExplorerTestingModule, StorageExplorerTestingRoutingModule, StorageService, StrIncludesPipe, StrLengthPipe, SubMenuTabDirective, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TableValidatorService, TextForm, TextFormTestingPage, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, ToastTestingModule, ToastTestingPage, Toasts, TokenScope, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, TreeItemEntityUtils, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UriUtils, UserEventModule, UserEventNotificationIcon, UserEventNotificationList, UserEventTestService, UserEventTestingModule, UserEventTestingPage, UserSettings, UserToken, UserTokenTable, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, collectByProperty, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, escapeRegExp, fadeInAnimation, fadeInOutAnimation, fadeInSlowAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, findParentWithClass, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, initArrayControlsFromValues, isAndroid, isBlankString, isCapacitor, isControlHasInput, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilBoolean, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isStartableService, isTouchUi, isWindows, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setPropertyByPath, setTabIndex, sleep, slideInAnimation, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, undefinedIfNull, updateValueAndValidity, waitFor, waitForFalse, waitForTrue, waitIdle, waitWhilePending };
|
|
41055
41089
|
//# sourceMappingURL=sumaris-net.ngx-components.mjs.map
|