@yuuvis/client-core 2.12.4 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/yuuvis-client-core.mjs +437 -201
- package/fesm2022/yuuvis-client-core.mjs.map +1 -1
- package/lib/model/file-upload-options.model.d.ts +5 -0
- package/lib/service/auth/auth.service.d.ts +0 -1
- package/lib/service/backend/backend.service.d.ts +14 -5
- package/lib/service/dms/dms.service.d.ts +44 -3
- package/lib/service/dms/dms.service.interface.d.ts +1 -0
- package/lib/service/event/event.service.d.ts +1 -1
- package/lib/service/system/system.interface.d.ts +5 -7
- package/lib/service/upload/upload.interface.d.ts +1 -0
- package/lib/service/upload/upload.service.d.ts +128 -2
- package/package.json +1 -1
|
@@ -889,10 +889,10 @@ class ConfigService {
|
|
|
889
889
|
_getCoreConfig(key) {
|
|
890
890
|
return this.cfg ? this.cfg.core[key] : undefined;
|
|
891
891
|
}
|
|
892
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
893
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
892
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
893
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConfigService, providedIn: 'root' }); }
|
|
894
894
|
}
|
|
895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConfigService, decorators: [{
|
|
896
896
|
type: Injectable,
|
|
897
897
|
args: [{
|
|
898
898
|
providedIn: 'root'
|
|
@@ -958,10 +958,10 @@ class Logger {
|
|
|
958
958
|
}
|
|
959
959
|
return should;
|
|
960
960
|
}
|
|
961
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
962
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
961
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: Logger, deps: [{ token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
962
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: Logger, providedIn: 'root' }); }
|
|
963
963
|
}
|
|
964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: Logger, decorators: [{
|
|
965
965
|
type: Injectable,
|
|
966
966
|
args: [{
|
|
967
967
|
providedIn: 'root'
|
|
@@ -1069,14 +1069,25 @@ class BackendService {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
/**
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1072
|
+
* Performs an HTTP GET request against a yuuvis Momentum backend endpoint.
|
|
1073
|
+
*
|
|
1074
|
+
* Automatically prepends the resolved base URI (via {@link getApiBase}) to the given `uri`,
|
|
1075
|
+
* applies centralized headers (authorization, content-type) and emits an event on
|
|
1076
|
+
* `httpCommunicationOccurred$` after each successful response — used by SessionService
|
|
1077
|
+
* to keep the session alive.
|
|
1078
|
+
*
|
|
1079
|
+
* @param uri REST URI relative to the selected backend service base. Must start with `/`,
|
|
1080
|
+
* e.g. `/api/dms/objects/{objectId}`.
|
|
1081
|
+
* @param base Selects which backend service base URL to use.
|
|
1082
|
+
* @param requestOptions Optional Angular `HttpClient` options (headers, params, responseType, etc.)
|
|
1083
|
+
* merged on top of the default headers set by this service.
|
|
1084
|
+
* @returns An `Observable<T>` that emits the deserialized response body and completes.
|
|
1085
|
+
* Unsubscribing before completion cancels the underlying HTTP request.
|
|
1077
1086
|
*/
|
|
1078
1087
|
get(uri, base, requestOptions) {
|
|
1079
|
-
return this.#http
|
|
1088
|
+
return this.#http
|
|
1089
|
+
.get(this.getApiBase(base) + uri, this.getHttpOptions(requestOptions))
|
|
1090
|
+
.pipe(tap(() => this.#httpCallOccurred$.next()));
|
|
1080
1091
|
}
|
|
1081
1092
|
/**
|
|
1082
1093
|
* Wrapped HTTP POST method
|
|
@@ -1089,7 +1100,9 @@ class BackendService {
|
|
|
1089
1100
|
post(uri, data, base, requestOptions) {
|
|
1090
1101
|
const baseUri = this.getApiBase(base);
|
|
1091
1102
|
const payload = data && typeof data === 'object' ? JSON.stringify(data) : data || '';
|
|
1092
|
-
return this.#http
|
|
1103
|
+
return this.#http
|
|
1104
|
+
.post(`${baseUri}${uri}`, payload, this.getHttpOptions(requestOptions))
|
|
1105
|
+
.pipe(tap(() => this.#httpCallOccurred$.next()));
|
|
1093
1106
|
}
|
|
1094
1107
|
/**
|
|
1095
1108
|
* Performs a multipart form data POST request.
|
|
@@ -1119,7 +1132,9 @@ class BackendService {
|
|
|
1119
1132
|
patch(uri, data, base, requestOptions) {
|
|
1120
1133
|
const baseUri = this.getApiBase(base);
|
|
1121
1134
|
const payload = data ? JSON.stringify(data) : '';
|
|
1122
|
-
return this.#http
|
|
1135
|
+
return this.#http
|
|
1136
|
+
.patch(`${baseUri}${uri}`, payload, this.getHttpOptions(requestOptions))
|
|
1137
|
+
.pipe(tap(() => this.#httpCallOccurred$.next()));
|
|
1123
1138
|
}
|
|
1124
1139
|
/**
|
|
1125
1140
|
* Wrapped HTTP PUT method
|
|
@@ -1130,7 +1145,9 @@ class BackendService {
|
|
|
1130
1145
|
* @returns The return value of the target PUT endpoint
|
|
1131
1146
|
*/
|
|
1132
1147
|
put(uri, data, base, requestOptions) {
|
|
1133
|
-
return this.#http
|
|
1148
|
+
return this.#http
|
|
1149
|
+
.put(this.getApiBase(base) + uri, data, this.getHttpOptions(requestOptions))
|
|
1150
|
+
.pipe(tap(() => this.#httpCallOccurred$.next()));
|
|
1134
1151
|
}
|
|
1135
1152
|
/**
|
|
1136
1153
|
* Wrapped HTTP DELETE method
|
|
@@ -1140,7 +1157,9 @@ class BackendService {
|
|
|
1140
1157
|
* @returns The return value of the target DELETE endpoint
|
|
1141
1158
|
*/
|
|
1142
1159
|
delete(uri, base, requestOptions) {
|
|
1143
|
-
return this.#http
|
|
1160
|
+
return this.#http
|
|
1161
|
+
.delete(this.getApiBase(base) + uri, this.getHttpOptions(requestOptions))
|
|
1162
|
+
.pipe(tap(() => this.#httpCallOccurred$.next()));
|
|
1144
1163
|
}
|
|
1145
1164
|
/**
|
|
1146
1165
|
* @ignore
|
|
@@ -1223,10 +1242,10 @@ class BackendService {
|
|
|
1223
1242
|
.pipe(catchError((err) => of({ _error: err }))));
|
|
1224
1243
|
return forkJoin(httpRequests);
|
|
1225
1244
|
}
|
|
1226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1227
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1245
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BackendService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1246
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BackendService, providedIn: 'root' }); }
|
|
1228
1247
|
}
|
|
1229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BackendService, decorators: [{
|
|
1230
1249
|
type: Injectable,
|
|
1231
1250
|
args: [{ providedIn: 'root' }]
|
|
1232
1251
|
}] });
|
|
@@ -1331,10 +1350,10 @@ class AppCacheService {
|
|
|
1331
1350
|
setStorage(options) {
|
|
1332
1351
|
return forkJoin(Object.keys(options || {}).map((k) => this.setItem(k, options[k])));
|
|
1333
1352
|
}
|
|
1334
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1335
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1353
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AppCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1354
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AppCacheService, providedIn: 'root' }); }
|
|
1336
1355
|
}
|
|
1337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AppCacheService, decorators: [{
|
|
1338
1357
|
type: Injectable,
|
|
1339
1358
|
args: [{
|
|
1340
1359
|
providedIn: 'root'
|
|
@@ -2003,10 +2022,10 @@ class SystemService {
|
|
|
2003
2022
|
])
|
|
2004
2023
|
.pipe(map(([global, tenant]) => ({ global, tenant })));
|
|
2005
2024
|
}
|
|
2006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
2007
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
2025
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SystemService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2026
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SystemService, providedIn: 'root' }); }
|
|
2008
2027
|
}
|
|
2009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SystemService, decorators: [{
|
|
2010
2029
|
type: Injectable,
|
|
2011
2030
|
args: [{
|
|
2012
2031
|
providedIn: 'root'
|
|
@@ -2292,10 +2311,10 @@ class SearchService {
|
|
|
2292
2311
|
return isoDateString;
|
|
2293
2312
|
}
|
|
2294
2313
|
}
|
|
2295
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
2296
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
2314
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2315
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SearchService, providedIn: 'root' }); }
|
|
2297
2316
|
}
|
|
2298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SearchService, decorators: [{
|
|
2299
2318
|
type: Injectable,
|
|
2300
2319
|
args: [{
|
|
2301
2320
|
providedIn: 'root'
|
|
@@ -2348,7 +2367,9 @@ class EventService {
|
|
|
2348
2367
|
return isFromTrustedOrigin && hasValidStructure;
|
|
2349
2368
|
}
|
|
2350
2369
|
#listenToWindowEvents() {
|
|
2351
|
-
window.addEventListener('message', (event) =>
|
|
2370
|
+
window.addEventListener('message', (event) => {
|
|
2371
|
+
this.#ngZone.run(() => this.#isValidExternalMessage(event) && this.trigger(event.data.type, event.data.data));
|
|
2372
|
+
});
|
|
2352
2373
|
}
|
|
2353
2374
|
/**
|
|
2354
2375
|
* Triggers a postMessage event that will be sent to the yuuvis global event Trigger
|
|
@@ -2379,10 +2400,10 @@ class EventService {
|
|
|
2379
2400
|
on(...types) {
|
|
2380
2401
|
return this.event$.pipe(filter((event) => event && !!types.find((t) => t === event.type)));
|
|
2381
2402
|
}
|
|
2382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
2383
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
2403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2404
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EventService, providedIn: 'root' }); }
|
|
2384
2405
|
}
|
|
2385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EventService, decorators: [{
|
|
2386
2407
|
type: Injectable,
|
|
2387
2408
|
args: [{
|
|
2388
2409
|
providedIn: 'root'
|
|
@@ -2576,10 +2597,10 @@ class UserService {
|
|
|
2576
2597
|
loadObjectConfig() {
|
|
2577
2598
|
return this.getSettings(this.#SETTINGS_SECTION_OBJECTCONFIG).pipe(catchError(() => of(undefined)));
|
|
2578
2599
|
}
|
|
2579
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
2580
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
2600
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserService, deps: [{ token: BackendService }, { token: i1.TranslateService }, { token: Logger }, { token: SystemService }, { token: EventService }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2601
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserService, providedIn: 'root' }); }
|
|
2581
2602
|
}
|
|
2582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserService, decorators: [{
|
|
2583
2604
|
type: Injectable,
|
|
2584
2605
|
args: [{
|
|
2585
2606
|
providedIn: 'root'
|
|
@@ -2706,10 +2727,10 @@ class AuditService {
|
|
|
2706
2727
|
return -1;
|
|
2707
2728
|
}
|
|
2708
2729
|
}
|
|
2709
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
2710
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
2730
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuditService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2731
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuditService, providedIn: 'root' }); }
|
|
2711
2732
|
}
|
|
2712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuditService, decorators: [{
|
|
2713
2734
|
type: Injectable,
|
|
2714
2735
|
args: [{
|
|
2715
2736
|
providedIn: 'root'
|
|
@@ -3002,10 +3023,10 @@ class ObjectConfigService {
|
|
|
3002
3023
|
}
|
|
3003
3024
|
: undefined;
|
|
3004
3025
|
}
|
|
3005
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3006
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3026
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ObjectConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3027
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ObjectConfigService, providedIn: 'root' }); }
|
|
3007
3028
|
}
|
|
3008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ObjectConfigService, decorators: [{
|
|
3009
3030
|
type: Injectable,
|
|
3010
3031
|
args: [{
|
|
3011
3032
|
providedIn: 'root'
|
|
@@ -3031,7 +3052,8 @@ class AuthService {
|
|
|
3031
3052
|
#appCache;
|
|
3032
3053
|
#systemService;
|
|
3033
3054
|
#backend;
|
|
3034
|
-
#
|
|
3055
|
+
#INITIAL_REQUEST_STORAGE_KEY;
|
|
3056
|
+
#USER_FETCH_URI;
|
|
3035
3057
|
#authenticated;
|
|
3036
3058
|
#authSource;
|
|
3037
3059
|
#authData;
|
|
@@ -3045,8 +3067,8 @@ class AuthService {
|
|
|
3045
3067
|
this.#appCache = inject(AppCacheService);
|
|
3046
3068
|
this.#systemService = inject(SystemService);
|
|
3047
3069
|
this.#backend = inject(BackendService);
|
|
3048
|
-
this.#
|
|
3049
|
-
this
|
|
3070
|
+
this.#INITIAL_REQUEST_STORAGE_KEY = 'yuv.core.auth.initialrequest';
|
|
3071
|
+
this.#USER_FETCH_URI = '/idm/whoami';
|
|
3050
3072
|
this.#authenticated = false;
|
|
3051
3073
|
this.#authSource = new BehaviorSubject(false);
|
|
3052
3074
|
this.authenticated$ = this.#authSource.asObservable();
|
|
@@ -3071,7 +3093,7 @@ class AuthService {
|
|
|
3071
3093
|
* Fetch information about the user currently logged in
|
|
3072
3094
|
*/
|
|
3073
3095
|
fetchUser() {
|
|
3074
|
-
return (this.#userToken ? of(this.#userToken) : this.#backend.get(this
|
|
3096
|
+
return (this.#userToken ? of(this.#userToken) : this.#backend.get(this.#USER_FETCH_URI)).pipe(tap(() => {
|
|
3075
3097
|
this.#authenticated = true;
|
|
3076
3098
|
this.#authSource.next(this.#authenticated);
|
|
3077
3099
|
}), switchMap((userJson) => this.#initApp(userJson)));
|
|
@@ -3095,7 +3117,7 @@ class AuthService {
|
|
|
3095
3117
|
uri = !uri.startsWith('/') ? `/${uri}` : uri;
|
|
3096
3118
|
if (!ignore.includes(uri)) {
|
|
3097
3119
|
this.#appCache
|
|
3098
|
-
.setItem(this.#
|
|
3120
|
+
.setItem(this.#INITIAL_REQUEST_STORAGE_KEY, {
|
|
3099
3121
|
uri: uri,
|
|
3100
3122
|
timestamp: Date.now()
|
|
3101
3123
|
})
|
|
@@ -3107,10 +3129,10 @@ class AuthService {
|
|
|
3107
3129
|
* picked up again after user has been authenticated.
|
|
3108
3130
|
*/
|
|
3109
3131
|
getInitialRequestUri() {
|
|
3110
|
-
return this.#appCache.getItem(this.#
|
|
3132
|
+
return this.#appCache.getItem(this.#INITIAL_REQUEST_STORAGE_KEY);
|
|
3111
3133
|
}
|
|
3112
3134
|
resetInitialRequestUri() {
|
|
3113
|
-
return this.#appCache.removeItem(this.#
|
|
3135
|
+
return this.#appCache.removeItem(this.#INITIAL_REQUEST_STORAGE_KEY);
|
|
3114
3136
|
}
|
|
3115
3137
|
/**
|
|
3116
3138
|
* Initialize/setup the application for a given user. This involves fetching
|
|
@@ -3128,10 +3150,10 @@ class AuthService {
|
|
|
3128
3150
|
return this.#systemService.getSystemDefinition(this.#authData).pipe(switchMap(() => this.#objectConfigService.init()), map(() => currentUser));
|
|
3129
3151
|
}));
|
|
3130
3152
|
}
|
|
3131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3132
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuthService, deps: [{ token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
3133
3155
|
}
|
|
3134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AuthService, decorators: [{
|
|
3135
3157
|
type: Injectable,
|
|
3136
3158
|
args: [{
|
|
3137
3159
|
providedIn: 'root'
|
|
@@ -3182,10 +3204,10 @@ class BpmService {
|
|
|
3182
3204
|
const pl = { ...payload, action: action };
|
|
3183
3205
|
return this.#backend.put(`/bpm/tasks/${taskId}`, pl, ApiBase.apiWeb);
|
|
3184
3206
|
}
|
|
3185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3186
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BpmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3208
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BpmService, providedIn: 'root' }); }
|
|
3187
3209
|
}
|
|
3188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: BpmService, decorators: [{
|
|
3189
3211
|
type: Injectable,
|
|
3190
3212
|
args: [{
|
|
3191
3213
|
providedIn: 'root'
|
|
@@ -3193,10 +3215,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
3193
3215
|
}] });
|
|
3194
3216
|
|
|
3195
3217
|
class CatalogService {
|
|
3196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3197
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CatalogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3219
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CatalogService, providedIn: 'root' }); }
|
|
3198
3220
|
}
|
|
3199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CatalogService, decorators: [{
|
|
3200
3222
|
type: Injectable,
|
|
3201
3223
|
args: [{
|
|
3202
3224
|
providedIn: 'root'
|
|
@@ -3254,10 +3276,10 @@ class ClientCacheService {
|
|
|
3254
3276
|
clear() {
|
|
3255
3277
|
return this.#appCacheService.clear((k) => k.startsWith(this.#CLIENT_CACHE_PREFIX));
|
|
3256
3278
|
}
|
|
3257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3258
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClientCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3280
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClientCacheService, providedIn: 'root' }); }
|
|
3259
3281
|
}
|
|
3260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClientCacheService, decorators: [{
|
|
3261
3283
|
type: Injectable,
|
|
3262
3284
|
args: [{
|
|
3263
3285
|
providedIn: 'root'
|
|
@@ -3349,10 +3371,10 @@ class ClipboardService {
|
|
|
3349
3371
|
console.error('Failed to copy text: ', error);
|
|
3350
3372
|
}
|
|
3351
3373
|
}
|
|
3352
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3353
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3375
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClipboardService, providedIn: 'root' }); }
|
|
3354
3376
|
}
|
|
3355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClipboardService, decorators: [{
|
|
3356
3378
|
type: Injectable,
|
|
3357
3379
|
args: [{
|
|
3358
3380
|
providedIn: 'root'
|
|
@@ -3388,10 +3410,10 @@ class ConnectionService {
|
|
|
3388
3410
|
this.connectionStateSource.next(this.currentState);
|
|
3389
3411
|
});
|
|
3390
3412
|
}
|
|
3391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3392
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3413
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConnectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3414
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConnectionService, providedIn: 'root' }); }
|
|
3393
3415
|
}
|
|
3394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ConnectionService, decorators: [{
|
|
3395
3417
|
type: Injectable,
|
|
3396
3418
|
args: [{
|
|
3397
3419
|
providedIn: 'root'
|
|
@@ -3573,45 +3595,91 @@ class DeviceService {
|
|
|
3573
3595
|
// keyboard appears, so we dont't need to debounce
|
|
3574
3596
|
return this.isMobile ? 0 : 500;
|
|
3575
3597
|
}
|
|
3576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3577
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3598
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3599
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeviceService, providedIn: 'root' }); }
|
|
3578
3600
|
}
|
|
3579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DeviceService, decorators: [{
|
|
3580
3602
|
type: Injectable,
|
|
3581
3603
|
args: [{
|
|
3582
3604
|
providedIn: 'root'
|
|
3583
3605
|
}]
|
|
3584
3606
|
}], ctorParameters: () => [] });
|
|
3585
3607
|
|
|
3586
|
-
|
|
3608
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3609
|
+
const transformResponse = () => map((res) => (res.body ? res.body.objects.map((val) => val) : null));
|
|
3587
3610
|
/**
|
|
3588
3611
|
* Service for providing upload of different object types into a client.
|
|
3589
3612
|
*/
|
|
3590
3613
|
class UploadService {
|
|
3591
3614
|
constructor() {
|
|
3615
|
+
// #region Dependencies
|
|
3592
3616
|
this.#backend = inject(BackendService);
|
|
3593
3617
|
this.#http = inject(HttpClient);
|
|
3594
3618
|
this.#logger = inject(Logger);
|
|
3619
|
+
//#endregion
|
|
3620
|
+
//#region Properties
|
|
3595
3621
|
this.#status = { err: 0, items: [] };
|
|
3596
3622
|
this.#statusSource = new ReplaySubject();
|
|
3597
|
-
this.status$ = this.#statusSource.pipe(scan((acc, newVal) => ({ ...acc, ...newVal }), this.#status));
|
|
3598
3623
|
this.#uploadStatus = new BehaviorSubject(null);
|
|
3624
|
+
this.status$ = this.#statusSource.pipe(scan((acc, newVal) => ({ ...acc, ...newVal }), this.#status));
|
|
3599
3625
|
this.uploadStatus$ = this.#uploadStatus.asObservable();
|
|
3600
3626
|
}
|
|
3627
|
+
// #region Dependencies
|
|
3601
3628
|
#backend;
|
|
3602
3629
|
#http;
|
|
3603
3630
|
#logger;
|
|
3631
|
+
//#endregion
|
|
3632
|
+
//#region Properties
|
|
3604
3633
|
#status;
|
|
3605
3634
|
#statusSource;
|
|
3606
3635
|
#uploadStatus;
|
|
3636
|
+
//#endregion
|
|
3637
|
+
//#region Public Methods
|
|
3607
3638
|
/**
|
|
3608
3639
|
* Upload a file.
|
|
3609
3640
|
* @param url The URL to upload the file to
|
|
3610
3641
|
* @param file The file to be uploaded
|
|
3611
3642
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
3643
|
+
*
|
|
3644
|
+
* @deprecated use uploadFile instead. `label`, `silent` as well as `scope` can be provided through `options`.
|
|
3612
3645
|
*/
|
|
3613
3646
|
upload(url, file, label, silent) {
|
|
3614
|
-
return this.#executeUpload(url, file, label || file.name, silent);
|
|
3647
|
+
return this.#executeUpload(url, file, { label: label || file.name, silent: silent });
|
|
3648
|
+
}
|
|
3649
|
+
/**
|
|
3650
|
+
* Uploads a single file to the specified URL using the structured `FileUploadOptions` object.
|
|
3651
|
+
*
|
|
3652
|
+
* This is the preferred alternative to the legacy `upload()` method. It accepts a typed
|
|
3653
|
+
* options object instead of individual parameters, which makes it easier to pass optional
|
|
3654
|
+
* settings such as `silent` mode and `scope` without relying on positional arguments.
|
|
3655
|
+
*
|
|
3656
|
+
* **Behavior:**
|
|
3657
|
+
* - If `options.silent` is `false` (default), the upload appears in the upload overlay dialog
|
|
3658
|
+
* and progress is tracked via `status$`
|
|
3659
|
+
* - If `options.silent` is `true`, the upload runs quietly in the background with no UI feedback
|
|
3660
|
+
* - `options.label` is shown in the overlay dialog during upload; falls back to `file.name` if omitted
|
|
3661
|
+
* - `options.scope` tags the upload with a named scope, enabling an `UploadProgressComponent`
|
|
3662
|
+
* configured with the same scope to display only the uploads relevant to its section of the UI
|
|
3663
|
+
*
|
|
3664
|
+
* @param url - The backend URL to POST the file to
|
|
3665
|
+
* @param file - The `File` object to be uploaded
|
|
3666
|
+
* @param options - Upload configuration: label, silent mode, and optional scope
|
|
3667
|
+
* @returns An `Observable` that emits the server response on completion
|
|
3668
|
+
*
|
|
3669
|
+
* @example
|
|
3670
|
+
* ```typescript
|
|
3671
|
+
* // Standard upload with progress indicator
|
|
3672
|
+
* this.uploadService.uploadFile(url, file, { label: 'Uploading contract.pdf' }).subscribe();
|
|
3673
|
+
*
|
|
3674
|
+
* // Silent upload (no UI, runs in background)
|
|
3675
|
+
* this.uploadService.uploadFile(url, file, { label: 'document.pdf', silent: true }).subscribe();
|
|
3676
|
+
*
|
|
3677
|
+
* // Scoped upload — only the UploadProgressComponent with scope 'profile-editor' will show this
|
|
3678
|
+
* this.uploadService.uploadFile(url, file, { label: 'photo.jpg', scope: 'profile-editor' }).subscribe();
|
|
3679
|
+
* ```
|
|
3680
|
+
*/
|
|
3681
|
+
uploadFile(url, file, options) {
|
|
3682
|
+
return this.#executeUpload(url, file, options);
|
|
3615
3683
|
}
|
|
3616
3684
|
/**
|
|
3617
3685
|
* Upload files using multipart upload.
|
|
@@ -3619,18 +3687,110 @@ class UploadService {
|
|
|
3619
3687
|
* @param files The files to be uploaded
|
|
3620
3688
|
* @param data Data to be send along with the files
|
|
3621
3689
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
3690
|
+
*
|
|
3691
|
+
* @deprecated Use multipartUpload(url, files, options, data) instead. Provide scope through options.
|
|
3622
3692
|
*/
|
|
3623
3693
|
uploadMultipart(url, files, data, label, silent) {
|
|
3624
|
-
return this.#executeMultipartUpload(url, files, label
|
|
3694
|
+
return this.#executeMultipartUpload(url, files, { label, silent }, data);
|
|
3695
|
+
}
|
|
3696
|
+
/**
|
|
3697
|
+
* Uploads multiple files to the specified URL using a multipart/form-data request.
|
|
3698
|
+
*
|
|
3699
|
+
* This is the preferred method for multi-file uploads. It accepts a typed `FileUploadOptions`
|
|
3700
|
+
* object for configuration, making it easier to pass `scope` and other options compared
|
|
3701
|
+
* to the legacy `uploadMultipart()` overload.
|
|
3702
|
+
*
|
|
3703
|
+
* **Behavior:**
|
|
3704
|
+
* - All files are bundled into a single `FormData` payload under the `files` field
|
|
3705
|
+
* - Optional `data` is appended as a JSON blob under the `data` field
|
|
3706
|
+
* - If `options.silent` is `false` (default), upload progress is shown in the overlay dialog
|
|
3707
|
+
* - If `options.silent` is `true`, the upload runs in the background with no UI feedback
|
|
3708
|
+
* - `options.scope` tags the upload with a named scope, enabling an `UploadProgressComponent`
|
|
3709
|
+
* configured with the same scope to display only the uploads relevant to its section of the UI
|
|
3710
|
+
*
|
|
3711
|
+
* @param url - The backend URL to POST the multipart request to
|
|
3712
|
+
* @param files - Array of `File` objects to upload
|
|
3713
|
+
* @param options - Upload configuration: label (required), silent mode, and optional scope
|
|
3714
|
+
* @param data - Optional metadata object to send alongside the files (serialized as JSON)
|
|
3715
|
+
* @returns An `Observable` that emits the server response on completion
|
|
3716
|
+
*
|
|
3717
|
+
* @example
|
|
3718
|
+
* ```typescript
|
|
3719
|
+
* // Upload files with a visible progress indicator
|
|
3720
|
+
* this.uploadService.multipartUpload(url, files, { label: 'Uploading 3 files' }).subscribe();
|
|
3721
|
+
*
|
|
3722
|
+
* // Upload files with additional metadata
|
|
3723
|
+
* this.uploadService
|
|
3724
|
+
* .multipartUpload(url, files, { label: 'Batch upload' }, { folderId: 'abc123' })
|
|
3725
|
+
* .subscribe();
|
|
3726
|
+
*
|
|
3727
|
+
* // Scoped upload — only the UploadProgressComponent with scope 'mail-editor' will show this
|
|
3728
|
+
* this.uploadService
|
|
3729
|
+
* .multipartUpload(url, files, { label: 'attachments', scope: 'mail-editor' })
|
|
3730
|
+
* .subscribe();
|
|
3731
|
+
* ```
|
|
3732
|
+
*/
|
|
3733
|
+
multipartUpload(url, files, options, data) {
|
|
3734
|
+
return this.#executeMultipartUpload(url, files, options, data);
|
|
3625
3735
|
}
|
|
3736
|
+
/**
|
|
3737
|
+
* Creates a document on the server by sending structured metadata without a file attachment.
|
|
3738
|
+
*
|
|
3739
|
+
* Unlike `uploadFile()` and `multipartUpload()`, this method does not attach any file content.
|
|
3740
|
+
* It is intended for creating document objects from metadata alone — for example, creating
|
|
3741
|
+
* a folder, a placeholder record, or a document entry where the content stream will be
|
|
3742
|
+
* provided separately.
|
|
3743
|
+
*
|
|
3744
|
+
* **Behavior:**
|
|
3745
|
+
* - Sends the `data` object as a JSON blob inside a `FormData` payload
|
|
3746
|
+
* - Progress is NOT tracked — this method does not appear in `status$`
|
|
3747
|
+
* - Errors are re-thrown so the caller can handle them via the returned `Observable`
|
|
3748
|
+
*
|
|
3749
|
+
* @param url - The backend URL to POST the document creation request to
|
|
3750
|
+
* @param data - Metadata object describing the document to be created
|
|
3751
|
+
* @returns An `Observable` that emits the created object(s) on success
|
|
3752
|
+
*
|
|
3753
|
+
* @example
|
|
3754
|
+
* ```typescript
|
|
3755
|
+
* const metadata = {
|
|
3756
|
+
* objectTypeId: 'yuv:document',
|
|
3757
|
+
* properties: { 'yuv:title': 'My Document' }
|
|
3758
|
+
* };
|
|
3759
|
+
*
|
|
3760
|
+
* this.uploadService.createDocument(url, metadata).subscribe((result) => {
|
|
3761
|
+
* console.log('Created:', result);
|
|
3762
|
+
* });
|
|
3763
|
+
* ```
|
|
3764
|
+
*/
|
|
3626
3765
|
createDocument(url, data) {
|
|
3627
3766
|
const formData = this.#createFormData({ data });
|
|
3628
3767
|
const request = this.#createHttpRequest(url, { formData }, false);
|
|
3629
|
-
return this.#http.request(request).pipe(filter((obj) => obj
|
|
3768
|
+
return this.#http.request(request).pipe(filter((obj) => obj?.body), transformResponse(), catchError((err) => throwError(() => err)));
|
|
3630
3769
|
}
|
|
3631
3770
|
/**
|
|
3632
|
-
* Cancels
|
|
3633
|
-
*
|
|
3771
|
+
* Cancels one or all active upload requests and removes them from the tracked upload list.
|
|
3772
|
+
*
|
|
3773
|
+
* This method unsubscribes from the underlying HTTP request, effectively aborting the upload,
|
|
3774
|
+
* and removes the corresponding item(s) from the internal status list. The updated status
|
|
3775
|
+
* is then emitted via `status$` so that any subscribed UI components (e.g. the upload overlay)
|
|
3776
|
+
* can reflect the change immediately.
|
|
3777
|
+
*
|
|
3778
|
+
* **Behavior:**
|
|
3779
|
+
* - If `id` is provided, only the matching upload item is cancelled
|
|
3780
|
+
* - If `id` is omitted, **all** active uploads are cancelled at once
|
|
3781
|
+
* - If the provided `id` does not match any active item, the call is a no-op
|
|
3782
|
+
* - After cancellation, the error count on `status$` is recalculated
|
|
3783
|
+
*
|
|
3784
|
+
* @param id - Optional ID of the upload item to cancel. Omit to cancel all active uploads.
|
|
3785
|
+
*
|
|
3786
|
+
* @example
|
|
3787
|
+
* ```typescript
|
|
3788
|
+
* // Cancel a specific upload by ID
|
|
3789
|
+
* this.uploadService.cancelItem(uploadId);
|
|
3790
|
+
*
|
|
3791
|
+
* // Cancel all ongoing uploads (e.g. on component destroy or user confirmation)
|
|
3792
|
+
* this.uploadService.cancelItem();
|
|
3793
|
+
* ```
|
|
3634
3794
|
*/
|
|
3635
3795
|
cancelItem(id) {
|
|
3636
3796
|
if (id) {
|
|
@@ -3647,6 +3807,8 @@ class UploadService {
|
|
|
3647
3807
|
this.#status.err = this.#status.items.filter((i) => i.err).length;
|
|
3648
3808
|
this.#statusSource.next(this.#status);
|
|
3649
3809
|
}
|
|
3810
|
+
//#endregion
|
|
3811
|
+
//#region Utilities
|
|
3650
3812
|
/**
|
|
3651
3813
|
* Prepares Formdata for multipart upload.
|
|
3652
3814
|
* @param from contains form and or file
|
|
@@ -3654,6 +3816,7 @@ class UploadService {
|
|
|
3654
3816
|
#createFormData({ file, data }) {
|
|
3655
3817
|
const formData = new FormData();
|
|
3656
3818
|
(file || []).forEach((f) => formData.append('files', f, f.name));
|
|
3819
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
3657
3820
|
data ? formData.append('data', new Blob([JSON.stringify(data)], { type: 'application/json' })) : null;
|
|
3658
3821
|
return formData;
|
|
3659
3822
|
}
|
|
@@ -3666,8 +3829,8 @@ class UploadService {
|
|
|
3666
3829
|
*/
|
|
3667
3830
|
#createHttpRequest(url, content, reportProgress, method = 'POST') {
|
|
3668
3831
|
const { formData, file } = content;
|
|
3669
|
-
// add request param to bypass the
|
|
3670
|
-
url += `${url.
|
|
3832
|
+
// add request param to bypass the service-worker
|
|
3833
|
+
url += `${!url.includes('?') ? '?' : '&'}ngsw-bypass=1`;
|
|
3671
3834
|
let headers = this.#backend.getAuthHeaders();
|
|
3672
3835
|
if (file) {
|
|
3673
3836
|
headers = headers.set('Content-Disposition', `attachment; filename*=utf-8''${encodeURIComponent(file.name)}`);
|
|
@@ -3680,25 +3843,29 @@ class UploadService {
|
|
|
3680
3843
|
* @param file The file to be uploaded
|
|
3681
3844
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
3682
3845
|
*/
|
|
3683
|
-
#executeUpload(url, file,
|
|
3846
|
+
#executeUpload(url, file, options) {
|
|
3847
|
+
const silent = options.silent === true;
|
|
3848
|
+
const label = options.label || file.name;
|
|
3684
3849
|
const request = this.#createHttpRequest(url, { file }, !silent);
|
|
3685
3850
|
return silent
|
|
3686
3851
|
? this.#http.request(request).pipe(filter((res) => res instanceof HttpResponse))
|
|
3687
|
-
: this.#startUploadWithFile(request, label).pipe(transformResponse());
|
|
3852
|
+
: this.#startUploadWithFile(request, label, options.scope).pipe(transformResponse());
|
|
3688
3853
|
}
|
|
3689
3854
|
/**
|
|
3690
3855
|
* Prepare multipart upload.
|
|
3691
3856
|
* @param url The URL to upload the file to
|
|
3692
|
-
* @param
|
|
3857
|
+
* @param files Array of files to be uploaded
|
|
3693
3858
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
3694
3859
|
* @param data Data to be send along with the files
|
|
3695
3860
|
*/
|
|
3696
|
-
#executeMultipartUpload(url,
|
|
3697
|
-
const
|
|
3861
|
+
#executeMultipartUpload(url, files, options, data) {
|
|
3862
|
+
const label = options.label ?? 'Upload';
|
|
3863
|
+
const silent = options.silent === true;
|
|
3864
|
+
const formData = this.#createFormData({ file: files, data });
|
|
3698
3865
|
const request = this.#createHttpRequest(url, { formData }, !silent);
|
|
3699
3866
|
return silent
|
|
3700
3867
|
? this.#http.request(request).pipe(filter((res) => res instanceof HttpResponse))
|
|
3701
|
-
: this.#startUploadWithFile(request, label).pipe(transformResponse());
|
|
3868
|
+
: this.#startUploadWithFile(request, label, options.scope).pipe(transformResponse());
|
|
3702
3869
|
}
|
|
3703
3870
|
#generateResult(result) {
|
|
3704
3871
|
const objects = result.body?.objects;
|
|
@@ -3730,14 +3897,15 @@ class UploadService {
|
|
|
3730
3897
|
}
|
|
3731
3898
|
#createProgressStatus(event, progress, id) {
|
|
3732
3899
|
if (event.type === HttpEventType.UploadProgress) {
|
|
3733
|
-
const
|
|
3900
|
+
const fullPercentage = 100;
|
|
3901
|
+
const percentDone = Math.round((fullPercentage * event.loaded) / event.total);
|
|
3734
3902
|
progress.next(percentDone);
|
|
3735
3903
|
}
|
|
3736
3904
|
else if (event instanceof HttpResponse) {
|
|
3737
3905
|
progress.complete();
|
|
3738
3906
|
// add upload response
|
|
3739
3907
|
// this.status.items = this.status.items.filter(s => s.id !== id);
|
|
3740
|
-
const idx = this.#status.items.findIndex((
|
|
3908
|
+
const idx = this.#status.items.findIndex((item) => item.id === id);
|
|
3741
3909
|
if (idx !== -1) {
|
|
3742
3910
|
this.#status.items[idx].result = this.#generateResult(event);
|
|
3743
3911
|
this.#statusSource.next(this.#status);
|
|
@@ -3745,7 +3913,7 @@ class UploadService {
|
|
|
3745
3913
|
}
|
|
3746
3914
|
}
|
|
3747
3915
|
#createUploadError(err, progress, id) {
|
|
3748
|
-
const statusItem = this.#status.items.find((
|
|
3916
|
+
const statusItem = this.#status.items.find((item) => item.id === id);
|
|
3749
3917
|
statusItem.err = {
|
|
3750
3918
|
code: err.status,
|
|
3751
3919
|
message: err.error ? err.error.errorMessage : err.message
|
|
@@ -3761,8 +3929,8 @@ class UploadService {
|
|
|
3761
3929
|
* @param request Request to be executed
|
|
3762
3930
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
3763
3931
|
*/
|
|
3764
|
-
#startUploadWithFile(request, label) {
|
|
3765
|
-
return new Observable((
|
|
3932
|
+
#startUploadWithFile(request, label, scope) {
|
|
3933
|
+
return new Observable((uploadObserver) => {
|
|
3766
3934
|
const id = Utils.uuid();
|
|
3767
3935
|
const progress = new Subject();
|
|
3768
3936
|
let result;
|
|
@@ -3776,14 +3944,14 @@ class UploadService {
|
|
|
3776
3944
|
.subscribe({
|
|
3777
3945
|
next: (res) => (res.status ? (result = res) : null),
|
|
3778
3946
|
error: (err) => {
|
|
3779
|
-
|
|
3947
|
+
uploadObserver.error(err);
|
|
3780
3948
|
this.#uploadStatus.next(true);
|
|
3781
|
-
|
|
3949
|
+
uploadObserver.complete();
|
|
3782
3950
|
},
|
|
3783
3951
|
complete: () => {
|
|
3784
|
-
|
|
3952
|
+
uploadObserver.next(result);
|
|
3785
3953
|
this.#uploadStatus.next(true);
|
|
3786
|
-
|
|
3954
|
+
uploadObserver.complete();
|
|
3787
3955
|
}
|
|
3788
3956
|
});
|
|
3789
3957
|
this.#status.items.push({
|
|
@@ -3791,15 +3959,16 @@ class UploadService {
|
|
|
3791
3959
|
filename: label,
|
|
3792
3960
|
progress: progress.asObservable(),
|
|
3793
3961
|
subscription,
|
|
3962
|
+
scope: scope,
|
|
3794
3963
|
err: undefined
|
|
3795
3964
|
});
|
|
3796
3965
|
this.#statusSource.next(this.#status);
|
|
3797
3966
|
});
|
|
3798
3967
|
}
|
|
3799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
3800
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
3968
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3969
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UploadService, providedIn: 'root' }); }
|
|
3801
3970
|
}
|
|
3802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
3971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UploadService, decorators: [{
|
|
3803
3972
|
type: Injectable,
|
|
3804
3973
|
args: [{
|
|
3805
3974
|
providedIn: 'root'
|
|
@@ -3814,26 +3983,6 @@ class DmsService {
|
|
|
3814
3983
|
#backend = inject(BackendService);
|
|
3815
3984
|
#eventService = inject(EventService);
|
|
3816
3985
|
#uploadService = inject(UploadService);
|
|
3817
|
-
// general trigger operator to handle all dms events
|
|
3818
|
-
triggerEvent(event, id, silent = false) {
|
|
3819
|
-
return (stream) => stream.pipe(
|
|
3820
|
-
// update does not return permissions, so we need to re-load the whole dms object
|
|
3821
|
-
// TODO: Remove once permissions are provided
|
|
3822
|
-
switchMap((res) => (!id ? of(res) : this.getDmsObject(id))),
|
|
3823
|
-
// TODO: enable once permissions are provided
|
|
3824
|
-
// map((res) => this.searchResultToDmsObject(this.searchService.toSearchResult(res).items[0])),
|
|
3825
|
-
tap((res) => !silent && this.#eventService.trigger(event, res)));
|
|
3826
|
-
}
|
|
3827
|
-
// general trigger operator to handle all dms events
|
|
3828
|
-
#triggerEvents(event, ids, silent = false) {
|
|
3829
|
-
return (stream) => stream.pipe(
|
|
3830
|
-
// update does not return permissions, so we need to re-load the whole dms object
|
|
3831
|
-
// TODO: Remove once permissions are provided
|
|
3832
|
-
switchMap((res) => (!ids ? of(res) : this.getDmsObjects(ids))),
|
|
3833
|
-
// TODO: enable once permissions are provided
|
|
3834
|
-
// map((_res: any[]) => _res.map((res, i) => res?._error ? { ...res, id: ids?[i] } : this.searchResultToDmsObject(this.searchService.toSearchResult(res).items[0]))),
|
|
3835
|
-
map((_res) => _res.map((res, i) => (res?._error && ids ? { ...res, id: ids[i] } : res))), tap((res) => !silent && res.forEach((o) => o && this.#eventService.trigger(event, o))));
|
|
3836
|
-
}
|
|
3837
3986
|
/**
|
|
3838
3987
|
* Create new dms object(s). Providing an array of files here instead of one will create
|
|
3839
3988
|
* a new dms object for every file. In this case indexdata will shared across all files.
|
|
@@ -3845,12 +3994,15 @@ class DmsService {
|
|
|
3845
3994
|
* @returns Array of IDs of the objects that have been created
|
|
3846
3995
|
*/
|
|
3847
3996
|
createDmsObject(objectTypeId, indexdata, files, label, silent = false, options = { waitForSearchConsistency: true }) {
|
|
3848
|
-
const url = `${this.#backend.getApiBase(ApiBase.apiWeb)}/dms/objects
|
|
3997
|
+
const url = `${this.#backend.getApiBase(ApiBase.apiWeb)}/dms/objects` +
|
|
3998
|
+
`${options.waitForSearchConsistency ? '?waitForSearchConsistency=true' : ''}`;
|
|
3849
3999
|
const data = indexdata;
|
|
3850
4000
|
data[BaseObjectTypeField.OBJECT_TYPE_ID] = objectTypeId;
|
|
3851
|
-
const upload = files.length
|
|
4001
|
+
const upload = files.length
|
|
4002
|
+
? this.#uploadService.multipartUpload(url, files, { label: label ?? '', silent, scope: options.scope }, data)
|
|
4003
|
+
: this.#uploadService.createDocument(url, data);
|
|
3852
4004
|
return upload
|
|
3853
|
-
.pipe(map((res) => res.map((
|
|
4005
|
+
.pipe(map((res) => res.map((response) => response.properties[BaseObjectTypeField.OBJECT_ID].value)),
|
|
3854
4006
|
// TODO: Replace by proper solution
|
|
3855
4007
|
// Right now there is a gap between when the object was
|
|
3856
4008
|
// created and when it is indexed. So delaying here will
|
|
@@ -3875,17 +4027,66 @@ class DmsService {
|
|
|
3875
4027
|
* @param version version of the object to be restored
|
|
3876
4028
|
*/
|
|
3877
4029
|
restoreDmsObject(id, version, silent = false) {
|
|
4030
|
+
// eslint-disable-next-line max-len
|
|
3878
4031
|
const url = `/dms/objects/${id}/versions/${version}/actions/restore?waitForSearchConsistency=true&restoreParentId=false`;
|
|
3879
|
-
return this.#backend
|
|
4032
|
+
return this.#backend
|
|
4033
|
+
.post(url, {}, ApiBase.apiWeb)
|
|
4034
|
+
.pipe(this.triggerEvent(YuvEventType.DMS_OBJECT_UPDATED, id, silent));
|
|
3880
4035
|
}
|
|
3881
4036
|
/**
|
|
3882
4037
|
* Upload (add/replace) content to a dms object.
|
|
3883
4038
|
* @param objectId ID of the dms object to upload the file to
|
|
3884
4039
|
* @param file The file to be uploaded
|
|
3885
4040
|
* @param label A label that will show up in the upload overlay dialog while uploading
|
|
4041
|
+
*
|
|
4042
|
+
* @deprecated use uploadFileContent instead. Provide label and silent through `options`
|
|
3886
4043
|
*/
|
|
3887
4044
|
uploadContent(objectId, file, label, silent) {
|
|
3888
|
-
return this.#uploadService
|
|
4045
|
+
return this.#uploadService
|
|
4046
|
+
.upload(this.getContentPath(objectId), file, label, silent)
|
|
4047
|
+
.pipe(this.triggerEvent(YuvEventType.DMS_OBJECT_UPDATED, objectId));
|
|
4048
|
+
}
|
|
4049
|
+
/**
|
|
4050
|
+
* Uploads a file as the content of an existing DMS object, replacing or setting its content stream.
|
|
4051
|
+
*
|
|
4052
|
+
* This is the preferred alternative to the legacy `uploadContent()` method. It accepts a typed
|
|
4053
|
+
* `FileUploadOptions` object instead of individual parameters, which enables full control over
|
|
4054
|
+
* the upload label, silent mode, and scope-based progress visibility.
|
|
4055
|
+
*
|
|
4056
|
+
* After a successful upload, a `DMS_OBJECT_UPDATED` event is triggered automatically so that
|
|
4057
|
+
* any subscribed parts of the application can react to the change (e.g. refreshing a preview).
|
|
4058
|
+
*
|
|
4059
|
+
* **Behavior:**
|
|
4060
|
+
* - Targets the content endpoint of the given DMS object: `/dms/objects/{objectId}/contents/file`
|
|
4061
|
+
* - `options.label` is shown in the upload progress indicator; falls back to `file.name` if omitted
|
|
4062
|
+
* - If `options.silent` is `true`, the upload runs in the background with no UI feedback
|
|
4063
|
+
* and no `DMS_OBJECT_UPDATED` event is emitted
|
|
4064
|
+
* - `options.scope` tags the upload so that only the `UploadProgressComponent` instance
|
|
4065
|
+
* configured with the same scope will display progress for this upload
|
|
4066
|
+
*
|
|
4067
|
+
* @param objectId - ID of the DMS object whose content should be uploaded or replaced
|
|
4068
|
+
* @param file - The `File` object to upload as the new content stream
|
|
4069
|
+
* @param options - Upload configuration: label, silent mode, and optional scope
|
|
4070
|
+
* @returns An `Observable` that emits the updated DMS object on completion
|
|
4071
|
+
*
|
|
4072
|
+
* @example
|
|
4073
|
+
* ```typescript
|
|
4074
|
+
* // Replace content with a visible progress indicator
|
|
4075
|
+
* this.dmsService.uploadFileContent(objectId, file, { label: 'Uploading contract.pdf' }).subscribe();
|
|
4076
|
+
*
|
|
4077
|
+
* // Silent replacement (no UI feedback, no event emitted)
|
|
4078
|
+
* this.dmsService.uploadFileContent(objectId, file, { label: 'report.pdf', silent: true }).subscribe();
|
|
4079
|
+
*
|
|
4080
|
+
* // Scoped upload — only UploadProgressComponent with scope 'detail-panel' will show this
|
|
4081
|
+
* this.dmsService
|
|
4082
|
+
* .uploadFileContent(objectId, file, { label: 'photo.jpg', scope: 'detail-panel' })
|
|
4083
|
+
* .subscribe();
|
|
4084
|
+
* ```
|
|
4085
|
+
*/
|
|
4086
|
+
uploadFileContent(objectId, file, options) {
|
|
4087
|
+
return this.#uploadService
|
|
4088
|
+
.uploadFile(this.getContentPath(objectId), file, { ...options, label: options.label ?? file.name })
|
|
4089
|
+
.pipe(this.triggerEvent(YuvEventType.DMS_OBJECT_UPDATED, objectId));
|
|
3889
4090
|
}
|
|
3890
4091
|
/**
|
|
3891
4092
|
* Path of dms object content file.
|
|
@@ -3893,7 +4094,8 @@ class DmsService {
|
|
|
3893
4094
|
* @param version version number of the dms object
|
|
3894
4095
|
*/
|
|
3895
4096
|
getContentPath(objectId, version) {
|
|
3896
|
-
return `${this.#backend.getApiBase(ApiBase.apiWeb)}/dms/objects
|
|
4097
|
+
return (`${this.#backend.getApiBase(ApiBase.apiWeb)}/dms/objects/` +
|
|
4098
|
+
`${objectId}/contents/file${version ? '?version=' + version : ''}`);
|
|
3897
4099
|
}
|
|
3898
4100
|
/**
|
|
3899
4101
|
* Original API Path of dms object content file.
|
|
@@ -3902,7 +4104,8 @@ class DmsService {
|
|
|
3902
4104
|
* @param rendition should return rendition path of the dms object
|
|
3903
4105
|
*/
|
|
3904
4106
|
getFullContentPath(objectId, version, rendition = false) {
|
|
3905
|
-
return `${this.#backend.getApiBase(ApiBase.core, true)}/dms/objects
|
|
4107
|
+
return (`${this.#backend.getApiBase(ApiBase.core, true)}/dms/objects/` +
|
|
4108
|
+
`${objectId}${version ? '/versions/' + version : ''}/contents/${rendition ? 'renditions/pdf' : 'file'}`);
|
|
3906
4109
|
}
|
|
3907
4110
|
getSlideURI(objectId, mimeType) {
|
|
3908
4111
|
const supportedMimeTypes = ['*/*'];
|
|
@@ -3911,7 +4114,9 @@ class DmsService {
|
|
|
3911
4114
|
// check if mime type supports slides
|
|
3912
4115
|
supportedMimeTypes.forEach((p) => (supported = supported || Utils.patternToRegExp(p).test(mimeType)));
|
|
3913
4116
|
}
|
|
3914
|
-
return !mimeType || supported
|
|
4117
|
+
return !mimeType || supported
|
|
4118
|
+
? `${this.#backend.getApiBase(ApiBase.core, true)}/dms/objects/${objectId}/contents/renditions/slide`
|
|
4119
|
+
: undefined;
|
|
3915
4120
|
}
|
|
3916
4121
|
/**
|
|
3917
4122
|
* Downloads the content of dms objects.
|
|
@@ -3969,7 +4174,9 @@ class DmsService {
|
|
|
3969
4174
|
* @param tag The tag to be deleted
|
|
3970
4175
|
*/
|
|
3971
4176
|
deleteDmsObjectTag(id, tag, silent = false) {
|
|
3972
|
-
return this.#backend
|
|
4177
|
+
return this.#backend
|
|
4178
|
+
.delete(`/dms/objects/${id}/tags/${tag}`, ApiBase.core)
|
|
4179
|
+
.pipe(this.triggerEvent(YuvEventType.DMS_OBJECT_UPDATED, id, silent));
|
|
3973
4180
|
}
|
|
3974
4181
|
/**
|
|
3975
4182
|
* Update indexdata of a dms object.
|
|
@@ -4070,7 +4277,9 @@ class DmsService {
|
|
|
4070
4277
|
*/
|
|
4071
4278
|
getDmsObjects(ids, silent = false) {
|
|
4072
4279
|
return this.batchGet(ids)
|
|
4073
|
-
.pipe(map((_res) => _res.map((res, i) =>
|
|
4280
|
+
.pipe(map((_res) => _res.map((res, i) => res?._error
|
|
4281
|
+
? { ...res, id: ids[i] }
|
|
4282
|
+
: this.#searchResultToDmsObject(this.#searchService.toSearchResult(res).items[0]))))
|
|
4074
4283
|
.pipe(this.#triggerEvents(YuvEventType.DMS_OBJECT_LOADED, undefined, silent));
|
|
4075
4284
|
}
|
|
4076
4285
|
/**
|
|
@@ -4135,9 +4344,6 @@ class DmsService {
|
|
|
4135
4344
|
content: res.contentStreams?.[0]
|
|
4136
4345
|
});
|
|
4137
4346
|
}
|
|
4138
|
-
#searchResultToDmsObject(resItem) {
|
|
4139
|
-
return new DmsObject(resItem);
|
|
4140
|
-
}
|
|
4141
4347
|
/**
|
|
4142
4348
|
* Transforms a plain data object to a DmsObject.
|
|
4143
4349
|
* @param data The plain data object
|
|
@@ -4201,7 +4407,9 @@ class DmsService {
|
|
|
4201
4407
|
if (o.properties[key].resolvedValues) {
|
|
4202
4408
|
value.forEach((v) => {
|
|
4203
4409
|
Object.keys(v).forEach((k) => {
|
|
4204
|
-
const resValue = Array.isArray(v[k])
|
|
4410
|
+
const resValue = Array.isArray(v[k])
|
|
4411
|
+
? v[k].map((i) => o.properties[key].resolvedValues[i])
|
|
4412
|
+
: o.properties[key].resolvedValues[v[k]];
|
|
4205
4413
|
if (resValue) {
|
|
4206
4414
|
v[`${k}_title`] = resValue;
|
|
4207
4415
|
}
|
|
@@ -4218,10 +4426,10 @@ class DmsService {
|
|
|
4218
4426
|
// Objects that don't have files attached won't have this section
|
|
4219
4427
|
let content;
|
|
4220
4428
|
if (o.contentStreams && o.contentStreams.length > 0) {
|
|
4221
|
-
// we assume that each result object only has ONE file attached,
|
|
4429
|
+
// we assume that each result object only has ONE file attached, although
|
|
4222
4430
|
// this is an array and there may be more
|
|
4223
4431
|
const contentStream = o.contentStreams[0];
|
|
4224
|
-
// also add
|
|
4432
|
+
// also add content-stream related fields to the result fields
|
|
4225
4433
|
fields.set(ContentStreamField.LENGTH, contentStream.length);
|
|
4226
4434
|
fields.set(ContentStreamField.MIME_TYPE, contentStream.mimeType);
|
|
4227
4435
|
fields.set(ContentStreamField.FILENAME, contentStream.fileName);
|
|
@@ -4241,8 +4449,10 @@ class DmsService {
|
|
|
4241
4449
|
size: contentStream.length
|
|
4242
4450
|
};
|
|
4243
4451
|
}
|
|
4244
|
-
const objectTypeId = o.properties[BaseObjectTypeField.OBJECT_TYPE_ID]
|
|
4245
|
-
|
|
4452
|
+
const objectTypeId = o.properties[BaseObjectTypeField.OBJECT_TYPE_ID]
|
|
4453
|
+
? o.properties[BaseObjectTypeField.OBJECT_TYPE_ID].value
|
|
4454
|
+
: null;
|
|
4455
|
+
if (!objectTypes.includes(objectTypeId)) {
|
|
4246
4456
|
objectTypes.push(objectTypeId);
|
|
4247
4457
|
}
|
|
4248
4458
|
resultListItems.push({
|
|
@@ -4260,10 +4470,34 @@ class DmsService {
|
|
|
4260
4470
|
};
|
|
4261
4471
|
return result;
|
|
4262
4472
|
}
|
|
4263
|
-
|
|
4264
|
-
|
|
4473
|
+
// general trigger operator to handle all dms events
|
|
4474
|
+
triggerEvent(event, id, silent = false) {
|
|
4475
|
+
return (stream) => stream.pipe(
|
|
4476
|
+
// update does not return permissions, so we need to re-load the whole dms object
|
|
4477
|
+
// TODO: Remove once permissions are provided
|
|
4478
|
+
switchMap((res) => (!id ? of(res) : this.getDmsObject(id))),
|
|
4479
|
+
// TODO: enable once permissions are provided
|
|
4480
|
+
// map((res) => this.searchResultToDmsObject(this.searchService.toSearchResult(res).items[0])),
|
|
4481
|
+
tap((res) => !silent && this.#eventService.trigger(event, res)));
|
|
4482
|
+
}
|
|
4483
|
+
// general trigger operator to handle all dms events
|
|
4484
|
+
#triggerEvents(event, ids, silent = false) {
|
|
4485
|
+
return (stream) => stream.pipe(
|
|
4486
|
+
// update does not return permissions, so we need to re-load the whole dms object
|
|
4487
|
+
// TODO: Remove once permissions are provided
|
|
4488
|
+
switchMap((res) => (!ids ? of(res) : this.getDmsObjects(ids))),
|
|
4489
|
+
// TODO: enable once permissions are provided
|
|
4490
|
+
// map((_res: any[]) => _res.map((res, i) => res?._error ?
|
|
4491
|
+
// { ...res, id: ids?[i] } : this.searchResultToDmsObject(this.searchService.toSearchResult(res).items[0]))),
|
|
4492
|
+
map((_res) => _res.map((res, i) => (res?._error && ids ? { ...res, id: ids[i] } : res))), tap((res) => !silent && res.forEach((o) => o && this.#eventService.trigger(event, o))));
|
|
4493
|
+
}
|
|
4494
|
+
#searchResultToDmsObject(resItem) {
|
|
4495
|
+
return new DmsObject(resItem);
|
|
4496
|
+
}
|
|
4497
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DmsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4498
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DmsService, providedIn: 'root' }); }
|
|
4265
4499
|
}
|
|
4266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
4500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DmsService, decorators: [{
|
|
4267
4501
|
type: Injectable,
|
|
4268
4502
|
args: [{
|
|
4269
4503
|
providedIn: 'root'
|
|
@@ -4358,10 +4592,10 @@ class IdmService {
|
|
|
4358
4592
|
}
|
|
4359
4593
|
});
|
|
4360
4594
|
}
|
|
4361
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4362
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
4595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IdmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4596
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IdmService, providedIn: 'root' }); }
|
|
4363
4597
|
}
|
|
4364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
4598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: IdmService, decorators: [{
|
|
4365
4599
|
type: Injectable,
|
|
4366
4600
|
args: [{
|
|
4367
4601
|
providedIn: 'root'
|
|
@@ -4543,10 +4777,10 @@ class ToastService {
|
|
|
4543
4777
|
style.innerHTML = YuvToastStyles;
|
|
4544
4778
|
this.document.head.appendChild(style);
|
|
4545
4779
|
}
|
|
4546
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4547
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
4780
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ToastService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4781
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ToastService, providedIn: 'root' }); }
|
|
4548
4782
|
}
|
|
4549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
4783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ToastService, decorators: [{
|
|
4550
4784
|
type: Injectable,
|
|
4551
4785
|
args: [{
|
|
4552
4786
|
providedIn: 'root'
|
|
@@ -4671,10 +4905,10 @@ class NotificationService {
|
|
|
4671
4905
|
}
|
|
4672
4906
|
}
|
|
4673
4907
|
}
|
|
4674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4675
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
4908
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4909
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
|
|
4676
4910
|
}
|
|
4677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
4911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NotificationService, decorators: [{
|
|
4678
4912
|
type: Injectable,
|
|
4679
4913
|
args: [{
|
|
4680
4914
|
providedIn: 'root'
|
|
@@ -4811,10 +5045,10 @@ class PendingChangesService {
|
|
|
4811
5045
|
this.#tasks = [];
|
|
4812
5046
|
this.#tasksSource.next(this.#tasks);
|
|
4813
5047
|
}
|
|
4814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4815
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5048
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5049
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesService, providedIn: 'root' }); }
|
|
4816
5050
|
}
|
|
4817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesService, decorators: [{
|
|
4818
5052
|
type: Injectable,
|
|
4819
5053
|
args: [{
|
|
4820
5054
|
providedIn: 'root'
|
|
@@ -4832,10 +5066,10 @@ class PendingChangesGuard {
|
|
|
4832
5066
|
// if there are no pending changes, just allow deactivation; else confirm first
|
|
4833
5067
|
return !this.pendingChanges.check(component);
|
|
4834
5068
|
}
|
|
4835
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4836
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesGuard, deps: [{ token: PendingChangesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5070
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesGuard, providedIn: 'root' }); }
|
|
4837
5071
|
}
|
|
4838
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PendingChangesGuard, decorators: [{
|
|
4839
5073
|
type: Injectable,
|
|
4840
5074
|
args: [{
|
|
4841
5075
|
providedIn: 'root'
|
|
@@ -4990,10 +5224,10 @@ class DialogCloseGuard {
|
|
|
4990
5224
|
dialogRef.disableClose = true;
|
|
4991
5225
|
return merge(dialogRef.backdropClick(), dialogRef.keydownEvents().pipe(filter$1((event) => event.key === 'Escape'))).pipe(switchMap$1(() => of(this.#pendingChangesService.check())), map$1((canClose) => !canClose && dialogRef.close()));
|
|
4992
5226
|
}
|
|
4993
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
4994
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5227
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogCloseGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5228
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogCloseGuard }); }
|
|
4995
5229
|
}
|
|
4996
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogCloseGuard, decorators: [{
|
|
4997
5231
|
type: Injectable
|
|
4998
5232
|
}] });
|
|
4999
5233
|
|
|
@@ -5011,10 +5245,10 @@ class TabGuardDirective {
|
|
|
5011
5245
|
const hasPending = this.#pending.hasPendingTask();
|
|
5012
5246
|
this.#tabGroup._tabs.forEach((tab, i) => (tab.disabled = hasPending && i !== activeIndex));
|
|
5013
5247
|
}
|
|
5014
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5015
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
5248
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TabGuardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5249
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: TabGuardDirective, isStandalone: true, selector: "mat-tab-group[yuvTabGuardDisable]", ngImport: i0 }); }
|
|
5016
5250
|
}
|
|
5017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TabGuardDirective, decorators: [{
|
|
5018
5252
|
type: Directive,
|
|
5019
5253
|
args: [{
|
|
5020
5254
|
selector: 'mat-tab-group[yuvTabGuardDisable]'
|
|
@@ -5065,10 +5299,10 @@ class PredictionService {
|
|
|
5065
5299
|
}
|
|
5066
5300
|
}), {})));
|
|
5067
5301
|
}
|
|
5068
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5069
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5302
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PredictionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5303
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PredictionService, providedIn: 'root' }); }
|
|
5070
5304
|
}
|
|
5071
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: PredictionService, decorators: [{
|
|
5072
5306
|
type: Injectable,
|
|
5073
5307
|
args: [{
|
|
5074
5308
|
providedIn: 'root'
|
|
@@ -5127,10 +5361,10 @@ class RetentionService {
|
|
|
5127
5361
|
else
|
|
5128
5362
|
return { underRetention: false };
|
|
5129
5363
|
}
|
|
5130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5131
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RetentionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5365
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RetentionService, providedIn: 'root' }); }
|
|
5132
5366
|
}
|
|
5133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RetentionService, decorators: [{
|
|
5134
5368
|
type: Injectable,
|
|
5135
5369
|
args: [{
|
|
5136
5370
|
providedIn: 'root'
|
|
@@ -5319,10 +5553,10 @@ class SessionStorageService {
|
|
|
5319
5553
|
}
|
|
5320
5554
|
return res;
|
|
5321
5555
|
}
|
|
5322
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5323
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SessionStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5557
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SessionStorageService, providedIn: 'root' }); }
|
|
5324
5558
|
}
|
|
5325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SessionStorageService, decorators: [{
|
|
5326
5560
|
type: Injectable,
|
|
5327
5561
|
args: [{
|
|
5328
5562
|
providedIn: 'root'
|
|
@@ -5353,10 +5587,10 @@ class UserStorageService {
|
|
|
5353
5587
|
#sanitizeSection(section) {
|
|
5354
5588
|
return encodeURIComponent(section);
|
|
5355
5589
|
}
|
|
5356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5357
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5591
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserStorageService, providedIn: 'root' }); }
|
|
5358
5592
|
}
|
|
5359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UserStorageService, decorators: [{
|
|
5360
5594
|
type: Injectable,
|
|
5361
5595
|
args: [{
|
|
5362
5596
|
providedIn: 'root'
|
|
@@ -5374,10 +5608,10 @@ class LocaleDecimalPipe extends DecimalPipe {
|
|
|
5374
5608
|
transform(value, digits, locale) {
|
|
5375
5609
|
return super.transform(value, digits, locale || this.translate.currentLang || 'en');
|
|
5376
5610
|
}
|
|
5377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5378
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleDecimalPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5612
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: LocaleDecimalPipe, isStandalone: true, name: "localeDecimal" }); }
|
|
5379
5613
|
}
|
|
5380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleDecimalPipe, decorators: [{
|
|
5381
5615
|
type: Pipe,
|
|
5382
5616
|
args: [{
|
|
5383
5617
|
name: 'localeDecimal',
|
|
@@ -5395,10 +5629,10 @@ class LocalePercentPipe extends PercentPipe {
|
|
|
5395
5629
|
transform(value, digits, locale) {
|
|
5396
5630
|
return super.transform(value, digits, locale || this.translate.currentLang || 'en');
|
|
5397
5631
|
}
|
|
5398
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5399
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5632
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocalePercentPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5633
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: LocalePercentPipe, isStandalone: true, name: "localePercent", pure: false }); }
|
|
5400
5634
|
}
|
|
5401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocalePercentPipe, decorators: [{
|
|
5402
5636
|
type: Pipe,
|
|
5403
5637
|
args: [{
|
|
5404
5638
|
name: 'localePercent',
|
|
@@ -5417,10 +5651,10 @@ class LocaleCurrencyPipe extends CurrencyPipe {
|
|
|
5417
5651
|
transform(value, currencyCode, display, digits, locale) {
|
|
5418
5652
|
return super.transform(value, currencyCode, display, digits, locale || this.translate.currentLang || 'en');
|
|
5419
5653
|
}
|
|
5420
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5421
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5654
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleCurrencyPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5655
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: LocaleCurrencyPipe, isStandalone: true, name: "localeCurrency" }); }
|
|
5422
5656
|
}
|
|
5423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleCurrencyPipe, decorators: [{
|
|
5424
5658
|
type: Pipe,
|
|
5425
5659
|
args: [{
|
|
5426
5660
|
name: 'localeCurrency',
|
|
@@ -5462,10 +5696,10 @@ class LocaleNumberPipe {
|
|
|
5462
5696
|
scale = typeof scale === 'number' ? scale : 2;
|
|
5463
5697
|
return this.transform(value, grouping, pattern, scale, `1.${scale}-${scale}`);
|
|
5464
5698
|
}
|
|
5465
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5466
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5699
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleNumberPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5700
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: LocaleNumberPipe, isStandalone: true, name: "localeNumber" }); }
|
|
5467
5701
|
}
|
|
5468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleNumberPipe, decorators: [{
|
|
5469
5703
|
type: Pipe,
|
|
5470
5704
|
args: [{
|
|
5471
5705
|
name: 'localeNumber',
|
|
@@ -5499,10 +5733,10 @@ class FileSizePipe extends LocaleNumberPipe {
|
|
|
5499
5733
|
const number = super.stringToNumber((match ? match[1] : value).trim());
|
|
5500
5734
|
return isNaN(number) ? number : Math.round(number * Math.pow(1024, match ? sizes.indexOf(match[2]) : 0));
|
|
5501
5735
|
}
|
|
5502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5503
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5736
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FileSizePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5737
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: FileSizePipe, isStandalone: true, name: "fileSize" }); }
|
|
5504
5738
|
}
|
|
5505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FileSizePipe, decorators: [{
|
|
5506
5740
|
type: Pipe,
|
|
5507
5741
|
args: [{ name: 'fileSize', standalone: true }]
|
|
5508
5742
|
}] });
|
|
@@ -5537,10 +5771,10 @@ class LocaleDatePipe {
|
|
|
5537
5771
|
}
|
|
5538
5772
|
}
|
|
5539
5773
|
}
|
|
5540
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5541
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5774
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleDatePipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5775
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: LocaleDatePipe, isStandalone: true, name: "localeDate" }); }
|
|
5542
5776
|
}
|
|
5543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: LocaleDatePipe, decorators: [{
|
|
5544
5778
|
type: Pipe,
|
|
5545
5779
|
args: [{
|
|
5546
5780
|
name: 'localeDate',
|
|
@@ -5561,10 +5795,10 @@ class SafeHtmlPipe {
|
|
|
5561
5795
|
transform(style) {
|
|
5562
5796
|
return this.sanitizer.bypassSecurityTrustHtml(style);
|
|
5563
5797
|
}
|
|
5564
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5565
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5798
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5799
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: SafeHtmlPipe, isStandalone: true, name: "safeHtml" }); }
|
|
5566
5800
|
}
|
|
5567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
5568
5802
|
type: Pipe,
|
|
5569
5803
|
args: [{ name: 'safeHtml', standalone: true }]
|
|
5570
5804
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
|
@@ -5580,10 +5814,10 @@ class SafeUrlPipe {
|
|
|
5580
5814
|
transform(url) {
|
|
5581
5815
|
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
5582
5816
|
}
|
|
5583
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5584
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5817
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafeUrlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5818
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: SafeUrlPipe, isStandalone: true, name: "safeUrl" }); }
|
|
5585
5819
|
}
|
|
5586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafeUrlPipe, decorators: [{
|
|
5587
5821
|
type: Pipe,
|
|
5588
5822
|
args: [{ name: 'safeUrl', standalone: true }]
|
|
5589
5823
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
|
@@ -5595,10 +5829,10 @@ class KeysPipe {
|
|
|
5595
5829
|
transform(value) {
|
|
5596
5830
|
return Object.keys(value);
|
|
5597
5831
|
}
|
|
5598
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5599
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
5832
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5833
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys", pure: false }); }
|
|
5600
5834
|
}
|
|
5601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KeysPipe, decorators: [{
|
|
5602
5836
|
type: Pipe,
|
|
5603
5837
|
args: [{ name: 'keys', pure: false, standalone: true }]
|
|
5604
5838
|
}] });
|
|
@@ -5631,10 +5865,10 @@ class NativeNotificationService {
|
|
|
5631
5865
|
};
|
|
5632
5866
|
}
|
|
5633
5867
|
}
|
|
5634
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
5635
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
5868
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NativeNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5869
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NativeNotificationService, providedIn: 'root' }); }
|
|
5636
5870
|
}
|
|
5637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
5871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NativeNotificationService, decorators: [{
|
|
5638
5872
|
type: Injectable,
|
|
5639
5873
|
args: [{
|
|
5640
5874
|
providedIn: 'root'
|
|
@@ -5724,7 +5958,9 @@ let EoxTranslateJsonLoader = class EoxTranslateJsonLoader {
|
|
|
5724
5958
|
return forkJoin(t).pipe(map((res) => res.reduce((acc, x) => Object.assign(acc, x), {})));
|
|
5725
5959
|
}
|
|
5726
5960
|
loadTranslationFile(path, lang) {
|
|
5727
|
-
|
|
5961
|
+
const version = document.body.dataset['bt'] ?? document.body.dataset['version'];
|
|
5962
|
+
const cacheBuster = version ? `?v=${version}` : '';
|
|
5963
|
+
return this.http.get(`${Utils.getBaseHref()}${path}${lang}.json${cacheBuster}`).pipe(catchError(() => {
|
|
5728
5964
|
// ISO codes with more than 2 characters are sub-languages like de-CH.
|
|
5729
5965
|
// If there is no translation file for that sub-language we'll try to load
|
|
5730
5966
|
// the file for the base language (in this case de).
|