@bravobit/bb-foundation 0.54.3 → 0.55.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/index.d.ts +267 -5
- package/collections/index.d.ts +350 -5
- package/combobox/index.d.ts +58 -5
- package/dashboard/index.d.ts +104 -5
- package/dialog/index.d.ts +168 -5
- package/elements/index.d.ts +838 -5
- package/fesm2022/bravobit-bb-foundation-auth.mjs +22 -22
- package/fesm2022/bravobit-bb-foundation-collections.mjs +44 -44
- package/fesm2022/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-combobox.mjs +15 -15
- package/fesm2022/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2022/bravobit-bb-foundation-dialog.mjs +33 -33
- package/fesm2022/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-elements.mjs +102 -102
- package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-localize.mjs +18 -18
- package/fesm2022/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation-notifications.mjs +15 -15
- package/fesm2022/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-permissions.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +11 -12
- package/fesm2022/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-select.mjs +21 -21
- package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-storage.mjs +3 -3
- package/fesm2022/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2022/bravobit-bb-foundation-tooltip.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-utils.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation.mjs +25 -25
- package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
- package/http/index.d.ts +78 -5
- package/index.d.ts +215 -5
- package/localize/index.d.ts +546 -5
- package/masking/index.d.ts +104 -5
- package/notifications/index.d.ts +78 -5
- package/package.json +21 -21
- package/permissions/index.d.ts +89 -5
- package/recaptcha/index.d.ts +92 -5
- package/rxjs/index.d.ts +19 -5
- package/select/index.d.ts +129 -5
- package/storage/index.d.ts +109 -5
- package/table/index.d.ts +197 -5
- package/tooltip/index.d.ts +45 -5
- package/utils/index.d.ts +66 -5
- package/auth/lib/acting.interceptor.d.ts +0 -9
- package/auth/lib/acting.service.d.ts +0 -17
- package/auth/lib/auth.config.d.ts +0 -3
- package/auth/lib/auth.interceptor.d.ts +0 -20
- package/auth/lib/auth.module.d.ts +0 -10
- package/auth/lib/auth.service.d.ts +0 -51
- package/auth/lib/auth.session.d.ts +0 -50
- package/auth/lib/directives/anonymous.directive.d.ts +0 -20
- package/auth/lib/directives/authenticated.directive.d.ts +0 -20
- package/auth/lib/guards/anonymous.guard.d.ts +0 -2
- package/auth/lib/guards/authenticated.guard.d.ts +0 -2
- package/auth/lib/helpers/jwt.helper.d.ts +0 -8
- package/auth/lib/interfaces/config.interface.d.ts +0 -27
- package/auth/lib/interfaces/provider.interface.d.ts +0 -23
- package/auth/lib/interfaces/token.interface.d.ts +0 -11
- package/auth/lib/providers/email.provider.d.ts +0 -9
- package/auth/lib/providers/verify.provider.d.ts +0 -9
- package/auth/lib/tokens/use-authorization.token.d.ts +0 -2
- package/auth/public_api.d.ts +0 -17
- package/collections/lib/classes/array.collection.d.ts +0 -17
- package/collections/lib/collection.d.ts +0 -40
- package/collections/lib/collections.config.d.ts +0 -3
- package/collections/lib/collections.interfaces.d.ts +0 -10
- package/collections/lib/collections.module.d.ts +0 -19
- package/collections/lib/components/collections-actions/collections-actions.component.d.ts +0 -13
- package/collections/lib/components/collections-grid/collections-grid.component.d.ts +0 -18
- package/collections/lib/components/collections-pager/collections-pager.component.d.ts +0 -38
- package/collections/lib/components/collections-table/collections-table.component.d.ts +0 -26
- package/collections/lib/components/collections-table-label/collections-table-label.component.d.ts +0 -11
- package/collections/lib/components/collections-table-sorting/collections-table-sorting.component.d.ts +0 -18
- package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +0 -16
- package/collections/lib/directives/collections-data-row.directive.d.ts +0 -14
- package/collections/lib/directives/collections-data.directive.d.ts +0 -14
- package/collections/lib/directives/collections-empty.directive.d.ts +0 -14
- package/collections/lib/directives/collections-error.directive.d.ts +0 -14
- package/collections/lib/directives/collections-initial.directive.d.ts +0 -11
- package/collections/lib/directives/collections-item.directive.d.ts +0 -14
- package/collections/lib/interfaces/array-collection.interface.d.ts +0 -6
- package/collections/lib/interfaces/collection.interface.d.ts +0 -32
- package/collections/lib/providers/api-collection.provider.d.ts +0 -19
- package/collections/lib/providers/collection.provider.d.ts +0 -9
- package/collections/lib/providers/local-collection.provider.d.ts +0 -16
- package/collections/public_api.d.ts +0 -23
- package/combobox/combobox/combobox-container.directive.d.ts +0 -28
- package/combobox/combobox/combobox.component.d.ts +0 -37
- package/combobox/combobox-label.directive.d.ts +0 -5
- package/combobox/combobox-option.directive.d.ts +0 -7
- package/combobox/combobox-panel/combobox-panel.animation.d.ts +0 -1
- package/combobox/combobox-panel/combobox-panel.component.d.ts +0 -18
- package/combobox/combobox.interface.d.ts +0 -8
- package/combobox/public_api.d.ts +0 -3
- package/dashboard/lib/dashboard/dashboard.component.d.ts +0 -17
- package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +0 -9
- package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +0 -9
- package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +0 -8
- package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +0 -19
- package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +0 -22
- package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +0 -16
- package/dashboard/lib/dashboard.module.d.ts +0 -13
- package/dashboard/public_api.d.ts +0 -8
- package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +0 -5
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +0 -22
- package/dialog/lib/dialog-container/dialog-container.component.d.ts +0 -23
- package/dialog/lib/dialog-header/dialog-header.component.d.ts +0 -13
- package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +0 -16
- package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +0 -19
- package/dialog/lib/dialog.config.d.ts +0 -3
- package/dialog/lib/dialog.insertion.d.ts +0 -7
- package/dialog/lib/dialog.interfaces.d.ts +0 -21
- package/dialog/lib/dialog.module.d.ts +0 -17
- package/dialog/lib/dialog.ref.d.ts +0 -8
- package/dialog/lib/dialog.service.d.ts +0 -15
- package/dialog/lib/directives/confirm.directive.d.ts +0 -14
- package/dialog/public_api.d.ts +0 -10
- package/elements/lib/avatar/avatar.component.d.ts +0 -31
- package/elements/lib/button/button.component.d.ts +0 -21
- package/elements/lib/checkbox/checkbox.component.d.ts +0 -36
- package/elements/lib/checkbox-group/checkbox-group.component.d.ts +0 -13
- package/elements/lib/color-picker/color-picker.component.d.ts +0 -18
- package/elements/lib/color-slider/color-slider.component.d.ts +0 -24
- package/elements/lib/date-picker/date-picker.component.d.ts +0 -77
- package/elements/lib/directives/color-picker.directive.d.ts +0 -27
- package/elements/lib/directives/extra-error-controls.directive.d.ts +0 -13
- package/elements/lib/directives/file-drop.directive.d.ts +0 -13
- package/elements/lib/directives/form-submit.directive.d.ts +0 -17
- package/elements/lib/directives/form-submitter.directive.d.ts +0 -9
- package/elements/lib/directives/image-upload.directive.d.ts +0 -25
- package/elements/lib/directives/input.directive.d.ts +0 -16
- package/elements/lib/elements.config.d.ts +0 -3
- package/elements/lib/elements.inject.d.ts +0 -3
- package/elements/lib/elements.interfaces.d.ts +0 -41
- package/elements/lib/elements.module.d.ts +0 -39
- package/elements/lib/file-picker/file-picker.component.d.ts +0 -57
- package/elements/lib/form-control/form-control.component.d.ts +0 -20
- package/elements/lib/form-error/form-error.component.d.ts +0 -36
- package/elements/lib/form-group/form-group.component.d.ts +0 -7
- package/elements/lib/icon/icon.component.d.ts +0 -26
- package/elements/lib/image-control/image-control.component.d.ts +0 -44
- package/elements/lib/image-picker/image-picker.component.d.ts +0 -39
- package/elements/lib/multi-file-control/multi-file-control.component.d.ts +0 -72
- package/elements/lib/pincode-control/pincode-control.component.d.ts +0 -65
- package/elements/lib/pipes/date.pipe.d.ts +0 -9
- package/elements/lib/pipes/file-data-url.pipe.d.ts +0 -12
- package/elements/lib/pipes/file-image.pipe.d.ts +0 -14
- package/elements/lib/pipes/file-size.pipe.d.ts +0 -7
- package/elements/lib/pipes/relative-time.pipe.d.ts +0 -19
- package/elements/lib/radio-button/radio-button.component.d.ts +0 -16
- package/elements/lib/radio-group/radio-group.component.d.ts +0 -38
- package/elements/lib/spinner/spinner.component.d.ts +0 -9
- package/elements/public_api.d.ts +0 -35
- package/http/lib/classes/http.config.d.ts +0 -9
- package/http/lib/classes/http.error.d.ts +0 -7
- package/http/lib/http.config.d.ts +0 -5
- package/http/lib/http.interfaces.d.ts +0 -21
- package/http/lib/http.module.d.ts +0 -11
- package/http/lib/interceptors/base-url.interceptor.d.ts +0 -15
- package/http/lib/interceptors/error.interceptor.d.ts +0 -9
- package/http/public_api.d.ts +0 -7
- package/lib/core/colors/hex.d.ts +0 -18
- package/lib/core/colors/hsl.d.ts +0 -7
- package/lib/core/colors/hsv.d.ts +0 -13
- package/lib/core/colors/rgb.d.ts +0 -7
- package/lib/core/functions/array.utils.d.ts +0 -1
- package/lib/core/functions/date.utils.d.ts +0 -4
- package/lib/core/functions/file.utils.d.ts +0 -3
- package/lib/core/functions/format.utils.d.ts +0 -1
- package/lib/core/functions/password.utils.d.ts +0 -1
- package/lib/core/functions/route-cache.utils.d.ts +0 -10
- package/lib/core/functions/utils.d.ts +0 -1
- package/lib/core/miscellaneous/coercion.d.ts +0 -2
- package/lib/core/miscellaneous/regex.d.ts +0 -5
- package/lib/core/miscellaneous/validator.d.ts +0 -13
- package/lib/core/services/exif.service.d.ts +0 -12
- package/lib/core/services/file-loader.service.d.ts +0 -13
- package/lib/core/services/files.service.d.ts +0 -15
- package/lib/core/services/image-converter.service.d.ts +0 -17
- package/lib/core/services/languages.service.d.ts +0 -15
- package/lib/core/services/network.service.d.ts +0 -13
- package/lib/core/services/patch.service.d.ts +0 -14
- package/lib/core/tokens/accept-language.token.d.ts +0 -2
- package/lib/core/tokens/cookie.token.d.ts +0 -2
- package/lib/core/tokens/global-focus-mode.token.d.ts +0 -4
- package/lib/core/tokens/location.token.d.ts +0 -2
- package/lib/core/tokens/navigator.token.d.ts +0 -2
- package/lib/core/tokens/window.token.d.ts +0 -2
- package/localize/lib/dictionary/dictionary.class.d.ts +0 -28
- package/localize/lib/dictionary/dictionary.context.d.ts +0 -7
- package/localize/lib/dictionary/dictionary.data.d.ts +0 -7
- package/localize/lib/functions/date.function.d.ts +0 -5
- package/localize/lib/functions/lowercase.function.d.ts +0 -5
- package/localize/lib/functions/uppercase.function.d.ts +0 -5
- package/localize/lib/handlers/missing.handler.d.ts +0 -6
- package/localize/lib/interfaces/config.interfaces.d.ts +0 -18
- package/localize/lib/interfaces/functions.interfaces.d.ts +0 -7
- package/localize/lib/interfaces/handlers.interfaces.d.ts +0 -6
- package/localize/lib/interfaces/options.interfaces.d.ts +0 -11
- package/localize/lib/localizations/dutch.localization.d.ts +0 -74
- package/localize/lib/localizations/english.localization.d.ts +0 -74
- package/localize/lib/localizations/papiamento.localization.d.ts +0 -74
- package/localize/lib/localizations/spanish.localization.d.ts +0 -74
- package/localize/lib/localize.config.d.ts +0 -5
- package/localize/lib/localize.module.d.ts +0 -12
- package/localize/lib/localize.pipe.d.ts +0 -12
- package/localize/lib/localize.service.d.ts +0 -43
- package/localize/lib/localize.tokens.d.ts +0 -11
- package/localize/lib/transforms/abstract.transform.d.ts +0 -13
- package/localize/lib/transforms/interpolate.transform.d.ts +0 -13
- package/localize/lib/transforms/plural.transform.d.ts +0 -16
- package/localize/lib/transforms/reference.transform.d.ts +0 -9
- package/localize/lib/views/localize-string/localize-string.component.d.ts +0 -23
- package/localize/lib/views/localize-template.directive.d.ts +0 -9
- package/localize/public_api.d.ts +0 -26
- package/masking/lib/directives/currency-mask.directive.d.ts +0 -17
- package/masking/lib/directives/date-mask.directive.d.ts +0 -17
- package/masking/lib/directives/input-mask.directive.d.ts +0 -38
- package/masking/lib/input-mask.interface.d.ts +0 -19
- package/masking/lib/masking.module.d.ts +0 -9
- package/masking/lib/masking.service.d.ts +0 -12
- package/masking/public_api.d.ts +0 -6
- package/notifications/lib/notifications-item/notifications-item.component.d.ts +0 -33
- package/notifications/lib/notifications-list/notifications-list.component.d.ts +0 -18
- package/notifications/lib/notifications.animations.d.ts +0 -1
- package/notifications/lib/notifications.config.d.ts +0 -3
- package/notifications/lib/notifications.interfaces.d.ts +0 -36
- package/notifications/lib/notifications.module.d.ts +0 -9
- package/notifications/lib/notifications.service.d.ts +0 -30
- package/notifications/public_api.d.ts +0 -4
- package/permissions/lib/directives/permission.directive.d.ts +0 -27
- package/permissions/lib/guards/permission.guard.d.ts +0 -3
- package/permissions/lib/handlers/abstract.handler.d.ts +0 -4
- package/permissions/lib/handlers/local.handler.d.ts +0 -10
- package/permissions/lib/permissions.config.d.ts +0 -3
- package/permissions/lib/permissions.interface.d.ts +0 -13
- package/permissions/lib/permissions.module.d.ts +0 -10
- package/permissions/lib/permissions.service.d.ts +0 -23
- package/permissions/public_api.d.ts +0 -8
- package/public_api.d.ts +0 -27
- package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +0 -47
- package/recaptcha/lib/recaptcha-loader.service.d.ts +0 -19
- package/recaptcha/lib/recaptcha.config.d.ts +0 -3
- package/recaptcha/lib/recaptcha.interface.d.ts +0 -13
- package/recaptcha/lib/recaptcha.module.d.ts +0 -10
- package/recaptcha/public_api.d.ts +0 -5
- package/rxjs/lib/observables/get-control-value.observable.d.ts +0 -3
- package/rxjs/lib/observables/get-route-param.observable.d.ts +0 -3
- package/rxjs/lib/operators/combine-latest-map.operator.d.ts +0 -8
- package/rxjs/lib/operators/filter-nil.operator.d.ts +0 -1
- package/rxjs/public_api.d.ts +0 -4
- package/select/lib/select/select.component.d.ts +0 -94
- package/select/lib/select-label.directive.d.ts +0 -7
- package/select/lib/select-multi-label.directive.d.ts +0 -7
- package/select/lib/select-option-group.directive.d.ts +0 -7
- package/select/lib/select-option.directive.d.ts +0 -7
- package/select/lib/select.config.d.ts +0 -2
- package/select/lib/select.module.d.ts +0 -11
- package/select/public_api.d.ts +0 -7
- package/storage/lib/interfaces/attributes.interface.d.ts +0 -13
- package/storage/lib/interfaces/memory.interface.d.ts +0 -7
- package/storage/lib/interfaces/strategy.interface.d.ts +0 -17
- package/storage/lib/storage.service.d.ts +0 -25
- package/storage/lib/strategies/cookie-storage.strategy.d.ts +0 -20
- package/storage/lib/strategies/memory-storage.strategy.d.ts +0 -11
- package/storage/lib/strategies/polyfill-storage.strategy.d.ts +0 -15
- package/storage/public_api.d.ts +0 -7
- package/table/lib/components/table/table.component.d.ts +0 -57
- package/table/lib/components/table-cell/table-cell.component.d.ts +0 -5
- package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +0 -26
- package/table/lib/components/table-pager/table-pager.component.d.ts +0 -40
- package/table/lib/data/datasource.data.d.ts +0 -14
- package/table/lib/data/generic.data.d.ts +0 -25
- package/table/lib/interfaces/datasource.interface.d.ts +0 -17
- package/table/lib/interfaces/table.interfaces.d.ts +0 -11
- package/table/lib/table.config.d.ts +0 -3
- package/table/lib/table.module.d.ts +0 -10
- package/table/public_api.d.ts +0 -10
- package/tooltip/lib/tooltip-container/tooltip-container.component.d.ts +0 -9
- package/tooltip/lib/tooltip.directive.d.ts +0 -23
- package/tooltip/lib/tooltip.interfaces.d.ts +0 -4
- package/tooltip/lib/tooltip.module.d.ts +0 -7
- package/tooltip/public_api.d.ts +0 -4
- package/utils/lib/directives/autosize.directive.d.ts +0 -19
- package/utils/lib/directives/focus-trap.directive.d.ts +0 -14
- package/utils/lib/directives/focus.directive.d.ts +0 -16
- package/utils/lib/directives/template.directive.d.ts +0 -10
- package/utils/lib/utils.module.d.ts +0 -10
- package/utils/public_api.d.ts +0 -5
package/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,267 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, CanActivateFn } from '@angular/router';
|
|
2
|
+
import { StorageOption, StorageStrategy } from '@bravobit/bb-foundation/storage';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, OnInit, OnDestroy, TemplateRef, EnvironmentProviders, ModuleWithProviders } from '@angular/core';
|
|
5
|
+
import * as _angular_common_http from '@angular/common/http';
|
|
6
|
+
import { HttpClient, HttpContextToken, HttpInterceptor, HttpRequest, HttpHandler, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
7
|
+
import * as rxjs from 'rxjs';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
|
|
10
|
+
interface AuthToken {
|
|
11
|
+
id?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
audience?: string;
|
|
14
|
+
issuer?: string;
|
|
15
|
+
subject?: string;
|
|
16
|
+
notValidBefore?: Date;
|
|
17
|
+
expiresAt?: Date;
|
|
18
|
+
issuedAt?: Date;
|
|
19
|
+
role?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type AuthStrategy = 'httpOnlyCookie' | 'browserStorage';
|
|
23
|
+
interface AuthConfig {
|
|
24
|
+
applicationId: string;
|
|
25
|
+
strategy: AuthStrategy;
|
|
26
|
+
preferredStorageOptions?: StorageOption[];
|
|
27
|
+
http?: {
|
|
28
|
+
scheme?: string;
|
|
29
|
+
header?: string;
|
|
30
|
+
};
|
|
31
|
+
redirects?: {
|
|
32
|
+
authenticated?: string | string[];
|
|
33
|
+
unauthenticated?: string | string[];
|
|
34
|
+
};
|
|
35
|
+
setRedirectOnFailedAuth?: boolean;
|
|
36
|
+
interceptActing?: boolean;
|
|
37
|
+
providers?: string[];
|
|
38
|
+
autoRefresh?: boolean;
|
|
39
|
+
}
|
|
40
|
+
declare const AUTH_CONFIG: InjectionToken<AuthConfig>;
|
|
41
|
+
declare const AUTH_REDIRECT_HANDLER: InjectionToken<AuthRedirectHandler>;
|
|
42
|
+
interface AuthRedirectHandler {
|
|
43
|
+
onFailedAuthenticated(snapshot?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): boolean | UrlTree;
|
|
44
|
+
onFailedAnonymous(snapshot?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): boolean | UrlTree;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface AuthProvider {
|
|
48
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
49
|
+
}
|
|
50
|
+
interface AuthProviderResponse {
|
|
51
|
+
token: string;
|
|
52
|
+
refresh_token?: string;
|
|
53
|
+
provider?: string;
|
|
54
|
+
verify_token?: string;
|
|
55
|
+
user?: any;
|
|
56
|
+
}
|
|
57
|
+
interface AuthProviderResult {
|
|
58
|
+
accessToken?: string;
|
|
59
|
+
refreshToken?: string;
|
|
60
|
+
provider?: string;
|
|
61
|
+
verifyToken?: string;
|
|
62
|
+
user?: any;
|
|
63
|
+
}
|
|
64
|
+
interface AuthSignInResponse {
|
|
65
|
+
user?: unknown;
|
|
66
|
+
provider?: string;
|
|
67
|
+
verifyToken?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare const USE_AUTHORIZATION: HttpContextToken<boolean>;
|
|
71
|
+
|
|
72
|
+
declare class JwtHelper {
|
|
73
|
+
decode(token: string): AuthToken;
|
|
74
|
+
private urlDecode;
|
|
75
|
+
private baseDecodeUnicode;
|
|
76
|
+
private parse;
|
|
77
|
+
private parseDate;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare class BbAuthenticated implements OnInit, OnDestroy {
|
|
81
|
+
private readonly _auth;
|
|
82
|
+
private readonly _templateRef;
|
|
83
|
+
private readonly _viewContainerRef;
|
|
84
|
+
private _valid;
|
|
85
|
+
private _elseTemplateRef;
|
|
86
|
+
private _thenViewRef;
|
|
87
|
+
private _elseViewRef;
|
|
88
|
+
private _subscription;
|
|
89
|
+
set bbAuthenticatedElse(templateRef: TemplateRef<any>);
|
|
90
|
+
ngOnInit(): void;
|
|
91
|
+
ngOnDestroy(): void;
|
|
92
|
+
private updateView;
|
|
93
|
+
private assertTemplate;
|
|
94
|
+
static ngAcceptInputType_bbAuthenticatedElse: TemplateRef<any>;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbAuthenticated, never>;
|
|
96
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbAuthenticated, "ng-template[bbAuthenticated]", never, { "bbAuthenticatedElse": { "alias": "bbAuthenticatedElse"; "required": false; }; }, {}, never, never, true, never>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class BbAnonymous implements OnInit, OnDestroy {
|
|
100
|
+
private readonly _auth;
|
|
101
|
+
private readonly _templateRef;
|
|
102
|
+
private readonly _viewContainerRef;
|
|
103
|
+
private _valid;
|
|
104
|
+
private _elseTemplateRef;
|
|
105
|
+
private _thenViewRef;
|
|
106
|
+
private _elseViewRef;
|
|
107
|
+
private _subscription;
|
|
108
|
+
set bbAnonymousElse(templateRef: TemplateRef<any>);
|
|
109
|
+
ngOnInit(): void;
|
|
110
|
+
ngOnDestroy(): void;
|
|
111
|
+
private updateView;
|
|
112
|
+
private assertTemplate;
|
|
113
|
+
static ngAcceptInputType_bbAnonymousElse: TemplateRef<any>;
|
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbAnonymous, never>;
|
|
115
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbAnonymous, "ng-template[bbAnonymous]", never, { "bbAnonymousElse": { "alias": "bbAnonymousElse"; "required": false; }; }, {}, never, never, true, never>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare const bbAnonymousGuard: CanActivateFn;
|
|
119
|
+
|
|
120
|
+
declare const bbAuthenticatedGuard: CanActivateFn;
|
|
121
|
+
|
|
122
|
+
declare class AuthEmailProvider implements AuthProvider {
|
|
123
|
+
private _email;
|
|
124
|
+
private _password;
|
|
125
|
+
private _endpoint;
|
|
126
|
+
constructor(_email: string, _password: string, _endpoint: string);
|
|
127
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class AuthVerifyProvider implements AuthProvider {
|
|
131
|
+
private _code;
|
|
132
|
+
private _verifyToken;
|
|
133
|
+
private _endpoint;
|
|
134
|
+
constructor(_code: string, _verifyToken: string, _endpoint: string);
|
|
135
|
+
authenticate(httpClient: HttpClient): Promise<AuthProviderResult>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class Acting {
|
|
139
|
+
private readonly _auth;
|
|
140
|
+
private _userId$;
|
|
141
|
+
readonly info$: Observable<{
|
|
142
|
+
active?: boolean;
|
|
143
|
+
user?: any;
|
|
144
|
+
}>;
|
|
145
|
+
start(userId: number): Promise<void>;
|
|
146
|
+
stop(): Promise<void>;
|
|
147
|
+
getCurrent(): number;
|
|
148
|
+
private fetchUserDetails;
|
|
149
|
+
private getInfo;
|
|
150
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Acting, never>;
|
|
151
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Acting>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare class ActingInterceptor implements HttpInterceptor {
|
|
155
|
+
private readonly _acting;
|
|
156
|
+
private readonly _headerString;
|
|
157
|
+
intercept(request: HttpRequest<unknown>, next: HttpHandler): rxjs.Observable<_angular_common_http.HttpEvent<any>>;
|
|
158
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActingInterceptor, never>;
|
|
159
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ActingInterceptor>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare class AuthSession {
|
|
163
|
+
private readonly _jwt;
|
|
164
|
+
private readonly _storage;
|
|
165
|
+
private readonly _accessTokenStorageKey;
|
|
166
|
+
private readonly _refreshTokenStorageKey;
|
|
167
|
+
private readonly _authenticatedStorageKey;
|
|
168
|
+
private readonly _strategy;
|
|
169
|
+
private _authenticated;
|
|
170
|
+
private _accessTokenString;
|
|
171
|
+
private _refreshTokenString;
|
|
172
|
+
private _accessTokenPayload;
|
|
173
|
+
private _refreshTokenPayload;
|
|
174
|
+
private _user$;
|
|
175
|
+
user: rxjs.Observable<any>;
|
|
176
|
+
constructor(options?: {
|
|
177
|
+
id?: string;
|
|
178
|
+
storage?: StorageStrategy;
|
|
179
|
+
strategy?: AuthStrategy;
|
|
180
|
+
});
|
|
181
|
+
get snapshot(): {
|
|
182
|
+
user: any;
|
|
183
|
+
accessToken?: undefined;
|
|
184
|
+
refreshToken?: undefined;
|
|
185
|
+
} | {
|
|
186
|
+
user: any;
|
|
187
|
+
accessToken: string;
|
|
188
|
+
refreshToken: string;
|
|
189
|
+
};
|
|
190
|
+
get accessToken(): string;
|
|
191
|
+
get refreshToken(): string;
|
|
192
|
+
get accessTokenPayload(): AuthToken;
|
|
193
|
+
get refreshTokenPayload(): AuthToken;
|
|
194
|
+
authenticated(): boolean;
|
|
195
|
+
setTokens(accessToken: string | null, refreshToken: string | null, persist?: boolean): void;
|
|
196
|
+
setUser(user: unknown, persist?: boolean): void;
|
|
197
|
+
clear(): void;
|
|
198
|
+
private restoreFromStorage;
|
|
199
|
+
private persistTokensInStorage;
|
|
200
|
+
private persistAuthenticatedInStorage;
|
|
201
|
+
private setAuthenticated;
|
|
202
|
+
private cacheAccessToken;
|
|
203
|
+
private cacheRefreshToken;
|
|
204
|
+
private cacheAuthenticated;
|
|
205
|
+
private generateKey;
|
|
206
|
+
private isTokenValid;
|
|
207
|
+
private getNextYearDate;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare class Auth {
|
|
211
|
+
private readonly _storage;
|
|
212
|
+
private readonly _injector;
|
|
213
|
+
private readonly _platform;
|
|
214
|
+
private readonly _httpClient;
|
|
215
|
+
private readonly _state?;
|
|
216
|
+
private readonly _config?;
|
|
217
|
+
private readonly _httpConfig?;
|
|
218
|
+
private readonly _handler?;
|
|
219
|
+
private readonly _authStateKey;
|
|
220
|
+
private readonly _httpAlias;
|
|
221
|
+
readonly session: AuthSession;
|
|
222
|
+
readonly user: Observable<any | null>;
|
|
223
|
+
private _refreshHandler;
|
|
224
|
+
constructor();
|
|
225
|
+
initialize(): Promise<void>;
|
|
226
|
+
me<T = any>(): Observable<T>;
|
|
227
|
+
signIn<T = any>(provider: AuthProvider, verify?: (user: T) => void): Promise<AuthSignInResponse>;
|
|
228
|
+
signInWithEmail<T = any>(email: string, password: string, verify?: (user: T) => void): Promise<AuthSignInResponse>;
|
|
229
|
+
signInWithVerifyCode(code: string, verifyToken: string): Promise<AuthSignInResponse>;
|
|
230
|
+
resendVerifyCode(verifyToken: string): Promise<Object>;
|
|
231
|
+
register<T = any>(data: any, options?: {
|
|
232
|
+
headers?: HttpHeaders | {
|
|
233
|
+
[header: string]: string | string[];
|
|
234
|
+
};
|
|
235
|
+
params?: HttpParams | {
|
|
236
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
237
|
+
};
|
|
238
|
+
}): Promise<T>;
|
|
239
|
+
logout(): void;
|
|
240
|
+
refresh(): Observable<string>;
|
|
241
|
+
requestPassword(email: string, extraParams?: {
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
}): Promise<Object>;
|
|
244
|
+
resetPassword(token: string, newPassword: string, extraParams?: {
|
|
245
|
+
[key: string]: any;
|
|
246
|
+
}): Promise<Object>;
|
|
247
|
+
clearAndRedirect(): void;
|
|
248
|
+
private setTokens;
|
|
249
|
+
private handleAutoRefreshing;
|
|
250
|
+
private autoRefresh;
|
|
251
|
+
private get router();
|
|
252
|
+
private getUrl;
|
|
253
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Auth, never>;
|
|
254
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Auth>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare function provideAuthConfig(config?: AuthConfig): EnvironmentProviders;
|
|
258
|
+
|
|
259
|
+
declare class AuthModule {
|
|
260
|
+
static forRoot(config: AuthConfig): ModuleWithProviders<AuthModule>;
|
|
261
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
|
|
262
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, never, [typeof BbAuthenticated], [typeof BbAuthenticated]>;
|
|
263
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export { AUTH_CONFIG, AUTH_REDIRECT_HANDLER, Acting, ActingInterceptor, Auth, AuthEmailProvider, AuthModule, AuthSession, AuthVerifyProvider, BbAnonymous, BbAuthenticated, JwtHelper, USE_AUTHORIZATION, bbAnonymousGuard, bbAuthenticatedGuard, provideAuthConfig };
|
|
267
|
+
export type { AuthConfig, AuthProvider, AuthProviderResponse, AuthProviderResult, AuthRedirectHandler, AuthSignInResponse, AuthStrategy, AuthToken };
|
package/collections/index.d.ts
CHANGED
|
@@ -1,5 +1,350 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { FormControl } from '@angular/forms';
|
|
4
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { TemplateRef, OnInit, OnDestroy, ChangeDetectorRef, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
7
|
+
|
|
8
|
+
declare abstract class CollectionProvider<T> {
|
|
9
|
+
protected cachedRequestParams: Record<string, CollectionApiParams> | null;
|
|
10
|
+
abstract transform(request: CollectionRequest, context: CollectionContext<T>): Observable<CollectionData<T>>;
|
|
11
|
+
protected validateParams(request: Record<string, CollectionApiParams>, _context: CollectionContext<T>): Record<string, CollectionApiParams>;
|
|
12
|
+
protected formatArrayToCollectionData(items: T[]): CollectionData<T>;
|
|
13
|
+
protected deepCompare(value1: unknown, value2: unknown): boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const enum CollectionState {
|
|
17
|
+
Initial = "initial",
|
|
18
|
+
Error = "error",
|
|
19
|
+
Empty = "empty",
|
|
20
|
+
Data = "data"
|
|
21
|
+
}
|
|
22
|
+
declare class Collection<T> {
|
|
23
|
+
private readonly _provider;
|
|
24
|
+
readonly _initialValues: Partial<CollectionRequest>;
|
|
25
|
+
readonly queryControl: FormControl<string | null>;
|
|
26
|
+
readonly queryFieldsControl: FormControl<string[]>;
|
|
27
|
+
readonly pageNumberControl: FormControl<number>;
|
|
28
|
+
readonly pageSizeControl: FormControl<number>;
|
|
29
|
+
readonly sortControl: FormControl<CollectionRequestSort | CollectionRequestSort[]>;
|
|
30
|
+
readonly data$: Observable<{
|
|
31
|
+
response?: CollectionData<T>;
|
|
32
|
+
request?: CollectionRequest;
|
|
33
|
+
error?: Error;
|
|
34
|
+
state: CollectionState;
|
|
35
|
+
loading: boolean;
|
|
36
|
+
initial: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
readonly raw$: BehaviorSubject<CollectionData<T>>;
|
|
39
|
+
readonly loading$: BehaviorSubject<boolean>;
|
|
40
|
+
private _formatter;
|
|
41
|
+
private _refresh$;
|
|
42
|
+
constructor(_provider: CollectionProvider<T>, _initialValues?: Partial<CollectionRequest>);
|
|
43
|
+
refresh(): void;
|
|
44
|
+
setFormatter(callback: (items: T[]) => T[] | Observable<T[]>): this;
|
|
45
|
+
private getData;
|
|
46
|
+
private formatResponse;
|
|
47
|
+
private getState;
|
|
48
|
+
private cacheCollectionData;
|
|
49
|
+
private get request();
|
|
50
|
+
private getQueryObservable;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface CollectionRequest {
|
|
54
|
+
pageNumber: number;
|
|
55
|
+
pageSize: number;
|
|
56
|
+
query: string | null;
|
|
57
|
+
queryFields: string[];
|
|
58
|
+
sort: CollectionRequestSort | CollectionRequestSort[];
|
|
59
|
+
}
|
|
60
|
+
interface CollectionRequestSort<T = string> {
|
|
61
|
+
name: T;
|
|
62
|
+
direction: 'asc' | 'desc';
|
|
63
|
+
}
|
|
64
|
+
interface CollectionData<T> {
|
|
65
|
+
pageNumber: number;
|
|
66
|
+
pageSize: number;
|
|
67
|
+
totalPages: number;
|
|
68
|
+
totalEntries: number;
|
|
69
|
+
data: T[];
|
|
70
|
+
raw?: any;
|
|
71
|
+
}
|
|
72
|
+
interface CollectionApiResponse<T> {
|
|
73
|
+
page_number: number;
|
|
74
|
+
page_size: number;
|
|
75
|
+
total_pages: number;
|
|
76
|
+
total_entries: number;
|
|
77
|
+
data: T[];
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
}
|
|
80
|
+
type CollectionApiParams = string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
81
|
+
interface CollectionContext<T> {
|
|
82
|
+
collection: Collection<T>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type ArrayCollectionStringKeys<T> = {
|
|
86
|
+
[K in keyof T]: T[K] extends string ? K : never;
|
|
87
|
+
}[keyof T];
|
|
88
|
+
interface ArrayCollectionOptions<T> {
|
|
89
|
+
sortables?: Partial<Record<ArrayCollectionStringKeys<T>, 'string' | 'number'>>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare class ApiCollectionProvider<T> extends CollectionProvider<T> {
|
|
93
|
+
protected readonly endpoint: string | Observable<string>;
|
|
94
|
+
protected readonly httpClient: HttpClient;
|
|
95
|
+
protected extraParams: Record<string, Observable<CollectionApiParams>>;
|
|
96
|
+
protected extraObjectParams: Observable<Record<string, CollectionApiParams>>[];
|
|
97
|
+
constructor(endpoint: string | Observable<string>, httpClient: HttpClient);
|
|
98
|
+
append(name: string, value: CollectionApiParams | Observable<CollectionApiParams>): this;
|
|
99
|
+
appendObject(value: Record<string, CollectionApiParams> | Observable<Record<string, CollectionApiParams>>): void;
|
|
100
|
+
transform(request: CollectionRequest, context: CollectionContext<T>): Observable<CollectionData<T>>;
|
|
101
|
+
protected validateParams(request: Record<string, CollectionApiParams>, context: CollectionContext<T>): Record<string, CollectionApiParams>;
|
|
102
|
+
protected getExtraParams(params: Record<string, Observable<CollectionApiParams>>): Observable<{}>;
|
|
103
|
+
protected getExtraObjectParams(params$: Observable<Record<string, CollectionApiParams>>[]): Observable<{}>;
|
|
104
|
+
protected formatToCollectionData(response: CollectionApiResponse<T> | T[]): CollectionData<T>;
|
|
105
|
+
protected getBackendFormat(request: CollectionRequest): {};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare class LocalCollectionProvider<T> extends CollectionProvider<T> {
|
|
109
|
+
private _options?;
|
|
110
|
+
private _items$;
|
|
111
|
+
constructor(items: T[], _options?: ArrayCollectionOptions<T>);
|
|
112
|
+
update(value: T[]): void;
|
|
113
|
+
transform(request: CollectionRequest): rxjs.Observable<{
|
|
114
|
+
totalPages: number;
|
|
115
|
+
totalEntries: number;
|
|
116
|
+
pageSize: number;
|
|
117
|
+
pageNumber: number;
|
|
118
|
+
data: T[];
|
|
119
|
+
}>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare class BbCollectionsDataContext<T> {
|
|
123
|
+
items: T[];
|
|
124
|
+
loading: boolean;
|
|
125
|
+
constructor(items: T[], loading: boolean);
|
|
126
|
+
}
|
|
127
|
+
declare class BbCollectionsData<T> {
|
|
128
|
+
template: TemplateRef<BbCollectionsDataContext<T>>;
|
|
129
|
+
constructor(template: TemplateRef<BbCollectionsDataContext<T>>);
|
|
130
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsData<T>, ctx: unknown): ctx is BbCollectionsDataContext<T>;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsData<any>, never>;
|
|
132
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsData<any>, "ng-template[bbCollectionsData]", never, {}, {}, never, never, true, never>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare class BbCollectionsDataRowContext<T> {
|
|
136
|
+
item: T;
|
|
137
|
+
$implicit: T;
|
|
138
|
+
constructor(item: T);
|
|
139
|
+
}
|
|
140
|
+
declare class BbCollectionsDataRow<T> {
|
|
141
|
+
template: TemplateRef<BbCollectionsDataRowContext<T>>;
|
|
142
|
+
constructor(template: TemplateRef<BbCollectionsDataRowContext<T>>);
|
|
143
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsDataRow<T>, ctx: unknown): ctx is BbCollectionsDataRowContext<T>;
|
|
144
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsDataRow<any>, never>;
|
|
145
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsDataRow<any>, "ng-template[bbCollectionsDataRow]", never, {}, {}, never, never, true, never>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare class BbCollectionsEmptyContext<T> {
|
|
149
|
+
query: string;
|
|
150
|
+
loading: boolean;
|
|
151
|
+
constructor(query: string, loading: boolean);
|
|
152
|
+
}
|
|
153
|
+
declare class BbCollectionsEmpty<T> {
|
|
154
|
+
template: TemplateRef<BbCollectionsEmptyContext<T>>;
|
|
155
|
+
constructor(template: TemplateRef<BbCollectionsEmptyContext<T>>);
|
|
156
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsEmpty<T>, ctx: unknown): ctx is BbCollectionsEmptyContext<T>;
|
|
157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsEmpty<any>, never>;
|
|
158
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsEmpty<any>, "ng-template[bbCollectionsEmpty]", never, {}, {}, never, never, true, never>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class BbCollectionsErrorContext<T> {
|
|
162
|
+
error: Error;
|
|
163
|
+
loading: boolean;
|
|
164
|
+
constructor(error: Error, loading: boolean);
|
|
165
|
+
}
|
|
166
|
+
declare class BbCollectionsError<T> {
|
|
167
|
+
template: TemplateRef<BbCollectionsErrorContext<T>>;
|
|
168
|
+
constructor(template: TemplateRef<BbCollectionsErrorContext<T>>);
|
|
169
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsError<T>, ctx: unknown): ctx is BbCollectionsErrorContext<T>;
|
|
170
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsError<any>, never>;
|
|
171
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsError<any>, "ng-template[bbCollectionsError]", never, {}, {}, never, never, true, never>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare class BbCollectionsInitialContext<T> {
|
|
175
|
+
}
|
|
176
|
+
declare class BbCollectionsInitial<T> {
|
|
177
|
+
template: TemplateRef<BbCollectionsInitialContext<T>>;
|
|
178
|
+
constructor(template: TemplateRef<BbCollectionsInitialContext<T>>);
|
|
179
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsInitial<T>, ctx: unknown): ctx is BbCollectionsInitialContext<T>;
|
|
180
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsInitial<any>, never>;
|
|
181
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsInitial<any>, "ng-template[bbCollectionsInitial]", never, {}, {}, never, never, true, never>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class BbCollectionsItemContext<T> {
|
|
185
|
+
item: T;
|
|
186
|
+
$implicit: T;
|
|
187
|
+
constructor(item: T);
|
|
188
|
+
}
|
|
189
|
+
declare class BbCollectionsItem<T> {
|
|
190
|
+
template: TemplateRef<BbCollectionsItemContext<T>>;
|
|
191
|
+
constructor(template: TemplateRef<BbCollectionsItemContext<T>>);
|
|
192
|
+
static ngTemplateContextGuard<T>(dir: BbCollectionsItem<T>, ctx: unknown): ctx is BbCollectionsItemContext<T>;
|
|
193
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsItem<any>, never>;
|
|
194
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BbCollectionsItem<any>, "ng-template[bbCollectionsItem]", never, {}, {}, never, never, true, never>;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare class BbCollectionsViewer<T = unknown> {
|
|
198
|
+
dataTemplate?: TemplateRef<BbCollectionsDataContext<T>>;
|
|
199
|
+
emptyTemplate?: TemplateRef<BbCollectionsEmptyContext<T>>;
|
|
200
|
+
errorTemplate?: TemplateRef<BbCollectionsErrorContext<T>>;
|
|
201
|
+
initialTemplate?: TemplateRef<BbCollectionsInitialContext<T>>;
|
|
202
|
+
collection: Collection<T> | null;
|
|
203
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsViewer<any>, never>;
|
|
204
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsViewer<any>, "[bb-collections-viewer]", never, { "collection": { "alias": "collection"; "required": false; }; }, {}, ["dataTemplate", "emptyTemplate", "errorTemplate", "initialTemplate"], never, true, never>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare class BbCollectionsPager implements OnInit, OnDestroy {
|
|
208
|
+
private readonly _config?;
|
|
209
|
+
readonly arrowPreviousIconName: string;
|
|
210
|
+
readonly arrowNextIconName: string;
|
|
211
|
+
set maxAmountOfButtons(value: number);
|
|
212
|
+
get maxAmountOfButtons(): number;
|
|
213
|
+
set collection(collection: Collection<unknown> | null);
|
|
214
|
+
get collection(): Collection<unknown> | null;
|
|
215
|
+
data$: Observable<{
|
|
216
|
+
start?: number;
|
|
217
|
+
end?: number;
|
|
218
|
+
totalEntries?: number;
|
|
219
|
+
totalPages?: number;
|
|
220
|
+
pageNumber?: number;
|
|
221
|
+
pages?: {
|
|
222
|
+
page: number;
|
|
223
|
+
active: boolean;
|
|
224
|
+
}[];
|
|
225
|
+
}>;
|
|
226
|
+
private _collection;
|
|
227
|
+
private _subscription;
|
|
228
|
+
private _cache$;
|
|
229
|
+
private _maxAmountOfButtons$;
|
|
230
|
+
ngOnInit(): void;
|
|
231
|
+
ngOnDestroy(): void;
|
|
232
|
+
setPage(pageNumber: number, totalPages: number): void;
|
|
233
|
+
private setData;
|
|
234
|
+
private observeCollectionChanges;
|
|
235
|
+
private calculatePages;
|
|
236
|
+
private filterActivePages;
|
|
237
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsPager, never>;
|
|
238
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsPager, "bb-collections-pager", never, { "maxAmountOfButtons": { "alias": "maxAmountOfButtons"; "required": false; }; "collection": { "alias": "collection"; "required": true; }; }, {}, never, never, true, never>;
|
|
239
|
+
static ngAcceptInputType_maxAmountOfButtons: unknown;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
declare class BbCollectionsTable<T = any> {
|
|
243
|
+
readonly collection$: BehaviorSubject<Collection<T>>;
|
|
244
|
+
dataTemplate?: TemplateRef<BbCollectionsDataContext<T>>;
|
|
245
|
+
dataRowTemplate?: TemplateRef<BbCollectionsDataRowContext<T>>;
|
|
246
|
+
queryPlaceholder: string | null;
|
|
247
|
+
emptyContent: string | TemplateRef<any> | null;
|
|
248
|
+
noResultsContent: string | TemplateRef<any> | null;
|
|
249
|
+
errorContent: string | TemplateRef<any> | null;
|
|
250
|
+
trackByProperty: string | null;
|
|
251
|
+
includeVerticalLines: boolean;
|
|
252
|
+
hideActions: boolean;
|
|
253
|
+
hidePager: boolean;
|
|
254
|
+
set collection(collection: Collection<T>);
|
|
255
|
+
get collection(): Collection<T>;
|
|
256
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsTable<any>, never>;
|
|
257
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsTable<any>, "bb-collections-table", never, { "queryPlaceholder": { "alias": "queryPlaceholder"; "required": false; }; "emptyContent": { "alias": "emptyContent"; "required": false; }; "noResultsContent": { "alias": "noResultsContent"; "required": false; }; "errorContent": { "alias": "errorContent"; "required": false; }; "trackByProperty": { "alias": "trackByProperty"; "required": false; }; "includeVerticalLines": { "alias": "includeVerticalLines"; "required": false; }; "hideActions": { "alias": "hideActions"; "required": false; }; "hidePager": { "alias": "hidePager"; "required": false; }; "collection": { "alias": "collection"; "required": true; }; }, {}, ["dataTemplate", "dataRowTemplate"], ["[data-collections-action]", "[data-collections-row]", "[data-collections-header]", "thead", "tfoot"], true, never>;
|
|
258
|
+
static ngAcceptInputType_includeVerticalLines: unknown;
|
|
259
|
+
static ngAcceptInputType_hideActions: unknown;
|
|
260
|
+
static ngAcceptInputType_hidePager: unknown;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare class BbCollectionsTableSorting implements OnInit, OnDestroy {
|
|
264
|
+
private _name;
|
|
265
|
+
private _changeDetectorRef;
|
|
266
|
+
private _parent?;
|
|
267
|
+
readonly orderedOptions: [null, 'asc', 'desc'];
|
|
268
|
+
direction: 'asc' | 'desc' | null;
|
|
269
|
+
private _subscription;
|
|
270
|
+
constructor(_name: string, _changeDetectorRef: ChangeDetectorRef, _parent?: BbCollectionsTable<unknown>);
|
|
271
|
+
ngOnInit(): void;
|
|
272
|
+
ngOnDestroy(): void;
|
|
273
|
+
onClick(): void;
|
|
274
|
+
private getNextOption;
|
|
275
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsTableSorting, [{ attribute: "bb-collections-table-sorting"; }, null, { optional: true; }]>;
|
|
276
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsTableSorting, "th[bb-collections-table-sorting]", never, {}, {}, never, ["*"], true, never>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare class BbCollectionsTableLabel {
|
|
280
|
+
titleLabel: string | TemplateRef<any> | null;
|
|
281
|
+
descriptionLabel: string | TemplateRef<any> | null;
|
|
282
|
+
imageUrl: string | null;
|
|
283
|
+
alt: string | null;
|
|
284
|
+
type: 'image' | 'avatar' | 'content';
|
|
285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsTableLabel, never>;
|
|
286
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsTableLabel, "[bb-collections-table-label]", never, { "titleLabel": { "alias": "titleLabel"; "required": true; }; "descriptionLabel": { "alias": "descriptionLabel"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare class BbCollectionsGrid<T> {
|
|
290
|
+
readonly collection$: BehaviorSubject<Collection<T>>;
|
|
291
|
+
itemTemplate?: TemplateRef<BbCollectionsItemContext<T>>;
|
|
292
|
+
queryPlaceholder: string | null;
|
|
293
|
+
hideActions: boolean;
|
|
294
|
+
hidePager: boolean;
|
|
295
|
+
set collection(collection: Collection<T>);
|
|
296
|
+
get collection(): Collection<T>;
|
|
297
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsGrid<any>, never>;
|
|
298
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsGrid<any>, "bb-collections-grid", never, { "queryPlaceholder": { "alias": "queryPlaceholder"; "required": false; }; "hideActions": { "alias": "hideActions"; "required": false; }; "hidePager": { "alias": "hidePager"; "required": false; }; "collection": { "alias": "collection"; "required": true; }; }, {}, ["itemTemplate"], ["[data-collections-action]", "[data-collections-row]"], true, never>;
|
|
299
|
+
static ngAcceptInputType_hideActions: unknown;
|
|
300
|
+
static ngAcceptInputType_hidePager: unknown;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare class BbCollectionsActions<T> {
|
|
304
|
+
private readonly _config?;
|
|
305
|
+
readonly searchIconName: string;
|
|
306
|
+
readonly closeIconName: string;
|
|
307
|
+
collection: Collection<T> | null;
|
|
308
|
+
queryPlaceholder: string | null;
|
|
309
|
+
standalone: boolean;
|
|
310
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BbCollectionsActions<any>, never>;
|
|
311
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BbCollectionsActions<any>, "bb-collections-actions", never, { "collection": { "alias": "collection"; "required": true; }; "queryPlaceholder": { "alias": "queryPlaceholder"; "required": false; }; "standalone": { "alias": "standalone"; "required": false; }; }, {}, never, ["[data-collections-action]", "*"], true, never>;
|
|
312
|
+
static ngAcceptInputType_standalone: unknown;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
declare class ArrayCollection<T> {
|
|
316
|
+
protected value: T[];
|
|
317
|
+
constructor(value: T[]);
|
|
318
|
+
search(query: string, fields: ArrayCollectionStringKeys<T>[]): this;
|
|
319
|
+
sortBy(sort: CollectionRequestSort<keyof T> | CollectionRequestSort<keyof T>[], sortables: Partial<Record<ArrayCollectionStringKeys<T>, 'string' | 'number'>>): this;
|
|
320
|
+
toPage(pageNumber: number, pageSize: number): {
|
|
321
|
+
totalPages: number;
|
|
322
|
+
totalEntries: number;
|
|
323
|
+
pageSize: number;
|
|
324
|
+
pageNumber: number;
|
|
325
|
+
data: T[];
|
|
326
|
+
};
|
|
327
|
+
toArray(): T[];
|
|
328
|
+
protected normalizeValueAsString(value: unknown): string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
declare class CollectionsModule {
|
|
332
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionsModule, never>;
|
|
333
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CollectionsModule, never, [typeof BbCollectionsViewer, typeof BbCollectionsPager, typeof BbCollectionsTable, typeof BbCollectionsTableSorting, typeof BbCollectionsTableLabel, typeof BbCollectionsGrid, typeof BbCollectionsActions, typeof BbCollectionsData, typeof BbCollectionsDataRow, typeof BbCollectionsEmpty, typeof BbCollectionsError, typeof BbCollectionsInitial, typeof BbCollectionsItem], [typeof BbCollectionsViewer, typeof BbCollectionsPager, typeof BbCollectionsTable, typeof BbCollectionsTableSorting, typeof BbCollectionsTableLabel, typeof BbCollectionsGrid, typeof BbCollectionsActions, typeof BbCollectionsData, typeof BbCollectionsDataRow, typeof BbCollectionsEmpty, typeof BbCollectionsError, typeof BbCollectionsInitial, typeof BbCollectionsItem]>;
|
|
334
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CollectionsModule>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare const COLLECTIONS_CONFIG: InjectionToken<CollectionsConfig>;
|
|
338
|
+
interface CollectionsConfig {
|
|
339
|
+
icons?: {
|
|
340
|
+
actionsSearch?: string;
|
|
341
|
+
actionsClose?: string;
|
|
342
|
+
pagerArrowPrevious?: string;
|
|
343
|
+
pagerArrowNext?: string;
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
declare function provideCollectionsConfig(config: CollectionsConfig): EnvironmentProviders;
|
|
348
|
+
|
|
349
|
+
export { ApiCollectionProvider, ArrayCollection, BbCollectionsActions, BbCollectionsData, BbCollectionsDataContext, BbCollectionsDataRow, BbCollectionsDataRowContext, BbCollectionsEmpty, BbCollectionsEmptyContext, BbCollectionsError, BbCollectionsErrorContext, BbCollectionsGrid, BbCollectionsInitial, BbCollectionsInitialContext, BbCollectionsItem, BbCollectionsItemContext, BbCollectionsPager, BbCollectionsTable, BbCollectionsTableLabel, BbCollectionsTableSorting, BbCollectionsViewer, COLLECTIONS_CONFIG, Collection, CollectionProvider, CollectionState, CollectionsModule, LocalCollectionProvider, provideCollectionsConfig };
|
|
350
|
+
export type { ArrayCollectionOptions, ArrayCollectionStringKeys, CollectionApiParams, CollectionApiResponse, CollectionContext, CollectionData, CollectionRequest, CollectionRequestSort, CollectionsConfig };
|