@bravobit/bb-foundation 0.21.6 → 0.22.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/auth/lib/auth.interceptor.d.ts +1 -1
- package/auth/lib/auth.module.d.ts +4 -5
- package/auth/lib/auth.service.d.ts +4 -7
- package/auth/lib/directives/abstract.directive.d.ts +12 -0
- package/auth/lib/directives/authenticated.directive.d.ts +7 -4
- package/auth/lib/directives/permission.directive.d.ts +11 -11
- package/auth/lib/guards/anonymous.guard.d.ts +8 -5
- package/auth/lib/guards/authenticated.guard.d.ts +8 -5
- package/auth/lib/guards/permission.guard.d.ts +15 -0
- package/auth/lib/interfaces/config.interface.d.ts +14 -8
- package/auth/lib/interfaces/permission.interface.d.ts +6 -0
- package/auth/lib/interfaces/provider.interface.d.ts +10 -3
- package/auth/lib/permissions/permissions.handler.d.ts +9 -0
- package/auth/lib/permissions/permissions.service.d.ts +16 -0
- package/auth/lib/providers/email.provider.d.ts +2 -8
- package/auth/lib/providers/verify.provider.d.ts +2 -6
- package/auth/public_api.d.ts +4 -4
- package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +5 -1
- package/controls/lib/control-error/control-error/control-error.animation.d.ts +1 -0
- package/controls/lib/control-error/control-error/control-error.component.d.ts +17 -0
- package/controls/lib/control-error/control-error-submit.directive.d.ts +15 -0
- package/controls/lib/control-error/control-error.defaults.d.ts +2 -0
- package/controls/lib/control-error/control-error.interface.d.ts +12 -0
- package/controls/lib/control-error/control-error.module.d.ts +9 -0
- package/controls/lib/controls.interfaces.d.ts +4 -0
- package/controls/lib/controls.module.d.ts +7 -2
- package/controls/lib/form-control/form-control/form-control.component.d.ts +31 -0
- package/controls/lib/form-control/form-control-addon/form-control-addon.component.d.ts +6 -0
- package/controls/lib/form-control/form-control-input.directive.d.ts +35 -0
- package/controls/lib/form-control/form-control.module.d.ts +11 -0
- package/controls/public_api.d.ts +9 -0
- package/dashboard/lib/dashboard/dashboard.component.d.ts +2 -1
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +10 -5
- package/dialog/lib/dialog-container/dialog-container.animations.d.ts +1 -0
- package/dialog/lib/dialog-container/dialog-container.component.d.ts +5 -7
- package/dialog/lib/dialog-header/dialog-header.component.d.ts +1 -3
- package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +7 -3
- package/dialog/lib/dialog-overlay/dialog-overlay.animations.d.ts +1 -0
- package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +5 -7
- package/dialog/lib/dialog.service.d.ts +4 -3
- package/elements/lib/directives/focus-trap.directive.d.ts +1 -1
- package/elements/lib/directives/focus.directive.d.ts +1 -3
- package/elements/lib/pipes/file-image.pipe.d.ts +2 -1
- package/esm2020/auth/lib/auth.interceptor.mjs +9 -12
- package/esm2020/auth/lib/auth.module.mjs +7 -17
- package/esm2020/auth/lib/auth.service.mjs +29 -55
- package/esm2020/auth/lib/directives/abstract.directive.mjs +40 -0
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +25 -14
- package/esm2020/auth/lib/directives/permission.directive.mjs +24 -46
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +28 -19
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +31 -20
- package/esm2020/auth/lib/guards/permission.guard.mjs +53 -0
- package/esm2020/auth/lib/helpers/jwt.helper.mjs +7 -7
- package/esm2020/auth/lib/interfaces/config.interface.mjs +1 -1
- package/esm2020/auth/lib/interfaces/permission.interface.mjs +2 -0
- package/esm2020/auth/lib/interfaces/provider.interface.mjs +1 -1
- package/esm2020/auth/lib/permissions/permissions.handler.mjs +33 -0
- package/esm2020/auth/lib/permissions/permissions.service.mjs +64 -0
- package/esm2020/auth/lib/providers/email.provider.mjs +8 -9
- package/esm2020/auth/lib/providers/verify.provider.mjs +8 -5
- package/esm2020/auth/public_api.mjs +5 -5
- package/esm2020/collections/lib/collections.module.mjs +4 -4
- package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +19 -6
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +4 -4
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/controls/lib/control-error/control-error/control-error.animation.mjs +14 -0
- package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +63 -0
- package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +47 -0
- package/esm2020/controls/lib/control-error/control-error.defaults.mjs +26 -0
- package/esm2020/controls/lib/control-error/control-error.interface.mjs +3 -0
- package/esm2020/controls/lib/control-error/control-error.module.mjs +19 -0
- package/esm2020/controls/lib/controls.interfaces.mjs +2 -0
- package/esm2020/controls/lib/controls.module.mjs +45 -8
- package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +94 -0
- package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +22 -0
- package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +124 -0
- package/esm2020/controls/lib/form-control/form-control.module.mjs +33 -0
- package/esm2020/controls/public_api.mjs +10 -1
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +7 -6
- package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +17 -11
- package/esm2020/dialog/lib/dialog-container/dialog-container.animations.mjs +29 -0
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +28 -104
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +7 -14
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +4 -4
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +29 -8
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.animations.mjs +26 -0
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +29 -84
- package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
- package/esm2020/dialog/lib/dialog.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog.service.mjs +8 -7
- package/esm2020/elements/lib/avatar/avatar.component.mjs +8 -6
- package/esm2020/elements/lib/button/button.component.mjs +6 -6
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +3 -3
- package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/autosize.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +5 -5
- package/esm2020/elements/lib/directives/focus.directive.mjs +7 -9
- package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/form-submitter.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/template.directive.mjs +3 -3
- package/esm2020/elements/lib/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/elements/lib/elements.module.mjs +4 -4
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +3 -3
- package/esm2020/elements/lib/form-control/form-control.component.mjs +3 -3
- package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +8 -7
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
- package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
- package/esm2020/http/lib/http.module.mjs +4 -4
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +3 -3
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
- package/esm2020/lib/core/services/clipboard.service.mjs +5 -5
- package/esm2020/lib/core/services/exif.service.mjs +5 -5
- package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
- package/esm2020/lib/core/services/image-converter.service.mjs +5 -5
- package/esm2020/lib/core/services/languages.service.mjs +3 -3
- package/esm2020/lib/core/services/network.service.mjs +7 -7
- package/esm2020/lib/core/services/patch.service.mjs +7 -7
- package/esm2020/localize/lib/localize.module.mjs +4 -4
- package/esm2020/localize/lib/localize.pipe.mjs +3 -3
- package/esm2020/localize/lib/localize.service.mjs +5 -5
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/date-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/input-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/masking.module.mjs +4 -4
- package/esm2020/masking/lib/masking.service.mjs +3 -3
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +5 -5
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +7 -7
- package/esm2020/notifications/lib/notifications.module.mjs +4 -4
- package/esm2020/notifications/lib/notifications.service.mjs +5 -5
- package/esm2020/public_api.mjs +1 -2
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +10 -10
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
- package/esm2020/storage/lib/storage.service.mjs +5 -5
- package/esm2020/table/lib/components/table/table.component.mjs +9 -9
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
- package/esm2020/table/lib/table.module.mjs +4 -4
- package/esm2020/theming/lib/themes/checkbox-group.theme.mjs +17 -2
- package/esm2020/theming/lib/themes/checkbox.theme.mjs +35 -2
- package/esm2020/theming/lib/themes/control-error.theme.mjs +11 -0
- package/esm2020/theming/lib/themes/form-control-addon.theme.mjs +6 -0
- package/esm2020/theming/lib/themes/form-control.theme.mjs +45 -0
- package/esm2020/theming/lib/theming.data.mjs +82 -0
- package/esm2020/theming/lib/theming.directive.mjs +38 -0
- package/esm2020/theming/lib/theming.interface.mjs +2 -3
- package/esm2020/theming/lib/theming.module.mjs +12 -34
- package/esm2020/theming/lib/utils/theming.variable.mjs +41 -0
- package/esm2020/theming/public_api.mjs +6 -3
- package/fesm2015/bravobit-bb-foundation-auth.mjs +326 -284
- package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-controls.mjs +493 -24
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +29 -28
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +185 -233
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +99 -97
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-localize.mjs +20 -20
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +18 -17
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-storage.mjs +4 -4
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-theming.mjs +251 -128
- package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation.mjs +33 -73
- package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-auth.mjs +306 -277
- package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-controls.mjs +477 -24
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +29 -28
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +175 -233
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +99 -97
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-localize.mjs +20 -20
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +17 -17
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-storage.mjs +4 -4
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-theming.mjs +252 -120
- package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation.mjs +32 -70
- package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
- package/lib/core/services/clipboard.service.d.ts +2 -2
- package/lib/core/services/exif.service.d.ts +1 -1
- package/lib/core/services/image-converter.service.d.ts +1 -1
- package/lib/core/services/network.service.d.ts +4 -4
- package/lib/core/services/patch.service.d.ts +4 -4
- package/localize/lib/localize.service.d.ts +1 -1
- package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
- package/notifications/lib/notifications.service.d.ts +1 -1
- package/package.json +4 -4
- package/public_api.d.ts +0 -1
- package/recaptcha/lib/recaptcha-loader.service.d.ts +3 -3
- package/storage/lib/storage.service.d.ts +1 -1
- package/theming/lib/themes/checkbox-group.theme.d.ts +14 -3
- package/theming/lib/themes/checkbox.theme.d.ts +30 -17
- package/theming/lib/themes/control-error.theme.d.ts +9 -0
- package/theming/lib/themes/form-control-addon.theme.d.ts +5 -0
- package/theming/lib/themes/form-control.theme.d.ts +32 -0
- package/theming/lib/theming.data.d.ts +17 -0
- package/theming/lib/theming.directive.d.ts +13 -0
- package/theming/lib/theming.interface.d.ts +19 -8
- package/theming/lib/theming.module.d.ts +3 -9
- package/theming/lib/utils/theming.variable.d.ts +16 -0
- package/theming/public_api.d.ts +5 -2
- package/auth/lib/directives/role.directive.d.ts +0 -16
- package/auth/lib/helpers/mapper.helper.d.ts +0 -23
- package/auth/lib/interfaces/mapper.interface.d.ts +0 -19
- package/auth/lib/permissions.service.d.ts +0 -14
- package/esm2020/auth/lib/directives/role.directive.mjs +0 -37
- package/esm2020/auth/lib/helpers/mapper.helper.mjs +0 -35
- package/esm2020/auth/lib/interfaces/mapper.interface.mjs +0 -2
- package/esm2020/auth/lib/permissions.service.mjs +0 -56
- package/esm2020/lib/core/services/platform.service.mjs +0 -42
- package/esm2020/theming/lib/themes/theme.mjs +0 -34
- package/esm2020/theming/lib/theming.service.mjs +0 -77
- package/lib/core/services/platform.service.d.ts +0 -18
- package/theming/lib/themes/theme.d.ts +0 -12
- package/theming/lib/theming.service.d.ts +0 -22
|
@@ -7,6 +7,7 @@ export declare class AuthInterceptor implements HttpInterceptor {
|
|
|
7
7
|
private _auth;
|
|
8
8
|
private _config;
|
|
9
9
|
private readonly _authHeaderString;
|
|
10
|
+
private readonly _authScheme;
|
|
10
11
|
isRefreshing: boolean;
|
|
11
12
|
refreshingAccessToken$: BehaviorSubject<string>;
|
|
12
13
|
constructor(_auth: Auth, _config: AuthConfig);
|
|
@@ -15,7 +16,6 @@ export declare class AuthInterceptor implements HttpInterceptor {
|
|
|
15
16
|
private logoutUser;
|
|
16
17
|
private getAccessToken;
|
|
17
18
|
private addAuthorizationHeader;
|
|
18
|
-
private getFullAuthorizationHeader;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, [null, { optional: true; }]>;
|
|
20
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
|
|
21
21
|
}
|
|
@@ -3,13 +3,12 @@ import { AuthConfig } from './interfaces/config.interface';
|
|
|
3
3
|
import { Auth } from './auth.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "./directives/authenticated.directive";
|
|
6
|
-
import * as i2 from "./directives/
|
|
7
|
-
import * as i3 from "
|
|
8
|
-
import * as i4 from "@angular/common/http";
|
|
6
|
+
import * as i2 from "./directives/permission.directive";
|
|
7
|
+
import * as i3 from "@angular/common/http";
|
|
9
8
|
export declare class AuthModule {
|
|
10
|
-
static forRoot(config
|
|
9
|
+
static forRoot(config: AuthConfig): ModuleWithProviders<AuthModule>;
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, [typeof i1.BbAuthenticated, typeof i2.
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, [typeof i1.BbAuthenticated, typeof i2.BbPermission], [typeof i3.HttpClientModule], [typeof i1.BbAuthenticated, typeof i2.BbPermission]>;
|
|
13
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
|
|
14
13
|
}
|
|
15
14
|
export declare function initializeAuth(auth: Auth): () => Promise<void>;
|
|
@@ -6,13 +6,11 @@ import { Injector } from '@angular/core';
|
|
|
6
6
|
import { AuthConfig } from './interfaces/config.interface';
|
|
7
7
|
import { HttpConfig } from '@bravobit/bb-foundation/http';
|
|
8
8
|
import { Observable } from 'rxjs';
|
|
9
|
-
import {
|
|
10
|
-
import { Platform } from '@bravobit/bb-foundation';
|
|
9
|
+
import { Platform } from '@angular/cdk/platform';
|
|
11
10
|
import { AuthSession } from './auth.session';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
12
|
export declare class Auth {
|
|
14
13
|
private _storage;
|
|
15
|
-
private _mapper;
|
|
16
14
|
private _injector;
|
|
17
15
|
private _platform;
|
|
18
16
|
private _httpClient;
|
|
@@ -24,7 +22,7 @@ export declare class Auth {
|
|
|
24
22
|
readonly session: AuthSession;
|
|
25
23
|
readonly user: Observable<any | null>;
|
|
26
24
|
private _refreshHandler;
|
|
27
|
-
constructor(_storage: Storage,
|
|
25
|
+
constructor(_storage: Storage, _injector: Injector, _platform: Platform, _httpClient: HttpClient, _config?: AuthConfig, _state?: TransferState, _httpConfig?: HttpConfig);
|
|
28
26
|
initialize(): () => Promise<void>;
|
|
29
27
|
me<T = any>(): Observable<T>;
|
|
30
28
|
signIn(provider: AuthProvider, as?: string[]): Promise<AuthSignInResponse>;
|
|
@@ -40,20 +38,19 @@ export declare class Auth {
|
|
|
40
38
|
};
|
|
41
39
|
}): Promise<T>;
|
|
42
40
|
logout(): void;
|
|
43
|
-
refresh(): Observable<
|
|
41
|
+
refresh(): Observable<string>;
|
|
44
42
|
requestPassword(email: string, extraParams?: {
|
|
45
43
|
[key: string]: any;
|
|
46
44
|
}): Promise<Object>;
|
|
47
45
|
resetPassword(token: string, newPassword: string, extraParams?: {
|
|
48
46
|
[key: string]: any;
|
|
49
47
|
}): Promise<Object>;
|
|
50
|
-
guard(type: string, redirectUrl?: string): false | import("@angular/router").UrlTree;
|
|
51
48
|
clearAndRedirect(): void;
|
|
52
49
|
private setTokens;
|
|
53
50
|
private handleAutoRefreshing;
|
|
54
51
|
private autoRefresh;
|
|
55
52
|
private get router();
|
|
56
53
|
private getUrl;
|
|
57
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Auth, [null, null, null, null,
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Auth, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
58
55
|
static ɵprov: i0.ɵɵInjectableDeclaration<Auth>;
|
|
59
56
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
export declare abstract class AbstractAuthDirective {
|
|
3
|
+
protected templateRef: TemplateRef<any>;
|
|
4
|
+
protected viewContainerRef: ViewContainerRef;
|
|
5
|
+
protected valid: boolean;
|
|
6
|
+
protected elseTemplateRef: TemplateRef<any> | null;
|
|
7
|
+
protected thenViewRef: EmbeddedViewRef<any> | null;
|
|
8
|
+
protected elseViewRef: EmbeddedViewRef<any> | null;
|
|
9
|
+
protected constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
|
|
10
|
+
protected updateView(): void;
|
|
11
|
+
protected assertTemplate(property: string, templateRef: TemplateRef<any> | null): void;
|
|
12
|
+
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { AbstractAuthDirective } from './abstract.directive';
|
|
2
3
|
import { Auth } from '../auth.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class BbAuthenticated implements OnInit, OnDestroy {
|
|
5
|
+
export declare class BbAuthenticated extends AbstractAuthDirective implements OnInit, OnDestroy {
|
|
5
6
|
private _auth;
|
|
6
|
-
private
|
|
7
|
+
private _templateRef;
|
|
7
8
|
private _viewContainerRef;
|
|
8
9
|
private _subscription;
|
|
9
|
-
|
|
10
|
+
set bbAuthenticatedElse(templateRef: TemplateRef<any>);
|
|
11
|
+
constructor(_auth: Auth, _templateRef: TemplateRef<any>, _viewContainerRef: ViewContainerRef);
|
|
10
12
|
ngOnInit(): void;
|
|
11
13
|
ngOnDestroy(): void;
|
|
14
|
+
static ngAcceptInputType_bbAuthenticatedElse: TemplateRef<any>;
|
|
12
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbAuthenticated, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BbAuthenticated, "[bbAuthenticated]", never, {}, {}, never, never, false>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbAuthenticated, "[bbAuthenticated]", never, { "bbAuthenticatedElse": "bbAuthenticatedElse"; }, {}, never, never, false>;
|
|
14
17
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { PermissionMode } from '../interfaces/permission.interface';
|
|
3
|
+
import { Permissions } from '../permissions/permissions.service';
|
|
4
|
+
import { AbstractAuthDirective } from './abstract.directive';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class BbPermission implements OnInit, OnDestroy {
|
|
6
|
+
export declare class BbPermission extends AbstractAuthDirective implements OnInit, OnDestroy {
|
|
5
7
|
private _permissions;
|
|
6
8
|
private _templateRef;
|
|
7
9
|
private _viewContainerRef;
|
|
8
10
|
private _permission$;
|
|
9
|
-
private
|
|
10
|
-
private _elseTemplateRef;
|
|
11
|
-
private _thenViewRef;
|
|
12
|
-
private _elseViewRef;
|
|
11
|
+
private _mode$;
|
|
13
12
|
set bbPermission(value: string | string[]);
|
|
14
|
-
set bbPermissionElse(templateRef: TemplateRef<any>
|
|
13
|
+
set bbPermissionElse(templateRef: TemplateRef<any>);
|
|
14
|
+
set bbPermissionMode(mode: PermissionMode);
|
|
15
15
|
private _subscription;
|
|
16
16
|
constructor(_permissions: Permissions, _templateRef: TemplateRef<any>, _viewContainerRef: ViewContainerRef);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
ngOnDestroy(): void;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
static ngAcceptInputType_bbPermission: string | string[];
|
|
20
|
+
static ngAcceptInputType_bbPermissionElse: TemplateRef<any>;
|
|
21
|
+
static ngAcceptInputType_bbPermissionMode: PermissionMode;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbPermission, never>;
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BbPermission, "[bbPermission]", never, { "bbPermission": "bbPermission"; "bbPermissionElse": "bbPermissionElse"; }, {}, never, never, false>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbPermission, "[bbPermission]", never, { "bbPermission": "bbPermission"; "bbPermissionElse": "bbPermissionElse"; "bbPermissionMode": "bbPermissionMode"; }, {}, never, never, false>;
|
|
24
24
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router';
|
|
1
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { AuthConfig } from '../interfaces/config.interface';
|
|
2
3
|
import { Auth } from '../auth.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class BbAnonymousGuard implements CanActivate, CanActivateChild {
|
|
5
6
|
private _auth;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
private _router;
|
|
8
|
+
private _config?;
|
|
9
|
+
constructor(_auth: Auth, _router: Router, _config?: AuthConfig);
|
|
10
|
+
canActivate(_: ActivatedRouteSnapshot, __: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
11
|
+
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbAnonymousGuard, [null, null, { optional: true; }]>;
|
|
10
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<BbAnonymousGuard>;
|
|
11
14
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, RouterStateSnapshot } from '@angular/router';
|
|
1
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { AuthConfig } from '../interfaces/config.interface';
|
|
2
3
|
import { Auth } from '../auth.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class BbAuthenticatedGuard implements CanActivate, CanActivateChild {
|
|
5
6
|
private _auth;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
private _router;
|
|
8
|
+
private _config?;
|
|
9
|
+
constructor(_auth: Auth, _router: Router, _config?: AuthConfig);
|
|
10
|
+
canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
11
|
+
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbAuthenticatedGuard, [null, null, { optional: true; }]>;
|
|
10
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<BbAuthenticatedGuard>;
|
|
11
14
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { Permissions } from '../permissions/permissions.service';
|
|
3
|
+
import { AuthConfig } from '../interfaces/config.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BbPermissionGuard implements CanActivate, CanActivateChild {
|
|
6
|
+
private _router;
|
|
7
|
+
private _permissions;
|
|
8
|
+
private _config?;
|
|
9
|
+
constructor(_router: Router, _permissions: Permissions, _config?: AuthConfig);
|
|
10
|
+
canActivate(snapshot: ActivatedRouteSnapshot, _: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
11
|
+
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): import("rxjs").Observable<boolean | import("@angular/router").UrlTree>;
|
|
12
|
+
private parsePermission;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbPermissionGuard, [null, null, { optional: true; }]>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BbPermissionGuard>;
|
|
15
|
+
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { AppPermissions } from '../permissions/permissions.handler';
|
|
1
2
|
export declare class AuthConfig {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
applicationId: string;
|
|
4
|
+
http?: {
|
|
5
|
+
scheme?: string;
|
|
6
|
+
header?: string;
|
|
7
|
+
};
|
|
8
|
+
redirects?: {
|
|
9
|
+
authenticated?: string | string[];
|
|
10
|
+
unauthenticated?: string | string[];
|
|
11
|
+
permissionDenied?: string | string[];
|
|
12
|
+
};
|
|
13
|
+
setRedirectOnFailedAuth?: boolean;
|
|
6
14
|
bootstrap?: boolean;
|
|
15
|
+
providers?: string[];
|
|
7
16
|
autoRefresh?: boolean;
|
|
8
|
-
|
|
9
|
-
permissions?: {
|
|
10
|
-
[permission: string]: string[];
|
|
11
|
-
};
|
|
17
|
+
permissions?: AppPermissions<any, any>;
|
|
12
18
|
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
export interface AuthProvider {
|
|
3
|
-
authenticate(httpClient: HttpClient): Promise<
|
|
3
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
4
4
|
}
|
|
5
5
|
export interface AuthProviderResponse {
|
|
6
|
-
|
|
6
|
+
token: string;
|
|
7
|
+
refresh_token?: string;
|
|
7
8
|
provider?: string;
|
|
8
|
-
|
|
9
|
+
verify_token?: string;
|
|
10
|
+
user?: any;
|
|
11
|
+
}
|
|
12
|
+
export interface AuthProviderResult {
|
|
9
13
|
accessToken?: string;
|
|
10
14
|
refreshToken?: string;
|
|
15
|
+
provider?: string;
|
|
16
|
+
verifyToken?: string;
|
|
17
|
+
user?: any;
|
|
11
18
|
}
|
|
12
19
|
export interface AuthSignInResponse {
|
|
13
20
|
user?: unknown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PermissionData, PermissionRecord } from '../interfaces/permission.interface';
|
|
2
|
+
export declare class AppPermissions<T extends string, R> {
|
|
3
|
+
private _data;
|
|
4
|
+
constructor(_data: PermissionData<T, PermissionRecord<R>>);
|
|
5
|
+
verify(permission: PermissionRecord<R>, role: T): boolean;
|
|
6
|
+
verifyForUser(permission: PermissionRecord<R>, data: object): boolean;
|
|
7
|
+
getRole(data: object): T;
|
|
8
|
+
static forRoles(data: Record<string, string[]>): AppPermissions<string, string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PermissionOptions } from '../interfaces/permission.interface';
|
|
2
|
+
import { AuthConfig } from '../interfaces/config.interface';
|
|
3
|
+
import { Auth } from '../auth.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class Permissions {
|
|
6
|
+
private _auth;
|
|
7
|
+
private _config?;
|
|
8
|
+
private readonly _permissionHandler;
|
|
9
|
+
constructor(_auth: Auth, _config?: AuthConfig);
|
|
10
|
+
has(value: string | string[], options?: PermissionOptions): import("rxjs").Observable<boolean>;
|
|
11
|
+
private verifyModeAnd;
|
|
12
|
+
private verifyModeOr;
|
|
13
|
+
private getRequiredPermissions;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Permissions, [null, { optional: true; }]>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Permissions>;
|
|
16
|
+
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { AuthProvider } from '../interfaces/provider.interface';
|
|
1
|
+
import { AuthProvider, AuthProviderResult } from '../interfaces/provider.interface';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
export declare class AuthEmailProvider implements AuthProvider {
|
|
4
4
|
private _email;
|
|
5
5
|
private _password;
|
|
6
6
|
private _endpoint;
|
|
7
7
|
constructor(_email: string, _password: string, _endpoint: string);
|
|
8
|
-
authenticate(httpClient: HttpClient): Promise<
|
|
9
|
-
accessToken: any;
|
|
10
|
-
refreshToken: any;
|
|
11
|
-
user: any;
|
|
12
|
-
provider: any;
|
|
13
|
-
verifyToken: any;
|
|
14
|
-
}>;
|
|
8
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
15
9
|
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { AuthProvider } from '../interfaces/provider.interface';
|
|
1
|
+
import { AuthProvider, AuthProviderResult } from '../interfaces/provider.interface';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
export declare class AuthVerifyProvider implements AuthProvider {
|
|
4
4
|
private _code;
|
|
5
5
|
private _verifyToken;
|
|
6
6
|
private _endpoint;
|
|
7
7
|
constructor(_code: string, _verifyToken: string, _endpoint: string);
|
|
8
|
-
authenticate(httpClient: HttpClient): Promise<
|
|
9
|
-
accessToken: any;
|
|
10
|
-
refreshToken: any;
|
|
11
|
-
user: any;
|
|
12
|
-
}>;
|
|
8
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
13
9
|
}
|
package/auth/public_api.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export * from './lib/interfaces/token.interface';
|
|
2
2
|
export * from './lib/interfaces/config.interface';
|
|
3
|
-
export * from './lib/interfaces/mapper.interface';
|
|
4
3
|
export * from './lib/interfaces/provider.interface';
|
|
4
|
+
export * from './lib/interfaces/permission.interface';
|
|
5
5
|
export * from './lib/tokens/use-authorization.token';
|
|
6
6
|
export * from './lib/helpers/jwt.helper';
|
|
7
|
-
export * from './lib/helpers/mapper.helper';
|
|
8
7
|
export * from './lib/directives/authenticated.directive';
|
|
9
|
-
export * from './lib/directives/role.directive';
|
|
10
8
|
export * from './lib/directives/permission.directive';
|
|
9
|
+
export * from './lib/permissions/permissions.handler';
|
|
10
|
+
export * from './lib/permissions/permissions.service';
|
|
11
11
|
export * from './lib/guards/anonymous.guard';
|
|
12
12
|
export * from './lib/guards/authenticated.guard';
|
|
13
|
+
export * from './lib/guards/permission.guard';
|
|
13
14
|
export * from './lib/providers/email.provider';
|
|
14
15
|
export * from './lib/providers/verify.provider';
|
|
15
16
|
export * from './lib/auth.session';
|
|
16
17
|
export * from './lib/auth.service';
|
|
17
|
-
export * from './lib/permissions.service';
|
|
18
18
|
export * from './lib/auth.module';
|
|
@@ -24,6 +24,9 @@ export declare class BbiCheckbox implements ControlValueAccessor, AfterViewInit
|
|
|
24
24
|
get required(): boolean;
|
|
25
25
|
set required(value: BooleanInput);
|
|
26
26
|
private _required;
|
|
27
|
+
get hideText(): boolean;
|
|
28
|
+
set hideText(value: BooleanInput);
|
|
29
|
+
private _hideText;
|
|
27
30
|
onChange: (newValue: boolean) => void;
|
|
28
31
|
onTouched: () => void;
|
|
29
32
|
constructor(_renderer: Renderer2, _changeDetectorRef: ChangeDetectorRef);
|
|
@@ -42,6 +45,7 @@ export declare class BbiCheckbox implements ControlValueAccessor, AfterViewInit
|
|
|
42
45
|
static ngAcceptInputType_required: BooleanInput;
|
|
43
46
|
static ngAcceptInputType_grouped: BooleanInput;
|
|
44
47
|
static ngAcceptInputType_indeterminate: BooleanInput;
|
|
48
|
+
static ngAcceptInputType_hideText: BooleanInput;
|
|
45
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbiCheckbox, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BbiCheckbox, "bbi-checkbox", never, { "checked": "checked"; "disabled": "disabled"; "grouped": "grouped"; "indeterminate": "indeterminate"; "required": "required"; }, { "checkedChange": "checkedChange"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], false>;
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbiCheckbox, "bbi-checkbox", never, { "checked": "checked"; "disabled": "disabled"; "grouped": "grouped"; "indeterminate": "indeterminate"; "required": "required"; "hideText": "hideText"; }, { "checkedChange": "checkedChange"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], false>;
|
|
47
51
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const controlErrorAnimation: import("@angular/animations").AnimationTriggerMetadata;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ControlError } from '../control-error.interface';
|
|
2
|
+
import { Localize } from '@bravobit/bb-foundation/localize';
|
|
3
|
+
import { ValidationErrors } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class BbiControlError {
|
|
6
|
+
private _localize?;
|
|
7
|
+
private _functions?;
|
|
8
|
+
readonly errorFunctions: ControlError;
|
|
9
|
+
animation: boolean;
|
|
10
|
+
set errors(errors: ValidationErrors | null);
|
|
11
|
+
error: string | null;
|
|
12
|
+
constructor(_localize?: Localize, _functions?: ControlError[]);
|
|
13
|
+
private parseError;
|
|
14
|
+
private getErrorSentence;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbiControlError, [{ optional: true; }, { optional: true; }]>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbiControlError, "bbi-control-error", never, { "errors": "errors"; }, {}, never, never, false>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BbiControlErrorSubmit implements OnInit {
|
|
4
|
+
private _elementRef;
|
|
5
|
+
private _submitted$;
|
|
6
|
+
private _subscription;
|
|
7
|
+
constructor(_elementRef: ElementRef<HTMLFormElement>);
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
get submitted(): boolean;
|
|
10
|
+
submit(): void;
|
|
11
|
+
reset(): void;
|
|
12
|
+
private handleNativeForm;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbiControlErrorSubmit, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbiControlErrorSubmit, "form", ["bbiControlErrorSubmit"], {}, {}, never, never, false>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export declare type ControlErrorData = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export declare type ControlError = {
|
|
6
|
+
[name: string]: (data: ControlErrorData) => string | {
|
|
7
|
+
token: string;
|
|
8
|
+
data: object;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const BBI_CONTROL_ERRORS: InjectionToken<ControlError[]>;
|
|
12
|
+
export declare type ControlErrorMode = 'blur' | 'changes' | 'hidden';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./control-error/control-error.component";
|
|
3
|
+
import * as i2 from "./control-error-submit.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class ControlErrorModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ControlErrorModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ControlErrorModule, [typeof i1.BbiControlError, typeof i2.BbiControlErrorSubmit], [typeof i3.CommonModule], [typeof i1.BbiControlError, typeof i2.BbiControlErrorSubmit]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ControlErrorModule>;
|
|
9
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { ControlsConfig } from './controls.interfaces';
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./
|
|
4
|
+
import * as i1 from "./form-control/form-control.module";
|
|
5
|
+
import * as i2 from "./checkbox/checkbox.module";
|
|
6
|
+
import * as i3 from "./control-error/control-error.module";
|
|
3
7
|
export declare class ControlsModule {
|
|
8
|
+
static forRoot(config?: ControlsConfig): ModuleWithProviders<ControlsModule>;
|
|
4
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ControlsModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ControlsModule, never, [typeof i1.CheckboxModule], [typeof i1.CheckboxModule]>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ControlsModule, never, [typeof i1.FormControlModule, typeof i2.CheckboxModule, typeof i3.ControlErrorModule], [typeof i1.FormControlModule, typeof i2.CheckboxModule, typeof i3.ControlErrorModule]>;
|
|
6
11
|
static ɵinj: i0.ɵɵInjectorDeclaration<ControlsModule>;
|
|
7
12
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChangeDetectorRef, DoCheck } from '@angular/core';
|
|
2
|
+
import { BbiControlErrorSubmit } from '../../control-error/control-error-submit.directive';
|
|
3
|
+
import { ControlErrorMode } from '../../control-error/control-error.interface';
|
|
4
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import { BbiFormControlInput } from '../form-control-input.directive';
|
|
6
|
+
import { ValidationErrors } from '@angular/forms';
|
|
7
|
+
import { BehaviorSubject } from 'rxjs';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class BbiFormControl implements DoCheck {
|
|
10
|
+
private _changeDetectorRef;
|
|
11
|
+
private _errorSubmit?;
|
|
12
|
+
readonly labelId: string;
|
|
13
|
+
formControlInput?: BbiFormControlInput;
|
|
14
|
+
label: string | null;
|
|
15
|
+
hint: string | null;
|
|
16
|
+
errorMode: ControlErrorMode;
|
|
17
|
+
validationErrors$: BehaviorSubject<ValidationErrors>;
|
|
18
|
+
errors$: import("rxjs").Observable<ValidationErrors>;
|
|
19
|
+
get grouped(): boolean;
|
|
20
|
+
set grouped(value: BooleanInput);
|
|
21
|
+
private _grouped;
|
|
22
|
+
constructor(_changeDetectorRef: ChangeDetectorRef, _errorSubmit?: BbiControlErrorSubmit);
|
|
23
|
+
ngDoCheck(): void;
|
|
24
|
+
private showErrors;
|
|
25
|
+
static ngAcceptInputType_label: string | null | undefined;
|
|
26
|
+
static ngAcceptInputType_hint: string | null | undefined;
|
|
27
|
+
static ngAcceptInputType_errorMode: ControlErrorMode;
|
|
28
|
+
static ngAcceptInputType_grouped: BooleanInput;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbiFormControl, [null, { optional: true; }]>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbiFormControl, "bbi-form-control", never, { "label": "label"; "hint": "hint"; "errorMode": "errorMode"; "grouped": "grouped"; }, {}, ["formControlInput"], ["[bbi-form-control-addon=prefix]", "input[bbiFormControlInput]", "[bbi-form-control-addon=suffix]"], false>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class BbiFormControlAddon {
|
|
3
|
+
type: 'prefix' | 'suffix' | null;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbiFormControlAddon, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbiFormControlAddon, "[bbi-form-control-addon]", never, { "type": "bbi-form-control-addon"; }, {}, never, ["*"], false>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
3
|
+
import { NgControl, ValidationErrors } from '@angular/forms';
|
|
4
|
+
import { BbiFormControl } from './form-control/form-control.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class BbiFormControlInput implements OnInit, OnDestroy {
|
|
7
|
+
private _elementRef;
|
|
8
|
+
private _formControl;
|
|
9
|
+
private _changeDetectorRef;
|
|
10
|
+
private _ngControl;
|
|
11
|
+
readonly labelId: string;
|
|
12
|
+
errors: ValidationErrors | null;
|
|
13
|
+
focused: boolean;
|
|
14
|
+
private _subscription;
|
|
15
|
+
constructor(_elementRef: ElementRef, _formControl: BbiFormControl, _changeDetectorRef: ChangeDetectorRef, _ngControl: NgControl);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
get control(): NgControl;
|
|
19
|
+
get disabled(): boolean;
|
|
20
|
+
set disabled(value: BooleanInput);
|
|
21
|
+
private _disabled;
|
|
22
|
+
get readonly(): boolean;
|
|
23
|
+
set readonly(value: BooleanInput);
|
|
24
|
+
private _readonly;
|
|
25
|
+
get required(): BooleanInput;
|
|
26
|
+
set required(value: BooleanInput);
|
|
27
|
+
private _required;
|
|
28
|
+
private handleControlErrorStatus;
|
|
29
|
+
private handleControlDisabledStatus;
|
|
30
|
+
private handleFocusedState;
|
|
31
|
+
static ngAcceptInputType_disabled: BooleanInput;
|
|
32
|
+
static ngAcceptInputType_required: BooleanInput;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbiFormControlInput, [null, null, null, { optional: true; self: true; }]>;
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbiFormControlInput, "input[bbiFormControlInput]", never, { "disabled": "disabled"; "readonly": "readonly"; "required": "required"; }, {}, never, never, false>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./form-control/form-control.component";
|
|
3
|
+
import * as i2 from "./form-control-input.directive";
|
|
4
|
+
import * as i3 from "./form-control-addon/form-control-addon.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "../control-error/control-error.module";
|
|
7
|
+
export declare class FormControlModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormControlModule, [typeof i1.BbiFormControl, typeof i2.BbiFormControlInput, typeof i3.BbiFormControlAddon], [typeof i4.CommonModule, typeof i5.ControlErrorModule], [typeof i1.BbiFormControl, typeof i2.BbiFormControlInput, typeof i3.BbiFormControlAddon]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormControlModule>;
|
|
11
|
+
}
|
package/controls/public_api.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export * from './lib/checkbox/checkbox-group/checkbox-group.component';
|
|
2
2
|
export * from './lib/checkbox/checkbox/checkbox.component';
|
|
3
3
|
export * from './lib/checkbox/checkbox.module';
|
|
4
|
+
export * from './lib/form-control/form-control/form-control.component';
|
|
5
|
+
export * from './lib/form-control/form-control-addon/form-control-addon.component';
|
|
6
|
+
export * from './lib/form-control/form-control-input.directive';
|
|
7
|
+
export * from './lib/form-control/form-control.module';
|
|
8
|
+
export * from './lib/control-error/control-error/control-error.component';
|
|
9
|
+
export * from './lib/control-error/control-error-submit.directive';
|
|
10
|
+
export * from './lib/control-error/control-error.interface';
|
|
11
|
+
export * from './lib/control-error/control-error.defaults';
|
|
12
|
+
export * from './lib/control-error/control-error.module';
|
|
4
13
|
export * from './lib/controls.module';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
2
|
import { BbDashboardSidebar } from '../dashboard-sidebar/dashboard-sidebar.component';
|
|
3
|
-
import {
|
|
3
|
+
import { Platform } from '@angular/cdk/platform';
|
|
4
|
+
import { Patch } from '@bravobit/bb-foundation';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class BbDashboard implements OnInit, OnDestroy {
|
|
6
7
|
private _patch;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { BbButton } from '@bravobit/bb-foundation/elements';
|
|
3
3
|
import { BbDialogConfig } from '../dialog.interfaces';
|
|
4
4
|
import { BbDialogRef } from '../dialog.ref';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class BbDialogConfirm implements AfterViewInit {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
private _config;
|
|
8
|
+
private _dialogRef;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly description: string | TemplateRef<any>;
|
|
11
|
+
readonly cancelButtonText: string;
|
|
12
|
+
readonly confirmButtonText: string;
|
|
13
|
+
readonly width: string;
|
|
14
|
+
confirmButton?: BbButton;
|
|
10
15
|
dialogId: string;
|
|
11
|
-
constructor(
|
|
16
|
+
constructor(_config: BbDialogConfig, _dialogRef: BbDialogRef<boolean>);
|
|
12
17
|
ngAfterViewInit(): void;
|
|
13
18
|
onClose(result: boolean): void;
|
|
14
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbDialogConfirm, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bbDialogContainerAnimation: import("@angular/animations").AnimationTriggerMetadata;
|