ngx-bootstrap 1.8.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +25 -10
- package/accordion/accordion-group.component.js +3 -2
- package/accordion/accordion-group.component.js.map +1 -1
- package/accordion/accordion-group.component.metadata.json +1 -1
- package/accordion/accordion.component.js +2 -1
- package/accordion/accordion.component.js.map +1 -1
- package/accordion/accordion.config.js +2 -1
- package/accordion/accordion.config.js.map +1 -1
- package/accordion/accordion.module.js +2 -1
- package/accordion/accordion.module.js.map +1 -1
- package/accordion/index.js.map +1 -1
- package/alert/alert.component.js +4 -3
- package/alert/alert.component.js.map +1 -1
- package/alert/alert.config.js +2 -1
- package/alert/alert.config.js.map +1 -1
- package/alert/alert.module.js +2 -1
- package/alert/alert.module.js.map +1 -1
- package/alert/index.js.map +1 -1
- package/bs-moment/LICENSE +26 -0
- package/bs-moment/format-functions.d.ts +13 -0
- package/bs-moment/format-functions.js +53 -0
- package/bs-moment/format-functions.js.map +1 -0
- package/bs-moment/format-functions.metadata.json +1 -0
- package/bs-moment/format.d.ts +6 -0
- package/bs-moment/format.js +43 -0
- package/bs-moment/format.js.map +1 -0
- package/bs-moment/format.metadata.json +1 -0
- package/bs-moment/i18n/ar.d.ts +2 -0
- package/bs-moment/i18n/ar.js +131 -0
- package/bs-moment/i18n/ar.js.map +1 -0
- package/bs-moment/i18n/ar.metadata.json +1 -0
- package/bs-moment/i18n/de.d.ts +2 -0
- package/bs-moment/i18n/de.js +67 -0
- package/bs-moment/i18n/de.js.map +1 -0
- package/bs-moment/i18n/de.metadata.json +1 -0
- package/bs-moment/i18n/en-gb.d.ts +2 -0
- package/bs-moment/i18n/en-gb.js +60 -0
- package/bs-moment/i18n/en-gb.js.map +1 -0
- package/bs-moment/i18n/en-gb.metadata.json +1 -0
- package/bs-moment/i18n/es-do.d.ts +2 -0
- package/bs-moment/i18n/es-do.js +61 -0
- package/bs-moment/i18n/es-do.js.map +1 -0
- package/bs-moment/i18n/es-do.metadata.json +1 -0
- package/bs-moment/i18n/es-us.d.ts +2 -0
- package/bs-moment/i18n/es-us.js +54 -0
- package/bs-moment/i18n/es-us.js.map +1 -0
- package/bs-moment/i18n/es-us.metadata.json +1 -0
- package/bs-moment/i18n/es.d.ts +2 -0
- package/bs-moment/i18n/es.js +62 -0
- package/bs-moment/i18n/es.js.map +1 -0
- package/bs-moment/i18n/es.metadata.json +1 -0
- package/bs-moment/i18n/fr.d.ts +2 -0
- package/bs-moment/i18n/fr.js +70 -0
- package/bs-moment/i18n/fr.js.map +1 -0
- package/bs-moment/i18n/fr.metadata.json +1 -0
- package/bs-moment/i18n/hi.d.ts +2 -0
- package/bs-moment/i18n/hi.js +119 -0
- package/bs-moment/i18n/hi.js.map +1 -0
- package/bs-moment/i18n/hi.metadata.json +1 -0
- package/bs-moment/i18n/it.d.ts +2 -0
- package/bs-moment/i18n/it.js +27 -0
- package/bs-moment/i18n/it.js.map +1 -0
- package/bs-moment/i18n/it.metadata.json +1 -0
- package/bs-moment/i18n/ja.d.ts +2 -0
- package/bs-moment/i18n/ja.js +65 -0
- package/bs-moment/i18n/ja.js.map +1 -0
- package/bs-moment/i18n/ja.metadata.json +1 -0
- package/bs-moment/i18n/ko.d.ts +2 -0
- package/bs-moment/i18n/ko.js +72 -0
- package/bs-moment/i18n/ko.js.map +1 -0
- package/bs-moment/i18n/ko.metadata.json +1 -0
- package/bs-moment/i18n/nl-be.d.ts +2 -0
- package/bs-moment/i18n/nl-be.js +73 -0
- package/bs-moment/i18n/nl-be.js.map +1 -0
- package/bs-moment/i18n/nl-be.metadata.json +1 -0
- package/bs-moment/i18n/nl.d.ts +2 -0
- package/bs-moment/i18n/nl.js +73 -0
- package/bs-moment/i18n/nl.js.map +1 -0
- package/bs-moment/i18n/nl.metadata.json +1 -0
- package/bs-moment/i18n/pl.d.ts +2 -0
- package/bs-moment/i18n/pl.js +77 -0
- package/bs-moment/i18n/pl.js.map +1 -0
- package/bs-moment/i18n/pl.metadata.json +1 -0
- package/bs-moment/i18n/pt-br.d.ts +2 -0
- package/bs-moment/i18n/pt-br.js +39 -0
- package/bs-moment/i18n/pt-br.js.map +1 -0
- package/bs-moment/i18n/pt-br.metadata.json +1 -0
- package/bs-moment/i18n/ru.d.ts +2 -0
- package/bs-moment/i18n/ru.js +120 -0
- package/bs-moment/i18n/ru.js.map +1 -0
- package/bs-moment/i18n/ru.metadata.json +1 -0
- package/bs-moment/i18n/zh-cn.d.ts +2 -0
- package/bs-moment/i18n/zh-cn.js +107 -0
- package/bs-moment/i18n/zh-cn.js.map +1 -0
- package/bs-moment/i18n/zh-cn.metadata.json +1 -0
- package/bs-moment/index.d.ts +1 -0
- package/bs-moment/index.js +2 -0
- package/bs-moment/index.js.map +1 -0
- package/bs-moment/index.metadata.json +1 -0
- package/bs-moment/locale/en.d.ts +0 -0
- package/bs-moment/locale/en.js +14 -0
- package/bs-moment/locale/en.js.map +1 -0
- package/bs-moment/locale/index.d.ts +1 -0
- package/bs-moment/locale/index.js +2 -0
- package/bs-moment/locale/index.js.map +1 -0
- package/bs-moment/locale/locale.class.d.ts +60 -0
- package/bs-moment/locale/locale.class.js +117 -0
- package/bs-moment/locale/locale.class.js.map +1 -0
- package/bs-moment/locale/locale.class.metadata.json +1 -0
- package/bs-moment/locale/locale.defaults.d.ts +8 -0
- package/bs-moment/locale/locale.defaults.js +23 -0
- package/bs-moment/locale/locale.defaults.js.map +1 -0
- package/bs-moment/locale/locale.defaults.metadata.json +1 -0
- package/bs-moment/locale/locales.service.d.ts +8 -0
- package/bs-moment/locale/locales.service.js +81 -0
- package/bs-moment/locale/locales.service.js.map +1 -0
- package/bs-moment/locale/locales.service.metadata.json +1 -0
- package/bs-moment/types.d.ts +11 -0
- package/bs-moment/types.js +1 -0
- package/bs-moment/types.js.map +1 -0
- package/bs-moment/types.metadata.json +1 -0
- package/bs-moment/units/day-of-month.d.ts +0 -0
- package/bs-moment/units/day-of-month.js +6 -0
- package/bs-moment/units/day-of-month.js.map +1 -0
- package/bs-moment/units/day-of-week.d.ts +3 -0
- package/bs-moment/units/day-of-week.js +28 -0
- package/bs-moment/units/day-of-week.js.map +1 -0
- package/bs-moment/units/day-of-week.metadata.json +1 -0
- package/bs-moment/units/day-of-year.d.ts +2 -0
- package/bs-moment/units/day-of-year.js +20 -0
- package/bs-moment/units/day-of-year.js.map +1 -0
- package/bs-moment/units/day-of-year.metadata.json +1 -0
- package/bs-moment/units/hour.d.ts +0 -0
- package/bs-moment/units/hour.js +49 -0
- package/bs-moment/units/hour.js.map +1 -0
- package/bs-moment/units/index.d.ts +10 -0
- package/bs-moment/units/index.js +11 -0
- package/bs-moment/units/index.js.map +1 -0
- package/bs-moment/units/minute.d.ts +0 -0
- package/bs-moment/units/minute.js +6 -0
- package/bs-moment/units/minute.js.map +1 -0
- package/bs-moment/units/month.d.ts +1 -0
- package/bs-moment/units/month.js +23 -0
- package/bs-moment/units/month.js.map +1 -0
- package/bs-moment/units/month.metadata.json +1 -0
- package/bs-moment/units/second.d.ts +0 -0
- package/bs-moment/units/second.js +6 -0
- package/bs-moment/units/second.js.map +1 -0
- package/bs-moment/units/week-calendar-utils.d.ts +9 -0
- package/bs-moment/units/week-calendar-utils.js +70 -0
- package/bs-moment/units/week-calendar-utils.js.map +1 -0
- package/bs-moment/units/week-calendar-utils.metadata.json +1 -0
- package/bs-moment/units/week.d.ts +3 -0
- package/bs-moment/units/week.js +15 -0
- package/bs-moment/units/week.js.map +1 -0
- package/bs-moment/units/week.metadata.json +1 -0
- package/bs-moment/units/year.d.ts +2 -0
- package/bs-moment/units/year.js +23 -0
- package/bs-moment/units/year.js.map +1 -0
- package/bs-moment/units/year.metadata.json +1 -0
- package/bs-moment/utils/date-compare.d.ts +7 -0
- package/bs-moment/utils/date-compare.js +50 -0
- package/bs-moment/utils/date-compare.js.map +1 -0
- package/bs-moment/utils/date-compare.metadata.json +1 -0
- package/bs-moment/utils/date-getters.d.ts +14 -0
- package/bs-moment/utils/date-getters.js +61 -0
- package/bs-moment/utils/date-getters.js.map +1 -0
- package/bs-moment/utils/date-getters.metadata.json +1 -0
- package/bs-moment/utils/date-setters.d.ts +4 -0
- package/bs-moment/utils/date-setters.js +23 -0
- package/bs-moment/utils/date-setters.js.map +1 -0
- package/bs-moment/utils/date-setters.metadata.json +1 -0
- package/bs-moment/utils/start-end-of.d.ts +3 -0
- package/bs-moment/utils/start-end-of.js +35 -0
- package/bs-moment/utils/start-end-of.js.map +1 -0
- package/bs-moment/utils/start-end-of.metadata.json +1 -0
- package/bs-moment/utils/type-checks.d.ts +7 -0
- package/bs-moment/utils/type-checks.js +30 -0
- package/bs-moment/utils/type-checks.js.map +1 -0
- package/bs-moment/utils/type-checks.metadata.json +1 -0
- package/bs-moment/utils.d.ts +4 -0
- package/bs-moment/utils.js +24 -0
- package/bs-moment/utils.js.map +1 -0
- package/bs-moment/utils.metadata.json +1 -0
- package/bundles/ngx-bootstrap.umd.js +8786 -20532
- package/bundles/ngx-bootstrap.umd.js.map +1 -1
- package/bundles/ngx-bootstrap.umd.min.js +2 -2
- package/buttons/button-checkbox.directive.js +2 -1
- package/buttons/button-checkbox.directive.js.map +1 -1
- package/buttons/button-radio.directive.js +2 -1
- package/buttons/button-radio.directive.js.map +1 -1
- package/buttons/buttons.module.js +2 -1
- package/buttons/buttons.module.js.map +1 -1
- package/buttons/index.js.map +1 -1
- package/carousel/carousel.component.d.ts +3 -2
- package/carousel/carousel.component.js +31 -12
- package/carousel/carousel.component.js.map +1 -1
- package/carousel/carousel.component.metadata.json +1 -1
- package/carousel/carousel.config.js +2 -1
- package/carousel/carousel.config.js.map +1 -1
- package/carousel/carousel.module.js +2 -1
- package/carousel/carousel.module.js.map +1 -1
- package/carousel/index.js.map +1 -1
- package/carousel/slide.component.js +2 -1
- package/carousel/slide.component.js.map +1 -1
- package/collapse/collapse.directive.js +3 -1
- package/collapse/collapse.directive.js.map +1 -1
- package/collapse/collapse.module.js +2 -1
- package/collapse/collapse.module.js.map +1 -1
- package/collapse/index.js.map +1 -1
- package/component-loader/bs-component-ref.class.js +2 -1
- package/component-loader/bs-component-ref.class.js.map +1 -1
- package/component-loader/bs-component-ref.class.metadata.json +1 -1
- package/component-loader/component-loader.class.d.ts +10 -9
- package/component-loader/component-loader.class.js +56 -12
- package/component-loader/component-loader.class.js.map +1 -1
- package/component-loader/component-loader.class.metadata.json +1 -1
- package/component-loader/component-loader.factory.js +2 -1
- package/component-loader/component-loader.factory.js.map +1 -1
- package/component-loader/content-ref.class.js +2 -1
- package/component-loader/content-ref.class.js.map +1 -1
- package/component-loader/index.js.map +1 -1
- package/component-loader/listen-options.model.d.ts +9 -0
- package/component-loader/listen-options.model.js +1 -0
- package/component-loader/listen-options.model.js.map +1 -0
- package/component-loader/listen-options.model.metadata.json +1 -0
- package/datepicker/base/bs-datepicker-container.d.ts +26 -0
- package/datepicker/base/bs-datepicker-container.js +41 -0
- package/datepicker/base/bs-datepicker-container.js.map +1 -0
- package/datepicker/base/bs-datepicker-container.metadata.json +1 -0
- package/datepicker/bs-datepicker-input.directive.d.ts +21 -0
- package/datepicker/bs-datepicker-input.directive.js +79 -0
- package/datepicker/bs-datepicker-input.directive.js.map +1 -0
- package/datepicker/bs-datepicker-input.directive.metadata.json +1 -0
- package/datepicker/bs-datepicker.component.d.ts +85 -0
- package/datepicker/bs-datepicker.component.js +184 -0
- package/datepicker/bs-datepicker.component.js.map +1 -0
- package/datepicker/bs-datepicker.component.metadata.json +1 -0
- package/datepicker/bs-datepicker.config.d.ts +36 -0
- package/datepicker/bs-datepicker.config.js +39 -0
- package/datepicker/bs-datepicker.config.js.map +1 -0
- package/datepicker/bs-datepicker.config.metadata.json +1 -0
- package/datepicker/bs-datepicker.css +424 -0
- package/datepicker/bs-datepicker.css.map +16 -0
- package/datepicker/bs-datepicker.module.d.ts +5 -0
- package/datepicker/bs-datepicker.module.js +69 -0
- package/datepicker/bs-datepicker.module.js.map +1 -0
- package/datepicker/bs-datepicker.module.metadata.json +1 -0
- package/datepicker/bs-datepicker.scss +532 -0
- package/datepicker/bs-daterangepicker-input.directive.d.ts +21 -0
- package/datepicker/bs-daterangepicker-input.directive.js +87 -0
- package/datepicker/bs-daterangepicker-input.directive.js.map +1 -0
- package/datepicker/bs-daterangepicker-input.directive.metadata.json +1 -0
- package/datepicker/bs-daterangepicker.component.d.ts +84 -0
- package/datepicker/bs-daterangepicker.component.js +184 -0
- package/datepicker/bs-daterangepicker.component.js.map +1 -0
- package/datepicker/bs-daterangepicker.component.metadata.json +1 -0
- package/datepicker/date-formatter.d.ts +1 -1
- package/datepicker/date-formatter.js +5 -4
- package/datepicker/date-formatter.js.map +1 -1
- package/datepicker/datepicker-inner.component.d.ts +1 -0
- package/datepicker/datepicker-inner.component.js +5 -2
- package/datepicker/datepicker-inner.component.js.map +1 -1
- package/datepicker/datepicker-inner.component.metadata.json +1 -1
- package/datepicker/datepicker.component.d.ts +1 -1
- package/datepicker/datepicker.component.js +3 -2
- package/datepicker/datepicker.component.js.map +1 -1
- package/datepicker/datepicker.component.metadata.json +1 -1
- package/datepicker/datepicker.config.d.ts +1 -0
- package/datepicker/datepicker.config.js +3 -1
- package/datepicker/datepicker.config.js.map +1 -1
- package/datepicker/datepicker.module.js +2 -1
- package/datepicker/datepicker.module.js.map +1 -1
- package/datepicker/daypicker.component.js +4 -2
- package/datepicker/daypicker.component.js.map +1 -1
- package/datepicker/daypicker.component.metadata.json +1 -1
- package/datepicker/engine/calc-days-calendar.d.ts +2 -0
- package/datepicker/engine/calc-days-calendar.js +18 -0
- package/datepicker/engine/calc-days-calendar.js.map +1 -0
- package/datepicker/engine/calc-days-calendar.metadata.json +1 -0
- package/datepicker/engine/flag-days-calendar.d.ts +12 -0
- package/datepicker/engine/flag-days-calendar.js +71 -0
- package/datepicker/engine/flag-days-calendar.js.map +1 -0
- package/datepicker/engine/flag-days-calendar.metadata.json +1 -0
- package/datepicker/engine/flag-months-calendar.d.ts +10 -0
- package/datepicker/engine/flag-months-calendar.js +27 -0
- package/datepicker/engine/flag-months-calendar.js.map +1 -0
- package/datepicker/engine/flag-months-calendar.metadata.json +1 -0
- package/datepicker/engine/flag-years-calendar.d.ts +10 -0
- package/datepicker/engine/flag-years-calendar.js +29 -0
- package/datepicker/engine/flag-years-calendar.js.map +1 -0
- package/datepicker/engine/flag-years-calendar.metadata.json +1 -0
- package/datepicker/engine/format-days-calendar.d.ts +3 -0
- package/datepicker/engine/format-days-calendar.js +25 -0
- package/datepicker/engine/format-days-calendar.js.map +1 -0
- package/datepicker/engine/format-days-calendar.metadata.json +1 -0
- package/datepicker/engine/format-months-calendar.d.ts +2 -0
- package/datepicker/engine/format-months-calendar.js +20 -0
- package/datepicker/engine/format-months-calendar.js.map +1 -0
- package/datepicker/engine/format-months-calendar.metadata.json +1 -0
- package/datepicker/engine/format-years-calendar.d.ts +3 -0
- package/datepicker/engine/format-years-calendar.js +28 -0
- package/datepicker/engine/format-years-calendar.js.map +1 -0
- package/datepicker/engine/format-years-calendar.metadata.json +1 -0
- package/datepicker/engine/view-mode.d.ts +2 -0
- package/datepicker/engine/view-mode.js +4 -0
- package/datepicker/engine/view-mode.js.map +1 -0
- package/datepicker/engine/view-mode.metadata.json +1 -0
- package/datepicker/index.d.ts +4 -0
- package/datepicker/index.js +4 -8
- package/datepicker/index.js.map +1 -1
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/models/index.d.ts +89 -0
- package/datepicker/models/index.js +9 -0
- package/datepicker/models/index.js.map +1 -0
- package/datepicker/models/index.metadata.json +1 -0
- package/datepicker/monthpicker.component.js +4 -2
- package/datepicker/monthpicker.component.js.map +1 -1
- package/datepicker/monthpicker.component.metadata.json +1 -1
- package/datepicker/reducer/_defaults.d.ts +2 -0
- package/datepicker/reducer/_defaults.js +5 -0
- package/datepicker/reducer/_defaults.js.map +1 -0
- package/datepicker/reducer/_defaults.metadata.json +1 -0
- package/datepicker/reducer/bs-datepicker.actions.d.ts +31 -0
- package/datepicker/reducer/bs-datepicker.actions.js +90 -0
- package/datepicker/reducer/bs-datepicker.actions.js.map +1 -0
- package/datepicker/reducer/bs-datepicker.actions.metadata.json +1 -0
- package/datepicker/reducer/bs-datepicker.effects.d.ts +33 -0
- package/datepicker/reducer/bs-datepicker.effects.js +173 -0
- package/datepicker/reducer/bs-datepicker.effects.js.map +1 -0
- package/datepicker/reducer/bs-datepicker.effects.metadata.json +1 -0
- package/datepicker/reducer/bs-datepicker.reducer.d.ts +3 -0
- package/datepicker/reducer/bs-datepicker.reducer.js +230 -0
- package/datepicker/reducer/bs-datepicker.reducer.js.map +1 -0
- package/datepicker/reducer/bs-datepicker.reducer.metadata.json +1 -0
- package/datepicker/reducer/bs-datepicker.state.d.ts +34 -0
- package/datepicker/reducer/bs-datepicker.state.js +14 -0
- package/datepicker/reducer/bs-datepicker.state.js.map +1 -0
- package/datepicker/reducer/bs-datepicker.state.metadata.json +1 -0
- package/datepicker/reducer/bs-datepicker.store.d.ts +5 -0
- package/datepicker/reducer/bs-datepicker.store.js +34 -0
- package/datepicker/reducer/bs-datepicker.store.js.map +1 -0
- package/datepicker/reducer/bs-datepicker.store.metadata.json +1 -0
- package/datepicker/themes/bs/bs-calendar-layout.component.d.ts +2 -0
- package/datepicker/themes/bs/bs-calendar-layout.component.js +16 -0
- package/datepicker/themes/bs/bs-calendar-layout.component.js.map +1 -0
- package/datepicker/themes/bs/bs-calendar-layout.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-current-date-view.component.d.ts +3 -0
- package/datepicker/themes/bs/bs-current-date-view.component.js +19 -0
- package/datepicker/themes/bs/bs-current-date-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-current-date-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +8 -0
- package/datepicker/themes/bs/bs-custom-dates-view.component.js +21 -0
- package/datepicker/themes/bs/bs-custom-dates-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-custom-dates-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-datepicker-container.component.d.ts +20 -0
- package/datepicker/themes/bs/bs-datepicker-container.component.js +85 -0
- package/datepicker/themes/bs/bs-datepicker-container.component.js.map +1 -0
- package/datepicker/themes/bs/bs-datepicker-container.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.d.ts +4 -0
- package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.js +29 -0
- package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.js.map +1 -0
- package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.metadata.json +1 -0
- package/datepicker/themes/bs/bs-datepicker-navigation-view.component.d.ts +9 -0
- package/datepicker/themes/bs/bs-datepicker-navigation-view.component.js +33 -0
- package/datepicker/themes/bs/bs-datepicker-navigation-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-datepicker-navigation-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-datepicker-view.html +61 -0
- package/datepicker/themes/bs/bs-daterangepicker-container.component.d.ts +21 -0
- package/datepicker/themes/bs/bs-daterangepicker-container.component.js +102 -0
- package/datepicker/themes/bs/bs-daterangepicker-container.component.js.map +1 -0
- package/datepicker/themes/bs/bs-daterangepicker-container.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-days-calendar-view.component.d.ts +14 -0
- package/datepicker/themes/bs/bs-days-calendar-view.component.js +43 -0
- package/datepicker/themes/bs/bs-days-calendar-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-days-calendar-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-months-calendar-view.component.d.ts +13 -0
- package/datepicker/themes/bs/bs-months-calendar-view.component.js +41 -0
- package/datepicker/themes/bs/bs-months-calendar-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-months-calendar-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-timepicker-view.component.d.ts +5 -0
- package/datepicker/themes/bs/bs-timepicker-view.component.js +19 -0
- package/datepicker/themes/bs/bs-timepicker-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-timepicker-view.component.metadata.json +1 -0
- package/datepicker/themes/bs/bs-years-calendar-view.component.d.ts +13 -0
- package/datepicker/themes/bs/bs-years-calendar-view.component.js +42 -0
- package/datepicker/themes/bs/bs-years-calendar-view.component.js.map +1 -0
- package/datepicker/themes/bs/bs-years-calendar-view.component.metadata.json +1 -0
- package/datepicker/utils/bs-calendar-utils.d.ts +5 -0
- package/datepicker/utils/bs-calendar-utils.js +22 -0
- package/datepicker/utils/bs-calendar-utils.js.map +1 -0
- package/datepicker/utils/bs-calendar-utils.metadata.json +1 -0
- package/datepicker/utils/matrix-utils.d.ts +9 -0
- package/datepicker/utils/matrix-utils.js +14 -0
- package/datepicker/utils/matrix-utils.js.map +1 -0
- package/datepicker/utils/matrix-utils.metadata.json +1 -0
- package/datepicker/utils/scss/mixins.css +2 -0
- package/datepicker/utils/scss/mixins.css.map +12 -0
- package/datepicker/utils/scss/mixins.scss +24 -0
- package/datepicker/utils/scss/variables.css +2 -0
- package/datepicker/utils/scss/variables.css.map +12 -0
- package/datepicker/utils/scss/variables.scss +36 -0
- package/datepicker/yearpicker.component.js +4 -2
- package/datepicker/yearpicker.component.js.map +1 -1
- package/datepicker/yearpicker.component.metadata.json +1 -1
- package/dropdown/bs-dropdown-container.component.d.ts +3 -2
- package/dropdown/bs-dropdown-container.component.js +19 -3
- package/dropdown/bs-dropdown-container.component.js.map +1 -1
- package/dropdown/bs-dropdown-container.component.metadata.json +1 -1
- package/dropdown/bs-dropdown-menu.directive.js +2 -1
- package/dropdown/bs-dropdown-menu.directive.js.map +1 -1
- package/dropdown/bs-dropdown-toggle.directive.js +2 -1
- package/dropdown/bs-dropdown-toggle.directive.js.map +1 -1
- package/dropdown/bs-dropdown.config.js +2 -1
- package/dropdown/bs-dropdown.config.js.map +1 -1
- package/dropdown/bs-dropdown.directive.d.ts +5 -0
- package/dropdown/bs-dropdown.directive.js +40 -2
- package/dropdown/bs-dropdown.directive.js.map +1 -1
- package/dropdown/bs-dropdown.directive.metadata.json +1 -1
- package/dropdown/bs-dropdown.module.js +2 -1
- package/dropdown/bs-dropdown.module.js.map +1 -1
- package/dropdown/bs-dropdown.state.js +2 -1
- package/dropdown/bs-dropdown.state.js.map +1 -1
- package/dropdown/index.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +7 -3
- package/index.js.map +1 -1
- package/index.metadata.json +1 -1
- package/locale.d.ts +17 -0
- package/locale.js +18 -0
- package/locale.js.map +1 -0
- package/locale.metadata.json +1 -0
- package/mini-ngrx/LICENCE +21 -0
- package/mini-ngrx/index.js.map +1 -1
- package/mini-ngrx/index.metadata.json +1 -1
- package/mini-ngrx/state.class.js +17 -8
- package/mini-ngrx/state.class.js.map +1 -1
- package/mini-ngrx/state.class.metadata.json +1 -1
- package/mini-ngrx/store.class.js +20 -10
- package/mini-ngrx/store.class.js.map +1 -1
- package/mini-ngrx/store.class.metadata.json +1 -1
- package/modal/bs-modal.service.js +3 -2
- package/modal/bs-modal.service.js.map +1 -1
- package/modal/index.js.map +1 -1
- package/modal/modal-backdrop.component.js +4 -2
- package/modal/modal-backdrop.component.js.map +1 -1
- package/modal/modal-container.component.js +2 -1
- package/modal/modal-container.component.js.map +1 -1
- package/modal/modal-options.class.js +4 -2
- package/modal/modal-options.class.js.map +1 -1
- package/modal/modal.component.d.ts +2 -2
- package/modal/modal.component.js +3 -2
- package/modal/modal.component.js.map +1 -1
- package/modal/modal.module.js +2 -1
- package/modal/modal.module.js.map +1 -1
- package/ng2-bootstrap.js +2 -1
- package/ng2-bootstrap.js.map +1 -1
- package/package.json +30 -34
- package/pagination/index.js.map +1 -1
- package/pagination/pager.component.js +3 -2
- package/pagination/pager.component.js.map +1 -1
- package/pagination/pager.component.metadata.json +1 -1
- package/pagination/pagination.component.js +2 -1
- package/pagination/pagination.component.js.map +1 -1
- package/pagination/pagination.component.metadata.json +1 -1
- package/pagination/pagination.config.js +3 -1
- package/pagination/pagination.config.js.map +1 -1
- package/pagination/pagination.module.js +2 -1
- package/pagination/pagination.module.js.map +1 -1
- package/popover/index.js.map +1 -1
- package/popover/popover-container.component.js +5 -3
- package/popover/popover-container.component.js.map +1 -1
- package/popover/popover-container.component.metadata.json +1 -1
- package/popover/popover.config.d.ts +2 -1
- package/popover/popover.config.js +4 -2
- package/popover/popover.config.js.map +1 -1
- package/popover/popover.directive.d.ts +9 -1
- package/popover/popover.directive.js +10 -1
- package/popover/popover.directive.js.map +1 -1
- package/popover/popover.directive.metadata.json +1 -1
- package/popover/popover.module.js +2 -1
- package/popover/popover.module.js.map +1 -1
- package/positioning/index.js.map +1 -1
- package/positioning/ng-positioning.d.ts +2 -0
- package/positioning/ng-positioning.js +30 -4
- package/positioning/ng-positioning.js.map +1 -1
- package/positioning/ng-positioning.metadata.json +1 -1
- package/positioning/positioning.service.js +2 -1
- package/positioning/positioning.service.js.map +1 -1
- package/positioning/positioning.service.metadata.json +1 -1
- package/progressbar/bar.component.js +2 -1
- package/progressbar/bar.component.js.map +1 -1
- package/progressbar/index.js.map +1 -1
- package/progressbar/progress.directive.js +2 -1
- package/progressbar/progress.directive.js.map +1 -1
- package/progressbar/progressbar.component.js +2 -1
- package/progressbar/progressbar.component.js.map +1 -1
- package/progressbar/progressbar.config.js +2 -1
- package/progressbar/progressbar.config.js.map +1 -1
- package/progressbar/progressbar.module.js +2 -1
- package/progressbar/progressbar.module.js.map +1 -1
- package/rating/index.js.map +1 -1
- package/rating/rating.component.js +2 -1
- package/rating/rating.component.js.map +1 -1
- package/rating/rating.module.js +2 -1
- package/rating/rating.module.js.map +1 -1
- package/sortable/draggable-item.js.map +1 -1
- package/sortable/draggable-item.metadata.json +1 -0
- package/sortable/draggable-item.service.js +2 -1
- package/sortable/draggable-item.service.js.map +1 -1
- package/sortable/index.js.map +1 -1
- package/sortable/sortable.component.js +2 -1
- package/sortable/sortable.component.js.map +1 -1
- package/sortable/sortable.component.metadata.json +1 -1
- package/sortable/sortable.module.js +2 -1
- package/sortable/sortable.module.js.map +1 -1
- package/spec/ng-bootstrap/license +23 -0
- package/tabs/index.js.map +1 -1
- package/tabs/ng-transclude.directive.js +2 -1
- package/tabs/ng-transclude.directive.js.map +1 -1
- package/tabs/tab-heading.directive.js +2 -1
- package/tabs/tab-heading.directive.js.map +1 -1
- package/tabs/tab.directive.js +7 -3
- package/tabs/tab.directive.js.map +1 -1
- package/tabs/tabs.module.js +2 -1
- package/tabs/tabs.module.js.map +1 -1
- package/tabs/tabset.component.js +4 -3
- package/tabs/tabset.component.js.map +1 -1
- package/tabs/tabset.config.js +2 -1
- package/tabs/tabset.config.js.map +1 -1
- package/timepicker/index.js.map +1 -1
- package/timepicker/reducer/timepicker.actions.js +2 -1
- package/timepicker/reducer/timepicker.actions.js.map +1 -1
- package/timepicker/reducer/timepicker.reducer.d.ts +1 -3
- package/timepicker/reducer/timepicker.reducer.js +10 -3
- package/timepicker/reducer/timepicker.reducer.js.map +1 -1
- package/timepicker/reducer/timepicker.reducer.metadata.json +1 -1
- package/timepicker/reducer/timepicker.store.js +15 -7
- package/timepicker/reducer/timepicker.store.js.map +1 -1
- package/timepicker/timepicker-controls.util.js.map +1 -1
- package/timepicker/timepicker.component.js +4 -2
- package/timepicker/timepicker.component.js.map +1 -1
- package/timepicker/timepicker.component.metadata.json +1 -1
- package/timepicker/timepicker.config.js +2 -1
- package/timepicker/timepicker.config.js.map +1 -1
- package/timepicker/timepicker.models.js.map +1 -1
- package/timepicker/timepicker.models.metadata.json +1 -0
- package/timepicker/timepicker.module.js +2 -1
- package/timepicker/timepicker.module.js.map +1 -1
- package/timepicker/timepicker.utils.js.map +1 -1
- package/tooltip/index.js.map +1 -1
- package/tooltip/tooltip-container.component.js +24 -3
- package/tooltip/tooltip-container.component.js.map +1 -1
- package/tooltip/tooltip-container.component.metadata.json +1 -1
- package/tooltip/tooltip.config.js +2 -1
- package/tooltip/tooltip.config.js.map +1 -1
- package/tooltip/tooltip.directive.js +17 -15
- package/tooltip/tooltip.directive.js.map +1 -1
- package/tooltip/tooltip.module.js +2 -1
- package/tooltip/tooltip.module.js.map +1 -1
- package/tsconfig.spec.json +39 -0
- package/typeahead/index.js.map +1 -1
- package/typeahead/latin-map.js.map +1 -1
- package/typeahead/typeahead-container.component.d.ts +1 -0
- package/typeahead/typeahead-container.component.js +3 -1
- package/typeahead/typeahead-container.component.js.map +1 -1
- package/typeahead/typeahead-container.component.metadata.json +1 -1
- package/typeahead/typeahead-match.class.js +2 -1
- package/typeahead/typeahead-match.class.js.map +1 -1
- package/typeahead/typeahead-options.class.js +2 -1
- package/typeahead/typeahead-options.class.js.map +1 -1
- package/typeahead/typeahead-utils.js.map +1 -1
- package/typeahead/typeahead.directive.d.ts +3 -0
- package/typeahead/typeahead.directive.js +19 -8
- package/typeahead/typeahead.directive.js.map +1 -1
- package/typeahead/typeahead.directive.metadata.json +1 -1
- package/typeahead/typeahead.module.js +2 -1
- package/typeahead/typeahead.module.js.map +1 -1
- package/utils/decorators.js +1 -0
- package/utils/decorators.js.map +1 -1
- package/utils/facade/browser.js.map +1 -1
- package/utils/index.js.map +1 -1
- package/utils/linked-list.class.js +5 -3
- package/utils/linked-list.class.js.map +1 -1
- package/utils/linked-list.class.metadata.json +1 -1
- package/utils/ng2-bootstrap-config.js +27 -0
- package/utils/ng2-bootstrap-config.js.map +1 -1
- package/utils/ng2-bootstrap-config.metadata.json +1 -1
- package/utils/trigger.class.js +2 -1
- package/utils/trigger.class.js.map +1 -1
- package/utils/triggers.d.ts +3 -0
- package/utils/triggers.js +44 -0
- package/utils/triggers.js.map +1 -1
- package/utils/triggers.metadata.json +1 -1
- package/utils/utils.class.js +2 -1
- package/utils/utils.class.js.map +1 -1
- package/utils/warn-once.d.ts +1 -0
- package/utils/warn-once.js +12 -0
- package/utils/warn-once.js.map +1 -0
- package/utils/warn-once.metadata.json +1 -0
@@ -5,8 +5,12 @@ import { PopoverContainerComponent } from './popover-container.component';
|
|
5
5
|
/**
|
6
6
|
* A lightweight, extensible directive for fancy popover creation.
|
7
7
|
*/
|
8
|
-
|
8
|
+
var PopoverDirective = (function () {
|
9
9
|
function PopoverDirective(_elementRef, _renderer, _viewContainerRef, _config, cis) {
|
10
|
+
/**
|
11
|
+
* Close popover on outside click
|
12
|
+
*/
|
13
|
+
this.outsideClick = false;
|
10
14
|
/**
|
11
15
|
* Css class for popover container
|
12
16
|
*/
|
@@ -58,6 +62,7 @@ export var PopoverDirective = (function () {
|
|
58
62
|
.position({ attachment: this.placement })
|
59
63
|
.show({
|
60
64
|
content: this.popover,
|
65
|
+
context: this.popoverContext,
|
61
66
|
placement: this.placement,
|
62
67
|
title: this.popoverTitle,
|
63
68
|
containerClass: this.containerClass
|
@@ -95,6 +100,7 @@ export var PopoverDirective = (function () {
|
|
95
100
|
this._isInited = true;
|
96
101
|
this._popover.listen({
|
97
102
|
triggers: this.triggers,
|
103
|
+
outsideClick: this.outsideClick,
|
98
104
|
show: function () { return _this.show(); }
|
99
105
|
});
|
100
106
|
};
|
@@ -114,8 +120,10 @@ export var PopoverDirective = (function () {
|
|
114
120
|
]; };
|
115
121
|
PopoverDirective.propDecorators = {
|
116
122
|
'popover': [{ type: Input },],
|
123
|
+
'popoverContext': [{ type: Input },],
|
117
124
|
'popoverTitle': [{ type: Input },],
|
118
125
|
'placement': [{ type: Input },],
|
126
|
+
'outsideClick': [{ type: Input },],
|
119
127
|
'triggers': [{ type: Input },],
|
120
128
|
'container': [{ type: Input },],
|
121
129
|
'containerClass': [{ type: Input },],
|
@@ -125,4 +133,5 @@ export var PopoverDirective = (function () {
|
|
125
133
|
};
|
126
134
|
return PopoverDirective;
|
127
135
|
}());
|
136
|
+
export { PopoverDirective };
|
128
137
|
//# sourceMappingURL=popover.directive.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/popover/popover.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAAE,KAAA,EAAO,MAAA,EAAyC,QAAA,EAC3D,UAAU,EAAe,gBAAA,EAC1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E,KAAK,EAAE,EAAE;QAC/B,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACpC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC5B,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC9B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KAC9B,CAAC;IACF,uBAAC;CAzKD,AAyKC,IAAA;SAzKY,gBAAgB","file":"popover.directive.js","sourceRoot":"","sourcesContent":["import {\n Directive, Input, Output, EventEmitter, OnInit, OnDestroy, Renderer,\n ElementRef, TemplateRef, ViewContainerRef\n} from '@angular/core';\nimport { PopoverConfig } from './popover.config';\nimport { ComponentLoaderFactory, ComponentLoader } from '../component-loader';\nimport { PopoverContainerComponent } from './popover-container.component';\n\n/**\n * A lightweight, extensible directive for fancy popover creation.\n */\n\nexport class PopoverDirective implements OnInit, OnDestroy {\n /**\n * Content to be displayed as popover.\n */\n public popover: string | TemplateRef<any>;\n /**\n * Context to be used if popover is a template.\n */\n public popoverContext: any;\n /**\n * Title of a popover.\n */\n public popoverTitle: string;\n /**\n * Placement of a popover. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n */\n public placement: 'top' | 'bottom' | 'left' | 'right' | 'auto';\n /**\n * Close popover on outside click\n */\n outsideClick = false;\n /**\n * Specifies events that should trigger. Supports a space separated list of\n * event names.\n */\n public triggers: string;\n /**\n * A selector specifying the element the popover should be appended to.\n * Currently only supports \"body\".\n */\n public container: string;\n\n /**\n * Css class for popover container\n */\n public containerClass: string = '';\n\n /**\n * Returns whether or not the popover is currently being shown\n */\n \n public get isOpen(): boolean { return this._popover.isShown; }\n\n public set isOpen(value: boolean) {\n if (value) {this.show();} else {this.hide();}\n }\n\n /**\n * Emits an event when the popover is shown\n */\n public onShown: EventEmitter<any>;\n /**\n * Emits an event when the popover is hidden\n */\n public onHidden: EventEmitter<any>;\n\n private _popover: ComponentLoader<PopoverContainerComponent>;\n private _isInited = false;\n\n public constructor(_elementRef: ElementRef,\n _renderer: Renderer,\n _viewContainerRef: ViewContainerRef,\n _config: PopoverConfig,\n cis: ComponentLoaderFactory) {\n this._popover = cis\n .createLoader<PopoverContainerComponent>(_elementRef, _viewContainerRef, _renderer)\n .provide({provide: PopoverConfig, useValue: _config});\n Object.assign(this, _config);\n this.onShown = this._popover.onShown;\n this.onHidden = this._popover.onHidden;\n\n // fix: no focus on button on Mac OS #1795\n _elementRef.nativeElement.addEventListener('click', function() {\n try {\n _elementRef.nativeElement.focus();\n } catch(err) {\n return;\n }\n });\n\n }\n\n /**\n * Opens an element’s popover. This is considered a “manual” triggering of\n * the popover.\n */\n public show(): void {\n if (this._popover.isShown) {\n return;\n }\n\n this._popover\n .attach(PopoverContainerComponent)\n .to(this.container)\n .position({attachment: this.placement})\n .show({\n content: this.popover,\n context: this.popoverContext,\n placement: this.placement,\n title: this.popoverTitle,\n containerClass: this.containerClass\n });\n this.isOpen = true;\n }\n\n /**\n * Closes an element’s popover. This is considered a “manual” triggering of\n * the popover.\n */\n public hide(): void {\n if (this.isOpen) {\n this._popover.hide();\n this.isOpen = false;\n }\n }\n\n /**\n * Toggles an element’s popover. This is considered a “manual” triggering of\n * the popover.\n */\n public toggle(): void {\n if (this.isOpen) {\n return this.hide();\n }\n\n this.show();\n }\n\n public ngOnInit(): any {\n // fix: seems there are an issue with `routerLinkActive`\n // which result in duplicated call ngOnInit without call to ngOnDestroy\n // read more: https://github.com/valor-software/ngx-bootstrap/issues/1885\n if (this._isInited) { return; }\n this._isInited = true;\n\n this._popover.listen({\n triggers: this.triggers,\n outsideClick: this.outsideClick,\n show: () => this.show()\n });\n }\n\n public ngOnDestroy(): any {\n this._popover.dispose();\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[popover]', exportAs: 'bs-popover'}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: Renderer, },\n{type: ViewContainerRef, },\n{type: PopoverConfig, },\n{type: ComponentLoaderFactory, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'popover': [{ type: Input },],\n'popoverContext': [{ type: Input },],\n'popoverTitle': [{ type: Input },],\n'placement': [{ type: Input },],\n'outsideClick': [{ type: Input },],\n'triggers': [{ type: Input },],\n'container': [{ type: Input },],\n'containerClass': [{ type: Input },],\n'isOpen': [{ type: Input },],\n'onShown': [{ type: Output },],\n'onHidden': [{ type: Output },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"PopoverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[popover]","exportAs":"bs-popover"}]}],"members":{"popover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"containerClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onShown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onHidden":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"./popover.config","name":"PopoverConfig"},{"__symbolic":"reference","module":"../component-loader","name":"ComponentLoaderFactory"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"PopoverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[popover]","exportAs":"bs-popover"}]}],"members":{"popover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"containerClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onShown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onHidden":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"./popover.config","name":"PopoverConfig"},{"__symbolic":"reference","module":"../component-loader","name":"ComponentLoaderFactory"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}]
|
1
|
+
[{"__symbolic":"module","version":3,"metadata":{"PopoverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[popover]","exportAs":"bs-popover"}]}],"members":{"popover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"outsideClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"containerClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onShown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onHidden":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"./popover.config","name":"PopoverConfig"},{"__symbolic":"reference","module":"../component-loader","name":"ComponentLoaderFactory"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"PopoverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[popover]","exportAs":"bs-popover"}]}],"members":{"popover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"popoverTitle":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"placement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"outsideClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"containerClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isOpen":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"onShown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"onHidden":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef"},{"__symbolic":"reference","module":"./popover.config","name":"PopoverConfig"},{"__symbolic":"reference","module":"../component-loader","name":"ComponentLoaderFactory"}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}]
|
@@ -5,7 +5,7 @@ import { PositioningService } from '../positioning';
|
|
5
5
|
import { PopoverConfig } from './popover.config';
|
6
6
|
import { PopoverDirective } from './popover.directive';
|
7
7
|
import { PopoverContainerComponent } from './popover-container.component';
|
8
|
-
|
8
|
+
var PopoverModule = (function () {
|
9
9
|
function PopoverModule() {
|
10
10
|
}
|
11
11
|
PopoverModule.forRoot = function () {
|
@@ -26,4 +26,5 @@ export var PopoverModule = (function () {
|
|
26
26
|
PopoverModule.ctorParameters = function () { return []; };
|
27
27
|
return PopoverModule;
|
28
28
|
}());
|
29
|
+
export { PopoverModule };
|
29
30
|
//# sourceMappingURL=popover.module.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/popover/popover.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAA,EAA8B,MAAO,eAAA,CAAgB;AAC9D,OAAO,EAAE,YAAA,EAAa,MAAO,iBAAA,CAAkB;AAE/C,OAAO,EAAE,sBAAA,EAAuB,MAAO,qBAAA,CAAsB;AAC7D,OAAO,EAAE,kBAAA,EAAmB,MAAO,gBAAA,CAAiB;AACpD,OAAO,EAAE,aAAA,EAAc,MAAO,kBAAA,CAAmB;AACjD,OAAO,EAAE,gBAAA,EAAiB,MAAO,qBAAA,CAAsB;AACvD,OAAO,EAAE,yBAAA,EAA0B,MAAO,+BAAA,CAAgC;AAG1E;IAAA;IAkBA,CAAC;IAjBe,qBAAO,GAArB;QACE,MAAM,CAAC;YACL,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,CAAC,aAAa,EAAE,sBAAsB,EAAE,kBAAkB,CAAC;SACvE,CAAC;IACJ,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;oBAC3D,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,eAAe,EAAE,CAAC,yBAAyB,CAAC;iBAC7C,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,4BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,oBAAC;CAlBD,AAkBC,IAAA;SAlBY,aAAa","file":"popover.module.js","sourceRoot":"","sourcesContent":["import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ComponentLoaderFactory } from '../component-loader';\nimport { PositioningService } from '../positioning';\nimport { PopoverConfig } from './popover.config';\nimport { PopoverDirective } from './popover.directive';\nimport { PopoverContainerComponent } from './popover-container.component';\n\n\nexport class PopoverModule {\n public static forRoot(): ModuleWithProviders {\n return {\n ngModule: PopoverModule,\n providers: [PopoverConfig, ComponentLoaderFactory, PositioningService]\n };\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [PopoverDirective, PopoverContainerComponent],\n exports: [PopoverDirective],\n entryComponents: [PopoverContainerComponent]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/positioning/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/positioning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { positionElements, Positioning } from './ng-positioning'\nexport { PositioningService, PositioningOptions } from './positioning.service';\n"]}
|
@@ -6,6 +6,8 @@ export declare class Positioning {
|
|
6
6
|
position(element: HTMLElement, round?: boolean): ClientRect;
|
7
7
|
offset(element: HTMLElement, round?: boolean): ClientRect;
|
8
8
|
positionElements(hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean): ClientRect;
|
9
|
+
private autoPosition(targetElPosition, hostElPosition, targetElement, preferredPosition?);
|
10
|
+
private getAllStyles(element);
|
9
11
|
private getStyle(element, prop);
|
10
12
|
private isStaticPositioned(element);
|
11
13
|
private offsetParent(element);
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// previous version:
|
6
6
|
// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js
|
7
7
|
// tslint:disable
|
8
|
-
|
8
|
+
var Positioning = (function () {
|
9
9
|
function Positioning() {
|
10
10
|
}
|
11
11
|
Positioning.prototype.position = function (element, round) {
|
@@ -71,6 +71,7 @@ export var Positioning = (function () {
|
|
71
71
|
};
|
72
72
|
Positioning.prototype.positionElements = function (hostElement, targetElement, placement, appendToBody) {
|
73
73
|
var hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);
|
74
|
+
var targetElStyles = this.getAllStyles(targetElement);
|
74
75
|
var shiftWidth = {
|
75
76
|
left: hostElPosition.left,
|
76
77
|
center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,
|
@@ -92,9 +93,17 @@ export var Positioning = (function () {
|
|
92
93
|
left: 0,
|
93
94
|
right: targetElBCR.width || targetElement.offsetWidth
|
94
95
|
};
|
96
|
+
if (placementPrimary === "auto") {
|
97
|
+
var newPlacementPrimary = this.autoPosition(targetElPosition, hostElPosition, targetElement, placementSecondary);
|
98
|
+
if (!newPlacementPrimary)
|
99
|
+
newPlacementPrimary = this.autoPosition(targetElPosition, hostElPosition, targetElement);
|
100
|
+
if (newPlacementPrimary)
|
101
|
+
placementPrimary = newPlacementPrimary;
|
102
|
+
targetElement.classList.add(placementPrimary);
|
103
|
+
}
|
95
104
|
switch (placementPrimary) {
|
96
105
|
case 'top':
|
97
|
-
targetElPosition.top = hostElPosition.top - targetElement.offsetHeight;
|
106
|
+
targetElPosition.top = hostElPosition.top - (targetElement.offsetHeight + parseFloat(targetElStyles.marginBottom));
|
98
107
|
targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;
|
99
108
|
targetElPosition.left = shiftWidth[placementSecondary];
|
100
109
|
targetElPosition.right += shiftWidth[placementSecondary];
|
@@ -108,7 +117,7 @@ export var Positioning = (function () {
|
|
108
117
|
case 'left':
|
109
118
|
targetElPosition.top = shiftHeight[placementSecondary];
|
110
119
|
targetElPosition.bottom += shiftHeight[placementSecondary];
|
111
|
-
targetElPosition.left = hostElPosition.left - targetElement.offsetWidth;
|
120
|
+
targetElPosition.left = hostElPosition.left - (targetElement.offsetWidth + parseFloat(targetElStyles.marginRight));
|
112
121
|
targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;
|
113
122
|
break;
|
114
123
|
case 'right':
|
@@ -124,7 +133,23 @@ export var Positioning = (function () {
|
|
124
133
|
targetElPosition.right = Math.round(targetElPosition.right);
|
125
134
|
return targetElPosition;
|
126
135
|
};
|
127
|
-
Positioning.prototype.
|
136
|
+
Positioning.prototype.autoPosition = function (targetElPosition, hostElPosition, targetElement, preferredPosition) {
|
137
|
+
if ((!preferredPosition || preferredPosition === "right") && targetElPosition.left + hostElPosition.left - targetElement.offsetWidth < 0) {
|
138
|
+
return "right";
|
139
|
+
}
|
140
|
+
else if ((!preferredPosition || preferredPosition === "top") && targetElPosition.bottom + hostElPosition.bottom + targetElement.offsetHeight > window.innerHeight) {
|
141
|
+
return "top";
|
142
|
+
}
|
143
|
+
else if ((!preferredPosition || preferredPosition === "bottom") && targetElPosition.top + hostElPosition.top - targetElement.offsetHeight < 0) {
|
144
|
+
return "bottom";
|
145
|
+
}
|
146
|
+
else if ((!preferredPosition || preferredPosition === "left") && targetElPosition.right + hostElPosition.right + targetElement.offsetWidth > window.innerWidth) {
|
147
|
+
return "left";
|
148
|
+
}
|
149
|
+
return null;
|
150
|
+
};
|
151
|
+
Positioning.prototype.getAllStyles = function (element) { return window.getComputedStyle(element); };
|
152
|
+
Positioning.prototype.getStyle = function (element, prop) { return this.getAllStyles(element)[prop]; };
|
128
153
|
Positioning.prototype.isStaticPositioned = function (element) {
|
129
154
|
return (this.getStyle(element, 'position') || 'static') === 'static';
|
130
155
|
};
|
@@ -137,6 +162,7 @@ export var Positioning = (function () {
|
|
137
162
|
};
|
138
163
|
return Positioning;
|
139
164
|
}());
|
165
|
+
export { Positioning };
|
140
166
|
var positionService = new Positioning();
|
141
167
|
export function positionElements(hostElement, targetElement, placement, appendToBody) {
|
142
168
|
var pos = positionService.positionElements(hostElement, targetElement, placement, appendToBody);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ng-positioning.js","sourceRoot":"","sources":["../../src/positioning/ng-positioning.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAoB;AACpB,iHAAiH;AACjH,iBAAiB;AACjB;IAAA;IAmJA,CAAC;IAlJQ,8BAAQ,GAAf,UAAgB,OAAoB,EAAE,KAAY;QAAZ,qBAAY,GAAZ,YAAY;QAChD,IAAI,UAAsB,CAAC;QAC3B,IAAI,YAAY,GAAe,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;QAE3F,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;YACnD,IAAM,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;YAC/C,UAAU,GAAG;gBACX,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC;QACJ,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAElD,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAEzC,EAAE,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;gBAChD,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,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AK,CAAC,IAAI,GAAM,GAAG,CAAC,IAAI,OAAI,CAAC;AAC7C,CAAC","sourcesContent":["/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\n\n// previous version:\n// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js\n// tslint:disable\nexport class Positioning {\n public position(element: HTMLElement, round = true): ClientRect {\n let elPosition: ClientRect;\n let parentOffset: ClientRect = {width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0};\n\n if (this.getStyle(element, 'position') === 'fixed') {\n const bcRect = element.getBoundingClientRect();\n elPosition = {\n width: bcRect.width,\n height: bcRect.height,\n top: bcRect.top,\n bottom: bcRect.bottom,\n left: bcRect.left,\n right: bcRect.right\n };\n } else {\n const offsetParentEl = this.offsetParent(element);\n\n elPosition = this.offset(element, false);\n\n if (offsetParentEl !== document.documentElement) {\n parentOffset = this.offset(offsetParentEl, false);\n }\n\n parentOffset.top += offsetParentEl.clientTop;\n parentOffset.left += offsetParentEl.clientLeft;\n }\n\n elPosition.top -= parentOffset.top;\n elPosition.bottom -= parentOffset.top;\n elPosition.left -= parentOffset.left;\n elPosition.right -= parentOffset.left;\n\n if (round) {\n elPosition.top = Math.round(elPosition.top);\n elPosition.bottom = Math.round(elPosition.bottom);\n elPosition.left = Math.round(elPosition.left);\n elPosition.right = Math.round(elPosition.right);\n }\n\n return elPosition;\n }\n\n public offset(element: HTMLElement, round = true): ClientRect {\n const elBcr = element.getBoundingClientRect();\n const viewportOffset = {\n top: window.pageYOffset - document.documentElement.clientTop,\n left: window.pageXOffset - document.documentElement.clientLeft\n };\n\n let elOffset = {\n height: elBcr.height || element.offsetHeight,\n width: elBcr.width || element.offsetWidth,\n top: elBcr.top + viewportOffset.top,\n bottom: elBcr.bottom + viewportOffset.top,\n left: elBcr.left + viewportOffset.left,\n right: elBcr.right + viewportOffset.left\n };\n\n if (round) {\n elOffset.height = Math.round(elOffset.height);\n elOffset.width = Math.round(elOffset.width);\n elOffset.top = Math.round(elOffset.top);\n elOffset.bottom = Math.round(elOffset.bottom);\n elOffset.left = Math.round(elOffset.left);\n elOffset.right = Math.round(elOffset.right);\n }\n\n return elOffset;\n }\n\n public positionElements(hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean):\n ClientRect {\n const hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);\n const shiftWidth: any = {\n left: hostElPosition.left,\n center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,\n right: hostElPosition.left + hostElPosition.width\n };\n const shiftHeight: any = {\n top: hostElPosition.top,\n center: hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2,\n bottom: hostElPosition.top + hostElPosition.height\n };\n const targetElBCR = targetElement.getBoundingClientRect();\n const placementPrimary = placement.split(' ')[0] || 'top';\n const placementSecondary = placement.split(' ')[1] || 'center';\n\n let targetElPosition: ClientRect = {\n height: targetElBCR.height || targetElement.offsetHeight,\n width: targetElBCR.width || targetElement.offsetWidth,\n top: 0,\n bottom: targetElBCR.height || targetElement.offsetHeight,\n left: 0,\n right: targetElBCR.width || targetElement.offsetWidth\n };\n\n switch (placementPrimary) {\n case 'top':\n targetElPosition.top = hostElPosition.top - targetElement.offsetHeight;\n targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;\n targetElPosition.left = shiftWidth[placementSecondary];\n targetElPosition.right += shiftWidth[placementSecondary];\n break;\n case 'bottom':\n targetElPosition.top = shiftHeight[placementPrimary];\n targetElPosition.bottom += shiftHeight[placementPrimary];\n targetElPosition.left = shiftWidth[placementSecondary];\n targetElPosition.right += shiftWidth[placementSecondary];\n break;\n case 'left':\n targetElPosition.top = shiftHeight[placementSecondary];\n targetElPosition.bottom += shiftHeight[placementSecondary];\n targetElPosition.left = hostElPosition.left - targetElement.offsetWidth;\n targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;\n break;\n case 'right':\n targetElPosition.top = shiftHeight[placementSecondary];\n targetElPosition.bottom += shiftHeight[placementSecondary];\n targetElPosition.left = shiftWidth[placementPrimary];\n targetElPosition.right += shiftWidth[placementPrimary];\n break;\n }\n\n targetElPosition.top = Math.round(targetElPosition.top);\n targetElPosition.bottom = Math.round(targetElPosition.bottom);\n targetElPosition.left = Math.round(targetElPosition.left);\n targetElPosition.right = Math.round(targetElPosition.right);\n\n return targetElPosition;\n }\n\n private getStyle(element: HTMLElement, prop: string): string { return (window.getComputedStyle(element) as any)[prop]; }\n\n private isStaticPositioned(element: HTMLElement): boolean {\n return (this.getStyle(element, 'position') || 'static') === 'static';\n }\n\n private offsetParent(element: HTMLElement): HTMLElement {\n let offsetParentEl = <HTMLElement>element.offsetParent || document.documentElement;\n\n while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {\n offsetParentEl = <HTMLElement>offsetParentEl.offsetParent;\n }\n\n return offsetParentEl || document.documentElement;\n }\n}\n\nconst positionService = new Positioning();\n\nexport function positionElements(\n hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean): void {\n const pos = positionService.positionElements(hostElement, targetElement, placement, appendToBody);\n\n targetElement.style.top = `${pos.top}px`;\n targetElement.style.left = `${pos.left}px`;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
1
|
+
{"version":3,"sources":["../../.tmp/positioning/ng-positioning.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAoB;AACpB,iHAAiH;AACjH,iBAAiB;AACjB;IAAA;IA2KA,CAAC;IA1KQ,8BAAQ,GAAf,UAAgB,OAAoB,EAAE,KAAY;QAAZ,sBAAA,EAAA,YAAY;QAChD,IAAI,UAAsB,CAAC;QAC3B,IAAI,YAAY,GAAe,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,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,CAAC,KAAK,CAAC,GAAG,GAAM,GAAG,CAAC,GAAG,OAAI,CAAC;IACzC,aAAa,CAAC,KAAK,CAAC,IAAI,GAAM,GAAG,CAAC,IAAI,OAAI,CAAC;AAC7C,CAAC","file":"ng-positioning.js","sourceRoot":"","sourcesContent":["/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\n\n// previous version:\n// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js\n// tslint:disable\nexport class Positioning {\n public position(element: HTMLElement, round = true): ClientRect {\n let elPosition: ClientRect;\n let parentOffset: ClientRect = {width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0};\n\n if (this.getStyle(element, 'position') === 'fixed') {\n const bcRect = element.getBoundingClientRect();\n elPosition = {\n width: bcRect.width,\n height: bcRect.height,\n top: bcRect.top,\n bottom: bcRect.bottom,\n left: bcRect.left,\n right: bcRect.right\n };\n } else {\n const offsetParentEl = this.offsetParent(element);\n\n elPosition = this.offset(element, false);\n\n if (offsetParentEl !== document.documentElement) {\n parentOffset = this.offset(offsetParentEl, false);\n }\n\n parentOffset.top += offsetParentEl.clientTop;\n parentOffset.left += offsetParentEl.clientLeft;\n }\n\n elPosition.top -= parentOffset.top;\n elPosition.bottom -= parentOffset.top;\n elPosition.left -= parentOffset.left;\n elPosition.right -= parentOffset.left;\n\n if (round) {\n elPosition.top = Math.round(elPosition.top);\n elPosition.bottom = Math.round(elPosition.bottom);\n elPosition.left = Math.round(elPosition.left);\n elPosition.right = Math.round(elPosition.right);\n }\n\n return elPosition;\n }\n\n public offset(element: HTMLElement, round = true): ClientRect {\n const elBcr = element.getBoundingClientRect();\n const viewportOffset = {\n top: window.pageYOffset - document.documentElement.clientTop,\n left: window.pageXOffset - document.documentElement.clientLeft\n };\n\n let elOffset = {\n height: elBcr.height || element.offsetHeight,\n width: elBcr.width || element.offsetWidth,\n top: elBcr.top + viewportOffset.top,\n bottom: elBcr.bottom + viewportOffset.top,\n left: elBcr.left + viewportOffset.left,\n right: elBcr.right + viewportOffset.left\n };\n\n if (round) {\n elOffset.height = Math.round(elOffset.height);\n elOffset.width = Math.round(elOffset.width);\n elOffset.top = Math.round(elOffset.top);\n elOffset.bottom = Math.round(elOffset.bottom);\n elOffset.left = Math.round(elOffset.left);\n elOffset.right = Math.round(elOffset.right);\n }\n\n return elOffset;\n }\n\n public positionElements(hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean):\n ClientRect {\n const hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);\n const targetElStyles = this.getAllStyles(targetElement);\n const shiftWidth: any = {\n left: hostElPosition.left,\n center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,\n right: hostElPosition.left + hostElPosition.width\n };\n const shiftHeight: any = {\n top: hostElPosition.top,\n center: hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2,\n bottom: hostElPosition.top + hostElPosition.height\n };\n const targetElBCR = targetElement.getBoundingClientRect();\n let placementPrimary = placement.split(' ')[0] || 'top';\n const placementSecondary = placement.split(' ')[1] || 'center';\n\n let targetElPosition: ClientRect = {\n height: targetElBCR.height || targetElement.offsetHeight,\n width: targetElBCR.width || targetElement.offsetWidth,\n top: 0,\n bottom: targetElBCR.height || targetElement.offsetHeight,\n left: 0,\n right: targetElBCR.width || targetElement.offsetWidth\n };\n\n if (placementPrimary===\"auto\") {\n let newPlacementPrimary = this.autoPosition(targetElPosition, hostElPosition, targetElement, placementSecondary);\n if (!newPlacementPrimary) newPlacementPrimary = this.autoPosition(targetElPosition, hostElPosition, targetElement);\n if (newPlacementPrimary) placementPrimary = newPlacementPrimary;\n targetElement.classList.add(placementPrimary);\n }\n\n switch (placementPrimary) {\n case 'top':\n targetElPosition.top = hostElPosition.top - (targetElement.offsetHeight + parseFloat(targetElStyles.marginBottom));\n targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;\n targetElPosition.left = shiftWidth[placementSecondary];\n targetElPosition.right += shiftWidth[placementSecondary];\n break;\n case 'bottom':\n targetElPosition.top = shiftHeight[placementPrimary];\n targetElPosition.bottom += shiftHeight[placementPrimary];\n targetElPosition.left = shiftWidth[placementSecondary];\n targetElPosition.right += shiftWidth[placementSecondary];\n break;\n case 'left':\n targetElPosition.top = shiftHeight[placementSecondary];\n targetElPosition.bottom += shiftHeight[placementSecondary];\n targetElPosition.left = hostElPosition.left - (targetElement.offsetWidth + parseFloat(targetElStyles.marginRight));\n targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;\n break;\n case 'right':\n targetElPosition.top = shiftHeight[placementSecondary];\n targetElPosition.bottom += shiftHeight[placementSecondary];\n targetElPosition.left = shiftWidth[placementPrimary];\n targetElPosition.right += shiftWidth[placementPrimary];\n break;\n }\n\n targetElPosition.top = Math.round(targetElPosition.top);\n targetElPosition.bottom = Math.round(targetElPosition.bottom);\n targetElPosition.left = Math.round(targetElPosition.left);\n targetElPosition.right = Math.round(targetElPosition.right);\n\n return targetElPosition;\n }\n\n private autoPosition(targetElPosition: ClientRect, hostElPosition: ClientRect, targetElement: HTMLElement, preferredPosition?: string) {\n if ((!preferredPosition || preferredPosition===\"right\") && targetElPosition.left + hostElPosition.left - targetElement.offsetWidth < 0) {\n return \"right\";\n } else if ((!preferredPosition || preferredPosition===\"top\") && targetElPosition.bottom + hostElPosition.bottom + targetElement.offsetHeight > window.innerHeight) {\n return \"top\";\n } else if ((!preferredPosition || preferredPosition===\"bottom\") && targetElPosition.top + hostElPosition.top - targetElement.offsetHeight < 0) {\n return \"bottom\";\n } else if ((!preferredPosition || preferredPosition===\"left\") && targetElPosition.right + hostElPosition.right + targetElement.offsetWidth > window.innerWidth ) {\n return \"left\";\n }\n return null;\n }\n\n private getAllStyles(element: HTMLElement) { return window.getComputedStyle(element); }\n\n private getStyle(element: HTMLElement, prop: string): string { return (this.getAllStyles(element) as any)[prop]; }\n\n\n private isStaticPositioned(element: HTMLElement): boolean {\n return (this.getStyle(element, 'position') || 'static') === 'static';\n }\n\n private offsetParent(element: HTMLElement): HTMLElement {\n let offsetParentEl = <HTMLElement>element.offsetParent || document.documentElement;\n\n while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {\n offsetParentEl = <HTMLElement>offsetParentEl.offsetParent;\n }\n\n return offsetParentEl || document.documentElement;\n }\n}\n\nconst positionService = new Positioning();\n\nexport function positionElements(\n hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean): void {\n const pos = positionService.positionElements(hostElement, targetElement, placement, appendToBody);\n\n targetElement.style.top = `${pos.top}px`;\n targetElement.style.left = `${pos.left}px`;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"Positioning":{"__symbolic":"class","members":{"position":[{"__symbolic":"method"}],"offset":[{"__symbolic":"method"}],"positionElements":[{"__symbolic":"method"}],"getStyle":[{"__symbolic":"method"}],"isStaticPositioned":[{"__symbolic":"method"}],"offsetParent":[{"__symbolic":"method"}]}},"positionElements":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"Positioning":{"__symbolic":"class","members":{"position":[{"__symbolic":"method"}],"offset":[{"__symbolic":"method"}],"positionElements":[{"__symbolic":"method"}],"getStyle":[{"__symbolic":"method"}],"isStaticPositioned":[{"__symbolic":"method"}],"offsetParent":[{"__symbolic":"method"}]}},"positionElements":{"__symbolic":"function"}}}]
|
1
|
+
[{"__symbolic":"module","version":3,"metadata":{"Positioning":{"__symbolic":"class","members":{"position":[{"__symbolic":"method"}],"offset":[{"__symbolic":"method"}],"positionElements":[{"__symbolic":"method"}],"autoPosition":[{"__symbolic":"method"}],"getAllStyles":[{"__symbolic":"method"}],"getStyle":[{"__symbolic":"method"}],"isStaticPositioned":[{"__symbolic":"method"}],"offsetParent":[{"__symbolic":"method"}]}},"positionElements":{"__symbolic":"function"}}},{"__symbolic":"module","version":1,"metadata":{"Positioning":{"__symbolic":"class","members":{"position":[{"__symbolic":"method"}],"offset":[{"__symbolic":"method"}],"positionElements":[{"__symbolic":"method"}],"autoPosition":[{"__symbolic":"method"}],"getAllStyles":[{"__symbolic":"method"}],"getStyle":[{"__symbolic":"method"}],"isStaticPositioned":[{"__symbolic":"method"}],"offsetParent":[{"__symbolic":"method"}]}},"positionElements":{"__symbolic":"function"}}}]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Injectable, ElementRef } from '@angular/core';
|
2
2
|
import { positionElements } from './ng-positioning';
|
3
|
-
|
3
|
+
var PositioningService = (function () {
|
4
4
|
function PositioningService() {
|
5
5
|
}
|
6
6
|
PositioningService.prototype.position = function (options) {
|
@@ -24,4 +24,5 @@ export var PositioningService = (function () {
|
|
24
24
|
PositioningService.ctorParameters = function () { return []; };
|
25
25
|
return PositioningService;
|
26
26
|
}());
|
27
|
+
export { PositioningService };
|
27
28
|
//# sourceMappingURL=positioning.service.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/positioning/positioning.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAA,EAAY,UAAA,EAAW,MAAO,eAAA,CAAgB;AACvD,OAAO,EAAE,gBAAA,EAAiB,MAAO,kBAAA,CAAmB;AAkCpD;IAAA;IA4BA,CAAC;IA3BQ,qCAAQ,GAAf,UAAgB,OAA2B;QAClC,IAAA,yBAAO,EAAE,uBAAM,EAAE,+BAAU,EAAE,mCAAY,CAAY;QAC5D,gBAAgB,CACd,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAC5B,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAC7B,UAAU,EACV,YAAY,CAAC,CAAC;IAClB,CAAC;IAEO,4CAAe,GAAvB,UAAwB,OAA0C;QAChE,kCAAkC;QAClC,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAgB,CAAC;QACxD,CAAC;QAED,EAAE,CAAC,CAAC,OAAO,YAAY,UAAU,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;QAC/B,CAAC;QAED,MAAM,CAAC,OAAsB,CAAC;IAChC,CAAC;IACI,6BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,iCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,yBAAC;CA5BD,AA4BC,IAAA;SA5BY,kBAAkB","file":"positioning.service.js","sourceRoot":"","sourcesContent":["import { Injectable, ElementRef } from '@angular/core';\nimport { positionElements } from './ng-positioning';\n\nexport interface PositioningOptions {\n /** The DOM element, ElementRef, or a selector string of an element which will be moved */\n element?: HTMLElement | ElementRef | string;\n\n /** The DOM element, ElementRef, or a selector string of an element which the element will be attached to */\n target?: HTMLElement | ElementRef | string;\n\n /**\n * A string of the form 'vert-attachment horiz-attachment' or 'placement'\n * - placement can be \"top\", \"bottom\", \"left\", \"right\"\n * not yet supported:\n * - vert-attachment can be any of 'top', 'middle', 'bottom'\n * - horiz-attachment can be any of 'left', 'center', 'right'\n */\n attachment?: string;\n\n /** A string similar to `attachment`. The one difference is that, if it's not provided, `targetAttachment` will assume the mirror image of `attachment`. */\n targetAttachment?: string;\n\n /** A string of the form 'vert-offset horiz-offset'\n * - vert-offset and horiz-offset can be of the form \"20px\" or \"55%\"\n */\n offset?: string;\n\n /** A string similar to `offset`, but referring to the offset of the target */\n targetOffset?: string;\n\n /** If true component will be attached to body */\n appendToBody?: boolean;\n}\n\n\nexport class PositioningService {\n public position(options: PositioningOptions): void {\n const {element, target, attachment, appendToBody} = options;\n positionElements(\n this._getHtmlElement(target),\n this._getHtmlElement(element),\n attachment,\n appendToBody);\n }\n\n private _getHtmlElement(element: HTMLElement | ElementRef | string): HTMLElement {\n // it means that we got a selector\n if (typeof element === 'string') {\n return document.querySelector(element) as HTMLElement;\n }\n\n if (element instanceof ElementRef) {\n return element.nativeElement;\n }\n\n return element as HTMLElement;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
[{"__symbolic":"module","version":3,"metadata":{"PositioningService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"position":[{"__symbolic":"method"}],"_getHtmlElement":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"PositioningService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"position":[{"__symbolic":"method"}],"_getHtmlElement":[{"__symbolic":"method"}]}}}}]
|
1
|
+
[{"__symbolic":"module","version":3,"metadata":{"PositioningOptions":{"__symbolic":"interface"},"PositioningService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"position":[{"__symbolic":"method"}],"_getHtmlElement":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"PositioningOptions":{"__symbolic":"interface"},"PositioningService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"position":[{"__symbolic":"method"}],"_getHtmlElement":[{"__symbolic":"method"}]}}}}]
|
@@ -3,7 +3,7 @@ import { ProgressDirective } from './progress.directive';
|
|
3
3
|
import { isBs3 } from '../utils/ng2-bootstrap-config';
|
4
4
|
// todo: number pipe
|
5
5
|
// todo: use query from progress?
|
6
|
-
|
6
|
+
var BarComponent = (function () {
|
7
7
|
function BarComponent(progress) {
|
8
8
|
this.percent = 0;
|
9
9
|
this.progress = progress;
|
@@ -71,4 +71,5 @@ export var BarComponent = (function () {
|
|
71
71
|
};
|
72
72
|
return BarComponent;
|
73
73
|
}());
|
74
|
+
export { BarComponent };
|
74
75
|
//# sourceMappingURL=bar.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/bar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAA,EAAW,IAAA,EAAM,WAAA,EAAa,KAAA,EAAyB,MAAO,eAAA,CAAgB;AAEvF,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AACzD,OAAO,EAAE,KAAA,EAAM,MAAO,+BAAA,CAAgC;AAEtD,oBAAoB;AACpB,iCAAiC;AAEjC;IAgCE,sBAAoB,QAA0B;QANvC,YAAO,GAAU,CAAC,CAAC;QAOxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IA3BD,sBAAW,+BAAK;QAFhB,oCAAoC;aAEpC;YACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;aAMD,UAAiB,CAAQ;YACvB,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAClB,MAAM,CAAC;YACT,CAAC;YACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YAChB,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC/B,CAAC;;;OAZA;IACA,sBAAI,qCAAW;aAAf;YACC,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxC,CAAC;;;OAAA;IAAA,CAAC;IAUF,sBAAW,+BAAK;aAAhB;YACE,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;;;OAAA;IAWM,+BAAQ,GAAf;QACE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IA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SAhFY,YAAY","file":"bar.component.js","sourceRoot":"","sourcesContent":["import { Component, Host, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { ProgressDirective } from './progress.directive';\nimport { isBs3 } from '../utils/ng2-bootstrap-config';\n\n// todo: number pipe\n// todo: use query from progress?\n\nexport class BarComponent implements OnInit, OnDestroy {\n public max:number;\n\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n public type:string;\n /** current value of progress bar */\n \n public get value():number {\n return this._value;\n }\n get setBarWidth(){\n this.recalculatePercentage();\n return this.isBs3 ? '' : this.percent;\n };\n\n public set value(v:number) {\n if (!v && v !== 0) {\n return;\n }\n this._value = v;\n this.recalculatePercentage();\n }\n\n public get isBs3(): boolean {\n return isBs3();\n }\n public percent:number = 0;\n public transition:string;\n public progress:ProgressDirective;\n\n protected _value:number;\n\n public constructor( progress:ProgressDirective) {\n this.progress = progress;\n }\n\n public ngOnInit():void {\n this.progress.addBar(this);\n }\n\n public ngOnDestroy():void {\n this.progress.removeBar(this);\n }\n\n public recalculatePercentage():void {\n this.percent = +(100 * this.value / this.progress.max).toFixed(2);\n\n let totalPercentage = this.progress.bars.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 }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'bar',\n template: `\n <div class=\"progress-bar\"\n style=\"min-width: 0;\"\n role=\"progressbar\"\n [ngClass]=\"type && 'progress-bar-' + type + ' bg-' + type\"\n [ngStyle]=\"{width: (isBs3 ? (percent < 100 ? percent : 100) + '%' : '100%'), transition: transition}\"\n aria-valuemin=\"0\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuetext]=\"percent.toFixed(0) + '%'\"\n [attr.aria-valuemax]=\"max\"><ng-content></ng-content></div>\n`\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ProgressDirective, decorators: [{ type: Host }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'type': [{ type: Input },],\n'value': [{ type: Input },],\n'setBarWidth': [{ type: HostBinding, args: ['style.width.%', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/progressbar/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { BarComponent } from './bar.component';\nexport { ProgressDirective } from './progress.directive';\nexport { ProgressbarComponent } from './progressbar.component';\nexport { ProgressbarModule } from './progressbar.module';\nexport { ProgressbarConfig } from './progressbar.config';\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Directive, HostBinding, Input } from '@angular/core';
|
2
2
|
// todo: progress element conflict with bootstrap.css
|
3
3
|
// todo: need hack: replace host element with div
|
4
|
-
|
4
|
+
var ProgressDirective = (function () {
|
5
5
|
function ProgressDirective() {
|
6
6
|
this.addClass = true;
|
7
7
|
this.bars = [];
|
@@ -42,4 +42,5 @@ export var ProgressDirective = (function () {
|
|
42
42
|
};
|
43
43
|
return ProgressDirective;
|
44
44
|
}());
|
45
|
+
export { ProgressDirective };
|
45
46
|
//# sourceMappingURL=progress.directive.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/progress.directive.ts"],"names":[],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IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,UAAU,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACrE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,gBAAgB,EAAG,EAAE,EAAE;KAC/D,CAAC;IACF,wBAAC;CA7CD,AA6CC,IAAA;SA7CY,iBAAiB","file":"progress.directive.js","sourceRoot":"","sourcesContent":["import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\n\n// todo: progress element conflict with bootstrap.css\n// todo: need hack: replace host element with div\n\nexport class ProgressDirective {\n /** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */\n public animate:boolean;\n\n /** maximum total value of progress element */\n \n \n public get max():number {\n return this._max;\n }\n\n public set max(v:number) {\n this._max = v;\n this.bars.forEach((bar:BarComponent) => {\n bar.recalculatePercentage();\n });\n }\n\n public addClass:boolean = true;\n\n public bars:any[] = [];\n\n protected _max:number = 100;\n\n public addBar(bar:BarComponent):void {\n if (!this.animate) {\n bar.transition = 'none';\n }\n this.bars.push(bar);\n }\n\n public removeBar(bar:BarComponent):void {\n this.bars.splice(this.bars.indexOf(bar), 1);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: 'bs-progress, [progress]'}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'animate': [{ type: Input },],\n'max': [{ type: HostBinding, args: ['attr.max', ] },{ type: Input },],\n'addClass': [{ type: HostBinding, args: ['class.progress', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Component, Input } from '@angular/core';
|
2
2
|
import { ProgressbarConfig } from './progressbar.config';
|
3
3
|
import { isBs3 } from '../utils';
|
4
|
-
|
4
|
+
var ProgressbarComponent = (function () {
|
5
5
|
function ProgressbarComponent(config) {
|
6
6
|
this.isStacked = false;
|
7
7
|
Object.assign(this, config);
|
@@ -42,4 +42,5 @@ export var ProgressbarComponent = (function () {
|
|
42
42
|
};
|
43
43
|
return ProgressbarComponent;
|
44
44
|
}());
|
45
|
+
export { ProgressbarComponent };
|
45
46
|
//# sourceMappingURL=progressbar.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/progressbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAA,EAAW,KAAA,EAAM,MAAO,eAAA,CAAgB;AACjD,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AACzD,OAAO,EAAE,KAAA,EAAM,MAAO,UAAA,CAAW;AAGjC;IAkBE,8BAAmB,MAAyB;QANrC,cAAS,GAAY,KAAK,CAAC;QAOhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC;IAZA,sBAAW,uCAAK;QADjB,0HAA0H;aACzH,UAAiB,KAAqB;YACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAAA,CAAC;IAGF,sBAAW,uCAAK;aAAhB;YACE,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;;;OAAA;IAKI,+BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oBACxB,QAAQ,EAAE,aAAa;oBACvB,QAAQ,EAAE,oZAST;oBACD,MAAM,EAAE,CAAC,8CAIR,CAAC;iBACH,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,mCAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,iBAAiB,GAAG;KAC1B,EAF6F,CAE7F,CAAC;IACK,mCAAc,GAA2C;QAChE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC7B,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC1B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;KAC1B,CAAC;IACF,2BAAC;CAnDD,AAmDC,IAAA;SAnDY,oBAAoB","file":"progressbar.component.js","sourceRoot":"","sourcesContent":["import { Component, Input } from '@angular/core';\nimport { ProgressbarConfig } from './progressbar.config';\nimport { isBs3 } from '../utils';\n\n\nexport class ProgressbarComponent {\n /** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */\n public animate:boolean;\n /** maximum total value of progress element */\n public max:number;\n /** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */\n public type:string;\n /** current value of progress bar. Could be a number or array of objects like {\"value\":15,\"type\":\"info\",\"label\":\"15 %\"} */\n public set value(value: number | any[]) {\n this.isStacked = Array.isArray(value);\n this._value = value;\n };\n public isStacked: boolean = false;\n public _value: number | any[];\n public get isBs3(): boolean {\n return isBs3();\n }\n\n public constructor(config: ProgressbarConfig) {\n Object.assign(this, config);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'progressbar',\n template: `\n <div progress [animate]=\"animate\" [max]=\"max\" [style.width]=\"!isBs3 ? '100%' : 'auto'\">\n <bar [type]=\"type\" [value]=\"_value\" *ngIf=\"!isStacked\">\n <ng-content></ng-content>\n </bar>\n <template [ngIf]=\"isStacked\">\n <bar *ngFor=\"let item of _value\" [type]=\"item.type\" [value]=\"item.value\">{{item.label}}</bar>\n </template>\n </div>\n `,\n styles: [`\n :host {\n width: 100%;\n }\n `]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ProgressbarConfig, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'animate': [{ type: Input },],\n'max': [{ type: Input },],\n'type': [{ type: Input },],\n'value': [{ type: Input },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Injectable } from '@angular/core';
|
2
|
-
|
2
|
+
var ProgressbarConfig = (function () {
|
3
3
|
function ProgressbarConfig() {
|
4
4
|
/** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */
|
5
5
|
this.animate = true;
|
@@ -13,4 +13,5 @@ export var ProgressbarConfig = (function () {
|
|
13
13
|
ProgressbarConfig.ctorParameters = function () { return []; };
|
14
14
|
return ProgressbarConfig;
|
15
15
|
}());
|
16
|
+
export { ProgressbarConfig };
|
16
17
|
//# sourceMappingURL=progressbar.config.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/progressbar.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAG3C;IAAA;QACE,qGAAqG;QAC9F,YAAO,GAAY,IAAI,CAAC;QAC/B,8CAA8C;QACvC,QAAG,GAAW,GAAG,CAAC;IAO3B,CAAC;IANM,4BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,gCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,wBAAC;CAXD,AAWC,IAAA;SAXY,iBAAiB","file":"progressbar.config.js","sourceRoot":"","sourcesContent":["import { Injectable } from '@angular/core';\n\n\nexport class ProgressbarConfig {\n /** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */\n public animate: Boolean = true;\n /** maximum total value of progress element */\n public max: number = 100;\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
@@ -4,7 +4,7 @@ import { BarComponent } from './bar.component';
|
|
4
4
|
import { ProgressDirective } from './progress.directive';
|
5
5
|
import { ProgressbarComponent } from './progressbar.component';
|
6
6
|
import { ProgressbarConfig } from './progressbar.config';
|
7
|
-
|
7
|
+
var ProgressbarModule = (function () {
|
8
8
|
function ProgressbarModule() {
|
9
9
|
}
|
10
10
|
ProgressbarModule.forRoot = function () {
|
@@ -21,4 +21,5 @@ export var ProgressbarModule = (function () {
|
|
21
21
|
ProgressbarModule.ctorParameters = function () { return []; };
|
22
22
|
return ProgressbarModule;
|
23
23
|
}());
|
24
|
+
export { ProgressbarModule };
|
24
25
|
//# sourceMappingURL=progressbar.module.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/progressbar/progressbar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAA,EAAa,MAAO,iBAAA,CAAkB;AAC/C,OAAO,EAAE,QAAA,EAA8B,MAAO,eAAA,CAAgB;AAE9D,OAAO,EAAE,YAAA,EAAa,MAAO,iBAAA,CAAkB;AAC/C,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AACzD,OAAO,EAAE,oBAAA,EAAqB,MAAO,yBAAA,CAA0B;AAC/D,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AAGzD;IAAA;IAcA,CAAC;IAbe,yBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,iBAAiB,CAAC,EAAC,CAAC;IACvE,CAAC;IACI,4BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,CAAC;oBACrE,OAAO,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,CAAC;iBACjE,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,gCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,wBAAC;CAdD,AAcC,IAAA;SAdY,iBAAiB","file":"progressbar.module.js","sourceRoot":"","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\nimport { ProgressDirective } from './progress.directive';\nimport { ProgressbarComponent } from './progressbar.component';\nimport { ProgressbarConfig } from './progressbar.config';\n\n\nexport class ProgressbarModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: ProgressbarModule, providers: [ProgressbarConfig]};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [ProgressDirective, BarComponent, ProgressbarComponent],\n exports: [ProgressDirective, BarComponent, ProgressbarComponent]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/rating/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../.tmp/rating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { RatingComponent } from './rating.component';\nexport { RatingModule } from './rating.module';\n"]}
|
@@ -5,7 +5,7 @@ export var RATING_CONTROL_VALUE_ACCESSOR = {
|
|
5
5
|
useExisting: forwardRef(function () { return RatingComponent; }),
|
6
6
|
multi: true
|
7
7
|
};
|
8
|
-
|
8
|
+
var RatingComponent = (function () {
|
9
9
|
function RatingComponent() {
|
10
10
|
/** number of icons */
|
11
11
|
this.max = 5;
|
@@ -107,4 +107,5 @@ export var RatingComponent = (function () {
|
|
107
107
|
};
|
108
108
|
return RatingComponent;
|
109
109
|
}());
|
110
|
+
export { RatingComponent };
|
110
111
|
//# sourceMappingURL=rating.component.js.map
|