ngx-bootstrap 5.6.1 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -0
- package/README.md +8 -1
- package/accordion/accordion-group.component.d.ts +3 -2
- package/accordion/accordion.module.d.ts +1 -1
- package/accordion/bundles/ngx-bootstrap-accordion.umd.js +5 -2
- package/accordion/bundles/ngx-bootstrap-accordion.umd.js.map +1 -1
- package/accordion/bundles/ngx-bootstrap-accordion.umd.min.js +1 -1
- package/accordion/bundles/ngx-bootstrap-accordion.umd.min.js.map +1 -1
- package/accordion/esm2015/accordion.config.js +6 -2
- package/accordion/esm2015/accordion.module.js +2 -3
- package/accordion/esm5/accordion.config.js +6 -2
- package/accordion/esm5/accordion.module.js +2 -3
- package/accordion/fesm2015/ngx-bootstrap-accordion.js +6 -3
- package/accordion/fesm2015/ngx-bootstrap-accordion.js.map +1 -1
- package/accordion/fesm5/ngx-bootstrap-accordion.js +6 -3
- package/accordion/fesm5/ngx-bootstrap-accordion.js.map +1 -1
- package/accordion/ngx-bootstrap-accordion.metadata.json +1 -1
- package/accordion/package.json +2 -2
- package/alert/alert.module.d.ts +1 -1
- package/alert/bundles/ngx-bootstrap-alert.umd.js +5 -2
- package/alert/bundles/ngx-bootstrap-alert.umd.js.map +1 -1
- package/alert/bundles/ngx-bootstrap-alert.umd.min.js +2 -2
- package/alert/bundles/ngx-bootstrap-alert.umd.min.js.map +1 -1
- package/alert/esm2015/alert.component.js +3 -3
- package/alert/esm2015/alert.config.js +6 -2
- package/alert/esm2015/alert.module.js +2 -3
- package/alert/esm5/alert.component.js +3 -3
- package/alert/esm5/alert.config.js +6 -2
- package/alert/esm5/alert.module.js +2 -3
- package/alert/fesm2015/ngx-bootstrap-alert.js +6 -3
- package/alert/fesm2015/ngx-bootstrap-alert.js.map +1 -1
- package/alert/fesm5/ngx-bootstrap-alert.js +6 -3
- package/alert/fesm5/ngx-bootstrap-alert.js.map +1 -1
- package/alert/ngx-bootstrap-alert.metadata.json +1 -1
- package/alert/package.json +2 -2
- package/buttons/bundles/ngx-bootstrap-buttons.umd.js +293 -16
- package/buttons/bundles/ngx-bootstrap-buttons.umd.js.map +1 -1
- package/buttons/bundles/ngx-bootstrap-buttons.umd.min.js +1 -1
- package/buttons/bundles/ngx-bootstrap-buttons.umd.min.js.map +1 -1
- package/buttons/button-checkbox.directive.d.ts +2 -2
- package/buttons/button-radio-group.directive.d.ts +12 -1
- package/buttons/button-radio.directive.d.ts +19 -7
- package/buttons/buttons.module.d.ts +1 -1
- package/buttons/esm2015/button-radio-group.directive.js +140 -3
- package/buttons/esm2015/button-radio.directive.js +98 -18
- package/buttons/esm2015/buttons.module.js +1 -1
- package/buttons/esm5/button-radio-group.directive.js +171 -3
- package/buttons/esm5/button-radio.directive.js +126 -17
- package/buttons/esm5/buttons.module.js +1 -1
- package/buttons/fesm2015/ngx-bootstrap-buttons.js +235 -18
- package/buttons/fesm2015/ngx-bootstrap-buttons.js.map +1 -1
- package/buttons/fesm5/ngx-bootstrap-buttons.js +294 -17
- package/buttons/fesm5/ngx-bootstrap-buttons.js.map +1 -1
- package/buttons/ngx-bootstrap-buttons.metadata.json +1 -1
- package/buttons/package.json +2 -2
- package/carousel/bundles/ngx-bootstrap-carousel.umd.js +5 -3
- package/carousel/bundles/ngx-bootstrap-carousel.umd.js.map +1 -1
- package/carousel/bundles/ngx-bootstrap-carousel.umd.min.js +1 -1
- package/carousel/bundles/ngx-bootstrap-carousel.umd.min.js.map +1 -1
- package/carousel/carousel.component.d.ts +7 -5
- package/carousel/carousel.module.d.ts +1 -1
- package/carousel/esm2015/carousel.config.js +6 -2
- package/carousel/esm2015/carousel.module.js +2 -4
- package/carousel/esm5/carousel.component.js +4 -4
- package/carousel/esm5/carousel.config.js +6 -2
- package/carousel/esm5/carousel.module.js +2 -4
- package/carousel/fesm2015/ngx-bootstrap-carousel.js +6 -4
- package/carousel/fesm2015/ngx-bootstrap-carousel.js.map +1 -1
- package/carousel/fesm5/ngx-bootstrap-carousel.js +6 -4
- package/carousel/fesm5/ngx-bootstrap-carousel.js.map +1 -1
- package/carousel/ngx-bootstrap-carousel.metadata.json +1 -1
- package/carousel/package.json +2 -2
- package/chronos/bundles/ngx-bootstrap-chronos.umd.js +90 -73
- package/chronos/bundles/ngx-bootstrap-chronos.umd.js.map +1 -1
- package/chronos/bundles/ngx-bootstrap-chronos.umd.min.js +69 -1
- package/chronos/bundles/ngx-bootstrap-chronos.umd.min.js.map +1 -1
- package/chronos/esm2015/create/from-anything.js +2 -2
- package/chronos/esm2015/duration/valid.js +4 -6
- package/chronos/esm2015/i18n/ar.js +1 -4
- package/chronos/esm2015/i18n/bg.js +18 -20
- package/chronos/esm2015/i18n/cs.js +45 -47
- package/chronos/esm2015/i18n/et.js +1 -3
- package/chronos/esm2015/i18n/th-be.js +21 -1
- package/chronos/esm2015/locale/locale.class.js +5 -3
- package/chronos/esm5/create/from-anything.js +2 -2
- package/chronos/esm5/duration/valid.js +4 -6
- package/chronos/esm5/i18n/ar.js +1 -4
- package/chronos/esm5/i18n/bg.js +18 -20
- package/chronos/esm5/i18n/cs.js +45 -47
- package/chronos/esm5/i18n/et.js +1 -3
- package/chronos/esm5/i18n/th-be.js +21 -1
- package/chronos/esm5/locale/locale.class.js +6 -3
- package/chronos/esm5/test/chain.js +4 -4
- package/chronos/fesm2015/ngx-bootstrap-chronos.js +89 -73
- package/chronos/fesm2015/ngx-bootstrap-chronos.js.map +1 -1
- package/chronos/fesm5/ngx-bootstrap-chronos.js +90 -73
- package/chronos/fesm5/ngx-bootstrap-chronos.js.map +1 -1
- package/chronos/locale/locale.class.d.ts +4 -3
- package/chronos/package.json +2 -2
- package/collapse/bundles/ngx-bootstrap-collapse.umd.js.map +1 -1
- package/collapse/bundles/ngx-bootstrap-collapse.umd.min.js.map +1 -1
- package/collapse/collapse.directive.d.ts +3 -2
- package/collapse/collapse.module.d.ts +1 -1
- package/collapse/esm2015/collapse.module.js +1 -1
- package/collapse/esm5/collapse.module.js +1 -1
- package/collapse/fesm2015/ngx-bootstrap-collapse.js.map +1 -1
- package/collapse/fesm5/ngx-bootstrap-collapse.js.map +1 -1
- package/collapse/package.json +2 -2
- package/component-loader/bundles/ngx-bootstrap-component-loader.umd.js +5 -4
- package/component-loader/bundles/ngx-bootstrap-component-loader.umd.js.map +1 -1
- package/component-loader/bundles/ngx-bootstrap-component-loader.umd.min.js +1 -1
- package/component-loader/bundles/ngx-bootstrap-component-loader.umd.min.js.map +1 -1
- package/component-loader/component-loader.class.d.ts +4 -3
- package/component-loader/esm2015/component-loader.class.js +5 -5
- package/component-loader/esm5/component-loader.class.js +6 -5
- package/component-loader/fesm2015/ngx-bootstrap-component-loader.js +4 -4
- package/component-loader/fesm2015/ngx-bootstrap-component-loader.js.map +1 -1
- package/component-loader/fesm5/ngx-bootstrap-component-loader.js +5 -4
- package/component-loader/fesm5/ngx-bootstrap-component-loader.js.map +1 -1
- package/component-loader/package.json +2 -2
- package/datepicker/base/bs-datepicker-container.d.ts +20 -8
- package/datepicker/bs-datepicker-inline.component.d.ts +6 -2
- package/datepicker/bs-datepicker.component.d.ts +14 -5
- package/datepicker/bs-datepicker.config.d.ts +41 -1
- package/datepicker/bs-datepicker.css +126 -5
- package/datepicker/bs-datepicker.css.map +4 -4
- package/datepicker/bs-datepicker.module.d.ts +1 -1
- package/datepicker/bs-datepicker.scss +25 -5
- package/datepicker/bs-daterangepicker-inline.component.d.ts +1 -1
- package/datepicker/bs-daterangepicker.component.d.ts +9 -4
- package/datepicker/bs-locale.service.d.ts +3 -3
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js +604 -93
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js.map +1 -1
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js +2 -2
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js.map +1 -1
- package/datepicker/datepicker-inner.component.d.ts +2 -1
- package/datepicker/datepicker.component.d.ts +2 -1
- package/datepicker/datepicker.module.d.ts +1 -1
- package/datepicker/daypicker.component.d.ts +1 -1
- package/datepicker/engine/flag-days-calendar.d.ts +2 -1
- package/datepicker/engine/flag-months-calendar.d.ts +1 -0
- package/datepicker/engine/flag-years-calendar.d.ts +1 -0
- package/datepicker/esm2015/base/bs-datepicker-container.js +38 -1
- package/datepicker/esm2015/bs-datepicker-inline.component.js +12 -1
- package/datepicker/esm2015/bs-datepicker-inline.config.js +6 -2
- package/datepicker/esm2015/bs-datepicker-input.directive.js +9 -1
- package/datepicker/esm2015/bs-datepicker.component.js +45 -6
- package/datepicker/esm2015/bs-datepicker.config.js +88 -2
- package/datepicker/esm2015/bs-datepicker.module.js +3 -10
- package/datepicker/esm2015/bs-daterangepicker-inline.component.js +3 -2
- package/datepicker/esm2015/bs-daterangepicker-inline.config.js +6 -2
- package/datepicker/esm2015/bs-daterangepicker-input.directive.js +11 -3
- package/datepicker/esm2015/bs-daterangepicker.component.js +36 -7
- package/datepicker/esm2015/bs-daterangepicker.config.js +6 -2
- package/datepicker/esm2015/datepicker.config.js +6 -2
- package/datepicker/esm2015/datepicker.module.js +1 -1
- package/datepicker/esm2015/engine/flag-days-calendar.js +22 -3
- package/datepicker/esm2015/engine/flag-months-calendar.js +14 -3
- package/datepicker/esm2015/engine/flag-years-calendar.js +14 -3
- package/datepicker/esm2015/models/index.js +13 -1
- package/datepicker/esm2015/public_api.js +1 -1
- package/datepicker/esm2015/reducer/bs-datepicker.actions.js +14 -1
- package/datepicker/esm2015/reducer/bs-datepicker.effects.js +27 -33
- package/datepicker/esm2015/reducer/bs-datepicker.reducer.js +10 -2
- package/datepicker/esm2015/reducer/bs-datepicker.state.js +3 -1
- package/datepicker/esm2015/themes/bs/bs-custom-dates-view.component.js +5 -2
- package/datepicker/esm2015/themes/bs/bs-datepicker-container.component.js +57 -5
- package/datepicker/esm2015/themes/bs/bs-datepicker-inline-container.component.js +2 -2
- package/datepicker/esm2015/themes/bs/bs-daterangepicker-container.component.js +73 -4
- package/datepicker/esm2015/themes/bs/bs-daterangepicker-inline-container.component.js +2 -2
- package/datepicker/esm2015/themes/bs/bs-days-calendar-view.component.js +42 -4
- package/datepicker/esm5/base/bs-datepicker-container.js +52 -1
- package/datepicker/esm5/bs-datepicker-inline.component.js +12 -1
- package/datepicker/esm5/bs-datepicker-inline.config.js +8 -4
- package/datepicker/esm5/bs-datepicker-input.directive.js +9 -1
- package/datepicker/esm5/bs-datepicker.component.js +58 -8
- package/datepicker/esm5/bs-datepicker.config.js +88 -2
- package/datepicker/esm5/bs-datepicker.module.js +3 -10
- package/datepicker/esm5/bs-daterangepicker-inline.component.js +3 -2
- package/datepicker/esm5/bs-daterangepicker-inline.config.js +8 -4
- package/datepicker/esm5/bs-daterangepicker-input.directive.js +11 -3
- package/datepicker/esm5/bs-daterangepicker.component.js +49 -9
- package/datepicker/esm5/bs-daterangepicker.config.js +8 -4
- package/datepicker/esm5/datepicker.config.js +6 -2
- package/datepicker/esm5/datepicker.module.js +1 -1
- package/datepicker/esm5/engine/flag-days-calendar.js +22 -3
- package/datepicker/esm5/engine/flag-months-calendar.js +14 -3
- package/datepicker/esm5/engine/flag-years-calendar.js +14 -3
- package/datepicker/esm5/engine/format-days-calendar.js +3 -3
- package/datepicker/esm5/models/index.js +13 -1
- package/datepicker/esm5/public_api.js +1 -1
- package/datepicker/esm5/reducer/bs-datepicker.actions.js +18 -1
- package/datepicker/esm5/reducer/bs-datepicker.effects.js +33 -35
- package/datepicker/esm5/reducer/bs-datepicker.reducer.js +10 -2
- package/datepicker/esm5/reducer/bs-datepicker.state.js +3 -1
- package/datepicker/esm5/reducer/bs-datepicker.store.js +3 -3
- package/datepicker/esm5/themes/bs/bs-custom-dates-view.component.js +5 -2
- package/datepicker/esm5/themes/bs/bs-datepicker-container.component.js +74 -8
- package/datepicker/esm5/themes/bs/bs-datepicker-inline-container.component.js +4 -4
- package/datepicker/esm5/themes/bs/bs-daterangepicker-container.component.js +92 -7
- package/datepicker/esm5/themes/bs/bs-daterangepicker-inline-container.component.js +4 -4
- package/datepicker/esm5/themes/bs/bs-days-calendar-view.component.js +25 -2
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.js +549 -96
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.js.map +1 -1
- package/datepicker/fesm5/ngx-bootstrap-datepicker.js +606 -94
- package/datepicker/fesm5/ngx-bootstrap-datepicker.js.map +1 -1
- package/datepicker/models/index.d.ts +5 -0
- package/datepicker/monthpicker.component.d.ts +1 -1
- package/datepicker/ngx-bootstrap-datepicker.metadata.json +1 -1
- package/datepicker/package.json +2 -2
- package/datepicker/public_api.d.ts +1 -1
- package/datepicker/reducer/bs-datepicker.actions.d.ts +3 -1
- package/datepicker/reducer/bs-datepicker.effects.d.ts +2 -1
- package/datepicker/reducer/bs-datepicker.state.d.ts +2 -1
- package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +1 -0
- package/datepicker/themes/bs/bs-datepicker-container.component.d.ts +9 -5
- package/datepicker/themes/bs/bs-daterangepicker-container.component.d.ts +9 -5
- package/datepicker/themes/bs/bs-days-calendar-view.component.d.ts +2 -0
- package/datepicker/utils/scss/mixins.css.map +2 -2
- package/datepicker/utils/scss/mixins.scss +98 -0
- package/datepicker/utils/scss/variables.css.map +1 -1
- package/datepicker/utils/scss/variables.scss +14 -0
- package/datepicker/yearpicker.component.d.ts +1 -1
- package/dropdown/bs-dropdown-container.component.d.ts +1 -1
- package/dropdown/bs-dropdown.directive.d.ts +12 -7
- package/dropdown/bs-dropdown.module.d.ts +1 -1
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js +13 -8
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js.map +1 -1
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js +1 -1
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js.map +1 -1
- package/dropdown/esm2015/bs-dropdown.config.js +6 -2
- package/dropdown/esm2015/bs-dropdown.directive.js +8 -3
- package/dropdown/esm2015/bs-dropdown.module.js +2 -7
- package/dropdown/esm5/bs-dropdown-toggle.directive.js +3 -3
- package/dropdown/esm5/bs-dropdown.config.js +6 -2
- package/dropdown/esm5/bs-dropdown.directive.js +11 -5
- package/dropdown/esm5/bs-dropdown.module.js +2 -7
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.js +13 -9
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.js.map +1 -1
- package/dropdown/fesm5/ngx-bootstrap-dropdown.js +14 -9
- package/dropdown/fesm5/ngx-bootstrap-dropdown.js.map +1 -1
- package/dropdown/ngx-bootstrap-dropdown.metadata.json +1 -1
- package/dropdown/package.json +2 -2
- package/locale/package.json +2 -2
- package/mini-ngrx/bundles/ngx-bootstrap-mini-ngrx.umd.js.map +1 -1
- package/mini-ngrx/bundles/ngx-bootstrap-mini-ngrx.umd.min.js.map +1 -1
- package/mini-ngrx/esm5/state.class.js +3 -3
- package/mini-ngrx/esm5/store.class.js +3 -3
- package/mini-ngrx/fesm5/ngx-bootstrap-mini-ngrx.js.map +1 -1
- package/mini-ngrx/package.json +2 -2
- package/modal/bs-modal-ref.service.d.ts +15 -2
- package/modal/bs-modal.service.d.ts +7 -4
- package/modal/bundles/ngx-bootstrap-modal.umd.js +154 -59
- package/modal/bundles/ngx-bootstrap-modal.umd.js.map +1 -1
- package/modal/bundles/ngx-bootstrap-modal.umd.min.js +1 -1
- package/modal/bundles/ngx-bootstrap-modal.umd.min.js.map +1 -1
- package/modal/esm2015/bs-modal-ref.service.js +20 -1
- package/modal/esm2015/bs-modal.service.js +102 -47
- package/modal/esm2015/modal-container.component.js +10 -2
- package/modal/esm2015/modal-options.class.js +14 -3
- package/modal/esm2015/modal.directive.js +10 -7
- package/modal/esm2015/modal.module.js +1 -1
- package/modal/esm2015/models/index.js +3 -1
- package/modal/esm2015/ngx-bootstrap-modal.js +2 -2
- package/modal/esm2015/public_api.js +2 -2
- package/modal/esm5/bs-modal-ref.service.js +19 -1
- package/modal/esm5/bs-modal.service.js +109 -57
- package/modal/esm5/modal-container.component.js +13 -2
- package/modal/esm5/modal-options.class.js +14 -3
- package/modal/esm5/modal.directive.js +9 -7
- package/modal/esm5/modal.module.js +1 -1
- package/modal/esm5/models/index.js +3 -1
- package/modal/esm5/ngx-bootstrap-modal.js +2 -2
- package/modal/esm5/public_api.js +2 -2
- package/modal/fesm2015/ngx-bootstrap-modal.js +148 -52
- package/modal/fesm2015/ngx-bootstrap-modal.js.map +1 -1
- package/modal/fesm5/ngx-bootstrap-modal.js +155 -61
- package/modal/fesm5/ngx-bootstrap-modal.js.map +1 -1
- package/modal/modal-backdrop.component.d.ts +4 -2
- package/modal/modal-container.component.d.ts +1 -0
- package/modal/modal-options.class.d.ts +8 -3
- package/modal/modal.directive.d.ts +5 -4
- package/modal/modal.module.d.ts +2 -2
- package/modal/models/index.d.ts +1 -0
- package/modal/ngx-bootstrap-modal.metadata.json +1 -1
- package/modal/package.json +2 -2
- package/modal/public_api.d.ts +1 -1
- package/package.json +2 -2
- package/pagination/bundles/ngx-bootstrap-pagination.umd.js +5 -2
- package/pagination/bundles/ngx-bootstrap-pagination.umd.js.map +1 -1
- package/pagination/bundles/ngx-bootstrap-pagination.umd.min.js +1 -1
- package/pagination/bundles/ngx-bootstrap-pagination.umd.min.js.map +1 -1
- package/pagination/esm2015/pagination.config.js +6 -2
- package/pagination/esm2015/pagination.module.js +2 -3
- package/pagination/esm5/pagination.config.js +6 -2
- package/pagination/esm5/pagination.module.js +2 -3
- package/pagination/fesm2015/ngx-bootstrap-pagination.js +6 -3
- package/pagination/fesm2015/ngx-bootstrap-pagination.js.map +1 -1
- package/pagination/fesm5/ngx-bootstrap-pagination.js +6 -3
- package/pagination/fesm5/ngx-bootstrap-pagination.js.map +1 -1
- package/pagination/ngx-bootstrap-pagination.metadata.json +1 -1
- package/pagination/package.json +2 -2
- package/pagination/pager.component.d.ts +8 -4
- package/pagination/pagination.component.d.ts +8 -4
- package/pagination/pagination.module.d.ts +1 -1
- package/popover/bundles/ngx-bootstrap-popover.umd.js +55 -3
- package/popover/bundles/ngx-bootstrap-popover.umd.js.map +1 -1
- package/popover/bundles/ngx-bootstrap-popover.umd.min.js +1 -1
- package/popover/bundles/ngx-bootstrap-popover.umd.min.js.map +1 -1
- package/popover/esm2015/popover-container.component.js +4 -1
- package/popover/esm2015/popover.config.js +6 -2
- package/popover/esm2015/popover.directive.js +39 -2
- package/popover/esm2015/popover.module.js +2 -3
- package/popover/esm5/popover-container.component.js +4 -1
- package/popover/esm5/popover.config.js +6 -2
- package/popover/esm5/popover.directive.js +48 -2
- package/popover/esm5/popover.module.js +2 -3
- package/popover/fesm2015/ngx-bootstrap-popover.js +47 -4
- package/popover/fesm2015/ngx-bootstrap-popover.js.map +1 -1
- package/popover/fesm5/ngx-bootstrap-popover.js +56 -4
- package/popover/fesm5/ngx-bootstrap-popover.js.map +1 -1
- package/popover/ngx-bootstrap-popover.metadata.json +1 -1
- package/popover/package.json +2 -2
- package/popover/popover-container.component.d.ts +2 -1
- package/popover/popover.directive.d.ts +10 -1
- package/popover/popover.module.d.ts +1 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.js +7 -7
- package/positioning/bundles/ngx-bootstrap-positioning.umd.js.map +1 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.min.js +1 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.min.js.map +1 -1
- package/positioning/esm2015/modifiers/flip.js +3 -3
- package/positioning/esm2015/modifiers/preventOverflow.js +2 -2
- package/positioning/esm2015/modifiers/shift.js +2 -2
- package/positioning/esm2015/utils/computeAutoPlacement.js +2 -2
- package/positioning/esm2015/utils/getClientRect.js +2 -2
- package/positioning/esm5/modifiers/flip.js +4 -4
- package/positioning/esm5/modifiers/preventOverflow.js +4 -4
- package/positioning/esm5/modifiers/shift.js +3 -3
- package/positioning/esm5/utils/computeAutoPlacement.js +3 -3
- package/positioning/esm5/utils/getClientRect.js +3 -3
- package/positioning/fesm2015/ngx-bootstrap-positioning.js +6 -6
- package/positioning/fesm2015/ngx-bootstrap-positioning.js.map +1 -1
- package/positioning/fesm5/ngx-bootstrap-positioning.js +7 -7
- package/positioning/fesm5/ngx-bootstrap-positioning.js.map +1 -1
- package/positioning/package.json +2 -2
- package/positioning/positioning.service.d.ts +1 -1
- package/progressbar/bar.component.d.ts +4 -5
- package/progressbar/bundles/ngx-bootstrap-progressbar.umd.js +45 -66
- package/progressbar/bundles/ngx-bootstrap-progressbar.umd.js.map +1 -1
- package/progressbar/bundles/ngx-bootstrap-progressbar.umd.min.js +1 -1
- package/progressbar/bundles/ngx-bootstrap-progressbar.umd.min.js.map +1 -1
- package/progressbar/esm2015/bar.component.js +33 -48
- package/progressbar/esm2015/progressbar.component.js +5 -8
- package/progressbar/esm2015/progressbar.config.js +6 -2
- package/progressbar/esm2015/progressbar.module.js +2 -3
- package/progressbar/esm5/bar.component.js +37 -58
- package/progressbar/esm5/progressbar.component.js +5 -8
- package/progressbar/esm5/progressbar.config.js +6 -2
- package/progressbar/esm5/progressbar.module.js +2 -3
- package/progressbar/fesm2015/ngx-bootstrap-progressbar.js +42 -57
- package/progressbar/fesm2015/ngx-bootstrap-progressbar.js.map +1 -1
- package/progressbar/fesm5/ngx-bootstrap-progressbar.js +46 -67
- package/progressbar/fesm5/ngx-bootstrap-progressbar.js.map +1 -1
- package/progressbar/ngx-bootstrap-progressbar.metadata.json +1 -1
- package/progressbar/package.json +2 -2
- package/progressbar/progressbar.component.d.ts +7 -6
- package/progressbar/progressbar.module.d.ts +1 -1
- package/rating/bundles/ngx-bootstrap-rating.umd.js +5 -2
- package/rating/bundles/ngx-bootstrap-rating.umd.js.map +1 -1
- package/rating/bundles/ngx-bootstrap-rating.umd.min.js +1 -1
- package/rating/bundles/ngx-bootstrap-rating.umd.min.js.map +1 -1
- package/rating/esm2015/rating.config.js +6 -2
- package/rating/esm2015/rating.module.js +2 -3
- package/rating/esm5/rating.config.js +6 -2
- package/rating/esm5/rating.module.js +2 -3
- package/rating/fesm2015/ngx-bootstrap-rating.js +6 -3
- package/rating/fesm2015/ngx-bootstrap-rating.js.map +1 -1
- package/rating/fesm5/ngx-bootstrap-rating.js +6 -3
- package/rating/fesm5/ngx-bootstrap-rating.js.map +1 -1
- package/rating/ngx-bootstrap-rating.metadata.json +1 -1
- package/rating/package.json +2 -2
- package/rating/rating.module.d.ts +1 -1
- package/schematics/ng-add/index.spec.js +30 -27
- package/schematics/ng-add/index.spec.js.map +1 -1
- package/schematics/utils/index.js +18 -5
- package/schematics/utils/index.js.map +1 -1
- package/sortable/bundles/ngx-bootstrap-sortable.umd.js.map +1 -1
- package/sortable/bundles/ngx-bootstrap-sortable.umd.min.js.map +1 -1
- package/sortable/esm2015/sortable.module.js +1 -1
- package/sortable/esm5/sortable.component.js +4 -4
- package/sortable/esm5/sortable.module.js +1 -1
- package/sortable/fesm2015/ngx-bootstrap-sortable.js.map +1 -1
- package/sortable/fesm5/ngx-bootstrap-sortable.js.map +1 -1
- package/sortable/package.json +2 -2
- package/sortable/sortable.component.d.ts +2 -1
- package/sortable/sortable.module.d.ts +1 -1
- package/tabs/bundles/ngx-bootstrap-tabs.umd.js +40 -3
- package/tabs/bundles/ngx-bootstrap-tabs.umd.js.map +1 -1
- package/tabs/bundles/ngx-bootstrap-tabs.umd.min.js +1 -1
- package/tabs/bundles/ngx-bootstrap-tabs.umd.min.js.map +1 -1
- package/tabs/esm2015/tab.directive.js +2 -2
- package/tabs/esm2015/tabs.module.js +2 -3
- package/tabs/esm2015/tabset.component.js +22 -1
- package/tabs/esm2015/tabset.config.js +15 -2
- package/tabs/esm5/tab.directive.js +2 -2
- package/tabs/esm5/tabs.module.js +2 -3
- package/tabs/esm5/tabset.component.js +26 -1
- package/tabs/esm5/tabset.config.js +15 -2
- package/tabs/fesm2015/ngx-bootstrap-tabs.js +37 -4
- package/tabs/fesm2015/ngx-bootstrap-tabs.js.map +1 -1
- package/tabs/fesm5/ngx-bootstrap-tabs.js +41 -4
- package/tabs/fesm5/ngx-bootstrap-tabs.js.map +1 -1
- package/tabs/ng-transclude.directive.d.ts +2 -2
- package/tabs/ngx-bootstrap-tabs.metadata.json +1 -1
- package/tabs/package.json +2 -2
- package/tabs/tab.directive.d.ts +5 -3
- package/tabs/tabs.module.d.ts +1 -1
- package/tabs/tabset.component.d.ts +9 -3
- package/tabs/tabset.config.d.ts +2 -0
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.js +11 -6
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.js.map +1 -1
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.min.js +1 -1
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.min.js.map +1 -1
- package/timepicker/esm2015/timepicker-controls.util.js +4 -2
- package/timepicker/esm2015/timepicker.component.js +2 -2
- package/timepicker/esm2015/timepicker.config.js +8 -4
- package/timepicker/esm2015/timepicker.module.js +2 -3
- package/timepicker/esm5/reducer/timepicker.store.js +3 -3
- package/timepicker/esm5/timepicker-controls.util.js +4 -2
- package/timepicker/esm5/timepicker.component.js +2 -2
- package/timepicker/esm5/timepicker.config.js +8 -4
- package/timepicker/esm5/timepicker.module.js +2 -3
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.js +12 -7
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.js.map +1 -1
- package/timepicker/fesm5/ngx-bootstrap-timepicker.js +12 -7
- package/timepicker/fesm5/ngx-bootstrap-timepicker.js.map +1 -1
- package/timepicker/ngx-bootstrap-timepicker.metadata.json +1 -1
- package/timepicker/package.json +2 -2
- package/timepicker/timepicker.component.d.ts +3 -3
- package/timepicker/timepicker.config.d.ts +1 -1
- package/timepicker/timepicker.module.d.ts +1 -1
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.js +5 -2
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.js.map +1 -1
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.min.js +1 -1
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.min.js.map +1 -1
- package/tooltip/esm2015/tooltip.config.js +6 -2
- package/tooltip/esm2015/tooltip.directive.js +3 -3
- package/tooltip/esm2015/tooltip.module.js +2 -3
- package/tooltip/esm5/tooltip.config.js +6 -2
- package/tooltip/esm5/tooltip.directive.js +3 -3
- package/tooltip/esm5/tooltip.module.js +2 -3
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.js +6 -3
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.js.map +1 -1
- package/tooltip/fesm5/ngx-bootstrap-tooltip.js +6 -3
- package/tooltip/fesm5/ngx-bootstrap-tooltip.js.map +1 -1
- package/tooltip/ngx-bootstrap-tooltip.metadata.json +1 -1
- package/tooltip/package.json +2 -2
- package/tooltip/tooltip-container.component.d.ts +1 -1
- package/tooltip/tooltip.directive.d.ts +15 -10
- package/tooltip/tooltip.module.d.ts +1 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.js +170 -19
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.js.map +1 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.min.js +1 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.min.js.map +1 -1
- package/typeahead/esm2015/typeahead-utils.js +35 -4
- package/typeahead/esm2015/typeahead.config.js +6 -2
- package/typeahead/esm2015/typeahead.directive.js +121 -16
- package/typeahead/esm2015/typeahead.module.js +2 -3
- package/typeahead/esm5/typeahead-utils.js +37 -6
- package/typeahead/esm5/typeahead.config.js +6 -2
- package/typeahead/esm5/typeahead.directive.js +135 -18
- package/typeahead/esm5/typeahead.module.js +2 -3
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.js +160 -21
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.js.map +1 -1
- package/typeahead/fesm5/ngx-bootstrap-typeahead.js +172 -21
- package/typeahead/fesm5/ngx-bootstrap-typeahead.js.map +1 -1
- package/typeahead/ngx-bootstrap-typeahead.metadata.json +1 -1
- package/typeahead/package.json +2 -2
- package/typeahead/typeahead-container.component.d.ts +14 -12
- package/typeahead/typeahead-utils.d.ts +1 -1
- package/typeahead/typeahead.directive.d.ts +20 -1
- package/typeahead/typeahead.module.d.ts +1 -1
- package/utils/package.json +2 -2
@@ -1,14 +1,15 @@
|
|
1
|
-
import { Injectable, EventEmitter, Component, Renderer2, ElementRef, Directive, ViewContainerRef, Input, Output, forwardRef, Host, ChangeDetectorRef, ChangeDetectionStrategy, NgModule, ViewChild } from '@angular/core';
|
1
|
+
import { Injectable, ɵɵdefineInjectable, EventEmitter, Component, Renderer2, ElementRef, Directive, ViewContainerRef, Input, Output, forwardRef, Host, ChangeDetectorRef, ChangeDetectionStrategy, NgModule, ViewChild } from '@angular/core';
|
2
2
|
import { __values, __spread, __extends } from 'tslib';
|
3
|
-
import { filter, map, take, takeUntil } from 'rxjs/operators';
|
4
|
-
import {
|
5
|
-
import { BehaviorSubject, Subject } from 'rxjs';
|
6
|
-
import { MiniState, MiniStore } from 'ngx-bootstrap/mini-ngrx';
|
3
|
+
import { filter, map, take, takeUntil, distinctUntilChanged } from 'rxjs/operators';
|
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';
|
7
5
|
import { PositioningService } from 'ngx-bootstrap/positioning';
|
8
6
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
7
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
8
|
+
import { MiniState, MiniStore } from 'ngx-bootstrap/mini-ngrx';
|
9
9
|
import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
|
10
10
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
|
11
11
|
import { CommonModule } from '@angular/common';
|
12
|
+
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
12
13
|
import { isBs3 } from 'ngx-bootstrap/utils';
|
13
14
|
|
14
15
|
/**
|
@@ -33,6 +34,10 @@ var BsDatepickerConfig = /** @class */ (function () {
|
|
33
34
|
* turn on/off animation
|
34
35
|
*/
|
35
36
|
this.isAnimated = false;
|
37
|
+
/**
|
38
|
+
* The view that the datepicker should start in
|
39
|
+
*/
|
40
|
+
this.startView = 'day';
|
36
41
|
/**
|
37
42
|
* If true, returns focus to the datepicker / daterangepicker input after date selection
|
38
43
|
*/
|
@@ -62,10 +67,41 @@ var BsDatepickerConfig = /** @class */ (function () {
|
|
62
67
|
this.monthLabel = 'MMMM';
|
63
68
|
this.yearLabel = 'YYYY';
|
64
69
|
this.weekNumbers = 'w';
|
70
|
+
/**
|
71
|
+
* Shows 'today' button
|
72
|
+
*/
|
73
|
+
this.showTodayButton = false;
|
74
|
+
/**
|
75
|
+
* Shows clear button
|
76
|
+
*/
|
77
|
+
this.showClearButton = false;
|
78
|
+
/**
|
79
|
+
* Positioning of 'today' button
|
80
|
+
*/
|
81
|
+
this.todayPosition = 'center';
|
82
|
+
/**
|
83
|
+
* Positioning of 'clear' button
|
84
|
+
*/
|
85
|
+
this.clearPosition = 'right';
|
86
|
+
/**
|
87
|
+
* Label for 'today' button
|
88
|
+
*/
|
89
|
+
this.todayButtonLabel = 'Today';
|
90
|
+
/**
|
91
|
+
* Label for 'clear' button
|
92
|
+
*/
|
93
|
+
this.clearButtonLabel = 'Clear';
|
94
|
+
/**
|
95
|
+
* Label for 'custom range' button
|
96
|
+
*/
|
97
|
+
this.customRangeButtonLabel = 'Custom Range';
|
65
98
|
}
|
66
99
|
BsDatepickerConfig.decorators = [
|
67
|
-
{ type: Injectable
|
100
|
+
{ type: Injectable, args: [{
|
101
|
+
providedIn: 'root'
|
102
|
+
},] }
|
68
103
|
];
|
104
|
+
/** @nocollapse */ BsDatepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDatepickerConfig_Factory() { return new BsDatepickerConfig(); }, token: BsDatepickerConfig, providedIn: "root" });
|
69
105
|
return BsDatepickerConfig;
|
70
106
|
}());
|
71
107
|
if (false) {
|
@@ -98,11 +134,21 @@ if (false) {
|
|
98
134
|
* @type {?}
|
99
135
|
*/
|
100
136
|
BsDatepickerConfig.prototype.maxDate;
|
137
|
+
/**
|
138
|
+
* The view that the datepicker should start in
|
139
|
+
* @type {?}
|
140
|
+
*/
|
141
|
+
BsDatepickerConfig.prototype.startView;
|
101
142
|
/**
|
102
143
|
* Default date custom classes for all date/range pickers
|
103
144
|
* @type {?}
|
104
145
|
*/
|
105
146
|
BsDatepickerConfig.prototype.dateCustomClasses;
|
147
|
+
/**
|
148
|
+
* Default tooltip text for all date/range pickers
|
149
|
+
* @type {?}
|
150
|
+
*/
|
151
|
+
BsDatepickerConfig.prototype.dateTooltipTexts;
|
106
152
|
/**
|
107
153
|
* Disable specific days, e.g. [0,6] will disable all Saturdays and Sundays
|
108
154
|
* @type {?}
|
@@ -187,6 +233,11 @@ if (false) {
|
|
187
233
|
* @type {?}
|
188
234
|
*/
|
189
235
|
BsDatepickerConfig.prototype.ranges;
|
236
|
+
/**
|
237
|
+
* Max Date Range in days
|
238
|
+
* @type {?}
|
239
|
+
*/
|
240
|
+
BsDatepickerConfig.prototype.maxDateRange;
|
190
241
|
/** @type {?} */
|
191
242
|
BsDatepickerConfig.prototype.monthTitle;
|
192
243
|
/** @type {?} */
|
@@ -199,8 +250,64 @@ if (false) {
|
|
199
250
|
BsDatepickerConfig.prototype.yearLabel;
|
200
251
|
/** @type {?} */
|
201
252
|
BsDatepickerConfig.prototype.weekNumbers;
|
253
|
+
/**
|
254
|
+
* Shows 'today' button
|
255
|
+
* @type {?}
|
256
|
+
*/
|
257
|
+
BsDatepickerConfig.prototype.showTodayButton;
|
258
|
+
/**
|
259
|
+
* Shows clear button
|
260
|
+
* @type {?}
|
261
|
+
*/
|
262
|
+
BsDatepickerConfig.prototype.showClearButton;
|
263
|
+
/**
|
264
|
+
* Positioning of 'today' button
|
265
|
+
* @type {?}
|
266
|
+
*/
|
267
|
+
BsDatepickerConfig.prototype.todayPosition;
|
268
|
+
/**
|
269
|
+
* Positioning of 'clear' button
|
270
|
+
* @type {?}
|
271
|
+
*/
|
272
|
+
BsDatepickerConfig.prototype.clearPosition;
|
273
|
+
/**
|
274
|
+
* Label for 'today' button
|
275
|
+
* @type {?}
|
276
|
+
*/
|
277
|
+
BsDatepickerConfig.prototype.todayButtonLabel;
|
278
|
+
/**
|
279
|
+
* Label for 'clear' button
|
280
|
+
* @type {?}
|
281
|
+
*/
|
282
|
+
BsDatepickerConfig.prototype.clearButtonLabel;
|
283
|
+
/**
|
284
|
+
* Label for 'custom range' button
|
285
|
+
* @type {?}
|
286
|
+
*/
|
287
|
+
BsDatepickerConfig.prototype.customRangeButtonLabel;
|
202
288
|
}
|
203
289
|
|
290
|
+
/**
|
291
|
+
* @fileoverview added by tsickle
|
292
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
293
|
+
*/
|
294
|
+
/** @type {?} */
|
295
|
+
var DATEPICKER_ANIMATION_TIMING = '220ms cubic-bezier(0, 0, 0.2, 1)';
|
296
|
+
/** @type {?} */
|
297
|
+
var datepickerAnimation = trigger('datepickerAnimation', [
|
298
|
+
state('animated-down', style({ height: '*', overflow: 'hidden' })),
|
299
|
+
transition('* => animated-down', [
|
300
|
+
style({ height: 0, overflow: 'hidden' }),
|
301
|
+
animate(DATEPICKER_ANIMATION_TIMING)
|
302
|
+
]),
|
303
|
+
state('animated-up', style({ height: '*', overflow: 'hidden' })),
|
304
|
+
transition('* => animated-up', [
|
305
|
+
style({ height: '*', overflow: 'hidden' }),
|
306
|
+
animate(DATEPICKER_ANIMATION_TIMING)
|
307
|
+
]),
|
308
|
+
transition('* => unanimated', animate('0s'))
|
309
|
+
]);
|
310
|
+
|
204
311
|
/**
|
205
312
|
* @fileoverview added by tsickle
|
206
313
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
@@ -214,6 +321,7 @@ var /**
|
|
214
321
|
BsDatepickerAbstractComponent = /** @class */ (function () {
|
215
322
|
function BsDatepickerAbstractComponent() {
|
216
323
|
this.customRanges = [];
|
324
|
+
this.chosenRange = [];
|
217
325
|
}
|
218
326
|
Object.defineProperty(BsDatepickerAbstractComponent.prototype, "minDate", {
|
219
327
|
set: /**
|
@@ -292,6 +400,17 @@ BsDatepickerAbstractComponent = /** @class */ (function () {
|
|
292
400
|
enumerable: true,
|
293
401
|
configurable: true
|
294
402
|
});
|
403
|
+
Object.defineProperty(BsDatepickerAbstractComponent.prototype, "dateTooltipTexts", {
|
404
|
+
set: /**
|
405
|
+
* @param {?} value
|
406
|
+
* @return {?}
|
407
|
+
*/
|
408
|
+
function (value) {
|
409
|
+
this._effects.setDateTooltipTexts(value);
|
410
|
+
},
|
411
|
+
enumerable: true,
|
412
|
+
configurable: true
|
413
|
+
});
|
295
414
|
/**
|
296
415
|
* @param {?} event
|
297
416
|
* @return {?}
|
@@ -373,6 +492,29 @@ BsDatepickerAbstractComponent = /** @class */ (function () {
|
|
373
492
|
* @return {?}
|
374
493
|
*/
|
375
494
|
function (event) { };
|
495
|
+
/**
|
496
|
+
* @param {?} dates
|
497
|
+
* @return {?}
|
498
|
+
*/
|
499
|
+
BsDatepickerAbstractComponent.prototype.setRangeOnCalendar = /**
|
500
|
+
* @param {?} dates
|
501
|
+
* @return {?}
|
502
|
+
*/
|
503
|
+
function (dates) { };
|
504
|
+
/**
|
505
|
+
* @return {?}
|
506
|
+
*/
|
507
|
+
BsDatepickerAbstractComponent.prototype.setToday = /**
|
508
|
+
* @return {?}
|
509
|
+
*/
|
510
|
+
function () { };
|
511
|
+
/**
|
512
|
+
* @return {?}
|
513
|
+
*/
|
514
|
+
BsDatepickerAbstractComponent.prototype.clearDate = /**
|
515
|
+
* @return {?}
|
516
|
+
*/
|
517
|
+
function () { };
|
376
518
|
/* tslint:disable-next-line: no-any */
|
377
519
|
/* tslint:disable-next-line: no-any */
|
378
520
|
/**
|
@@ -395,10 +537,26 @@ if (false) {
|
|
395
537
|
/** @type {?} */
|
396
538
|
BsDatepickerAbstractComponent.prototype.isOtherMonthsActive;
|
397
539
|
/** @type {?} */
|
540
|
+
BsDatepickerAbstractComponent.prototype.showTodayBtn;
|
541
|
+
/** @type {?} */
|
542
|
+
BsDatepickerAbstractComponent.prototype.todayBtnLbl;
|
543
|
+
/** @type {?} */
|
544
|
+
BsDatepickerAbstractComponent.prototype.todayPos;
|
545
|
+
/** @type {?} */
|
546
|
+
BsDatepickerAbstractComponent.prototype.showClearBtn;
|
547
|
+
/** @type {?} */
|
548
|
+
BsDatepickerAbstractComponent.prototype.clearBtnLbl;
|
549
|
+
/** @type {?} */
|
550
|
+
BsDatepickerAbstractComponent.prototype.clearPos;
|
551
|
+
/** @type {?} */
|
398
552
|
BsDatepickerAbstractComponent.prototype._effects;
|
399
553
|
/** @type {?} */
|
400
554
|
BsDatepickerAbstractComponent.prototype.customRanges;
|
401
555
|
/** @type {?} */
|
556
|
+
BsDatepickerAbstractComponent.prototype.customRangeBtnLbl;
|
557
|
+
/** @type {?} */
|
558
|
+
BsDatepickerAbstractComponent.prototype.chosenRange;
|
559
|
+
/** @type {?} */
|
402
560
|
BsDatepickerAbstractComponent.prototype.viewMode;
|
403
561
|
/** @type {?} */
|
404
562
|
BsDatepickerAbstractComponent.prototype.daysCalendar;
|
@@ -644,6 +802,20 @@ var BsDatepickerActions = /** @class */ (function () {
|
|
644
802
|
payload: value
|
645
803
|
};
|
646
804
|
};
|
805
|
+
/**
|
806
|
+
* @param {?} value
|
807
|
+
* @return {?}
|
808
|
+
*/
|
809
|
+
BsDatepickerActions.prototype.setDateTooltipTexts = /**
|
810
|
+
* @param {?} value
|
811
|
+
* @return {?}
|
812
|
+
*/
|
813
|
+
function (value) {
|
814
|
+
return {
|
815
|
+
type: BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS,
|
816
|
+
payload: value
|
817
|
+
};
|
818
|
+
};
|
647
819
|
/**
|
648
820
|
* @param {?} locale
|
649
821
|
* @return {?}
|
@@ -674,6 +846,7 @@ var BsDatepickerActions = /** @class */ (function () {
|
|
674
846
|
BsDatepickerActions.SET_DATESENABLED = '[datepicker] set dates enabled';
|
675
847
|
BsDatepickerActions.SET_IS_DISABLED = '[datepicker] set is disabled';
|
676
848
|
BsDatepickerActions.SET_DATE_CUSTOM_CLASSES = '[datepicker] set date custom classes';
|
849
|
+
BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS = '[datepicker] set date tooltip texts';
|
677
850
|
BsDatepickerActions.SET_LOCALE = '[datepicker] set datepicker locale';
|
678
851
|
BsDatepickerActions.SELECT_RANGE = '[daterangepicker] select dates range';
|
679
852
|
BsDatepickerActions.decorators = [
|
@@ -715,6 +888,8 @@ if (false) {
|
|
715
888
|
/** @type {?} */
|
716
889
|
BsDatepickerActions.SET_DATE_CUSTOM_CLASSES;
|
717
890
|
/** @type {?} */
|
891
|
+
BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS;
|
892
|
+
/** @type {?} */
|
718
893
|
BsDatepickerActions.SET_LOCALE;
|
719
894
|
/** @type {?} */
|
720
895
|
BsDatepickerActions.SELECT_RANGE;
|
@@ -928,6 +1103,18 @@ var BsDatepickerEffects = /** @class */ (function () {
|
|
928
1103
|
this._store.dispatch(this._actions.setDateCustomClasses(value));
|
929
1104
|
return this;
|
930
1105
|
};
|
1106
|
+
/**
|
1107
|
+
* @param {?} value
|
1108
|
+
* @return {?}
|
1109
|
+
*/
|
1110
|
+
BsDatepickerEffects.prototype.setDateTooltipTexts = /**
|
1111
|
+
* @param {?} value
|
1112
|
+
* @return {?}
|
1113
|
+
*/
|
1114
|
+
function (value) {
|
1115
|
+
this._store.dispatch(this._actions.setDateTooltipTexts(value));
|
1116
|
+
return this;
|
1117
|
+
};
|
931
1118
|
/* Set rendering options */
|
932
1119
|
/* Set rendering options */
|
933
1120
|
/**
|
@@ -1064,37 +1251,6 @@ var BsDatepickerEffects = /** @class */ (function () {
|
|
1064
1251
|
function (event) {
|
1065
1252
|
event.cell.isHovered = event.isHovered;
|
1066
1253
|
});
|
1067
|
-
container.monthSelectHandler = (/**
|
1068
|
-
* @param {?} event
|
1069
|
-
* @return {?}
|
1070
|
-
*/
|
1071
|
-
function (event) {
|
1072
|
-
if (event.isDisabled) {
|
1073
|
-
return;
|
1074
|
-
}
|
1075
|
-
_this._store.dispatch(_this._actions.navigateTo({
|
1076
|
-
unit: {
|
1077
|
-
month: getMonth(event.date),
|
1078
|
-
year: getFullYear(event.date)
|
1079
|
-
},
|
1080
|
-
viewMode: 'day'
|
1081
|
-
}));
|
1082
|
-
});
|
1083
|
-
container.yearSelectHandler = (/**
|
1084
|
-
* @param {?} event
|
1085
|
-
* @return {?}
|
1086
|
-
*/
|
1087
|
-
function (event) {
|
1088
|
-
if (event.isDisabled) {
|
1089
|
-
return;
|
1090
|
-
}
|
1091
|
-
_this._store.dispatch(_this._actions.navigateTo({
|
1092
|
-
unit: {
|
1093
|
-
year: getFullYear(event.date)
|
1094
|
-
},
|
1095
|
-
viewMode: 'month'
|
1096
|
-
}));
|
1097
|
-
});
|
1098
1254
|
return this;
|
1099
1255
|
};
|
1100
1256
|
/**
|
@@ -1245,6 +1401,23 @@ var BsDatepickerEffects = /** @class */ (function () {
|
|
1245
1401
|
* @return {?}
|
1246
1402
|
*/
|
1247
1403
|
function (dateCustomClasses) { return _this._store.dispatch(_this._actions.flag()); })));
|
1404
|
+
// date tooltip texts
|
1405
|
+
this._subs.push(this._store
|
1406
|
+
.select((/**
|
1407
|
+
* @param {?} state
|
1408
|
+
* @return {?}
|
1409
|
+
*/
|
1410
|
+
function (state) { return state.dateTooltipTexts; }))
|
1411
|
+
.pipe(filter((/**
|
1412
|
+
* @param {?} dateTooltipTexts
|
1413
|
+
* @return {?}
|
1414
|
+
*/
|
1415
|
+
function (dateTooltipTexts) { return !!dateTooltipTexts; })))
|
1416
|
+
.subscribe((/**
|
1417
|
+
* @param {?} dateTooltipTexts
|
1418
|
+
* @return {?}
|
1419
|
+
*/
|
1420
|
+
function (dateTooltipTexts) { return _this._store.dispatch(_this._actions.flag()); })));
|
1248
1421
|
// on locale change
|
1249
1422
|
this._subs.push(this._localeService.localeChange
|
1250
1423
|
.subscribe((/**
|
@@ -1372,6 +1545,8 @@ if (false) {
|
|
1372
1545
|
/** @type {?} */
|
1373
1546
|
BsDatepickerState.prototype.dateCustomClasses;
|
1374
1547
|
/** @type {?} */
|
1548
|
+
BsDatepickerState.prototype.dateTooltipTexts;
|
1549
|
+
/** @type {?} */
|
1375
1550
|
BsDatepickerState.prototype.hoveredDate;
|
1376
1551
|
/** @type {?} */
|
1377
1552
|
BsDatepickerState.prototype.hoveredMonth;
|
@@ -1698,6 +1873,8 @@ if (false) {
|
|
1698
1873
|
FlagDaysCalendarOptions.prototype.monthIndex;
|
1699
1874
|
/** @type {?} */
|
1700
1875
|
FlagDaysCalendarOptions.prototype.dateCustomClasses;
|
1876
|
+
/** @type {?} */
|
1877
|
+
FlagDaysCalendarOptions.prototype.dateTooltipTexts;
|
1701
1878
|
}
|
1702
1879
|
/**
|
1703
1880
|
* @param {?} formattedMonth
|
@@ -1765,6 +1942,21 @@ function flagDaysCalendar(formattedMonth, options) {
|
|
1765
1942
|
function (previousValue, currentValue) { return previousValue.concat(currentValue); }), [])
|
1766
1943
|
.join(' ')
|
1767
1944
|
|| '';
|
1945
|
+
/** @type {?} */
|
1946
|
+
var tooltipText = options.dateTooltipTexts && options.dateTooltipTexts
|
1947
|
+
.map((/**
|
1948
|
+
* @param {?} tt
|
1949
|
+
* @return {?}
|
1950
|
+
*/
|
1951
|
+
function (tt) { return isSameDay(day.date, tt.date) ? tt.tooltipText : ''; }))
|
1952
|
+
.reduce((/**
|
1953
|
+
* @param {?} previousValue
|
1954
|
+
* @param {?} currentValue
|
1955
|
+
* @return {?}
|
1956
|
+
*/
|
1957
|
+
function (previousValue, currentValue) { return previousValue.concat(currentValue); }), [])
|
1958
|
+
.join(' ')
|
1959
|
+
|| '';
|
1768
1960
|
// decide update or not
|
1769
1961
|
/** @type {?} */
|
1770
1962
|
var newDay = Object.assign({}, day, {
|
@@ -1776,7 +1968,8 @@ function flagDaysCalendar(formattedMonth, options) {
|
|
1776
1968
|
isInRange: isInRange,
|
1777
1969
|
isDisabled: isDisabled,
|
1778
1970
|
isToday: isToday,
|
1779
|
-
customClasses: customClasses
|
1971
|
+
customClasses: customClasses,
|
1972
|
+
tooltipText: tooltipText
|
1780
1973
|
});
|
1781
1974
|
if (day.isOtherMonth !== newDay.isOtherMonth ||
|
1782
1975
|
day.isHovered !== newDay.isHovered ||
|
@@ -1785,7 +1978,8 @@ function flagDaysCalendar(formattedMonth, options) {
|
|
1785
1978
|
day.isSelectionEnd !== newDay.isSelectionEnd ||
|
1786
1979
|
day.isDisabled !== newDay.isDisabled ||
|
1787
1980
|
day.isInRange !== newDay.isInRange ||
|
1788
|
-
day.customClasses !== newDay.customClasses
|
1981
|
+
day.customClasses !== newDay.customClasses ||
|
1982
|
+
day.tooltipText !== newDay.tooltipText) {
|
1789
1983
|
week.days[dayIndex] = newDay;
|
1790
1984
|
}
|
1791
1985
|
}));
|
@@ -1890,6 +2084,8 @@ if (false) {
|
|
1890
2084
|
/** @type {?} */
|
1891
2085
|
FlagMonthCalendarOptions.prototype.selectedDate;
|
1892
2086
|
/** @type {?} */
|
2087
|
+
FlagMonthCalendarOptions.prototype.selectedRange;
|
2088
|
+
/** @type {?} */
|
1893
2089
|
FlagMonthCalendarOptions.prototype.displayMonths;
|
1894
2090
|
/** @type {?} */
|
1895
2091
|
FlagMonthCalendarOptions.prototype.monthIndex;
|
@@ -1912,13 +2108,22 @@ function flagMonthsCalendar(monthCalendar, options) {
|
|
1912
2108
|
* @return {?}
|
1913
2109
|
*/
|
1914
2110
|
function (month, monthIndex) {
|
2111
|
+
/** @type {?} */
|
2112
|
+
var isSelected;
|
1915
2113
|
/** @type {?} */
|
1916
2114
|
var isHovered = isSameMonth(month.date, options.hoveredMonth);
|
1917
2115
|
/** @type {?} */
|
1918
2116
|
var isDisabled = options.isDisabled ||
|
1919
2117
|
isMonthDisabled(month.date, options.minDate, options.maxDate);
|
1920
|
-
|
1921
|
-
|
2118
|
+
if (!options.selectedDate && options.selectedRange) {
|
2119
|
+
isSelected = isSameMonth(month.date, options.selectedRange[0]);
|
2120
|
+
if (!isSelected) {
|
2121
|
+
isSelected = isSameMonth(month.date, options.selectedRange[1]);
|
2122
|
+
}
|
2123
|
+
}
|
2124
|
+
else {
|
2125
|
+
isSelected = isSameMonth(month.date, options.selectedDate);
|
2126
|
+
}
|
1922
2127
|
/** @type {?} */
|
1923
2128
|
var newMonth = Object.assign(/*{},*/ month, {
|
1924
2129
|
isHovered: isHovered,
|
@@ -2031,6 +2236,8 @@ if (false) {
|
|
2031
2236
|
/** @type {?} */
|
2032
2237
|
FlagYearsCalendarOptions.prototype.selectedDate;
|
2033
2238
|
/** @type {?} */
|
2239
|
+
FlagYearsCalendarOptions.prototype.selectedRange;
|
2240
|
+
/** @type {?} */
|
2034
2241
|
FlagYearsCalendarOptions.prototype.displayMonths;
|
2035
2242
|
/** @type {?} */
|
2036
2243
|
FlagYearsCalendarOptions.prototype.yearIndex;
|
@@ -2053,13 +2260,22 @@ function flagYearsCalendar(yearsCalendar, options) {
|
|
2053
2260
|
* @return {?}
|
2054
2261
|
*/
|
2055
2262
|
function (year, yearIndex) {
|
2263
|
+
/** @type {?} */
|
2264
|
+
var isSelected;
|
2056
2265
|
/** @type {?} */
|
2057
2266
|
var isHovered = isSameYear(year.date, options.hoveredYear);
|
2058
2267
|
/** @type {?} */
|
2059
2268
|
var isDisabled = options.isDisabled ||
|
2060
2269
|
isYearDisabled(year.date, options.minDate, options.maxDate);
|
2061
|
-
|
2062
|
-
|
2270
|
+
if (!options.selectedDate && options.selectedRange) {
|
2271
|
+
isSelected = isSameYear(year.date, options.selectedRange[0]);
|
2272
|
+
if (!isSelected) {
|
2273
|
+
isSelected = isSameYear(year.date, options.selectedRange[1]);
|
2274
|
+
}
|
2275
|
+
}
|
2276
|
+
else {
|
2277
|
+
isSelected = isSameYear(year.date, options.selectedDate);
|
2278
|
+
}
|
2063
2279
|
/** @type {?} */
|
2064
2280
|
var newMonth = Object.assign(/*{},*/ year, { isHovered: isHovered, isDisabled: isDisabled, isSelected: isSelected });
|
2065
2281
|
if (year.isHovered !== newMonth.isHovered ||
|
@@ -2222,6 +2438,11 @@ function bsDatepickerReducer(state, action) {
|
|
2222
2438
|
dateCustomClasses: action.payload
|
2223
2439
|
});
|
2224
2440
|
}
|
2441
|
+
case BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS: {
|
2442
|
+
return Object.assign({}, state, {
|
2443
|
+
dateTooltipTexts: action.payload
|
2444
|
+
});
|
2445
|
+
}
|
2225
2446
|
default:
|
2226
2447
|
return state;
|
2227
2448
|
}
|
@@ -2239,7 +2460,7 @@ function calculateReducer(state) {
|
|
2239
2460
|
/** @type {?} */
|
2240
2461
|
var viewDate = state.view.date;
|
2241
2462
|
if (state.view.mode === 'day') {
|
2242
|
-
if (state.showPreviousMonth && state.selectedRange.length === 0) {
|
2463
|
+
if (state.showPreviousMonth && state.selectedRange && state.selectedRange.length === 0) {
|
2243
2464
|
viewDate = shiftDate(viewDate, { month: -1 });
|
2244
2465
|
}
|
2245
2466
|
state.monthViewOptions.firstDayOfWeek = getLocale(state.locale).firstDayOfWeek();
|
@@ -2349,6 +2570,7 @@ function flagReducer(state, action) {
|
|
2349
2570
|
selectedRange: state.selectedRange,
|
2350
2571
|
displayMonths: displayMonths,
|
2351
2572
|
dateCustomClasses: state.dateCustomClasses,
|
2573
|
+
dateTooltipTexts: state.dateTooltipTexts,
|
2352
2574
|
monthIndex: monthIndex
|
2353
2575
|
});
|
2354
2576
|
}));
|
@@ -2368,6 +2590,7 @@ function flagReducer(state, action) {
|
|
2368
2590
|
maxDate: state.maxDate,
|
2369
2591
|
hoveredMonth: state.hoveredMonth,
|
2370
2592
|
selectedDate: state.selectedDate,
|
2593
|
+
selectedRange: state.selectedRange,
|
2371
2594
|
displayMonths: displayMonths,
|
2372
2595
|
monthIndex: monthIndex
|
2373
2596
|
});
|
@@ -2388,6 +2611,7 @@ function flagReducer(state, action) {
|
|
2388
2611
|
maxDate: state.maxDate,
|
2389
2612
|
hoveredYear: state.hoveredYear,
|
2390
2613
|
selectedDate: state.selectedDate,
|
2614
|
+
selectedRange: state.selectedRange,
|
2391
2615
|
displayMonths: displayMonths,
|
2392
2616
|
yearIndex: yearIndex
|
2393
2617
|
});
|
@@ -2503,27 +2727,6 @@ var BsDatepickerStore = /** @class */ (function (_super) {
|
|
2503
2727
|
return BsDatepickerStore;
|
2504
2728
|
}(MiniStore));
|
2505
2729
|
|
2506
|
-
/**
|
2507
|
-
* @fileoverview added by tsickle
|
2508
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
2509
|
-
*/
|
2510
|
-
/** @type {?} */
|
2511
|
-
var DATEPICKER_ANIMATION_TIMING = '220ms cubic-bezier(0, 0, 0.2, 1)';
|
2512
|
-
/** @type {?} */
|
2513
|
-
var datepickerAnimation = trigger('datepickerAnimation', [
|
2514
|
-
state('animated-down', style({ height: '*', overflow: 'hidden' })),
|
2515
|
-
transition('* => animated-down', [
|
2516
|
-
style({ height: 0, overflow: 'hidden' }),
|
2517
|
-
animate(DATEPICKER_ANIMATION_TIMING)
|
2518
|
-
]),
|
2519
|
-
state('animated-up', style({ height: '*', overflow: 'hidden' })),
|
2520
|
-
transition('* => animated-up', [
|
2521
|
-
style({ height: '*', overflow: 'hidden' }),
|
2522
|
-
animate(DATEPICKER_ANIMATION_TIMING)
|
2523
|
-
]),
|
2524
|
-
transition('* => unanimated', animate('0s'))
|
2525
|
-
]);
|
2526
|
-
|
2527
2730
|
/**
|
2528
2731
|
* @fileoverview added by tsickle
|
2529
2732
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
@@ -2583,6 +2786,13 @@ var BsDatepickerContainerComponent = /** @class */ (function (_super) {
|
|
2583
2786
|
}));
|
2584
2787
|
this.isOtherMonthsActive = this._config.selectFromOtherMonth;
|
2585
2788
|
this.containerClass = this._config.containerClass;
|
2789
|
+
this.showTodayBtn = this._config.showTodayButton;
|
2790
|
+
this.todayBtnLbl = this._config.todayButtonLabel;
|
2791
|
+
this.todayPos = this._config.todayPosition;
|
2792
|
+
this.showClearBtn = this._config.showClearButton;
|
2793
|
+
this.clearBtnLbl = this._config.clearButtonLabel;
|
2794
|
+
this.clearPos = this._config.clearPosition;
|
2795
|
+
this.customRangeBtnLbl = this._config.customRangeButtonLabel;
|
2586
2796
|
this._effects
|
2587
2797
|
.init(this._store)
|
2588
2798
|
// intial state options
|
@@ -2607,6 +2817,7 @@ var BsDatepickerContainerComponent = /** @class */ (function (_super) {
|
|
2607
2817
|
* @return {?}
|
2608
2818
|
*/
|
2609
2819
|
function (date) { return _this.valueChange.emit(date); })));
|
2820
|
+
this._store.dispatch(this._actions.changeViewMode(this._config.startView));
|
2610
2821
|
};
|
2611
2822
|
Object.defineProperty(BsDatepickerContainerComponent.prototype, "isTopPosition", {
|
2612
2823
|
get: /**
|
@@ -2646,6 +2857,63 @@ var BsDatepickerContainerComponent = /** @class */ (function (_super) {
|
|
2646
2857
|
}
|
2647
2858
|
this._store.dispatch(this._actions.select(day.date));
|
2648
2859
|
};
|
2860
|
+
/**
|
2861
|
+
* @param {?} day
|
2862
|
+
* @return {?}
|
2863
|
+
*/
|
2864
|
+
BsDatepickerContainerComponent.prototype.monthSelectHandler = /**
|
2865
|
+
* @param {?} day
|
2866
|
+
* @return {?}
|
2867
|
+
*/
|
2868
|
+
function (day) {
|
2869
|
+
if (!day || day.isDisabled) {
|
2870
|
+
return;
|
2871
|
+
}
|
2872
|
+
this._store.dispatch(this._actions.navigateTo({
|
2873
|
+
unit: {
|
2874
|
+
month: getMonth(day.date),
|
2875
|
+
year: getFullYear(day.date)
|
2876
|
+
},
|
2877
|
+
viewMode: 'day'
|
2878
|
+
}));
|
2879
|
+
};
|
2880
|
+
/**
|
2881
|
+
* @param {?} day
|
2882
|
+
* @return {?}
|
2883
|
+
*/
|
2884
|
+
BsDatepickerContainerComponent.prototype.yearSelectHandler = /**
|
2885
|
+
* @param {?} day
|
2886
|
+
* @return {?}
|
2887
|
+
*/
|
2888
|
+
function (day) {
|
2889
|
+
if (!day || day.isDisabled) {
|
2890
|
+
return;
|
2891
|
+
}
|
2892
|
+
this._store.dispatch(this._actions.navigateTo({
|
2893
|
+
unit: {
|
2894
|
+
year: getFullYear(day.date)
|
2895
|
+
},
|
2896
|
+
viewMode: 'month'
|
2897
|
+
}));
|
2898
|
+
};
|
2899
|
+
/**
|
2900
|
+
* @return {?}
|
2901
|
+
*/
|
2902
|
+
BsDatepickerContainerComponent.prototype.setToday = /**
|
2903
|
+
* @return {?}
|
2904
|
+
*/
|
2905
|
+
function () {
|
2906
|
+
this._store.dispatch(this._actions.select(new Date()));
|
2907
|
+
};
|
2908
|
+
/**
|
2909
|
+
* @return {?}
|
2910
|
+
*/
|
2911
|
+
BsDatepickerContainerComponent.prototype.clearDate = /**
|
2912
|
+
* @return {?}
|
2913
|
+
*/
|
2914
|
+
function () {
|
2915
|
+
this._store.dispatch(this._actions.select(undefined));
|
2916
|
+
};
|
2649
2917
|
/**
|
2650
2918
|
* @return {?}
|
2651
2919
|
*/
|
@@ -2673,7 +2941,7 @@ var BsDatepickerContainerComponent = /** @class */ (function (_super) {
|
|
2673
2941
|
{ type: Component, args: [{
|
2674
2942
|
selector: 'bs-datepicker-container',
|
2675
2943
|
providers: [BsDatepickerStore, BsDatepickerEffects],
|
2676
|
-
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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 </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges?.length > 0\">\n <bs-custom-date-view
|
2944
|
+
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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?.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",
|
2677
2945
|
host: {
|
2678
2946
|
class: 'bottom',
|
2679
2947
|
'(click)': '_stopPropagation($event)',
|
@@ -2761,6 +3029,7 @@ var BsDatepickerDirective = /** @class */ (function () {
|
|
2761
3029
|
*/
|
2762
3030
|
this.bsValueChange = new EventEmitter();
|
2763
3031
|
this._subs = [];
|
3032
|
+
this._dateInputFormat$ = new Subject();
|
2764
3033
|
// todo: assign only subset of fields
|
2765
3034
|
Object.assign(this, this._config);
|
2766
3035
|
this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
@@ -2808,6 +3077,39 @@ var BsDatepickerDirective = /** @class */ (function () {
|
|
2808
3077
|
enumerable: true,
|
2809
3078
|
configurable: true
|
2810
3079
|
});
|
3080
|
+
Object.defineProperty(BsDatepickerDirective.prototype, "bsConfig", {
|
3081
|
+
get: /**
|
3082
|
+
* @return {?}
|
3083
|
+
*/
|
3084
|
+
function () {
|
3085
|
+
return this._bsConfig;
|
3086
|
+
},
|
3087
|
+
/**
|
3088
|
+
* Config object for datepicker
|
3089
|
+
*/
|
3090
|
+
set: /**
|
3091
|
+
* Config object for datepicker
|
3092
|
+
* @param {?} bsConfig
|
3093
|
+
* @return {?}
|
3094
|
+
*/
|
3095
|
+
function (bsConfig) {
|
3096
|
+
this._bsConfig = bsConfig;
|
3097
|
+
this.setConfig();
|
3098
|
+
this._dateInputFormat$.next(bsConfig && bsConfig.dateInputFormat);
|
3099
|
+
},
|
3100
|
+
enumerable: true,
|
3101
|
+
configurable: true
|
3102
|
+
});
|
3103
|
+
Object.defineProperty(BsDatepickerDirective.prototype, "dateInputFormat$", {
|
3104
|
+
get: /**
|
3105
|
+
* @return {?}
|
3106
|
+
*/
|
3107
|
+
function () {
|
3108
|
+
return this._dateInputFormat$;
|
3109
|
+
},
|
3110
|
+
enumerable: true,
|
3111
|
+
configurable: true
|
3112
|
+
});
|
2811
3113
|
/**
|
2812
3114
|
* @return {?}
|
2813
3115
|
*/
|
@@ -2861,6 +3163,9 @@ var BsDatepickerDirective = /** @class */ (function () {
|
|
2861
3163
|
if (changes.dateCustomClasses) {
|
2862
3164
|
this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
2863
3165
|
}
|
3166
|
+
if (changes.dateTooltipTexts) {
|
3167
|
+
this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
|
3168
|
+
}
|
2864
3169
|
};
|
2865
3170
|
/**
|
2866
3171
|
* @return {?}
|
@@ -2999,6 +3304,7 @@ var BsDatepickerDirective = /** @class */ (function () {
|
|
2999
3304
|
maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
3000
3305
|
daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
|
3001
3306
|
dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3307
|
+
dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
|
3002
3308
|
datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3003
3309
|
datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
3004
3310
|
minMode: this.minMode || this.bsConfig && this.bsConfig.minMode
|
@@ -3051,6 +3357,7 @@ var BsDatepickerDirective = /** @class */ (function () {
|
|
3051
3357
|
datesDisabled: [{ type: Input }],
|
3052
3358
|
datesEnabled: [{ type: Input }],
|
3053
3359
|
dateCustomClasses: [{ type: Input }],
|
3360
|
+
dateTooltipTexts: [{ type: Input }],
|
3054
3361
|
bsValueChange: [{ type: Output }]
|
3055
3362
|
};
|
3056
3363
|
return BsDatepickerDirective;
|
@@ -3095,11 +3402,6 @@ if (false) {
|
|
3095
3402
|
BsDatepickerDirective.prototype.isOpen$;
|
3096
3403
|
/** @type {?} */
|
3097
3404
|
BsDatepickerDirective.prototype.isDestroy$;
|
3098
|
-
/**
|
3099
|
-
* Config object for datepicker
|
3100
|
-
* @type {?}
|
3101
|
-
*/
|
3102
|
-
BsDatepickerDirective.prototype.bsConfig;
|
3103
3405
|
/**
|
3104
3406
|
* Indicates whether datepicker's content is enabled or not
|
3105
3407
|
* @type {?}
|
@@ -3140,6 +3442,11 @@ if (false) {
|
|
3140
3442
|
* @type {?}
|
3141
3443
|
*/
|
3142
3444
|
BsDatepickerDirective.prototype.dateCustomClasses;
|
3445
|
+
/**
|
3446
|
+
* Date tooltip text
|
3447
|
+
* @type {?}
|
3448
|
+
*/
|
3449
|
+
BsDatepickerDirective.prototype.dateTooltipTexts;
|
3143
3450
|
/**
|
3144
3451
|
* Emits when datepicker value has been changed
|
3145
3452
|
* @type {?}
|
@@ -3160,6 +3467,16 @@ if (false) {
|
|
3160
3467
|
* @private
|
3161
3468
|
*/
|
3162
3469
|
BsDatepickerDirective.prototype._datepickerRef;
|
3470
|
+
/**
|
3471
|
+
* @type {?}
|
3472
|
+
* @private
|
3473
|
+
*/
|
3474
|
+
BsDatepickerDirective.prototype._bsConfig;
|
3475
|
+
/**
|
3476
|
+
* @type {?}
|
3477
|
+
* @private
|
3478
|
+
*/
|
3479
|
+
BsDatepickerDirective.prototype._dateInputFormat$;
|
3163
3480
|
/** @type {?} */
|
3164
3481
|
BsDatepickerDirective.prototype._config;
|
3165
3482
|
/**
|
@@ -3184,8 +3501,11 @@ var BsDatepickerInlineConfig = /** @class */ (function (_super) {
|
|
3184
3501
|
return _super !== null && _super.apply(this, arguments) || this;
|
3185
3502
|
}
|
3186
3503
|
BsDatepickerInlineConfig.decorators = [
|
3187
|
-
{ type: Injectable
|
3504
|
+
{ type: Injectable, args: [{
|
3505
|
+
providedIn: 'root'
|
3506
|
+
},] }
|
3188
3507
|
];
|
3508
|
+
/** @nocollapse */ BsDatepickerInlineConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDatepickerInlineConfig_Factory() { return new BsDatepickerInlineConfig(); }, token: BsDatepickerInlineConfig, providedIn: "root" });
|
3189
3509
|
return BsDatepickerInlineConfig;
|
3190
3510
|
}(BsDatepickerConfig));
|
3191
3511
|
|
@@ -3205,7 +3525,7 @@ var BsDatepickerInlineContainerComponent = /** @class */ (function (_super) {
|
|
3205
3525
|
{ type: Component, args: [{
|
3206
3526
|
selector: 'bs-datepicker-inline-container',
|
3207
3527
|
providers: [BsDatepickerStore, BsDatepickerEffects],
|
3208
|
-
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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 </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges?.length > 0\">\n <bs-custom-date-view
|
3528
|
+
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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?.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",
|
3209
3529
|
host: {
|
3210
3530
|
'(click)': '_stopPropagation($event)'
|
3211
3531
|
},
|
@@ -3323,6 +3643,10 @@ var BsDatepickerInlineDirective = /** @class */ (function () {
|
|
3323
3643
|
this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
|
3324
3644
|
this.setConfig();
|
3325
3645
|
}
|
3646
|
+
if (changes.dateTooltipTexts) {
|
3647
|
+
this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
|
3648
|
+
this.setConfig();
|
3649
|
+
}
|
3326
3650
|
};
|
3327
3651
|
/**
|
3328
3652
|
* Set config for datepicker
|
@@ -3345,6 +3669,7 @@ var BsDatepickerInlineDirective = /** @class */ (function () {
|
|
3345
3669
|
minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
|
3346
3670
|
maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
|
3347
3671
|
dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3672
|
+
dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
|
3348
3673
|
datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3349
3674
|
datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled
|
3350
3675
|
});
|
@@ -3384,6 +3709,7 @@ var BsDatepickerInlineDirective = /** @class */ (function () {
|
|
3384
3709
|
minDate: [{ type: Input }],
|
3385
3710
|
maxDate: [{ type: Input }],
|
3386
3711
|
dateCustomClasses: [{ type: Input }],
|
3712
|
+
dateTooltipTexts: [{ type: Input }],
|
3387
3713
|
datesEnabled: [{ type: Input }],
|
3388
3714
|
datesDisabled: [{ type: Input }],
|
3389
3715
|
bsValueChange: [{ type: Output }]
|
@@ -3418,6 +3744,11 @@ if (false) {
|
|
3418
3744
|
* @type {?}
|
3419
3745
|
*/
|
3420
3746
|
BsDatepickerInlineDirective.prototype.dateCustomClasses;
|
3747
|
+
/**
|
3748
|
+
* Date tooltip text
|
3749
|
+
* @type {?}
|
3750
|
+
*/
|
3751
|
+
BsDatepickerInlineDirective.prototype.dateTooltipTexts;
|
3421
3752
|
/**
|
3422
3753
|
* Disable specific dates
|
3423
3754
|
* @type {?}
|
@@ -3474,8 +3805,11 @@ var BsDaterangepickerInlineConfig = /** @class */ (function (_super) {
|
|
3474
3805
|
return _this;
|
3475
3806
|
}
|
3476
3807
|
BsDaterangepickerInlineConfig.decorators = [
|
3477
|
-
{ type: Injectable
|
3808
|
+
{ type: Injectable, args: [{
|
3809
|
+
providedIn: 'root'
|
3810
|
+
},] }
|
3478
3811
|
];
|
3812
|
+
/** @nocollapse */ BsDaterangepickerInlineConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDaterangepickerInlineConfig_Factory() { return new BsDaterangepickerInlineConfig(); }, token: BsDaterangepickerInlineConfig, providedIn: "root" });
|
3479
3813
|
return BsDaterangepickerInlineConfig;
|
3480
3814
|
}(BsDatepickerConfig));
|
3481
3815
|
if (false) {
|
@@ -3508,6 +3842,7 @@ var BsDaterangepickerContainerComponent = /** @class */ (function (_super) {
|
|
3508
3842
|
_this._subs = [];
|
3509
3843
|
_this._effects = _effects;
|
3510
3844
|
_this.customRanges = _this._config.ranges;
|
3845
|
+
_this.customRangeBtnLbl = _this._config.customRangeButtonLabel;
|
3511
3846
|
_renderer.setStyle(_element.nativeElement, 'display', 'block');
|
3512
3847
|
_renderer.setStyle(_element.nativeElement, 'position', 'absolute');
|
3513
3848
|
return _this;
|
@@ -3613,6 +3948,72 @@ var BsDaterangepickerContainerComponent = /** @class */ (function (_super) {
|
|
3613
3948
|
if (isDisabled) {
|
3614
3949
|
return;
|
3615
3950
|
}
|
3951
|
+
this.rangesProcessing(day);
|
3952
|
+
};
|
3953
|
+
/**
|
3954
|
+
* @param {?} day
|
3955
|
+
* @return {?}
|
3956
|
+
*/
|
3957
|
+
BsDaterangepickerContainerComponent.prototype.monthSelectHandler = /**
|
3958
|
+
* @param {?} day
|
3959
|
+
* @return {?}
|
3960
|
+
*/
|
3961
|
+
function (day) {
|
3962
|
+
if (!day) {
|
3963
|
+
return;
|
3964
|
+
}
|
3965
|
+
day.isSelected = true;
|
3966
|
+
if (this._config.minMode !== 'month') {
|
3967
|
+
if (day.isDisabled) {
|
3968
|
+
return;
|
3969
|
+
}
|
3970
|
+
this._store.dispatch(this._actions.navigateTo({
|
3971
|
+
unit: {
|
3972
|
+
month: getMonth(day.date),
|
3973
|
+
year: getFullYear(day.date)
|
3974
|
+
},
|
3975
|
+
viewMode: 'day'
|
3976
|
+
}));
|
3977
|
+
return;
|
3978
|
+
}
|
3979
|
+
this.rangesProcessing(day);
|
3980
|
+
};
|
3981
|
+
/**
|
3982
|
+
* @param {?} day
|
3983
|
+
* @return {?}
|
3984
|
+
*/
|
3985
|
+
BsDaterangepickerContainerComponent.prototype.yearSelectHandler = /**
|
3986
|
+
* @param {?} day
|
3987
|
+
* @return {?}
|
3988
|
+
*/
|
3989
|
+
function (day) {
|
3990
|
+
if (!day) {
|
3991
|
+
return;
|
3992
|
+
}
|
3993
|
+
day.isSelected = true;
|
3994
|
+
if (this._config.minMode !== 'year') {
|
3995
|
+
if (day.isDisabled) {
|
3996
|
+
return;
|
3997
|
+
}
|
3998
|
+
this._store.dispatch(this._actions.navigateTo({
|
3999
|
+
unit: {
|
4000
|
+
year: getFullYear(day.date)
|
4001
|
+
},
|
4002
|
+
viewMode: 'month'
|
4003
|
+
}));
|
4004
|
+
return;
|
4005
|
+
}
|
4006
|
+
this.rangesProcessing(day);
|
4007
|
+
};
|
4008
|
+
/**
|
4009
|
+
* @param {?} day
|
4010
|
+
* @return {?}
|
4011
|
+
*/
|
4012
|
+
BsDaterangepickerContainerComponent.prototype.rangesProcessing = /**
|
4013
|
+
* @param {?} day
|
4014
|
+
* @return {?}
|
4015
|
+
*/
|
4016
|
+
function (day) {
|
3616
4017
|
// if only one date is already selected
|
3617
4018
|
// and user clicks on previous date
|
3618
4019
|
// start selection from new date
|
@@ -3626,6 +4027,9 @@ var BsDaterangepickerContainerComponent = /** @class */ (function (_super) {
|
|
3626
4027
|
}
|
3627
4028
|
if (this._rangeStack.length === 0) {
|
3628
4029
|
this._rangeStack = [day.date];
|
4030
|
+
if (this._config.maxDateRange) {
|
4031
|
+
this.setMaxDateRangeOnCalendar(day.date);
|
4032
|
+
}
|
3629
4033
|
}
|
3630
4034
|
this._store.dispatch(this._actions.selectRange(this._rangeStack));
|
3631
4035
|
if (this._rangeStack.length === 2) {
|
@@ -3667,11 +4071,25 @@ var BsDaterangepickerContainerComponent = /** @class */ (function (_super) {
|
|
3667
4071
|
this._rangeStack = (dates === null) ? [] : (dates.value instanceof Date ? [dates.value] : dates.value);
|
3668
4072
|
this._store.dispatch(this._actions.selectRange(this._rangeStack));
|
3669
4073
|
};
|
4074
|
+
/**
|
4075
|
+
* @param {?} currentSelection
|
4076
|
+
* @return {?}
|
4077
|
+
*/
|
4078
|
+
BsDaterangepickerContainerComponent.prototype.setMaxDateRangeOnCalendar = /**
|
4079
|
+
* @param {?} currentSelection
|
4080
|
+
* @return {?}
|
4081
|
+
*/
|
4082
|
+
function (currentSelection) {
|
4083
|
+
/** @type {?} */
|
4084
|
+
var maxDateRange = new Date(currentSelection);
|
4085
|
+
maxDateRange.setDate(currentSelection.getDate() + this._config.maxDateRange);
|
4086
|
+
this._effects.setMaxDate(maxDateRange);
|
4087
|
+
};
|
3670
4088
|
BsDaterangepickerContainerComponent.decorators = [
|
3671
4089
|
{ type: Component, args: [{
|
3672
4090
|
selector: 'bs-daterangepicker-container',
|
3673
4091
|
providers: [BsDatepickerStore, BsDatepickerEffects],
|
3674
|
-
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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 </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges?.length > 0\">\n <bs-custom-date-view
|
4092
|
+
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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?.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",
|
3675
4093
|
host: {
|
3676
4094
|
class: 'bottom',
|
3677
4095
|
'(click)': '_stopPropagation($event)',
|
@@ -3747,7 +4165,7 @@ var BsDaterangepickerInlineContainerComponent = /** @class */ (function (_super)
|
|
3747
4165
|
{ type: Component, args: [{
|
3748
4166
|
selector: 'bs-daterangepicker-inline-container',
|
3749
4167
|
providers: [BsDatepickerStore, BsDatepickerEffects],
|
3750
|
-
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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 </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges?.length > 0\">\n <bs-custom-date-view
|
4168
|
+
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 <div *ngSwitchCase=\"'day'\" class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar | async\"\n [class.bs-datepicker-multiple]=\"(daysCalendar | async)?.length > 1\"\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\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]=\"(daysCalendar | async)?.length > 1\"\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]=\"(daysCalendar | async)?.length > 1\"\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?.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",
|
3751
4169
|
host: {
|
3752
4170
|
'(click)': '_stopPropagation($event)'
|
3753
4171
|
},
|
@@ -3899,7 +4317,8 @@ var BsDaterangepickerInlineDirective = /** @class */ (function () {
|
|
3899
4317
|
dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
3900
4318
|
datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
3901
4319
|
datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
3902
|
-
ranges: this.bsConfig && this.bsConfig.ranges
|
4320
|
+
ranges: this.bsConfig && this.bsConfig.ranges,
|
4321
|
+
maxDateRange: this.bsConfig && this.bsConfig.maxDateRange
|
3903
4322
|
});
|
3904
4323
|
this._datepickerRef = this._datepicker
|
3905
4324
|
.provide({ provide: BsDatepickerConfig, useValue: this._config })
|
@@ -4073,6 +4492,13 @@ var BsDatepickerInputDirective = /** @class */ (function () {
|
|
4073
4492
|
function () {
|
4074
4493
|
_this._setInputValue(_this._value);
|
4075
4494
|
}));
|
4495
|
+
// update input value on format change
|
4496
|
+
this._picker.dateInputFormat$.pipe(distinctUntilChanged()).subscribe((/**
|
4497
|
+
* @return {?}
|
4498
|
+
*/
|
4499
|
+
function () {
|
4500
|
+
_this._setInputValue(_this._value);
|
4501
|
+
}));
|
4076
4502
|
}
|
4077
4503
|
/**
|
4078
4504
|
* @param {?} event
|
@@ -4330,8 +4756,11 @@ var BsDaterangepickerConfig = /** @class */ (function (_super) {
|
|
4330
4756
|
return _this;
|
4331
4757
|
}
|
4332
4758
|
BsDaterangepickerConfig.decorators = [
|
4333
|
-
{ type: Injectable
|
4759
|
+
{ type: Injectable, args: [{
|
4760
|
+
providedIn: 'root'
|
4761
|
+
},] }
|
4334
4762
|
];
|
4763
|
+
/** @nocollapse */ BsDaterangepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function BsDaterangepickerConfig_Factory() { return new BsDaterangepickerConfig(); }, token: BsDaterangepickerConfig, providedIn: "root" });
|
4335
4764
|
return BsDaterangepickerConfig;
|
4336
4765
|
}(BsDatepickerConfig));
|
4337
4766
|
if (false) {
|
@@ -4371,6 +4800,7 @@ var BsDaterangepickerDirective = /** @class */ (function () {
|
|
4371
4800
|
*/
|
4372
4801
|
this.bsValueChange = new EventEmitter();
|
4373
4802
|
this._subs = [];
|
4803
|
+
this._rangeInputFormat$ = new Subject();
|
4374
4804
|
this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
|
4375
4805
|
Object.assign(this, _config);
|
4376
4806
|
this.onShown = this._datepicker.onShown;
|
@@ -4417,6 +4847,39 @@ var BsDaterangepickerDirective = /** @class */ (function () {
|
|
4417
4847
|
enumerable: true,
|
4418
4848
|
configurable: true
|
4419
4849
|
});
|
4850
|
+
Object.defineProperty(BsDaterangepickerDirective.prototype, "bsConfig", {
|
4851
|
+
get: /**
|
4852
|
+
* @return {?}
|
4853
|
+
*/
|
4854
|
+
function () {
|
4855
|
+
return this._bsConfig;
|
4856
|
+
},
|
4857
|
+
/**
|
4858
|
+
* Config object for daterangepicker
|
4859
|
+
*/
|
4860
|
+
set: /**
|
4861
|
+
* Config object for daterangepicker
|
4862
|
+
* @param {?} bsConfig
|
4863
|
+
* @return {?}
|
4864
|
+
*/
|
4865
|
+
function (bsConfig) {
|
4866
|
+
this._bsConfig = bsConfig;
|
4867
|
+
this.setConfig();
|
4868
|
+
this._rangeInputFormat$.next(bsConfig && bsConfig.rangeInputFormat);
|
4869
|
+
},
|
4870
|
+
enumerable: true,
|
4871
|
+
configurable: true
|
4872
|
+
});
|
4873
|
+
Object.defineProperty(BsDaterangepickerDirective.prototype, "rangeInputFormat$", {
|
4874
|
+
get: /**
|
4875
|
+
* @return {?}
|
4876
|
+
*/
|
4877
|
+
function () {
|
4878
|
+
return this._rangeInputFormat$;
|
4879
|
+
},
|
4880
|
+
enumerable: true,
|
4881
|
+
configurable: true
|
4882
|
+
});
|
4420
4883
|
/**
|
4421
4884
|
* @return {?}
|
4422
4885
|
*/
|
@@ -4560,7 +5023,8 @@ var BsDaterangepickerDirective = /** @class */ (function () {
|
|
4560
5023
|
dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
|
4561
5024
|
datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
|
4562
5025
|
datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
|
4563
|
-
ranges: this.bsConfig && this.bsConfig.ranges
|
5026
|
+
ranges: this.bsConfig && this.bsConfig.ranges,
|
5027
|
+
maxDateRange: this.bsConfig && this.bsConfig.maxDateRange
|
4564
5028
|
});
|
4565
5029
|
};
|
4566
5030
|
/**
|
@@ -4709,11 +5173,6 @@ if (false) {
|
|
4709
5173
|
BsDaterangepickerDirective.prototype.isOpen$;
|
4710
5174
|
/** @type {?} */
|
4711
5175
|
BsDaterangepickerDirective.prototype.isDestroy$;
|
4712
|
-
/**
|
4713
|
-
* Config object for daterangepicker
|
4714
|
-
* @type {?}
|
4715
|
-
*/
|
4716
|
-
BsDaterangepickerDirective.prototype.bsConfig;
|
4717
5176
|
/**
|
4718
5177
|
* Indicates whether daterangepicker's content is enabled or not
|
4719
5178
|
* @type {?}
|
@@ -4769,6 +5228,16 @@ if (false) {
|
|
4769
5228
|
* @private
|
4770
5229
|
*/
|
4771
5230
|
BsDaterangepickerDirective.prototype._datepickerRef;
|
5231
|
+
/**
|
5232
|
+
* @type {?}
|
5233
|
+
* @private
|
5234
|
+
*/
|
5235
|
+
BsDaterangepickerDirective.prototype._bsConfig;
|
5236
|
+
/**
|
5237
|
+
* @type {?}
|
5238
|
+
* @private
|
5239
|
+
*/
|
5240
|
+
BsDaterangepickerDirective.prototype._rangeInputFormat$;
|
4772
5241
|
/** @type {?} */
|
4773
5242
|
BsDaterangepickerDirective.prototype._config;
|
4774
5243
|
/**
|
@@ -4840,6 +5309,13 @@ var BsDaterangepickerInputDirective = /** @class */ (function () {
|
|
4840
5309
|
function () {
|
4841
5310
|
_this._setInputValue(_this._value);
|
4842
5311
|
}));
|
5312
|
+
// update input value on format change
|
5313
|
+
this._picker.rangeInputFormat$.pipe(distinctUntilChanged()).subscribe((/**
|
5314
|
+
* @return {?}
|
5315
|
+
*/
|
5316
|
+
function () {
|
5317
|
+
_this._setInputValue(_this._value);
|
5318
|
+
}));
|
4843
5319
|
}
|
4844
5320
|
/**
|
4845
5321
|
* @param {?} event
|
@@ -4986,9 +5462,9 @@ var BsDaterangepickerInputDirective = /** @class */ (function () {
|
|
4986
5462
|
*/
|
4987
5463
|
function (_val) {
|
4988
5464
|
if (_this._picker._config.useUtc) {
|
4989
|
-
return utcAsLocal(parseDate(_val, _this._picker._config.
|
5465
|
+
return utcAsLocal(parseDate(_val, _this._picker._config.rangeInputFormat, _this._localeService.currentLocale));
|
4990
5466
|
}
|
4991
|
-
return parseDate(_val, _this._picker._config.
|
5467
|
+
return parseDate(_val, _this._picker._config.rangeInputFormat, _this._localeService.currentLocale);
|
4992
5468
|
}))
|
4993
5469
|
.map((/**
|
4994
5470
|
* @param {?} date
|
@@ -5220,13 +5696,14 @@ var BsCustomDatesViewComponent = /** @class */ (function () {
|
|
5220
5696
|
BsCustomDatesViewComponent.decorators = [
|
5221
5697
|
{ type: Component, args: [{
|
5222
5698
|
selector: 'bs-custom-date-view',
|
5223
|
-
template: "\n <div class=\"bs-datepicker-predefined-btns\">\n <button *ngFor=\"let range of ranges\"\n type=\"button\"\n class=\"btn\"\n (click)=\"selectFromRanges(range)\"\n [class.selected]=\"range.value === selectedRange\">\n {{ range.label }}\n </button>\n <button\n type=\"button\"\n class=\"btn\"\n (click)=\"selectFromRanges(customRange)\"\n [class.selected]=\"!checkRange()\">\n
|
5699
|
+
template: "\n <div class=\"bs-datepicker-predefined-btns\">\n <button *ngFor=\"let range of ranges\"\n type=\"button\"\n class=\"btn\"\n (click)=\"selectFromRanges(range)\"\n [class.selected]=\"range.value === selectedRange\">\n {{ range.label }}\n </button>\n <button\n type=\"button\"\n class=\"btn\"\n (click)=\"selectFromRanges(customRange)\"\n [class.selected]=\"!checkRange()\">\n {{customRangeLabel}}\n </button>\n </div>\n ",
|
5224
5700
|
changeDetection: ChangeDetectionStrategy.OnPush
|
5225
5701
|
}] }
|
5226
5702
|
];
|
5227
5703
|
BsCustomDatesViewComponent.propDecorators = {
|
5228
5704
|
ranges: [{ type: Input }],
|
5229
5705
|
selectedRange: [{ type: Input }],
|
5706
|
+
customRangeLabel: [{ type: Input }],
|
5230
5707
|
onSelect: [{ type: Output }]
|
5231
5708
|
};
|
5232
5709
|
return BsCustomDatesViewComponent;
|
@@ -5237,6 +5714,8 @@ if (false) {
|
|
5237
5714
|
/** @type {?} */
|
5238
5715
|
BsCustomDatesViewComponent.prototype.selectedRange;
|
5239
5716
|
/** @type {?} */
|
5717
|
+
BsCustomDatesViewComponent.prototype.customRangeLabel;
|
5718
|
+
/** @type {?} */
|
5240
5719
|
BsCustomDatesViewComponent.prototype.onSelect;
|
5241
5720
|
/** @type {?} */
|
5242
5721
|
BsCustomDatesViewComponent.prototype.customRange;
|
@@ -5387,6 +5866,8 @@ if (false) {
|
|
5387
5866
|
/** @type {?|undefined} */
|
5388
5867
|
DayViewModel.prototype.customClasses;
|
5389
5868
|
/** @type {?|undefined} */
|
5869
|
+
DayViewModel.prototype.tooltipText;
|
5870
|
+
/** @type {?|undefined} */
|
5390
5871
|
DayViewModel.prototype.monthIndex;
|
5391
5872
|
/** @type {?|undefined} */
|
5392
5873
|
DayViewModel.prototype.weekIndex;
|
@@ -5500,6 +5981,16 @@ if (false) {
|
|
5500
5981
|
/** @type {?} */
|
5501
5982
|
DatepickerDateCustomClasses.prototype.classes;
|
5502
5983
|
}
|
5984
|
+
/**
|
5985
|
+
* @record
|
5986
|
+
*/
|
5987
|
+
function DatepickerDateTooltipText() { }
|
5988
|
+
if (false) {
|
5989
|
+
/** @type {?} */
|
5990
|
+
DatepickerDateTooltipText.prototype.date;
|
5991
|
+
/** @type {?} */
|
5992
|
+
DatepickerDateTooltipText.prototype.tooltipText;
|
5993
|
+
}
|
5503
5994
|
/** @enum {number} */
|
5504
5995
|
var BsNavigationDirection = {
|
5505
5996
|
UP: 0,
|
@@ -5604,6 +6095,11 @@ var BsDaysCalendarViewComponent = /** @class */ (function () {
|
|
5604
6095
|
this.onSelect = new EventEmitter();
|
5605
6096
|
this.onHover = new EventEmitter();
|
5606
6097
|
this.onHoverWeek = new EventEmitter();
|
6098
|
+
this.isiOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||
|
6099
|
+
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
|
6100
|
+
if (this._config.dateTooltipTexts && this._config.dateTooltipTexts.length > 0) {
|
6101
|
+
this.isShowTooltip = true;
|
6102
|
+
}
|
5607
6103
|
}
|
5608
6104
|
/**
|
5609
6105
|
* @param {?} event
|
@@ -5734,13 +6230,26 @@ var BsDaysCalendarViewComponent = /** @class */ (function () {
|
|
5734
6230
|
if (this._config.selectFromOtherMonth && cell.isOtherMonth) {
|
5735
6231
|
cell.isOtherMonthHovered = isHovered;
|
5736
6232
|
}
|
6233
|
+
if (this._config.dateTooltipTexts) {
|
6234
|
+
cell.tooltipText = '';
|
6235
|
+
this._config.dateTooltipTexts.forEach((/**
|
6236
|
+
* @param {?} dateData
|
6237
|
+
* @return {?}
|
6238
|
+
*/
|
6239
|
+
function (dateData) {
|
6240
|
+
if (isSameDay(dateData.date, cell.date)) {
|
6241
|
+
cell.tooltipText = dateData.tooltipText;
|
6242
|
+
return;
|
6243
|
+
}
|
6244
|
+
}));
|
6245
|
+
}
|
5737
6246
|
this.onHover.emit({ cell: cell, isHovered: isHovered });
|
5738
6247
|
};
|
5739
6248
|
BsDaysCalendarViewComponent.decorators = [
|
5740
6249
|
{ type: Component, args: [{
|
5741
6250
|
selector: 'bs-days-calendar-view',
|
5742
6251
|
// changeDetection: ChangeDetectionStrategy.OnPush,
|
5743
|
-
template: "\n <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"changeViewMode($event)\"\n ></bs-datepicker-navigation-view>\n\n <!--days matrix-->\n <table role=\"grid\" class=\"days weeks\">\n <thead>\n <tr>\n <!--if show weeks-->\n <th *ngIf=\"options.showWeekNumbers\"></th>\n <th *ngFor=\"let weekday of calendar.weekdays; let i = index\"\n aria-label=\"weekday\">{{ calendar.weekdays[i] }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of calendar.weeks; let i = index\">\n <td class=\"week\" [class.active-week]=\"isWeekHovered\" *ngIf=\"options.showWeekNumbers\">\n <span\n (click)=\"selectWeek(week)\"\n (mouseenter)=\"weekHoverHandler(week, true)\"\n (mouseleave)=\"weekHoverHandler(week, false)\">{{ calendar.weekNumbers[i] }}</span>\n </td>\n <td *ngFor=\"let day of week.days\" role=\"gridcell\">\n
|
6252
|
+
template: "\n <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"changeViewMode($event)\"\n ></bs-datepicker-navigation-view>\n\n <!--days matrix-->\n <table role=\"grid\" class=\"days weeks\">\n <thead>\n <tr>\n <!--if show weeks-->\n <th *ngIf=\"options.showWeekNumbers\"></th>\n <th *ngFor=\"let weekday of calendar.weekdays; let i = index\"\n aria-label=\"weekday\">{{ calendar.weekdays[i] }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let week of calendar.weeks; let i = index\">\n <td class=\"week\" [class.active-week]=\"isWeekHovered\" *ngIf=\"options.showWeekNumbers\">\n <span *ngIf=\"isiOS\" (click)=\"selectWeek(week)\">{{ calendar.weekNumbers[i] }}</span>\n <span *ngIf=\"!isiOS\"\n (click)=\"selectWeek(week)\"\n (mouseenter)=\"weekHoverHandler(week, true)\"\n (mouseleave)=\"weekHoverHandler(week, false)\">{{ calendar.weekNumbers[i] }}</span>\n </td>\n <td *ngFor=\"let day of week.days\" role=\"gridcell\">\n\n <!-- When we want to show tooltips for dates -->\n <span *ngIf=\"!isiOS && isShowTooltip\" bsDatepickerDayDecorator\n [day]=\"day\"\n (click)=\"selectDay(day)\"\n tooltip=\"{{day.tooltipText}}\"\n (mouseenter)=\"hoverDay(day, true)\"\n (mouseleave)=\"hoverDay(day, false)\">{{ day.label }} 3</span>\n <!-- When tooltips for dates are disabled -->\n <span *ngIf=\"!isiOS && !isShowTooltip\" bsDatepickerDayDecorator\n [day]=\"day\"\n (click)=\"selectDay(day)\"\n (mouseenter)=\"hoverDay(day, true)\"\n (mouseleave)=\"hoverDay(day, false)\">{{ day.label }} 2</span>\n\n <!-- For mobile iOS view, tooltips are not needed -->\n <span *ngIf=\"isiOS\" bsDatepickerDayDecorator\n [day]=\"day\"\n (click)=\"selectDay(day)\">{{ day.label }} 1</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n </bs-calendar-layout>\n "
|
5744
6253
|
}] }
|
5745
6254
|
];
|
5746
6255
|
/** @nocollapse */
|
@@ -5775,6 +6284,10 @@ if (false) {
|
|
5775
6284
|
BsDaysCalendarViewComponent.prototype.onHoverWeek;
|
5776
6285
|
/** @type {?} */
|
5777
6286
|
BsDaysCalendarViewComponent.prototype.isWeekHovered;
|
6287
|
+
/** @type {?} */
|
6288
|
+
BsDaysCalendarViewComponent.prototype.isiOS;
|
6289
|
+
/** @type {?} */
|
6290
|
+
BsDaysCalendarViewComponent.prototype.isShowTooltip;
|
5778
6291
|
/**
|
5779
6292
|
* @type {?}
|
5780
6293
|
* @private
|
@@ -6004,10 +6517,6 @@ var BsDatepickerModule = /** @class */ (function () {
|
|
6004
6517
|
PositioningService,
|
6005
6518
|
BsDatepickerStore,
|
6006
6519
|
BsDatepickerActions,
|
6007
|
-
BsDatepickerConfig,
|
6008
|
-
BsDaterangepickerConfig,
|
6009
|
-
BsDatepickerInlineConfig,
|
6010
|
-
BsDaterangepickerInlineConfig,
|
6011
6520
|
BsDatepickerEffects,
|
6012
6521
|
BsLocaleService
|
6013
6522
|
]
|
@@ -6015,7 +6524,7 @@ var BsDatepickerModule = /** @class */ (function () {
|
|
6015
6524
|
};
|
6016
6525
|
BsDatepickerModule.decorators = [
|
6017
6526
|
{ type: NgModule, args: [{
|
6018
|
-
imports: [CommonModule],
|
6527
|
+
imports: [CommonModule, TooltipModule.forRoot()],
|
6019
6528
|
declarations: [
|
6020
6529
|
BsCalendarLayoutComponent,
|
6021
6530
|
BsCurrentDateViewComponent,
|
@@ -6732,8 +7241,11 @@ var DatepickerConfig = /** @class */ (function () {
|
|
6732
7241
|
this.shortcutPropagation = false;
|
6733
7242
|
}
|
6734
7243
|
DatepickerConfig.decorators = [
|
6735
|
-
{ type: Injectable
|
7244
|
+
{ type: Injectable, args: [{
|
7245
|
+
providedIn: 'root'
|
7246
|
+
},] }
|
6736
7247
|
];
|
7248
|
+
/** @nocollapse */ DatepickerConfig.ɵprov = ɵɵdefineInjectable({ factory: function DatepickerConfig_Factory() { return new DatepickerConfig(); }, token: DatepickerConfig, providedIn: "root" });
|
6737
7249
|
return DatepickerConfig;
|
6738
7250
|
}());
|
6739
7251
|
if (false) {
|