@bravobit/bb-foundation 0.51.5 → 0.51.7
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/elements/lib/directives/image-upload.directive.d.ts +4 -7
- package/elements/lib/elements.module.d.ts +2 -1
- package/elements/lib/image-control/image-control.component.d.ts +44 -0
- package/elements/lib/pipes/file-data-url.pipe.d.ts +12 -0
- package/elements/public_api.d.ts +2 -0
- package/fesm2022/bravobit-bb-foundation-auth.mjs +19 -19
- package/fesm2022/bravobit-bb-foundation-collections.mjs +43 -43
- 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 +31 -31
- package/fesm2022/bravobit-bb-foundation-elements.mjs +280 -123
- 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 +32 -16
- 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 +13 -13
- package/fesm2022/bravobit-bb-foundation-permissions.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-select.mjs +19 -19
- package/fesm2022/bravobit-bb-foundation-storage.mjs +3 -3
- package/fesm2022/bravobit-bb-foundation-table.mjs +26 -26
- package/fesm2022/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-tooltip.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-utils.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation.mjs +114 -71
- package/fesm2022/bravobit-bb-foundation.mjs.map +1 -1
- package/lib/core/colors/hex.d.ts +18 -0
- package/lib/core/colors/hsl.d.ts +7 -0
- package/lib/core/colors/{rgb-hsv.d.ts → hsv.d.ts} +7 -6
- package/lib/core/colors/rgb.d.ts +7 -0
- package/lib/core/services/languages.service.d.ts +1 -2
- package/localize/lib/localizations/dutch.localization.d.ts +4 -0
- package/localize/lib/localizations/english.localization.d.ts +4 -0
- package/localize/lib/localizations/papiamento.localization.d.ts +4 -0
- package/localize/lib/localizations/spanish.localization.d.ts +4 -0
- package/localize/lib/transforms/interpolate.transform.d.ts +1 -1
- package/localize/lib/transforms/plural.transform.d.ts +1 -1
- package/localize/lib/transforms/reference.transform.d.ts +1 -1
- package/package.json +9 -9
- package/public_api.d.ts +4 -4
- package/styles/theme.scss +4 -0
- package/table/lib/components/table/table.component.d.ts +1 -1
- package/table/lib/components/table-cell/table-cell.component.d.ts +1 -1
- package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +1 -1
- package/lib/core/colors/hex-hsv.d.ts +0 -7
- package/lib/core/colors/rgb-hex.d.ts +0 -7
- package/lib/core/tokens/base-url.token.d.ts +0 -2
|
@@ -15,10 +15,10 @@ class TooltipContainerComponent {
|
|
|
15
15
|
.filter(item => !!item)
|
|
16
16
|
.join(' ');
|
|
17
17
|
}
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: TooltipContainerComponent, isStandalone: true, selector: "bb-tooltip-container", host: { properties: { "class": "this.classBinding" }, classAttribute: "bb-tooltip-container" }, ngImport: i0, template: "<ng-template [bbTemplate]=\"data\">{{ data }}</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;max-width:25rem;line-height:1.5;-webkit-user-select:none;user-select:none;position:relative;font-size:.875rem;pointer-events:none;border-radius:.5rem;padding:.5rem .75rem;background-color:#111}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid}.bb-tooltip-container>small{display:block;font-size:.75rem;margin-top:.25rem;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:.5rem .5rem 0 .5rem;border-color:#111111 transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 .5rem .5rem .5rem;border-color:transparent transparent #111111 transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:.5rem 0 .5rem .5rem;border-color:transparent transparent transparent #111111}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:.5rem .5rem .5rem 0;border-color:transparent #111111 transparent transparent}\n"], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipContainerComponent, decorators: [{
|
|
22
22
|
type: Component,
|
|
23
23
|
args: [{ selector: 'bb-tooltip-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'class': 'bb-tooltip-container' }, imports: [BbTemplate], template: "<ng-template [bbTemplate]=\"data\">{{ data }}</ng-template>\n", styles: [".bb-tooltip-container{color:#fff;display:block;max-width:25rem;line-height:1.5;-webkit-user-select:none;user-select:none;position:relative;font-size:.875rem;pointer-events:none;border-radius:.5rem;padding:.5rem .75rem;background-color:#111}.bb-tooltip-container:after{width:0;height:0;content:\"\";display:block;position:absolute;border-style:solid}.bb-tooltip-container>small{display:block;font-size:.75rem;margin-top:.25rem;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:.5rem .5rem 0 .5rem;border-color:#111111 transparent transparent transparent}.bb-tooltip-container-bottom .bb-tooltip-container:after{left:50%;bottom:100%;transform:translate(-50%);border-width:0 .5rem .5rem .5rem;border-color:transparent transparent #111111 transparent}.bb-tooltip-container-left .bb-tooltip-container:after{top:50%;left:100%;transform:translateY(-50%);border-width:.5rem 0 .5rem .5rem;border-color:transparent transparent transparent #111111}.bb-tooltip-container-right .bb-tooltip-container:after{top:50%;right:100%;transform:translateY(-50%);border-width:.5rem .5rem .5rem 0;border-color:transparent #111111 transparent transparent}\n"] }]
|
|
24
24
|
}], propDecorators: { classBinding: [{
|
|
@@ -116,10 +116,10 @@ class TooltipDirective {
|
|
|
116
116
|
}
|
|
117
117
|
];
|
|
118
118
|
}
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
120
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
120
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.6", type: TooltipDirective, isStandalone: true, selector: "[bbTooltip]", inputs: { bbTooltip: "bbTooltip", bbTooltipClass: "bbTooltipClass", bbTooltipOrigin: "bbTooltipOrigin", bbTooltipPositions: "bbTooltipPositions", bbTooltipDisabled: ["bbTooltipDisabled", "bbTooltipDisabled", booleanAttribute] }, host: { listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" } }, ngImport: i0 });
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
123
123
|
type: Directive,
|
|
124
124
|
args: [{
|
|
125
125
|
selector: '[bbTooltip]'
|
|
@@ -150,11 +150,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
150
150
|
}] } });
|
|
151
151
|
|
|
152
152
|
class TooltipModule {
|
|
153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
154
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.
|
|
155
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
154
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: TooltipModule, imports: [TooltipDirective], exports: [TooltipDirective] });
|
|
155
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipModule });
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TooltipModule, decorators: [{
|
|
158
158
|
type: NgModule,
|
|
159
159
|
args: [{
|
|
160
160
|
imports: [TooltipDirective],
|
|
@@ -18,10 +18,10 @@ class BbTemplate {
|
|
|
18
18
|
}
|
|
19
19
|
// Required so that the template type checker can infer the type of the coerced inputs.
|
|
20
20
|
static ngAcceptInputType_bbTemplate;
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
22
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
22
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: BbTemplate, isStandalone: true, selector: "[bbTemplate]", inputs: { bbTemplate: "bbTemplate" }, ngImport: i0 });
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbTemplate, decorators: [{
|
|
25
25
|
type: Directive,
|
|
26
26
|
args: [{
|
|
27
27
|
selector: '[bbTemplate]'
|
|
@@ -68,10 +68,10 @@ class BbAutosize {
|
|
|
68
68
|
setHeight(value) {
|
|
69
69
|
this._renderer.setStyle(this.element, 'height', value);
|
|
70
70
|
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
72
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbAutosize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
72
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.6", type: BbAutosize, isStandalone: true, selector: "textarea[bbAutosize]", inputs: { minHeight: "minHeight", maxHeight: "maxHeight", rows: ["rows", "rows", numberAttribute] }, host: { listeners: { "window:resize": "onWindowResize()", "input": "onInputReceived()" }, properties: { "style.min-height": "this.minHeight", "style.max-height": "this.maxHeight", "rows": "this.rows" } }, ngImport: i0 });
|
|
73
73
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbAutosize, decorators: [{
|
|
75
75
|
type: Directive,
|
|
76
76
|
args: [{
|
|
77
77
|
selector: 'textarea[bbAutosize]'
|
|
@@ -135,10 +135,10 @@ class BbFocus {
|
|
|
135
135
|
// Execute the focus method in a timeout.
|
|
136
136
|
setTimeout(() => this.nativeElement.focus(), 0);
|
|
137
137
|
}
|
|
138
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
139
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.
|
|
138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
139
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: BbFocus, isStandalone: true, selector: "[bbFocus]", inputs: { bbFocusMode: "bbFocusMode" }, ngImport: i0 });
|
|
140
140
|
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbFocus, decorators: [{
|
|
142
142
|
type: Directive,
|
|
143
143
|
args: [{
|
|
144
144
|
selector: '[bbFocus]'
|
|
@@ -207,10 +207,10 @@ class BbFocusTrap {
|
|
|
207
207
|
isTabEvent = (event) => {
|
|
208
208
|
return event?.key === 'Tab' || event?.keyCode === 9;
|
|
209
209
|
};
|
|
210
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
211
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.
|
|
210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbFocusTrap, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
211
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: BbFocusTrap, isStandalone: true, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: BbFocusTrap, decorators: [{
|
|
214
214
|
type: Directive,
|
|
215
215
|
args: [{
|
|
216
216
|
selector: '[bbFocusTrap]'
|
|
@@ -221,17 +221,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
221
221
|
}] } });
|
|
222
222
|
|
|
223
223
|
class UtilsModule {
|
|
224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
225
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
225
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: UtilsModule, imports: [BbTemplate,
|
|
226
226
|
BbAutosize,
|
|
227
227
|
BbFocus,
|
|
228
228
|
BbFocusTrap], exports: [BbTemplate,
|
|
229
229
|
BbAutosize,
|
|
230
230
|
BbFocus,
|
|
231
231
|
BbFocusTrap] });
|
|
232
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.
|
|
232
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: UtilsModule });
|
|
233
233
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: UtilsModule, decorators: [{
|
|
235
235
|
type: NgModule,
|
|
236
236
|
args: [{
|
|
237
237
|
imports: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, InjectionToken, RendererFactory2, makeEnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Injectable, inject, InjectionToken, RendererFactory2, PLATFORM_ID, REQUEST, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { Platform } from '@angular/cdk/platform';
|
|
4
|
-
import { DOCUMENT, formatDate } from '@angular/common';
|
|
4
|
+
import { DOCUMENT, isPlatformBrowser, formatDate } from '@angular/common';
|
|
5
5
|
import { map, distinctUntilChanged, shareReplay, debounceTime, startWith } from 'rxjs/operators';
|
|
6
6
|
import { of, fromEvent, Observable, merge, Subscription, isObservable, BehaviorSubject } from 'rxjs';
|
|
7
7
|
|
|
@@ -78,10 +78,10 @@ class FileLoader {
|
|
|
78
78
|
anyBlob.name = fileName;
|
|
79
79
|
return anyBlob;
|
|
80
80
|
};
|
|
81
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
82
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FileLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
82
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FileLoader, providedIn: 'root' });
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FileLoader, decorators: [{
|
|
85
85
|
type: Injectable,
|
|
86
86
|
args: [{
|
|
87
87
|
providedIn: 'root'
|
|
@@ -236,10 +236,10 @@ class Exif {
|
|
|
236
236
|
}
|
|
237
237
|
return -1;
|
|
238
238
|
};
|
|
239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
240
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Exif, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Exif, providedIn: 'root' });
|
|
241
241
|
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Exif, decorators: [{
|
|
243
243
|
type: Injectable,
|
|
244
244
|
args: [{
|
|
245
245
|
providedIn: 'root'
|
|
@@ -353,10 +353,10 @@ class ImageConverter {
|
|
|
353
353
|
}
|
|
354
354
|
return { xOffset, yOffset, width, height };
|
|
355
355
|
};
|
|
356
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
357
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
356
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ImageConverter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
357
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ImageConverter, providedIn: 'root' });
|
|
358
358
|
}
|
|
359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ImageConverter, decorators: [{
|
|
360
360
|
type: Injectable,
|
|
361
361
|
args: [{
|
|
362
362
|
providedIn: 'root'
|
|
@@ -437,17 +437,43 @@ class Files {
|
|
|
437
437
|
anchor.click();
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
441
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Files, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
441
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Files, providedIn: 'root' });
|
|
442
442
|
}
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Files, decorators: [{
|
|
444
444
|
type: Injectable,
|
|
445
445
|
args: [{
|
|
446
446
|
providedIn: 'root'
|
|
447
447
|
}]
|
|
448
448
|
}] });
|
|
449
449
|
|
|
450
|
-
const
|
|
450
|
+
const NAVIGATOR = new InjectionToken('An abstraction over window.navigator object', {
|
|
451
|
+
factory: () => inject(WINDOW).navigator
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
const ACCEPT_LANGUAGE = new InjectionToken('An abstraction for the accept-language header or navigator.language', {
|
|
455
|
+
factory: () => {
|
|
456
|
+
const platformId = inject(PLATFORM_ID);
|
|
457
|
+
const request = inject(REQUEST, { optional: true });
|
|
458
|
+
const navigator = inject(NAVIGATOR, { optional: true });
|
|
459
|
+
const isBrowser = isPlatformBrowser(platformId);
|
|
460
|
+
if (isBrowser) {
|
|
461
|
+
if (typeof navigator !== 'object') {
|
|
462
|
+
return null;
|
|
463
|
+
}
|
|
464
|
+
let t = 'anguage';
|
|
465
|
+
let n = navigator;
|
|
466
|
+
let f = n['l' + t + 's'];
|
|
467
|
+
const data = f && f.length ? f : (t = n['l' + t] ||
|
|
468
|
+
n['browserL' + t] ||
|
|
469
|
+
n['userL' + t]) ? [t] : t;
|
|
470
|
+
return typeof data === 'string'
|
|
471
|
+
? data
|
|
472
|
+
: data.join(';');
|
|
473
|
+
}
|
|
474
|
+
return request?.headers?.get('accept-language') ?? null;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
451
477
|
|
|
452
478
|
class Languages {
|
|
453
479
|
// Dependencies.
|
|
@@ -461,10 +487,8 @@ class Languages {
|
|
|
461
487
|
return this._data;
|
|
462
488
|
}
|
|
463
489
|
initialize() {
|
|
464
|
-
// Get the languages.
|
|
465
|
-
const data = this.getLanguages();
|
|
466
490
|
// Parse all languages by using a regex.
|
|
467
|
-
const strings = (
|
|
491
|
+
const strings = (this._acceptLanguage ?? '')
|
|
468
492
|
.match(/((([a-zA-Z]+(-[a-zA-Z0-9]+){0,2})|\*)(;q=[0-1](\.[0-9]+)?)?)*/g);
|
|
469
493
|
// Get the content by parsing the strings.
|
|
470
494
|
const content = strings.map(item => {
|
|
@@ -487,39 +511,16 @@ class Languages {
|
|
|
487
511
|
.filter(item => !!item)
|
|
488
512
|
.sort((a, b) => b.quality - a.quality);
|
|
489
513
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
if (this._acceptLanguage) {
|
|
493
|
-
return this._acceptLanguage;
|
|
494
|
-
}
|
|
495
|
-
// Try to get the languages from the navigator.
|
|
496
|
-
if (typeof navigator !== 'object') {
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
let t = 'anguage';
|
|
500
|
-
let n = navigator;
|
|
501
|
-
let f = n['l' + t + 's'];
|
|
502
|
-
const data = f && f.length ? f : (t = n['l' + t] ||
|
|
503
|
-
n['browserL' + t] ||
|
|
504
|
-
n['userL' + t]) ? [t] : t;
|
|
505
|
-
return typeof data === 'string'
|
|
506
|
-
? data
|
|
507
|
-
: data.join(';');
|
|
508
|
-
};
|
|
509
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: Languages, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
510
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: Languages, providedIn: 'root' });
|
|
514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Languages, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
515
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Languages, providedIn: 'root' });
|
|
511
516
|
}
|
|
512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Languages, decorators: [{
|
|
513
518
|
type: Injectable,
|
|
514
519
|
args: [{
|
|
515
520
|
providedIn: 'root'
|
|
516
521
|
}]
|
|
517
522
|
}], ctorParameters: () => [] });
|
|
518
523
|
|
|
519
|
-
const NAVIGATOR = new InjectionToken('An abstraction over window.navigator object', {
|
|
520
|
-
factory: () => inject(WINDOW).navigator
|
|
521
|
-
});
|
|
522
|
-
|
|
523
524
|
class Network {
|
|
524
525
|
// Dependencies.
|
|
525
526
|
_platform = inject(Platform);
|
|
@@ -549,10 +550,10 @@ class Network {
|
|
|
549
550
|
// a user is online/offline.
|
|
550
551
|
this._online$ = merge(now$, online$, offline$).pipe(distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
|
|
551
552
|
}
|
|
552
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
553
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
553
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Network, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
554
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Network, providedIn: 'root' });
|
|
554
555
|
}
|
|
555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Network, decorators: [{
|
|
556
557
|
type: Injectable,
|
|
557
558
|
args: [{
|
|
558
559
|
providedIn: 'root'
|
|
@@ -595,19 +596,28 @@ class Patch {
|
|
|
595
596
|
// Save the subscription so we can destroy it later.
|
|
596
597
|
this._subscription.add(subscription);
|
|
597
598
|
}
|
|
598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
599
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Patch, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
600
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Patch, providedIn: 'root' });
|
|
600
601
|
}
|
|
601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: Patch, decorators: [{
|
|
602
603
|
type: Injectable,
|
|
603
604
|
args: [{
|
|
604
605
|
providedIn: 'root'
|
|
605
606
|
}]
|
|
606
607
|
}] });
|
|
607
608
|
|
|
608
|
-
const
|
|
609
|
-
|
|
610
|
-
const
|
|
609
|
+
const COOKIE = new InjectionToken('An abstraction on the document.cookie or cookie header from the request object', {
|
|
610
|
+
factory: () => {
|
|
611
|
+
const platformId = inject(PLATFORM_ID);
|
|
612
|
+
const request = inject(REQUEST, { optional: true });
|
|
613
|
+
const document = inject(DOCUMENT, { optional: true });
|
|
614
|
+
const isBrowser = isPlatformBrowser(platformId);
|
|
615
|
+
if (isBrowser) {
|
|
616
|
+
return document?.cookie ?? null;
|
|
617
|
+
}
|
|
618
|
+
return request?.headers?.get('cookie') ?? null;
|
|
619
|
+
}
|
|
620
|
+
});
|
|
611
621
|
|
|
612
622
|
const LOCATION = new InjectionToken('An abstraction over window.location object', {
|
|
613
623
|
factory: () => inject(WINDOW).location
|
|
@@ -757,6 +767,18 @@ function clamp(value, min, max) {
|
|
|
757
767
|
return Math.min(Math.max(value, min), max);
|
|
758
768
|
}
|
|
759
769
|
|
|
770
|
+
function rgbToHex(red, green, blue, alpha = 1) {
|
|
771
|
+
const hex = ((blue | green << 8 | red << 16) | 1 << 24)
|
|
772
|
+
.toString(16)
|
|
773
|
+
.slice(1);
|
|
774
|
+
if (alpha >= 1) {
|
|
775
|
+
return `#${hex}`;
|
|
776
|
+
}
|
|
777
|
+
const hexAlpha = (Math.round(255 * alpha) | 1 << 8)
|
|
778
|
+
.toString(16)
|
|
779
|
+
.slice(1);
|
|
780
|
+
return `#${hex}${hexAlpha}`;
|
|
781
|
+
}
|
|
760
782
|
function rgbToHsv(red, green, blue, alpha = 1) {
|
|
761
783
|
const r = red / 255;
|
|
762
784
|
const g = green / 255;
|
|
@@ -788,6 +810,11 @@ function rgbToHsv(red, green, blue, alpha = 1) {
|
|
|
788
810
|
alpha: alpha
|
|
789
811
|
};
|
|
790
812
|
}
|
|
813
|
+
|
|
814
|
+
function hsvToHex(hue, saturation, value, alpha = 1) {
|
|
815
|
+
const { red, green, blue, alpha: rgbAlpha } = hsvToRgb(hue, saturation, value, alpha);
|
|
816
|
+
return rgbToHex(red, green, blue, rgbAlpha);
|
|
817
|
+
}
|
|
791
818
|
function hsvToRgb(hue, saturation, value, alpha = 1) {
|
|
792
819
|
const h = hue / 60;
|
|
793
820
|
const s = saturation / 100;
|
|
@@ -808,7 +835,24 @@ function hsvToRgb(hue, saturation, value, alpha = 1) {
|
|
|
808
835
|
alpha: alpha
|
|
809
836
|
};
|
|
810
837
|
}
|
|
838
|
+
function hsvToHsl(hue, saturation, value, alpha = 1) {
|
|
839
|
+
const s = saturation / 100;
|
|
840
|
+
const v = value / 100;
|
|
841
|
+
const l = (2 - s) * v;
|
|
842
|
+
const divisor = l <= 1 ? l : 2 - l; // Avoid division by zero when lightness is close to zero
|
|
843
|
+
const newSaturation = divisor < 1e-9 ? 0 : s * v / divisor;
|
|
844
|
+
return {
|
|
845
|
+
hue: hue,
|
|
846
|
+
saturation: clamp(newSaturation * 100, 0, 100),
|
|
847
|
+
lightness: clamp(l * 50, 0, 100),
|
|
848
|
+
alpha: alpha
|
|
849
|
+
};
|
|
850
|
+
}
|
|
811
851
|
|
|
852
|
+
function hexToHsv(hex) {
|
|
853
|
+
const { red, green, blue, alpha } = hexToRgb(hex);
|
|
854
|
+
return rgbToHsv(red, green, blue, alpha);
|
|
855
|
+
}
|
|
812
856
|
function hexToRgb(hex) {
|
|
813
857
|
const hexCharacters = 'a-f\\d';
|
|
814
858
|
const match3or4Hex = `#?[${hexCharacters}]{3}[${hexCharacters}]?`;
|
|
@@ -839,26 +883,25 @@ function hexToRgb(hex) {
|
|
|
839
883
|
alpha: alphaFromHex
|
|
840
884
|
};
|
|
841
885
|
}
|
|
842
|
-
function
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
.slice(1);
|
|
846
|
-
if (alpha >= 1) {
|
|
847
|
-
return `#${hex}`;
|
|
848
|
-
}
|
|
849
|
-
const hexAlpha = (Math.round(255 * alpha) | 1 << 8)
|
|
850
|
-
.toString(16)
|
|
851
|
-
.slice(1);
|
|
852
|
-
return `#${hex}${hexAlpha}`;
|
|
886
|
+
function hexToHsl(hex) {
|
|
887
|
+
const hsv = hexToHsv(hex);
|
|
888
|
+
return hsvToHsl(hsv.hue, hsv.saturation, hsv.value, hsv.alpha);
|
|
853
889
|
}
|
|
854
890
|
|
|
855
|
-
function
|
|
856
|
-
const
|
|
857
|
-
|
|
891
|
+
function hslToHsv(hue, saturation, lightness, alpha = 1) {
|
|
892
|
+
const l = lightness * 2;
|
|
893
|
+
const s = saturation * (l <= 100 ? l : 200 - l) / 100; // Avoid division by zero when l + s is near 0
|
|
894
|
+
const newSaturation = l + s < 1e-9 ? 0 : 2 * s / (l + s);
|
|
895
|
+
return {
|
|
896
|
+
hue: hue,
|
|
897
|
+
saturation: clamp(newSaturation * 100, 0, 100),
|
|
898
|
+
value: clamp((l + s) / 2, 0, 100),
|
|
899
|
+
alpha: alpha
|
|
900
|
+
};
|
|
858
901
|
}
|
|
859
|
-
function
|
|
860
|
-
const
|
|
861
|
-
return
|
|
902
|
+
function hslToHex(hue, saturation, lightness, alpha = 1) {
|
|
903
|
+
const hsv = hslToHsv(hue, saturation, lightness, alpha);
|
|
904
|
+
return hsvToHex(hsv.hue, hsv.saturation, hsv.value, hsv.alpha);
|
|
862
905
|
}
|
|
863
906
|
|
|
864
907
|
function parseDate(value) {
|
|
@@ -945,5 +988,5 @@ function provideRouteCache(token, value) {
|
|
|
945
988
|
* Generated bundle index. Do not edit.
|
|
946
989
|
*/
|
|
947
990
|
|
|
948
|
-
export { ACCEPT_LANGUAGE,
|
|
991
|
+
export { ACCEPT_LANGUAGE, BbRegex, BbValidator, COOKIE, Exif, FileLoader, Files, GLOBAL_FOCUS_MODE, ImageConverter, LOCATION, Languages, NAVIGATOR, Network, Patch, RouteCache, WINDOW, arrayToMap, clamp, createDate, generatePassword, hexToHsl, hexToHsv, hexToRgb, hslToHex, hslToHsv, hsvToHex, hsvToHsl, hsvToRgb, isDate, isValidDate, observableAttribute, parseDate, provideGlobalFocusMode, provideRouteCache, rgbToHex, rgbToHsv };
|
|
949
992
|
//# sourceMappingURL=bravobit-bb-foundation.mjs.map
|