ngx-bootstrap 8.0.0-RC.8 → 9.0.0-RC.1
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/accordion/accordion-group.component.d.ts +1 -1
- package/accordion/accordion.component.d.ts +1 -1
- package/accordion/esm2020/accordion-group.component.mjs +3 -3
- package/accordion/esm2020/accordion.component.mjs +3 -3
- package/accordion/esm2020/accordion.config.mjs +3 -3
- package/accordion/esm2020/accordion.module.mjs +5 -5
- package/accordion/fesm2015/ngx-bootstrap-accordion.mjs +13 -13
- package/accordion/fesm2015/ngx-bootstrap-accordion.mjs.map +1 -1
- package/accordion/fesm2020/ngx-bootstrap-accordion.mjs +13 -13
- package/accordion/fesm2020/ngx-bootstrap-accordion.mjs.map +1 -1
- package/accordion/package.json +7 -9
- package/alert/alert.component.d.ts +1 -1
- package/alert/esm2020/alert.component.mjs +3 -3
- package/alert/esm2020/alert.config.mjs +3 -3
- package/alert/esm2020/alert.module.mjs +6 -7
- package/alert/fesm2015/ngx-bootstrap-alert.mjs +11 -12
- package/alert/fesm2015/ngx-bootstrap-alert.mjs.map +1 -1
- package/alert/fesm2020/ngx-bootstrap-alert.mjs +11 -12
- package/alert/fesm2020/ngx-bootstrap-alert.mjs.map +1 -1
- package/alert/package.json +6 -6
- package/buttons/button-checkbox.directive.d.ts +1 -1
- package/buttons/button-radio-group.directive.d.ts +1 -1
- package/buttons/button-radio.directive.d.ts +1 -1
- package/buttons/esm2020/button-checkbox.directive.mjs +3 -3
- package/buttons/esm2020/button-radio-group.directive.mjs +3 -3
- package/buttons/esm2020/button-radio.directive.mjs +3 -3
- package/buttons/esm2020/buttons.module.mjs +4 -4
- package/buttons/fesm2015/ngx-bootstrap-buttons.mjs +13 -13
- package/buttons/fesm2015/ngx-bootstrap-buttons.mjs.map +1 -1
- package/buttons/fesm2020/ngx-bootstrap-buttons.mjs +13 -13
- package/buttons/fesm2020/ngx-bootstrap-buttons.mjs.map +1 -1
- package/buttons/package.json +5 -5
- package/carousel/carousel.component.d.ts +3 -2
- package/carousel/esm2020/carousel.component.mjs +13 -8
- package/carousel/esm2020/carousel.config.mjs +3 -3
- package/carousel/esm2020/carousel.module.mjs +5 -5
- package/carousel/esm2020/slide.component.mjs +7 -34
- package/carousel/fesm2015/ngx-bootstrap-carousel.mjs +28 -49
- package/carousel/fesm2015/ngx-bootstrap-carousel.mjs.map +1 -1
- package/carousel/fesm2020/ngx-bootstrap-carousel.mjs +26 -49
- package/carousel/fesm2020/ngx-bootstrap-carousel.mjs.map +1 -1
- package/carousel/package.json +6 -6
- package/carousel/slide.component.d.ts +1 -1
- package/chronos/fesm2015/ngx-bootstrap-chronos.mjs.map +1 -1
- package/chronos/fesm2020/ngx-bootstrap-chronos.mjs.map +1 -1
- package/chronos/package.json +3 -3
- package/collapse/collapse.directive.d.ts +1 -1
- package/collapse/esm2020/collapse.directive.mjs +5 -5
- package/collapse/esm2020/collapse.module.mjs +4 -4
- package/collapse/fesm2015/ngx-bootstrap-collapse.mjs +8 -8
- package/collapse/fesm2015/ngx-bootstrap-collapse.mjs.map +1 -1
- package/collapse/fesm2020/ngx-bootstrap-collapse.mjs +8 -8
- package/collapse/fesm2020/ngx-bootstrap-collapse.mjs.map +1 -1
- package/collapse/package.json +6 -6
- package/component-loader/component-loader.class.d.ts +2 -1
- package/component-loader/component-loader.factory.d.ts +2 -1
- package/component-loader/esm2020/component-loader.class.mjs +8 -5
- package/component-loader/esm2020/component-loader.factory.mjs +13 -8
- package/component-loader/fesm2015/ngx-bootstrap-component-loader.mjs +21 -11
- package/component-loader/fesm2015/ngx-bootstrap-component-loader.mjs.map +1 -1
- package/component-loader/fesm2020/ngx-bootstrap-component-loader.mjs +19 -11
- package/component-loader/fesm2020/ngx-bootstrap-component-loader.mjs.map +1 -1
- package/component-loader/package.json +5 -9
- package/datepicker/bs-datepicker-inline.component.d.ts +3 -1
- package/datepicker/bs-datepicker-input.directive.d.ts +1 -1
- package/datepicker/bs-datepicker.component.d.ts +3 -1
- package/datepicker/bs-datepicker.config.d.ts +4 -0
- package/datepicker/bs-daterangepicker-inline.component.d.ts +3 -1
- package/datepicker/bs-daterangepicker-input.directive.d.ts +1 -1
- package/datepicker/bs-daterangepicker.component.d.ts +3 -1
- package/datepicker/esm2020/bs-datepicker-inline.component.mjs +16 -6
- package/datepicker/esm2020/bs-datepicker-inline.config.mjs +3 -3
- package/datepicker/esm2020/bs-datepicker-input.directive.mjs +3 -3
- package/datepicker/esm2020/bs-datepicker.component.mjs +27 -17
- package/datepicker/esm2020/bs-datepicker.config.mjs +8 -4
- package/datepicker/esm2020/bs-datepicker.module.mjs +6 -13
- package/datepicker/esm2020/bs-daterangepicker-inline.component.mjs +30 -18
- package/datepicker/esm2020/bs-daterangepicker-inline.config.mjs +3 -3
- package/datepicker/esm2020/bs-daterangepicker-input.directive.mjs +3 -3
- package/datepicker/esm2020/bs-daterangepicker.component.mjs +14 -4
- package/datepicker/esm2020/bs-daterangepicker.config.mjs +3 -3
- package/datepicker/esm2020/bs-locale.service.mjs +3 -3
- package/datepicker/esm2020/reducer/bs-datepicker.actions.mjs +3 -3
- package/datepicker/esm2020/reducer/bs-datepicker.effects.mjs +3 -3
- package/datepicker/esm2020/reducer/bs-datepicker.reducer.mjs +2 -2
- package/datepicker/esm2020/reducer/bs-datepicker.store.mjs +3 -3
- package/datepicker/esm2020/themes/bs/bs-calendar-layout.component.mjs +7 -7
- package/datepicker/esm2020/themes/bs/bs-current-date-view.component.mjs +3 -3
- package/datepicker/esm2020/themes/bs/bs-custom-dates-view.component.mjs +4 -4
- package/datepicker/esm2020/themes/bs/bs-datepicker-container.component.mjs +29 -12
- package/datepicker/esm2020/themes/bs/bs-datepicker-day-decorator.directive.mjs +3 -3
- package/datepicker/esm2020/themes/bs/bs-datepicker-inline-container.component.mjs +9 -9
- package/datepicker/esm2020/themes/bs/bs-datepicker-navigation-view.component.mjs +4 -4
- package/datepicker/esm2020/themes/bs/bs-daterangepicker-container.component.mjs +31 -11
- package/datepicker/esm2020/themes/bs/bs-daterangepicker-inline-container.component.mjs +9 -9
- package/datepicker/esm2020/themes/bs/bs-days-calendar-view.component.mjs +9 -9
- package/datepicker/esm2020/themes/bs/bs-months-calendar-view.component.mjs +7 -7
- package/datepicker/esm2020/themes/bs/bs-timepicker-view.component.mjs +3 -3
- package/datepicker/esm2020/themes/bs/bs-years-calendar-view.component.mjs +7 -7
- package/datepicker/esm2020/utils/copy-time-utils.mjs +4 -1
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.mjs +303 -218
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.mjs.map +1 -1
- package/datepicker/fesm2020/ngx-bootstrap-datepicker.mjs +298 -218
- package/datepicker/fesm2020/ngx-bootstrap-datepicker.mjs.map +1 -1
- package/datepicker/package.json +11 -17
- package/datepicker/themes/bs/bs-calendar-layout.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-current-date-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-datepicker-container.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.d.ts +1 -1
- package/datepicker/themes/bs/bs-datepicker-inline-container.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-datepicker-navigation-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-daterangepicker-container.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-daterangepicker-inline-container.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-days-calendar-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-months-calendar-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-timepicker-view.component.d.ts +1 -1
- package/datepicker/themes/bs/bs-years-calendar-view.component.d.ts +1 -1
- package/dropdown/bs-dropdown-container.component.d.ts +1 -1
- package/dropdown/bs-dropdown-menu.directive.d.ts +1 -1
- package/dropdown/bs-dropdown-toggle.directive.d.ts +1 -1
- package/dropdown/bs-dropdown.directive.d.ts +1 -1
- package/dropdown/esm2020/bs-dropdown-container.component.mjs +4 -4
- package/dropdown/esm2020/bs-dropdown-menu.directive.mjs +3 -3
- package/dropdown/esm2020/bs-dropdown-toggle.directive.mjs +3 -3
- package/dropdown/esm2020/bs-dropdown.config.mjs +3 -3
- package/dropdown/esm2020/bs-dropdown.directive.mjs +3 -3
- package/dropdown/esm2020/bs-dropdown.module.mjs +6 -7
- package/dropdown/esm2020/bs-dropdown.state.mjs +3 -3
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.mjs +24 -25
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.mjs.map +1 -1
- package/dropdown/fesm2020/ngx-bootstrap-dropdown.mjs +24 -25
- package/dropdown/fesm2020/ngx-bootstrap-dropdown.mjs.map +1 -1
- package/dropdown/package.json +9 -12
- package/fesm2015/ngx-bootstrap.mjs.map +1 -1
- package/fesm2020/ngx-bootstrap.mjs.map +1 -1
- package/focus-trap/esm2020/focus-trap-manager.mjs +3 -3
- package/focus-trap/esm2020/focus-trap.mjs +6 -6
- package/focus-trap/esm2020/focus-trap.module.mjs +5 -5
- package/focus-trap/esm2020/interactivity-checker.mjs +3 -3
- package/focus-trap/esm2020/platform.mjs +3 -3
- package/focus-trap/fesm2015/ngx-bootstrap-focus-trap.mjs +19 -19
- package/focus-trap/fesm2015/ngx-bootstrap-focus-trap.mjs.map +1 -1
- package/focus-trap/fesm2020/ngx-bootstrap-focus-trap.mjs +19 -19
- package/focus-trap/fesm2020/ngx-bootstrap-focus-trap.mjs.map +1 -1
- package/focus-trap/focus-trap.d.ts +1 -1
- package/focus-trap/package.json +6 -6
- package/locale/fesm2015/ngx-bootstrap-locale.mjs.map +1 -1
- package/locale/fesm2020/ngx-bootstrap-locale.mjs.map +1 -1
- package/locale/package.json +4 -4
- package/mini-ngrx/fesm2015/ngx-bootstrap-mini-ngrx.mjs.map +1 -1
- package/mini-ngrx/fesm2020/ngx-bootstrap-mini-ngrx.mjs.map +1 -1
- package/mini-ngrx/package.json +4 -4
- package/modal/esm2020/bs-modal-ref.service.mjs +3 -3
- package/modal/esm2020/bs-modal.service.mjs +3 -3
- package/modal/esm2020/modal-backdrop.component.mjs +3 -3
- package/modal/esm2020/modal-container.component.mjs +4 -4
- package/modal/esm2020/modal-options.class.mjs +3 -3
- package/modal/esm2020/modal.directive.mjs +3 -3
- package/modal/esm2020/modal.module.mjs +6 -7
- package/modal/fesm2015/ngx-bootstrap-modal.mjs +24 -25
- package/modal/fesm2015/ngx-bootstrap-modal.mjs.map +1 -1
- package/modal/fesm2020/ngx-bootstrap-modal.mjs +24 -25
- package/modal/fesm2020/ngx-bootstrap-modal.mjs.map +1 -1
- package/modal/modal-backdrop.component.d.ts +1 -1
- package/modal/modal-container.component.d.ts +1 -1
- package/modal/modal.directive.d.ts +1 -1
- package/modal/package.json +6 -11
- package/package.json +6 -3
- package/pagination/esm2020/pager.component.mjs +3 -3
- package/pagination/esm2020/pagination.component.mjs +3 -3
- package/pagination/esm2020/pagination.config.mjs +3 -3
- package/pagination/esm2020/pagination.module.mjs +5 -5
- package/pagination/fesm2015/ngx-bootstrap-pagination.mjs +13 -13
- package/pagination/fesm2015/ngx-bootstrap-pagination.mjs.map +1 -1
- package/pagination/fesm2020/ngx-bootstrap-pagination.mjs +13 -13
- package/pagination/fesm2020/ngx-bootstrap-pagination.mjs.map +1 -1
- package/pagination/package.json +6 -6
- package/pagination/pager.component.d.ts +1 -1
- package/pagination/pagination.component.d.ts +1 -1
- package/popover/esm2020/popover-container.component.mjs +5 -26
- package/popover/esm2020/popover.config.mjs +4 -4
- package/popover/esm2020/popover.directive.mjs +8 -5
- package/popover/esm2020/popover.module.mjs +6 -7
- package/popover/fesm2015/ngx-bootstrap-popover.mjs +19 -38
- package/popover/fesm2015/ngx-bootstrap-popover.mjs.map +1 -1
- package/popover/fesm2020/ngx-bootstrap-popover.mjs +19 -38
- package/popover/fesm2020/ngx-bootstrap-popover.mjs.map +1 -1
- package/popover/package.json +7 -10
- package/popover/popover-container.component.d.ts +1 -1
- package/popover/popover.config.d.ts +1 -0
- package/popover/popover.directive.d.ts +2 -1
- package/positioning/esm2020/positioning.service.mjs +3 -3
- package/positioning/fesm2015/ngx-bootstrap-positioning.mjs +3 -3
- package/positioning/fesm2015/ngx-bootstrap-positioning.mjs.map +1 -1
- package/positioning/fesm2020/ngx-bootstrap-positioning.mjs +3 -3
- package/positioning/fesm2020/ngx-bootstrap-positioning.mjs.map +1 -1
- package/positioning/package.json +8 -8
- package/progressbar/bar.component.d.ts +1 -1
- package/progressbar/esm2020/bar.component.mjs +5 -5
- package/progressbar/esm2020/progressbar.component.mjs +7 -11
- package/progressbar/esm2020/progressbar.config.mjs +3 -3
- package/progressbar/esm2020/progressbar.module.mjs +5 -5
- package/progressbar/fesm2015/ngx-bootstrap-progressbar.mjs +18 -22
- package/progressbar/fesm2015/ngx-bootstrap-progressbar.mjs.map +1 -1
- package/progressbar/fesm2020/ngx-bootstrap-progressbar.mjs +16 -20
- package/progressbar/fesm2020/ngx-bootstrap-progressbar.mjs.map +1 -1
- package/progressbar/package.json +6 -6
- package/progressbar/progressbar.component.d.ts +1 -1
- package/rating/esm2020/rating.component.mjs +3 -3
- package/rating/esm2020/rating.config.mjs +3 -3
- package/rating/esm2020/rating.module.mjs +5 -5
- package/rating/fesm2015/ngx-bootstrap-rating.mjs +10 -10
- package/rating/fesm2015/ngx-bootstrap-rating.mjs.map +1 -1
- package/rating/fesm2020/ngx-bootstrap-rating.mjs +10 -10
- package/rating/fesm2020/ngx-bootstrap-rating.mjs.map +1 -1
- package/rating/package.json +6 -6
- package/rating/rating.component.d.ts +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/package.json +6 -10
- package/schematics/{README.md → src/schematics/README.md} +0 -0
- package/schematics/utils/current_dependency_versions.json +1 -1
- package/sortable/esm2020/draggable-item.service.mjs +3 -3
- package/sortable/esm2020/sortable.component.mjs +4 -4
- package/sortable/esm2020/sortable.module.mjs +5 -5
- package/sortable/fesm2015/ngx-bootstrap-sortable.mjs +11 -11
- package/sortable/fesm2015/ngx-bootstrap-sortable.mjs.map +1 -1
- package/sortable/fesm2020/ngx-bootstrap-sortable.mjs +11 -11
- package/sortable/fesm2020/ngx-bootstrap-sortable.mjs.map +1 -1
- package/sortable/package.json +8 -8
- package/sortable/sortable.component.d.ts +1 -1
- package/tabs/esm2020/ng-transclude.directive.mjs +3 -3
- package/tabs/esm2020/tab-heading.directive.mjs +3 -3
- package/tabs/esm2020/tab.directive.mjs +3 -3
- package/tabs/esm2020/tabs.module.mjs +5 -5
- package/tabs/esm2020/tabset.component.mjs +3 -3
- package/tabs/esm2020/tabset.config.mjs +3 -3
- package/tabs/fesm2015/ngx-bootstrap-tabs.mjs +19 -19
- package/tabs/fesm2015/ngx-bootstrap-tabs.mjs.map +1 -1
- package/tabs/fesm2020/ngx-bootstrap-tabs.mjs +19 -19
- package/tabs/fesm2020/ngx-bootstrap-tabs.mjs.map +1 -1
- package/tabs/ng-transclude.directive.d.ts +1 -1
- package/tabs/package.json +5 -5
- package/tabs/tab-heading.directive.d.ts +1 -1
- package/tabs/tab.directive.d.ts +1 -1
- package/tabs/tabset.component.d.ts +1 -1
- package/timepicker/esm2020/reducer/timepicker.actions.mjs +3 -3
- package/timepicker/esm2020/reducer/timepicker.store.mjs +3 -3
- package/timepicker/esm2020/timepicker.component.mjs +5 -31
- package/timepicker/esm2020/timepicker.config.mjs +3 -3
- package/timepicker/esm2020/timepicker.module.mjs +5 -5
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.mjs +17 -43
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.mjs.map +1 -1
- package/timepicker/fesm2020/ngx-bootstrap-timepicker.mjs +17 -43
- package/timepicker/fesm2020/ngx-bootstrap-timepicker.mjs.map +1 -1
- package/timepicker/package.json +8 -9
- package/timepicker/timepicker.component.d.ts +1 -1
- package/tooltip/esm2020/tooltip-container.component.mjs +7 -33
- package/tooltip/esm2020/tooltip.config.mjs +3 -3
- package/tooltip/esm2020/tooltip.directive.mjs +3 -3
- package/tooltip/esm2020/tooltip.module.mjs +6 -7
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.mjs +17 -44
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.mjs.map +1 -1
- package/tooltip/fesm2020/ngx-bootstrap-tooltip.mjs +17 -44
- package/tooltip/fesm2020/ngx-bootstrap-tooltip.mjs.map +1 -1
- package/tooltip/package.json +8 -11
- package/tooltip/tooltip-container.component.d.ts +1 -1
- package/tooltip/tooltip.directive.d.ts +1 -1
- package/typeahead/esm2020/typeahead-container.component.mjs +5 -16
- package/typeahead/esm2020/typeahead.config.mjs +3 -3
- package/typeahead/esm2020/typeahead.directive.mjs +3 -3
- package/typeahead/esm2020/typeahead.module.mjs +6 -7
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.mjs +15 -27
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.mjs.map +1 -1
- package/typeahead/fesm2020/ngx-bootstrap-typeahead.mjs +15 -27
- package/typeahead/fesm2020/ngx-bootstrap-typeahead.mjs.map +1 -1
- package/typeahead/package.json +10 -13
- package/typeahead/typeahead-container.component.d.ts +1 -1
- package/typeahead/typeahead.directive.d.ts +1 -1
- package/utils/esm2020/theme-provider.mjs +9 -7
- package/utils/fesm2015/ngx-bootstrap-utils.mjs +8 -6
- package/utils/fesm2015/ngx-bootstrap-utils.mjs.map +1 -1
- package/utils/fesm2020/ngx-bootstrap-utils.mjs +8 -6
- package/utils/fesm2020/ngx-bootstrap-utils.mjs.map +1 -1
- package/utils/package.json +4 -4
- package/accordion/ngx-bootstrap-accordion.d.ts +0 -5
- package/alert/ngx-bootstrap-alert.d.ts +0 -5
- package/buttons/ngx-bootstrap-buttons.d.ts +0 -5
- package/carousel/ngx-bootstrap-carousel.d.ts +0 -5
- package/chronos/ngx-bootstrap-chronos.d.ts +0 -5
- package/collapse/ngx-bootstrap-collapse.d.ts +0 -5
- package/component-loader/ngx-bootstrap-component-loader.d.ts +0 -5
- package/datepicker/ngx-bootstrap-datepicker.d.ts +0 -5
- package/dropdown/ngx-bootstrap-dropdown.d.ts +0 -5
- package/focus-trap/ngx-bootstrap-focus-trap.d.ts +0 -5
- package/locale/ngx-bootstrap-locale.d.ts +0 -5
- package/mini-ngrx/ngx-bootstrap-mini-ngrx.d.ts +0 -5
- package/modal/ngx-bootstrap-modal.d.ts +0 -5
- package/ngx-bootstrap.d.ts +0 -5
- package/pagination/ngx-bootstrap-pagination.d.ts +0 -5
- package/popover/ngx-bootstrap-popover.d.ts +0 -5
- package/positioning/ngx-bootstrap-positioning.d.ts +0 -5
- package/progressbar/ngx-bootstrap-progressbar.d.ts +0 -5
- package/rating/ngx-bootstrap-rating.d.ts +0 -5
- package/sortable/ngx-bootstrap-sortable.d.ts +0 -5
- package/tabs/ngx-bootstrap-tabs.d.ts +0 -5
- package/timepicker/ngx-bootstrap-timepicker.d.ts +0 -5
- package/tooltip/ngx-bootstrap-tooltip.d.ts +0 -5
- package/typeahead/ngx-bootstrap-typeahead.d.ts +0 -5
- package/utils/ngx-bootstrap-utils.d.ts +0 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable,
|
2
|
+
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, Directive, forwardRef, Host, NgModule } from '@angular/core';
|
3
3
|
import { filter, map, take, takeUntil, distinctUntilChanged } from 'rxjs/operators';
|
4
4
|
import { isFirstDayOfWeek, getDay, shiftDate, isBefore, endOf, isAfter, startOf, isArray, isSame, getFirstDayOfMonth, formatDate, getLocale, isSameMonth, isSameDay, isDisabledDay, isSameYear, isDateValid, setFullDate, getMonth, getFullYear, isDate, parseDate, utcAsLocal } from 'ngx-bootstrap/chronos';
|
5
5
|
import * as i5 from 'ngx-bootstrap/positioning';
|
@@ -9,9 +9,9 @@ import { TimepickerActions, TimepickerModule } from 'ngx-bootstrap/timepicker';
|
|
9
9
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
10
10
|
import { Subscription, BehaviorSubject, combineLatest, Subject } from 'rxjs';
|
11
11
|
import { MiniStore, MiniState } from 'ngx-bootstrap/mini-ngrx';
|
12
|
-
import * as
|
12
|
+
import * as i6 from '@angular/common';
|
13
13
|
import { CommonModule } from '@angular/common';
|
14
|
-
import * as
|
14
|
+
import * as i3 from 'ngx-bootstrap/tooltip';
|
15
15
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
16
16
|
import * as i2 from 'ngx-bootstrap/component-loader';
|
17
17
|
import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
|
@@ -93,11 +93,15 @@ class BsDatepickerConfig {
|
|
93
93
|
* Shows timepicker under datepicker
|
94
94
|
*/
|
95
95
|
this.withTimepicker = false;
|
96
|
+
/**
|
97
|
+
* Set allowed positions of container.
|
98
|
+
*/
|
99
|
+
this.allowedPositions = ['top', 'bottom'];
|
96
100
|
}
|
97
101
|
}
|
98
|
-
BsDatepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
99
|
-
BsDatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
102
|
+
BsDatepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
103
|
+
BsDatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerConfig, providedIn: 'root' });
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerConfig, decorators: [{
|
101
105
|
type: Injectable,
|
102
106
|
args: [{
|
103
107
|
providedIn: 'root'
|
@@ -328,9 +332,9 @@ BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS = '[datepicker] set date tooltip text
|
|
328
332
|
BsDatepickerActions.SET_LOCALE = '[datepicker] set datepicker locale';
|
329
333
|
BsDatepickerActions.SELECT_TIME = '[datepicker] select time';
|
330
334
|
BsDatepickerActions.SELECT_RANGE = '[daterangepicker] select dates range';
|
331
|
-
BsDatepickerActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
332
|
-
BsDatepickerActions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
335
|
+
BsDatepickerActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerActions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
336
|
+
BsDatepickerActions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerActions, providedIn: 'platform' });
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerActions, decorators: [{
|
334
338
|
type: Injectable,
|
335
339
|
args: [{ providedIn: 'platform' }]
|
336
340
|
}] });
|
@@ -357,9 +361,9 @@ class BsLocaleService {
|
|
357
361
|
this._locale.next(locale);
|
358
362
|
}
|
359
363
|
}
|
360
|
-
BsLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
361
|
-
BsLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
364
|
+
BsLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
365
|
+
BsLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsLocaleService, providedIn: 'platform' });
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsLocaleService, decorators: [{
|
363
367
|
type: Injectable,
|
364
368
|
args: [{ providedIn: 'platform' }]
|
365
369
|
}] });
|
@@ -531,9 +535,9 @@ class BsDatepickerEffects {
|
|
531
535
|
}
|
532
536
|
}
|
533
537
|
}
|
534
|
-
BsDatepickerEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
535
|
-
BsDatepickerEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
538
|
+
BsDatepickerEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerEffects, deps: [{ token: BsDatepickerActions }, { token: BsLocaleService }], target: i0.ɵɵFactoryTarget.Injectable });
|
539
|
+
BsDatepickerEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerEffects, providedIn: 'platform' });
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerEffects, decorators: [{
|
537
541
|
type: Injectable,
|
538
542
|
args: [{ providedIn: 'platform' }]
|
539
543
|
}], ctorParameters: function () { return [{ type: BsDatepickerActions }, { type: BsLocaleService }]; } });
|
@@ -976,6 +980,9 @@ function flagYearsCalendar(yearsCalendar, options) {
|
|
976
980
|
}
|
977
981
|
|
978
982
|
function copyTime(sourceDate, time) {
|
983
|
+
if (!sourceDate || !isNaN(sourceDate.getTime())) {
|
984
|
+
return;
|
985
|
+
}
|
979
986
|
sourceDate.setHours(time.getHours());
|
980
987
|
sourceDate.setMinutes(time.getMinutes());
|
981
988
|
sourceDate.setSeconds(time.getSeconds());
|
@@ -1090,7 +1097,7 @@ function bsDatepickerReducer(state = initialDatepickerState, action) {
|
|
1090
1097
|
selectedRange: action.payload,
|
1091
1098
|
view: state.view
|
1092
1099
|
};
|
1093
|
-
newState.selectedRange
|
1100
|
+
newState.selectedRange?.forEach((dte, index) => {
|
1094
1101
|
if (Array.isArray(state.selectedTime)) {
|
1095
1102
|
const _time = state.selectedTime[index];
|
1096
1103
|
if (_time) {
|
@@ -1356,13 +1363,60 @@ class BsDatepickerStore extends MiniStore {
|
|
1356
1363
|
super(_dispatcher, bsDatepickerReducer, state);
|
1357
1364
|
}
|
1358
1365
|
}
|
1359
|
-
BsDatepickerStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1360
|
-
BsDatepickerStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
1361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1366
|
+
BsDatepickerStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1367
|
+
BsDatepickerStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerStore, providedIn: 'platform' });
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerStore, decorators: [{
|
1362
1369
|
type: Injectable,
|
1363
1370
|
args: [{ providedIn: 'platform' }]
|
1364
1371
|
}], ctorParameters: function () { return []; } });
|
1365
1372
|
|
1373
|
+
class BsCustomDatesViewComponent {
|
1374
|
+
constructor() {
|
1375
|
+
this.onSelect = new EventEmitter();
|
1376
|
+
}
|
1377
|
+
selectFromRanges(range) {
|
1378
|
+
this.onSelect.emit(range);
|
1379
|
+
}
|
1380
|
+
}
|
1381
|
+
BsCustomDatesViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCustomDatesViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1382
|
+
BsCustomDatesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: { ranges: "ranges", selectedRange: "selectedRange", customRangeLabel: "customRangeLabel" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: `
|
1383
|
+
<div class="bs-datepicker-predefined-btns">
|
1384
|
+
<button *ngFor="let range of ranges"
|
1385
|
+
type="button"
|
1386
|
+
class="btn"
|
1387
|
+
(click)="selectFromRanges(range)"
|
1388
|
+
[class.selected]="range.value === selectedRange">
|
1389
|
+
{{ range.label }}
|
1390
|
+
</button>
|
1391
|
+
</div>
|
1392
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCustomDatesViewComponent, decorators: [{
|
1394
|
+
type: Component,
|
1395
|
+
args: [{
|
1396
|
+
selector: 'bs-custom-date-view',
|
1397
|
+
template: `
|
1398
|
+
<div class="bs-datepicker-predefined-btns">
|
1399
|
+
<button *ngFor="let range of ranges"
|
1400
|
+
type="button"
|
1401
|
+
class="btn"
|
1402
|
+
(click)="selectFromRanges(range)"
|
1403
|
+
[class.selected]="range.value === selectedRange">
|
1404
|
+
{{ range.label }}
|
1405
|
+
</button>
|
1406
|
+
</div>
|
1407
|
+
`,
|
1408
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
1409
|
+
}]
|
1410
|
+
}], propDecorators: { ranges: [{
|
1411
|
+
type: Input
|
1412
|
+
}], selectedRange: [{
|
1413
|
+
type: Input
|
1414
|
+
}], customRangeLabel: [{
|
1415
|
+
type: Input
|
1416
|
+
}], onSelect: [{
|
1417
|
+
type: Output
|
1418
|
+
}] } });
|
1419
|
+
|
1366
1420
|
/** *************** */
|
1367
1421
|
// events
|
1368
1422
|
/** *************** */
|
@@ -1374,9 +1428,9 @@ var BsNavigationDirection;
|
|
1374
1428
|
|
1375
1429
|
class BsCurrentDateViewComponent {
|
1376
1430
|
}
|
1377
|
-
BsCurrentDateViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1378
|
-
BsCurrentDateViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1431
|
+
BsCurrentDateViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCurrentDateViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1432
|
+
BsCurrentDateViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsCurrentDateViewComponent, selector: "bs-current-date", inputs: { title: "title" }, ngImport: i0, template: `<div class="current-timedate"><span>{{ title }}</span></div>`, isInline: true });
|
1433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCurrentDateViewComponent, decorators: [{
|
1380
1434
|
type: Component,
|
1381
1435
|
args: [{
|
1382
1436
|
selector: 'bs-current-date',
|
@@ -1393,8 +1447,8 @@ class BsTimepickerViewComponent {
|
|
1393
1447
|
this.minutes = 0;
|
1394
1448
|
}
|
1395
1449
|
}
|
1396
|
-
BsTimepickerViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1397
|
-
BsTimepickerViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1450
|
+
BsTimepickerViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsTimepickerViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1451
|
+
BsTimepickerViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsTimepickerViewComponent, selector: "bs-timepicker", ngImport: i0, template: `
|
1398
1452
|
<div class="bs-timepicker-container">
|
1399
1453
|
<div class="bs-timepicker-controls">
|
1400
1454
|
<button class="bs-decrease" type="button">-</button>
|
@@ -1413,7 +1467,7 @@ BsTimepickerViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
1413
1467
|
</button>
|
1414
1468
|
</div>
|
1415
1469
|
`, isInline: true });
|
1416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsTimepickerViewComponent, decorators: [{
|
1417
1471
|
type: Component,
|
1418
1472
|
args: [{
|
1419
1473
|
selector: 'bs-timepicker',
|
@@ -1441,8 +1495,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
1441
1495
|
|
1442
1496
|
class BsCalendarLayoutComponent {
|
1443
1497
|
}
|
1444
|
-
BsCalendarLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1445
|
-
BsCalendarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1498
|
+
BsCalendarLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCalendarLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1499
|
+
BsCalendarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout", ngImport: i0, template: `
|
1446
1500
|
<!-- current date, will be added in nearest releases -->
|
1447
1501
|
<bs-current-date title="hey there" *ngIf="false"></bs-current-date>
|
1448
1502
|
|
@@ -1457,8 +1511,8 @@ BsCalendarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
1457
1511
|
|
1458
1512
|
<!--timepicker-->
|
1459
1513
|
<bs-timepicker *ngIf="false"></bs-timepicker>
|
1460
|
-
`, isInline: true,
|
1461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1514
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BsCurrentDateViewComponent, selector: "bs-current-date", inputs: ["title"] }, { kind: "component", type: BsTimepickerViewComponent, selector: "bs-timepicker" }] });
|
1515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsCalendarLayoutComponent, decorators: [{
|
1462
1516
|
type: Component,
|
1463
1517
|
args: [{
|
1464
1518
|
selector: 'bs-calendar-layout',
|
@@ -1481,6 +1535,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
1481
1535
|
}]
|
1482
1536
|
}] });
|
1483
1537
|
|
1538
|
+
class BsDatepickerDayDecoratorComponent {
|
1539
|
+
constructor(_config, _elRef, _renderer) {
|
1540
|
+
this._config = _config;
|
1541
|
+
this._elRef = _elRef;
|
1542
|
+
this._renderer = _renderer;
|
1543
|
+
this.day = { date: new Date(), label: '' };
|
1544
|
+
}
|
1545
|
+
ngOnInit() {
|
1546
|
+
if (this.day?.isToday && this._config && this._config.customTodayClass) {
|
1547
|
+
this._renderer.addClass(this._elRef.nativeElement, this._config.customTodayClass);
|
1548
|
+
}
|
1549
|
+
if (typeof this.day?.customClasses === 'string') {
|
1550
|
+
this.day?.customClasses.split(' ')
|
1551
|
+
.filter((className) => className)
|
1552
|
+
.forEach((className) => {
|
1553
|
+
this._renderer.addClass(this._elRef.nativeElement, className);
|
1554
|
+
});
|
1555
|
+
}
|
1556
|
+
}
|
1557
|
+
}
|
1558
|
+
BsDatepickerDayDecoratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerDayDecoratorComponent, deps: [{ token: BsDatepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
1559
|
+
BsDatepickerDayDecoratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerDayDecoratorComponent, selector: "[bsDatepickerDayDecorator]", inputs: { day: "day" }, host: { properties: { "class.disabled": "day.isDisabled", "class.is-highlighted": "day.isHovered", "class.is-other-month": "day.isOtherMonth", "class.is-active-other-month": "day.isOtherMonthHovered", "class.in-range": "day.isInRange", "class.select-start": "day.isSelectionStart", "class.select-end": "day.isSelectionEnd", "class.selected": "day.isSelected" } }, ngImport: i0, template: `{{ day && day.label || '' }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerDayDecoratorComponent, decorators: [{
|
1561
|
+
type: Component,
|
1562
|
+
args: [{
|
1563
|
+
selector: '[bsDatepickerDayDecorator]',
|
1564
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
1565
|
+
host: {
|
1566
|
+
'[class.disabled]': 'day.isDisabled',
|
1567
|
+
'[class.is-highlighted]': 'day.isHovered',
|
1568
|
+
'[class.is-other-month]': 'day.isOtherMonth',
|
1569
|
+
'[class.is-active-other-month]': 'day.isOtherMonthHovered',
|
1570
|
+
'[class.in-range]': 'day.isInRange',
|
1571
|
+
'[class.select-start]': 'day.isSelectionStart',
|
1572
|
+
'[class.select-end]': 'day.isSelectionEnd',
|
1573
|
+
'[class.selected]': 'day.isSelected'
|
1574
|
+
},
|
1575
|
+
template: `{{ day && day.label || '' }}`
|
1576
|
+
}]
|
1577
|
+
}], ctorParameters: function () { return [{ type: BsDatepickerConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { day: [{
|
1578
|
+
type: Input
|
1579
|
+
}] } });
|
1580
|
+
|
1484
1581
|
class BsDatepickerNavigationViewComponent {
|
1485
1582
|
constructor() {
|
1486
1583
|
this.onNavigate = new EventEmitter();
|
@@ -1493,8 +1590,8 @@ class BsDatepickerNavigationViewComponent {
|
|
1493
1590
|
this.onViewMode.emit(viewMode);
|
1494
1591
|
}
|
1495
1592
|
}
|
1496
|
-
BsDatepickerNavigationViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1497
|
-
BsDatepickerNavigationViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1593
|
+
BsDatepickerNavigationViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerNavigationViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1594
|
+
BsDatepickerNavigationViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode" }, ngImport: i0, template: `
|
1498
1595
|
<button class="previous"
|
1499
1596
|
[disabled]="calendar.disableLeftArrow"
|
1500
1597
|
[style.visibility]="calendar.hideLeftArrow ? 'hidden' : 'visible'"
|
@@ -1530,8 +1627,8 @@ BsDatepickerNavigationViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersi
|
|
1530
1627
|
type="button"
|
1531
1628
|
(click)="navTo(false)"><span>›</span>
|
1532
1629
|
</button>
|
1533
|
-
`, isInline: true,
|
1534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1630
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerNavigationViewComponent, decorators: [{
|
1535
1632
|
type: Component,
|
1536
1633
|
args: [{
|
1537
1634
|
selector: 'bs-datepicker-navigation-view',
|
@@ -1582,49 +1679,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
1582
1679
|
type: Output
|
1583
1680
|
}] } });
|
1584
1681
|
|
1585
|
-
class BsDatepickerDayDecoratorComponent {
|
1586
|
-
constructor(_config, _elRef, _renderer) {
|
1587
|
-
this._config = _config;
|
1588
|
-
this._elRef = _elRef;
|
1589
|
-
this._renderer = _renderer;
|
1590
|
-
this.day = { date: new Date(), label: '' };
|
1591
|
-
}
|
1592
|
-
ngOnInit() {
|
1593
|
-
if (this.day?.isToday && this._config && this._config.customTodayClass) {
|
1594
|
-
this._renderer.addClass(this._elRef.nativeElement, this._config.customTodayClass);
|
1595
|
-
}
|
1596
|
-
if (typeof this.day?.customClasses === 'string') {
|
1597
|
-
this.day?.customClasses.split(' ')
|
1598
|
-
.filter((className) => className)
|
1599
|
-
.forEach((className) => {
|
1600
|
-
this._renderer.addClass(this._elRef.nativeElement, className);
|
1601
|
-
});
|
1602
|
-
}
|
1603
|
-
}
|
1604
|
-
}
|
1605
|
-
BsDatepickerDayDecoratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerDayDecoratorComponent, deps: [{ token: BsDatepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
1606
|
-
BsDatepickerDayDecoratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatepickerDayDecoratorComponent, selector: "[bsDatepickerDayDecorator]", inputs: { day: "day" }, host: { properties: { "class.disabled": "day.isDisabled", "class.is-highlighted": "day.isHovered", "class.is-other-month": "day.isOtherMonth", "class.is-active-other-month": "day.isOtherMonthHovered", "class.in-range": "day.isInRange", "class.select-start": "day.isSelectionStart", "class.select-end": "day.isSelectionEnd", "class.selected": "day.isSelected" } }, ngImport: i0, template: `{{ day && day.label || '' }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerDayDecoratorComponent, decorators: [{
|
1608
|
-
type: Component,
|
1609
|
-
args: [{
|
1610
|
-
selector: '[bsDatepickerDayDecorator]',
|
1611
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1612
|
-
host: {
|
1613
|
-
'[class.disabled]': 'day.isDisabled',
|
1614
|
-
'[class.is-highlighted]': 'day.isHovered',
|
1615
|
-
'[class.is-other-month]': 'day.isOtherMonth',
|
1616
|
-
'[class.is-active-other-month]': 'day.isOtherMonthHovered',
|
1617
|
-
'[class.in-range]': 'day.isInRange',
|
1618
|
-
'[class.select-start]': 'day.isSelectionStart',
|
1619
|
-
'[class.select-end]': 'day.isSelectionEnd',
|
1620
|
-
'[class.selected]': 'day.isSelected'
|
1621
|
-
},
|
1622
|
-
template: `{{ day && day.label || '' }}`
|
1623
|
-
}]
|
1624
|
-
}], ctorParameters: function () { return [{ type: BsDatepickerConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { day: [{
|
1625
|
-
type: Input
|
1626
|
-
}] } });
|
1627
|
-
|
1628
1682
|
class BsDaysCalendarViewComponent {
|
1629
1683
|
constructor(_config) {
|
1630
1684
|
this._config = _config;
|
@@ -1709,8 +1763,8 @@ class BsDaysCalendarViewComponent {
|
|
1709
1763
|
this.onHover.emit({ cell, isHovered });
|
1710
1764
|
}
|
1711
1765
|
}
|
1712
|
-
BsDaysCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1713
|
-
BsDaysCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1766
|
+
BsDaysCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaysCalendarViewComponent, deps: [{ token: BsDatepickerConfig }], target: i0.ɵɵFactoryTarget.Component });
|
1767
|
+
BsDaysCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: { calendar: "calendar", options: "options" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover", onHoverWeek: "onHoverWeek" }, ngImport: i0, template: `
|
1714
1768
|
<bs-calendar-layout>
|
1715
1769
|
<bs-datepicker-navigation-view
|
1716
1770
|
[calendar]="calendar"
|
@@ -1763,8 +1817,8 @@ BsDaysCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
1763
1817
|
</table>
|
1764
1818
|
|
1765
1819
|
</bs-calendar-layout>
|
1766
|
-
`, isInline: true,
|
1767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1820
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerDayDecoratorComponent, selector: "[bsDatepickerDayDecorator]", inputs: ["day"] }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode"] }] });
|
1821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaysCalendarViewComponent, decorators: [{
|
1768
1822
|
type: Component,
|
1769
1823
|
args: [{
|
1770
1824
|
selector: 'bs-days-calendar-view',
|
@@ -1861,8 +1915,8 @@ class BsMonthCalendarViewComponent {
|
|
1861
1915
|
this.onViewMode.emit(event);
|
1862
1916
|
}
|
1863
1917
|
}
|
1864
|
-
BsMonthCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1865
|
-
BsMonthCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1918
|
+
BsMonthCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsMonthCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1919
|
+
BsMonthCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, ngImport: i0, template: `
|
1866
1920
|
<bs-calendar-layout>
|
1867
1921
|
<bs-datepicker-navigation-view
|
1868
1922
|
[calendar]="calendar"
|
@@ -1885,8 +1939,8 @@ BsMonthCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
1885
1939
|
</tbody>
|
1886
1940
|
</table>
|
1887
1941
|
</bs-calendar-layout>
|
1888
|
-
`, isInline: true,
|
1889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1942
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode"] }] });
|
1943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsMonthCalendarViewComponent, decorators: [{
|
1890
1944
|
type: Component,
|
1891
1945
|
args: [{
|
1892
1946
|
selector: 'bs-month-calendar-view',
|
@@ -1948,8 +2002,8 @@ class BsYearsCalendarViewComponent {
|
|
1948
2002
|
this.onViewMode.emit(event);
|
1949
2003
|
}
|
1950
2004
|
}
|
1951
|
-
BsYearsCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1952
|
-
BsYearsCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2005
|
+
BsYearsCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsYearsCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2006
|
+
BsYearsCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, ngImport: i0, template: `
|
1953
2007
|
<bs-calendar-layout>
|
1954
2008
|
<bs-datepicker-navigation-view
|
1955
2009
|
[calendar]="calendar"
|
@@ -1972,8 +2026,8 @@ BsYearsCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
1972
2026
|
</tbody>
|
1973
2027
|
</table>
|
1974
2028
|
</bs-calendar-layout>
|
1975
|
-
`, isInline: true,
|
1976
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2029
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode"] }] });
|
2030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsYearsCalendarViewComponent, decorators: [{
|
1977
2031
|
type: Component,
|
1978
2032
|
args: [{
|
1979
2033
|
selector: 'bs-years-calendar-view',
|
@@ -2014,53 +2068,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
2014
2068
|
type: Output
|
2015
2069
|
}] } });
|
2016
2070
|
|
2017
|
-
class BsCustomDatesViewComponent {
|
2018
|
-
constructor() {
|
2019
|
-
this.onSelect = new EventEmitter();
|
2020
|
-
}
|
2021
|
-
selectFromRanges(range) {
|
2022
|
-
this.onSelect.emit(range);
|
2023
|
-
}
|
2024
|
-
}
|
2025
|
-
BsCustomDatesViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCustomDatesViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2026
|
-
BsCustomDatesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: { ranges: "ranges", selectedRange: "selectedRange", customRangeLabel: "customRangeLabel" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: `
|
2027
|
-
<div class="bs-datepicker-predefined-btns">
|
2028
|
-
<button *ngFor="let range of ranges"
|
2029
|
-
type="button"
|
2030
|
-
class="btn"
|
2031
|
-
(click)="selectFromRanges(range)"
|
2032
|
-
[class.selected]="range.value === selectedRange">
|
2033
|
-
{{ range.label }}
|
2034
|
-
</button>
|
2035
|
-
</div>
|
2036
|
-
`, isInline: true, directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCustomDatesViewComponent, decorators: [{
|
2038
|
-
type: Component,
|
2039
|
-
args: [{
|
2040
|
-
selector: 'bs-custom-date-view',
|
2041
|
-
template: `
|
2042
|
-
<div class="bs-datepicker-predefined-btns">
|
2043
|
-
<button *ngFor="let range of ranges"
|
2044
|
-
type="button"
|
2045
|
-
class="btn"
|
2046
|
-
(click)="selectFromRanges(range)"
|
2047
|
-
[class.selected]="range.value === selectedRange">
|
2048
|
-
{{ range.label }}
|
2049
|
-
</button>
|
2050
|
-
</div>
|
2051
|
-
`,
|
2052
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
2053
|
-
}]
|
2054
|
-
}], propDecorators: { ranges: [{
|
2055
|
-
type: Input
|
2056
|
-
}], selectedRange: [{
|
2057
|
-
type: Input
|
2058
|
-
}], customRangeLabel: [{
|
2059
|
-
type: Input
|
2060
|
-
}], onSelect: [{
|
2061
|
-
type: Output
|
2062
|
-
}] } });
|
2063
|
-
|
2064
2071
|
class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
|
2065
2072
|
constructor(_renderer, _config, _store, _element, _actions, _effects, _positionService) {
|
2066
2073
|
super();
|
@@ -2082,8 +2089,15 @@ class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
|
|
2082
2089
|
}
|
2083
2090
|
ngOnInit() {
|
2084
2091
|
this._positionService.setOptions({
|
2085
|
-
modifiers: {
|
2086
|
-
|
2092
|
+
modifiers: {
|
2093
|
+
flip: {
|
2094
|
+
enabled: this._config.adaptivePosition
|
2095
|
+
},
|
2096
|
+
preventOverflow: {
|
2097
|
+
enabled: this._config.adaptivePosition
|
2098
|
+
}
|
2099
|
+
},
|
2100
|
+
allowedPositions: this._config.allowedPositions
|
2087
2101
|
});
|
2088
2102
|
this._positionService.event$?.pipe(take(1))
|
2089
2103
|
.subscribe(() => {
|
@@ -2112,9 +2126,19 @@ class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
|
|
2112
2126
|
// set event handlers
|
2113
2127
|
.setEventHandlers(this)
|
2114
2128
|
.registerDatepickerSideEffects();
|
2129
|
+
let currentDate;
|
2115
2130
|
// todo: move it somewhere else
|
2116
2131
|
// on selected date change
|
2117
|
-
this._subs.push(this._store.select((state) => state.selectedDate).subscribe((date) =>
|
2132
|
+
this._subs.push(this._store.select((state) => state.selectedDate).subscribe((date) => {
|
2133
|
+
currentDate = date;
|
2134
|
+
this.valueChange.emit(date);
|
2135
|
+
}));
|
2136
|
+
this._subs.push(this._store.select((state) => state.selectedTime).subscribe((time) => {
|
2137
|
+
if (!time[0] || !(time[0] instanceof Date) || time[0] === currentDate) {
|
2138
|
+
return;
|
2139
|
+
}
|
2140
|
+
this.valueChange.emit(time[0]);
|
2141
|
+
}));
|
2118
2142
|
this._store.dispatch(this._actions.changeViewMode(this._config.startView));
|
2119
2143
|
}
|
2120
2144
|
ngAfterViewInit() {
|
@@ -2183,9 +2207,9 @@ class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
|
|
2183
2207
|
this._effects?.destroy();
|
2184
2208
|
}
|
2185
2209
|
}
|
2186
|
-
BsDatepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2187
|
-
BsDatepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2210
|
+
BsDatepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
|
2211
|
+
BsDatepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerContainerComponent, selector: "bs-datepicker-container", host: { attributes: { "role": "dialog", "aria-label": "calendar" }, listeners: { "click": "_stopPropagation($event)" }, classAttribute: "bottom" }, providers: [BsDatepickerStore, BsDatepickerEffects], viewQueries: [{ propertyName: "startTimepicker", first: true, predicate: ["startTP"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
|
2212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerContainerComponent, decorators: [{
|
2189
2213
|
type: Component,
|
2190
2214
|
args: [{ selector: 'bs-datepicker-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
|
2191
2215
|
class: 'bottom',
|
@@ -2317,6 +2341,21 @@ class BsDatepickerDirective {
|
|
2317
2341
|
this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
|
2318
2342
|
}
|
2319
2343
|
}
|
2344
|
+
initSubscribes() {
|
2345
|
+
// if date changes from external source (model -> view)
|
2346
|
+
this._subs.push(this.bsValueChange.subscribe((value) => {
|
2347
|
+
if (this._datepickerRef) {
|
2348
|
+
this._datepickerRef.instance.value = value;
|
2349
|
+
}
|
2350
|
+
}));
|
2351
|
+
// if date changes from picker (view -> model)
|
2352
|
+
if (this._datepickerRef) {
|
2353
|
+
this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
|
2354
|
+
this.bsValue = value;
|
2355
|
+
this.hide();
|
2356
|
+
}));
|
2357
|
+
}
|
2358
|
+
}
|
2320
2359
|
ngAfterViewInit() {
|
2321
2360
|
this.isOpen$.pipe(filter(isOpen => isOpen !== this.isOpen), takeUntil(this.isDestroy$))
|
2322
2361
|
.subscribe(() => this.toggle());
|
@@ -2336,19 +2375,7 @@ class BsDatepickerDirective {
|
|
2336
2375
|
.to(this.container)
|
2337
2376
|
.position({ attachment: this.placement })
|
2338
2377
|
.show({ placement: this.placement });
|
2339
|
-
|
2340
|
-
this._subs.push(this.bsValueChange.subscribe((value) => {
|
2341
|
-
if (this._datepickerRef) {
|
2342
|
-
this._datepickerRef.instance.value = value;
|
2343
|
-
}
|
2344
|
-
}));
|
2345
|
-
// if date changes from picker (view -> model)
|
2346
|
-
if (this._datepickerRef) {
|
2347
|
-
this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
|
2348
|
-
this.bsValue = value;
|
2349
|
-
this.hide();
|
2350
|
-
}));
|
2351
|
-
}
|
2378
|
+
this.initSubscribes();
|
2352
2379
|
}
|
2353
2380
|
/**
|
2354
2381
|
* Closes an element’s datepicker. This is considered a “manual” triggering of
|
@@ -2393,6 +2420,12 @@ class BsDatepickerDirective {
|
|
2393
2420
|
initCurrentTime: this.bsConfig?.initCurrentTime
|
2394
2421
|
});
|
2395
2422
|
}
|
2423
|
+
unsubscribeSubscriptions() {
|
2424
|
+
if (this._subs?.length) {
|
2425
|
+
this._subs.map(sub => sub.unsubscribe());
|
2426
|
+
this._subs.length = 0;
|
2427
|
+
}
|
2428
|
+
}
|
2396
2429
|
ngOnDestroy() {
|
2397
2430
|
this._datepicker.dispose();
|
2398
2431
|
this.isOpen$.next(false);
|
@@ -2400,11 +2433,12 @@ class BsDatepickerDirective {
|
|
2400
2433
|
this.isDestroy$.next(null);
|
2401
2434
|
this.isDestroy$.complete();
|
2402
2435
|
}
|
2436
|
+
this.unsubscribeSubscriptions();
|
2403
2437
|
}
|
2404
2438
|
}
|
2405
|
-
BsDatepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2406
|
-
BsDatepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
2407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2439
|
+
BsDatepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerDirective, deps: [{ token: BsDatepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
|
2440
|
+
BsDatepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerDirective, selector: "[bsDatepicker]", inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig" }, outputs: { onShown: "onShown", onHidden: "onHidden", bsValueChange: "bsValueChange" }, exportAs: ["bsDatepicker"], usesOnChanges: true, ngImport: i0 });
|
2441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerDirective, decorators: [{
|
2408
2442
|
type: Directive,
|
2409
2443
|
args: [{
|
2410
2444
|
selector: '[bsDatepicker]',
|
@@ -2454,9 +2488,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
2454
2488
|
|
2455
2489
|
class BsDatepickerInlineConfig extends BsDatepickerConfig {
|
2456
2490
|
}
|
2457
|
-
BsDatepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2458
|
-
BsDatepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
2459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2491
|
+
BsDatepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
2492
|
+
BsDatepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineConfig, providedIn: 'root' });
|
2493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineConfig, decorators: [{
|
2460
2494
|
type: Injectable,
|
2461
2495
|
args: [{
|
2462
2496
|
providedIn: 'root'
|
@@ -2470,9 +2504,9 @@ class BsDatepickerInlineContainerComponent extends BsDatepickerContainerComponen
|
|
2470
2504
|
_renderer.setStyle(_element.nativeElement, 'position', 'static');
|
2471
2505
|
}
|
2472
2506
|
}
|
2473
|
-
BsDatepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2474
|
-
BsDatepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2507
|
+
BsDatepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
|
2508
|
+
BsDatepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerInlineContainerComponent, selector: "bs-datepicker-inline-container", host: { listeners: { "click": "_stopPropagation($event)" } }, providers: [BsDatepickerStore, BsDatepickerEffects], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
|
2509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineContainerComponent, decorators: [{
|
2476
2510
|
type: Component,
|
2477
2511
|
args: [{ selector: 'bs-datepicker-inline-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
|
2478
2512
|
'(click)': '_stopPropagation($event)'
|
@@ -2515,19 +2549,27 @@ class BsDatepickerInlineDirective {
|
|
2515
2549
|
}
|
2516
2550
|
ngOnInit() {
|
2517
2551
|
this.setConfig();
|
2518
|
-
|
2552
|
+
this.initSubscribes();
|
2553
|
+
}
|
2554
|
+
initSubscribes() {
|
2555
|
+
this.unsubscribeSubscriptions();
|
2519
2556
|
this._subs.push(this.bsValueChange.subscribe((value) => {
|
2520
2557
|
if (this._datepickerRef) {
|
2521
2558
|
this._datepickerRef.instance.value = value;
|
2522
2559
|
}
|
2523
2560
|
}));
|
2524
|
-
// if date changes from picker (view -> model)
|
2525
2561
|
if (this._datepickerRef) {
|
2526
2562
|
this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
|
2527
2563
|
this.bsValue = value;
|
2528
2564
|
}));
|
2529
2565
|
}
|
2530
2566
|
}
|
2567
|
+
unsubscribeSubscriptions() {
|
2568
|
+
if (this._subs?.length) {
|
2569
|
+
this._subs.map(sub => sub.unsubscribe());
|
2570
|
+
this._subs.length = 0;
|
2571
|
+
}
|
2572
|
+
}
|
2531
2573
|
ngOnChanges(changes) {
|
2532
2574
|
if (changes["bsConfig"]) {
|
2533
2575
|
if (changes["bsConfig"].currentValue?.initCurrentTime && changes["bsConfig"].currentValue?.initCurrentTime !== changes["bsConfig"].previousValue?.initCurrentTime && this._bsValue) {
|
@@ -2585,14 +2627,16 @@ class BsDatepickerInlineDirective {
|
|
2585
2627
|
.attach(BsDatepickerInlineContainerComponent)
|
2586
2628
|
.to(this._elementRef)
|
2587
2629
|
.show();
|
2630
|
+
this.initSubscribes();
|
2588
2631
|
}
|
2589
2632
|
ngOnDestroy() {
|
2590
2633
|
this._datepicker.dispose();
|
2634
|
+
this.unsubscribeSubscriptions();
|
2591
2635
|
}
|
2592
2636
|
}
|
2593
|
-
BsDatepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2594
|
-
BsDatepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
2595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2637
|
+
BsDatepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineDirective, deps: [{ token: BsDatepickerInlineConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
|
2638
|
+
BsDatepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerInlineDirective, selector: "bs-datepicker-inline", inputs: { bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts", datesEnabled: "datesEnabled", datesDisabled: "datesDisabled", bsValue: "bsValue" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDatepickerInline"], usesOnChanges: true, ngImport: i0 });
|
2639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInlineDirective, decorators: [{
|
2596
2640
|
type: Directive,
|
2597
2641
|
args: [{
|
2598
2642
|
selector: 'bs-datepicker-inline',
|
@@ -2629,9 +2673,9 @@ class BsDaterangepickerInlineConfig extends BsDatepickerConfig {
|
|
2629
2673
|
this.isAnimated = false;
|
2630
2674
|
}
|
2631
2675
|
}
|
2632
|
-
BsDaterangepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2633
|
-
BsDaterangepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
2634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2676
|
+
BsDaterangepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
2677
|
+
BsDaterangepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineConfig, providedIn: 'root' });
|
2678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineConfig, decorators: [{
|
2635
2679
|
type: Injectable,
|
2636
2680
|
args: [{
|
2637
2681
|
providedIn: 'root'
|
@@ -2663,8 +2707,15 @@ class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent
|
|
2663
2707
|
}
|
2664
2708
|
ngOnInit() {
|
2665
2709
|
this._positionService.setOptions({
|
2666
|
-
modifiers: {
|
2667
|
-
|
2710
|
+
modifiers: {
|
2711
|
+
flip: {
|
2712
|
+
enabled: this._config.adaptivePosition
|
2713
|
+
},
|
2714
|
+
preventOverflow: {
|
2715
|
+
enabled: this._config.adaptivePosition
|
2716
|
+
}
|
2717
|
+
},
|
2718
|
+
allowedPositions: this._config.allowedPositions
|
2668
2719
|
});
|
2669
2720
|
this._positionService.event$?.pipe(take(1))
|
2670
2721
|
.subscribe(() => {
|
@@ -2687,14 +2738,27 @@ class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent
|
|
2687
2738
|
// set event handlers
|
2688
2739
|
.setEventHandlers(this)
|
2689
2740
|
.registerDatepickerSideEffects();
|
2741
|
+
let currentDate;
|
2690
2742
|
// todo: move it somewhere else
|
2691
2743
|
// on selected date change
|
2692
2744
|
this._subs.push(this._store
|
2693
2745
|
.select(state => state.selectedRange)
|
2694
2746
|
.subscribe(dateRange => {
|
2747
|
+
currentDate = dateRange;
|
2695
2748
|
this.valueChange.emit(dateRange);
|
2696
2749
|
this.chosenRange = dateRange || [];
|
2697
2750
|
}));
|
2751
|
+
this._subs.push(this._store
|
2752
|
+
.select(state => state.selectedTime)
|
2753
|
+
.subscribe((time) => {
|
2754
|
+
if ((!time[0] || !time[1]) ||
|
2755
|
+
(!(time[0] instanceof Date) || !(time[1] instanceof Date)) ||
|
2756
|
+
(currentDate && (time[0] === currentDate[0] && time[1] === currentDate[1]))) {
|
2757
|
+
return;
|
2758
|
+
}
|
2759
|
+
this.valueChange.emit(time);
|
2760
|
+
this.chosenRange = time || [];
|
2761
|
+
}));
|
2698
2762
|
}
|
2699
2763
|
ngAfterViewInit() {
|
2700
2764
|
this.selectedTimeSub.add(this.selectedTime?.subscribe((val) => {
|
@@ -2822,9 +2886,9 @@ class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent
|
|
2822
2886
|
this._effects?.setMaxDate(maxDateRange);
|
2823
2887
|
}
|
2824
2888
|
}
|
2825
|
-
BsDaterangepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2826
|
-
BsDaterangepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2889
|
+
BsDaterangepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
|
2890
|
+
BsDaterangepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDaterangepickerContainerComponent, selector: "bs-daterangepicker-container", host: { attributes: { "role": "dialog", "aria-label": "calendar" }, listeners: { "click": "_stopPropagation($event)" }, classAttribute: "bottom" }, providers: [BsDatepickerStore, BsDatepickerEffects], viewQueries: [{ propertyName: "startTimepicker", first: true, predicate: ["startTP"], descendants: true }, { propertyName: "endTimepicker", first: true, predicate: ["endTP"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
|
2891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerContainerComponent, decorators: [{
|
2828
2892
|
type: Component,
|
2829
2893
|
args: [{ selector: 'bs-daterangepicker-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
|
2830
2894
|
class: 'bottom',
|
@@ -2847,9 +2911,9 @@ class BsDaterangepickerInlineContainerComponent extends BsDaterangepickerContain
|
|
2847
2911
|
_renderer.setStyle(_element.nativeElement, 'position', 'static');
|
2848
2912
|
}
|
2849
2913
|
}
|
2850
|
-
BsDaterangepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2851
|
-
BsDaterangepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2914
|
+
BsDaterangepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
|
2915
|
+
BsDaterangepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: BsDaterangepickerInlineContainerComponent, selector: "bs-daterangepicker-inline-container", host: { listeners: { "click": "_stopPropagation($event)" } }, providers: [BsDatepickerStore, BsDatepickerEffects], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
|
2916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineContainerComponent, decorators: [{
|
2853
2917
|
type: Component,
|
2854
2918
|
args: [{ selector: 'bs-daterangepicker-inline-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
|
2855
2919
|
'(click)': '_stopPropagation($event)'
|
@@ -2888,20 +2952,7 @@ class BsDaterangepickerInlineDirective {
|
|
2888
2952
|
}
|
2889
2953
|
ngOnInit() {
|
2890
2954
|
this.setConfig();
|
2891
|
-
|
2892
|
-
this._subs.push(this.bsValueChange.subscribe((value) => {
|
2893
|
-
if (this._datepickerRef) {
|
2894
|
-
this._datepickerRef.instance.value = value;
|
2895
|
-
}
|
2896
|
-
}));
|
2897
|
-
// if date changes from picker (view -> model)
|
2898
|
-
if (this._datepickerRef) {
|
2899
|
-
this._subs.push(this._datepickerRef.instance.valueChange
|
2900
|
-
.pipe(filter((range) => range && range[0] && !!range[1]))
|
2901
|
-
.subscribe((value) => {
|
2902
|
-
this.bsValue = value;
|
2903
|
-
}));
|
2904
|
-
}
|
2955
|
+
this.initSubscribes();
|
2905
2956
|
}
|
2906
2957
|
ngOnChanges(changes) {
|
2907
2958
|
if (changes["bsConfig"]) {
|
@@ -2962,14 +3013,39 @@ class BsDaterangepickerInlineDirective {
|
|
2962
3013
|
.attach(BsDaterangepickerInlineContainerComponent)
|
2963
3014
|
.to(this._elementRef)
|
2964
3015
|
.show();
|
3016
|
+
this.initSubscribes();
|
3017
|
+
}
|
3018
|
+
initSubscribes() {
|
3019
|
+
this.unsubscribeSubscriptions();
|
3020
|
+
// if date changes from external source (model -> view)
|
3021
|
+
this._subs.push(this.bsValueChange.subscribe((value) => {
|
3022
|
+
if (this._datepickerRef) {
|
3023
|
+
this._datepickerRef.instance.value = value;
|
3024
|
+
}
|
3025
|
+
}));
|
3026
|
+
// if date changes from picker (view -> model)
|
3027
|
+
if (this._datepickerRef) {
|
3028
|
+
this._subs.push(this._datepickerRef.instance.valueChange
|
3029
|
+
.pipe(filter((range) => range && range[0] && !!range[1]))
|
3030
|
+
.subscribe((value) => {
|
3031
|
+
this.bsValue = value;
|
3032
|
+
}));
|
3033
|
+
}
|
3034
|
+
}
|
3035
|
+
unsubscribeSubscriptions() {
|
3036
|
+
if (this._subs?.length) {
|
3037
|
+
this._subs.map(sub => sub.unsubscribe());
|
3038
|
+
this._subs.length = 0;
|
3039
|
+
}
|
2965
3040
|
}
|
2966
3041
|
ngOnDestroy() {
|
2967
3042
|
this._datepicker.dispose();
|
3043
|
+
this.unsubscribeSubscriptions();
|
2968
3044
|
}
|
2969
3045
|
}
|
2970
|
-
BsDaterangepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2971
|
-
BsDaterangepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
2972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3046
|
+
BsDaterangepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineDirective, deps: [{ token: BsDaterangepickerInlineConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
|
3047
|
+
BsDaterangepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDaterangepickerInlineDirective, selector: "bs-daterangepicker-inline", inputs: { bsValue: "bsValue", bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDaterangepickerInline"], usesOnChanges: true, ngImport: i0 });
|
3048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInlineDirective, decorators: [{
|
2973
3049
|
type: Directive,
|
2974
3050
|
args: [{
|
2975
3051
|
selector: 'bs-daterangepicker-inline',
|
@@ -3131,9 +3207,9 @@ class BsDatepickerInputDirective {
|
|
3131
3207
|
}
|
3132
3208
|
}
|
3133
3209
|
}
|
3134
|
-
BsDatepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
3135
|
-
BsDatepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
3136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3210
|
+
BsDatepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInputDirective, deps: [{ token: BsDatepickerDirective, host: true }, { token: BsLocaleService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
3211
|
+
BsDatepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDatepickerInputDirective, selector: "input[bsDatepicker]", host: { listeners: { "change": "onChange($event)", "keyup.esc": "hide()", "keydown": "onKeydownEvent($event)", "blur": "onBlur()" } }, providers: [BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR], ngImport: i0 });
|
3212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerInputDirective, decorators: [{
|
3137
3213
|
type: Directive,
|
3138
3214
|
args: [{
|
3139
3215
|
selector: `input[bsDatepicker]`,
|
@@ -3157,9 +3233,9 @@ class BsDaterangepickerConfig extends BsDatepickerConfig {
|
|
3157
3233
|
this.displayMonths = 2;
|
3158
3234
|
}
|
3159
3235
|
}
|
3160
|
-
BsDaterangepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
3161
|
-
BsDaterangepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
3162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3236
|
+
BsDaterangepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
3237
|
+
BsDaterangepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerConfig, providedIn: 'root' });
|
3238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerConfig, decorators: [{
|
3163
3239
|
type: Injectable,
|
3164
3240
|
args: [{
|
3165
3241
|
providedIn: 'root'
|
@@ -3297,6 +3373,9 @@ class BsDaterangepickerDirective {
|
|
3297
3373
|
.to(this.container)
|
3298
3374
|
.position({ attachment: this.placement })
|
3299
3375
|
.show({ placement: this.placement });
|
3376
|
+
this.initSubscribes();
|
3377
|
+
}
|
3378
|
+
initSubscribes() {
|
3300
3379
|
// if date changes from external source (model -> view)
|
3301
3380
|
this._subs.push(this.bsValueChange.subscribe((value) => {
|
3302
3381
|
if (this._datepickerRef) {
|
@@ -3356,6 +3435,12 @@ class BsDaterangepickerDirective {
|
|
3356
3435
|
}
|
3357
3436
|
this.show();
|
3358
3437
|
}
|
3438
|
+
unsubscribeSubscriptions() {
|
3439
|
+
if (this._subs?.length) {
|
3440
|
+
this._subs.map(sub => sub.unsubscribe());
|
3441
|
+
this._subs.length = 0;
|
3442
|
+
}
|
3443
|
+
}
|
3359
3444
|
ngOnDestroy() {
|
3360
3445
|
this._datepicker.dispose();
|
3361
3446
|
this.isOpen$.next(false);
|
@@ -3363,11 +3448,12 @@ class BsDaterangepickerDirective {
|
|
3363
3448
|
this.isDestroy$.next(null);
|
3364
3449
|
this.isDestroy$.complete();
|
3365
3450
|
}
|
3451
|
+
this.unsubscribeSubscriptions();
|
3366
3452
|
}
|
3367
3453
|
}
|
3368
|
-
BsDaterangepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
3369
|
-
BsDaterangepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
3370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3454
|
+
BsDaterangepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerDirective, deps: [{ token: BsDaterangepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
|
3455
|
+
BsDaterangepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDaterangepickerDirective, selector: "[bsDaterangepicker]", inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { onShown: "onShown", onHidden: "onHidden", bsValueChange: "bsValueChange" }, exportAs: ["bsDaterangepicker"], usesOnChanges: true, ngImport: i0 });
|
3456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerDirective, decorators: [{
|
3371
3457
|
type: Directive,
|
3372
3458
|
args: [{
|
3373
3459
|
selector: '[bsDaterangepicker]',
|
@@ -3590,9 +3676,9 @@ class BsDaterangepickerInputDirective {
|
|
3590
3676
|
}
|
3591
3677
|
}
|
3592
3678
|
}
|
3593
|
-
BsDaterangepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
3594
|
-
BsDaterangepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
3595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3679
|
+
BsDaterangepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInputDirective, deps: [{ token: BsDaterangepickerDirective, host: true }, { token: BsLocaleService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
3680
|
+
BsDaterangepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: BsDaterangepickerInputDirective, selector: "input[bsDaterangepicker]", host: { listeners: { "change": "onChange($event)", "keyup.esc": "hide()", "keydown": "onKeydownEvent($event)", "blur": "onBlur()" } }, providers: [BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR], ngImport: i0 });
|
3681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDaterangepickerInputDirective, decorators: [{
|
3596
3682
|
type: Directive,
|
3597
3683
|
args: [{
|
3598
3684
|
selector: `input[bsDaterangepicker]`,
|
@@ -3625,8 +3711,8 @@ class BsDatepickerModule {
|
|
3625
3711
|
};
|
3626
3712
|
}
|
3627
3713
|
}
|
3628
|
-
BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
3629
|
-
BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
3714
|
+
BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3715
|
+
BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerModule, declarations: [BsCalendarLayoutComponent,
|
3630
3716
|
BsCurrentDateViewComponent,
|
3631
3717
|
BsCustomDatesViewComponent,
|
3632
3718
|
BsDatepickerDayDecoratorComponent,
|
@@ -3654,8 +3740,8 @@ BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
3654
3740
|
BsDaterangepickerInlineContainerComponent,
|
3655
3741
|
BsDaterangepickerInlineDirective,
|
3656
3742
|
BsDaterangepickerInputDirective] });
|
3657
|
-
BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
3658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3743
|
+
BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerModule, imports: [CommonModule, TooltipModule, TimepickerModule] });
|
3744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BsDatepickerModule, decorators: [{
|
3659
3745
|
type: NgModule,
|
3660
3746
|
args: [{
|
3661
3747
|
imports: [CommonModule, TooltipModule, TimepickerModule],
|
@@ -3680,12 +3766,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
3680
3766
|
BsDaterangepickerInlineDirective,
|
3681
3767
|
BsDaterangepickerInputDirective
|
3682
3768
|
],
|
3683
|
-
entryComponents: [
|
3684
|
-
BsDatepickerContainerComponent,
|
3685
|
-
BsDaterangepickerContainerComponent,
|
3686
|
-
BsDatepickerInlineContainerComponent,
|
3687
|
-
BsDaterangepickerInlineContainerComponent
|
3688
|
-
],
|
3689
3769
|
exports: [
|
3690
3770
|
BsDatepickerContainerComponent,
|
3691
3771
|
BsDatepickerDirective,
|