ngx-bootstrap 5.4.0 → 5.6.2
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 +138 -99
- package/accordion/bundles/ngx-bootstrap-accordion.umd.js +71 -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/fesm2015/ngx-bootstrap-accordion.js +79 -0
- package/accordion/fesm2015/ngx-bootstrap-accordion.js.map +1 -1
- package/accordion/fesm5/ngx-bootstrap-accordion.js +80 -1
- package/accordion/fesm5/ngx-bootstrap-accordion.js.map +1 -1
- package/accordion/package.json +2 -2
- package/alert/bundles/ngx-bootstrap-alert.umd.js +224 -2
- package/alert/bundles/ngx-bootstrap-alert.umd.js.map +1 -1
- package/alert/bundles/ngx-bootstrap-alert.umd.min.js +15 -1
- package/alert/bundles/ngx-bootstrap-alert.umd.min.js.map +1 -1
- package/alert/fesm2015/ngx-bootstrap-alert.js +71 -0
- package/alert/fesm2015/ngx-bootstrap-alert.js.map +1 -1
- package/alert/fesm5/ngx-bootstrap-alert.js +72 -1
- package/alert/fesm5/ngx-bootstrap-alert.js.map +1 -1
- package/alert/package.json +2 -2
- package/buttons/bundles/ngx-bootstrap-buttons.umd.js +208 -85
- 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-radio-group.directive.d.ts +4 -1
- package/buttons/esm2015/button-radio-group.directive.js +26 -2
- package/buttons/esm5/button-radio-group.directive.js +30 -2
- package/buttons/fesm2015/ngx-bootstrap-buttons.js +194 -65
- package/buttons/fesm2015/ngx-bootstrap-buttons.js.map +1 -1
- package/buttons/fesm5/ngx-bootstrap-buttons.js +216 -83
- 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 +295 -4
- package/carousel/bundles/ngx-bootstrap-carousel.umd.js.map +1 -1
- package/carousel/bundles/ngx-bootstrap-carousel.umd.min.js +15 -1
- package/carousel/bundles/ngx-bootstrap-carousel.umd.min.js.map +1 -1
- package/carousel/carousel.component.d.ts +2 -0
- package/carousel/esm2015/carousel.component.js +15 -2
- package/carousel/esm2015/slide.component.js +21 -2
- package/carousel/esm5/carousel.component.js +15 -2
- package/carousel/esm5/slide.component.js +6 -2
- package/carousel/fesm2015/ngx-bootstrap-carousel.js +169 -2
- package/carousel/fesm2015/ngx-bootstrap-carousel.js.map +1 -1
- package/carousel/fesm5/ngx-bootstrap-carousel.js +156 -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/carousel/slide.component.d.ts +1 -0
- package/chronos/bundles/ngx-bootstrap-chronos.umd.js +11172 -10061
- package/chronos/bundles/ngx-bootstrap-chronos.umd.js.map +1 -1
- package/chronos/bundles/ngx-bootstrap-chronos.umd.min.js +1 -1
- package/chronos/bundles/ngx-bootstrap-chronos.umd.min.js.map +1 -1
- package/chronos/esm2015/format/format.js +1 -1
- package/chronos/esm2015/i18n/ka.js +108 -0
- package/chronos/esm2015/i18n/kk.js +89 -0
- package/chronos/esm2015/i18n/sq.js +62 -0
- package/chronos/esm2015/i18n/th-be.js +85 -0
- package/chronos/esm2015/index.js +2 -2
- package/chronos/esm2015/locale/locale.class.js +16 -2
- package/chronos/esm2015/ngx-bootstrap-chronos.js +2 -2
- package/chronos/esm2015/public_api.js +5 -1
- package/chronos/esm2015/units/year.js +4 -1
- package/chronos/esm5/format/format.js +1 -1
- package/chronos/esm5/i18n/ka.js +108 -0
- package/chronos/esm5/i18n/kk.js +89 -0
- package/chronos/esm5/i18n/sq.js +62 -0
- package/chronos/esm5/i18n/th-be.js +86 -0
- package/chronos/esm5/index.js +2 -2
- package/chronos/esm5/locale/locale.class.js +22 -2
- package/chronos/esm5/ngx-bootstrap-chronos.js +2 -2
- package/chronos/esm5/public_api.js +5 -1
- package/chronos/esm5/units/year.js +4 -1
- package/chronos/fesm2015/ngx-bootstrap-chronos.js +1117 -13
- package/chronos/fesm2015/ngx-bootstrap-chronos.js.map +1 -1
- package/chronos/fesm5/ngx-bootstrap-chronos.js +1130 -13
- package/chronos/fesm5/ngx-bootstrap-chronos.js.map +1 -1
- package/chronos/i18n/ka.d.ts +2 -0
- package/chronos/i18n/kk.d.ts +2 -0
- package/chronos/i18n/sq.d.ts +2 -0
- package/chronos/i18n/th-be.d.ts +2 -0
- package/chronos/locale/locale.class.d.ts +2 -0
- package/chronos/ngx-bootstrap-chronos.metadata.json +1 -1
- package/chronos/package.json +2 -2
- package/chronos/public_api.d.ts +4 -0
- package/collapse/bundles/ngx-bootstrap-collapse.umd.js +100 -2
- package/collapse/bundles/ngx-bootstrap-collapse.umd.js.map +1 -1
- package/collapse/bundles/ngx-bootstrap-collapse.umd.min.js +1 -1
- package/collapse/bundles/ngx-bootstrap-collapse.umd.min.js.map +1 -1
- package/collapse/collapse.directive.d.ts +1 -0
- package/collapse/esm2015/collapse.directive.js +14 -1
- package/collapse/esm5/collapse.directive.js +14 -1
- package/collapse/fesm2015/ngx-bootstrap-collapse.js +108 -0
- package/collapse/fesm2015/ngx-bootstrap-collapse.js.map +1 -1
- package/collapse/fesm5/ngx-bootstrap-collapse.js +109 -1
- package/collapse/fesm5/ngx-bootstrap-collapse.js.map +1 -1
- package/collapse/ngx-bootstrap-collapse.metadata.json +1 -1
- package/collapse/package.json +2 -2
- package/component-loader/bundles/ngx-bootstrap-component-loader.umd.js +169 -2
- 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/fesm2015/ngx-bootstrap-component-loader.js +177 -0
- package/component-loader/fesm2015/ngx-bootstrap-component-loader.js.map +1 -1
- package/component-loader/fesm5/ngx-bootstrap-component-loader.js +178 -1
- 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 +4 -1
- package/datepicker/bs-datepicker-inline.component.d.ts +4 -0
- package/datepicker/bs-datepicker-input.directive.d.ts +1 -0
- package/datepicker/bs-datepicker.component.d.ts +12 -3
- package/datepicker/bs-datepicker.config.d.ts +26 -0
- package/datepicker/bs-datepicker.css +19 -1
- package/datepicker/bs-datepicker.css.map +3 -3
- package/datepicker/bs-datepicker.scss +0 -1
- package/datepicker/bs-daterangepicker-inline.component.d.ts +8 -0
- package/datepicker/bs-daterangepicker-input.directive.d.ts +1 -0
- package/datepicker/bs-daterangepicker.component.d.ts +16 -3
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js +2116 -106
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.js.map +1 -1
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js +15 -1
- package/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js.map +1 -1
- package/datepicker/engine/flag-days-calendar.d.ts +1 -0
- package/datepicker/esm2015/base/bs-datepicker-container.js +18 -3
- package/datepicker/esm2015/bs-datepicker-inline.component.js +25 -9
- package/datepicker/esm2015/bs-datepicker-input.directive.js +19 -1
- package/datepicker/esm2015/bs-datepicker.component.js +55 -8
- package/datepicker/esm2015/bs-datepicker.config.js +36 -2
- package/datepicker/esm2015/bs-datepicker.module.js +23 -16
- package/datepicker/esm2015/bs-daterangepicker-inline.component.js +37 -7
- package/datepicker/esm2015/bs-daterangepicker-input.directive.js +34 -3
- package/datepicker/esm2015/bs-daterangepicker.component.js +66 -9
- package/datepicker/esm2015/engine/flag-days-calendar.js +6 -3
- package/datepicker/esm2015/reducer/bs-datepicker.actions.js +14 -1
- package/datepicker/esm2015/reducer/bs-datepicker.effects.js +15 -11
- package/datepicker/esm2015/reducer/bs-datepicker.reducer.js +25 -6
- package/datepicker/esm2015/reducer/bs-datepicker.state.js +5 -1
- package/datepicker/esm2015/themes/bs/bs-custom-dates-view.component.js +46 -8
- package/datepicker/esm2015/themes/bs/bs-datepicker-container.component.js +5 -2
- package/datepicker/esm2015/themes/bs/bs-datepicker-inline-container.component.js +2 -2
- package/datepicker/esm2015/themes/bs/bs-datepicker-navigation-view.component.js +8 -7
- package/datepicker/esm2015/themes/bs/bs-daterangepicker-container.component.js +21 -3
- package/datepicker/esm2015/themes/bs/bs-daterangepicker-inline-container.component.js +2 -2
- package/datepicker/esm2015/themes/bs/bs-days-calendar-view.component.js +22 -8
- package/datepicker/esm2015/utils/bs-calendar-utils.js +18 -3
- package/datepicker/esm5/base/bs-datepicker-container.js +26 -3
- package/datepicker/esm5/bs-datepicker-inline.component.js +25 -9
- package/datepicker/esm5/bs-datepicker-input.directive.js +23 -1
- package/datepicker/esm5/bs-datepicker.component.js +59 -8
- package/datepicker/esm5/bs-datepicker.config.js +36 -2
- package/datepicker/esm5/bs-datepicker.module.js +26 -19
- package/datepicker/esm5/bs-daterangepicker-inline.component.js +37 -7
- package/datepicker/esm5/bs-daterangepicker-input.directive.js +38 -3
- package/datepicker/esm5/bs-daterangepicker.component.js +70 -9
- package/datepicker/esm5/engine/flag-days-calendar.js +6 -3
- package/datepicker/esm5/reducer/bs-datepicker.actions.js +18 -1
- package/datepicker/esm5/reducer/bs-datepicker.effects.js +21 -17
- package/datepicker/esm5/reducer/bs-datepicker.reducer.js +25 -6
- package/datepicker/esm5/reducer/bs-datepicker.state.js +5 -1
- package/datepicker/esm5/themes/bs/bs-custom-dates-view.component.js +39 -7
- package/datepicker/esm5/themes/bs/bs-datepicker-container.component.js +5 -2
- package/datepicker/esm5/themes/bs/bs-datepicker-inline-container.component.js +2 -2
- package/datepicker/esm5/themes/bs/bs-datepicker-navigation-view.component.js +2 -2
- package/datepicker/esm5/themes/bs/bs-daterangepicker-container.component.js +25 -3
- package/datepicker/esm5/themes/bs/bs-daterangepicker-inline-container.component.js +2 -2
- package/datepicker/esm5/themes/bs/bs-days-calendar-view.component.js +22 -8
- package/datepicker/esm5/utils/bs-calendar-utils.js +18 -3
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.js +1958 -91
- package/datepicker/fesm2015/ngx-bootstrap-datepicker.js.map +1 -1
- package/datepicker/fesm5/ngx-bootstrap-datepicker.js +1989 -93
- package/datepicker/fesm5/ngx-bootstrap-datepicker.js.map +1 -1
- package/datepicker/ngx-bootstrap-datepicker.metadata.json +1 -1
- package/datepicker/package.json +2 -2
- package/datepicker/reducer/bs-datepicker.actions.d.ts +2 -0
- package/datepicker/reducer/bs-datepicker.effects.d.ts +3 -2
- package/datepicker/reducer/bs-datepicker.state.d.ts +2 -0
- package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +6 -1
- package/datepicker/themes/bs/bs-daterangepicker-container.component.d.ts +3 -0
- package/datepicker/utils/bs-calendar-utils.d.ts +1 -0
- package/datepicker/utils/scss/mixins.css.map +1 -1
- package/datepicker/utils/scss/mixins.scss +9 -0
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js +395 -5
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.js.map +1 -1
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js +15 -1
- package/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js.map +1 -1
- package/dropdown/esm2015/bs-dropdown-container.component.js +2 -2
- package/dropdown/esm2015/bs-dropdown.directive.js +8 -3
- package/dropdown/esm5/bs-dropdown-container.component.js +2 -2
- package/dropdown/esm5/bs-dropdown.directive.js +9 -3
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.js +241 -3
- package/dropdown/fesm2015/ngx-bootstrap-dropdown.js.map +1 -1
- package/dropdown/fesm5/ngx-bootstrap-dropdown.js +242 -3
- 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/bundles/ngx-bootstrap-locale.umd.js +36 -2
- package/locale/bundles/ngx-bootstrap-locale.umd.js.map +1 -1
- package/locale/bundles/ngx-bootstrap-locale.umd.min.js +1 -1
- package/locale/esm2015/ngx-bootstrap-locale.js +2 -2
- package/locale/esm2015/public_api.js +5 -1
- package/locale/esm5/ngx-bootstrap-locale.js +2 -2
- package/locale/esm5/public_api.js +5 -1
- package/locale/fesm2015/ngx-bootstrap-locale.js +11 -1
- package/locale/fesm2015/ngx-bootstrap-locale.js.map +1 -1
- package/locale/fesm5/ngx-bootstrap-locale.js +11 -1
- package/locale/fesm5/ngx-bootstrap-locale.js.map +1 -1
- package/locale/ngx-bootstrap-locale.metadata.json +1 -1
- package/locale/package.json +2 -2
- package/locale/public_api.d.ts +4 -0
- package/mini-ngrx/bundles/ngx-bootstrap-mini-ngrx.umd.js +187 -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 +15 -1
- package/mini-ngrx/bundles/ngx-bootstrap-mini-ngrx.umd.min.js.map +1 -1
- package/mini-ngrx/fesm2015/ngx-bootstrap-mini-ngrx.js +32 -0
- package/mini-ngrx/fesm2015/ngx-bootstrap-mini-ngrx.js.map +1 -1
- package/mini-ngrx/fesm5/ngx-bootstrap-mini-ngrx.js +32 -0
- package/mini-ngrx/fesm5/ngx-bootstrap-mini-ngrx.js.map +1 -1
- package/mini-ngrx/package.json +2 -2
- package/modal/bs-modal.service.d.ts +1 -2
- package/modal/bundles/ngx-bootstrap-modal.umd.js +558 -16
- package/modal/bundles/ngx-bootstrap-modal.umd.js.map +1 -1
- package/modal/bundles/ngx-bootstrap-modal.umd.min.js +15 -1
- package/modal/bundles/ngx-bootstrap-modal.umd.min.js.map +1 -1
- package/modal/esm2015/bs-modal.service.js +13 -4
- package/modal/esm2015/modal-container.component.js +24 -5
- package/modal/esm2015/modal-options.class.js +16 -1
- package/modal/esm2015/modal.directive.js +21 -4
- package/modal/esm2015/modal.module.js +10 -1
- package/modal/esm5/bs-modal.service.js +28 -8
- package/modal/esm5/modal-container.component.js +28 -5
- package/modal/esm5/modal-options.class.js +16 -1
- package/modal/esm5/modal.directive.js +25 -4
- package/modal/esm5/modal.module.js +13 -1
- package/modal/fesm2015/ngx-bootstrap-modal.js +354 -10
- package/modal/fesm2015/ngx-bootstrap-modal.js.map +1 -1
- package/modal/fesm5/ngx-bootstrap-modal.js +381 -15
- package/modal/fesm5/ngx-bootstrap-modal.js.map +1 -1
- package/modal/modal-container.component.d.ts +3 -1
- package/modal/modal-options.class.d.ts +13 -0
- package/modal/modal.directive.d.ts +3 -1
- package/modal/modal.module.d.ts +1 -0
- package/modal/ngx-bootstrap-modal.metadata.json +1 -1
- package/modal/package.json +2 -2
- package/package.json +2 -2
- package/pagination/bundles/ngx-bootstrap-pagination.umd.js +276 -4
- 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/models/index.js +49 -4
- package/pagination/esm2015/pager.component.js +2 -2
- package/pagination/esm2015/pagination.component.js +33 -3
- package/pagination/esm2015/public_api.js +1 -1
- package/pagination/esm5/models/index.js +49 -4
- package/pagination/esm5/pager.component.js +2 -2
- package/pagination/esm5/pagination.component.js +33 -3
- package/pagination/esm5/public_api.js +1 -1
- package/pagination/fesm2015/ngx-bootstrap-pagination.js +284 -2
- package/pagination/fesm2015/ngx-bootstrap-pagination.js.map +1 -1
- package/pagination/fesm5/ngx-bootstrap-pagination.js +285 -3
- package/pagination/fesm5/ngx-bootstrap-pagination.js.map +1 -1
- package/pagination/models/index.d.ts +28 -0
- package/pagination/ngx-bootstrap-pagination.metadata.json +1 -1
- package/pagination/package.json +2 -2
- package/pagination/pagination.component.d.ts +12 -2
- package/pagination/public_api.d.ts +1 -0
- package/popover/bundles/ngx-bootstrap-popover.umd.js +215 -20
- 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.config.js +10 -1
- package/popover/esm2015/popover.directive.js +97 -16
- package/popover/esm5/popover.config.js +10 -1
- package/popover/esm5/popover.directive.js +98 -16
- package/popover/fesm2015/ngx-bootstrap-popover.js +221 -16
- package/popover/fesm2015/ngx-bootstrap-popover.js.map +1 -1
- package/popover/fesm5/ngx-bootstrap-popover.js +222 -16
- 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.config.d.ts +2 -0
- package/popover/popover.directive.d.ts +9 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.js +286 -13
- package/positioning/bundles/ngx-bootstrap-positioning.umd.js.map +1 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.min.js +15 -1
- package/positioning/bundles/ngx-bootstrap-positioning.umd.min.js.map +1 -1
- package/positioning/esm2015/modifiers/arrow.js +19 -5
- package/positioning/esm2015/modifiers/initData.js +12 -2
- package/positioning/esm2015/modifiers/shift.js +6 -4
- package/positioning/esm5/modifiers/arrow.js +19 -5
- package/positioning/esm5/modifiers/initData.js +12 -2
- package/positioning/esm5/modifiers/shift.js +8 -6
- package/positioning/fesm2015/ngx-bootstrap-positioning.js +128 -8
- package/positioning/fesm2015/ngx-bootstrap-positioning.js.map +1 -1
- package/positioning/fesm5/ngx-bootstrap-positioning.js +132 -10
- package/positioning/fesm5/ngx-bootstrap-positioning.js.map +1 -1
- package/positioning/package.json +2 -2
- package/progressbar/bundles/ngx-bootstrap-progressbar.umd.js +77 -2
- 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/fesm2015/ngx-bootstrap-progressbar.js +85 -0
- package/progressbar/fesm2015/ngx-bootstrap-progressbar.js.map +1 -1
- package/progressbar/fesm5/ngx-bootstrap-progressbar.js +85 -0
- package/progressbar/fesm5/ngx-bootstrap-progressbar.js.map +1 -1
- package/progressbar/package.json +2 -2
- package/rating/bundles/ngx-bootstrap-rating.umd.js +92 -7
- 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/ngx-bootstrap-rating.js +2 -2
- package/rating/esm2015/public_api.js +2 -1
- package/rating/esm2015/rating.component.js +14 -5
- package/rating/esm2015/rating.config.js +27 -0
- package/rating/esm2015/rating.module.js +3 -2
- package/rating/esm5/ngx-bootstrap-rating.js +2 -2
- package/rating/esm5/public_api.js +2 -1
- package/rating/esm5/rating.component.js +13 -5
- package/rating/esm5/rating.config.js +29 -0
- package/rating/esm5/rating.module.js +3 -2
- package/rating/fesm2015/ngx-bootstrap-rating.js +101 -7
- package/rating/fesm2015/ngx-bootstrap-rating.js.map +1 -1
- package/rating/fesm5/ngx-bootstrap-rating.js +101 -7
- 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/public_api.d.ts +1 -0
- package/rating/rating.component.d.ts +4 -1
- package/rating/rating.config.d.ts +5 -0
- package/sortable/bundles/ngx-bootstrap-sortable.umd.js +254 -2
- package/sortable/bundles/ngx-bootstrap-sortable.umd.js.map +1 -1
- package/sortable/bundles/ngx-bootstrap-sortable.umd.min.js +15 -1
- package/sortable/bundles/ngx-bootstrap-sortable.umd.min.js.map +1 -1
- package/sortable/fesm2015/ngx-bootstrap-sortable.js +113 -0
- package/sortable/fesm2015/ngx-bootstrap-sortable.js.map +1 -1
- package/sortable/fesm5/ngx-bootstrap-sortable.js +114 -1
- package/sortable/fesm5/ngx-bootstrap-sortable.js.map +1 -1
- package/sortable/package.json +2 -2
- package/tabs/bundles/ngx-bootstrap-tabs.umd.js +153 -4
- 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 +13 -2
- package/tabs/esm2015/tabset.component.js +7 -2
- package/tabs/esm2015/tabset.config.js +10 -1
- package/tabs/esm5/tab.directive.js +17 -2
- package/tabs/esm5/tabset.component.js +7 -2
- package/tabs/esm5/tabset.config.js +10 -1
- package/tabs/fesm2015/ngx-bootstrap-tabs.js +157 -2
- package/tabs/fesm2015/ngx-bootstrap-tabs.js.map +1 -1
- package/tabs/fesm5/ngx-bootstrap-tabs.js +162 -3
- package/tabs/fesm5/ngx-bootstrap-tabs.js.map +1 -1
- package/tabs/ngx-bootstrap-tabs.metadata.json +1 -1
- package/tabs/package.json +2 -2
- package/tabs/tab.directive.d.ts +2 -0
- package/tabs/tabset.component.d.ts +2 -0
- package/tabs/tabset.config.d.ts +2 -0
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.js +464 -8
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.js.map +1 -1
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.min.js +15 -1
- package/timepicker/bundles/ngx-bootstrap-timepicker.umd.min.js.map +1 -1
- package/timepicker/esm2015/timepicker.component.js +8 -2
- package/timepicker/esm2015/timepicker.config.js +28 -1
- package/timepicker/esm2015/timepicker.utils.js +9 -6
- package/timepicker/esm5/timepicker.component.js +8 -2
- package/timepicker/esm5/timepicker.config.js +28 -1
- package/timepicker/esm5/timepicker.utils.js +9 -6
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.js +311 -6
- package/timepicker/fesm2015/ngx-bootstrap-timepicker.js.map +1 -1
- package/timepicker/fesm5/ngx-bootstrap-timepicker.js +315 -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 -0
- package/timepicker/timepicker.config.d.ts +6 -0
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.js +355 -8
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.js.map +1 -1
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.min.js +15 -1
- package/tooltip/bundles/ngx-bootstrap-tooltip.umd.min.js.map +1 -1
- package/tooltip/esm2015/tooltip.directive.js +47 -10
- package/tooltip/esm5/tooltip.directive.js +50 -10
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.js +200 -7
- package/tooltip/fesm2015/ngx-bootstrap-tooltip.js.map +1 -1
- package/tooltip/fesm5/ngx-bootstrap-tooltip.js +203 -7
- 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.directive.d.ts +3 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.js +719 -43
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.js.map +1 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.min.js +15 -1
- package/typeahead/bundles/ngx-bootstrap-typeahead.umd.min.js.map +1 -1
- package/typeahead/esm2015/models/index.js +87 -0
- package/typeahead/esm2015/ngx-bootstrap-typeahead.js +2 -2
- package/typeahead/esm2015/public_api.js +2 -1
- package/typeahead/esm2015/typeahead-container.component.js +52 -11
- package/typeahead/esm2015/typeahead-order.class.js +19 -0
- package/typeahead/esm2015/typeahead.config.js +10 -1
- package/typeahead/esm2015/typeahead.directive.js +133 -30
- package/typeahead/esm5/models/index.js +87 -0
- package/typeahead/esm5/ngx-bootstrap-typeahead.js +2 -2
- package/typeahead/esm5/public_api.js +2 -1
- package/typeahead/esm5/typeahead-container.component.js +59 -11
- package/typeahead/esm5/typeahead-order.class.js +23 -0
- package/typeahead/esm5/typeahead.config.js +10 -1
- package/typeahead/esm5/typeahead.directive.js +140 -36
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.js +550 -37
- package/typeahead/fesm2015/ngx-bootstrap-typeahead.js.map +1 -1
- package/typeahead/fesm5/ngx-bootstrap-typeahead.js +567 -43
- package/typeahead/fesm5/ngx-bootstrap-typeahead.js.map +1 -1
- package/typeahead/models/index.d.ts +41 -0
- package/typeahead/ngx-bootstrap-typeahead.metadata.json +1 -1
- package/typeahead/package.json +2 -2
- package/typeahead/public_api.d.ts +2 -0
- package/typeahead/typeahead-container.component.d.ts +10 -5
- package/typeahead/typeahead-order.class.d.ts +6 -0
- package/typeahead/typeahead.config.d.ts +2 -0
- package/typeahead/typeahead.directive.d.ts +28 -10
- package/utils/bundles/ngx-bootstrap-utils.umd.js +54 -2
- package/utils/bundles/ngx-bootstrap-utils.umd.js.map +1 -1
- package/utils/bundles/ngx-bootstrap-utils.umd.min.js +2 -2
- package/utils/bundles/ngx-bootstrap-utils.umd.min.js.map +1 -1
- package/utils/fesm2015/ngx-bootstrap-utils.js +62 -0
- package/utils/fesm2015/ngx-bootstrap-utils.js.map +1 -1
- package/utils/fesm5/ngx-bootstrap-utils.js +62 -0
- package/utils/fesm5/ngx-bootstrap-utils.js.map +1 -1
- package/utils/package.json +2 -2
- package/bundles/ngx-bootstrap.umd.js +0 -1037
- package/bundles/ngx-bootstrap.umd.js.map +0 -1
- package/bundles/ngx-bootstrap.umd.min.js +0 -2
- package/bundles/ngx-bootstrap.umd.min.js.map +0 -1
- package/esm2015/ngx-bootstrap.js +0 -9
- package/esm2015/public_api.js +0 -30
- package/esm5/ngx-bootstrap.js +0 -9
- package/esm5/public_api.js +0 -30
- package/fesm2015/ngx-bootstrap.js +0 -24
- package/fesm2015/ngx-bootstrap.js.map +0 -1
- package/fesm5/ngx-bootstrap.js +0 -24
- package/fesm5/ngx-bootstrap.js.map +0 -1
- package/ngx-bootstrap.d.ts +0 -4
- package/ngx-bootstrap.metadata.json +0 -1
- package/public_api.d.ts +0 -25
@@ -2,7 +2,7 @@
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('ngx-bootstrap/utils'), require('ngx-bootstrap/positioning'), require('@angular/animations'), require('@angular/forms'), require('rxjs'), require('ngx-bootstrap/component-loader'), require('rxjs/operators'), require('@angular/common')) :
|
3
3
|
typeof define === 'function' && define.amd ? define('ngx-bootstrap/typeahead', ['exports', '@angular/core', 'ngx-bootstrap/utils', 'ngx-bootstrap/positioning', '@angular/animations', '@angular/forms', 'rxjs', 'ngx-bootstrap/component-loader', 'rxjs/operators', '@angular/common'], factory) :
|
4
4
|
(global = global || self, factory((global['ngx-bootstrap'] = global['ngx-bootstrap'] || {}, global['ngx-bootstrap'].typeahead = {}), global.ng.core, global.utils, global.positioning, global.ng.animations, global.ng.forms, global.rxjs, global.componentLoader, global.rxjs.operators, global.ng.common));
|
5
|
-
}(this, function (exports, core, utils, positioning, animations, forms, rxjs, componentLoader, operators, common) { 'use strict';
|
5
|
+
}(this, (function (exports, core, utils, positioning, animations, forms, rxjs, componentLoader, operators, common) { 'use strict';
|
6
6
|
|
7
7
|
/*! *****************************************************************************
|
8
8
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -18,6 +18,97 @@
|
|
18
18
|
See the Apache Version 2.0 License for specific language governing permissions
|
19
19
|
and limitations under the License.
|
20
20
|
***************************************************************************** */
|
21
|
+
/* global Reflect, Promise */
|
22
|
+
|
23
|
+
var extendStatics = function(d, b) {
|
24
|
+
extendStatics = Object.setPrototypeOf ||
|
25
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
26
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
27
|
+
return extendStatics(d, b);
|
28
|
+
};
|
29
|
+
|
30
|
+
function __extends(d, b) {
|
31
|
+
extendStatics(d, b);
|
32
|
+
function __() { this.constructor = d; }
|
33
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
34
|
+
}
|
35
|
+
|
36
|
+
var __assign = function() {
|
37
|
+
__assign = Object.assign || function __assign(t) {
|
38
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
39
|
+
s = arguments[i];
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
41
|
+
}
|
42
|
+
return t;
|
43
|
+
};
|
44
|
+
return __assign.apply(this, arguments);
|
45
|
+
};
|
46
|
+
|
47
|
+
function __rest(s, e) {
|
48
|
+
var t = {};
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
50
|
+
t[p] = s[p];
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
|
53
|
+
t[p[i]] = s[p[i]];
|
54
|
+
return t;
|
55
|
+
}
|
56
|
+
|
57
|
+
function __decorate(decorators, target, key, desc) {
|
58
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
59
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
60
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
62
|
+
}
|
63
|
+
|
64
|
+
function __param(paramIndex, decorator) {
|
65
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
66
|
+
}
|
67
|
+
|
68
|
+
function __metadata(metadataKey, metadataValue) {
|
69
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
70
|
+
}
|
71
|
+
|
72
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
73
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
74
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
75
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
76
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
77
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
78
|
+
});
|
79
|
+
}
|
80
|
+
|
81
|
+
function __generator(thisArg, body) {
|
82
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
83
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
84
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
85
|
+
function step(op) {
|
86
|
+
if (f) throw new TypeError("Generator is already executing.");
|
87
|
+
while (_) try {
|
88
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
89
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
90
|
+
switch (op[0]) {
|
91
|
+
case 0: case 1: t = op; break;
|
92
|
+
case 4: _.label++; return { value: op[1], done: false };
|
93
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
94
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
95
|
+
default:
|
96
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
97
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
98
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
99
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
100
|
+
if (t[2]) _.ops.pop();
|
101
|
+
_.trys.pop(); continue;
|
102
|
+
}
|
103
|
+
op = body.call(thisArg, _);
|
104
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
105
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
function __exportStar(m, exports) {
|
110
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
111
|
+
}
|
21
112
|
|
22
113
|
function __values(o) {
|
23
114
|
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
@@ -28,6 +119,76 @@
|
|
28
119
|
return { value: o && o[i++], done: !o };
|
29
120
|
}
|
30
121
|
};
|
122
|
+
}
|
123
|
+
|
124
|
+
function __read(o, n) {
|
125
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
126
|
+
if (!m) return o;
|
127
|
+
var i = m.call(o), r, ar = [], e;
|
128
|
+
try {
|
129
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
130
|
+
}
|
131
|
+
catch (error) { e = { error: error }; }
|
132
|
+
finally {
|
133
|
+
try {
|
134
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
135
|
+
}
|
136
|
+
finally { if (e) throw e.error; }
|
137
|
+
}
|
138
|
+
return ar;
|
139
|
+
}
|
140
|
+
|
141
|
+
function __spread() {
|
142
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
143
|
+
ar = ar.concat(__read(arguments[i]));
|
144
|
+
return ar;
|
145
|
+
}
|
146
|
+
|
147
|
+
function __await(v) {
|
148
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
149
|
+
}
|
150
|
+
|
151
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
152
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
153
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
154
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
155
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
156
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
157
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
158
|
+
function fulfill(value) { resume("next", value); }
|
159
|
+
function reject(value) { resume("throw", value); }
|
160
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
161
|
+
}
|
162
|
+
|
163
|
+
function __asyncDelegator(o) {
|
164
|
+
var i, p;
|
165
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
166
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
167
|
+
}
|
168
|
+
|
169
|
+
function __asyncValues(o) {
|
170
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
171
|
+
var m = o[Symbol.asyncIterator], i;
|
172
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
173
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
174
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
175
|
+
}
|
176
|
+
|
177
|
+
function __makeTemplateObject(cooked, raw) {
|
178
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
179
|
+
return cooked;
|
180
|
+
};
|
181
|
+
|
182
|
+
function __importStar(mod) {
|
183
|
+
if (mod && mod.__esModule) return mod;
|
184
|
+
var result = {};
|
185
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
186
|
+
result.default = mod;
|
187
|
+
return result;
|
188
|
+
}
|
189
|
+
|
190
|
+
function __importDefault(mod) {
|
191
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
31
192
|
}
|
32
193
|
|
33
194
|
/**
|
@@ -873,6 +1034,14 @@
|
|
873
1034
|
}
|
874
1035
|
return TypeaheadOptions;
|
875
1036
|
}());
|
1037
|
+
if (false) {
|
1038
|
+
/** @type {?} */
|
1039
|
+
TypeaheadOptions.prototype.placement;
|
1040
|
+
/** @type {?} */
|
1041
|
+
TypeaheadOptions.prototype.animation;
|
1042
|
+
/** @type {?} */
|
1043
|
+
TypeaheadOptions.prototype.typeaheadRef;
|
1044
|
+
}
|
876
1045
|
|
877
1046
|
/**
|
878
1047
|
* @fileoverview added by tsickle
|
@@ -907,6 +1076,39 @@
|
|
907
1076
|
};
|
908
1077
|
return TypeaheadMatch;
|
909
1078
|
}());
|
1079
|
+
if (false) {
|
1080
|
+
/** @type {?} */
|
1081
|
+
TypeaheadMatch.prototype.value;
|
1082
|
+
/** @type {?} */
|
1083
|
+
TypeaheadMatch.prototype.item;
|
1084
|
+
/**
|
1085
|
+
* @type {?}
|
1086
|
+
* @protected
|
1087
|
+
*/
|
1088
|
+
TypeaheadMatch.prototype.header;
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
/**
|
1092
|
+
* @fileoverview added by tsickle
|
1093
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1094
|
+
*/
|
1095
|
+
var TypeaheadOrder = /** @class */ (function () {
|
1096
|
+
function TypeaheadOrder() {
|
1097
|
+
}
|
1098
|
+
return TypeaheadOrder;
|
1099
|
+
}());
|
1100
|
+
if (false) {
|
1101
|
+
/**
|
1102
|
+
* field for sorting
|
1103
|
+
* @type {?}
|
1104
|
+
*/
|
1105
|
+
TypeaheadOrder.prototype.field;
|
1106
|
+
/**
|
1107
|
+
* ordering direction, could be 'asc' or 'desc'
|
1108
|
+
* @type {?}
|
1109
|
+
*/
|
1110
|
+
TypeaheadOrder.prototype.direction;
|
1111
|
+
}
|
910
1112
|
|
911
1113
|
/**
|
912
1114
|
* @fileoverview added by tsickle
|
@@ -1039,6 +1241,8 @@
|
|
1039
1241
|
* @fileoverview added by tsickle
|
1040
1242
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
1041
1243
|
*/
|
1244
|
+
/** @type {?} */
|
1245
|
+
var nextWindowId = 0;
|
1042
1246
|
var TypeaheadContainerComponent = /** @class */ (function () {
|
1043
1247
|
function TypeaheadContainerComponent(positionService, renderer, element, changeDetectorRef) {
|
1044
1248
|
var _this = this;
|
@@ -1046,8 +1250,11 @@
|
|
1046
1250
|
this.renderer = renderer;
|
1047
1251
|
this.element = element;
|
1048
1252
|
this.changeDetectorRef = changeDetectorRef;
|
1253
|
+
// tslint:disable-next-line: no-output-rename
|
1254
|
+
this.activeChangeEvent = new core.EventEmitter();
|
1049
1255
|
this.isFocused = false;
|
1050
1256
|
this.height = 0;
|
1257
|
+
this.popupId = "ngb-typeahead-" + nextWindowId++;
|
1051
1258
|
this._matches = [];
|
1052
1259
|
this.isScrolledIntoView = (/**
|
1053
1260
|
* @param {?} elem
|
@@ -1064,6 +1271,7 @@
|
|
1064
1271
|
var elemBottom = elemTop + elem.offsetHeight;
|
1065
1272
|
return ((elemBottom <= containerViewBottom) && (elemTop >= containerViewTop));
|
1066
1273
|
});
|
1274
|
+
this.renderer.setAttribute(this.element.nativeElement, 'id', this.popupId);
|
1067
1275
|
this.positionServiceSubscription = this.positionService.event$.subscribe((/**
|
1068
1276
|
* @return {?}
|
1069
1277
|
*/
|
@@ -1087,6 +1295,23 @@
|
|
1087
1295
|
enumerable: true,
|
1088
1296
|
configurable: true
|
1089
1297
|
});
|
1298
|
+
Object.defineProperty(TypeaheadContainerComponent.prototype, "typeaheadTemplateMethods", {
|
1299
|
+
get: /**
|
1300
|
+
* @return {?}
|
1301
|
+
*/
|
1302
|
+
function () {
|
1303
|
+
/* tslint:disable:no-this-assignment */
|
1304
|
+
/** @type {?} */
|
1305
|
+
var _that = this;
|
1306
|
+
return {
|
1307
|
+
selectMatch: this.selectMatch.bind(_that),
|
1308
|
+
selectActive: this.selectActive.bind(_that),
|
1309
|
+
isActive: this.isActive.bind(_that)
|
1310
|
+
};
|
1311
|
+
},
|
1312
|
+
enumerable: true,
|
1313
|
+
configurable: true
|
1314
|
+
});
|
1090
1315
|
Object.defineProperty(TypeaheadContainerComponent.prototype, "active", {
|
1091
1316
|
get: /**
|
1092
1317
|
* @return {?}
|
@@ -1094,6 +1319,14 @@
|
|
1094
1319
|
function () {
|
1095
1320
|
return this._active;
|
1096
1321
|
},
|
1322
|
+
set: /**
|
1323
|
+
* @param {?} active
|
1324
|
+
* @return {?}
|
1325
|
+
*/
|
1326
|
+
function (active) {
|
1327
|
+
this._active = active;
|
1328
|
+
this.activeChanged();
|
1329
|
+
},
|
1097
1330
|
enumerable: true,
|
1098
1331
|
configurable: true
|
1099
1332
|
});
|
@@ -1125,7 +1358,7 @@
|
|
1125
1358
|
}));
|
1126
1359
|
}
|
1127
1360
|
if (this.typeaheadIsFirstItemActive && this._matches.length > 0) {
|
1128
|
-
this.
|
1361
|
+
this.active = this._matches[0];
|
1129
1362
|
if (this._active.isHeader()) {
|
1130
1363
|
this.nextActiveMatch();
|
1131
1364
|
}
|
@@ -1141,7 +1374,7 @@
|
|
1141
1374
|
this.selectActive(concurrency);
|
1142
1375
|
return;
|
1143
1376
|
}
|
1144
|
-
this.
|
1377
|
+
this.active = null;
|
1145
1378
|
}
|
1146
1379
|
},
|
1147
1380
|
enumerable: true,
|
@@ -1249,6 +1482,17 @@
|
|
1249
1482
|
this.selectMatch(this._active);
|
1250
1483
|
}
|
1251
1484
|
};
|
1485
|
+
/**
|
1486
|
+
* @return {?}
|
1487
|
+
*/
|
1488
|
+
TypeaheadContainerComponent.prototype.activeChanged = /**
|
1489
|
+
* @return {?}
|
1490
|
+
*/
|
1491
|
+
function () {
|
1492
|
+
/** @type {?} */
|
1493
|
+
var index = this.matches.indexOf(this._active);
|
1494
|
+
this.activeChangeEvent.emit(this.popupId + "-" + index);
|
1495
|
+
};
|
1252
1496
|
/**
|
1253
1497
|
* @return {?}
|
1254
1498
|
*/
|
@@ -1258,7 +1502,7 @@
|
|
1258
1502
|
function () {
|
1259
1503
|
/** @type {?} */
|
1260
1504
|
var index = this.matches.indexOf(this._active);
|
1261
|
-
this.
|
1505
|
+
this.active = this.matches[index - 1 < 0 ? this.matches.length - 1 : index - 1];
|
1262
1506
|
if (this._active.isHeader()) {
|
1263
1507
|
this.prevActiveMatch();
|
1264
1508
|
}
|
@@ -1275,7 +1519,7 @@
|
|
1275
1519
|
function () {
|
1276
1520
|
/** @type {?} */
|
1277
1521
|
var index = this.matches.indexOf(this._active);
|
1278
|
-
this.
|
1522
|
+
this.active = this.matches[index + 1 > this.matches.length - 1 ? 0 : index + 1];
|
1279
1523
|
if (this._active.isHeader()) {
|
1280
1524
|
this.nextActiveMatch();
|
1281
1525
|
}
|
@@ -1293,7 +1537,7 @@
|
|
1293
1537
|
*/
|
1294
1538
|
function (value) {
|
1295
1539
|
this.isFocused = true;
|
1296
|
-
this.
|
1540
|
+
this.active = value;
|
1297
1541
|
};
|
1298
1542
|
/**
|
1299
1543
|
* @param {?} match
|
@@ -1364,7 +1608,7 @@
|
|
1364
1608
|
* @return {?}
|
1365
1609
|
*/
|
1366
1610
|
function (value) {
|
1367
|
-
return this.
|
1611
|
+
return this.active === value;
|
1368
1612
|
};
|
1369
1613
|
/**
|
1370
1614
|
* @param {?} value
|
@@ -1499,14 +1743,15 @@
|
|
1499
1743
|
TypeaheadContainerComponent.decorators = [
|
1500
1744
|
{ type: core.Component, args: [{
|
1501
1745
|
selector: 'typeahead-container',
|
1502
|
-
template: "<!-- inject options list template -->\n<ng-template [ngTemplateOutlet]=\"optionsListTemplate || (isBs4 ? bs4Template : bs3Template)\"\n [ngTemplateOutletContext]=\"{matches:matches
|
1746
|
+
template: "<!-- inject options list template -->\n<ng-template [ngTemplateOutlet]=\"optionsListTemplate || (isBs4 ? bs4Template : bs3Template)\"\n [ngTemplateOutletContext]=\"{\n matches: matches,\n itemTemplate: itemTemplate || bsItemTemplate,\n query: query,\n $implicit: typeaheadTemplateMethods\n }\">\n</ng-template>\n\n<!-- default options item template -->\n<ng-template #bsItemTemplate let-match=\"match\" let-query=\"query\">\n <span [innerHtml]=\"highlight(match, query)\"></span>\n</ng-template>\n\n<!-- Bootstrap 3 options list template -->\n<ng-template #bs3Template>\n <ul class=\"dropdown-menu\"\n #ulElement\n role=\"listbox\"\n [style.overflow-y]=\"needScrollbar ? 'scroll': 'auto'\"\n [style.height]=\"needScrollbar ? guiHeight: 'auto'\">\n <ng-template ngFor let-match let-i=\"index\" [ngForOf]=\"matches\">\n <li #liElements *ngIf=\"match.isHeader()\" class=\"dropdown-header\">{{ match }}</li>\n <li #liElements\n *ngIf=\"!match.isHeader()\"\n [id]=\"popupId + '-' + i\"\n role=\"option\"\n [@typeaheadAnimation]=\"animationState\"\n [class.active]=\"isActive(match)\"\n (mouseenter)=\"selectActive(match)\">\n\n <a href=\"#\" (click)=\"selectMatch(match, $event)\" tabindex=\"-1\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate || bsItemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-template>\n </a>\n </li>\n </ng-template>\n </ul>\n</ng-template>\n\n<!-- Bootstrap 4 options list template -->\n<ng-template #bs4Template>\n <ng-template ngFor let-match let-i=\"index\" [ngForOf]=\"matches\">\n <h6 *ngIf=\"match.isHeader()\" class=\"dropdown-header\">{{ match }}</h6>\n <ng-template [ngIf]=\"!match.isHeader()\">\n <button #liElements\n [id]=\"popupId + '-' + i\"\n role=\"option\"\n [@typeaheadAnimation]=\"animationState\"\n class=\"dropdown-item\"\n (click)=\"selectMatch(match, $event)\"\n (mouseenter)=\"selectActive(match)\"\n [class.active]=\"isActive(match)\">\n <ng-template [ngTemplateOutlet]=\"itemTemplate || bsItemTemplate\"\n [ngTemplateOutletContext]=\"{item: match.item, index: i, match: match, query: query}\">\n </ng-template>\n </button>\n </ng-template>\n </ng-template>\n</ng-template>\n",
|
1503
1747
|
host: {
|
1504
1748
|
class: 'dropdown open bottom',
|
1505
1749
|
'[class.dropdown-menu]': 'isBs4',
|
1506
1750
|
'[style.height]': "isBs4 && needScrollbar ? guiHeight: 'auto'",
|
1507
|
-
'[style.visibility]': '
|
1751
|
+
'[style.visibility]': "'inherit'",
|
1508
1752
|
'[class.dropup]': 'dropup',
|
1509
|
-
style: 'position: absolute;display: block;'
|
1753
|
+
style: 'position: absolute;display: block;',
|
1754
|
+
'[attr.role]': "isBs4 ? 'listbox' : null "
|
1510
1755
|
},
|
1511
1756
|
animations: [typeaheadAnimation],
|
1512
1757
|
styles: ["\n :host.dropdown {\n z-index: 1000;\n }\n\n :host.dropdown-menu, .dropdown-menu {\n overflow-y: auto;\n height: 100px;\n }\n "]
|
@@ -1520,12 +1765,87 @@
|
|
1520
1765
|
{ type: core.ChangeDetectorRef }
|
1521
1766
|
]; };
|
1522
1767
|
TypeaheadContainerComponent.propDecorators = {
|
1768
|
+
activeChangeEvent: [{ type: core.Output, args: ['activeChange',] }],
|
1523
1769
|
ulElement: [{ type: core.ViewChild, args: ['ulElement', { static: false },] }],
|
1524
1770
|
liElements: [{ type: core.ViewChildren, args: ['liElements',] }],
|
1525
1771
|
focusLost: [{ type: core.HostListener, args: ['mouseleave',] }, { type: core.HostListener, args: ['blur',] }]
|
1526
1772
|
};
|
1527
1773
|
return TypeaheadContainerComponent;
|
1528
1774
|
}());
|
1775
|
+
if (false) {
|
1776
|
+
/** @type {?} */
|
1777
|
+
TypeaheadContainerComponent.prototype.activeChangeEvent;
|
1778
|
+
/** @type {?} */
|
1779
|
+
TypeaheadContainerComponent.prototype.parent;
|
1780
|
+
/** @type {?} */
|
1781
|
+
TypeaheadContainerComponent.prototype.query;
|
1782
|
+
/** @type {?} */
|
1783
|
+
TypeaheadContainerComponent.prototype.isFocused;
|
1784
|
+
/** @type {?} */
|
1785
|
+
TypeaheadContainerComponent.prototype.top;
|
1786
|
+
/** @type {?} */
|
1787
|
+
TypeaheadContainerComponent.prototype.left;
|
1788
|
+
/** @type {?} */
|
1789
|
+
TypeaheadContainerComponent.prototype.display;
|
1790
|
+
/** @type {?} */
|
1791
|
+
TypeaheadContainerComponent.prototype.placement;
|
1792
|
+
/** @type {?} */
|
1793
|
+
TypeaheadContainerComponent.prototype.dropup;
|
1794
|
+
/** @type {?} */
|
1795
|
+
TypeaheadContainerComponent.prototype.guiHeight;
|
1796
|
+
/** @type {?} */
|
1797
|
+
TypeaheadContainerComponent.prototype.needScrollbar;
|
1798
|
+
/** @type {?} */
|
1799
|
+
TypeaheadContainerComponent.prototype.animationState;
|
1800
|
+
/** @type {?} */
|
1801
|
+
TypeaheadContainerComponent.prototype.positionServiceSubscription;
|
1802
|
+
/** @type {?} */
|
1803
|
+
TypeaheadContainerComponent.prototype.height;
|
1804
|
+
/** @type {?} */
|
1805
|
+
TypeaheadContainerComponent.prototype.popupId;
|
1806
|
+
/**
|
1807
|
+
* @type {?}
|
1808
|
+
* @protected
|
1809
|
+
*/
|
1810
|
+
TypeaheadContainerComponent.prototype._active;
|
1811
|
+
/**
|
1812
|
+
* @type {?}
|
1813
|
+
* @protected
|
1814
|
+
*/
|
1815
|
+
TypeaheadContainerComponent.prototype._matches;
|
1816
|
+
/**
|
1817
|
+
* @type {?}
|
1818
|
+
* @private
|
1819
|
+
*/
|
1820
|
+
TypeaheadContainerComponent.prototype.ulElement;
|
1821
|
+
/**
|
1822
|
+
* @type {?}
|
1823
|
+
* @private
|
1824
|
+
*/
|
1825
|
+
TypeaheadContainerComponent.prototype.liElements;
|
1826
|
+
/**
|
1827
|
+
* @type {?}
|
1828
|
+
* @private
|
1829
|
+
*/
|
1830
|
+
TypeaheadContainerComponent.prototype.isScrolledIntoView;
|
1831
|
+
/**
|
1832
|
+
* @type {?}
|
1833
|
+
* @private
|
1834
|
+
*/
|
1835
|
+
TypeaheadContainerComponent.prototype.positionService;
|
1836
|
+
/**
|
1837
|
+
* @type {?}
|
1838
|
+
* @private
|
1839
|
+
*/
|
1840
|
+
TypeaheadContainerComponent.prototype.renderer;
|
1841
|
+
/** @type {?} */
|
1842
|
+
TypeaheadContainerComponent.prototype.element;
|
1843
|
+
/**
|
1844
|
+
* @type {?}
|
1845
|
+
* @private
|
1846
|
+
*/
|
1847
|
+
TypeaheadContainerComponent.prototype.changeDetectorRef;
|
1848
|
+
}
|
1529
1849
|
|
1530
1850
|
/**
|
1531
1851
|
* @fileoverview added by tsickle
|
@@ -1548,6 +1868,10 @@
|
|
1548
1868
|
* used to hide results on blur
|
1549
1869
|
*/
|
1550
1870
|
this.hideResultsOnBlur = true;
|
1871
|
+
/**
|
1872
|
+
* if true, typeahead will cancel async request on blur
|
1873
|
+
*/
|
1874
|
+
this.cancelRequestOnFocusLost = false;
|
1551
1875
|
/**
|
1552
1876
|
* used to choose the first item in typeahead container
|
1553
1877
|
*/
|
@@ -1567,6 +1891,44 @@
|
|
1567
1891
|
];
|
1568
1892
|
return TypeaheadConfig;
|
1569
1893
|
}());
|
1894
|
+
if (false) {
|
1895
|
+
/**
|
1896
|
+
* sets use adaptive position
|
1897
|
+
* @type {?}
|
1898
|
+
*/
|
1899
|
+
TypeaheadConfig.prototype.adaptivePosition;
|
1900
|
+
/**
|
1901
|
+
* turn on/off animation
|
1902
|
+
* @type {?}
|
1903
|
+
*/
|
1904
|
+
TypeaheadConfig.prototype.isAnimated;
|
1905
|
+
/**
|
1906
|
+
* used to hide results on blur
|
1907
|
+
* @type {?}
|
1908
|
+
*/
|
1909
|
+
TypeaheadConfig.prototype.hideResultsOnBlur;
|
1910
|
+
/**
|
1911
|
+
* if true, typeahead will cancel async request on blur
|
1912
|
+
* @type {?}
|
1913
|
+
*/
|
1914
|
+
TypeaheadConfig.prototype.cancelRequestOnFocusLost;
|
1915
|
+
/**
|
1916
|
+
* used to choose the first item in typeahead container
|
1917
|
+
* @type {?}
|
1918
|
+
*/
|
1919
|
+
TypeaheadConfig.prototype.selectFirstItem;
|
1920
|
+
/**
|
1921
|
+
* used to active/inactive the first item in typeahead container
|
1922
|
+
* @type {?}
|
1923
|
+
*/
|
1924
|
+
TypeaheadConfig.prototype.isFirstItemActive;
|
1925
|
+
/**
|
1926
|
+
* used to choose set minimal no of characters that needs to
|
1927
|
+
* be entered before typeahead kicks-in
|
1928
|
+
* @type {?}
|
1929
|
+
*/
|
1930
|
+
TypeaheadConfig.prototype.minLength;
|
1931
|
+
}
|
1570
1932
|
|
1571
1933
|
/**
|
1572
1934
|
* @fileoverview added by tsickle
|
@@ -1589,7 +1951,7 @@
|
|
1589
1951
|
*/
|
1590
1952
|
this.isAnimated = false;
|
1591
1953
|
/**
|
1592
|
-
* should be used only in case of typeahead attribute is array.
|
1954
|
+
* should be used only in case of typeahead attribute is Observable of array.
|
1593
1955
|
* If true - loading of options will be async, otherwise - sync.
|
1594
1956
|
* true make sense if options array is large.
|
1595
1957
|
*/
|
@@ -1650,22 +2012,25 @@
|
|
1650
2012
|
/**
|
1651
2013
|
* fired when blur event occurs. returns the active item
|
1652
2014
|
*/
|
1653
|
-
// tslint:disable-next-line:no-any
|
1654
2015
|
this.typeaheadOnBlur = new core.EventEmitter();
|
1655
2016
|
/**
|
1656
2017
|
* This attribute indicates that the dropdown should be opened upwards
|
1657
2018
|
*/
|
1658
2019
|
this.dropup = false;
|
2020
|
+
this.isOpen = false;
|
2021
|
+
this.list = 'list';
|
1659
2022
|
this.isActiveItemChanged = false;
|
1660
|
-
this.
|
2023
|
+
this.isFocused = false;
|
2024
|
+
this.cancelRequestOnFocusLost = false;
|
1661
2025
|
// tslint:disable-next-line:no-any
|
1662
2026
|
this.keyUpEventEmitter = new core.EventEmitter();
|
1663
|
-
this.placement = 'bottom
|
2027
|
+
this.placement = 'bottom left';
|
1664
2028
|
this._subscriptions = [];
|
1665
2029
|
this._typeahead = cis.createLoader(element, viewContainerRef, renderer)
|
1666
2030
|
.provide({ provide: TypeaheadConfig, useValue: config });
|
1667
2031
|
Object.assign(this, {
|
1668
2032
|
typeaheadHideResultsOnBlur: config.hideResultsOnBlur,
|
2033
|
+
typeaheadCancelRequestOnFocusLost: config.cancelRequestOnFocusLost,
|
1669
2034
|
typeaheadSelectFirstItem: config.selectFirstItem,
|
1670
2035
|
typeaheadIsFirstItemActive: config.isFirstItemActive,
|
1671
2036
|
typeaheadMinLength: config.minLength,
|
@@ -1685,8 +2050,7 @@
|
|
1685
2050
|
this.typeaheadMinLength === void 0 ? 1 : this.typeaheadMinLength;
|
1686
2051
|
this.typeaheadWaitMs = this.typeaheadWaitMs || 0;
|
1687
2052
|
// async should be false in case of array
|
1688
|
-
if (this.typeaheadAsync === undefined &&
|
1689
|
-
!(rxjs.isObservable(this.typeahead))) {
|
2053
|
+
if (this.typeaheadAsync === undefined && !(rxjs.isObservable(this.typeahead))) {
|
1690
2054
|
this.typeaheadAsync = false;
|
1691
2055
|
}
|
1692
2056
|
if (rxjs.isObservable(this.typeahead)) {
|
@@ -1774,10 +2138,19 @@
|
|
1774
2138
|
* @return {?}
|
1775
2139
|
*/
|
1776
2140
|
function () {
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
2141
|
+
var _this = this;
|
2142
|
+
this.isFocused = true;
|
2143
|
+
// add setTimeout to fix issue #5251
|
2144
|
+
// to get and emit updated value if it's changed on focus
|
2145
|
+
setTimeout((/**
|
2146
|
+
* @return {?}
|
2147
|
+
*/
|
2148
|
+
function () {
|
2149
|
+
if (_this.typeaheadMinLength === 0) {
|
2150
|
+
_this.typeaheadLoading.emit(true);
|
2151
|
+
_this.keyUpEventEmitter.emit(_this.element.nativeElement.value || '');
|
2152
|
+
}
|
2153
|
+
}), 0);
|
1781
2154
|
};
|
1782
2155
|
/**
|
1783
2156
|
* @return {?}
|
@@ -1786,9 +2159,13 @@
|
|
1786
2159
|
* @return {?}
|
1787
2160
|
*/
|
1788
2161
|
function () {
|
2162
|
+
this.isFocused = false;
|
1789
2163
|
if (this._container && !this._container.isFocused) {
|
1790
2164
|
this.typeaheadOnBlur.emit(this._container.active);
|
1791
2165
|
}
|
2166
|
+
if (!this.container && this._matches.length === 0) {
|
2167
|
+
this.typeaheadOnBlur.emit(new TypeaheadMatch(this.element.nativeElement.value, this.element.nativeElement.value, false));
|
2168
|
+
}
|
1792
2169
|
};
|
1793
2170
|
/**
|
1794
2171
|
* @param {?} event
|
@@ -1804,6 +2181,10 @@
|
|
1804
2181
|
return;
|
1805
2182
|
}
|
1806
2183
|
/* tslint:disable-next-line: deprecation */
|
2184
|
+
if (event.keyCode === 9 || event.key === 'Tab') {
|
2185
|
+
this.onBlur();
|
2186
|
+
}
|
2187
|
+
/* tslint:disable-next-line: deprecation */
|
1807
2188
|
if (event.keyCode === 9 || event.key === 'Tab' || event.keyCode === 13 || event.key === 'Enter') {
|
1808
2189
|
event.preventDefault();
|
1809
2190
|
if (this.typeaheadSelectFirstItem) {
|
@@ -1854,7 +2235,7 @@
|
|
1854
2235
|
this._typeahead
|
1855
2236
|
.attach(TypeaheadContainerComponent)
|
1856
2237
|
.to(this.container)
|
1857
|
-
.position({ attachment: (this.dropup ? 'top' : 'bottom') + "
|
2238
|
+
.position({ attachment: (this.dropup ? 'top' : 'bottom') + " left" })
|
1858
2239
|
.show({
|
1859
2240
|
typeaheadRef: this,
|
1860
2241
|
placement: this.placement,
|
@@ -1888,6 +2269,15 @@
|
|
1888
2269
|
: normalizedQuery;
|
1889
2270
|
this._container.matches = this._matches;
|
1890
2271
|
this.element.nativeElement.focus();
|
2272
|
+
this._container.activeChangeEvent.subscribe((/**
|
2273
|
+
* @param {?} activeId
|
2274
|
+
* @return {?}
|
2275
|
+
*/
|
2276
|
+
function (activeId) {
|
2277
|
+
_this.activeDescendant = activeId;
|
2278
|
+
_this.changeDetection.markForCheck();
|
2279
|
+
}));
|
2280
|
+
this.isOpen = true;
|
1891
2281
|
};
|
1892
2282
|
/**
|
1893
2283
|
* @return {?}
|
@@ -1900,6 +2290,8 @@
|
|
1900
2290
|
this._typeahead.hide();
|
1901
2291
|
this._outsideClickListener();
|
1902
2292
|
this._container = null;
|
2293
|
+
this.isOpen = false;
|
2294
|
+
this.changeDetection.markForCheck();
|
1903
2295
|
}
|
1904
2296
|
};
|
1905
2297
|
/**
|
@@ -1984,8 +2376,7 @@
|
|
1984
2376
|
* @return {?}
|
1985
2377
|
*/
|
1986
2378
|
function (option) {
|
1987
|
-
return (option
|
1988
|
-
_this.testMatch(_this.normalizeOption(option), normalizedQuery));
|
2379
|
+
return option && _this.testMatch(_this.normalizeOption(option), normalizedQuery);
|
1989
2380
|
})), operators.toArray());
|
1990
2381
|
})))
|
1991
2382
|
.subscribe((/**
|
@@ -1996,16 +2387,12 @@
|
|
1996
2387
|
_this.finalizeAsyncCall(matches);
|
1997
2388
|
})));
|
1998
2389
|
};
|
1999
|
-
// tslint:disable-next-line:no-any
|
2000
|
-
// tslint:disable-next-line:no-any
|
2001
2390
|
/**
|
2002
2391
|
* @protected
|
2003
2392
|
* @param {?} option
|
2004
2393
|
* @return {?}
|
2005
2394
|
*/
|
2006
|
-
TypeaheadDirective.prototype.normalizeOption =
|
2007
|
-
// tslint:disable-next-line:no-any
|
2008
|
-
/**
|
2395
|
+
TypeaheadDirective.prototype.normalizeOption = /**
|
2009
2396
|
* @protected
|
2010
2397
|
* @param {?} option
|
2011
2398
|
* @return {?}
|
@@ -2030,8 +2417,7 @@
|
|
2030
2417
|
* @return {?}
|
2031
2418
|
*/
|
2032
2419
|
function (value) {
|
2033
|
-
// If singleWords, break model here to not be doing extra work on each
|
2034
|
-
// iteration
|
2420
|
+
// If singleWords, break model here to not be doing extra work on each iteration
|
2035
2421
|
/** @type {?} */
|
2036
2422
|
var normalizedQuery = (this.typeaheadLatinize
|
2037
2423
|
? latinize(value)
|
@@ -2087,6 +2473,9 @@
|
|
2087
2473
|
this.hide();
|
2088
2474
|
return;
|
2089
2475
|
}
|
2476
|
+
if (!this.isFocused && this.cancelRequestOnFocusLost) {
|
2477
|
+
return;
|
2478
|
+
}
|
2090
2479
|
if (this._container) {
|
2091
2480
|
// fix: remove usage of ngControl internals
|
2092
2481
|
/** @type {?} */
|
@@ -2119,12 +2508,14 @@
|
|
2119
2508
|
var _this = this;
|
2120
2509
|
/** @type {?} */
|
2121
2510
|
var limited = options.slice(0, this.typeaheadOptionsLimit);
|
2511
|
+
/** @type {?} */
|
2512
|
+
var sorted = !this.typeaheadOrderBy ? limited : this.orderMatches(limited);
|
2122
2513
|
if (this.typeaheadGroupField) {
|
2123
2514
|
/** @type {?} */
|
2124
2515
|
var matches_1 = [];
|
2125
2516
|
// extract all group names
|
2126
2517
|
/** @type {?} */
|
2127
|
-
var groups =
|
2518
|
+
var groups = sorted
|
2128
2519
|
.map((/**
|
2129
2520
|
* @param {?} option
|
2130
2521
|
* @return {?}
|
@@ -2147,21 +2538,15 @@
|
|
2147
2538
|
// add group header to array of matches
|
2148
2539
|
matches_1.push(new TypeaheadMatch(group, group, true));
|
2149
2540
|
// add each item of group to array of matches
|
2150
|
-
matches_1 = matches_1.concat(
|
2151
|
-
.filter((
|
2152
|
-
// tslint:disable-next-line:no-any
|
2153
|
-
// tslint:disable-next-line:no-any
|
2154
|
-
/**
|
2541
|
+
matches_1 = matches_1.concat(sorted
|
2542
|
+
.filter((/**
|
2155
2543
|
* @param {?} option
|
2156
2544
|
* @return {?}
|
2157
2545
|
*/
|
2158
2546
|
function (option) {
|
2159
2547
|
return getValueFromObject(option, _this.typeaheadGroupField) === group;
|
2160
2548
|
}))
|
2161
|
-
.map((
|
2162
|
-
// tslint:disable-next-line:no-any
|
2163
|
-
// tslint:disable-next-line:no-any
|
2164
|
-
/**
|
2549
|
+
.map((/**
|
2165
2550
|
* @param {?} option
|
2166
2551
|
* @return {?}
|
2167
2552
|
*/
|
@@ -2172,7 +2557,7 @@
|
|
2172
2557
|
this._matches = matches_1;
|
2173
2558
|
}
|
2174
2559
|
else {
|
2175
|
-
this._matches =
|
2560
|
+
this._matches = sorted.map((
|
2176
2561
|
// tslint:disable-next-line:no-any
|
2177
2562
|
// tslint:disable-next-line:no-any
|
2178
2563
|
/**
|
@@ -2184,6 +2569,61 @@
|
|
2184
2569
|
}));
|
2185
2570
|
}
|
2186
2571
|
};
|
2572
|
+
/**
|
2573
|
+
* @protected
|
2574
|
+
* @param {?} options
|
2575
|
+
* @return {?}
|
2576
|
+
*/
|
2577
|
+
TypeaheadDirective.prototype.orderMatches = /**
|
2578
|
+
* @protected
|
2579
|
+
* @param {?} options
|
2580
|
+
* @return {?}
|
2581
|
+
*/
|
2582
|
+
function (options) {
|
2583
|
+
if (!options.length) {
|
2584
|
+
return options;
|
2585
|
+
}
|
2586
|
+
if (this.typeaheadOrderBy !== null
|
2587
|
+
&& this.typeaheadOrderBy !== undefined
|
2588
|
+
&& typeof this.typeaheadOrderBy === 'object'
|
2589
|
+
&& Object.keys(this.typeaheadOrderBy).length === 0) {
|
2590
|
+
// tslint:disable-next-line:no-console
|
2591
|
+
console.error('Field and direction properties for typeaheadOrderBy have to be set according to documentation!');
|
2592
|
+
return options;
|
2593
|
+
}
|
2594
|
+
var _a = this.typeaheadOrderBy, field = _a.field, direction = _a.direction;
|
2595
|
+
if (!direction || !(direction === 'asc' || direction === 'desc')) {
|
2596
|
+
// tslint:disable-next-line:no-console
|
2597
|
+
console.error('typeaheadOrderBy direction has to equal "asc" or "desc". Please follow the documentation.');
|
2598
|
+
return options;
|
2599
|
+
}
|
2600
|
+
if (typeof options[0] === 'string') {
|
2601
|
+
return direction === 'asc' ? options.sort() : options.sort().reverse();
|
2602
|
+
}
|
2603
|
+
if (!field || typeof field !== 'string') {
|
2604
|
+
// tslint:disable-next-line:no-console
|
2605
|
+
console.error('typeaheadOrderBy field has to set according to the documentation.');
|
2606
|
+
return options;
|
2607
|
+
}
|
2608
|
+
return options.sort((/**
|
2609
|
+
* @param {?} a
|
2610
|
+
* @param {?} b
|
2611
|
+
* @return {?}
|
2612
|
+
*/
|
2613
|
+
function (a, b) {
|
2614
|
+
/** @type {?} */
|
2615
|
+
var stringA = getValueFromObject(a, field);
|
2616
|
+
/** @type {?} */
|
2617
|
+
var stringB = getValueFromObject(b, field);
|
2618
|
+
if (stringA < stringB) {
|
2619
|
+
return direction === 'asc' ? -1 : 1;
|
2620
|
+
}
|
2621
|
+
if (stringA > stringB) {
|
2622
|
+
return direction === 'asc' ? 1 : -1;
|
2623
|
+
}
|
2624
|
+
return 0;
|
2625
|
+
}));
|
2626
|
+
};
|
2187
2627
|
/**
|
2188
2628
|
* @protected
|
2189
2629
|
* @return {?}
|
@@ -2196,7 +2636,16 @@
|
|
2196
2636
|
return this._matches.length > 0;
|
2197
2637
|
};
|
2198
2638
|
TypeaheadDirective.decorators = [
|
2199
|
-
{ type: core.Directive, args: [{
|
2639
|
+
{ type: core.Directive, args: [{
|
2640
|
+
selector: '[typeahead]',
|
2641
|
+
exportAs: 'bs-typeahead',
|
2642
|
+
host: {
|
2643
|
+
'[attr.aria-activedescendant]': 'activeDescendant',
|
2644
|
+
'[attr.aria-aria-owns]': 'isOpen ? this._container.popupId : null',
|
2645
|
+
'[attr.aria-aria-expanded]': 'isOpen',
|
2646
|
+
'[attr.aria-autocomplete]': 'list'
|
2647
|
+
}
|
2648
|
+
},] }
|
2200
2649
|
];
|
2201
2650
|
/** @nocollapse */
|
2202
2651
|
TypeaheadDirective.ctorParameters = function () { return [
|
@@ -2217,6 +2666,7 @@
|
|
2217
2666
|
typeaheadOptionsLimit: [{ type: core.Input }],
|
2218
2667
|
typeaheadOptionField: [{ type: core.Input }],
|
2219
2668
|
typeaheadGroupField: [{ type: core.Input }],
|
2669
|
+
typeaheadOrderBy: [{ type: core.Input }],
|
2220
2670
|
typeaheadAsync: [{ type: core.Input }],
|
2221
2671
|
typeaheadLatinize: [{ type: core.Input }],
|
2222
2672
|
typeaheadSingleWords: [{ type: core.Input }],
|
@@ -2243,6 +2693,231 @@
|
|
2243
2693
|
};
|
2244
2694
|
return TypeaheadDirective;
|
2245
2695
|
}());
|
2696
|
+
if (false) {
|
2697
|
+
/**
|
2698
|
+
* options source, can be Array of strings, objects or
|
2699
|
+
* an Observable for external matching process
|
2700
|
+
* @type {?}
|
2701
|
+
*/
|
2702
|
+
TypeaheadDirective.prototype.typeahead;
|
2703
|
+
/**
|
2704
|
+
* minimal no of characters that needs to be entered before
|
2705
|
+
* typeahead kicks-in. When set to 0, typeahead shows on focus with full
|
2706
|
+
* list of options (limited as normal by typeaheadOptionsLimit)
|
2707
|
+
* @type {?}
|
2708
|
+
*/
|
2709
|
+
TypeaheadDirective.prototype.typeaheadMinLength;
|
2710
|
+
/**
|
2711
|
+
* sets use adaptive position
|
2712
|
+
* @type {?}
|
2713
|
+
*/
|
2714
|
+
TypeaheadDirective.prototype.adaptivePosition;
|
2715
|
+
/**
|
2716
|
+
* turn on/off animation
|
2717
|
+
* @type {?}
|
2718
|
+
*/
|
2719
|
+
TypeaheadDirective.prototype.isAnimated;
|
2720
|
+
/**
|
2721
|
+
* minimal wait time after last character typed before typeahead kicks-in
|
2722
|
+
* @type {?}
|
2723
|
+
*/
|
2724
|
+
TypeaheadDirective.prototype.typeaheadWaitMs;
|
2725
|
+
/**
|
2726
|
+
* maximum length of options items list. The default value is 20
|
2727
|
+
* @type {?}
|
2728
|
+
*/
|
2729
|
+
TypeaheadDirective.prototype.typeaheadOptionsLimit;
|
2730
|
+
/**
|
2731
|
+
* when options source is an array of objects, the name of field
|
2732
|
+
* that contains the options value, we use array item as option in case
|
2733
|
+
* of this field is missing. Supports nested properties and methods.
|
2734
|
+
* @type {?}
|
2735
|
+
*/
|
2736
|
+
TypeaheadDirective.prototype.typeaheadOptionField;
|
2737
|
+
/**
|
2738
|
+
* when options source is an array of objects, the name of field that
|
2739
|
+
* contains the group value, matches are grouped by this field when set.
|
2740
|
+
* @type {?}
|
2741
|
+
*/
|
2742
|
+
TypeaheadDirective.prototype.typeaheadGroupField;
|
2743
|
+
/**
|
2744
|
+
* Used to specify a custom order of matches. When options source is an array of objects
|
2745
|
+
* a field for sorting has to be set up. In case of options source is an array of string,
|
2746
|
+
* a field for sorting is absent. The ordering direction could be changed to ascending or descending.
|
2747
|
+
* @type {?}
|
2748
|
+
*/
|
2749
|
+
TypeaheadDirective.prototype.typeaheadOrderBy;
|
2750
|
+
/**
|
2751
|
+
* should be used only in case of typeahead attribute is Observable of array.
|
2752
|
+
* If true - loading of options will be async, otherwise - sync.
|
2753
|
+
* true make sense if options array is large.
|
2754
|
+
* @type {?}
|
2755
|
+
*/
|
2756
|
+
TypeaheadDirective.prototype.typeaheadAsync;
|
2757
|
+
/**
|
2758
|
+
* match latin symbols.
|
2759
|
+
* If true the word súper would match super and vice versa.
|
2760
|
+
* @type {?}
|
2761
|
+
*/
|
2762
|
+
TypeaheadDirective.prototype.typeaheadLatinize;
|
2763
|
+
/**
|
2764
|
+
* Can be use to search words by inserting a single white space between each characters
|
2765
|
+
* for example 'C a l i f o r n i a' will match 'California'.
|
2766
|
+
* @type {?}
|
2767
|
+
*/
|
2768
|
+
TypeaheadDirective.prototype.typeaheadSingleWords;
|
2769
|
+
/**
|
2770
|
+
* should be used only in case typeaheadSingleWords attribute is true.
|
2771
|
+
* Sets the word delimiter to break words. Defaults to space.
|
2772
|
+
* @type {?}
|
2773
|
+
*/
|
2774
|
+
TypeaheadDirective.prototype.typeaheadWordDelimiters;
|
2775
|
+
/**
|
2776
|
+
* should be used only in case typeaheadSingleWords attribute is true.
|
2777
|
+
* Sets the word delimiter to match exact phrase.
|
2778
|
+
* Defaults to simple and double quotes.
|
2779
|
+
* @type {?}
|
2780
|
+
*/
|
2781
|
+
TypeaheadDirective.prototype.typeaheadPhraseDelimiters;
|
2782
|
+
/**
|
2783
|
+
* used to specify a custom item template.
|
2784
|
+
* Template variables exposed are called item and index;
|
2785
|
+
* @type {?}
|
2786
|
+
*/
|
2787
|
+
TypeaheadDirective.prototype.typeaheadItemTemplate;
|
2788
|
+
/**
|
2789
|
+
* used to specify a custom options list template.
|
2790
|
+
* Template variables: matches, itemTemplate, query
|
2791
|
+
* @type {?}
|
2792
|
+
*/
|
2793
|
+
TypeaheadDirective.prototype.optionsListTemplate;
|
2794
|
+
/**
|
2795
|
+
* specifies if typeahead is scrollable
|
2796
|
+
* @type {?}
|
2797
|
+
*/
|
2798
|
+
TypeaheadDirective.prototype.typeaheadScrollable;
|
2799
|
+
/**
|
2800
|
+
* specifies number of options to show in scroll view
|
2801
|
+
* @type {?}
|
2802
|
+
*/
|
2803
|
+
TypeaheadDirective.prototype.typeaheadOptionsInScrollableView;
|
2804
|
+
/**
|
2805
|
+
* used to hide result on blur
|
2806
|
+
* @type {?}
|
2807
|
+
*/
|
2808
|
+
TypeaheadDirective.prototype.typeaheadHideResultsOnBlur;
|
2809
|
+
/**
|
2810
|
+
* fired when an options list was opened and the user clicked Tab
|
2811
|
+
* If a value equal true, it will be chosen first or active item in the list
|
2812
|
+
* If value equal false, it will be chosen an active item in the list or nothing
|
2813
|
+
* @type {?}
|
2814
|
+
*/
|
2815
|
+
TypeaheadDirective.prototype.typeaheadSelectFirstItem;
|
2816
|
+
/**
|
2817
|
+
* makes active first item in a list
|
2818
|
+
* @type {?}
|
2819
|
+
*/
|
2820
|
+
TypeaheadDirective.prototype.typeaheadIsFirstItemActive;
|
2821
|
+
/**
|
2822
|
+
* fired when 'busy' state of this component was changed,
|
2823
|
+
* fired on async mode only, returns boolean
|
2824
|
+
* @type {?}
|
2825
|
+
*/
|
2826
|
+
TypeaheadDirective.prototype.typeaheadLoading;
|
2827
|
+
/**
|
2828
|
+
* fired on every key event and returns true
|
2829
|
+
* in case of matches are not detected
|
2830
|
+
* @type {?}
|
2831
|
+
*/
|
2832
|
+
TypeaheadDirective.prototype.typeaheadNoResults;
|
2833
|
+
/**
|
2834
|
+
* fired when option was selected, return object with data of this option
|
2835
|
+
* @type {?}
|
2836
|
+
*/
|
2837
|
+
TypeaheadDirective.prototype.typeaheadOnSelect;
|
2838
|
+
/**
|
2839
|
+
* fired when blur event occurs. returns the active item
|
2840
|
+
* @type {?}
|
2841
|
+
*/
|
2842
|
+
TypeaheadDirective.prototype.typeaheadOnBlur;
|
2843
|
+
/**
|
2844
|
+
* A selector specifying the element the typeahead should be appended to.
|
2845
|
+
* @type {?}
|
2846
|
+
*/
|
2847
|
+
TypeaheadDirective.prototype.container;
|
2848
|
+
/**
|
2849
|
+
* This attribute indicates that the dropdown should be opened upwards
|
2850
|
+
* @type {?}
|
2851
|
+
*/
|
2852
|
+
TypeaheadDirective.prototype.dropup;
|
2853
|
+
/**
|
2854
|
+
* if false don't focus the input element the typeahead directive is associated with on selection
|
2855
|
+
* @type {?}
|
2856
|
+
*/
|
2857
|
+
TypeaheadDirective.prototype.activeDescendant;
|
2858
|
+
/** @type {?} */
|
2859
|
+
TypeaheadDirective.prototype.isOpen;
|
2860
|
+
/** @type {?} */
|
2861
|
+
TypeaheadDirective.prototype.list;
|
2862
|
+
/** @type {?} */
|
2863
|
+
TypeaheadDirective.prototype._container;
|
2864
|
+
/** @type {?} */
|
2865
|
+
TypeaheadDirective.prototype.isActiveItemChanged;
|
2866
|
+
/** @type {?} */
|
2867
|
+
TypeaheadDirective.prototype.isFocused;
|
2868
|
+
/** @type {?} */
|
2869
|
+
TypeaheadDirective.prototype.cancelRequestOnFocusLost;
|
2870
|
+
/**
|
2871
|
+
* @type {?}
|
2872
|
+
* @protected
|
2873
|
+
*/
|
2874
|
+
TypeaheadDirective.prototype.keyUpEventEmitter;
|
2875
|
+
/**
|
2876
|
+
* @type {?}
|
2877
|
+
* @protected
|
2878
|
+
*/
|
2879
|
+
TypeaheadDirective.prototype._matches;
|
2880
|
+
/**
|
2881
|
+
* @type {?}
|
2882
|
+
* @protected
|
2883
|
+
*/
|
2884
|
+
TypeaheadDirective.prototype.placement;
|
2885
|
+
/**
|
2886
|
+
* @type {?}
|
2887
|
+
* @private
|
2888
|
+
*/
|
2889
|
+
TypeaheadDirective.prototype._typeahead;
|
2890
|
+
/**
|
2891
|
+
* @type {?}
|
2892
|
+
* @private
|
2893
|
+
*/
|
2894
|
+
TypeaheadDirective.prototype._subscriptions;
|
2895
|
+
/**
|
2896
|
+
* @type {?}
|
2897
|
+
* @private
|
2898
|
+
*/
|
2899
|
+
TypeaheadDirective.prototype._outsideClickListener;
|
2900
|
+
/**
|
2901
|
+
* @type {?}
|
2902
|
+
* @private
|
2903
|
+
*/
|
2904
|
+
TypeaheadDirective.prototype.changeDetection;
|
2905
|
+
/**
|
2906
|
+
* @type {?}
|
2907
|
+
* @private
|
2908
|
+
*/
|
2909
|
+
TypeaheadDirective.prototype.element;
|
2910
|
+
/**
|
2911
|
+
* @type {?}
|
2912
|
+
* @private
|
2913
|
+
*/
|
2914
|
+
TypeaheadDirective.prototype.ngControl;
|
2915
|
+
/**
|
2916
|
+
* @type {?}
|
2917
|
+
* @private
|
2918
|
+
*/
|
2919
|
+
TypeaheadDirective.prototype.renderer;
|
2920
|
+
}
|
2246
2921
|
|
2247
2922
|
/**
|
2248
2923
|
* @fileoverview added by tsickle
|
@@ -2280,6 +2955,7 @@
|
|
2280
2955
|
exports.TypeaheadMatch = TypeaheadMatch;
|
2281
2956
|
exports.TypeaheadModule = TypeaheadModule;
|
2282
2957
|
exports.TypeaheadOptions = TypeaheadOptions;
|
2958
|
+
exports.TypeaheadOrder = TypeaheadOrder;
|
2283
2959
|
exports.escapeRegexp = escapeRegexp;
|
2284
2960
|
exports.getValueFromObject = getValueFromObject;
|
2285
2961
|
exports.latinMap = latinMap;
|
@@ -2289,5 +2965,5 @@
|
|
2289
2965
|
|
2290
2966
|
Object.defineProperty(exports, '__esModule', { value: true });
|
2291
2967
|
|
2292
|
-
}));
|
2968
|
+
})));
|
2293
2969
|
//# sourceMappingURL=ngx-bootstrap-typeahead.umd.js.map
|