@bravobit/bb-foundation 0.21.0 → 0.21.3
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/README.md +47 -47
- package/auth/index.d.ts +5 -5
- package/auth/lib/auth.interceptor.d.ts +21 -21
- package/auth/lib/auth.module.d.ts +15 -15
- package/auth/lib/auth.service.d.ts +59 -59
- package/auth/lib/auth.session.d.ts +34 -34
- package/auth/lib/directives/authenticated.directive.d.ts +14 -14
- package/auth/lib/directives/permission.directive.d.ts +24 -24
- package/auth/lib/directives/role.directive.d.ts +16 -16
- package/auth/lib/guards/anonymous.guard.d.ts +11 -11
- package/auth/lib/guards/authenticated.guard.d.ts +11 -11
- package/auth/lib/helpers/jwt.helper.d.ts +8 -8
- package/auth/lib/helpers/mapper.helper.d.ts +23 -23
- package/auth/lib/interfaces/config.interface.d.ts +12 -12
- package/auth/lib/interfaces/mapper.interface.d.ts +19 -19
- package/auth/lib/interfaces/provider.interface.d.ts +16 -16
- package/auth/lib/interfaces/token.interface.d.ts +11 -11
- package/auth/lib/permissions.service.d.ts +14 -14
- package/auth/lib/providers/email.provider.d.ts +15 -15
- package/auth/lib/providers/verify.provider.d.ts +13 -13
- package/auth/lib/tokens/use-authorization.token.d.ts +2 -2
- package/auth/public_api.d.ts +18 -18
- package/collections/index.d.ts +5 -5
- package/collections/lib/collection.d.ts +42 -43
- package/collections/lib/collections.module.d.ts +10 -10
- package/collections/lib/components/collections-pager/collections-pager.component.d.ts +34 -34
- package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +12 -12
- package/collections/lib/components/collections.directive.d.ts +17 -17
- package/collections/lib/interfaces/collection.interface.d.ts +27 -26
- package/collections/lib/providers/api-collection.provider.d.ts +18 -19
- package/collections/lib/providers/collection.provider.d.ts +6 -6
- package/collections/lib/providers/local-collection.provider.d.ts +8 -8
- package/collections/public_api.d.ts +9 -9
- package/controls/index.d.ts +5 -5
- package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +47 -47
- package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +22 -22
- package/controls/lib/checkbox/checkbox.module.d.ts +9 -9
- package/controls/lib/controls.module.d.ts +7 -7
- package/controls/public_api.d.ts +4 -4
- package/dashboard/index.d.ts +5 -5
- package/dashboard/lib/dashboard/dashboard.component.d.ts +19 -19
- package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +11 -11
- package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +9 -9
- package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +11 -11
- package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +21 -21
- package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +27 -27
- package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +16 -16
- package/dashboard/lib/dashboard.module.d.ts +16 -16
- package/dashboard/public_api.d.ts +8 -8
- package/dialog/index.d.ts +5 -5
- package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +5 -5
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +16 -16
- package/dialog/lib/dialog-container/dialog-container.component.d.ts +24 -24
- package/dialog/lib/dialog-header/dialog-header.component.d.ts +9 -9
- package/dialog/lib/dialog-link/dialog-link.component.d.ts +5 -5
- package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +12 -12
- package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +22 -22
- package/dialog/lib/dialog.injector.d.ts +8 -8
- package/dialog/lib/dialog.insertion.d.ts +8 -8
- package/dialog/lib/dialog.interfaces.d.ts +3 -3
- package/dialog/lib/dialog.module.d.ts +19 -19
- package/dialog/lib/dialog.ref.d.ts +8 -8
- package/dialog/lib/dialog.service.d.ts +19 -19
- package/dialog/public_api.d.ts +9 -9
- package/elements/index.d.ts +5 -5
- package/elements/lib/avatar/avatar.component.d.ts +25 -25
- package/elements/lib/button/button.component.d.ts +23 -23
- package/elements/lib/checkbox/checkbox.component.d.ts +27 -27
- package/elements/lib/date-picker/date-picker.component.d.ts +69 -69
- package/elements/lib/directives/addon.directive.d.ts +9 -9
- package/elements/lib/directives/autosize.directive.d.ts +18 -18
- package/elements/lib/directives/focus-trap.directive.d.ts +17 -17
- package/elements/lib/directives/focus.directive.d.ts +14 -14
- package/elements/lib/directives/form-submit.directive.d.ts +17 -17
- package/elements/lib/directives/input.directive.d.ts +38 -38
- package/elements/lib/directives/template.directive.d.ts +10 -10
- package/elements/lib/dropdown/dropdown.component.d.ts +21 -21
- package/elements/lib/elements.interfaces.d.ts +25 -25
- package/elements/lib/elements.module.d.ts +116 -116
- package/elements/lib/file-picker/file-picker.component.d.ts +49 -49
- package/elements/lib/form-control/form-control.component.d.ts +21 -21
- package/elements/lib/form-error/form-error.component.d.ts +29 -29
- package/elements/lib/form-group/form-group.component.d.ts +10 -10
- package/elements/lib/icon/icon.component.d.ts +22 -22
- package/elements/lib/image-picker/image-picker.component.d.ts +38 -38
- package/elements/lib/pipes/file-image.pipe.d.ts +13 -13
- package/elements/lib/pipes/file-size.pipe.d.ts +8 -8
- package/elements/lib/pipes/relative-time.pipe.d.ts +19 -19
- package/elements/lib/spinner/spinner.component.d.ts +12 -12
- package/elements/lib/tag/tag.component.d.ts +7 -7
- package/elements/public_api.d.ts +25 -25
- package/esm2020/auth/bravobit-bb-foundation-auth.mjs +4 -4
- package/esm2020/auth/lib/auth.interceptor.mjs +93 -93
- package/esm2020/auth/lib/auth.module.mjs +54 -54
- package/esm2020/auth/lib/auth.service.mjs +281 -281
- package/esm2020/auth/lib/auth.session.mjs +131 -131
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +31 -31
- package/esm2020/auth/lib/directives/permission.directive.mjs +80 -80
- package/esm2020/auth/lib/directives/role.directive.mjs +37 -37
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +34 -34
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +35 -35
- package/esm2020/auth/lib/helpers/jwt.helper.mjs +69 -69
- package/esm2020/auth/lib/helpers/mapper.helper.mjs +35 -35
- package/esm2020/auth/lib/interfaces/config.interface.mjs +3 -3
- package/esm2020/auth/lib/interfaces/mapper.interface.mjs +2 -2
- package/esm2020/auth/lib/interfaces/provider.interface.mjs +2 -2
- package/esm2020/auth/lib/interfaces/token.interface.mjs +2 -2
- package/esm2020/auth/lib/permissions.service.mjs +56 -56
- package/esm2020/auth/lib/providers/email.provider.mjs +25 -25
- package/esm2020/auth/lib/providers/verify.provider.mjs +19 -19
- package/esm2020/auth/lib/tokens/use-authorization.token.mjs +3 -3
- package/esm2020/auth/public_api.mjs +19 -19
- package/esm2020/bravobit-bb-foundation.mjs +4 -4
- package/esm2020/collections/bravobit-bb-foundation-collections.mjs +4 -4
- package/esm2020/collections/lib/collection.mjs +100 -102
- package/esm2020/collections/lib/collections.module.mjs +54 -54
- package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +123 -123
- package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +31 -31
- package/esm2020/collections/lib/components/collections.directive.mjs +43 -43
- package/esm2020/collections/lib/interfaces/collection.interface.mjs +2 -2
- package/esm2020/collections/lib/providers/api-collection.provider.mjs +91 -71
- package/esm2020/collections/lib/providers/collection.provider.mjs +13 -13
- package/esm2020/collections/lib/providers/local-collection.provider.mjs +16 -16
- package/esm2020/collections/public_api.mjs +10 -10
- package/esm2020/controls/bravobit-bb-foundation-controls.mjs +4 -4
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +153 -153
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +61 -61
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +19 -19
- package/esm2020/controls/lib/controls.module.mjs +16 -16
- package/esm2020/controls/public_api.mjs +5 -5
- package/esm2020/dashboard/bravobit-bb-foundation-dashboard.mjs +4 -4
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +56 -56
- package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +30 -30
- package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +31 -31
- package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +29 -29
- package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +75 -75
- package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +99 -99
- package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +62 -62
- package/esm2020/dashboard/lib/dashboard.module.mjs +47 -47
- package/esm2020/dashboard/public_api.mjs +9 -9
- package/esm2020/dialog/bravobit-bb-foundation-dialog.mjs +4 -4
- package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +12 -12
- package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +37 -37
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +153 -153
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +25 -25
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +11 -11
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +46 -46
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +134 -134
- package/esm2020/dialog/lib/dialog.injector.mjs +18 -18
- package/esm2020/dialog/lib/dialog.insertion.mjs +16 -16
- package/esm2020/dialog/lib/dialog.interfaces.mjs +3 -3
- package/esm2020/dialog/lib/dialog.module.mjs +68 -68
- package/esm2020/dialog/lib/dialog.ref.mjs +22 -22
- package/esm2020/dialog/lib/dialog.service.mjs +77 -77
- package/esm2020/dialog/public_api.mjs +10 -10
- package/esm2020/elements/bravobit-bb-foundation-elements.mjs +4 -4
- package/esm2020/elements/lib/avatar/avatar.component.mjs +145 -145
- package/esm2020/elements/lib/button/button.component.mjs +61 -61
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +73 -73
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +304 -304
- package/esm2020/elements/lib/directives/addon.directive.mjs +29 -29
- package/esm2020/elements/lib/directives/autosize.directive.mjs +72 -72
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +77 -77
- package/esm2020/elements/lib/directives/focus.directive.mjs +39 -39
- package/esm2020/elements/lib/directives/form-submit.directive.mjs +50 -50
- package/esm2020/elements/lib/directives/input.directive.mjs +136 -136
- package/esm2020/elements/lib/directives/template.directive.mjs +28 -28
- package/esm2020/elements/lib/dropdown/dropdown.component.mjs +100 -100
- package/esm2020/elements/lib/elements.interfaces.mjs +4 -4
- package/esm2020/elements/lib/elements.module.mjs +177 -177
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +236 -236
- package/esm2020/elements/lib/form-control/form-control.component.mjs +49 -49
- package/esm2020/elements/lib/form-error/form-error.component.mjs +108 -108
- package/esm2020/elements/lib/form-group/form-group.component.mjs +18 -18
- package/esm2020/elements/lib/icon/icon.component.mjs +102 -102
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +106 -106
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +42 -42
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +28 -28
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +94 -94
- package/esm2020/elements/lib/spinner/spinner.component.mjs +25 -25
- package/esm2020/elements/lib/tag/tag.component.mjs +18 -18
- package/esm2020/elements/public_api.mjs +26 -26
- package/esm2020/http/bravobit-bb-foundation-http.mjs +4 -4
- package/esm2020/http/lib/classes/http.config.mjs +29 -29
- package/esm2020/http/lib/classes/http.error.mjs +20 -20
- package/esm2020/http/lib/http.interfaces.mjs +2 -2
- package/esm2020/http/lib/http.module.mjs +43 -43
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +50 -50
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +32 -32
- package/esm2020/http/public_api.mjs +7 -7
- package/esm2020/lib/core/miscellaneous/regex.mjs +5 -5
- package/esm2020/lib/core/miscellaneous/validator.mjs +85 -85
- package/esm2020/lib/core/mixins/can-disable.mjs +16 -16
- package/esm2020/lib/core/mixins/can-hide-errors.mjs +16 -16
- package/esm2020/lib/core/mixins/can-load.mjs +16 -16
- package/esm2020/lib/core/mixins/constructor.mjs +2 -2
- package/esm2020/lib/core/mixins/has-error.mjs +16 -16
- package/esm2020/lib/core/mixins/is-focused.mjs +16 -16
- package/esm2020/lib/core/mixins/is-grouped.mjs +16 -16
- package/esm2020/lib/core/mixins/is-readonly.mjs +16 -16
- package/esm2020/lib/core/mixins/is-required.mjs +16 -16
- package/esm2020/lib/core/services/clipboard.service.mjs +70 -70
- package/esm2020/lib/core/services/exif.service.mjs +163 -163
- package/esm2020/lib/core/services/file-loader.service.mjs +87 -87
- package/esm2020/lib/core/services/image-converter.service.mjs +123 -123
- package/esm2020/lib/core/services/languages.service.mjs +74 -74
- package/esm2020/lib/core/services/network.service.mjs +55 -55
- package/esm2020/lib/core/services/patch.service.mjs +63 -63
- package/esm2020/lib/core/services/platform.service.mjs +42 -42
- package/esm2020/lib/core/tokens/accept-language.token.mjs +3 -3
- package/esm2020/lib/core/tokens/base-url.token.mjs +3 -3
- package/esm2020/lib/core/tokens/cookie.token.mjs +3 -3
- package/esm2020/lib/core/tokens/location.token.mjs +6 -6
- package/esm2020/lib/core/tokens/navigator.token.mjs +6 -6
- package/esm2020/lib/core/tokens/window.token.mjs +12 -12
- package/esm2020/localize/bravobit-bb-foundation-localize.mjs +4 -4
- package/esm2020/localize/lib/functions/date.function.mjs +18 -18
- package/esm2020/localize/lib/functions/lowercase.function.mjs +13 -13
- package/esm2020/localize/lib/functions/uppercase.function.mjs +13 -13
- package/esm2020/localize/lib/handlers/missing.handler.mjs +15 -15
- package/esm2020/localize/lib/interfaces/config.interfaces.mjs +7 -7
- package/esm2020/localize/lib/interfaces/functions.interfaces.mjs +8 -8
- package/esm2020/localize/lib/interfaces/handlers.interfaces.mjs +2 -2
- package/esm2020/localize/lib/interfaces/options.interfaces.mjs +6 -6
- package/esm2020/localize/lib/localizations/dutch.localization.mjs +45 -45
- package/esm2020/localize/lib/localizations/english.localization.mjs +45 -45
- package/esm2020/localize/lib/localize.dictionary.mjs +26 -26
- package/esm2020/localize/lib/localize.module.mjs +71 -71
- package/esm2020/localize/lib/localize.pipe.mjs +49 -49
- package/esm2020/localize/lib/localize.service.mjs +207 -207
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +88 -88
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +28 -28
- package/esm2020/localize/lib/views/localize-template.directive.mjs +21 -21
- package/esm2020/localize/public_api.mjs +17 -17
- package/esm2020/masking/bravobit-bb-foundation-masking.mjs +4 -4
- package/esm2020/masking/lib/input-mask.directive.mjs +117 -110
- package/esm2020/masking/lib/input-mask.interface.mjs +2 -2
- package/esm2020/masking/lib/masking.module.mjs +16 -16
- package/esm2020/masking/lib/masking.service.mjs +103 -94
- package/esm2020/masking/public_api.mjs +5 -5
- package/esm2020/notifications/bravobit-bb-foundation-notifications.mjs +4 -4
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +100 -100
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +47 -47
- package/esm2020/notifications/lib/notifications.animations.mjs +28 -28
- package/esm2020/notifications/lib/notifications.injector.mjs +18 -18
- package/esm2020/notifications/lib/notifications.interfaces.mjs +20 -20
- package/esm2020/notifications/lib/notifications.module.mjs +30 -30
- package/esm2020/notifications/lib/notifications.service.mjs +145 -145
- package/esm2020/notifications/public_api.mjs +4 -4
- package/esm2020/public_api.mjs +29 -29
- package/esm2020/recaptcha/bravobit-bb-foundation-recaptcha.mjs +4 -4
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +185 -185
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +90 -90
- package/esm2020/recaptcha/lib/recaptcha.interface.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +27 -27
- package/esm2020/recaptcha/public_api.mjs +5 -5
- package/esm2020/rxjs/bravobit-bb-foundation-rxjs.mjs +4 -4
- package/esm2020/rxjs/lib/observables/get-control-value.observable.mjs +6 -0
- package/esm2020/rxjs/lib/operators/combine-latest-map.operator.mjs +10 -10
- package/esm2020/rxjs/lib/operators/filter-nil.operator.mjs +5 -5
- package/esm2020/rxjs/public_api.mjs +4 -3
- package/esm2020/storage/bravobit-bb-foundation-storage.mjs +4 -4
- package/esm2020/storage/lib/interfaces/attributes.interface.mjs +2 -2
- package/esm2020/storage/lib/interfaces/memory.interface.mjs +2 -2
- package/esm2020/storage/lib/interfaces/strategy.interface.mjs +2 -2
- package/esm2020/storage/lib/storage.service.mjs +109 -109
- package/esm2020/storage/lib/strategies/cookie-storage.strategy.mjs +142 -142
- package/esm2020/storage/lib/strategies/memory-storage.strategy.mjs +56 -56
- package/esm2020/storage/lib/strategies/polyfill-storage.strategy.mjs +102 -102
- package/esm2020/storage/public_api.mjs +8 -8
- package/esm2020/table/bravobit-bb-foundation-table.mjs +4 -4
- package/esm2020/table/lib/components/table/table.component.mjs +191 -191
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +11 -11
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +131 -131
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +136 -136
- package/esm2020/table/lib/data/datasource.data.mjs +32 -32
- package/esm2020/table/lib/data/generic.data.mjs +72 -72
- package/esm2020/table/lib/interfaces/datasource.interface.mjs +2 -2
- package/esm2020/table/lib/interfaces/table.interfaces.mjs +2 -2
- package/esm2020/table/lib/table.module.mjs +42 -42
- package/esm2020/table/public_api.mjs +10 -10
- package/esm2020/theming/bravobit-bb-foundation-theming.mjs +4 -4
- package/esm2020/theming/lib/themes/checkbox-group.theme.mjs +2 -2
- package/esm2020/theming/lib/themes/checkbox.theme.mjs +2 -2
- package/esm2020/theming/lib/themes/theme.mjs +34 -0
- package/esm2020/theming/lib/theming.interface.mjs +3 -3
- package/esm2020/theming/lib/theming.module.mjs +38 -38
- package/esm2020/theming/lib/theming.service.mjs +77 -100
- package/esm2020/theming/public_api.mjs +7 -4
- package/fesm2015/bravobit-bb-foundation-auth.mjs +930 -930
- package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-collections.mjs +443 -424
- package/fesm2015/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-controls.mjs +229 -229
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +382 -382
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +540 -540
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +1970 -1970
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +156 -156
- package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-localize.mjs +608 -608
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +231 -214
- package/fesm2015/bravobit-bb-foundation-masking.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +348 -348
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +290 -290
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-rxjs.mjs +14 -10
- package/fesm2015/bravobit-bb-foundation-rxjs.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-storage.mjs +401 -401
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +571 -571
- package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-theming.mjs +151 -140
- package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation.mjs +859 -859
- package/fesm2015/bravobit-bb-foundation.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-auth.mjs +882 -882
- package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-collections.mjs +432 -414
- package/fesm2020/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-controls.mjs +227 -227
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +370 -370
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +539 -539
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +1927 -1927
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +148 -148
- package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-localize.mjs +587 -587
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +219 -203
- package/fesm2020/bravobit-bb-foundation-masking.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +346 -346
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +280 -280
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-rxjs.mjs +17 -13
- package/fesm2020/bravobit-bb-foundation-rxjs.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-storage.mjs +396 -396
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +560 -560
- package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-theming.mjs +141 -130
- package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation.mjs +831 -831
- package/fesm2020/bravobit-bb-foundation.mjs.map +1 -1
- package/http/index.d.ts +5 -5
- package/http/lib/classes/http.config.d.ts +9 -9
- package/http/lib/classes/http.error.d.ts +7 -7
- package/http/lib/http.interfaces.d.ts +12 -12
- package/http/lib/http.module.d.ts +15 -15
- package/http/lib/interceptors/base-url.interceptor.d.ts +15 -15
- package/http/lib/interceptors/error.interceptor.d.ts +11 -11
- package/http/public_api.d.ts +6 -6
- package/index.d.ts +5 -5
- package/lib/core/miscellaneous/regex.d.ts +4 -4
- package/lib/core/miscellaneous/validator.d.ts +13 -13
- package/lib/core/mixins/can-disable.d.ts +6 -6
- package/lib/core/mixins/can-hide-errors.d.ts +6 -6
- package/lib/core/mixins/can-load.d.ts +6 -6
- package/lib/core/mixins/constructor.d.ts +1 -1
- package/lib/core/mixins/has-error.d.ts +6 -6
- package/lib/core/mixins/is-focused.d.ts +6 -6
- package/lib/core/mixins/is-grouped.d.ts +6 -6
- package/lib/core/mixins/is-readonly.d.ts +6 -6
- package/lib/core/mixins/is-required.d.ts +6 -6
- package/lib/core/services/clipboard.service.d.ts +18 -18
- package/lib/core/services/exif.service.d.ts +15 -15
- package/lib/core/services/file-loader.service.d.ts +13 -13
- package/lib/core/services/image-converter.service.d.ts +21 -21
- package/lib/core/services/languages.service.d.ts +16 -16
- package/lib/core/services/network.service.d.ts +14 -14
- package/lib/core/services/patch.service.d.ts +16 -16
- package/lib/core/services/platform.service.d.ts +18 -18
- package/lib/core/tokens/accept-language.token.d.ts +2 -2
- package/lib/core/tokens/base-url.token.d.ts +2 -2
- package/lib/core/tokens/cookie.token.d.ts +2 -2
- package/lib/core/tokens/location.token.d.ts +2 -2
- package/lib/core/tokens/navigator.token.d.ts +2 -2
- package/lib/core/tokens/window.token.d.ts +2 -2
- package/localize/index.d.ts +5 -5
- package/localize/lib/functions/date.function.d.ts +5 -5
- package/localize/lib/functions/lowercase.function.d.ts +5 -5
- package/localize/lib/functions/uppercase.function.d.ts +5 -5
- package/localize/lib/handlers/missing.handler.d.ts +6 -6
- package/localize/lib/interfaces/config.interfaces.d.ts +18 -18
- package/localize/lib/interfaces/functions.interfaces.d.ts +9 -9
- package/localize/lib/interfaces/handlers.interfaces.d.ts +6 -6
- package/localize/lib/interfaces/options.interfaces.d.ts +10 -10
- package/localize/lib/localizations/dutch.localization.d.ts +44 -44
- package/localize/lib/localizations/english.localization.d.ts +44 -44
- package/localize/lib/localize.dictionary.d.ts +7 -7
- package/localize/lib/localize.module.d.ts +17 -17
- package/localize/lib/localize.pipe.d.ts +12 -12
- package/localize/lib/localize.service.d.ts +40 -40
- package/localize/lib/views/localize-string/localize-string.component.d.ts +23 -23
- package/localize/lib/views/localize-template-or-string.directive.d.ts +10 -10
- package/localize/lib/views/localize-template.directive.d.ts +9 -9
- package/localize/public_api.d.ts +16 -16
- package/masking/index.d.ts +5 -5
- package/masking/lib/input-mask.directive.d.ts +38 -36
- package/masking/lib/input-mask.interface.d.ts +24 -20
- package/masking/lib/masking.module.d.ts +7 -7
- package/masking/lib/masking.service.d.ts +12 -12
- package/masking/public_api.d.ts +4 -4
- package/notifications/index.d.ts +5 -5
- package/notifications/lib/notifications-item/notifications-item.component.d.ts +34 -34
- package/notifications/lib/notifications-list/notifications-list.component.d.ts +16 -16
- package/notifications/lib/notifications.animations.d.ts +1 -1
- package/notifications/lib/notifications.injector.d.ts +8 -8
- package/notifications/lib/notifications.interfaces.d.ts +49 -49
- package/notifications/lib/notifications.module.d.ts +13 -13
- package/notifications/lib/notifications.service.d.ts +34 -34
- package/notifications/public_api.d.ts +3 -3
- package/package.json +1 -1
- package/public_api.d.ts +25 -25
- package/recaptcha/index.d.ts +5 -5
- package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +47 -47
- package/recaptcha/lib/recaptcha-loader.service.d.ts +22 -22
- package/recaptcha/lib/recaptcha.interface.d.ts +14 -14
- package/recaptcha/lib/recaptcha.module.d.ts +10 -10
- package/recaptcha/public_api.d.ts +4 -4
- package/rxjs/index.d.ts +5 -5
- package/rxjs/lib/observables/get-control-value.observable.d.ts +3 -0
- package/rxjs/lib/operators/combine-latest-map.operator.d.ts +8 -8
- package/rxjs/lib/operators/filter-nil.operator.d.ts +1 -1
- package/rxjs/public_api.d.ts +3 -2
- package/storage/index.d.ts +5 -5
- package/storage/lib/interfaces/attributes.interface.d.ts +13 -13
- package/storage/lib/interfaces/memory.interface.d.ts +7 -7
- package/storage/lib/interfaces/strategy.interface.d.ts +17 -17
- package/storage/lib/storage.service.d.ts +26 -26
- package/storage/lib/strategies/cookie-storage.strategy.d.ts +20 -20
- package/storage/lib/strategies/memory-storage.strategy.d.ts +11 -11
- package/storage/lib/strategies/polyfill-storage.strategy.d.ts +15 -15
- package/storage/public_api.d.ts +7 -7
- package/table/index.d.ts +5 -5
- package/table/lib/components/table/table.component.d.ts +56 -56
- package/table/lib/components/table-cell/table-cell.component.d.ts +5 -5
- package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +29 -29
- package/table/lib/components/table-pager/table-pager.component.d.ts +41 -41
- package/table/lib/data/datasource.data.d.ts +14 -14
- package/table/lib/data/generic.data.d.ts +23 -23
- package/table/lib/interfaces/datasource.interface.d.ts +17 -17
- package/table/lib/interfaces/table.interfaces.d.ts +1 -1
- package/table/lib/table.module.d.ts +14 -14
- package/table/public_api.d.ts +9 -9
- package/theming/index.d.ts +5 -5
- package/theming/lib/themes/checkbox-group.theme.d.ts +5 -5
- package/theming/lib/themes/checkbox.theme.d.ts +19 -19
- package/theming/lib/themes/theme.d.ts +12 -0
- package/theming/lib/theming.interface.d.ts +15 -14
- package/theming/lib/theming.module.d.ts +13 -13
- package/theming/lib/theming.service.d.ts +22 -24
- package/theming/public_api.d.ts +6 -3
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class BbSuffix {
|
|
4
|
-
}
|
|
5
|
-
BbSuffix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
6
|
-
BbSuffix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
7
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
8
|
-
type: Directive,
|
|
9
|
-
args: [{
|
|
10
|
-
selector: '[bbSuffix]',
|
|
11
|
-
host: {
|
|
12
|
-
'class': 'bb-suffix'
|
|
13
|
-
}
|
|
14
|
-
}]
|
|
15
|
-
}] });
|
|
16
|
-
export class BbPrefix {
|
|
17
|
-
}
|
|
18
|
-
BbPrefix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
19
|
-
BbPrefix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
21
|
-
type: Directive,
|
|
22
|
-
args: [{
|
|
23
|
-
selector: '[bbPrefix]',
|
|
24
|
-
host: {
|
|
25
|
-
'class': 'bb-prefix'
|
|
26
|
-
}
|
|
27
|
-
}]
|
|
28
|
-
}] });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class BbSuffix {
|
|
4
|
+
}
|
|
5
|
+
BbSuffix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6
|
+
BbSuffix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: BbSuffix, selector: "[bbSuffix]", host: { classAttribute: "bb-suffix" }, ngImport: i0 });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbSuffix, decorators: [{
|
|
8
|
+
type: Directive,
|
|
9
|
+
args: [{
|
|
10
|
+
selector: '[bbSuffix]',
|
|
11
|
+
host: {
|
|
12
|
+
'class': 'bb-suffix'
|
|
13
|
+
}
|
|
14
|
+
}]
|
|
15
|
+
}] });
|
|
16
|
+
export class BbPrefix {
|
|
17
|
+
}
|
|
18
|
+
BbPrefix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
BbPrefix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: BbPrefix, selector: "[bbPrefix]", host: { classAttribute: "bb-prefix" }, ngImport: i0 });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbPrefix, decorators: [{
|
|
21
|
+
type: Directive,
|
|
22
|
+
args: [{
|
|
23
|
+
selector: '[bbPrefix]',
|
|
24
|
+
host: {
|
|
25
|
+
'class': 'bb-prefix'
|
|
26
|
+
}
|
|
27
|
+
}]
|
|
28
|
+
}] });
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkb24uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi9lbGVtZW50cy9zcmMvbGliL2RpcmVjdGl2ZXMvYWRkb24uZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7O0FBUXhDLE1BQU0sT0FBTyxRQUFROztxR0FBUixRQUFRO3lGQUFSLFFBQVE7MkZBQVIsUUFBUTtrQkFOcEIsU0FBUzttQkFBQztvQkFDUCxRQUFRLEVBQUUsWUFBWTtvQkFDdEIsSUFBSSxFQUFFO3dCQUNGLE9BQU8sRUFBRSxXQUFXO3FCQUN2QjtpQkFDSjs7QUFVRCxNQUFNLE9BQU8sUUFBUTs7cUdBQVIsUUFBUTt5RkFBUixRQUFROzJGQUFSLFFBQVE7a0JBTnBCLFNBQVM7bUJBQUM7b0JBQ1AsUUFBUSxFQUFFLFlBQVk7b0JBQ3RCLElBQUksRUFBRTt3QkFDRixPQUFPLEVBQUUsV0FBVztxQkFDdkI7aUJBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0RpcmVjdGl2ZX0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnW2JiU3VmZml4XScsXG4gICAgaG9zdDoge1xuICAgICAgICAnY2xhc3MnOiAnYmItc3VmZml4J1xuICAgIH1cbn0pXG5leHBvcnQgY2xhc3MgQmJTdWZmaXgge1xufVxuXG5ARGlyZWN0aXZlKHtcbiAgICBzZWxlY3RvcjogJ1tiYlByZWZpeF0nLFxuICAgIGhvc3Q6IHtcbiAgICAgICAgJ2NsYXNzJzogJ2JiLXByZWZpeCdcbiAgICB9XG59KVxuZXhwb3J0IGNsYXNzIEJiUHJlZml4IHtcbn1cbiJdfQ==
|
|
@@ -1,72 +1,72 @@
|
|
|
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.0.
|
|
44
|
-
BbAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
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,
|
|
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.0.4", 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.0.4", 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.0.4", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b3NpemUuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi9lbGVtZW50cy9zcmMvbGliL2RpcmVjdGl2ZXMvYXV0b3NpemUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBZ0IsU0FBUyxFQUFjLFdBQVcsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFZLE1BQU0sZUFBZSxDQUFDOztBQUtoSCxNQUFNLE9BQU8sVUFBVTtJQU9uQixZQUFvQixTQUFvQixFQUNwQixXQUF1QjtRQUR2QixjQUFTLEdBQVQsU0FBUyxDQUFXO1FBQ3BCLGdCQUFXLEdBQVgsV0FBVyxDQUFZO1FBTjNDLG9DQUFvQztRQUNNLGNBQVMsR0FBa0IsSUFBSSxDQUFDO1FBQ2hDLGNBQVMsR0FBa0IsSUFBSSxDQUFDO1FBQzVDLFNBQUksR0FBVyxDQUFDLENBQUM7SUFJL0MsQ0FBQztJQUVELElBQUksT0FBTztRQUNQLE9BQU8sSUFBSSxDQUFDLFdBQVcsRUFBRSxhQUFvQyxDQUFDO0lBQ2xFLENBQUM7SUFFRCxlQUFlO1FBQ1gsOENBQThDO1FBQzlDLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQztJQUN4QixDQUFDO0lBR0QsY0FBYztRQUNWLGdEQUFnRDtRQUNoRCxJQUFJLENBQUMsWUFBWSxFQUFFLENBQUM7SUFDeEIsQ0FBQ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Z2h0KGAke3RoaXMuZWxlbWVudD8uc2Nyb2xsSGVpZ2h0ICsgYm9yZGVySGVpZ2h0fXB4YCk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBzZXRIZWlnaHQodmFsdWU6IHN0cmluZykge1xuICAgICAgICB0aGlzLl9yZW5kZXJlci5zZXRTdHlsZSh0aGlzLmVsZW1lbnQsICdoZWlnaHQnLCB2YWx1ZSk7XG4gICAgfVxuXG59XG4iXX0=
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { Directive, HostListener } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@bravobit/bb-foundation";
|
|
4
|
-
export class BbFocusTrap {
|
|
5
|
-
constructor(_platform, _elementRef) {
|
|
6
|
-
this._platform = _platform;
|
|
7
|
-
this._elementRef = _elementRef;
|
|
8
|
-
this._focusableElements = [
|
|
9
|
-
'a[href]',
|
|
10
|
-
'area[href]',
|
|
11
|
-
'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
|
|
12
|
-
'select:not([disabled]):not([aria-hidden])',
|
|
13
|
-
'textarea:not([disabled]):not([aria-hidden])',
|
|
14
|
-
'button:not([disabled]):not([aria-hidden])',
|
|
15
|
-
'iframe',
|
|
16
|
-
'object',
|
|
17
|
-
'embed',
|
|
18
|
-
'[contenteditable]',
|
|
19
|
-
'[tabindex]:not([tabindex^="-"])'
|
|
20
|
-
];
|
|
21
|
-
this.focus = (element) => {
|
|
22
|
-
return element && element.focus && element.focus();
|
|
23
|
-
};
|
|
24
|
-
this.isTabEvent = (event) => {
|
|
25
|
-
return event.key === 'Tab' || event.keyCode === 9;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
onKeydown(event) {
|
|
29
|
-
// Validate it is a tab event.
|
|
30
|
-
if (!this.isTabEvent(event)) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
// Trap the focus inside the element.
|
|
34
|
-
return this.trapFocus(event);
|
|
35
|
-
}
|
|
36
|
-
trapFocus(event) {
|
|
37
|
-
// Validate that the DOM is available.
|
|
38
|
-
if (!this._platform.isBrowser) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
// Get all focusable nodes.
|
|
42
|
-
const focusableNodes = this.getFocusableNodes();
|
|
43
|
-
// Focus the first available element if the focus
|
|
44
|
-
// is not in the modal.
|
|
45
|
-
if (!this.element.contains(document.activeElement)) {
|
|
46
|
-
return this.focus(focusableNodes[0]);
|
|
47
|
-
}
|
|
48
|
-
const focusedItemIndex = focusableNodes.indexOf(document.activeElement);
|
|
49
|
-
if (event.shiftKey && focusedItemIndex === 0) {
|
|
50
|
-
this.focus(focusableNodes[focusableNodes.length - 1]);
|
|
51
|
-
return event.preventDefault();
|
|
52
|
-
}
|
|
53
|
-
if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {
|
|
54
|
-
this.focus(focusableNodes[0]);
|
|
55
|
-
return event.preventDefault();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
get element() {
|
|
59
|
-
return this._elementRef.nativeElement;
|
|
60
|
-
}
|
|
61
|
-
getFocusableNodes() {
|
|
62
|
-
const nodes = this.element.querySelectorAll(this._focusableElements);
|
|
63
|
-
return Array(...nodes);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
67
|
-
BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
69
|
-
type: Directive,
|
|
70
|
-
args: [{
|
|
71
|
-
selector: '[bbFocusTrap]'
|
|
72
|
-
}]
|
|
73
|
-
}], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.ElementRef }]; }, propDecorators: { onKeydown: [{
|
|
74
|
-
type: HostListener,
|
|
75
|
-
args: ['keydown', ['$event']]
|
|
76
|
-
}] } });
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive, HostListener } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@bravobit/bb-foundation";
|
|
4
|
+
export class BbFocusTrap {
|
|
5
|
+
constructor(_platform, _elementRef) {
|
|
6
|
+
this._platform = _platform;
|
|
7
|
+
this._elementRef = _elementRef;
|
|
8
|
+
this._focusableElements = [
|
|
9
|
+
'a[href]',
|
|
10
|
+
'area[href]',
|
|
11
|
+
'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
|
|
12
|
+
'select:not([disabled]):not([aria-hidden])',
|
|
13
|
+
'textarea:not([disabled]):not([aria-hidden])',
|
|
14
|
+
'button:not([disabled]):not([aria-hidden])',
|
|
15
|
+
'iframe',
|
|
16
|
+
'object',
|
|
17
|
+
'embed',
|
|
18
|
+
'[contenteditable]',
|
|
19
|
+
'[tabindex]:not([tabindex^="-"])'
|
|
20
|
+
];
|
|
21
|
+
this.focus = (element) => {
|
|
22
|
+
return element && element.focus && element.focus();
|
|
23
|
+
};
|
|
24
|
+
this.isTabEvent = (event) => {
|
|
25
|
+
return event.key === 'Tab' || event.keyCode === 9;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
onKeydown(event) {
|
|
29
|
+
// Validate it is a tab event.
|
|
30
|
+
if (!this.isTabEvent(event)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// Trap the focus inside the element.
|
|
34
|
+
return this.trapFocus(event);
|
|
35
|
+
}
|
|
36
|
+
trapFocus(event) {
|
|
37
|
+
// Validate that the DOM is available.
|
|
38
|
+
if (!this._platform.isBrowser) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// Get all focusable nodes.
|
|
42
|
+
const focusableNodes = this.getFocusableNodes();
|
|
43
|
+
// Focus the first available element if the focus
|
|
44
|
+
// is not in the modal.
|
|
45
|
+
if (!this.element.contains(document.activeElement)) {
|
|
46
|
+
return this.focus(focusableNodes[0]);
|
|
47
|
+
}
|
|
48
|
+
const focusedItemIndex = focusableNodes.indexOf(document.activeElement);
|
|
49
|
+
if (event.shiftKey && focusedItemIndex === 0) {
|
|
50
|
+
this.focus(focusableNodes[focusableNodes.length - 1]);
|
|
51
|
+
return event.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
if (!event.shiftKey && focusedItemIndex === focusableNodes.length - 1) {
|
|
54
|
+
this.focus(focusableNodes[0]);
|
|
55
|
+
return event.preventDefault();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
get element() {
|
|
59
|
+
return this._elementRef.nativeElement;
|
|
60
|
+
}
|
|
61
|
+
getFocusableNodes() {
|
|
62
|
+
const nodes = this.element.querySelectorAll(this._focusableElements);
|
|
63
|
+
return Array(...nodes);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
BbFocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFocusTrap, deps: [{ token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
67
|
+
BbFocusTrap.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: BbFocusTrap, selector: "[bbFocusTrap]", host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFocusTrap, decorators: [{
|
|
69
|
+
type: Directive,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: '[bbFocusTrap]'
|
|
72
|
+
}]
|
|
73
|
+
}], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.ElementRef }]; }, propDecorators: { onKeydown: [{
|
|
74
|
+
type: HostListener,
|
|
75
|
+
args: ['keydown', ['$event']]
|
|
76
|
+
}] } });
|
|
77
|
+
//# sourceMappingURL=data:application/json;base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ICAgIH1cblxuICAgIHByaXZhdGUgZ2V0IGVsZW1lbnQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQ7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBnZXRGb2N1c2FibGVOb2RlcygpIHtcbiAgICAgICAgY29uc3Qgbm9kZXMgPSB0aGlzLmVsZW1lbnQucXVlcnlTZWxlY3RvckFsbCh0aGlzLl9mb2N1c2FibGVFbGVtZW50cyk7XG4gICAgICAgIHJldHVybiBBcnJheSguLi5ub2Rlcyk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmb2N1cyA9IChlbGVtZW50OiBIVE1MRWxlbWVudCkgPT4ge1xuICAgICAgICByZXR1cm4gZWxlbWVudCAmJiBlbGVtZW50LmZvY3VzICYmIGVsZW1lbnQuZm9jdXMoKTtcbiAgICB9O1xuXG4gICAgcHJpdmF0ZSBpc1RhYkV2ZW50ID0gKGV2ZW50OiBLZXlib2FyZEV2ZW50KSA9PiB7XG4gICAgICAgIHJldHVybiBldmVudC5rZXkgPT09ICdUYWInIHx8IGV2ZW50LmtleUNvZGUgPT09IDk7XG4gICAgfTtcblxufVxuIl19
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@bravobit/bb-foundation";
|
|
4
|
-
export class BbFocus {
|
|
5
|
-
constructor(_zone, _platform, _elementRef) {
|
|
6
|
-
this._zone = _zone;
|
|
7
|
-
this._platform = _platform;
|
|
8
|
-
this._elementRef = _elementRef;
|
|
9
|
-
}
|
|
10
|
-
get nativeElement() {
|
|
11
|
-
return this._elementRef.nativeElement;
|
|
12
|
-
}
|
|
13
|
-
ngAfterViewInit() {
|
|
14
|
-
// Run the method outside the Angular zone.
|
|
15
|
-
this._zone.runOutsideAngular(() => this.focus());
|
|
16
|
-
}
|
|
17
|
-
focus() {
|
|
18
|
-
// Check if set timeout exists and the user is
|
|
19
|
-
// using the site on desktop devices.
|
|
20
|
-
if (!this._platform.isDesktop || !setTimeout) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
// Check if the element and the focus method exist, if so focus the element.
|
|
24
|
-
if (!this.nativeElement || !this.nativeElement.focus) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
// Execute the focus method in a timeout.
|
|
28
|
-
setTimeout(() => this.nativeElement.focus(), 0);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
32
|
-
BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
34
|
-
type: Directive,
|
|
35
|
-
args: [{
|
|
36
|
-
selector: '[bbFocus]'
|
|
37
|
-
}]
|
|
38
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: i0.ElementRef }]; } });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@bravobit/bb-foundation";
|
|
4
|
+
export class BbFocus {
|
|
5
|
+
constructor(_zone, _platform, _elementRef) {
|
|
6
|
+
this._zone = _zone;
|
|
7
|
+
this._platform = _platform;
|
|
8
|
+
this._elementRef = _elementRef;
|
|
9
|
+
}
|
|
10
|
+
get nativeElement() {
|
|
11
|
+
return this._elementRef.nativeElement;
|
|
12
|
+
}
|
|
13
|
+
ngAfterViewInit() {
|
|
14
|
+
// Run the method outside the Angular zone.
|
|
15
|
+
this._zone.runOutsideAngular(() => this.focus());
|
|
16
|
+
}
|
|
17
|
+
focus() {
|
|
18
|
+
// Check if set timeout exists and the user is
|
|
19
|
+
// using the site on desktop devices.
|
|
20
|
+
if (!this._platform.isDesktop || !setTimeout) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
// Check if the element and the focus method exist, if so focus the element.
|
|
24
|
+
if (!this.nativeElement || !this.nativeElement.focus) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// Execute the focus method in a timeout.
|
|
28
|
+
setTimeout(() => this.nativeElement.focus(), 0);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
BbFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFocus, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
32
|
+
BbFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: BbFocus, selector: "[bbFocus]", ngImport: i0 });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFocus, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: '[bbFocus]'
|
|
37
|
+
}]
|
|
38
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: i0.ElementRef }]; } });
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9jdXMuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYmItZm91bmRhdGlvbi9lbGVtZW50cy9zcmMvbGliL2RpcmVjdGl2ZXMvZm9jdXMuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBZ0IsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQzs7O0FBTTNFLE1BQU0sT0FBTyxPQUFPO0lB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vZCBleGlzdCwgaWYgc28gZm9jdXMgdGhlIGVsZW1lbnQuXG4gICAgICAgIGlmICghdGhpcy5uYXRpdmVFbGVtZW50IHx8ICF0aGlzLm5hdGl2ZUVsZW1lbnQuZm9jdXMpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEV4ZWN1dGUgdGhlIGZvY3VzIG1ldGhvZCBpbiBhIHRpbWVvdXQuXG4gICAgICAgIHNldFRpbWVvdXQoKCkgPT4gdGhpcy5uYXRpdmVFbGVtZW50LmZvY3VzKCksIDApO1xuICAgIH1cblxufVxuIl19
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { distinctUntilChanged, map, shareReplay, startWith } from 'rxjs/operators';
|
|
2
|
-
import { Directive, Optional, Self } from '@angular/core';
|
|
3
|
-
import { EMPTY, fromEvent, merge } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/forms";
|
|
6
|
-
export class BbFormSubmit {
|
|
7
|
-
constructor(_host, _formDirective) {
|
|
8
|
-
this._host = _host;
|
|
9
|
-
this._formDirective = _formDirective;
|
|
10
|
-
}
|
|
11
|
-
ngOnInit() {
|
|
12
|
-
// Submit changes.
|
|
13
|
-
const regularSubmitChanges$ = fromEvent(this.nativeElement, 'submit').pipe(map(() => true));
|
|
14
|
-
// Reactive form submit changes.
|
|
15
|
-
const reactiveSubmitChanges$ = this.reactiveSubmitChanges();
|
|
16
|
-
// Reset changes.
|
|
17
|
-
const resetChanges$ = fromEvent(this.nativeElement, 'reset').pipe(map(() => false));
|
|
18
|
-
// Listen to the submit status.
|
|
19
|
-
this.submitStatus$ = merge(regularSubmitChanges$, reactiveSubmitChanges$, resetChanges$).pipe(startWith(false), distinctUntilChanged(), shareReplay(1));
|
|
20
|
-
}
|
|
21
|
-
submit() {
|
|
22
|
-
this._formDirective?.ngSubmit?.emit();
|
|
23
|
-
}
|
|
24
|
-
reset() {
|
|
25
|
-
return this.nativeElement?.reset();
|
|
26
|
-
}
|
|
27
|
-
get nativeElement() {
|
|
28
|
-
return this._host?.nativeElement;
|
|
29
|
-
}
|
|
30
|
-
reactiveSubmitChanges() {
|
|
31
|
-
if (!this._formDirective) {
|
|
32
|
-
return EMPTY;
|
|
33
|
-
}
|
|
34
|
-
return this._formDirective.ngSubmit.pipe(map(() => true));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
BbFormSubmit.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.
|
|
38
|
-
BbFormSubmit.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.
|
|
40
|
-
type: Directive,
|
|
41
|
-
args: [{
|
|
42
|
-
selector: 'form',
|
|
43
|
-
exportAs: 'bbForm'
|
|
44
|
-
}]
|
|
45
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective, decorators: [{
|
|
46
|
-
type: Optional
|
|
47
|
-
}, {
|
|
48
|
-
type: Self
|
|
49
|
-
}] }]; } });
|
|
50
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { distinctUntilChanged, map, shareReplay, startWith } from 'rxjs/operators';
|
|
2
|
+
import { Directive, Optional, Self } from '@angular/core';
|
|
3
|
+
import { EMPTY, fromEvent, merge } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
export class BbFormSubmit {
|
|
7
|
+
constructor(_host, _formDirective) {
|
|
8
|
+
this._host = _host;
|
|
9
|
+
this._formDirective = _formDirective;
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
// Submit changes.
|
|
13
|
+
const regularSubmitChanges$ = fromEvent(this.nativeElement, 'submit').pipe(map(() => true));
|
|
14
|
+
// Reactive form submit changes.
|
|
15
|
+
const reactiveSubmitChanges$ = this.reactiveSubmitChanges();
|
|
16
|
+
// Reset changes.
|
|
17
|
+
const resetChanges$ = fromEvent(this.nativeElement, 'reset').pipe(map(() => false));
|
|
18
|
+
// Listen to the submit status.
|
|
19
|
+
this.submitStatus$ = merge(regularSubmitChanges$, reactiveSubmitChanges$, resetChanges$).pipe(startWith(false), distinctUntilChanged(), shareReplay(1));
|
|
20
|
+
}
|
|
21
|
+
submit() {
|
|
22
|
+
this._formDirective?.ngSubmit?.emit();
|
|
23
|
+
}
|
|
24
|
+
reset() {
|
|
25
|
+
return this.nativeElement?.reset();
|
|
26
|
+
}
|
|
27
|
+
get nativeElement() {
|
|
28
|
+
return this._host?.nativeElement;
|
|
29
|
+
}
|
|
30
|
+
reactiveSubmitChanges() {
|
|
31
|
+
if (!this._formDirective) {
|
|
32
|
+
return EMPTY;
|
|
33
|
+
}
|
|
34
|
+
return this._formDirective.ngSubmit.pipe(map(() => true));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
BbFormSubmit.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFormSubmit, deps: [{ token: i0.ElementRef }, { token: i1.FormGroupDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
38
|
+
BbFormSubmit.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: BbFormSubmit, selector: "form", exportAs: ["bbForm"], ngImport: i0 });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: BbFormSubmit, decorators: [{
|
|
40
|
+
type: Directive,
|
|
41
|
+
args: [{
|
|
42
|
+
selector: 'form',
|
|
43
|
+
exportAs: 'bbForm'
|
|
44
|
+
}]
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FormGroupDirective, decorators: [{
|
|
46
|
+
type: Optional
|
|
47
|
+
}, {
|
|
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