@c8y/ngx-components 1023.14.38 → 1023.14.41
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/c8y-ngx-components.mjs +18 -6
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/locales/de.po +5 -2
- package/locales/es.po +3 -0
- package/locales/fr.po +3 -0
- package/locales/ja_JP.po +3 -0
- package/locales/ko.po +3 -0
- package/locales/nl.po +3 -0
- package/locales/pl.po +3 -0
- package/locales/pt_BR.po +3 -0
- package/locales/zh_CN.po +3 -0
- package/locales/zh_TW.po +3 -0
- package/package.json +1 -1
|
@@ -9153,10 +9153,11 @@ const operationStatusClasses = {
|
|
|
9153
9153
|
|
|
9154
9154
|
/** The helper UI service for tenant related methods built upon client services. */
|
|
9155
9155
|
class TenantUiService {
|
|
9156
|
-
constructor(userService, appStateService, tenantLoginOption) {
|
|
9156
|
+
constructor(userService, appStateService, tenantLoginOption, options) {
|
|
9157
9157
|
this.userService = userService;
|
|
9158
9158
|
this.appStateService = appStateService;
|
|
9159
9159
|
this.tenantLoginOption = tenantLoginOption;
|
|
9160
|
+
this.options = options;
|
|
9160
9161
|
this.MANAGEMENT = 'management';
|
|
9161
9162
|
this.ROLE_TENANT_MANAGEMENT_READ = Permissions.ROLE_TENANT_MANAGEMENT_READ;
|
|
9162
9163
|
}
|
|
@@ -9253,11 +9254,22 @@ class TenantUiService {
|
|
|
9253
9254
|
return defaultFallback;
|
|
9254
9255
|
}
|
|
9255
9256
|
else {
|
|
9256
|
-
|
|
9257
|
-
|
|
9257
|
+
let visibleLoginOptions = loginOptions.filter(this.isVisibleOnLoginPage);
|
|
9258
|
+
// should ignore the OAUTH2 option if skipSSORedirect is set
|
|
9259
|
+
if (this.options.get('skipSSORedirect', false)) {
|
|
9260
|
+
visibleLoginOptions = visibleLoginOptions.filter(lo => lo.type !== TenantLoginOptionType.OAUTH2);
|
|
9261
|
+
// in case there is no other visible option, we fallback to all options except OAUTH2
|
|
9262
|
+
if (visibleLoginOptions.length === 0) {
|
|
9263
|
+
visibleLoginOptions = loginOptions.filter(lo => lo.type !== TenantLoginOptionType.OAUTH2);
|
|
9264
|
+
}
|
|
9265
|
+
}
|
|
9266
|
+
const preferredLoginOption = visibleLoginOptions.find(this.isOauthInternal) ||
|
|
9258
9267
|
visibleLoginOptions.find(this.isBasic) ||
|
|
9259
9268
|
visibleLoginOptions.find(this.isOauth2) ||
|
|
9260
|
-
defaultFallback
|
|
9269
|
+
defaultFallback;
|
|
9270
|
+
// ensure the returned login option is marked as visible on login page
|
|
9271
|
+
preferredLoginOption.visibleOnLoginPage = true;
|
|
9272
|
+
return preferredLoginOption;
|
|
9261
9273
|
}
|
|
9262
9274
|
}
|
|
9263
9275
|
/**
|
|
@@ -9397,13 +9409,13 @@ class TenantUiService {
|
|
|
9397
9409
|
isManagement(currentTenant) {
|
|
9398
9410
|
return currentTenant.name === this.MANAGEMENT;
|
|
9399
9411
|
}
|
|
9400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TenantUiService, deps: [{ token: i1.UserService }, { token: AppStateService }, { token: i1.TenantLoginOptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TenantUiService, deps: [{ token: i1.UserService }, { token: AppStateService }, { token: i1.TenantLoginOptionsService }, { token: OptionsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9401
9413
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TenantUiService, providedIn: 'root' }); }
|
|
9402
9414
|
}
|
|
9403
9415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TenantUiService, decorators: [{
|
|
9404
9416
|
type: Injectable,
|
|
9405
9417
|
args: [{ providedIn: 'root' }]
|
|
9406
|
-
}], ctorParameters: () => [{ type: i1.UserService }, { type: AppStateService }, { type: i1.TenantLoginOptionsService }] });
|
|
9418
|
+
}], ctorParameters: () => [{ type: i1.UserService }, { type: AppStateService }, { type: i1.TenantLoginOptionsService }, { type: OptionsService }] });
|
|
9407
9419
|
|
|
9408
9420
|
class ZipService {
|
|
9409
9421
|
getEntries(zipFile) {
|