@bravobit/bb-foundation 0.25.2 → 0.26.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/collections/lib/interfaces/collection.interface.d.ts +1 -1
- package/controls/lib/control-error/control-error.interface.d.ts +3 -3
- package/dialog/lib/dialog.service.d.ts +1 -1
- package/elements/lib/elements.interfaces.d.ts +2 -2
- package/esm2020/auth/lib/auth.interceptor.mjs +3 -3
- package/esm2020/auth/lib/auth.module.mjs +4 -4
- package/esm2020/auth/lib/auth.service.mjs +3 -3
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +9 -9
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +3 -3
- 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 +22 -22
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +4 -4
- package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +8 -8
- package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +3 -3
- package/esm2020/controls/lib/control-error/control-error.module.mjs +4 -4
- package/esm2020/controls/lib/controls.module.mjs +4 -4
- package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +15 -15
- package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +3 -3
- package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +3 -3
- package/esm2020/controls/lib/form-control/form-control.module.mjs +4 -4
- package/esm2020/controls/lib/radio/radio-button/radio-button.component.mjs +12 -12
- package/esm2020/controls/lib/radio/radio-group/radio-group.component.mjs +25 -25
- package/esm2020/controls/lib/radio/radio.module.mjs +4 -4
- package/esm2020/controls/lib/toggle/toggle/toggle.component.mjs +20 -20
- package/esm2020/controls/lib/toggle/toggle-group/toggle-group.component.mjs +12 -12
- package/esm2020/controls/lib/toggle/toggle.module.mjs +4 -4
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +3 -3
- 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 +3 -3
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +7 -7
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +7 -7
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +3 -3
- 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 -6
- package/esm2020/elements/lib/avatar/avatar.component.mjs +3 -3
- package/esm2020/elements/lib/button/button.component.mjs +10 -10
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +11 -11
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +14 -14
- package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
- 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/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 +11 -11
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +17 -17
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +3 -3
- 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/mixins/can-disable.mjs +5 -5
- package/esm2020/lib/core/mixins/can-hide-errors.mjs +5 -5
- package/esm2020/lib/core/mixins/can-load.mjs +5 -5
- package/esm2020/lib/core/mixins/has-error.mjs +5 -5
- package/esm2020/lib/core/mixins/is-focused.mjs +5 -5
- package/esm2020/lib/core/mixins/is-grouped.mjs +5 -5
- package/esm2020/lib/core/mixins/is-readonly.mjs +5 -5
- package/esm2020/lib/core/mixins/is-required.mjs +5 -5
- package/esm2020/lib/core/services/clipboard.service.mjs +3 -3
- package/esm2020/lib/core/services/exif.service.mjs +3 -3
- package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
- package/esm2020/lib/core/services/image-converter.service.mjs +3 -3
- package/esm2020/lib/core/services/languages.service.mjs +3 -3
- package/esm2020/lib/core/services/network.service.mjs +3 -3
- package/esm2020/lib/core/services/patch.service.mjs +3 -3
- 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 +3 -3
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +11 -11
- 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 +5 -5
- package/esm2020/masking/lib/directives/input-mask.directive.mjs +11 -11
- 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 +7 -7
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +3 -3
- package/esm2020/notifications/lib/notifications.module.mjs +4 -4
- package/esm2020/notifications/lib/notifications.service.mjs +3 -3
- package/esm2020/permissions/lib/directives/permission.directive.mjs +17 -17
- package/esm2020/permissions/lib/guards/permission.guard.mjs +3 -3
- package/esm2020/permissions/lib/permissions.module.mjs +4 -4
- package/esm2020/permissions/lib/permissions.service.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
- package/esm2020/storage/lib/storage.service.mjs +3 -3
- 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 +15 -15
- 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/theming.directive.mjs +9 -9
- package/esm2020/theming/lib/theming.module.mjs +4 -4
- package/esm2020/tooltip/bravobit-bb-foundation-tooltip.mjs +5 -0
- package/esm2020/tooltip/lib/tooltip-container/tooltip-container.component.mjs +31 -0
- package/esm2020/tooltip/lib/tooltip.directive.mjs +140 -0
- package/esm2020/tooltip/lib/tooltip.interfaces.mjs +4 -0
- package/esm2020/tooltip/lib/tooltip.module.mjs +31 -0
- package/esm2020/tooltip/public_api.mjs +5 -0
- package/esm2020/utils/lib/directives/autosize.directive.mjs +3 -3
- package/esm2020/utils/lib/directives/focus-trap.directive.mjs +3 -3
- package/esm2020/utils/lib/directives/focus.directive.mjs +3 -3
- package/esm2020/utils/lib/directives/template.directive.mjs +8 -8
- package/esm2020/utils/lib/utils.module.mjs +4 -4
- package/fesm2015/bravobit-bb-foundation-auth.mjs +24 -25
- 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 +151 -152
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +25 -26
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +44 -41
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +117 -118
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +10 -11
- package/fesm2015/bravobit-bb-foundation-localize.mjs +23 -24
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +24 -25
- package/fesm2015/bravobit-bb-foundation-masking.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +16 -17
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-permissions.mjs +26 -27
- package/fesm2015/bravobit-bb-foundation-permissions.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +10 -11
- package/fesm2015/bravobit-bb-foundation-rxjs.mjs +0 -1
- package/fesm2015/bravobit-bb-foundation-storage.mjs +3 -4
- package/fesm2015/bravobit-bb-foundation-table.mjs +33 -34
- package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-theming.mjs +12 -13
- package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-tooltip.mjs +210 -0
- package/fesm2015/bravobit-bb-foundation-tooltip.mjs.map +1 -0
- package/fesm2015/bravobit-bb-foundation-utils.mjs +20 -21
- package/fesm2015/bravobit-bb-foundation-utils.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation.mjs +53 -54
- package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-auth.mjs +24 -25
- 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 +151 -152
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +25 -26
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +41 -41
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +116 -117
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +10 -11
- package/fesm2020/bravobit-bb-foundation-localize.mjs +23 -24
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +24 -25
- package/fesm2020/bravobit-bb-foundation-masking.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +16 -17
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-permissions.mjs +26 -27
- package/fesm2020/bravobit-bb-foundation-permissions.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +10 -11
- package/fesm2020/bravobit-bb-foundation-rxjs.mjs +0 -1
- package/fesm2020/bravobit-bb-foundation-storage.mjs +3 -4
- package/fesm2020/bravobit-bb-foundation-table.mjs +33 -34
- package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-theming.mjs +12 -13
- package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-tooltip.mjs +203 -0
- package/fesm2020/bravobit-bb-foundation-tooltip.mjs.map +1 -0
- package/fesm2020/bravobit-bb-foundation-utils.mjs +20 -21
- package/fesm2020/bravobit-bb-foundation-utils.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation.mjs +53 -54
- package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
- package/http/lib/http.interfaces.d.ts +1 -1
- package/lib/core/mixins/can-disable.d.ts +1 -1
- package/lib/core/mixins/can-hide-errors.d.ts +1 -1
- package/lib/core/mixins/can-load.d.ts +1 -1
- package/lib/core/mixins/constructor.d.ts +1 -1
- package/lib/core/mixins/has-error.d.ts +1 -1
- package/lib/core/mixins/is-focused.d.ts +1 -1
- package/lib/core/mixins/is-grouped.d.ts +1 -1
- package/lib/core/mixins/is-readonly.d.ts +1 -1
- package/lib/core/mixins/is-required.d.ts +1 -1
- package/localize/lib/dictionary/dictionary.data.d.ts +1 -1
- package/masking/lib/input-mask.interface.d.ts +3 -3
- package/package.json +13 -5
- package/permissions/lib/permissions.interface.d.ts +2 -2
- package/recaptcha/lib/recaptcha.interface.d.ts +2 -2
- package/rxjs/lib/operators/combine-latest-map.operator.d.ts +1 -1
- package/table/lib/interfaces/table.interfaces.d.ts +1 -1
- package/theming/lib/theming.interface.d.ts +6 -6
- package/theming/lib/utils/theming.variable.d.ts +1 -1
- package/tooltip/index.d.ts +5 -0
- package/tooltip/lib/tooltip-container/tooltip-container.component.d.ts +10 -0
- package/tooltip/lib/tooltip.directive.d.ts +32 -0
- package/tooltip/lib/tooltip.interfaces.d.ts +4 -0
- package/tooltip/lib/tooltip.module.d.ts +10 -0
- package/tooltip/public_api.d.ts +4 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, Injector, Directive, Input, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@bravobit/bb-foundation/utils';
|
|
4
|
+
import { UtilsModule } from '@bravobit/bb-foundation/utils';
|
|
5
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
6
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
7
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
8
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
9
|
+
|
|
10
|
+
const TOOLTIP_DATA = new InjectionToken('Data to display in tooltip');
|
|
11
|
+
const TOOLTIP_CLASS = new InjectionToken('Class to display in tooltip');
|
|
12
|
+
|
|
13
|
+
class TooltipContainerComponent {
|
|
14
|
+
constructor(data, classes) {
|
|
15
|
+
this.data = data;
|
|
16
|
+
this.classes = classes;
|
|
17
|
+
}
|
|
18
|
+
get classBinding() {
|
|
19
|
+
return [this.classes]
|
|
20
|
+
.filter(item => !!item)
|
|
21
|
+
.join(' ');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
TooltipContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipContainerComponent, deps: [{ token: TOOLTIP_DATA }, { token: TOOLTIP_CLASS }], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
TooltipContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: TooltipContainerComponent, selector: "bb-tooltip-container", host: { properties: { "class": "this.classBinding" }, classAttribute: "bb-tooltip-container" }, ngImport: i0, template: "<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;font-size:14px;max-width:400px;padding:8px 10px;-webkit-user-select:none;user-select:none;position:relative;border-radius:4px;pointer-events:none;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:#111111e6}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.bb-tooltip-container>small{display:block;font-size:12px;margin-top:4px;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:rgba(17,17,17,.9) transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent rgba(17,17,17,.9) transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent rgba(17,17,17,.9)}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent rgba(17,17,17,.9) transparent transparent}\n"], dependencies: [{ kind: "directive", type: i1.BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipContainerComponent, decorators: [{
|
|
27
|
+
type: Component,
|
|
28
|
+
args: [{ selector: 'bb-tooltip-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-tooltip-container' }, preserveWhitespaces: false, template: "<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;font-size:14px;max-width:400px;padding:8px 10px;-webkit-user-select:none;user-select:none;position:relative;border-radius:4px;pointer-events:none;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:#111111e6}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.bb-tooltip-container>small{display:block;font-size:12px;margin-top:4px;color:#fff6}.bb-tooltip-container-bottom,.bb-tooltip-container-top,.bb-tooltip-container-left,.bb-tooltip-container-right{pointer-events:none}.bb-tooltip-container-top .bb-tooltip-container:after{left:50%;top:100%;transform:translate(-50%);border-width:6px 6px 0 6px;border-color:rgba(17,17,17,.9) transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent rgba(17,17,17,.9) transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent rgba(17,17,17,.9)}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent rgba(17,17,17,.9) transparent transparent}\n"] }]
|
|
29
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
30
|
+
type: Inject,
|
|
31
|
+
args: [TOOLTIP_DATA]
|
|
32
|
+
}] }, { type: undefined, decorators: [{
|
|
33
|
+
type: Inject,
|
|
34
|
+
args: [TOOLTIP_CLASS]
|
|
35
|
+
}] }]; }, propDecorators: { classBinding: [{
|
|
36
|
+
type: HostBinding,
|
|
37
|
+
args: ['class']
|
|
38
|
+
}] } });
|
|
39
|
+
|
|
40
|
+
class TooltipDirective {
|
|
41
|
+
// Disabled.
|
|
42
|
+
get bbTooltipDisabled() {
|
|
43
|
+
return this._bbTooltipDisabled;
|
|
44
|
+
}
|
|
45
|
+
set bbTooltipDisabled(value) {
|
|
46
|
+
const newValue = coerceBooleanProperty(value);
|
|
47
|
+
if (newValue !== this.bbTooltipDisabled) {
|
|
48
|
+
this._bbTooltipDisabled = newValue;
|
|
49
|
+
this._changeDetectorRef.markForCheck();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
constructor(_overlay, _viewContainer, _elementRef, _changeDetectorRef) {
|
|
53
|
+
this._overlay = _overlay;
|
|
54
|
+
this._viewContainer = _viewContainer;
|
|
55
|
+
this._elementRef = _elementRef;
|
|
56
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
57
|
+
this.bbTooltipClass = null;
|
|
58
|
+
this.bbTooltipOrigin = null;
|
|
59
|
+
this.bbTooltipPositions = [];
|
|
60
|
+
this._bbTooltipDisabled = false;
|
|
61
|
+
// State.
|
|
62
|
+
this._overlayRef = null;
|
|
63
|
+
}
|
|
64
|
+
showTooltip() {
|
|
65
|
+
if (this._overlayRef?.hasAttached() || this.bbTooltipDisabled) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.attachTooltip();
|
|
69
|
+
}
|
|
70
|
+
hideTooltip() {
|
|
71
|
+
if (!this._overlayRef?.hasAttached()) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this._overlayRef?.detach();
|
|
75
|
+
}
|
|
76
|
+
ngOnDestroy() {
|
|
77
|
+
this._overlayRef?.dispose();
|
|
78
|
+
}
|
|
79
|
+
attachTooltip() {
|
|
80
|
+
if (this._overlayRef === null) {
|
|
81
|
+
const positionStrategy = this.getPositionStrategy();
|
|
82
|
+
const scrollStrategy = this._overlay.scrollStrategies.reposition();
|
|
83
|
+
this._overlayRef = this._overlay.create({ positionStrategy, scrollStrategy });
|
|
84
|
+
}
|
|
85
|
+
const injector = Injector.create({
|
|
86
|
+
providers: [
|
|
87
|
+
{ provide: TOOLTIP_DATA, useValue: this.bbTooltip },
|
|
88
|
+
{ provide: TOOLTIP_CLASS, useValue: this.bbTooltipClass }
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
const component = new ComponentPortal(TooltipContainerComponent, this._viewContainer, injector);
|
|
92
|
+
this._overlayRef.attach(component);
|
|
93
|
+
}
|
|
94
|
+
getPositionStrategy() {
|
|
95
|
+
const element = this.bbTooltipOrigin ?? this._elementRef;
|
|
96
|
+
const positions = this.getPositions();
|
|
97
|
+
return this._overlay
|
|
98
|
+
.position()
|
|
99
|
+
.flexibleConnectedTo(element)
|
|
100
|
+
.withPositions(positions);
|
|
101
|
+
}
|
|
102
|
+
getPositions() {
|
|
103
|
+
if (this.bbTooltipPositions?.length > 0) {
|
|
104
|
+
return this.bbTooltipPositions;
|
|
105
|
+
}
|
|
106
|
+
return [
|
|
107
|
+
{
|
|
108
|
+
originX: 'center',
|
|
109
|
+
originY: 'top',
|
|
110
|
+
overlayX: 'center',
|
|
111
|
+
overlayY: 'bottom',
|
|
112
|
+
offsetY: -10,
|
|
113
|
+
panelClass: 'bb-tooltip-container-top'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
originX: 'center',
|
|
117
|
+
originY: 'bottom',
|
|
118
|
+
overlayX: 'center',
|
|
119
|
+
overlayY: 'top',
|
|
120
|
+
offsetY: 10,
|
|
121
|
+
panelClass: 'bb-tooltip-container-bottom'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
originX: 'start',
|
|
125
|
+
originY: 'center',
|
|
126
|
+
overlayX: 'end',
|
|
127
|
+
overlayY: 'center',
|
|
128
|
+
offsetX: -10,
|
|
129
|
+
panelClass: 'bb-tooltip-container-left'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
originX: 'end',
|
|
133
|
+
originY: 'center',
|
|
134
|
+
overlayX: 'start',
|
|
135
|
+
overlayY: 'center',
|
|
136
|
+
offsetX: 10,
|
|
137
|
+
panelClass: 'bb-tooltip-container-right'
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
143
|
+
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", type: TooltipDirective, selector: "[bbTooltip]", inputs: { bbTooltip: "bbTooltip", bbTooltipClass: "bbTooltipClass", bbTooltipOrigin: "bbTooltipOrigin", bbTooltipPositions: "bbTooltipPositions", bbTooltipDisabled: "bbTooltipDisabled" }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 });
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
145
|
+
type: Directive,
|
|
146
|
+
args: [{
|
|
147
|
+
selector: '[bbTooltip]'
|
|
148
|
+
}]
|
|
149
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { bbTooltip: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], bbTooltipClass: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], bbTooltipOrigin: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], bbTooltipPositions: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], bbTooltipDisabled: [{
|
|
158
|
+
type: Input
|
|
159
|
+
}], showTooltip: [{
|
|
160
|
+
type: HostListener,
|
|
161
|
+
args: ['mouseenter']
|
|
162
|
+
}, {
|
|
163
|
+
type: HostListener,
|
|
164
|
+
args: ['focus']
|
|
165
|
+
}], hideTooltip: [{
|
|
166
|
+
type: HostListener,
|
|
167
|
+
args: ['mouseleave']
|
|
168
|
+
}, {
|
|
169
|
+
type: HostListener,
|
|
170
|
+
args: ['blur']
|
|
171
|
+
}] } });
|
|
172
|
+
|
|
173
|
+
class TooltipModule {
|
|
174
|
+
}
|
|
175
|
+
TooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
176
|
+
TooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: TooltipModule, declarations: [TooltipContainerComponent,
|
|
177
|
+
TooltipDirective], imports: [UtilsModule,
|
|
178
|
+
OverlayModule], exports: [TooltipDirective] });
|
|
179
|
+
TooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipModule, imports: [UtilsModule,
|
|
180
|
+
OverlayModule] });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TooltipModule, decorators: [{
|
|
182
|
+
type: NgModule,
|
|
183
|
+
args: [{
|
|
184
|
+
imports: [
|
|
185
|
+
UtilsModule,
|
|
186
|
+
OverlayModule
|
|
187
|
+
],
|
|
188
|
+
declarations: [
|
|
189
|
+
TooltipContainerComponent,
|
|
190
|
+
TooltipDirective
|
|
191
|
+
],
|
|
192
|
+
exports: [
|
|
193
|
+
TooltipDirective
|
|
194
|
+
]
|
|
195
|
+
}]
|
|
196
|
+
}] });
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Generated bundle index. Do not edit.
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
export { TOOLTIP_CLASS, TOOLTIP_DATA, TooltipContainerComponent, TooltipDirective, TooltipModule };
|
|
203
|
+
//# sourceMappingURL=bravobit-bb-foundation-tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravobit-bb-foundation-tooltip.mjs","sources":["../../../projects/bb-foundation/tooltip/src/lib/tooltip.interfaces.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip-container/tooltip-container.component.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip-container/tooltip-container.component.html","../../../projects/bb-foundation/tooltip/src/lib/tooltip.directive.ts","../../../projects/bb-foundation/tooltip/src/lib/tooltip.module.ts","../../../projects/bb-foundation/tooltip/src/bravobit-bb-foundation-tooltip.ts"],"sourcesContent":["import {InjectionToken, TemplateRef} from '@angular/core';\n\nexport type TooltipData = string | TemplateRef<void>;\n\nexport const TOOLTIP_DATA = new InjectionToken<TooltipData>('Data to display in tooltip');\nexport const TOOLTIP_CLASS = new InjectionToken<string>('Class to display in tooltip');\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject, ViewEncapsulation} from '@angular/core';\nimport {TOOLTIP_CLASS, TOOLTIP_DATA, TooltipData} from '../tooltip.interfaces';\n\n@Component({\n selector: 'bb-tooltip-container',\n templateUrl: './tooltip-container.component.html',\n styleUrls: ['./tooltip-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'class': 'bb-tooltip-container'},\n preserveWhitespaces: false\n\n})\nexport class TooltipContainerComponent {\n\n constructor(@Inject(TOOLTIP_DATA) public data: TooltipData,\n @Inject(TOOLTIP_CLASS) public classes: string) {\n }\n\n @HostBinding('class')\n get classBinding() {\n return [this.classes]\n .filter(item => !!item)\n .join(' ');\n }\n\n}\n","<ng-template [bbTemplate]=\"data\">\n {{ data }}\n</ng-template>\n","import {ChangeDetectorRef, Directive, ElementRef, HostListener, Injector, Input, OnDestroy, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {TooltipContainerComponent} from './tooltip-container/tooltip-container.component';\nimport {ConnectedPosition, Overlay, OverlayRef} from '@angular/cdk/overlay';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {TOOLTIP_CLASS, TOOLTIP_DATA} from './tooltip.interfaces';\nimport {ComponentPortal} from '@angular/cdk/portal';\n\n@Directive({\n selector: '[bbTooltip]'\n})\nexport class TooltipDirective implements OnDestroy {\n\n // Inputs.\n @Input() bbTooltip!: string | TemplateRef<void>;\n @Input() bbTooltipClass: string | null = null;\n @Input() bbTooltipOrigin: HTMLElement | null = null;\n @Input() bbTooltipPositions: ConnectedPosition[] = [];\n\n // Disabled.\n @Input()\n get bbTooltipDisabled(): boolean {\n return this._bbTooltipDisabled;\n }\n\n set bbTooltipDisabled(value: BooleanInput) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this.bbTooltipDisabled) {\n this._bbTooltipDisabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n private _bbTooltipDisabled: boolean = false;\n\n // State.\n private _overlayRef: OverlayRef | null = null;\n\n constructor(private _overlay: Overlay,\n private _viewContainer: ViewContainerRef,\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef) {\n }\n\n @HostListener('mouseenter')\n @HostListener('focus')\n showTooltip() {\n if (this._overlayRef?.hasAttached() || this.bbTooltipDisabled) {\n return;\n }\n this.attachTooltip();\n }\n\n @HostListener('mouseleave')\n @HostListener('blur')\n hideTooltip() {\n if (!this._overlayRef?.hasAttached()) {\n return;\n }\n this._overlayRef?.detach();\n }\n\n ngOnDestroy() {\n this._overlayRef?.dispose();\n }\n\n private attachTooltip() {\n if (this._overlayRef === null) {\n const positionStrategy = this.getPositionStrategy();\n const scrollStrategy = this._overlay.scrollStrategies.reposition();\n this._overlayRef = this._overlay.create({positionStrategy, scrollStrategy});\n }\n\n const injector = Injector.create({\n providers: [\n {provide: TOOLTIP_DATA, useValue: this.bbTooltip},\n {provide: TOOLTIP_CLASS, useValue: this.bbTooltipClass}\n ]\n });\n const component = new ComponentPortal(TooltipContainerComponent, this._viewContainer, injector);\n this._overlayRef.attach(component);\n }\n\n private getPositionStrategy() {\n const element = this.bbTooltipOrigin ?? this._elementRef;\n const positions = this.getPositions();\n\n return this._overlay\n .position()\n .flexibleConnectedTo(element)\n .withPositions(positions);\n }\n\n private getPositions() {\n if (this.bbTooltipPositions?.length > 0) {\n return this.bbTooltipPositions;\n }\n\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -10,\n panelClass: 'bb-tooltip-container-top'\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 10,\n panelClass: 'bb-tooltip-container-bottom'\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -10,\n panelClass: 'bb-tooltip-container-left'\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: 10,\n panelClass: 'bb-tooltip-container-right'\n }\n ] satisfies ConnectedPosition[];\n }\n\n static ngAcceptInputType_bbTooltip: string | TemplateRef<void>;\n static ngAcceptInputType_bbTooltipClass: string | null;\n static ngAcceptInputType_bbTooltipOrigin: HTMLElement | null;\n static ngAcceptInputType_bbTooltipDisabled: BooleanInput;\n static ngAcceptInputType_bbTooltipPositions: ConnectedPosition[];\n\n}\n","import {TooltipContainerComponent} from './tooltip-container/tooltip-container.component';\nimport {UtilsModule} from '@bravobit/bb-foundation/utils';\nimport {TooltipDirective} from './tooltip.directive';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n imports: [\n UtilsModule,\n OverlayModule\n ],\n declarations: [\n TooltipContainerComponent,\n TooltipDirective\n ],\n exports: [\n TooltipDirective\n ]\n})\nexport class TooltipModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;MAIa,YAAY,GAAG,IAAI,cAAc,CAAc,4BAA4B,EAAE;MAC7E,aAAa,GAAG,IAA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;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBAPlB,yBAAyB;AACzB,QAAA,gBAAgB,aALhB,WAAW;AACX,QAAA,aAAa,aAOb,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGX,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAXlB,WAAW;QACX,aAAa,CAAA,EAAA,CAAA,CAAA;2FAUR,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,aAAa;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,yBAAyB;wBACzB,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -3,10 +3,6 @@ import { TemplateRef, Directive, Input, HostBinding, HostListener, NgModule } fr
|
|
|
3
3
|
import * as i1 from '@angular/cdk/platform';
|
|
4
4
|
|
|
5
5
|
class BbTemplate {
|
|
6
|
-
constructor(_templateRef, _viewContainerRef) {
|
|
7
|
-
this._templateRef = _templateRef;
|
|
8
|
-
this._viewContainerRef = _viewContainerRef;
|
|
9
|
-
}
|
|
10
6
|
set bbTemplate(content) {
|
|
11
7
|
// Get the template.
|
|
12
8
|
const template = content instanceof TemplateRef
|
|
@@ -16,10 +12,14 @@ class BbTemplate {
|
|
|
16
12
|
this._viewContainerRef.clear();
|
|
17
13
|
this._viewContainerRef.createEmbeddedView(template);
|
|
18
14
|
}
|
|
15
|
+
constructor(_templateRef, _viewContainerRef) {
|
|
16
|
+
this._templateRef = _templateRef;
|
|
17
|
+
this._viewContainerRef = _viewContainerRef;
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
|
-
BbTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
21
|
-
BbTemplate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
20
|
+
BbTemplate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbTemplate, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21
|
+
BbTemplate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", type: BbTemplate, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbTemplate, decorators: [{
|
|
23
23
|
type: Directive,
|
|
24
24
|
args: [{
|
|
25
25
|
selector: '[bbTemplate]'
|
|
@@ -68,9 +68,9 @@ class BbAutosize {
|
|
|
68
68
|
this._renderer.setStyle(this.element, 'height', value);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
BbAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
72
|
-
BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
71
|
+
BbAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", type: BbAutosize, selector: "textarea[bbAutosize]", inputs: { minHeight: "minHeight", maxHeight: "maxHeight", rows: "rows" }, host: { listeners: { "window:resize": "onWindowResize()", "input": "onInputReceived()" }, properties: { "style.min-height": "this.minHeight", "style.max-height": "this.maxHeight", "rows": "this.rows" } }, ngImport: i0 });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbAutosize, decorators: [{
|
|
74
74
|
type: Directive,
|
|
75
75
|
args: [{
|
|
76
76
|
selector: 'textarea[bbAutosize]'
|
|
@@ -124,9 +124,9 @@ class BbFocus {
|
|
|
124
124
|
setTimeout(() => this.nativeElement.focus(), 0);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
128
|
-
BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
127
|
+
BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
128
|
+
BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", type: BbFocus, selector: "[bbFocus]", ngImport: i0 });
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbFocus, decorators: [{
|
|
130
130
|
type: Directive,
|
|
131
131
|
args: [{
|
|
132
132
|
selector: '[bbFocus]'
|
|
@@ -195,9 +195,9 @@ class BbFocusTrap {
|
|
|
195
195
|
return Array(...nodes);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
199
|
-
BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
198
|
+
BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
199
|
+
BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.5", type: BbFocusTrap, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: BbFocusTrap, decorators: [{
|
|
201
201
|
type: Directive,
|
|
202
202
|
args: [{
|
|
203
203
|
selector: '[bbFocusTrap]'
|
|
@@ -209,16 +209,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
209
209
|
|
|
210
210
|
class UtilsModule {
|
|
211
211
|
}
|
|
212
|
-
UtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
213
|
-
UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
212
|
+
UtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
213
|
+
UtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: UtilsModule, declarations: [BbTemplate,
|
|
214
214
|
BbAutosize,
|
|
215
215
|
BbFocus,
|
|
216
216
|
BbFocusTrap], exports: [BbTemplate,
|
|
217
217
|
BbAutosize,
|
|
218
218
|
BbFocus,
|
|
219
219
|
BbFocusTrap] });
|
|
220
|
-
UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
220
|
+
UtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UtilsModule });
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UtilsModule, decorators: [{
|
|
222
222
|
type: NgModule,
|
|
223
223
|
args: [{
|
|
224
224
|
declarations: [
|
|
@@ -242,4 +242,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
242
242
|
|
|
243
243
|
export { BbAutosize, BbFocus, BbFocusTrap, BbTemplate, UtilsModule };
|
|
244
244
|
//# sourceMappingURL=bravobit-bb-foundation-utils.mjs.map
|
|
245
|
-
//# sourceMappingURL=bravobit-bb-foundation-utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]'\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]'\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input() @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, Directive, ElementRef, NgZone} from '@angular/core';\n\n@Directive({\n selector: '[bbFocus]'\n})\nexport class BbFocus implements AfterViewInit {\n\n constructor(private _zone: NgZone,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private focus() {\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]'\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n declarations: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAKa,UAAU,CAAA;IAanB,WAAoB,CAAA,YAA8B,EAC9B,iBAAmC,EAAA;QADnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;QAC9B,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;KACtD;IAbD,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;KACvD;;uGAXQ,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,M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A,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAX,WAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBAZhB,UAAU;QACV,UAAU;QACV,OAAO;AACP,QAAA,WAAW,aAGX,UAAU;QACV,UAAU;QACV,OAAO;QACP,WAAW,CAAA,EAAA,CAAA,CAAA;yGAGN,WAAW,EAAA,CAAA,CAAA;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAdvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,UAAU;wBACV,UAAU;wBACV,OAAO;wBACP,WAAW;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,UAAU;wBACV,UAAU;wBACV,OAAO;wBACP,WAAW;AACd,qBAAA;AACJ,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravobit-bb-foundation-utils.mjs","sources":["../../../projects/bb-foundation/utils/src/lib/directives/template.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/autosize.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus.directive.ts","../../../projects/bb-foundation/utils/src/lib/directives/focus-trap.directive.ts","../../../projects/bb-foundation/utils/src/lib/utils.module.ts","../../../projects/bb-foundation/utils/src/bravobit-bb-foundation-utils.ts"],"sourcesContent":["import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[bbTemplate]'\n})\nexport class BbTemplate {\n\n @Input() set bbTemplate(content: string | TemplateRef<any>) {\n // Get the template.\n const template = content instanceof TemplateRef\n ? content\n : this._templateRef;\n\n // Clear the view container ref and create the view.\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(template);\n }\n\n constructor(private _templateRef: TemplateRef<any>,\n private _viewContainerRef: ViewContainerRef) {\n }\n\n\n // Required so that the template type checker can infer the type of the coerced inputs.\n static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;\n\n}\n","import {AfterViewInit, Directive, ElementRef, HostBinding, HostListener, Input, Renderer2} from '@angular/core';\n\n@Directive({\n selector: 'textarea[bbAutosize]'\n})\nexport class BbAutosize implements AfterViewInit {\n\n // Min/max heights for the textarea.\n @Input() @HostBinding('style.min-height') minHeight: string | null = null;\n @Input() @HostBinding('style.max-height') maxHeight: string | null = null;\n @Input() @HostBinding('rows') rows: number = 1;\n\n constructor(private _renderer: Renderer2,\n private _elementRef: ElementRef) {\n }\n\n get element() {\n return this._elementRef?.nativeElement as HTMLTextAreaElement;\n }\n\n ngAfterViewInit() {\n // Update the styles after the DOM has loaded.\n this.updateStyles();\n }\n\n @HostListener('window:resize')\n onWindowResize() {\n // Update the styles when the window is resized.\n this.updateStyles();\n }\n\n @HostListener('input')\n onInputReceived() {\n // Update the styles after the textarea received input.\n this.updateStyles();\n }\n\n private updateStyles() {\n // Validate the element exists.\n if (!this.element) {\n return;\n }\n\n // Calculate border height which is not included in the scroll height.\n const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;\n\n // Reset textarea height to auto that correctly calculate the new height.\n this.setHeight('auto');\n\n // Set new height.\n this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);\n }\n\n private setHeight(value: string) {\n this._renderer.setStyle(this.element, 'height', value);\n }\n\n}\n","import {AfterViewInit, Directive, ElementRef, NgZone} from '@angular/core';\n\n@Directive({\n selector: '[bbFocus]'\n})\nexport class BbFocus implements AfterViewInit {\n\n constructor(private _zone: NgZone,\n private _elementRef: ElementRef) {\n }\n\n private get nativeElement() {\n return this._elementRef.nativeElement;\n }\n\n ngAfterViewInit() {\n // Run the method outside the Angular zone.\n this._zone.runOutsideAngular(() => this.focus());\n }\n\n private focus() {\n // Check if set timeout exists and the user is\n // using the site on desktop devices.\n if (!setTimeout) {\n return;\n }\n\n // Check if the element and the focus method exist, if so focus the element.\n if (!this.nativeElement || !this.nativeElement.focus) {\n return;\n }\n\n // Execute the focus method in a timeout.\n setTimeout(() => this.nativeElement.focus(), 0);\n }\n\n}\n","import {Directive, ElementRef, HostListener} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n@Directive({\n selector: '[bbFocusTrap]'\n})\nexport class BbFocusTrap {\n\n private readonly _focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n 'select:not([disabled]):not([aria-hidden])',\n 'textarea:not([disabled]):not([aria-hidden])',\n 'button:not([disabled]):not([aria-hidden])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])'\n ];\n\n constructor(private _platform: Platform,\n private _elementRef: ElementRef) {\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent) {\n // Validate it is a tab event.\n if (!this.isTabEvent(event)) {\n return;\n }\n\n // Trap the focus inside the element.\n return this.trapFocus(event);\n }\n\n trapFocus(event: KeyboardEvent) {\n // Validate that the DOM is available.\n if (!this._platform.isBrowser) {\n return;\n }\n\n // Get all focusable nodes.\n const focusableNodes = this.getFocusableNodes();\n\n // Focus the first available element if the focus\n // is not in the modal.\n if (!this.element.contains(document.activeElement)) {\n return this.focus(focusableNodes[0]);\n }\n\n const focusedItemIndex = focusableNodes.indexOf(document.activeElement);\n\n if (event.shiftKey && focusedItemIndex === 0) {\n this.focus(focusableNodes[focusableNodes.length - 1]);\n return event.preventDefault();\n }\n\n if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {\n this.focus(focusableNodes[0]);\n return event.preventDefault();\n }\n }\n\n private get element() {\n return this._elementRef.nativeElement;\n }\n\n private getFocusableNodes() {\n const nodes = this.element.querySelectorAll(this._focusableElements);\n return Array(...nodes);\n }\n\n private focus = (element: HTMLElement) => {\n return element && element.focus && element.focus();\n };\n\n private isTabEvent = (event: KeyboardEvent) => {\n return event?.key === 'Tab' || event?.keyCode === 9;\n };\n\n}\n","import {BbFocusTrap} from './directives/focus-trap.directive';\nimport {BbTemplate} from './directives/template.directive';\nimport {BbAutosize} from './directives/autosize.directive';\nimport {BbFocus} from './directives/focus.directive';\nimport {NgModule} from '@angular/core';\n\n@NgModule({\n declarations: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ],\n exports: [\n BbTemplate,\n BbAutosize,\n BbFocus,\n BbFocusTrap\n ]\n})\nexport class UtilsModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAKa,UAAU,CAAA;IAEnB,IAAa,UAAU,CAAC,OAAkC,EAAA;;AAEtD,QAAA,MAAM,QAAQ,GAAG,OAAO,YAAY,WAAW;AAC3C,cAAE,OAAO;AACT,cAAE,IAAI,CAAC,YAAY,CAAC;;AAGxB,QAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;AAC/B,QAAA,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;KACvD;IAED,WAAoB,CAAA,YAA8B,EAC9B,iBAAmC,EAAA;QADnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;QAC9B,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;KACtD;;uGAfQ,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAA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