@bravobit/bb-foundation 0.22.2 → 0.23.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/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +3 -2
- package/controls/lib/checkbox/checkbox.module.d.ts +2 -1
- package/controls/lib/form-control/form-control/form-control.component.d.ts +5 -5
- package/controls/lib/form-control/form-control.module.d.ts +2 -1
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +4 -2
- package/dialog/lib/dialog.interfaces.d.ts +7 -0
- package/dialog/lib/dialog.service.d.ts +5 -9
- package/elements/lib/date-picker/date-picker.component.d.ts +4 -2
- package/elements/lib/elements.module.d.ts +25 -28
- package/elements/lib/pipes/relative-time.pipe.d.ts +5 -5
- package/elements/public_api.d.ts +0 -4
- 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 +3 -3
- package/esm2020/auth/lib/directives/permission.directive.mjs +3 -3
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/permission.guard.mjs +3 -3
- package/esm2020/auth/lib/permissions/permissions.service.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 +5 -5
- package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +7 -6
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +7 -6
- package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +3 -3
- 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 +6 -5
- 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 +8 -7
- 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 +15 -12
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +5 -5
- 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 +3 -3
- 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.interfaces.mjs +1 -1
- package/esm2020/dialog/lib/dialog.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog.service.mjs +15 -27
- package/esm2020/elements/lib/avatar/avatar.component.mjs +7 -7
- package/esm2020/elements/lib/button/button.component.mjs +6 -6
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +20 -15
- 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 +21 -25
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +4 -4
- package/esm2020/elements/lib/form-control/form-control.component.mjs +4 -4
- package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +15 -13
- package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
- package/esm2020/elements/public_api.mjs +1 -5
- package/esm2020/http/lib/classes/http.config.mjs +2 -3
- package/esm2020/http/lib/http.module.mjs +4 -4
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +6 -6
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
- 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/dictionary/dictionary.class.mjs +92 -0
- package/esm2020/localize/lib/dictionary/dictionary.context.mjs +26 -0
- package/esm2020/localize/lib/dictionary/dictionary.data.mjs +6 -0
- package/esm2020/localize/lib/functions/lowercase.function.mjs +2 -2
- package/esm2020/localize/lib/functions/uppercase.function.mjs +2 -2
- package/esm2020/localize/lib/handlers/missing.handler.mjs +2 -2
- package/esm2020/localize/lib/interfaces/config.interfaces.mjs +1 -1
- package/esm2020/localize/lib/interfaces/options.interfaces.mjs +1 -1
- package/esm2020/localize/lib/interfaces/transforms.interfaces.mjs +3 -0
- package/esm2020/localize/lib/localize.module.mjs +19 -13
- package/esm2020/localize/lib/localize.pipe.mjs +7 -8
- package/esm2020/localize/lib/localize.service.mjs +86 -130
- package/esm2020/localize/lib/transforms/abstract.transform.mjs +30 -0
- package/esm2020/localize/lib/transforms/interpolate.transform.mjs +54 -0
- package/esm2020/localize/lib/transforms/reference.transform.mjs +25 -0
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +6 -6
- package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
- package/esm2020/localize/public_api.mjs +8 -2
- package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/date-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/input-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/masking.module.mjs +4 -4
- package/esm2020/masking/lib/masking.service.mjs +3 -3
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +3 -3
- 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 +22 -26
- 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 +7 -7
- package/esm2020/table/lib/components/table/table.component.mjs +9 -9
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
- package/esm2020/table/lib/table.module.mjs +4 -4
- package/esm2020/theming/lib/theming.directive.mjs +3 -3
- package/esm2020/theming/lib/theming.module.mjs +4 -4
- package/esm2020/utils/bravobit-bb-foundation-utils.mjs +5 -0
- package/esm2020/utils/lib/directives/autosize.directive.mjs +72 -0
- package/esm2020/utils/lib/directives/focus-trap.directive.mjs +77 -0
- package/esm2020/utils/lib/directives/focus.directive.mjs +37 -0
- package/esm2020/utils/lib/directives/template.directive.mjs +28 -0
- package/esm2020/utils/lib/utils.module.mjs +35 -0
- package/esm2020/utils/public_api.mjs +6 -0
- package/fesm2015/bravobit-bb-foundation-auth.mjs +28 -28
- package/fesm2015/bravobit-bb-foundation-collections.mjs +23 -23
- package/fesm2015/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-controls.mjs +47 -45
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +54 -81
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +126 -324
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +14 -14
- package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-localize.mjs +360 -215
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +31 -52
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-storage.mjs +6 -6
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-theming.mjs +7 -7
- package/fesm2015/bravobit-bb-foundation-utils.mjs +246 -0
- package/fesm2015/bravobit-bb-foundation-utils.mjs.map +1 -0
- package/fesm2015/bravobit-bb-foundation.mjs +21 -21
- package/fesm2020/bravobit-bb-foundation-auth.mjs +28 -28
- package/fesm2020/bravobit-bb-foundation-collections.mjs +23 -23
- package/fesm2020/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-controls.mjs +47 -45
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +53 -79
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +124 -322
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +14 -14
- package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-localize.mjs +342 -208
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +31 -52
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-storage.mjs +6 -6
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-theming.mjs +7 -7
- package/fesm2020/bravobit-bb-foundation-utils.mjs +244 -0
- package/fesm2020/bravobit-bb-foundation-utils.mjs.map +1 -0
- package/fesm2020/bravobit-bb-foundation.mjs +21 -21
- package/localize/lib/dictionary/dictionary.class.d.ts +28 -0
- package/localize/lib/dictionary/dictionary.context.d.ts +7 -0
- package/localize/lib/dictionary/dictionary.data.d.ts +7 -0
- package/localize/lib/interfaces/config.interfaces.d.ts +4 -6
- package/localize/lib/interfaces/options.interfaces.d.ts +1 -0
- package/localize/lib/interfaces/transforms.interfaces.d.ts +3 -0
- package/localize/lib/localize.module.d.ts +4 -4
- package/localize/lib/localize.pipe.d.ts +1 -1
- package/localize/lib/localize.service.d.ts +25 -21
- package/localize/lib/transforms/abstract.transform.d.ts +13 -0
- package/localize/lib/transforms/interpolate.transform.d.ts +14 -0
- package/localize/lib/transforms/reference.transform.d.ts +10 -0
- package/localize/public_api.d.ts +7 -1
- package/notifications/lib/notifications.service.d.ts +6 -7
- package/package.json +12 -4
- package/utils/index.d.ts +5 -0
- package/{elements → utils}/lib/directives/autosize.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/focus-trap.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/focus.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/template.directive.d.ts +1 -0
- package/utils/lib/utils.module.d.ts +10 -0
- package/utils/public_api.d.ts +5 -0
- package/dialog/lib/dialog.injector.d.ts +0 -8
- package/esm2020/dialog/lib/dialog.injector.mjs +0 -18
- package/esm2020/elements/lib/directives/autosize.directive.mjs +0 -72
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +0 -77
- package/esm2020/elements/lib/directives/focus.directive.mjs +0 -37
- package/esm2020/elements/lib/directives/template.directive.mjs +0 -28
- package/esm2020/localize/lib/localize.dictionary.mjs +0 -26
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +0 -28
- package/esm2020/notifications/lib/notifications.injector.mjs +0 -18
- package/localize/lib/localize.dictionary.d.ts +0 -7
- package/localize/lib/views/localize-template-or-string.directive.d.ts +0 -10
- package/notifications/lib/notifications.injector.d.ts +0 -8
|
@@ -82,9 +82,9 @@ class FileLoader {
|
|
|
82
82
|
return this.blobToFile(blobFile, name);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
FileLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
86
|
-
FileLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
85
|
+
FileLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FileLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
86
|
+
FileLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FileLoader, providedIn: 'root' });
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: FileLoader, decorators: [{
|
|
88
88
|
type: Injectable,
|
|
89
89
|
args: [{
|
|
90
90
|
providedIn: 'root'
|
|
@@ -241,9 +241,9 @@ class Exif {
|
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
Exif.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
245
|
-
Exif.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
244
|
+
Exif.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Exif, deps: [{ token: i1.Platform }, { token: FileLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
245
|
+
Exif.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Exif, providedIn: 'root' });
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Exif, decorators: [{
|
|
247
247
|
type: Injectable,
|
|
248
248
|
args: [{
|
|
249
249
|
providedIn: 'root'
|
|
@@ -359,9 +359,9 @@ class ImageConverter {
|
|
|
359
359
|
return this.stringToImage(contents);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
ImageConverter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
363
|
-
ImageConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
362
|
+
ImageConverter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ImageConverter, deps: [{ token: Exif }, { token: i1.Platform }, { token: FileLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
363
|
+
ImageConverter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ImageConverter, providedIn: 'root' });
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ImageConverter, decorators: [{
|
|
365
365
|
type: Injectable,
|
|
366
366
|
args: [{
|
|
367
367
|
providedIn: 'root'
|
|
@@ -427,9 +427,9 @@ class Languages {
|
|
|
427
427
|
.sort((a, b) => b.quality - a.quality);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
Languages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
431
|
-
Languages.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
430
|
+
Languages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Languages, deps: [{ token: ACCEPT_LANGUAGE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
431
|
+
Languages.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Languages, providedIn: 'root' });
|
|
432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Languages, decorators: [{
|
|
433
433
|
type: Injectable,
|
|
434
434
|
args: [{
|
|
435
435
|
providedIn: 'root'
|
|
@@ -484,9 +484,9 @@ class Network {
|
|
|
484
484
|
this._online$ = merge(now$, online$, offline$).pipe(map(value => value), distinctUntilChanged(), shareReplay(1));
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
Network.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
488
|
-
Network.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
487
|
+
Network.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Network, deps: [{ token: i1.Platform }, { token: WINDOW, optional: true }, { token: NAVIGATOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
488
|
+
Network.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Network, providedIn: 'root' });
|
|
489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Network, decorators: [{
|
|
490
490
|
type: Injectable,
|
|
491
491
|
args: [{
|
|
492
492
|
providedIn: 'root'
|
|
@@ -540,9 +540,9 @@ class Patch {
|
|
|
540
540
|
this._subscription.add(subscription);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
Patch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
544
|
-
Patch.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
543
|
+
Patch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Patch, deps: [{ token: i1.Platform }, { token: WINDOW, optional: true }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
544
|
+
Patch.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Patch, providedIn: 'root' });
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Patch, decorators: [{
|
|
546
546
|
type: Injectable,
|
|
547
547
|
args: [{
|
|
548
548
|
providedIn: 'root'
|
|
@@ -573,9 +573,9 @@ class Clipboard {
|
|
|
573
573
|
return new ClipboardCopy(text, this._document);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
Clipboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
577
|
-
Clipboard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
576
|
+
Clipboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Clipboard, deps: [{ token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
577
|
+
Clipboard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Clipboard, providedIn: 'root' });
|
|
578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: Clipboard, decorators: [{
|
|
579
579
|
type: Injectable,
|
|
580
580
|
args: [{
|
|
581
581
|
providedIn: 'root'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LocalizeDictionaryDataValues } from './dictionary.data';
|
|
2
|
+
import { LocalizeDictionaryContext } from './dictionary.context';
|
|
3
|
+
import { Localize } from '../localize.service';
|
|
4
|
+
export declare class LocalizeDictionary {
|
|
5
|
+
private _id;
|
|
6
|
+
private _locale;
|
|
7
|
+
private _supported;
|
|
8
|
+
private _dataValues;
|
|
9
|
+
private _localize;
|
|
10
|
+
private readonly _data;
|
|
11
|
+
constructor(_id: string, _locale: string, _supported: string[], _dataValues: LocalizeDictionaryDataValues, _localize: Localize);
|
|
12
|
+
get id(): string;
|
|
13
|
+
get locale(): string;
|
|
14
|
+
get supported(): string[];
|
|
15
|
+
get(token: string | string[]): string;
|
|
16
|
+
has(token: string | string[]): boolean;
|
|
17
|
+
all(): {
|
|
18
|
+
token: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
some(callback: (context: LocalizeDictionaryContext) => LocalizeDictionaryContext): {
|
|
22
|
+
token: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
compare(to: string | string[]): Promise<void>;
|
|
26
|
+
count(): number;
|
|
27
|
+
private formatData;
|
|
28
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalizeDictionaryData } from '../dictionary/dictionary.data';
|
|
2
2
|
export declare class LocalizeConfig {
|
|
3
3
|
languages: LocalizeConfigLanguage[];
|
|
4
|
-
|
|
4
|
+
mode?: 'automatic' | 'manual';
|
|
5
|
+
storageToken?: string;
|
|
5
6
|
substitutions?: {
|
|
6
7
|
references?: [leftSubstitution: string, rightSubstitution: string];
|
|
7
8
|
interpolation?: [leftSubstitution: string, rightSubstitution: string];
|
|
@@ -11,8 +12,5 @@ export interface LocalizeConfigLanguage {
|
|
|
11
12
|
id: string;
|
|
12
13
|
locale: string;
|
|
13
14
|
supported: string[];
|
|
14
|
-
data: () =>
|
|
15
|
+
data: () => LocalizeDictionaryData | Promise<LocalizeDictionaryData>;
|
|
15
16
|
}
|
|
16
|
-
export declare type LocalizeDictionaryData = {
|
|
17
|
-
[key: string]: string | LocalizeDictionaryData;
|
|
18
|
-
};
|
|
@@ -5,13 +5,13 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "./localize.pipe";
|
|
6
6
|
import * as i2 from "./views/localize-string/localize-string.component";
|
|
7
7
|
import * as i3 from "./views/localize-template.directive";
|
|
8
|
-
import * as i4 from "
|
|
9
|
-
import * as i5 from "@
|
|
8
|
+
import * as i4 from "@angular/common";
|
|
9
|
+
import * as i5 from "@bravobit/bb-foundation/utils";
|
|
10
10
|
export declare class LocalizeModule {
|
|
11
11
|
static forRoot(config: LocalizeConfig): ModuleWithProviders<LocalizeModule>;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizeModule, [typeof i1.BbLocalize, typeof i2.BbLocalizeString, typeof i3.BbLocalizeTemplate, typeof i4.
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizeModule, [typeof i1.BbLocalize, typeof i2.BbLocalizeString, typeof i3.BbLocalizeTemplate], [typeof i4.CommonModule, typeof i5.UtilsModule], [typeof i1.BbLocalize, typeof i2.BbLocalizeString, typeof i3.BbLocalizeTemplate]>;
|
|
14
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<LocalizeModule>;
|
|
15
15
|
}
|
|
16
|
-
export declare function initializeLocale(localize: Localize): () => Promise<
|
|
16
|
+
export declare function initializeLocale(localize: Localize): () => Promise<import("@bravobit/bb-foundation/localize").LocalizeDictionary>;
|
|
17
17
|
export declare function getLocale(localize: Localize): string;
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class BbLocalize implements PipeTransform {
|
|
6
6
|
private _localize;
|
|
7
7
|
constructor(_localize: Localize);
|
|
8
|
-
transform(tokenOrParams: string | LocalizeParams, args?: LocalizeOptions):
|
|
8
|
+
transform(tokenOrParams: string | LocalizeParams, args?: LocalizeOptions): string | LocalizeParams;
|
|
9
9
|
private combineParamsWithOptions;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbLocalize, [{ optional: true; }]>;
|
|
11
11
|
static ɵpipe: i0.ɵɵPipeDeclaration<BbLocalize, "bbLocalize", false>;
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
import { LocalizeFunction } from './interfaces/functions.interfaces';
|
|
2
1
|
import { LocalizeConfig, LocalizeConfigLanguage } from './interfaces/config.interfaces';
|
|
3
|
-
import {
|
|
2
|
+
import { LocalizeTransform } from './transforms/abstract.transform';
|
|
4
3
|
import { LocalizeMissingHandler } from './handlers/missing.handler';
|
|
5
|
-
import {
|
|
4
|
+
import { LocalizeDictionary } from './dictionary/dictionary.class';
|
|
5
|
+
import { LocalizeParams } from './interfaces/options.interfaces';
|
|
6
6
|
import { Languages } from '@bravobit/bb-foundation';
|
|
7
|
+
import { Storage } from '@bravobit/bb-foundation/storage';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class Localize {
|
|
9
10
|
private _storage;
|
|
10
11
|
private _languages;
|
|
11
|
-
private _config;
|
|
12
12
|
private _missingHandler;
|
|
13
|
+
private _config?;
|
|
14
|
+
private _window?;
|
|
13
15
|
private _document?;
|
|
14
|
-
private
|
|
16
|
+
private _transforms?;
|
|
17
|
+
private readonly _storageToken;
|
|
15
18
|
private readonly _availableLanguages;
|
|
16
19
|
private readonly _bestMatchingLanguage;
|
|
17
|
-
private readonly
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
private _currentDictionary;
|
|
21
|
-
constructor(_storage: Storage, _languages: Languages, _config: LocalizeConfig, _missingHandler: LocalizeMissingHandler, _document?: Document, _functions?: LocalizeFunction[]);
|
|
20
|
+
private readonly _loadedDictionaries;
|
|
21
|
+
private _current;
|
|
22
|
+
constructor(_storage: Storage, _languages: Languages, _missingHandler: LocalizeMissingHandler, _config?: LocalizeConfig, _window?: Window, _document?: Document, _transforms?: LocalizeTransform[]);
|
|
22
23
|
get languages(): LocalizeConfigLanguage[];
|
|
23
|
-
get current():
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
get current(): LocalizeDictionary;
|
|
25
|
+
load(id: string): any;
|
|
26
|
+
switch(id: string, options?: {
|
|
27
|
+
cache?: boolean;
|
|
28
|
+
reload?: boolean;
|
|
29
|
+
}): Promise<LocalizeDictionary>;
|
|
30
|
+
select(id: string): LocalizeDictionary;
|
|
31
|
+
initialize(): () => Promise<LocalizeDictionary>;
|
|
26
32
|
clear(): void;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
private interpolateFunctionData;
|
|
30
|
-
private findReferencesInTranslation;
|
|
31
|
-
private getSubstitutions;
|
|
33
|
+
transform(value: string, data?: LocalizeParams['data']): string;
|
|
34
|
+
translate(tokenOrParams: string | LocalizeParams): string;
|
|
32
35
|
private retrieveBestMatchingLanguage;
|
|
33
36
|
private getLanguageFromStorage;
|
|
34
37
|
private getBestBrowserMatchLanguage;
|
|
35
|
-
private
|
|
38
|
+
private createDictionary;
|
|
39
|
+
private getDictionary;
|
|
36
40
|
private renderDocumentLanguage;
|
|
37
|
-
private
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Localize, [null, null, { optional: true; },
|
|
41
|
+
private convertToParams;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Localize, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
39
43
|
static ɵprov: i0.ɵɵInjectableDeclaration<Localize>;
|
|
40
44
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LocalizeParams } from '../interfaces/options.interfaces';
|
|
2
|
+
import { Localize } from '../localize.service';
|
|
3
|
+
export declare abstract class LocalizeTransform {
|
|
4
|
+
abstract execute(value: string, data: LocalizeParams['data'], localize: Localize): string;
|
|
5
|
+
protected getMatches(value: string, substitutions: [string, string]): {
|
|
6
|
+
match: string;
|
|
7
|
+
token: string;
|
|
8
|
+
}[];
|
|
9
|
+
protected getSubstitutions(value: [string, string]): {
|
|
10
|
+
start: string;
|
|
11
|
+
end: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LocalizeFunction, LocalizeFunctionMap } from '../interfaces/functions.interfaces';
|
|
2
|
+
import { LocalizeParams } from '../interfaces/options.interfaces';
|
|
3
|
+
import { LocalizeConfig } from '../interfaces/config.interfaces';
|
|
4
|
+
import { LocalizeTransform } from './abstract.transform';
|
|
5
|
+
import { Localize } from '../localize.service';
|
|
6
|
+
export declare class LocalizeInterpolateTransform extends LocalizeTransform {
|
|
7
|
+
protected config: LocalizeConfig;
|
|
8
|
+
protected functions?: LocalizeFunction[];
|
|
9
|
+
readonly substitutions: [leftSubstitution: string, rightSubstitution: string];
|
|
10
|
+
readonly functionsMap: LocalizeFunctionMap;
|
|
11
|
+
constructor(config: LocalizeConfig, functions?: LocalizeFunction[]);
|
|
12
|
+
execute(value: string, data: LocalizeParams['data'], localize: Localize): string;
|
|
13
|
+
protected parseInterpolationToken(value: string, data: LocalizeParams['data'], localize: Localize): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocalizeParams } from '../interfaces/options.interfaces';
|
|
2
|
+
import { LocalizeConfig } from '../interfaces/config.interfaces';
|
|
3
|
+
import { LocalizeTransform } from './abstract.transform';
|
|
4
|
+
import { Localize } from '../localize.service';
|
|
5
|
+
export declare class LocalizeReferenceTransform extends LocalizeTransform {
|
|
6
|
+
protected config: LocalizeConfig;
|
|
7
|
+
readonly substitutions: [leftSubstitution: string, rightSubstitution: string];
|
|
8
|
+
constructor(config: LocalizeConfig);
|
|
9
|
+
execute(value: string, _: LocalizeParams['data'], localize: Localize): string;
|
|
10
|
+
}
|
package/localize/public_api.d.ts
CHANGED
|
@@ -2,15 +2,21 @@ export * from './lib/interfaces/config.interfaces';
|
|
|
2
2
|
export * from './lib/interfaces/options.interfaces';
|
|
3
3
|
export * from './lib/interfaces/functions.interfaces';
|
|
4
4
|
export * from './lib/interfaces/handlers.interfaces';
|
|
5
|
+
export * from './lib/interfaces/transforms.interfaces';
|
|
5
6
|
export * from './lib/functions/lowercase.function';
|
|
6
7
|
export * from './lib/functions/uppercase.function';
|
|
7
8
|
export * from './lib/functions/date.function';
|
|
8
9
|
export * from './lib/localizations/english.localization';
|
|
9
10
|
export * from './lib/localizations/dutch.localization';
|
|
10
11
|
export * from './lib/handlers/missing.handler';
|
|
12
|
+
export * from './lib/dictionary/dictionary.data';
|
|
13
|
+
export * from './lib/dictionary/dictionary.class';
|
|
14
|
+
export * from './lib/dictionary/dictionary.context';
|
|
15
|
+
export * from './lib/transforms/abstract.transform';
|
|
16
|
+
export * from './lib/transforms/interpolate.transform';
|
|
17
|
+
export * from './lib/transforms/reference.transform';
|
|
11
18
|
export * from './lib/views/localize-string/localize-string.component';
|
|
12
19
|
export * from './lib/views/localize-template.directive';
|
|
13
|
-
export * from './lib/localize.dictionary';
|
|
14
20
|
export * from './lib/localize.service';
|
|
15
21
|
export * from './lib/localize.pipe';
|
|
16
22
|
export * from './lib/localize.module';
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { ApplicationRef, ComponentFactoryResolver, Injector, TemplateRef } from '@angular/core';
|
|
2
1
|
import { Notification, NotificationAction, NotificationsConfig } from './notifications.interfaces';
|
|
2
|
+
import { ApplicationRef, EnvironmentInjector, TemplateRef } from '@angular/core';
|
|
3
3
|
import { Localize } from '@bravobit/bb-foundation/localize';
|
|
4
4
|
import { Platform } from '@angular/cdk/platform';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class Notifications {
|
|
7
|
-
private _injector;
|
|
8
7
|
private _platform;
|
|
9
8
|
private _applicationRef;
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
private
|
|
9
|
+
private _environmentInjector;
|
|
10
|
+
private _localize?;
|
|
11
|
+
private _config?;
|
|
13
12
|
private _ref;
|
|
14
13
|
private readonly _defaultMode;
|
|
15
14
|
private readonly _defaultTimeout;
|
|
@@ -18,7 +17,7 @@ export declare class Notifications {
|
|
|
18
17
|
private readonly _defaultDismissText;
|
|
19
18
|
private readonly _defaultPosition;
|
|
20
19
|
private _notifications$;
|
|
21
|
-
constructor(
|
|
20
|
+
constructor(_platform: Platform, _applicationRef: ApplicationRef, _environmentInjector: EnvironmentInjector, _localize?: Localize, _config?: NotificationsConfig);
|
|
22
21
|
success(content: string | TemplateRef<any>, actions?: NotificationAction[], timeout?: number): Notification;
|
|
23
22
|
error(content: string | TemplateRef<any>, actions?: NotificationAction[], timeout?: number): Notification;
|
|
24
23
|
warn(content: string | TemplateRef<any>, actions?: NotificationAction[], timeout?: number): Notification;
|
|
@@ -29,6 +28,6 @@ export declare class Notifications {
|
|
|
29
28
|
private compose;
|
|
30
29
|
private createElement;
|
|
31
30
|
private getProperty;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Notifications, [null, null, null, { optional: true; }, { optional: true; }
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Notifications, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
33
32
|
static ɵprov: i0.ɵɵInjectableDeclaration<Notifications>;
|
|
34
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bravobit/bb-foundation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "The Angular core foundation of the Bravobit team.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Stan van Heumen",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"url": "https://bravobit.nl"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^14.
|
|
12
|
-
"@angular/core": "^14.
|
|
13
|
-
"@angular/cdk": "^14.
|
|
11
|
+
"@angular/common": "^14.2.0",
|
|
12
|
+
"@angular/core": "^14.2.0",
|
|
13
|
+
"@angular/cdk": "^14.2.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.4.0",
|
|
@@ -154,6 +154,14 @@
|
|
|
154
154
|
"es2015": "./fesm2015/bravobit-bb-foundation-theming.mjs",
|
|
155
155
|
"node": "./fesm2015/bravobit-bb-foundation-theming.mjs",
|
|
156
156
|
"default": "./fesm2020/bravobit-bb-foundation-theming.mjs"
|
|
157
|
+
},
|
|
158
|
+
"./utils": {
|
|
159
|
+
"types": "./utils/index.d.ts",
|
|
160
|
+
"esm2020": "./esm2020/utils/bravobit-bb-foundation-utils.mjs",
|
|
161
|
+
"es2020": "./fesm2020/bravobit-bb-foundation-utils.mjs",
|
|
162
|
+
"es2015": "./fesm2015/bravobit-bb-foundation-utils.mjs",
|
|
163
|
+
"node": "./fesm2015/bravobit-bb-foundation-utils.mjs",
|
|
164
|
+
"default": "./fesm2020/bravobit-bb-foundation-utils.mjs"
|
|
157
165
|
}
|
|
158
166
|
},
|
|
159
167
|
"sideEffects": false
|
package/utils/index.d.ts
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,6 +5,7 @@ export declare class BbTemplate {
|
|
|
5
5
|
private _viewContainerRef;
|
|
6
6
|
set bbTemplate(content: string | TemplateRef<any>);
|
|
7
7
|
constructor(_templateRef: TemplateRef<any>, _viewContainerRef: ViewContainerRef);
|
|
8
|
+
static ngAcceptInputType_bbTemplate: string | TemplateRef<any>;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<BbTemplate, never>;
|
|
9
10
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BbTemplate, "[bbTemplate]", never, { "bbTemplate": "bbTemplate"; }, {}, never, never, false>;
|
|
10
11
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./directives/template.directive";
|
|
3
|
+
import * as i2 from "./directives/autosize.directive";
|
|
4
|
+
import * as i3 from "./directives/focus.directive";
|
|
5
|
+
import * as i4 from "./directives/focus-trap.directive";
|
|
6
|
+
export declare class UtilsModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilsModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UtilsModule, [typeof i1.BbTemplate, typeof i2.BbAutosize, typeof i3.BbFocus, typeof i4.BbFocusTrap], never, [typeof i1.BbTemplate, typeof i2.BbAutosize, typeof i3.BbFocus, typeof i4.BbFocusTrap]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UtilsModule>;
|
|
10
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Injector, Type } from '@angular/core';
|
|
2
|
-
export declare class BbDialogInjector implements Injector {
|
|
3
|
-
private _parentInjector;
|
|
4
|
-
private _additionalTokens;
|
|
5
|
-
constructor(_parentInjector: Injector, _additionalTokens: WeakMap<any, any>);
|
|
6
|
-
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T;
|
|
7
|
-
get(token: any, notFoundValue?: any): any;
|
|
8
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export class BbDialogInjector {
|
|
2
|
-
constructor(_parentInjector, _additionalTokens) {
|
|
3
|
-
this._parentInjector = _parentInjector;
|
|
4
|
-
this._additionalTokens = _additionalTokens;
|
|
5
|
-
}
|
|
6
|
-
get(token, notFoundValue) {
|
|
7
|
-
// First check if the additional token
|
|
8
|
-
// contains the token.
|
|
9
|
-
const value = this._additionalTokens.get(token);
|
|
10
|
-
// If that value exists return it.
|
|
11
|
-
if (value) {
|
|
12
|
-
return value;
|
|
13
|
-
}
|
|
14
|
-
// Else query the parent injector.
|
|
15
|
-
return this._parentInjector.get(token, notFoundValue);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmluamVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi9kaWFsb2cvc3JjL2xpYi9kaWFsb2cuaW5qZWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxPQUFPLGdCQUFnQjtJQUV6QixZQUFvQixlQUF5QixFQUN6QixpQkFBb0M7UUFEcEMsb0JBQWUsR0FBZixlQUFlLENBQVU7UUFDekIsc0JBQWlCLEdBQWpCLGlCQUFpQixDQUFtQjtJQUN4RCxDQUFDO0lBSUQsR0FBRyxDQUFDLEtBQVUsRUFBRSxhQUFtQjtRQUMvQixzQ0FBc0M7UUFDdEMsc0JBQXNCO1FBQ3RCLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFaEQsa0NBQWtDO1FBQ2xDLElBQUksS0FBSyxFQUFFO1lBQ1AsT0FBTyxLQUFLLENBQUM7U0FDaEI7UUFFRCxrQ0FBa0M7UUFDbEMsT0FBTyxJQUFJLENBQUMsZUFBZSxDQUFDLEdBQUcsQ0FBTSxLQUFLLEVBQUUsYUFBYSxDQUFDLENBQUM7SUFDL0QsQ0FBQztDQUVKIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtJbmplY3Rpb25Ub2tlbiwgSW5qZWN0b3IsIFR5cGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgY2xhc3MgQmJEaWFsb2dJbmplY3RvciBpbXBsZW1lbnRzIEluamVjdG9yIHtcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgX3BhcmVudEluamVjdG9yOiBJbmplY3RvcixcbiAgICAgICAgICAgICAgICBwcml2YXRlIF9hZGRpdGlvbmFsVG9rZW5zOiBXZWFrTWFwPGFueSwgYW55Pikge1xuICAgIH1cblxuICAgIGdldDxUPih0b2tlbjogVHlwZTxUPiB8IEluamVjdGlvblRva2VuPFQ+LCBub3RGb3VuZFZhbHVlPzogVCk6IFQ7XG4gICAgZ2V0KHRva2VuOiBhbnksIG5vdEZvdW5kVmFsdWU/OiBhbnkpO1xuICAgIGdldCh0b2tlbjogYW55LCBub3RGb3VuZFZhbHVlPzogYW55KSB7XG4gICAgICAgIC8vIEZpcnN0IGNoZWNrIGlmIHRoZSBhZGRpdGlvbmFsIHRva2VuXG4gICAgICAgIC8vIGNvbnRhaW5zIHRoZSB0b2tlbi5cbiAgICAgICAgY29uc3QgdmFsdWUgPSB0aGlzLl9hZGRpdGlvbmFsVG9rZW5zLmdldCh0b2tlbik7XG5cbiAgICAgICAgLy8gSWYgdGhhdCB2YWx1ZSBleGlzdHMgcmV0dXJuIGl0LlxuICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEVsc2UgcXVlcnkgdGhlIHBhcmVudCBpbmplY3Rvci5cbiAgICAgICAgcmV0dXJuIHRoaXMuX3BhcmVudEluamVjdG9yLmdldDxhbnk+KHRva2VuLCBub3RGb3VuZFZhbHVlKTtcbiAgICB9XG5cbn1cbiJdfQ==
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Directive, HostBinding, HostListener, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class BbAutosize {
|
|
4
|
-
constructor(_renderer, _elementRef) {
|
|
5
|
-
this._renderer = _renderer;
|
|
6
|
-
this._elementRef = _elementRef;
|
|
7
|
-
// Min/max heights for the textarea.
|
|
8
|
-
this.minHeight = null;
|
|
9
|
-
this.maxHeight = null;
|
|
10
|
-
this.rows = 1;
|
|
11
|
-
}
|
|
12
|
-
get element() {
|
|
13
|
-
return this._elementRef?.nativeElement;
|
|
14
|
-
}
|
|
15
|
-
ngAfterViewInit() {
|
|
16
|
-
// Update the styles after the DOM has loaded.
|
|
17
|
-
this.updateStyles();
|
|
18
|
-
}
|
|
19
|
-
onWindowResize() {
|
|
20
|
-
// Update the styles when the window is resized.
|
|
21
|
-
this.updateStyles();
|
|
22
|
-
}
|
|
23
|
-
onInputReceived() {
|
|
24
|
-
// Update the styles after the textarea received input.
|
|
25
|
-
this.updateStyles();
|
|
26
|
-
}
|
|
27
|
-
updateStyles() {
|
|
28
|
-
// Validate the element exists.
|
|
29
|
-
if (!this.element) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
// Calculate border height which is not included in the scroll height.
|
|
33
|
-
const borderHeight = this.element?.offsetHeight - this.element?.clientHeight;
|
|
34
|
-
// Reset textarea height to auto that correctly calculate the new height.
|
|
35
|
-
this.setHeight('auto');
|
|
36
|
-
// Set new height.
|
|
37
|
-
this.setHeight(`${this.element?.scrollHeight + borderHeight}px`);
|
|
38
|
-
}
|
|
39
|
-
setHeight(value) {
|
|
40
|
-
this._renderer.setStyle(this.element, 'height', value);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
BbAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbAutosize, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
-
BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", 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 });
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BbAutosize, decorators: [{
|
|
46
|
-
type: Directive,
|
|
47
|
-
args: [{
|
|
48
|
-
selector: 'textarea[bbAutosize]'
|
|
49
|
-
}]
|
|
50
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { minHeight: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}, {
|
|
53
|
-
type: HostBinding,
|
|
54
|
-
args: ['style.min-height']
|
|
55
|
-
}], maxHeight: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}, {
|
|
58
|
-
type: HostBinding,
|
|
59
|
-
args: ['style.max-height']
|
|
60
|
-
}], rows: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}, {
|
|
63
|
-
type: HostBinding,
|
|
64
|
-
args: ['rows']
|
|
65
|
-
}], onWindowResize: [{
|
|
66
|
-
type: HostListener,
|
|
67
|
-
args: ['window:resize']
|
|
68
|
-
}], onInputReceived: [{
|
|
69
|
-
type: HostListener,
|
|
70
|
-
args: ['input']
|
|
71
|
-
}] } });
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b3NpemUuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi9lbGVtZW50cy9zcmMvbGliL2RpcmVjdGl2ZXMvYXV0b3NpemUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBZ0IsU0FBUyxFQUFjLFdBQVcsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFZLE1BQU0sZUFBZS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