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,4 +1,4 @@
|
|
1
|
-
import { Injectable, Component, Input, HostBinding, ElementRef, Host, Renderer2, NgModule } from '@angular/core';
|
1
|
+
import { Injectable, ɵɵdefineInjectable, Component, Input, HostBinding, ElementRef, Host, Renderer2, NgModule } from '@angular/core';
|
2
2
|
import { isBs3 } from 'ngx-bootstrap/utils';
|
3
3
|
import { CommonModule } from '@angular/common';
|
4
4
|
|
@@ -18,8 +18,11 @@ var ProgressbarConfig = /** @class */ (function () {
|
|
18
18
|
this.max = 100;
|
19
19
|
}
|
20
20
|
ProgressbarConfig.decorators = [
|
21
|
-
{ type: Injectable
|
21
|
+
{ type: Injectable, args: [{
|
22
|
+
providedIn: 'root'
|
23
|
+
},] }
|
22
24
|
];
|
25
|
+
/** @nocollapse */ ProgressbarConfig.ɵprov = ɵɵdefineInjectable({ factory: function ProgressbarConfig_Factory() { return new ProgressbarConfig(); }, token: ProgressbarConfig, providedIn: "root" });
|
23
26
|
return ProgressbarConfig;
|
24
27
|
}());
|
25
28
|
if (false) {
|
@@ -42,10 +45,10 @@ if (false) {
|
|
42
45
|
var ProgressbarComponent = /** @class */ (function () {
|
43
46
|
function ProgressbarComponent(config) {
|
44
47
|
this.isStacked = false;
|
48
|
+
this._max = 100;
|
45
49
|
this.addClass = true;
|
46
50
|
/* tslint:disable-next-line:no-any */
|
47
51
|
this.bars = [];
|
48
|
-
this._max = 100;
|
49
52
|
Object.assign(this, config);
|
50
53
|
}
|
51
54
|
Object.defineProperty(ProgressbarComponent.prototype, "animate", {
|
@@ -168,7 +171,7 @@ var ProgressbarComponent = /** @class */ (function () {
|
|
168
171
|
ProgressbarComponent.decorators = [
|
169
172
|
{ type: Component, args: [{
|
170
173
|
selector: 'progressbar',
|
171
|
-
template: "<bar [type]=\"type\" [value]=\"_value\" *ngIf=\"!isStacked\">\n <ng-content></ng-content>\n</bar>\n<ng-template [ngIf]=\"isStacked\">\n <bar *ngFor=\"let item of _value\" [type]=\"item.type\" [value]=\"item.value\">{{ item.label }}</bar>\n</ng-template>\n",
|
174
|
+
template: "<bar [type]=\"type\" [value]=\"_value\" [max]=\"_max\" *ngIf=\"!isStacked\">\n <ng-content></ng-content>\n</bar>\n<ng-template [ngIf]=\"isStacked\">\n <bar *ngFor=\"let item of _value\" [type]=\"item.type\" [value]=\"item.value\" [max]=\"item.max\">{{ item.label }}</bar>\n</ng-template>\n",
|
172
175
|
styles: ["\n :host {\n width: 100%;\n display: flex;\n }\n "]
|
173
176
|
}] }
|
174
177
|
];
|
@@ -199,16 +202,13 @@ if (false) {
|
|
199
202
|
/** @type {?} */
|
200
203
|
ProgressbarComponent.prototype._animate;
|
201
204
|
/** @type {?} */
|
205
|
+
ProgressbarComponent.prototype._max;
|
206
|
+
/** @type {?} */
|
202
207
|
ProgressbarComponent.prototype._value;
|
203
208
|
/** @type {?} */
|
204
209
|
ProgressbarComponent.prototype.addClass;
|
205
210
|
/** @type {?} */
|
206
211
|
ProgressbarComponent.prototype.bars;
|
207
|
-
/**
|
208
|
-
* @type {?}
|
209
|
-
* @protected
|
210
|
-
*/
|
211
|
-
ProgressbarComponent.prototype._max;
|
212
212
|
}
|
213
213
|
|
214
214
|
/**
|
@@ -225,49 +225,6 @@ var BarComponent = /** @class */ (function () {
|
|
225
225
|
this.percent = 0;
|
226
226
|
this.progress = progress;
|
227
227
|
}
|
228
|
-
Object.defineProperty(BarComponent.prototype, "type", {
|
229
|
-
/** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */
|
230
|
-
get: /**
|
231
|
-
* provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger`
|
232
|
-
* @return {?}
|
233
|
-
*/
|
234
|
-
function () {
|
235
|
-
return this._type;
|
236
|
-
},
|
237
|
-
set: /**
|
238
|
-
* @param {?} v
|
239
|
-
* @return {?}
|
240
|
-
*/
|
241
|
-
function (v) {
|
242
|
-
this._type = v;
|
243
|
-
this.applyTypeClasses();
|
244
|
-
},
|
245
|
-
enumerable: true,
|
246
|
-
configurable: true
|
247
|
-
});
|
248
|
-
Object.defineProperty(BarComponent.prototype, "value", {
|
249
|
-
/** current value of progress bar */
|
250
|
-
get: /**
|
251
|
-
* current value of progress bar
|
252
|
-
* @return {?}
|
253
|
-
*/
|
254
|
-
function () {
|
255
|
-
return this._value;
|
256
|
-
},
|
257
|
-
set: /**
|
258
|
-
* @param {?} v
|
259
|
-
* @return {?}
|
260
|
-
*/
|
261
|
-
function (v) {
|
262
|
-
if (!v && v !== 0) {
|
263
|
-
return;
|
264
|
-
}
|
265
|
-
this._value = v;
|
266
|
-
this.recalculatePercentage();
|
267
|
-
},
|
268
|
-
enumerable: true,
|
269
|
-
configurable: true
|
270
|
-
});
|
271
228
|
Object.defineProperty(BarComponent.prototype, "setBarWidth", {
|
272
229
|
get: /**
|
273
230
|
* @return {?}
|
@@ -307,6 +264,27 @@ var BarComponent = /** @class */ (function () {
|
|
307
264
|
function () {
|
308
265
|
this.progress.removeBar(this);
|
309
266
|
};
|
267
|
+
/**
|
268
|
+
* @param {?} changes
|
269
|
+
* @return {?}
|
270
|
+
*/
|
271
|
+
BarComponent.prototype.ngOnChanges = /**
|
272
|
+
* @param {?} changes
|
273
|
+
* @return {?}
|
274
|
+
*/
|
275
|
+
function (changes) {
|
276
|
+
if (changes.value) {
|
277
|
+
if (!changes.value.currentValue && changes.value.currentValue !== 0) {
|
278
|
+
return;
|
279
|
+
}
|
280
|
+
this.value = changes.value.currentValue;
|
281
|
+
this.recalculatePercentage();
|
282
|
+
}
|
283
|
+
if (changes.type) {
|
284
|
+
this.type = changes.type.currentValue;
|
285
|
+
this.applyTypeClasses();
|
286
|
+
}
|
287
|
+
};
|
310
288
|
/**
|
311
289
|
* @return {?}
|
312
290
|
*/
|
@@ -347,14 +325,14 @@ var BarComponent = /** @class */ (function () {
|
|
347
325
|
this.renderer.removeClass(this.el.nativeElement, bgClass);
|
348
326
|
this._prevType = null;
|
349
327
|
}
|
350
|
-
if (this.
|
328
|
+
if (this.type) {
|
351
329
|
/** @type {?} */
|
352
|
-
var barTypeClass = "progress-bar-" + this.
|
330
|
+
var barTypeClass = "progress-bar-" + this.type;
|
353
331
|
/** @type {?} */
|
354
|
-
var bgClass = "bg-" + this.
|
332
|
+
var bgClass = "bg-" + this.type;
|
355
333
|
this.renderer.addClass(this.el.nativeElement, barTypeClass);
|
356
334
|
this.renderer.addClass(this.el.nativeElement, bgClass);
|
357
|
-
this._prevType = this.
|
335
|
+
this._prevType = this.type;
|
358
336
|
}
|
359
337
|
};
|
360
338
|
BarComponent.decorators = [
|
@@ -381,6 +359,7 @@ var BarComponent = /** @class */ (function () {
|
|
381
359
|
{ type: Renderer2 }
|
382
360
|
]; };
|
383
361
|
BarComponent.propDecorators = {
|
362
|
+
max: [{ type: Input }],
|
384
363
|
type: [{ type: Input }],
|
385
364
|
value: [{ type: Input }],
|
386
365
|
setBarWidth: [{ type: HostBinding, args: ['style.width.%',] }],
|
@@ -391,6 +370,16 @@ var BarComponent = /** @class */ (function () {
|
|
391
370
|
if (false) {
|
392
371
|
/** @type {?} */
|
393
372
|
BarComponent.prototype.max;
|
373
|
+
/**
|
374
|
+
* provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger`
|
375
|
+
* @type {?}
|
376
|
+
*/
|
377
|
+
BarComponent.prototype.type;
|
378
|
+
/**
|
379
|
+
* current value of progress bar
|
380
|
+
* @type {?}
|
381
|
+
*/
|
382
|
+
BarComponent.prototype.value;
|
394
383
|
/** @type {?} */
|
395
384
|
BarComponent.prototype.addClass;
|
396
385
|
/** @type {?} */
|
@@ -401,16 +390,6 @@ if (false) {
|
|
401
390
|
BarComponent.prototype.percent;
|
402
391
|
/** @type {?} */
|
403
392
|
BarComponent.prototype.progress;
|
404
|
-
/**
|
405
|
-
* @type {?}
|
406
|
-
* @protected
|
407
|
-
*/
|
408
|
-
BarComponent.prototype._value;
|
409
|
-
/**
|
410
|
-
* @type {?}
|
411
|
-
* @protected
|
412
|
-
*/
|
413
|
-
BarComponent.prototype._type;
|
414
393
|
/**
|
415
394
|
* @type {?}
|
416
395
|
* @private
|
@@ -442,7 +421,7 @@ var ProgressbarModule = /** @class */ (function () {
|
|
442
421
|
* @return {?}
|
443
422
|
*/
|
444
423
|
function () {
|
445
|
-
return { ngModule: ProgressbarModule, providers: [
|
424
|
+
return { ngModule: ProgressbarModule, providers: [] };
|
446
425
|
};
|
447
426
|
ProgressbarModule.decorators = [
|
448
427
|
{ type: NgModule, args: [{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-bootstrap-progressbar.js","sources":["ng://ngx-bootstrap/progressbar/progressbar.config.ts","ng://ngx-bootstrap/progressbar/progressbar.component.ts","ng://ngx-bootstrap/progressbar/bar.component.ts","ng://ngx-bootstrap/progressbar/progressbar.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class ProgressbarConfig {\n /** if `true` changing value of progress bar will be animated */\n animate: Boolean = false;\n /** maximum total value of progress element */\n max = 100;\n}\n","import { Component, HostBinding, Input } from '@angular/core';\nimport { ProgressbarConfig } from './progressbar.config';\nimport { ProgressbarType } from './progressbar-type.interface';\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { BarComponent } from './bar.component';\n\n@Component({\n selector: 'progressbar',\n templateUrl: './progressbar.component.html',\n styles: [\n `\n :host {\n width: 100%;\n display: flex;\n }\n `\n ]\n})\nexport class ProgressbarComponent {\n /** if `true` changing value of progress bar will be animated */\n @Input()\n set animate(value: boolean) {\n this._animate = value;\n this.bars.forEach((b: BarComponent) => {\n b.animate = value;\n });\n }\n /** If `true`, striped classes are applied */\n @Input()\n set striped(value: boolean) {\n this._striped = value;\n this.bars.forEach((b: BarComponent) => {\n b.striped = value;\n });\n }\n\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n @Input() type: ProgressbarType;\n /** current value of progress bar. Could be a number or array of objects\n * like {\"value\":15,\"type\":\"info\",\"label\":\"15 %\"}\n */\n @Input()\n /* tslint:disable-next-line:no-any */\n set value(value: number | any[]) {\n this.isStacked = Array.isArray(value);\n this._value = value;\n }\n isStacked = false;\n _striped: boolean;\n _animate: boolean;\n /* tslint:disable-next-line:no-any */\n _value: number | any[];\n get isBs3(): boolean {\n return isBs3();\n }\n\n /** maximum total value of progress element */\n @HostBinding('attr.max')\n @Input()\n get max(): number {\n return this._max;\n }\n\n set max(v: number) {\n this._max = v;\n this.bars.forEach((bar: BarComponent) => {\n bar.recalculatePercentage();\n });\n }\n\n @HostBinding('class.progress') addClass = true;\n\n /* tslint:disable-next-line:no-any */\n bars: BarComponent[] = [];\n\n protected _max = 100;\n\n constructor(config: ProgressbarConfig) {\n Object.assign(this, config);\n }\n addBar(bar: BarComponent): void {\n bar.animate = this._animate;\n bar.striped = this._striped;\n\n this.bars.push(bar);\n }\n\n removeBar(bar: BarComponent): void {\n this.bars.splice(this.bars.indexOf(bar), 1);\n }\n}\n","import {\n Component,\n Host,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n ElementRef,\n Renderer2\n} from '@angular/core';\n\nimport { ProgressbarComponent } from './progressbar.component';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n// todo: number pipe\n// todo: use query from progress?\n@Component({\n selector: 'bar',\n templateUrl: './bar.component.html',\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n '[class.progress-bar-animated]': '!isBs3 && animate',\n '[class.progress-bar-striped]': 'striped',\n '[class.active]': 'isBs3 && animate',\n '[attr.aria-valuenow]': 'value',\n '[attr.aria-valuetext]': 'percent ? percent.toFixed(0) + \"%\" : \"\"',\n '[attr.aria-valuemax]': 'max',\n '[style.height.%]': '\"100\"'\n }\n})\nexport class BarComponent implements OnInit, OnDestroy {\n max: number;\n\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n @Input()\n get type(): string {\n return this._type;\n }\n\n set type(v: string) {\n this._type = v;\n this.applyTypeClasses();\n }\n\n /** current value of progress bar */\n @Input()\n get value(): number {\n return this._value;\n }\n\n set value(v: number) {\n if (!v && v !== 0) {\n return;\n }\n this._value = v;\n this.recalculatePercentage();\n }\n\n @HostBinding('style.width.%')\n get setBarWidth() {\n this.recalculatePercentage();\n\n return this.percent;\n }\n\n @HostBinding('class.progress-bar') addClass = true;\n\n get isBs3(): boolean {\n return isBs3();\n }\n\n striped: boolean;\n animate: boolean;\n percent = 0;\n progress: ProgressbarComponent;\n\n protected _value: number;\n protected _type: string;\n private _prevType: string;\n\n constructor(\n private el: ElementRef,\n @Host() progress: ProgressbarComponent,\n private renderer: Renderer2\n ) {\n this.progress = progress;\n }\n\n ngOnInit(): void {\n this.progress.addBar(this);\n }\n\n ngOnDestroy(): void {\n this.progress.removeBar(this);\n }\n\n recalculatePercentage(): void {\n this.percent = +(this.value / this.progress.max * 100).toFixed(2);\n\n const totalPercentage = this.progress.bars\n .reduce(function (total: number, bar: BarComponent): number {\n return total + bar.percent;\n }, 0);\n\n if (totalPercentage > 100) {\n this.percent -= totalPercentage - 100;\n }\n }\n\n private applyTypeClasses(): void {\n if (this._prevType) {\n const barTypeClass = `progress-bar-${this._prevType}`;\n const bgClass = `bg-${this._prevType}`;\n this.renderer.removeClass(this.el.nativeElement, barTypeClass);\n this.renderer.removeClass(this.el.nativeElement, bgClass);\n this._prevType = null;\n }\n\n if (this._type) {\n const barTypeClass = `progress-bar-${this._type}`;\n const bgClass = `bg-${this._type}`;\n this.renderer.addClass(this.el.nativeElement, barTypeClass);\n this.renderer.addClass(this.el.nativeElement, bgClass);\n this._prevType = this._type;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\nimport { ProgressbarComponent } from './progressbar.component';\nimport { ProgressbarConfig } from './progressbar.config';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [BarComponent, ProgressbarComponent],\n exports: [BarComponent, ProgressbarComponent]\n})\nexport class ProgressbarModule {\n static forRoot(): ModuleWithProviders {\n return { ngModule: ProgressbarModule, providers: [ProgressbarConfig] };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;IAEA;;;;QAGE,YAAO,GAAY,KAAK,CAAC;;;;QAEzB,QAAG,GAAG,GAAG,CAAC;KACX;;gBANA,UAAU;;IAMX,wBAAC;CAND,IAMC;;;;;;IAHC,oCAAyB;;;;;IAEzB,gCAAU;;;;;;;ACPZ;IA6EE,8BAAY,MAAyB;QA9BrC,cAAS,GAAG,KAAK,CAAC;QAuBa,aAAQ,GAAG,IAAI,CAAC;;QAG/C,SAAI,GAAmB,EAAE,CAAC;QAEhB,SAAI,GAAG,GAAG,CAAC;QAGnB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC7B;IA3DD,sBACI,yCAAO;;;;;;;QADX,UACY,KAAc;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO;;;;YAAC,UAAC,CAAe;gBAChC,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC;aACnB,EAAC,CAAC;SACJ;;;OAAA;IAED,sBACI,yCAAO;;;;;;;QADX,UACY,KAAc;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO;;;;YAAC,UAAC,CAAe;gBAChC,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC;aACnB,EAAC,CAAC;SACJ;;;OAAA;IAOD,sBAEI,uCAAK;;;;;;;;;;QAFT,UAEU,KAAqB;YAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;;;OAAA;IAMD,sBAAI,uCAAK;;;;QAAT;YACE,OAAO,KAAK,EAAE,CAAC;SAChB;;;OAAA;IAGD,sBAEI,qCAAG;;;;;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,UAAU;gBAIH,oBAAoB,uBAwExB,IAAI;gBA3EP,SAAS;;;uBA2BR,KAAK;wBAWL,KAAK;8BAaL,WAAW,SAAC,eAAe;2BAO3B,WAAW,SAAC,oBAAoB;;IA6DnC,mBAAC;CA/GD,IA+GC;;;IA/FC,2BAAY;;IAkCZ,gCAAmD;;IAMnD,+BAAiB;;IACjB,+BAAiB;;IACjB,+BAAY;;IACZ,gCAA+B;;;;;IAE/B,8BAAyB;;;;;IACzB,6BAAwB;;;;;IACxB,iCAA0B;;;;;IAGxB,0BAAsB;;;;;IAEtB,gCAA2B;;;;;;;ACpF/B;IAOA;KASC;;;;IAHQ,yBAAO;;;IAAd;QACE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC;KACxE;;gBARF,QAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;oBAClD,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;iBAC9C;;IAKD,wBAAC;CATD;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"ngx-bootstrap-progressbar.js","sources":["ng://ngx-bootstrap/progressbar/progressbar.config.ts","ng://ngx-bootstrap/progressbar/progressbar.component.ts","ng://ngx-bootstrap/progressbar/bar.component.ts","ng://ngx-bootstrap/progressbar/progressbar.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProgressbarConfig {\n /** if `true` changing value of progress bar will be animated */\n animate: Boolean = false;\n /** maximum total value of progress element */\n max = 100;\n}\n","import { Component, HostBinding, Input } from '@angular/core';\nimport { ProgressbarConfig } from './progressbar.config';\nimport { ProgressbarType } from './progressbar-type.interface';\nimport { isBs3 } from 'ngx-bootstrap/utils';\nimport { BarComponent } from './bar.component';\n\n@Component({\n selector: 'progressbar',\n templateUrl: './progressbar.component.html',\n styles: [\n `\n :host {\n width: 100%;\n display: flex;\n }\n `\n ]\n})\nexport class ProgressbarComponent {\n /** if `true` changing value of progress bar will be animated */\n @Input()\n set animate(value: boolean) {\n this._animate = value;\n this.bars.forEach((b: BarComponent) => {\n b.animate = value;\n });\n }\n /** If `true`, striped classes are applied */\n @Input()\n set striped(value: boolean) {\n this._striped = value;\n this.bars.forEach((b: BarComponent) => {\n b.striped = value;\n });\n }\n\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n @Input() type: ProgressbarType;\n /** current value of progress bar. Could be a number or array of objects\n * like {\"value\":15,\"type\":\"info\",\"label\":\"15 %\"}\n */\n @Input()\n /* tslint:disable-next-line:no-any */\n set value(value: number | any[]) {\n this.isStacked = Array.isArray(value);\n this._value = value;\n }\n isStacked = false;\n _striped: boolean;\n _animate: boolean;\n _max = 100;\n\n /* tslint:disable-next-line:no-any */\n _value: number | any[];\n get isBs3(): boolean {\n return isBs3();\n }\n\n /** maximum total value of progress element */\n @HostBinding('attr.max')\n @Input()\n get max(): number {\n return this._max;\n }\n\n set max(v: number) {\n this._max = v;\n this.bars.forEach((bar: BarComponent) => {\n bar.recalculatePercentage();\n });\n }\n\n @HostBinding('class.progress') addClass = true;\n\n /* tslint:disable-next-line:no-any */\n bars: BarComponent[] = [];\n constructor(config: ProgressbarConfig) {\n Object.assign(this, config);\n }\n addBar(bar: BarComponent): void {\n bar.animate = this._animate;\n bar.striped = this._striped;\n\n this.bars.push(bar);\n }\n\n removeBar(bar: BarComponent): void {\n this.bars.splice(this.bars.indexOf(bar), 1);\n }\n}\n","import {\n Component,\n Host,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n ElementRef,\n Renderer2, SimpleChanges\n} from '@angular/core';\n\nimport { ProgressbarComponent } from './progressbar.component';\nimport { isBs3 } from 'ngx-bootstrap/utils';\n\n// todo: number pipe\n// todo: use query from progress?\n@Component({\n selector: 'bar',\n templateUrl: './bar.component.html',\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n '[class.progress-bar-animated]': '!isBs3 && animate',\n '[class.progress-bar-striped]': 'striped',\n '[class.active]': 'isBs3 && animate',\n '[attr.aria-valuenow]': 'value',\n '[attr.aria-valuetext]': 'percent ? percent.toFixed(0) + \"%\" : \"\"',\n '[attr.aria-valuemax]': 'max',\n '[style.height.%]': '\"100\"'\n }\n})\nexport class BarComponent implements OnInit, OnDestroy {\n @Input() max: number;\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n @Input() type: string;\n\n /** current value of progress bar */\n @Input() value: number;\n\n @HostBinding('style.width.%')\n get setBarWidth() {\n this.recalculatePercentage();\n\n return this.percent;\n }\n\n @HostBinding('class.progress-bar') addClass = true;\n\n get isBs3(): boolean {\n return isBs3();\n }\n\n striped: boolean;\n animate: boolean;\n percent = 0;\n progress: ProgressbarComponent;\n\n private _prevType: string;\n\n constructor(\n private el: ElementRef,\n @Host() progress: ProgressbarComponent,\n private renderer: Renderer2\n ) {\n this.progress = progress;\n }\n\n ngOnInit(): void {\n this.progress.addBar(this);\n }\n\n ngOnDestroy(): void {\n this.progress.removeBar(this);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.value) {\n if (!changes.value.currentValue && changes.value.currentValue !== 0) {\n return;\n }\n this.value = changes.value.currentValue;\n this.recalculatePercentage();\n }\n\n if (changes.type) {\n this.type = changes.type.currentValue;\n this.applyTypeClasses();\n }\n }\n\n recalculatePercentage(): void {\n this.percent = +(this.value / this.progress.max * 100).toFixed(2);\n\n const totalPercentage = this.progress.bars\n .reduce(function (total: number, bar: BarComponent): number {\n return total + bar.percent;\n }, 0);\n\n if (totalPercentage > 100) {\n this.percent -= totalPercentage - 100;\n }\n }\n\n private applyTypeClasses(): void {\n if (this._prevType) {\n const barTypeClass = `progress-bar-${this._prevType}`;\n const bgClass = `bg-${this._prevType}`;\n this.renderer.removeClass(this.el.nativeElement, barTypeClass);\n this.renderer.removeClass(this.el.nativeElement, bgClass);\n this._prevType = null;\n }\n\n if (this.type) {\n const barTypeClass = `progress-bar-${this.type}`;\n const bgClass = `bg-${this.type}`;\n this.renderer.addClass(this.el.nativeElement, barTypeClass);\n this.renderer.addClass(this.el.nativeElement, bgClass);\n this._prevType = this.type;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\nimport { ProgressbarComponent } from './progressbar.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [BarComponent, ProgressbarComponent],\n exports: [BarComponent, ProgressbarComponent]\n})\nexport class ProgressbarModule {\n static forRoot(): ModuleWithProviders<ProgressbarModule> {\n return { ngModule: ProgressbarModule, providers: [] };\n }\n}\n"],"names":[],"mappings":";;;;;;;;;IAEA;;;;QAKE,YAAO,GAAY,KAAK,CAAC;;;;QAEzB,QAAG,GAAG,GAAG,CAAC;KACX;;gBARA,UAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;4BAJD;CAEA,IAQC;;;;;;IAHC,oCAAyB;;;;;IAEzB,gCAAU;;;;;;;ACTZ;IA4EE,8BAAY,MAAyB;QA7BrC,cAAS,GAAG,KAAK,CAAC;QAGlB,SAAI,GAAG,GAAG,CAAC;QAsBoB,aAAQ,GAAG,IAAI,CAAC;;QAG/C,SAAI,GAAmB,EAAE,CAAC;QAExB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC7B;IA1DD,sBACI,yCAAO;;;;;;;QADX,UACY,KAAc;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,OAAO;;;;YAAC,UAAC,CAAe;gBAChC,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC;aACnB,EAAC,CAAC;SACJ;;;OAAA;IAED,sBACI,yCAAO;;;;;;;QADX,UACY,KAAc;YACxB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,O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AAC,IAAI,CAAC;SAC5B;KACF;;gBAvGF,SAAS,SAAC;oBACT,QAAQ,EAAE,KAAK;oBACf,uCAAmC;oBACnC,IAAI,EAAE;wBACJ,IAAI,EAAE,aAAa;wBACnB,eAAe,EAAE,GAAG;wBACpB,+BAA+B,EAAE,mBAAmB;wBACpD,8BAA8B,EAAE,SAAS;wBACzC,gBAAgB,EAAE,kBAAkB;wBACpC,sBAAsB,EAAE,OAAO;wBAC/B,uBAAuB,EAAE,yCAAyC;wBAClE,sBAAsB,EAAE,KAAK;wBAC7B,kBAAkB,EAAE,OAAO;qBAC5B;iBACF;;;;gBAvBC,UAAU;gBAIH,oBAAoB,uBAkDxB,IAAI;gBArDP,SAAS;;;sBAwBR,KAAK;uBAEL,KAAK;wBAGL,KAAK;8BAEL,WAAW,SAAC,eAAe;2BAO3B,WAAW,SAAC,oBAAoB;;IA0EnC,mBAAC;CAxGD,IAwGC;;;IAxFC,2BAAqB;;;;;IAErB,4BAAsB;;;;;IAGtB,6BAAuB;;IASvB,gCAAmD;;IAMnD,+BAAiB;;IACjB,+BAAiB;;IACjB,+BAAY;;IACZ,gCAA+B;;;;;IAE/B,iCAA0B;;;;;IAGxB,0BAAsB;;;;;IAEtB,gCAA2B;;;;;;;AC9D/B;IAMA;KASC;;;;IAHQ,yBAAO;;;IAAd;QACE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;KACvD;;gBARF,QAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;oBAClD,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;iBAC9C;;IAKD,wBAAC;CATD;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"BarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":16,"character":1},"arguments":[{"selector":"bar","host":{"role":"progressbar","aria-valuemin":"0","[class.progress-bar-animated]":"!isBs3 && animate","[class.progress-bar-striped]":"striped","[class.active]":"isBs3 && animate","[attr.aria-valuenow]":"value","[attr.aria-valuetext]":"percent ? percent.toFixed(0) + \"%\" : \"\"","[attr.aria-valuemax]":"max","[style.height.%]":"\"100\"","$quoted$":["aria-valuemin","[class.progress-bar-animated]","[class.progress-bar-striped]","[class.active]","[attr.aria-valuenow]","[attr.aria-valuetext]","[attr.aria-valuemax]","[style.height.%]"]},"template":"<ng-content></ng-content>\n"}]}],"members":{"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"BarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":16,"character":1},"arguments":[{"selector":"bar","host":{"role":"progressbar","aria-valuemin":"0","[class.progress-bar-animated]":"!isBs3 && animate","[class.progress-bar-striped]":"striped","[class.active]":"isBs3 && animate","[attr.aria-valuenow]":"value","[attr.aria-valuetext]":"percent ? percent.toFixed(0) + \"%\" : \"\"","[attr.aria-valuemax]":"max","[style.height.%]":"\"100\"","$quoted$":["aria-valuemin","[class.progress-bar-animated]","[class.progress-bar-striped]","[class.active]","[attr.aria-valuenow]","[attr.aria-valuetext]","[attr.aria-valuemax]","[style.height.%]"]},"template":"<ng-content></ng-content>\n"}]}],"members":{"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"setBarWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":39,"character":3},"arguments":["style.width.%"]}]}],"addClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":46,"character":3},"arguments":["class.progress-bar"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host","line":61,"character":5}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":60,"character":16},{"__symbolic":"reference","name":"ProgressbarComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":62,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"recalculatePercentage":[{"__symbolic":"method"}],"applyTypeClasses":[{"__symbolic":"method"}]}},"ProgressbarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"progressbar","styles":["\n :host {\n width: 100%;\n display: flex;\n }\n "],"template":"<bar [type]=\"type\" [value]=\"_value\" [max]=\"_max\" *ngIf=\"!isStacked\">\n <ng-content></ng-content>\n</bar>\n<ng-template [ngIf]=\"isStacked\">\n <bar *ngFor=\"let item of _value\" [type]=\"item.type\" [value]=\"item.value\" [max]=\"item.max\">{{ item.label }}</bar>\n</ng-template>\n"}]}],"members":{"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"striped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":59,"character":3},"arguments":["attr.max"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"addClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":72,"character":3},"arguments":["class.progress"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ProgressbarConfig"}]}],"addBar":[{"__symbolic":"method"}],"removeBar":[{"__symbolic":"method"}]}},"ProgressbarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":12}],"declarations":[{"__symbolic":"reference","name":"BarComponent"},{"__symbolic":"reference","name":"ProgressbarComponent"}],"exports":[{"__symbolic":"reference","name":"BarComponent"},{"__symbolic":"reference","name":"ProgressbarComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"ProgressbarModule"},"providers":[]}}}},"ProgressbarConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{},"statics":{"ɵprov":{}}},"ProgressbarType":{"__symbolic":"interface"}},"origins":{"BarComponent":"./bar.component","ProgressbarComponent":"./progressbar.component","ProgressbarModule":"./progressbar.module","ProgressbarConfig":"./progressbar.config","ProgressbarType":"./progressbar-type.interface"},"importAs":"ngx-bootstrap/progressbar"}
|
package/progressbar/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ngx-bootstrap/progressbar",
|
3
|
-
"version": "
|
3
|
+
"version": "6.2.0",
|
4
4
|
"description": "Native Angular Bootstrap Components",
|
5
5
|
"private": true,
|
6
6
|
"main": "bundles/ngx-bootstrap-progressbar.umd.js",
|
@@ -14,6 +14,6 @@
|
|
14
14
|
"metadata": "ngx-bootstrap-progressbar.metadata.json",
|
15
15
|
"sideEffects": false,
|
16
16
|
"peerDependencies": {
|
17
|
-
"tslib": "^1.
|
17
|
+
"tslib": "^1.10.0"
|
18
18
|
}
|
19
19
|
}
|
@@ -3,25 +3,26 @@ import { ProgressbarType } from './progressbar-type.interface';
|
|
3
3
|
import { BarComponent } from './bar.component';
|
4
4
|
export declare class ProgressbarComponent {
|
5
5
|
/** if `true` changing value of progress bar will be animated */
|
6
|
-
animate: boolean;
|
6
|
+
set animate(value: boolean);
|
7
7
|
/** If `true`, striped classes are applied */
|
8
|
-
striped: boolean;
|
8
|
+
set striped(value: boolean);
|
9
9
|
/** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */
|
10
10
|
type: ProgressbarType;
|
11
11
|
/** current value of progress bar. Could be a number or array of objects
|
12
12
|
* like {"value":15,"type":"info","label":"15 %"}
|
13
13
|
*/
|
14
|
-
value: number | any[];
|
14
|
+
set value(value: number | any[]);
|
15
15
|
isStacked: boolean;
|
16
16
|
_striped: boolean;
|
17
17
|
_animate: boolean;
|
18
|
+
_max: number;
|
18
19
|
_value: number | any[];
|
19
|
-
|
20
|
+
get isBs3(): boolean;
|
20
21
|
/** maximum total value of progress element */
|
21
|
-
max: number;
|
22
|
+
get max(): number;
|
23
|
+
set max(v: number);
|
22
24
|
addClass: boolean;
|
23
25
|
bars: BarComponent[];
|
24
|
-
protected _max: number;
|
25
26
|
constructor(config: ProgressbarConfig);
|
26
27
|
addBar(bar: BarComponent): void;
|
27
28
|
removeBar(bar: BarComponent): void;
|
@@ -19,8 +19,11 @@
|
|
19
19
|
this.ariaLabel = 'rating';
|
20
20
|
}
|
21
21
|
RatingConfig.decorators = [
|
22
|
-
{ type: core.Injectable
|
22
|
+
{ type: core.Injectable, args: [{
|
23
|
+
providedIn: 'root'
|
24
|
+
},] }
|
23
25
|
];
|
26
|
+
/** @nocollapse */ RatingConfig.ɵprov = core["ɵɵdefineInjectable"]({ factory: function RatingConfig_Factory() { return new RatingConfig(); }, token: RatingConfig, providedIn: "root" });
|
24
27
|
return RatingConfig;
|
25
28
|
}());
|
26
29
|
if (false) {
|
@@ -302,7 +305,7 @@
|
|
302
305
|
function () {
|
303
306
|
return {
|
304
307
|
ngModule: RatingModule,
|
305
|
-
providers: [
|
308
|
+
providers: []
|
306
309
|
};
|
307
310
|
};
|
308
311
|
RatingModule.decorators = [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-bootstrap-rating.umd.js","sources":["ng://ngx-bootstrap/rating/rating.config.ts","ng://ngx-bootstrap/rating/rating.component.ts","ng://ngx-bootstrap/rating/rating.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n/** Default values provider for rating */\n@Injectable()\nexport class RatingConfig {\n /** aria label for rating */\n ariaLabel = 'rating';\n}\n","import {\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n forwardRef, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { AccessorContent, RatingResults } from './models';\nimport { RatingConfig } from './rating.config';\n\nexport const RATING_CONTROL_VALUE_ACCESSOR: AccessorContent = {\n provide: NG_VALUE_ACCESSOR,\n /* tslint:disable-next-line: no-use-before-declare */\n useExisting: forwardRef(() => RatingComponent),\n multi: true\n};\n\n@Component({\n selector: 'rating',\n templateUrl: './rating.component.html',\n providers: [RATING_CONTROL_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RatingComponent implements ControlValueAccessor, OnInit {\n /** number of icons */\n @Input() max = 5;\n /** if true will not react on any user events */\n @Input() readonly: boolean;\n /** array of icons titles, default: ([\"one\", \"two\", \"three\", \"four\", \"five\"]) */\n @Input() titles: string[];\n /** custom template for icons */\n // tslint:disable-next-line:no-any\n @Input() customTemplate: TemplateRef<any>;\n /** fired when icon selected, $event:number equals to selected rating */\n @Output() onHover: EventEmitter<number> = new EventEmitter();\n /** fired when icon selected, $event:number equals to previous rating value */\n @Output() onLeave: EventEmitter<number> = new EventEmitter();\n\n // tslint:disable-next-line:no-any\n onChange: any = Function.prototype;\n // tslint:disable-next-line:no-any\n onTouched: any = Function.prototype;\n /** aria label for rating */\n ariaLabel: string;\n range: RatingResults[];\n value: number;\n protected preValue: number;\n\n constructor(private changeDetection: ChangeDetectorRef,\n config: RatingConfig) {\n Object.assign(this, config);\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n /* tslint:disable-next-line: deprecation */\n if ([37, 38, 39, 40].indexOf(event.which) === -1) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n /* tslint:disable-next-line: deprecation */\n const sign = event.which === 38 || event.which === 39 ? 1 : -1;\n this.rate(this.value + sign);\n }\n\n ngOnInit(): void {\n this.max = typeof this.max !== 'undefined' ? this.max : 5;\n this.titles =\n typeof this.titles !== 'undefined' && this.titles.length > 0\n ? this.titles\n : [];\n this.range = this.buildTemplateObjects(this.max);\n }\n\n // model -> view\n writeValue(value: number): void {\n if (value % 1 !== value) {\n this.value = Math.round(value);\n this.preValue = value;\n this.changeDetection.markForCheck();\n\n return;\n }\n\n this.preValue = value;\n this.value = value;\n this.changeDetection.markForCheck();\n }\n\n enter(value: number): void {\n if (!this.readonly) {\n this.value = value;\n this.changeDetection.markForCheck();\n this.onHover.emit(value);\n }\n }\n\n reset(): void {\n this.value = Math.round(this.preValue);\n this.changeDetection.markForCheck();\n this.onLeave.emit(this.value);\n }\n\n registerOnChange(fn: (_: number) => {}): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => {}): void {\n this.onTouched = fn;\n }\n\n rate(value: number): void {\n if (!this.readonly && value >= 0 && value <= this.range.length) {\n this.writeValue(value);\n this.onChange(value);\n }\n }\n\n protected buildTemplateObjects(max: number): RatingResults[] {\n const result: RatingResults[] = [];\n for (let i = 0; i < max; i++) {\n result.push({\n index: i,\n title: this.titles[i] || i + 1\n });\n }\n\n return result;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { RatingComponent } from './rating.component';\
|
1
|
+
{"version":3,"file":"ngx-bootstrap-rating.umd.js","sources":["ng://ngx-bootstrap/rating/rating.config.ts","ng://ngx-bootstrap/rating/rating.component.ts","ng://ngx-bootstrap/rating/rating.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n/** Default values provider for rating */\n@Injectable({\n providedIn: 'root'\n})\nexport class RatingConfig {\n /** aria label for rating */\n ariaLabel = 'rating';\n}\n","import {\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n forwardRef, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { AccessorContent, RatingResults } from './models';\nimport { RatingConfig } from './rating.config';\n\nexport const RATING_CONTROL_VALUE_ACCESSOR: AccessorContent = {\n provide: NG_VALUE_ACCESSOR,\n /* tslint:disable-next-line: no-use-before-declare */\n useExisting: forwardRef(() => RatingComponent),\n multi: true\n};\n\n@Component({\n selector: 'rating',\n templateUrl: './rating.component.html',\n providers: [RATING_CONTROL_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RatingComponent implements ControlValueAccessor, OnInit {\n /** number of icons */\n @Input() max = 5;\n /** if true will not react on any user events */\n @Input() readonly: boolean;\n /** array of icons titles, default: ([\"one\", \"two\", \"three\", \"four\", \"five\"]) */\n @Input() titles: string[];\n /** custom template for icons */\n // tslint:disable-next-line:no-any\n @Input() customTemplate: TemplateRef<any>;\n /** fired when icon selected, $event:number equals to selected rating */\n @Output() onHover: EventEmitter<number> = new EventEmitter();\n /** fired when icon selected, $event:number equals to previous rating value */\n @Output() onLeave: EventEmitter<number> = new EventEmitter();\n\n // tslint:disable-next-line:no-any\n onChange: any = Function.prototype;\n // tslint:disable-next-line:no-any\n onTouched: any = Function.prototype;\n /** aria label for rating */\n ariaLabel: string;\n range: RatingResults[];\n value: number;\n protected preValue: number;\n\n constructor(private changeDetection: ChangeDetectorRef,\n config: RatingConfig) {\n Object.assign(this, config);\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n /* tslint:disable-next-line: deprecation */\n if ([37, 38, 39, 40].indexOf(event.which) === -1) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n /* tslint:disable-next-line: deprecation */\n const sign = event.which === 38 || event.which === 39 ? 1 : -1;\n this.rate(this.value + sign);\n }\n\n ngOnInit(): void {\n this.max = typeof this.max !== 'undefined' ? this.max : 5;\n this.titles =\n typeof this.titles !== 'undefined' && this.titles.length > 0\n ? this.titles\n : [];\n this.range = this.buildTemplateObjects(this.max);\n }\n\n // model -> view\n writeValue(value: number): void {\n if (value % 1 !== value) {\n this.value = Math.round(value);\n this.preValue = value;\n this.changeDetection.markForCheck();\n\n return;\n }\n\n this.preValue = value;\n this.value = value;\n this.changeDetection.markForCheck();\n }\n\n enter(value: number): void {\n if (!this.readonly) {\n this.value = value;\n this.changeDetection.markForCheck();\n this.onHover.emit(value);\n }\n }\n\n reset(): void {\n this.value = Math.round(this.preValue);\n this.changeDetection.markForCheck();\n this.onLeave.emit(this.value);\n }\n\n registerOnChange(fn: (_: number) => {}): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => {}): void {\n this.onTouched = fn;\n }\n\n rate(value: number): void {\n if (!this.readonly && value >= 0 && value <= this.range.length) {\n this.writeValue(value);\n this.onChange(value);\n }\n }\n\n protected buildTemplateObjects(max: number): RatingResults[] {\n const result: RatingResults[] = [];\n for (let i = 0; i < max; i++) {\n result.push({\n index: i,\n title: this.titles[i] || i + 1\n });\n }\n\n return result;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { RatingComponent } from './rating.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [RatingComponent],\n exports: [RatingComponent]\n})\nexport class RatingModule {\n static forRoot(): ModuleWithProviders<RatingModule> {\n return {\n ngModule: RatingModule,\n providers: []\n };\n }\n}\n"],"names":["Injectable","NG_VALUE_ACCESSOR","forwardRef","EventEmitter","Component","ChangeDetectionStrategy","ChangeDetectorRef","Input","Output","HostListener","NgModule","CommonModule"],"mappings":";;;;;;;;;;;;;;QAGA;;;;YAKE,cAAS,GAAG,QAAQ,CAAC;SACtB;;oBANAA,eAAU,SAAC;wBACV,UAAU,EAAE,MAAM;qBACnB;;;2BALD;KAGA,IAMC;;;;;;QADC,iCAAqB;;;;;;;ICRvB;QAaa,6BAA6B,GAAoB;QAC5D,OAAO,EAAEC,uBAAiB;;QAE1B,WAAW,EAAEC,eAAU;;;QAAC,cAAM,OAAA,eAAe,GAAA,EAAC;QAC9C,KAAK,EAAE,IAAI;;;QAkCX,yBAAoB,eAAkC,EAC1C,MAAoB;YADZ,oBAAe,GAAf,eAAe,CAAmB;;;;YAvB7C,QAAG,GAAG,CAAC,CAAC;;;;YASP,YAAO,GAAyB,IAAIC,iBAAY,EAAE,CAAC;;;;YAEnD,YAAO,GAAyB,IAAIA,iBAAY,EAAE,CAAC;;YAG7D,aAAQ,GAAQ,QAAQ,CAAC,SAAS,CAAC;;YAEnC,cAAS,GAAQ,QAAQ,CAAC,SAAS,CAAC;YASlC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SAC7B;;;;;QAGD,mCAAS;;;;QADT,UACU,KAAoB;;YAE5B,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,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B,u9BAAsC;wBACtC,SAAS,EAAE,CAAC,6BAA6B,CAAC;wBAC1C,eAAe,EAAEC,4BAAuB,CAAC,MAAM;qBAChD;;;;oBAlBmDC,sBAAiB;oBAI5D,YAAY;;;0BAiBlBC,UAAK;+BAELA,UAAK;6BAELA,UAAK;qCAGLA,UAAK;8BAELC,WAAM;8BAENA,WAAM;gCAiBNC,iBAAY,SAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;QA8ErC,sBAAC;KAlHD,IAkHC;;;;;;QA1GC,8BAAiB;;;;;QAEjB,mCAA2B;;;;;QAE3B,iCAA0B;;;;;QAG1B,yCAA0C;;;;;QAE1C,kCAA6D;;;;;QAE7D,kCAA6D;;QAG7D,mCAAmC;;QAEnC,oCAAoC;;;;;QAEpC,oCAAkB;;QAClB,gCAAuB;;QACvB,gCAAc;;;;;QACd,mCAA2B;;;;;QAEf,0CAA0C;;;;;;;;QC9CxD;SAYC;;;;QANQ,oBAAO;;;QAAd;YACE,OAAO;gBACL,QAAQ,EAAE,YAAY;gBACtB,SAAS,EAAE,EAAE;aACd,CAAC;SACH;;oBAXFC,aAAQ,SAAC;wBACR,OAAO,EAAE,CAACC,mBAAY,CAAC;wBACvB,YAAY,EAAE,CAAC,eAAe,CAAC;wBAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;qBAC3B;;QAQD,mBAAC;KAZD;;;;;;;;;;;;;;;"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-bootstrap/rating",["exports","@angular/core","@angular/forms","@angular/common"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||{},e["ngx-bootstrap"].rating={}),e.ng.core,e.ng.forms,e.ng.common)}(this,(function(e,t,n,o){"use strict";var r=function(){function e(){this.ariaLabel="rating"}return e.decorators=[{type:t.Injectable}],e}();var a={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0},i=function(){function e(e,n){this.changeDetection=e,this.max=5,this.onHover=new t.EventEmitter,this.onLeave=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,Object.assign(this,n)}return e.prototype.onKeydown=function(e){if(-1!==[37,38,39,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=38===e.which||39===e.which?1:-1;this.rate(this.value+t)}},e.prototype.ngOnInit=function(){this.max=void 0!==this.max?this.max:5,this.titles=void 0!==this.titles&&this.titles.length>0?this.titles:[],this.range=this.buildTemplateObjects(this.max)},e.prototype.writeValue=function(e){if(e%1!==e)return this.value=Math.round(e),this.preValue=e,void this.changeDetection.markForCheck();this.preValue=e,this.value=e,this.changeDetection.markForCheck()},e.prototype.enter=function(e){this.readonly||(this.value=e,this.changeDetection.markForCheck(),this.onHover.emit(e))},e.prototype.reset=function(){this.value=Math.round(this.preValue),this.changeDetection.markForCheck(),this.onLeave.emit(this.value)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.rate=function(e){!this.readonly&&e>=0&&e<=this.range.length&&(this.writeValue(e),this.onChange(e))},e.prototype.buildTemplateObjects=function(e){for(var t=[],n=0;n<e;n++)t.push({index:n,title:this.titles[n]||n+1});return t},e.decorators=[{type:t.Component,args:[{selector:"rating",template:'<span (mouseleave)="reset()" (keydown)="onKeydown($event)" tabindex="0"\n role="slider" aria-valuemin="0"\n [attr.aria-label]="ariaLabel"\n [attr.aria-valuemax]="range.length"\n [attr.aria-valuenow]="value">\n <ng-template #star let-value="value" let-index="index">{{ index < value ? \'★\' : \'☆\' }}</ng-template>\n <ng-template ngFor let-r [ngForOf]="range" let-index="index">\n <span class="sr-only">({{ index < value ? \'*\' : \' \' }})</span>\n <span class="bs-rating-star"\n (mouseenter)="enter(index + 1)"\n (click)="rate(index + 1)"\n [title]="r.title"\n [style.cursor]="readonly ? \'default\' : \'pointer\'"\n [class.active]="index < value">\n <ng-template [ngTemplateOutlet]="customTemplate || star"\n [ngTemplateOutletContext]="{index: index, value: value}">\n </ng-template>\n </span>\n </ng-template>\n</span>\n',providers:[a],changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:r}]},e.propDecorators={max:[{type:t.Input}],readonly:[{type:t.Input}],titles:[{type:t.Input}],customTemplate:[{type:t.Input}],onHover:[{type:t.Output}],onLeave:[{type:t.Output}],onKeydown:[{type:t.HostListener,args:["keydown",["$event"]]}]},e}();var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-bootstrap/rating",["exports","@angular/core","@angular/forms","@angular/common"],t):t(((e=e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||{},e["ngx-bootstrap"].rating={}),e.ng.core,e.ng.forms,e.ng.common)}(this,(function(e,t,n,o){"use strict";var r=function(){function e(){this.ariaLabel="rating"}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ɵprov=t["ɵɵdefineInjectable"]({factory:function(){return new e},token:e,providedIn:"root"}),e}();var a={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0},i=function(){function e(e,n){this.changeDetection=e,this.max=5,this.onHover=new t.EventEmitter,this.onLeave=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,Object.assign(this,n)}return e.prototype.onKeydown=function(e){if(-1!==[37,38,39,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=38===e.which||39===e.which?1:-1;this.rate(this.value+t)}},e.prototype.ngOnInit=function(){this.max=void 0!==this.max?this.max:5,this.titles=void 0!==this.titles&&this.titles.length>0?this.titles:[],this.range=this.buildTemplateObjects(this.max)},e.prototype.writeValue=function(e){if(e%1!==e)return this.value=Math.round(e),this.preValue=e,void this.changeDetection.markForCheck();this.preValue=e,this.value=e,this.changeDetection.markForCheck()},e.prototype.enter=function(e){this.readonly||(this.value=e,this.changeDetection.markForCheck(),this.onHover.emit(e))},e.prototype.reset=function(){this.value=Math.round(this.preValue),this.changeDetection.markForCheck(),this.onLeave.emit(this.value)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.rate=function(e){!this.readonly&&e>=0&&e<=this.range.length&&(this.writeValue(e),this.onChange(e))},e.prototype.buildTemplateObjects=function(e){for(var t=[],n=0;n<e;n++)t.push({index:n,title:this.titles[n]||n+1});return t},e.decorators=[{type:t.Component,args:[{selector:"rating",template:'<span (mouseleave)="reset()" (keydown)="onKeydown($event)" tabindex="0"\n role="slider" aria-valuemin="0"\n [attr.aria-label]="ariaLabel"\n [attr.aria-valuemax]="range.length"\n [attr.aria-valuenow]="value">\n <ng-template #star let-value="value" let-index="index">{{ index < value ? \'★\' : \'☆\' }}</ng-template>\n <ng-template ngFor let-r [ngForOf]="range" let-index="index">\n <span class="sr-only">({{ index < value ? \'*\' : \' \' }})</span>\n <span class="bs-rating-star"\n (mouseenter)="enter(index + 1)"\n (click)="rate(index + 1)"\n [title]="r.title"\n [style.cursor]="readonly ? \'default\' : \'pointer\'"\n [class.active]="index < value">\n <ng-template [ngTemplateOutlet]="customTemplate || star"\n [ngTemplateOutletContext]="{index: index, value: value}">\n </ng-template>\n </span>\n </ng-template>\n</span>\n',providers:[a],changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:r}]},e.propDecorators={max:[{type:t.Input}],readonly:[{type:t.Input}],titles:[{type:t.Input}],customTemplate:[{type:t.Input}],onHover:[{type:t.Output}],onLeave:[{type:t.Output}],onKeydown:[{type:t.HostListener,args:["keydown",["$event"]]}]},e}();var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[i],exports:[i]}]}],e}();e.RatingComponent=i,e.RatingConfig=r,e.RatingModule=s,e.ɵa=a,Object.defineProperty(e,"__esModule",{value:!0})}));
|
2
2
|
//# sourceMappingURL=ngx-bootstrap-rating.umd.min.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["ng://ngx-bootstrap/rating/rating.config.ts","ng://ngx-bootstrap/rating/rating.component.ts","ng://ngx-bootstrap/rating/rating.module.ts"],"names":["RatingConfig","this","ariaLabel","Injectable","RATING_CONTROL_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","RatingComponent","multi","changeDetection","config","max","onHover","EventEmitter","onLeave","onChange","Function","prototype","onTouched","Object","assign","onKeydown","event","indexOf","which","preventDefault","stopPropagation","sign","rate","value","ngOnInit","titles","length","range","buildTemplateObjects","writeValue","Math","round","preValue","markForCheck","enter","readonly","emit","reset","registerOnChange","fn","registerOnTouched","result","i","push","index","title","Component","
|
1
|
+
{"version":3,"sources":["ng://ngx-bootstrap/rating/rating.config.ts","ng://ngx-bootstrap/rating/rating.component.ts","ng://ngx-bootstrap/rating/rating.module.ts"],"names":["RatingConfig","this","ariaLabel","Injectable","args","providedIn","RATING_CONTROL_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","RatingComponent","multi","changeDetection","config","max","onHover","EventEmitter","onLeave","onChange","Function","prototype","onTouched","Object","assign","onKeydown","event","indexOf","which","preventDefault","stopPropagation","sign","rate","value","ngOnInit","titles","length","range","buildTemplateObjects","writeValue","Math","round","preValue","markForCheck","enter","readonly","emit","reset","registerOnChange","fn","registerOnTouched","result","i","push","index","title","Component","selector","template","providers","ChangeDetectionStrategy","OnPush","ChangeDetectorRef","Input","Output","HostListener","RatingModule","forRoot","ngModule","NgModule","imports","CommonModule","declarations","exports"],"mappings":"idAGA,SAAAA,IAKEC,KAAAC,UAAY,oCALbC,EAAAA,WAAUC,KAAA,CAAC,CACV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AKgC,MAAQO,KAAKC,MAAMxC,KAAKyC,UAC7BzC,KAAKY,gBAAgB8B,eACrB1C,KAAKiB,QAAQ4B,KAAK7C,KAAKgC,QAGzBtB,EAAAU,UAAA2B,iBAAA,SAAiBC,GACfhD,KAAKkB,SAAW8B,GAGlBtC,EAAAU,UAAA6B,kBAAA,SAAkBD,GAChBhD,KAAKqB,UAAY2B,GAGnBtC,EAAAU,UAAAW,KAAA,SAAKC,IACEhC,KAAK4C,UAAYZ,GAAS,GAAKA,GAAShC,KAAKoC,MAAMD,SACtDnC,KAAKsC,WAAWN,GAChBhC,KAAKkB,SAASc,KAIRtB,EAAAU,UAAAiB,qBAAV,SAA+BvB,GAE7B,QADMoC,EAA0B,GACvBC,EAAI,EAAGA,EAAIrC,EAAKqC,IACvBD,EAAOE,KAAK,CACRC,MAAOF,EACPG,MAAOtD,KAAKkC,OAAOiB,IAAMA,EAAI,IAInC,OAAOD,uBAhHVK,EAAAA,UAASpD,KAAA,CAAC,CACTqD,SAAU,SACVC,SAAA,g7BACAC,UAAW,CAACrD,GACZO,gBAAiB+C,EAAAA,wBAAwBC,oDAjBSC,EAAAA,yBAI3C9D,kCAiBN+D,EAAAA,wBAEAA,EAAAA,sBAEAA,EAAAA,8BAGAA,EAAAA,uBAEAC,EAAAA,wBAEAA,EAAAA,0BAiBAC,EAAAA,aAAY7D,KAAA,CAAC,UAAW,CAAC,cA8E5BO,sBCjIA,SAAAuD,KAYA,OANSA,EAAAC,QAAP,WACE,MAAO,CACLC,SAAUF,EACVP,UAAW,yBAThBU,EAAAA,SAAQjE,KAAA,CAAC,CACRkE,QAAS,CAACC,EAAAA,cACVC,aAAc,CAAC7D,GACf8D,QAAS,CAAC9D,OASZuD","sourcesContent":["import { Injectable } from '@angular/core';\n\n/** Default values provider for rating */\n@Injectable({\n providedIn: 'root'\n})\nexport class RatingConfig {\n /** aria label for rating */\n ariaLabel = 'rating';\n}\n","import {\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n forwardRef, TemplateRef, ChangeDetectionStrategy, ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { AccessorContent, RatingResults } from './models';\nimport { RatingConfig } from './rating.config';\n\nexport const RATING_CONTROL_VALUE_ACCESSOR: AccessorContent = {\n provide: NG_VALUE_ACCESSOR,\n /* tslint:disable-next-line: no-use-before-declare */\n useExisting: forwardRef(() => RatingComponent),\n multi: true\n};\n\n@Component({\n selector: 'rating',\n templateUrl: './rating.component.html',\n providers: [RATING_CONTROL_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class RatingComponent implements ControlValueAccessor, OnInit {\n /** number of icons */\n @Input() max = 5;\n /** if true will not react on any user events */\n @Input() readonly: boolean;\n /** array of icons titles, default: ([\"one\", \"two\", \"three\", \"four\", \"five\"]) */\n @Input() titles: string[];\n /** custom template for icons */\n // tslint:disable-next-line:no-any\n @Input() customTemplate: TemplateRef<any>;\n /** fired when icon selected, $event:number equals to selected rating */\n @Output() onHover: EventEmitter<number> = new EventEmitter();\n /** fired when icon selected, $event:number equals to previous rating value */\n @Output() onLeave: EventEmitter<number> = new EventEmitter();\n\n // tslint:disable-next-line:no-any\n onChange: any = Function.prototype;\n // tslint:disable-next-line:no-any\n onTouched: any = Function.prototype;\n /** aria label for rating */\n ariaLabel: string;\n range: RatingResults[];\n value: number;\n protected preValue: number;\n\n constructor(private changeDetection: ChangeDetectorRef,\n config: RatingConfig) {\n Object.assign(this, config);\n }\n\n @HostListener('keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n /* tslint:disable-next-line: deprecation */\n if ([37, 38, 39, 40].indexOf(event.which) === -1) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n /* tslint:disable-next-line: deprecation */\n const sign = event.which === 38 || event.which === 39 ? 1 : -1;\n this.rate(this.value + sign);\n }\n\n ngOnInit(): void {\n this.max = typeof this.max !== 'undefined' ? this.max : 5;\n this.titles =\n typeof this.titles !== 'undefined' && this.titles.length > 0\n ? this.titles\n : [];\n this.range = this.buildTemplateObjects(this.max);\n }\n\n // model -> view\n writeValue(value: number): void {\n if (value % 1 !== value) {\n this.value = Math.round(value);\n this.preValue = value;\n this.changeDetection.markForCheck();\n\n return;\n }\n\n this.preValue = value;\n this.value = value;\n this.changeDetection.markForCheck();\n }\n\n enter(value: number): void {\n if (!this.readonly) {\n this.value = value;\n this.changeDetection.markForCheck();\n this.onHover.emit(value);\n }\n }\n\n reset(): void {\n this.value = Math.round(this.preValue);\n this.changeDetection.markForCheck();\n this.onLeave.emit(this.value);\n }\n\n registerOnChange(fn: (_: number) => {}): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => {}): void {\n this.onTouched = fn;\n }\n\n rate(value: number): void {\n if (!this.readonly && value >= 0 && value <= this.range.length) {\n this.writeValue(value);\n this.onChange(value);\n }\n }\n\n protected buildTemplateObjects(max: number): RatingResults[] {\n const result: RatingResults[] = [];\n for (let i = 0; i < max; i++) {\n result.push({\n index: i,\n title: this.titles[i] || i + 1\n });\n }\n\n return result;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { RatingComponent } from './rating.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [RatingComponent],\n exports: [RatingComponent]\n})\nexport class RatingModule {\n static forRoot(): ModuleWithProviders<RatingModule> {\n return {\n ngModule: RatingModule,\n providers: []\n };\n }\n}\n"]}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
4
4
|
*/
|
5
5
|
import { Injectable } from '@angular/core';
|
6
|
+
import * as i0 from "@angular/core";
|
6
7
|
/**
|
7
8
|
* Default values provider for rating
|
8
9
|
*/
|
@@ -15,8 +16,11 @@ export class RatingConfig {
|
|
15
16
|
}
|
16
17
|
}
|
17
18
|
RatingConfig.decorators = [
|
18
|
-
{ type: Injectable
|
19
|
+
{ type: Injectable, args: [{
|
20
|
+
providedIn: 'root'
|
21
|
+
},] }
|
19
22
|
];
|
23
|
+
/** @nocollapse */ RatingConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function RatingConfig_Factory() { return new RatingConfig(); }, token: RatingConfig, providedIn: "root" });
|
20
24
|
if (false) {
|
21
25
|
/**
|
22
26
|
* aria label for rating
|
@@ -24,4 +28,4 @@ if (false) {
|
|
24
28
|
*/
|
25
29
|
RatingConfig.prototype.ariaLabel;
|
26
30
|
}
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1ib290c3RyYXAvcmF0aW5nLyIsInNvdXJjZXMiOlsicmF0aW5nLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7QUFNM0MsTUFBTSxPQUFPLFlBQVk7SUFIekI7Ozs7UUFLRSxjQUFTLEdBQUcsUUFBUSxDQUFDO0tBQ3RCOzs7WUFOQSxVQUFVLFNBQUM7Z0JBQ1YsVUFBVSxFQUFFLE1BQU07YUFDbkI7Ozs7Ozs7O0lBR0MsaUNBQXFCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG4vKiogRGVmYXVsdCB2YWx1ZXMgcHJvdmlkZXIgZm9yIHJhdGluZyAqL1xuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgUmF0aW5nQ29uZmlnIHtcbiAgLyoqIGFyaWEgbGFiZWwgZm9yIHJhdGluZyAqL1xuICBhcmlhTGFiZWwgPSAncmF0aW5nJztcbn1cbiJdfQ==
|
@@ -5,7 +5,6 @@
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import { NgModule } from '@angular/core';
|
7
7
|
import { RatingComponent } from './rating.component';
|
8
|
-
import { RatingConfig } from './rating.config';
|
9
8
|
export class RatingModule {
|
10
9
|
/**
|
11
10
|
* @return {?}
|
@@ -13,7 +12,7 @@ export class RatingModule {
|
|
13
12
|
static forRoot() {
|
14
13
|
return {
|
15
14
|
ngModule: RatingModule,
|
16
|
-
providers: [
|
15
|
+
providers: []
|
17
16
|
};
|
18
17
|
}
|
19
18
|
}
|
@@ -24,4 +23,4 @@ RatingModule.decorators = [
|
|
24
23
|
exports: [RatingComponent]
|
25
24
|
},] }
|
26
25
|
];
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1ib290c3RyYXAvcmF0aW5nLyIsInNvdXJjZXMiOlsicmF0aW5nLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBRTlELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQU9yRCxNQUFNLE9BQU8sWUFBWTs7OztJQUN2QixNQUFNLENBQUMsT0FBTztRQUNaLE9BQU87WUFDTCxRQUFRLEVBQUUsWUFBWTtZQUN0QixTQUFTLEVBQUUsRUFBRTtTQUNkLENBQUM7SUFDSixDQUFDOzs7WUFYRixRQUFRLFNBQUM7Z0JBQ1IsT0FBTyxFQUFFLENBQUMsWUFBWSxDQUFDO2dCQUN2QixZQUFZLEVBQUUsQ0FBQyxlQUFlLENBQUM7Z0JBQy9CLE9BQU8sRUFBRSxDQUFDLGVBQWUsQ0FBQzthQUMzQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQgeyBOZ01vZHVsZSwgTW9kdWxlV2l0aFByb3ZpZGVycyB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5pbXBvcnQgeyBSYXRpbmdDb21wb25lbnQgfSBmcm9tICcuL3JhdGluZy5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlXSxcbiAgZGVjbGFyYXRpb25zOiBbUmF0aW5nQ29tcG9uZW50XSxcbiAgZXhwb3J0czogW1JhdGluZ0NvbXBvbmVudF1cbn0pXG5leHBvcnQgY2xhc3MgUmF0aW5nTW9kdWxlIHtcbiAgc3RhdGljIGZvclJvb3QoKTogTW9kdWxlV2l0aFByb3ZpZGVyczxSYXRpbmdNb2R1bGU+IHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IFJhdGluZ01vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW11cbiAgICB9O1xuICB9XG59XG4iXX0=
|
@@ -3,6 +3,7 @@
|
|
3
3
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
4
4
|
*/
|
5
5
|
import { Injectable } from '@angular/core';
|
6
|
+
import * as i0 from "@angular/core";
|
6
7
|
/**
|
7
8
|
* Default values provider for rating
|
8
9
|
*/
|
@@ -14,8 +15,11 @@ var RatingConfig = /** @class */ (function () {
|
|
14
15
|
this.ariaLabel = 'rating';
|
15
16
|
}
|
16
17
|
RatingConfig.decorators = [
|
17
|
-
{ type: Injectable
|
18
|
+
{ type: Injectable, args: [{
|
19
|
+
providedIn: 'root'
|
20
|
+
},] }
|
18
21
|
];
|
22
|
+
/** @nocollapse */ RatingConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function RatingConfig_Factory() { return new RatingConfig(); }, token: RatingConfig, providedIn: "root" });
|
19
23
|
return RatingConfig;
|
20
24
|
}());
|
21
25
|
export { RatingConfig };
|
@@ -26,4 +30,4 @@ if (false) {
|
|
26
30
|
*/
|
27
31
|
RatingConfig.prototype.ariaLabel;
|
28
32
|
}
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1ib290c3RyYXAvcmF0aW5nLyIsInNvdXJjZXMiOlsicmF0aW5nLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7QUFHM0M7SUFBQTs7OztRQUtFLGNBQVMsR0FBRyxRQUFRLENBQUM7S0FDdEI7O2dCQU5BLFVBQVUsU0FBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkI7Ozt1QkFMRDtDQVNDLEFBTkQsSUFNQztTQUhZLFlBQVk7Ozs7OztJQUV2QixpQ0FBcUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbi8qKiBEZWZhdWx0IHZhbHVlcyBwcm92aWRlciBmb3IgcmF0aW5nICovXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBSYXRpbmdDb25maWcge1xuICAvKiogYXJpYSBsYWJlbCBmb3IgcmF0aW5nICovXG4gIGFyaWFMYWJlbCA9ICdyYXRpbmcnO1xufVxuIl19
|
@@ -5,7 +5,6 @@
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import { NgModule } from '@angular/core';
|
7
7
|
import { RatingComponent } from './rating.component';
|
8
|
-
import { RatingConfig } from './rating.config';
|
9
8
|
var RatingModule = /** @class */ (function () {
|
10
9
|
function RatingModule() {
|
11
10
|
}
|
@@ -18,7 +17,7 @@ var RatingModule = /** @class */ (function () {
|
|
18
17
|
function () {
|
19
18
|
return {
|
20
19
|
ngModule: RatingModule,
|
21
|
-
providers: [
|
20
|
+
providers: []
|
22
21
|
};
|
23
22
|
};
|
24
23
|
RatingModule.decorators = [
|
@@ -31,4 +30,4 @@ var RatingModule = /** @class */ (function () {
|
|
31
30
|
return RatingModule;
|
32
31
|
}());
|
33
32
|
export { RatingModule };
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1ib290c3RyYXAvcmF0aW5nLyIsInNvdXJjZXMiOlsicmF0aW5nLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBRTlELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVyRDtJQUFBO0lBWUEsQ0FBQzs7OztJQU5RLG9CQUFPOzs7SUFBZDtRQUNFLE9BQU87WUFDTCxRQUFRLEVBQUUsWUFBWTtZQUN0QixTQUFTLEVBQUUsRUFBRTtTQUNkLENBQUM7SUFDSixDQUFDOztnQkFYRixRQUFRLFNBQUM7b0JBQ1IsT0FBTyxFQUFFLENBQUMsWUFBWSxDQUFDO29CQUN2QixZQUFZLEVBQUUsQ0FBQy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