@eo-sdk/client 10.5.0-rc.2 → 10.6.0-rc.10
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/app/eo-client/about-state/about-state.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/dashboard.component.d.ts +5 -3
- package/app/eo-client/dashboard/dashboard.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/charts-widget/charts-setup/charts-setup.component.d.ts +14 -6
- package/app/eo-client/dashboard/widgets/charts-widget/charts-setup/charts-setup.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/charts-widget/charts-widget.component.d.ts +1 -2
- package/app/eo-client/dashboard/widgets/charts-widget/charts-widget.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/charts-widget/icharts.d.ts +1 -0
- package/app/eo-client/dashboard/widgets/charts-widget/icharts.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-setup/hitlist-setup.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-widget.component.d.ts.map +1 -1
- package/app/eo-client/dashboard/widgets/search-widget/search-widget.component.d.ts +1 -0
- package/app/eo-client/dashboard/widgets/search-widget/search-widget.component.d.ts.map +1 -1
- package/app/eo-client/login/login.component.d.ts +2 -4
- package/app/eo-client/login/login.component.d.ts.map +1 -1
- package/app/eo-client/settings/settings.component.d.ts +2 -4
- package/app/eo-client/settings/settings.component.d.ts.map +1 -1
- package/app/eo-framework/actions/actions/add-resubmission-action/add-resubmission/add-resubmission.component.d.ts +1 -0
- package/app/eo-framework/actions/actions/add-resubmission-action/add-resubmission/add-resubmission.component.d.ts.map +1 -1
- package/app/eo-framework/actions/actions/clipboard/clipboard-action.d.ts.map +1 -1
- package/app/eo-framework/app-shell/app-bar/app-bar.component.d.ts +10 -5
- package/app/eo-framework/app-shell/app-bar/app-bar.component.d.ts.map +1 -1
- package/app/eo-framework/form-elements/date/date.component.d.ts +2 -1
- package/app/eo-framework/form-elements/date/date.component.d.ts.map +1 -1
- package/app/eo-framework/form-elements/id-reference/id-reference.component.d.ts +1 -0
- package/app/eo-framework/form-elements/id-reference/id-reference.component.d.ts.map +1 -1
- package/app/eo-framework/form-elements/organization/organization.component.d.ts +3 -1
- package/app/eo-framework/form-elements/organization/organization.component.d.ts.map +1 -1
- package/app/eo-framework/form-elements/string/string.component.d.ts +2 -3
- package/app/eo-framework/form-elements/string/string.component.d.ts.map +1 -1
- package/app/eo-framework/inbox-details/inbox-details.component.d.ts +2 -1
- package/app/eo-framework/inbox-details/inbox-details.component.d.ts.map +1 -1
- package/app/eo-framework/media/media.component.d.ts +6 -1
- package/app/eo-framework/media/media.component.d.ts.map +1 -1
- package/app/eo-framework/object-details/object-details.component.d.ts +7 -9
- package/app/eo-framework/object-details/object-details.component.d.ts.map +1 -1
- package/app/eo-framework/object-details/object-details.module.d.ts +2 -1
- package/app/eo-framework/object-details/object-details.module.d.ts.map +1 -1
- package/app/eo-framework/object-form/object-form/form-element-table/form-element-table.component.d.ts +13 -4
- package/app/eo-framework/object-form/object-form/form-element-table/form-element-table.component.d.ts.map +1 -1
- package/app/eo-framework/object-form/object-form/form-element-table/row-edit/row-edit.component.d.ts +1 -0
- package/app/eo-framework/object-form/object-form/form-element-table/row-edit/row-edit.component.d.ts.map +1 -1
- package/app/eo-framework/object-state-details/object-state-details.component.d.ts +5 -3
- package/app/eo-framework/object-state-details/object-state-details.component.d.ts.map +1 -1
- package/app/eo-framework/plugins/plugin.component.d.ts +7 -7
- package/app/eo-framework/plugins/plugin.component.d.ts.map +1 -1
- package/app/eo-framework/plugins/plugins.module.d.ts +1 -1
- package/app/eo-framework/process/details/process-details.component.d.ts +2 -1
- package/app/eo-framework/process/details/process-details.component.d.ts.map +1 -1
- package/app/eo-framework/recyclebin-details/recyclebin-details.component.d.ts +2 -1
- package/app/eo-framework/recyclebin-details/recyclebin-details.component.d.ts.map +1 -1
- package/app/eo-framework/ui/eo-dialog/eo-dialog.component.d.ts +5 -18
- package/app/eo-framework/ui/eo-dialog/eo-dialog.component.d.ts.map +1 -1
- package/app/eo-framework/ui/ui.module.d.ts +3 -2
- package/app/eo-framework/ui/ui.module.d.ts.map +1 -1
- package/app/eo-framework-core/api/grid.service.d.ts.map +1 -1
- package/app/eo-framework-core/api/plugins.service.d.ts +6 -0
- package/app/eo-framework-core/api/plugins.service.d.ts.map +1 -1
- package/assets/_default/i18n/de.json +25 -7
- package/assets/_default/i18n/en.json +35 -18
- package/assets/_default/svg/ic_export.svg +1 -0
- package/assets/_default/svg/ic_import.svg +1 -0
- package/assets/_default/svg/ic_upload2.svg +1 -0
- package/esm2020/app/eo-client/about-state/about-state.component.mjs +3 -3
- package/esm2020/app/eo-client/dashboard/dashboard.component.mjs +31 -8
- package/esm2020/app/eo-client/dashboard/widgets/charts-widget/charts-setup/charts-setup.component.mjs +84 -13
- package/esm2020/app/eo-client/dashboard/widgets/charts-widget/charts-widget.component.mjs +113 -68
- package/esm2020/app/eo-client/dashboard/widgets/charts-widget/icharts.mjs +1 -1
- package/esm2020/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-setup/hitlist-setup.component.mjs +15 -6
- package/esm2020/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-widget.component.mjs +15 -4
- package/esm2020/app/eo-client/dashboard/widgets/last-edited-widget/last-edited-and-created.component.mjs +7 -8
- package/esm2020/app/eo-client/dashboard/widgets/search-widget/search-widget.component.mjs +11 -3
- package/esm2020/app/eo-client/favorite-state/favorite-state.component.mjs +5 -5
- package/esm2020/app/eo-client/inbox-state/inbox-state/inbox-state.component.mjs +5 -5
- package/esm2020/app/eo-client/login/login.component.mjs +7 -11
- package/esm2020/app/eo-client/notifications-state/notifications-state.component.mjs +5 -5
- package/esm2020/app/eo-client/object-state/object-state/object-state.component.mjs +7 -7
- package/esm2020/app/eo-client/process-state/process-state.component.mjs +5 -5
- package/esm2020/app/eo-client/recyclebin-state/recyclebin-state.component.mjs +5 -5
- package/esm2020/app/eo-client/result-state/result-state.component.mjs +5 -5
- package/esm2020/app/eo-client/settings/settings.component.mjs +6 -10
- package/esm2020/app/eo-client/version-state/version-state.component.mjs +5 -5
- package/esm2020/app/eo-framework/actions/actions/add-resubmission-action/add-resubmission/add-resubmission.component.mjs +10 -4
- package/esm2020/app/eo-framework/actions/actions/clipboard/clipboard-action.mjs +2 -3
- package/esm2020/app/eo-framework/actions/actions/download-action/download-action.mjs +2 -2
- package/esm2020/app/eo-framework/actions/actions/signature-action/signature-action.component.mjs +5 -5
- package/esm2020/app/eo-framework/app-shell/app-bar/app-add/app-add-dialog/app-add-dialog.component.mjs +1 -1
- package/esm2020/app/eo-framework/app-shell/app-bar/app-bar.component.mjs +44 -19
- package/esm2020/app/eo-framework/app-shell/app-bar/app-search/app-search.component.mjs +1 -1
- package/esm2020/app/eo-framework/app-shell/app-bar/side-bar/side-bar.component.mjs +2 -2
- package/esm2020/app/eo-framework/form-elements/checkbox/checkbox.component.mjs +4 -3
- package/esm2020/app/eo-framework/form-elements/codesystem/codesystem.component.mjs +1 -1
- package/esm2020/app/eo-framework/form-elements/date/date.component.mjs +7 -4
- package/esm2020/app/eo-framework/form-elements/datetime-range/datetime-range.component.mjs +1 -1
- package/esm2020/app/eo-framework/form-elements/dynamic-list/dynamic-list.component.mjs +3 -3
- package/esm2020/app/eo-framework/form-elements/form-input/form-input.component.mjs +2 -2
- package/esm2020/app/eo-framework/form-elements/id-reference/id-reference.component.mjs +10 -3
- package/esm2020/app/eo-framework/form-elements/organization/organization.component.mjs +11 -3
- package/esm2020/app/eo-framework/form-elements/reference/reference.component.mjs +1 -1
- package/esm2020/app/eo-framework/form-elements/string/string.component.mjs +5 -6
- package/esm2020/app/eo-framework/grid/filters/codesystem-filter.component.mjs +1 -1
- package/esm2020/app/eo-framework/grid/filters/datetime-filter.component.mjs +3 -3
- package/esm2020/app/eo-framework/grid/filters/dynamic-list-filter.component.mjs +3 -3
- package/esm2020/app/eo-framework/grid/filters/organization-filter.component.mjs +1 -1
- package/esm2020/app/eo-framework/grid/grid.component.mjs +2 -2
- package/esm2020/app/eo-framework/inbox-details/inbox-details.component.mjs +10 -13
- package/esm2020/app/eo-framework/media/media.component.mjs +13 -8
- package/esm2020/app/eo-framework/object-details/object-details.component.mjs +44 -36
- package/esm2020/app/eo-framework/object-details/object-details.module.mjs +7 -3
- package/esm2020/app/eo-framework/object-form/object-form/form-element/form-element.component.mjs +3 -3
- package/esm2020/app/eo-framework/object-form/object-form/form-element-table/form-element-table.component.mjs +130 -15
- package/esm2020/app/eo-framework/object-form/object-form/form-element-table/form-element.interface.mjs +1 -1
- package/esm2020/app/eo-framework/object-form/object-form/form-element-table/row-edit/row-edit.component.mjs +11 -3
- package/esm2020/app/eo-framework/object-state-details/object-state-details.component.mjs +19 -23
- package/esm2020/app/eo-framework/plugins/plugin.component.mjs +19 -27
- package/esm2020/app/eo-framework/plugins/plugins.module.mjs +6 -6
- package/esm2020/app/eo-framework/prepare-details/prepare-details.component.mjs +3 -3
- package/esm2020/app/eo-framework/process/details/process-details.component.mjs +10 -13
- package/esm2020/app/eo-framework/recyclebin-details/recyclebin-details.component.mjs +7 -7
- package/esm2020/app/eo-framework/stored-query/stored-query/stored-query.component.mjs +2 -2
- package/esm2020/app/eo-framework/ui/eo-dialog/eo-dialog.component.mjs +35 -119
- package/esm2020/app/eo-framework/ui/ui.module.mjs +5 -1
- package/esm2020/app/eo-framework-core/api/grid.service.mjs +3 -2
- package/esm2020/app/eo-framework-core/api/plugins.service.mjs +10 -3
- package/esm2020/projects/eo-sdk/core/lib/service/auth/auth.service.mjs +26 -169
- package/esm2020/projects/eo-sdk/core/lib/service/dms/dms.service.mjs +3 -2
- package/esm2020/projects/eo-sdk/core/lib/service/user/user.service.mjs +4 -4
- package/esm2020/projects/eo-sdk/core/public_api.mjs +1 -3
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.mjs +26 -192
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.mjs.map +1 -1
- package/fesm2015/eo-sdk-client.mjs +741 -489
- package/fesm2015/eo-sdk-client.mjs.map +1 -1
- package/fesm2020/eo-sdk-client-projects-eo-sdk-core.mjs +26 -192
- package/fesm2020/eo-sdk-client-projects-eo-sdk-core.mjs.map +1 -1
- package/fesm2020/eo-sdk-client.mjs +731 -479
- package/fesm2020/eo-sdk-client.mjs.map +1 -1
- package/package.json +4 -4
- package/projects/eo-sdk/core/lib/service/auth/auth.service.d.ts +1 -23
- package/projects/eo-sdk/core/lib/service/auth/auth.service.d.ts.map +1 -1
- package/projects/eo-sdk/core/lib/service/dms/dms.service.d.ts +1 -0
- package/projects/eo-sdk/core/lib/service/dms/dms.service.d.ts.map +1 -1
- package/projects/eo-sdk/core/lib/service/user/user.service.d.ts.map +1 -1
- package/projects/eo-sdk/core/public_api.d.ts +0 -2
- package/projects/eo-sdk/core/public_api.d.ts.map +1 -1
- package/scss/_main.scss +3 -1
- package/scss/_yuuvis-components.scss +34 -14
- package/styles.css +18 -2
- package/esm2020/projects/eo-sdk/core/lib/service/auth/auth.cloud.interface.mjs +0 -2
- package/esm2020/projects/eo-sdk/core/lib/service/environment/environment.service.mjs +0 -28
- package/projects/eo-sdk/core/lib/service/auth/auth.cloud.interface.d.ts +0 -12
- package/projects/eo-sdk/core/lib/service/auth/auth.cloud.interface.d.ts.map +0 -1
- package/projects/eo-sdk/core/lib/service/environment/environment.service.d.ts +0 -14
- package/projects/eo-sdk/core/lib/service/environment/environment.service.d.ts.map +0 -1
|
@@ -8,7 +8,7 @@ import { InjectionToken, Inject, Injectable, NgModule, APP_INITIALIZER, Optional
|
|
|
8
8
|
import * as i1$3 from 'ngx-toastr';
|
|
9
9
|
import { ToastrModule } from 'ngx-toastr';
|
|
10
10
|
import { __decorate, __param } from 'tslib';
|
|
11
|
-
import { EMPTY, throwError, Subject, of, forkJoin, Observable, ReplaySubject, BehaviorSubject, timer
|
|
11
|
+
import { EMPTY, throwError, Subject, of, forkJoin, Observable, ReplaySubject, BehaviorSubject, timer } from 'rxjs';
|
|
12
12
|
import { filter, map, tap, finalize, shareReplay, debounceTime, switchMap, first, catchError, expand, skipWhile, mergeMap, takeUntil } from 'rxjs/operators';
|
|
13
13
|
import { DatePipe, registerLocaleData } from '@angular/common';
|
|
14
14
|
import moment from 'moment';
|
|
@@ -1232,18 +1232,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
1232
1232
|
}]
|
|
1233
1233
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: EventService }]; } });
|
|
1234
1234
|
|
|
1235
|
-
class EnvironmentEnaio {
|
|
1236
|
-
static isWebEnvironment() {
|
|
1237
|
-
return !EnvironmentEnaio.isDesktopEnvironment() && !EnvironmentEnaio.isMobileEnvironment();
|
|
1238
|
-
}
|
|
1239
|
-
static isMobileEnvironment() {
|
|
1240
|
-
return window.hasOwnProperty('cordova');
|
|
1241
|
-
}
|
|
1242
|
-
static isDesktopEnvironment() {
|
|
1243
|
-
return window.hasOwnProperty('process') && window['process'].versions.hasOwnProperty('electron');
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
1235
|
class EoUser {
|
|
1248
1236
|
/**
|
|
1249
1237
|
* Creates a new instance
|
|
@@ -1330,32 +1318,6 @@ class EoUser {
|
|
|
1330
1318
|
}
|
|
1331
1319
|
}
|
|
1332
1320
|
|
|
1333
|
-
/**
|
|
1334
|
-
* Wrapper for Cloud Services through Auth Service
|
|
1335
|
-
*/
|
|
1336
|
-
class EnvironmentService {
|
|
1337
|
-
constructor() {
|
|
1338
|
-
this._cloudEnvironment = false;
|
|
1339
|
-
}
|
|
1340
|
-
set cloudEnvironment(env) {
|
|
1341
|
-
this._cloudEnvironment = env;
|
|
1342
|
-
}
|
|
1343
|
-
get cloudEnvironment() {
|
|
1344
|
-
return this._cloudEnvironment;
|
|
1345
|
-
}
|
|
1346
|
-
isCloud() {
|
|
1347
|
-
return this.cloudEnvironment;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
EnvironmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1351
|
-
EnvironmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: EnvironmentService, providedIn: 'root' });
|
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: EnvironmentService, decorators: [{
|
|
1353
|
-
type: Injectable,
|
|
1354
|
-
args: [{
|
|
1355
|
-
providedIn: 'root'
|
|
1356
|
-
}]
|
|
1357
|
-
}], ctorParameters: function () { return []; } });
|
|
1358
|
-
|
|
1359
1321
|
/**
|
|
1360
1322
|
* History entry of a work item.
|
|
1361
1323
|
*/
|
|
@@ -3247,7 +3209,7 @@ class UserService {
|
|
|
3247
3209
|
* @returns The saved settings
|
|
3248
3210
|
*/
|
|
3249
3211
|
loadLocalSettings() {
|
|
3250
|
-
return this.backend.get('/user/config/localSettings');
|
|
3212
|
+
return this.backend.get('/user/config/localSettings').pipe(catchError(() => EMPTY));
|
|
3251
3213
|
}
|
|
3252
3214
|
}
|
|
3253
3215
|
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: UserService, deps: [{ token: BackendService }, { token: i1.TranslateService }, { token: Logger }, { token: EventService }, { token: SystemService }, { token: i1$1.HttpClient }, { token: Config }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -3812,13 +3774,11 @@ class AuthService {
|
|
|
3812
3774
|
/**
|
|
3813
3775
|
* @ignore
|
|
3814
3776
|
*/
|
|
3815
|
-
constructor(config, coreConfig,
|
|
3777
|
+
constructor(config, coreConfig, http, bpmService, capabilitiesService, inboxService, prepareService, backend, systemService, userService, eventService, systemStatusService, storage, local) {
|
|
3816
3778
|
this.config = config;
|
|
3817
3779
|
this.coreConfig = coreConfig;
|
|
3818
|
-
this.envService = envService;
|
|
3819
3780
|
this.http = http;
|
|
3820
3781
|
this.bpmService = bpmService;
|
|
3821
|
-
this.ngZone = ngZone;
|
|
3822
3782
|
this.capabilitiesService = capabilitiesService;
|
|
3823
3783
|
this.inboxService = inboxService;
|
|
3824
3784
|
this.prepareService = prepareService;
|
|
@@ -3829,7 +3789,6 @@ class AuthService {
|
|
|
3829
3789
|
this.systemStatusService = systemStatusService;
|
|
3830
3790
|
this.storage = storage;
|
|
3831
3791
|
this.local = local;
|
|
3832
|
-
this.TOKEN_STORAGE_KEY = 'eo.auth.cloud.credentials';
|
|
3833
3792
|
this.userProfileUri = this.userService.USER_FETCH_URI;
|
|
3834
3793
|
this.authSource = new BehaviorSubject(false);
|
|
3835
3794
|
this.loggedInCacheKey = 'eo.user.loggedIn';
|
|
@@ -3879,124 +3838,6 @@ class AuthService {
|
|
|
3879
3838
|
withCredentials: this.coreConfig.withCredentials
|
|
3880
3839
|
}).pipe(switchMap(() => this.initUser(host)));
|
|
3881
3840
|
}
|
|
3882
|
-
/**
|
|
3883
|
-
* Log in to a cloud backend using device flow.
|
|
3884
|
-
* @param host The target host (could be null if you are running in web environment)
|
|
3885
|
-
* @param tenant The tenant
|
|
3886
|
-
* @returns Resolves with the logged in user
|
|
3887
|
-
*/
|
|
3888
|
-
cloudLogin(host, tenant) {
|
|
3889
|
-
return Observable.create(o => {
|
|
3890
|
-
const stopTrigger$ = new Subject();
|
|
3891
|
-
//const targetHost = this.location.pathname.substring(0, this.location.pathname.indexOf('/enter')); // host || '';
|
|
3892
|
-
const targetHost = host || '';
|
|
3893
|
-
// start auth flow
|
|
3894
|
-
this.http.get(`${targetHost}/tenant/${tenant}/loginDevice`).subscribe((res) => {
|
|
3895
|
-
// open new window for the authentication process ...
|
|
3896
|
-
const targetUri = `${targetHost}/oauth/${tenant}?user_code=${res.user_code}`;
|
|
3897
|
-
const win = window.open(targetUri, 'auth');
|
|
3898
|
-
if (win) {
|
|
3899
|
-
// @see: http://atashbahar.com/post/2010-04-27-detect-when-a-javascript-popup-window-gets-closed
|
|
3900
|
-
this.ngZone.runOutsideAngular(() => {
|
|
3901
|
-
const winTimer = setInterval(() => {
|
|
3902
|
-
if (win.closed) {
|
|
3903
|
-
clearInterval(winTimer);
|
|
3904
|
-
this.ngZone.run(() => {
|
|
3905
|
-
stopTrigger$.next();
|
|
3906
|
-
stopTrigger$.complete();
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
}, 1000);
|
|
3910
|
-
});
|
|
3911
|
-
}
|
|
3912
|
-
// ... and start polling for authentication results
|
|
3913
|
-
this.cloudLoginPollForResult(`${targetHost}/auth/info/state?device_code=${res.device_code}`, 1000, stopTrigger$)
|
|
3914
|
-
.pipe(tap((accessToken) => {
|
|
3915
|
-
if (accessToken) {
|
|
3916
|
-
this.cloudLoginSetHeaders(accessToken, tenant);
|
|
3917
|
-
const storeToken = {
|
|
3918
|
-
tenant: tenant,
|
|
3919
|
-
accessToken: accessToken
|
|
3920
|
-
};
|
|
3921
|
-
this.storage.setItem(this.TOKEN_STORAGE_KEY, storeToken).subscribe();
|
|
3922
|
-
}
|
|
3923
|
-
}), switchMap((authRes) => {
|
|
3924
|
-
if (authRes) {
|
|
3925
|
-
return this.initUser(targetHost);
|
|
3926
|
-
}
|
|
3927
|
-
else {
|
|
3928
|
-
throwError('not authenticated');
|
|
3929
|
-
}
|
|
3930
|
-
})).subscribe((user) => {
|
|
3931
|
-
win.close();
|
|
3932
|
-
o.next(user);
|
|
3933
|
-
o.complete();
|
|
3934
|
-
}, err => {
|
|
3935
|
-
win.close();
|
|
3936
|
-
o.error(err);
|
|
3937
|
-
o.complete();
|
|
3938
|
-
});
|
|
3939
|
-
}, err => {
|
|
3940
|
-
o.error('unable to call device flow endpoint', err);
|
|
3941
|
-
o.complete();
|
|
3942
|
-
});
|
|
3943
|
-
});
|
|
3944
|
-
}
|
|
3945
|
-
/**
|
|
3946
|
-
* Starts polling for login results in case of logging in to a cloud backend.
|
|
3947
|
-
* @param uri URI to poll
|
|
3948
|
-
* @param pollingInterval Polling intervall in milliseconds
|
|
3949
|
-
* @param stopTrigger Subject acting as stop trigger
|
|
3950
|
-
* @returns Access Token if logged in successfully or NULL otherwise
|
|
3951
|
-
*/
|
|
3952
|
-
cloudLoginPollForResult(uri, pollingInterval, stopTrigger = new Subject()) {
|
|
3953
|
-
return Observable.create(o => {
|
|
3954
|
-
let accessGranted = false;
|
|
3955
|
-
let accessDenied = false;
|
|
3956
|
-
this.ngZone.runOutsideAngular(() => {
|
|
3957
|
-
interval(pollingInterval).pipe(takeUntil(stopTrigger), switchMap(() => this.http.get(uri).pipe(catchError((err) => {
|
|
3958
|
-
// OAuth standard we are using is returning with a status of 400 while logging in (no idea why???)
|
|
3959
|
-
// so we got to fetch that to not break the parent pipe
|
|
3960
|
-
if (err.status === 400) {
|
|
3961
|
-
return of(err.error);
|
|
3962
|
-
}
|
|
3963
|
-
else {
|
|
3964
|
-
throwError(err);
|
|
3965
|
-
}
|
|
3966
|
-
})))).subscribe((res) => {
|
|
3967
|
-
this.ngZone.run(() => {
|
|
3968
|
-
accessGranted = !!res.access_token;
|
|
3969
|
-
accessDenied = res.error === 'access_denied';
|
|
3970
|
-
if (accessGranted || accessDenied) {
|
|
3971
|
-
// logged in
|
|
3972
|
-
stopTrigger.next();
|
|
3973
|
-
stopTrigger.complete();
|
|
3974
|
-
o.next(accessGranted ? res.access_token : null);
|
|
3975
|
-
o.complete();
|
|
3976
|
-
}
|
|
3977
|
-
else if (res.error === 'expired_token') {
|
|
3978
|
-
// expired so skip polling
|
|
3979
|
-
throwError('Token expired');
|
|
3980
|
-
}
|
|
3981
|
-
});
|
|
3982
|
-
}, err => {
|
|
3983
|
-
this.ngZone.run(() => {
|
|
3984
|
-
o.error(err);
|
|
3985
|
-
o.complete();
|
|
3986
|
-
});
|
|
3987
|
-
}, () => {
|
|
3988
|
-
this.ngZone.run(() => {
|
|
3989
|
-
o.next(accessGranted);
|
|
3990
|
-
o.complete();
|
|
3991
|
-
});
|
|
3992
|
-
});
|
|
3993
|
-
});
|
|
3994
|
-
});
|
|
3995
|
-
}
|
|
3996
|
-
cloudLoginSetHeaders(accessToken, tenant) {
|
|
3997
|
-
this.backend.setHeader('Authorization', 'bearer ' + accessToken);
|
|
3998
|
-
this.backend.setHeader('X-ID-TENANT-NAME', tenant);
|
|
3999
|
-
}
|
|
4000
3841
|
/**
|
|
4001
3842
|
* Gets called while app init
|
|
4002
3843
|
* @ignore
|
|
@@ -4009,20 +3850,7 @@ class AuthService {
|
|
|
4009
3850
|
.get(`${host || ''}${this.config.getContextPath()}/auth/info`, { headers, withCredentials: this.coreConfig.withCredentials })
|
|
4010
3851
|
.pipe(switchMap((info) => {
|
|
4011
3852
|
this.gatewayInfo = info;
|
|
4012
|
-
this.
|
|
4013
|
-
if (this.isCloudEnvironment()) {
|
|
4014
|
-
// in case of running against cloud backend, we try to fetch
|
|
4015
|
-
// access token and tenant from local storage
|
|
4016
|
-
return this.storage.getItem(this.TOKEN_STORAGE_KEY).pipe(switchMap((res) => {
|
|
4017
|
-
if (res) {
|
|
4018
|
-
this.cloudLoginSetHeaders(res.accessToken, res.tenant);
|
|
4019
|
-
}
|
|
4020
|
-
return this.fetchUser(info, host);
|
|
4021
|
-
}));
|
|
4022
|
-
}
|
|
4023
|
-
else {
|
|
4024
|
-
return this.fetchUser(info, host);
|
|
4025
|
-
}
|
|
3853
|
+
return this.fetchUser(info, host);
|
|
4026
3854
|
}));
|
|
4027
3855
|
}
|
|
4028
3856
|
/**
|
|
@@ -4047,6 +3875,11 @@ class AuthService {
|
|
|
4047
3875
|
if (host) {
|
|
4048
3876
|
this.addHostConfig(host);
|
|
4049
3877
|
}
|
|
3878
|
+
if (this.local.isEmpty()) {
|
|
3879
|
+
this.userService.loadLocalSettings().subscribe(settings => {
|
|
3880
|
+
this.local.setStorage(settings.localSettings);
|
|
3881
|
+
});
|
|
3882
|
+
}
|
|
4050
3883
|
window.localStorage.setItem(this.loggedInCacheKey, JSON.stringify({ userId: user.user.id, host: host }));
|
|
4051
3884
|
return this.initApp(user, gatewayInfo.ntlm);
|
|
4052
3885
|
}), tap(() => this.authSource.next(this.isLoggedIn())));
|
|
@@ -4064,14 +3897,6 @@ class AuthService {
|
|
|
4064
3897
|
auth: null,
|
|
4065
3898
|
active: false
|
|
4066
3899
|
};
|
|
4067
|
-
if (this.isCloudEnvironment()) {
|
|
4068
|
-
// remove stored access data
|
|
4069
|
-
this.storage.removeItem(this.TOKEN_STORAGE_KEY).subscribe();
|
|
4070
|
-
if (this.coreConfig.environment.production && EnvironmentEnaio.isWebEnvironment()) {
|
|
4071
|
-
window.location.href = this.config.getContextPath() + '/logout';
|
|
4072
|
-
return;
|
|
4073
|
-
}
|
|
4074
|
-
}
|
|
4075
3900
|
if (gatewayLogout) {
|
|
4076
3901
|
// by default we are just resetting internal state to 'logged out' and in
|
|
4077
3902
|
// some cases call gateways logout endpoint to do logout stuff there silently
|
|
@@ -4080,10 +3905,6 @@ class AuthService {
|
|
|
4080
3905
|
this.backend.setAuthProfile(this.profile);
|
|
4081
3906
|
this.eventService.trigger(EnaioEvent.LOGOUT);
|
|
4082
3907
|
}
|
|
4083
|
-
isCloudEnvironment() {
|
|
4084
|
-
// oauth2 indicates that we are running in a cloud environment
|
|
4085
|
-
return this.gatewayInfo && this.gatewayInfo.oauth2;
|
|
4086
|
-
}
|
|
4087
3908
|
/**
|
|
4088
3909
|
* for desktop and mobile devices we provide a list of hosts for the login
|
|
4089
3910
|
*
|
|
@@ -4128,7 +3949,7 @@ class AuthService {
|
|
|
4128
3949
|
return forkJoin(todo).pipe(map(() => currUser));
|
|
4129
3950
|
}
|
|
4130
3951
|
}
|
|
4131
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AuthService, deps: [{ token: Config }, { token: CORE_CONFIG }, { token:
|
|
3952
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AuthService, deps: [{ token: Config }, { token: CORE_CONFIG }, { token: i1$1.HttpClient }, { token: BpmService }, { token: CapabilitiesService }, { token: InboxService }, { token: PrepareService }, { token: BackendService }, { token: SystemService }, { token: UserService }, { token: EventService }, { token: SystemStatusService }, { token: i1$2.LocalStorage }, { token: LocalStorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4132
3953
|
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
4133
3954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AuthService, decorators: [{
|
|
4134
3955
|
type: Injectable,
|
|
@@ -4138,7 +3959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
4138
3959
|
}], ctorParameters: function () { return [{ type: Config }, { type: CoreConfig, decorators: [{
|
|
4139
3960
|
type: Inject,
|
|
4140
3961
|
args: [CORE_CONFIG]
|
|
4141
|
-
}] }, { type:
|
|
3962
|
+
}] }, { type: i1$1.HttpClient }, { type: BpmService }, { type: CapabilitiesService }, { type: InboxService }, { type: PrepareService }, { type: BackendService }, { type: SystemService }, { type: UserService }, { type: EventService }, { type: SystemStatusService }, { type: i1$2.LocalStorage }, { type: LocalStorageService }]; } });
|
|
4142
3963
|
|
|
4143
3964
|
/**
|
|
4144
3965
|
* Main initialization service of the eoFrameworkCore module. The `load()` function will contain
|
|
@@ -4470,6 +4291,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
4470
4291
|
type: SkipSelf
|
|
4471
4292
|
}] }]; } });
|
|
4472
4293
|
|
|
4294
|
+
class EnvironmentEnaio {
|
|
4295
|
+
static isWebEnvironment() {
|
|
4296
|
+
return !EnvironmentEnaio.isDesktopEnvironment() && !EnvironmentEnaio.isMobileEnvironment();
|
|
4297
|
+
}
|
|
4298
|
+
static isMobileEnvironment() {
|
|
4299
|
+
return window.hasOwnProperty('cordova');
|
|
4300
|
+
}
|
|
4301
|
+
static isDesktopEnvironment() {
|
|
4302
|
+
return window.hasOwnProperty('process') && window['process'].versions.hasOwnProperty('electron');
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
|
|
4473
4306
|
/**
|
|
4474
4307
|
* Collection of all Clipboard Services
|
|
4475
4308
|
*/
|
|
@@ -4739,6 +4572,7 @@ var SubscriptionMode;
|
|
|
4739
4572
|
SubscriptionMode["ONLY_DOCUMENT_CONTENT_CHANGED"] = "CONTENT";
|
|
4740
4573
|
SubscriptionMode["DMS_OBJECT_CHANGED"] = "BOTH";
|
|
4741
4574
|
})(SubscriptionMode || (SubscriptionMode = {}));
|
|
4575
|
+
const resolveObjectRights = [];
|
|
4742
4576
|
/**
|
|
4743
4577
|
* Collection of DMS Services
|
|
4744
4578
|
*/
|
|
@@ -4798,7 +4632,7 @@ class DmsService {
|
|
|
4798
4632
|
if (dmsObject.contextFolder) {
|
|
4799
4633
|
dmsObject.contextFolder.type = this.systemService.getObjectType(dmsObject.contextFolder.typeName);
|
|
4800
4634
|
}
|
|
4801
|
-
return dmsObject;
|
|
4635
|
+
return resolveObjectRights.reduce((value, fn) => fn.call(this, value), dmsObject);
|
|
4802
4636
|
}
|
|
4803
4637
|
/**
|
|
4804
4638
|
* Deletes a DMS object.
|
|
@@ -6295,5 +6129,5 @@ class UploadFileItem {
|
|
|
6295
6129
|
* Generated bundle index. Do not edit.
|
|
6296
6130
|
*/
|
|
6297
6131
|
|
|
6298
|
-
export { AppCacheService, AuthService, BackendService, BpmService, CORE_CONFIG, CUSTOM_CONFIG, CapabilitiesService, ClipboardAction, ClipboardService, Config, CoreConfig, CoreInit, Direction, DmsObject, DmsObjectAttachment, DmsObjectHistoryEntry, DmsService, EnaioEvent, EnvironmentEnaio,
|
|
6132
|
+
export { AppCacheService, AuthService, BackendService, BpmService, CORE_CONFIG, CUSTOM_CONFIG, CapabilitiesService, ClipboardAction, ClipboardService, Config, CoreConfig, CoreInit, Direction, DmsObject, DmsObjectAttachment, DmsObjectHistoryEntry, DmsService, EnaioEvent, EnvironmentEnaio, EoCoreModule, EoError, EoSharedModule, EoUser, EoxMissingTranslationHandler, EoxTranslateJsonLoader, EventService, FieldDefinition, InboxItem, InboxService, LocalStorageService, Logger, NotificationsService, ObjectType, PrepareService, PreparedItem, Process, QueryScope, RangeValue, SearchFilter, SearchQuery, SearchResult, SearchService, SearchState, SigningService, SortOption, StoredQueriesService, StoredQuery, SubscriptionMode, SystemService, SystemStatusEnum, UploadFileItem, UploadRegistryService, UploadService, UploadTarget, UserService, Utils, WorkItem, WorkItemHistoryEntry, init_module, resolveObjectRights };
|
|
6299
6133
|
//# sourceMappingURL=eo-sdk-client-projects-eo-sdk-core.mjs.map
|