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.
Files changed (601) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +25 -10
  3. package/accordion/accordion-group.component.js +3 -2
  4. package/accordion/accordion-group.component.js.map +1 -1
  5. package/accordion/accordion-group.component.metadata.json +1 -1
  6. package/accordion/accordion.component.js +2 -1
  7. package/accordion/accordion.component.js.map +1 -1
  8. package/accordion/accordion.config.js +2 -1
  9. package/accordion/accordion.config.js.map +1 -1
  10. package/accordion/accordion.module.js +2 -1
  11. package/accordion/accordion.module.js.map +1 -1
  12. package/accordion/index.js.map +1 -1
  13. package/alert/alert.component.js +4 -3
  14. package/alert/alert.component.js.map +1 -1
  15. package/alert/alert.config.js +2 -1
  16. package/alert/alert.config.js.map +1 -1
  17. package/alert/alert.module.js +2 -1
  18. package/alert/alert.module.js.map +1 -1
  19. package/alert/index.js.map +1 -1
  20. package/bs-moment/LICENSE +26 -0
  21. package/bs-moment/format-functions.d.ts +13 -0
  22. package/bs-moment/format-functions.js +53 -0
  23. package/bs-moment/format-functions.js.map +1 -0
  24. package/bs-moment/format-functions.metadata.json +1 -0
  25. package/bs-moment/format.d.ts +6 -0
  26. package/bs-moment/format.js +43 -0
  27. package/bs-moment/format.js.map +1 -0
  28. package/bs-moment/format.metadata.json +1 -0
  29. package/bs-moment/i18n/ar.d.ts +2 -0
  30. package/bs-moment/i18n/ar.js +131 -0
  31. package/bs-moment/i18n/ar.js.map +1 -0
  32. package/bs-moment/i18n/ar.metadata.json +1 -0
  33. package/bs-moment/i18n/de.d.ts +2 -0
  34. package/bs-moment/i18n/de.js +67 -0
  35. package/bs-moment/i18n/de.js.map +1 -0
  36. package/bs-moment/i18n/de.metadata.json +1 -0
  37. package/bs-moment/i18n/en-gb.d.ts +2 -0
  38. package/bs-moment/i18n/en-gb.js +60 -0
  39. package/bs-moment/i18n/en-gb.js.map +1 -0
  40. package/bs-moment/i18n/en-gb.metadata.json +1 -0
  41. package/bs-moment/i18n/es-do.d.ts +2 -0
  42. package/bs-moment/i18n/es-do.js +61 -0
  43. package/bs-moment/i18n/es-do.js.map +1 -0
  44. package/bs-moment/i18n/es-do.metadata.json +1 -0
  45. package/bs-moment/i18n/es-us.d.ts +2 -0
  46. package/bs-moment/i18n/es-us.js +54 -0
  47. package/bs-moment/i18n/es-us.js.map +1 -0
  48. package/bs-moment/i18n/es-us.metadata.json +1 -0
  49. package/bs-moment/i18n/es.d.ts +2 -0
  50. package/bs-moment/i18n/es.js +62 -0
  51. package/bs-moment/i18n/es.js.map +1 -0
  52. package/bs-moment/i18n/es.metadata.json +1 -0
  53. package/bs-moment/i18n/fr.d.ts +2 -0
  54. package/bs-moment/i18n/fr.js +70 -0
  55. package/bs-moment/i18n/fr.js.map +1 -0
  56. package/bs-moment/i18n/fr.metadata.json +1 -0
  57. package/bs-moment/i18n/hi.d.ts +2 -0
  58. package/bs-moment/i18n/hi.js +119 -0
  59. package/bs-moment/i18n/hi.js.map +1 -0
  60. package/bs-moment/i18n/hi.metadata.json +1 -0
  61. package/bs-moment/i18n/it.d.ts +2 -0
  62. package/bs-moment/i18n/it.js +27 -0
  63. package/bs-moment/i18n/it.js.map +1 -0
  64. package/bs-moment/i18n/it.metadata.json +1 -0
  65. package/bs-moment/i18n/ja.d.ts +2 -0
  66. package/bs-moment/i18n/ja.js +65 -0
  67. package/bs-moment/i18n/ja.js.map +1 -0
  68. package/bs-moment/i18n/ja.metadata.json +1 -0
  69. package/bs-moment/i18n/ko.d.ts +2 -0
  70. package/bs-moment/i18n/ko.js +72 -0
  71. package/bs-moment/i18n/ko.js.map +1 -0
  72. package/bs-moment/i18n/ko.metadata.json +1 -0
  73. package/bs-moment/i18n/nl-be.d.ts +2 -0
  74. package/bs-moment/i18n/nl-be.js +73 -0
  75. package/bs-moment/i18n/nl-be.js.map +1 -0
  76. package/bs-moment/i18n/nl-be.metadata.json +1 -0
  77. package/bs-moment/i18n/nl.d.ts +2 -0
  78. package/bs-moment/i18n/nl.js +73 -0
  79. package/bs-moment/i18n/nl.js.map +1 -0
  80. package/bs-moment/i18n/nl.metadata.json +1 -0
  81. package/bs-moment/i18n/pl.d.ts +2 -0
  82. package/bs-moment/i18n/pl.js +77 -0
  83. package/bs-moment/i18n/pl.js.map +1 -0
  84. package/bs-moment/i18n/pl.metadata.json +1 -0
  85. package/bs-moment/i18n/pt-br.d.ts +2 -0
  86. package/bs-moment/i18n/pt-br.js +39 -0
  87. package/bs-moment/i18n/pt-br.js.map +1 -0
  88. package/bs-moment/i18n/pt-br.metadata.json +1 -0
  89. package/bs-moment/i18n/ru.d.ts +2 -0
  90. package/bs-moment/i18n/ru.js +120 -0
  91. package/bs-moment/i18n/ru.js.map +1 -0
  92. package/bs-moment/i18n/ru.metadata.json +1 -0
  93. package/bs-moment/i18n/zh-cn.d.ts +2 -0
  94. package/bs-moment/i18n/zh-cn.js +107 -0
  95. package/bs-moment/i18n/zh-cn.js.map +1 -0
  96. package/bs-moment/i18n/zh-cn.metadata.json +1 -0
  97. package/bs-moment/index.d.ts +1 -0
  98. package/bs-moment/index.js +2 -0
  99. package/bs-moment/index.js.map +1 -0
  100. package/bs-moment/index.metadata.json +1 -0
  101. package/bs-moment/locale/en.d.ts +0 -0
  102. package/bs-moment/locale/en.js +14 -0
  103. package/bs-moment/locale/en.js.map +1 -0
  104. package/bs-moment/locale/index.d.ts +1 -0
  105. package/bs-moment/locale/index.js +2 -0
  106. package/bs-moment/locale/index.js.map +1 -0
  107. package/bs-moment/locale/locale.class.d.ts +60 -0
  108. package/bs-moment/locale/locale.class.js +117 -0
  109. package/bs-moment/locale/locale.class.js.map +1 -0
  110. package/bs-moment/locale/locale.class.metadata.json +1 -0
  111. package/bs-moment/locale/locale.defaults.d.ts +8 -0
  112. package/bs-moment/locale/locale.defaults.js +23 -0
  113. package/bs-moment/locale/locale.defaults.js.map +1 -0
  114. package/bs-moment/locale/locale.defaults.metadata.json +1 -0
  115. package/bs-moment/locale/locales.service.d.ts +8 -0
  116. package/bs-moment/locale/locales.service.js +81 -0
  117. package/bs-moment/locale/locales.service.js.map +1 -0
  118. package/bs-moment/locale/locales.service.metadata.json +1 -0
  119. package/bs-moment/types.d.ts +11 -0
  120. package/bs-moment/types.js +1 -0
  121. package/bs-moment/types.js.map +1 -0
  122. package/bs-moment/types.metadata.json +1 -0
  123. package/bs-moment/units/day-of-month.d.ts +0 -0
  124. package/bs-moment/units/day-of-month.js +6 -0
  125. package/bs-moment/units/day-of-month.js.map +1 -0
  126. package/bs-moment/units/day-of-week.d.ts +3 -0
  127. package/bs-moment/units/day-of-week.js +28 -0
  128. package/bs-moment/units/day-of-week.js.map +1 -0
  129. package/bs-moment/units/day-of-week.metadata.json +1 -0
  130. package/bs-moment/units/day-of-year.d.ts +2 -0
  131. package/bs-moment/units/day-of-year.js +20 -0
  132. package/bs-moment/units/day-of-year.js.map +1 -0
  133. package/bs-moment/units/day-of-year.metadata.json +1 -0
  134. package/bs-moment/units/hour.d.ts +0 -0
  135. package/bs-moment/units/hour.js +49 -0
  136. package/bs-moment/units/hour.js.map +1 -0
  137. package/bs-moment/units/index.d.ts +10 -0
  138. package/bs-moment/units/index.js +11 -0
  139. package/bs-moment/units/index.js.map +1 -0
  140. package/bs-moment/units/minute.d.ts +0 -0
  141. package/bs-moment/units/minute.js +6 -0
  142. package/bs-moment/units/minute.js.map +1 -0
  143. package/bs-moment/units/month.d.ts +1 -0
  144. package/bs-moment/units/month.js +23 -0
  145. package/bs-moment/units/month.js.map +1 -0
  146. package/bs-moment/units/month.metadata.json +1 -0
  147. package/bs-moment/units/second.d.ts +0 -0
  148. package/bs-moment/units/second.js +6 -0
  149. package/bs-moment/units/second.js.map +1 -0
  150. package/bs-moment/units/week-calendar-utils.d.ts +9 -0
  151. package/bs-moment/units/week-calendar-utils.js +70 -0
  152. package/bs-moment/units/week-calendar-utils.js.map +1 -0
  153. package/bs-moment/units/week-calendar-utils.metadata.json +1 -0
  154. package/bs-moment/units/week.d.ts +3 -0
  155. package/bs-moment/units/week.js +15 -0
  156. package/bs-moment/units/week.js.map +1 -0
  157. package/bs-moment/units/week.metadata.json +1 -0
  158. package/bs-moment/units/year.d.ts +2 -0
  159. package/bs-moment/units/year.js +23 -0
  160. package/bs-moment/units/year.js.map +1 -0
  161. package/bs-moment/units/year.metadata.json +1 -0
  162. package/bs-moment/utils/date-compare.d.ts +7 -0
  163. package/bs-moment/utils/date-compare.js +50 -0
  164. package/bs-moment/utils/date-compare.js.map +1 -0
  165. package/bs-moment/utils/date-compare.metadata.json +1 -0
  166. package/bs-moment/utils/date-getters.d.ts +14 -0
  167. package/bs-moment/utils/date-getters.js +61 -0
  168. package/bs-moment/utils/date-getters.js.map +1 -0
  169. package/bs-moment/utils/date-getters.metadata.json +1 -0
  170. package/bs-moment/utils/date-setters.d.ts +4 -0
  171. package/bs-moment/utils/date-setters.js +23 -0
  172. package/bs-moment/utils/date-setters.js.map +1 -0
  173. package/bs-moment/utils/date-setters.metadata.json +1 -0
  174. package/bs-moment/utils/start-end-of.d.ts +3 -0
  175. package/bs-moment/utils/start-end-of.js +35 -0
  176. package/bs-moment/utils/start-end-of.js.map +1 -0
  177. package/bs-moment/utils/start-end-of.metadata.json +1 -0
  178. package/bs-moment/utils/type-checks.d.ts +7 -0
  179. package/bs-moment/utils/type-checks.js +30 -0
  180. package/bs-moment/utils/type-checks.js.map +1 -0
  181. package/bs-moment/utils/type-checks.metadata.json +1 -0
  182. package/bs-moment/utils.d.ts +4 -0
  183. package/bs-moment/utils.js +24 -0
  184. package/bs-moment/utils.js.map +1 -0
  185. package/bs-moment/utils.metadata.json +1 -0
  186. package/bundles/ngx-bootstrap.umd.js +8786 -20532
  187. package/bundles/ngx-bootstrap.umd.js.map +1 -1
  188. package/bundles/ngx-bootstrap.umd.min.js +2 -2
  189. package/buttons/button-checkbox.directive.js +2 -1
  190. package/buttons/button-checkbox.directive.js.map +1 -1
  191. package/buttons/button-radio.directive.js +2 -1
  192. package/buttons/button-radio.directive.js.map +1 -1
  193. package/buttons/buttons.module.js +2 -1
  194. package/buttons/buttons.module.js.map +1 -1
  195. package/buttons/index.js.map +1 -1
  196. package/carousel/carousel.component.d.ts +3 -2
  197. package/carousel/carousel.component.js +31 -12
  198. package/carousel/carousel.component.js.map +1 -1
  199. package/carousel/carousel.component.metadata.json +1 -1
  200. package/carousel/carousel.config.js +2 -1
  201. package/carousel/carousel.config.js.map +1 -1
  202. package/carousel/carousel.module.js +2 -1
  203. package/carousel/carousel.module.js.map +1 -1
  204. package/carousel/index.js.map +1 -1
  205. package/carousel/slide.component.js +2 -1
  206. package/carousel/slide.component.js.map +1 -1
  207. package/collapse/collapse.directive.js +3 -1
  208. package/collapse/collapse.directive.js.map +1 -1
  209. package/collapse/collapse.module.js +2 -1
  210. package/collapse/collapse.module.js.map +1 -1
  211. package/collapse/index.js.map +1 -1
  212. package/component-loader/bs-component-ref.class.js +2 -1
  213. package/component-loader/bs-component-ref.class.js.map +1 -1
  214. package/component-loader/bs-component-ref.class.metadata.json +1 -1
  215. package/component-loader/component-loader.class.d.ts +10 -9
  216. package/component-loader/component-loader.class.js +56 -12
  217. package/component-loader/component-loader.class.js.map +1 -1
  218. package/component-loader/component-loader.class.metadata.json +1 -1
  219. package/component-loader/component-loader.factory.js +2 -1
  220. package/component-loader/component-loader.factory.js.map +1 -1
  221. package/component-loader/content-ref.class.js +2 -1
  222. package/component-loader/content-ref.class.js.map +1 -1
  223. package/component-loader/index.js.map +1 -1
  224. package/component-loader/listen-options.model.d.ts +9 -0
  225. package/component-loader/listen-options.model.js +1 -0
  226. package/component-loader/listen-options.model.js.map +1 -0
  227. package/component-loader/listen-options.model.metadata.json +1 -0
  228. package/datepicker/base/bs-datepicker-container.d.ts +26 -0
  229. package/datepicker/base/bs-datepicker-container.js +41 -0
  230. package/datepicker/base/bs-datepicker-container.js.map +1 -0
  231. package/datepicker/base/bs-datepicker-container.metadata.json +1 -0
  232. package/datepicker/bs-datepicker-input.directive.d.ts +21 -0
  233. package/datepicker/bs-datepicker-input.directive.js +79 -0
  234. package/datepicker/bs-datepicker-input.directive.js.map +1 -0
  235. package/datepicker/bs-datepicker-input.directive.metadata.json +1 -0
  236. package/datepicker/bs-datepicker.component.d.ts +85 -0
  237. package/datepicker/bs-datepicker.component.js +184 -0
  238. package/datepicker/bs-datepicker.component.js.map +1 -0
  239. package/datepicker/bs-datepicker.component.metadata.json +1 -0
  240. package/datepicker/bs-datepicker.config.d.ts +36 -0
  241. package/datepicker/bs-datepicker.config.js +39 -0
  242. package/datepicker/bs-datepicker.config.js.map +1 -0
  243. package/datepicker/bs-datepicker.config.metadata.json +1 -0
  244. package/datepicker/bs-datepicker.css +424 -0
  245. package/datepicker/bs-datepicker.css.map +16 -0
  246. package/datepicker/bs-datepicker.module.d.ts +5 -0
  247. package/datepicker/bs-datepicker.module.js +69 -0
  248. package/datepicker/bs-datepicker.module.js.map +1 -0
  249. package/datepicker/bs-datepicker.module.metadata.json +1 -0
  250. package/datepicker/bs-datepicker.scss +532 -0
  251. package/datepicker/bs-daterangepicker-input.directive.d.ts +21 -0
  252. package/datepicker/bs-daterangepicker-input.directive.js +87 -0
  253. package/datepicker/bs-daterangepicker-input.directive.js.map +1 -0
  254. package/datepicker/bs-daterangepicker-input.directive.metadata.json +1 -0
  255. package/datepicker/bs-daterangepicker.component.d.ts +84 -0
  256. package/datepicker/bs-daterangepicker.component.js +184 -0
  257. package/datepicker/bs-daterangepicker.component.js.map +1 -0
  258. package/datepicker/bs-daterangepicker.component.metadata.json +1 -0
  259. package/datepicker/date-formatter.d.ts +1 -1
  260. package/datepicker/date-formatter.js +5 -4
  261. package/datepicker/date-formatter.js.map +1 -1
  262. package/datepicker/datepicker-inner.component.d.ts +1 -0
  263. package/datepicker/datepicker-inner.component.js +5 -2
  264. package/datepicker/datepicker-inner.component.js.map +1 -1
  265. package/datepicker/datepicker-inner.component.metadata.json +1 -1
  266. package/datepicker/datepicker.component.d.ts +1 -1
  267. package/datepicker/datepicker.component.js +3 -2
  268. package/datepicker/datepicker.component.js.map +1 -1
  269. package/datepicker/datepicker.component.metadata.json +1 -1
  270. package/datepicker/datepicker.config.d.ts +1 -0
  271. package/datepicker/datepicker.config.js +3 -1
  272. package/datepicker/datepicker.config.js.map +1 -1
  273. package/datepicker/datepicker.module.js +2 -1
  274. package/datepicker/datepicker.module.js.map +1 -1
  275. package/datepicker/daypicker.component.js +4 -2
  276. package/datepicker/daypicker.component.js.map +1 -1
  277. package/datepicker/daypicker.component.metadata.json +1 -1
  278. package/datepicker/engine/calc-days-calendar.d.ts +2 -0
  279. package/datepicker/engine/calc-days-calendar.js +18 -0
  280. package/datepicker/engine/calc-days-calendar.js.map +1 -0
  281. package/datepicker/engine/calc-days-calendar.metadata.json +1 -0
  282. package/datepicker/engine/flag-days-calendar.d.ts +12 -0
  283. package/datepicker/engine/flag-days-calendar.js +71 -0
  284. package/datepicker/engine/flag-days-calendar.js.map +1 -0
  285. package/datepicker/engine/flag-days-calendar.metadata.json +1 -0
  286. package/datepicker/engine/flag-months-calendar.d.ts +10 -0
  287. package/datepicker/engine/flag-months-calendar.js +27 -0
  288. package/datepicker/engine/flag-months-calendar.js.map +1 -0
  289. package/datepicker/engine/flag-months-calendar.metadata.json +1 -0
  290. package/datepicker/engine/flag-years-calendar.d.ts +10 -0
  291. package/datepicker/engine/flag-years-calendar.js +29 -0
  292. package/datepicker/engine/flag-years-calendar.js.map +1 -0
  293. package/datepicker/engine/flag-years-calendar.metadata.json +1 -0
  294. package/datepicker/engine/format-days-calendar.d.ts +3 -0
  295. package/datepicker/engine/format-days-calendar.js +25 -0
  296. package/datepicker/engine/format-days-calendar.js.map +1 -0
  297. package/datepicker/engine/format-days-calendar.metadata.json +1 -0
  298. package/datepicker/engine/format-months-calendar.d.ts +2 -0
  299. package/datepicker/engine/format-months-calendar.js +20 -0
  300. package/datepicker/engine/format-months-calendar.js.map +1 -0
  301. package/datepicker/engine/format-months-calendar.metadata.json +1 -0
  302. package/datepicker/engine/format-years-calendar.d.ts +3 -0
  303. package/datepicker/engine/format-years-calendar.js +28 -0
  304. package/datepicker/engine/format-years-calendar.js.map +1 -0
  305. package/datepicker/engine/format-years-calendar.metadata.json +1 -0
  306. package/datepicker/engine/view-mode.d.ts +2 -0
  307. package/datepicker/engine/view-mode.js +4 -0
  308. package/datepicker/engine/view-mode.js.map +1 -0
  309. package/datepicker/engine/view-mode.metadata.json +1 -0
  310. package/datepicker/index.d.ts +4 -0
  311. package/datepicker/index.js +4 -8
  312. package/datepicker/index.js.map +1 -1
  313. package/datepicker/index.metadata.json +1 -1
  314. package/datepicker/models/index.d.ts +89 -0
  315. package/datepicker/models/index.js +9 -0
  316. package/datepicker/models/index.js.map +1 -0
  317. package/datepicker/models/index.metadata.json +1 -0
  318. package/datepicker/monthpicker.component.js +4 -2
  319. package/datepicker/monthpicker.component.js.map +1 -1
  320. package/datepicker/monthpicker.component.metadata.json +1 -1
  321. package/datepicker/reducer/_defaults.d.ts +2 -0
  322. package/datepicker/reducer/_defaults.js +5 -0
  323. package/datepicker/reducer/_defaults.js.map +1 -0
  324. package/datepicker/reducer/_defaults.metadata.json +1 -0
  325. package/datepicker/reducer/bs-datepicker.actions.d.ts +31 -0
  326. package/datepicker/reducer/bs-datepicker.actions.js +90 -0
  327. package/datepicker/reducer/bs-datepicker.actions.js.map +1 -0
  328. package/datepicker/reducer/bs-datepicker.actions.metadata.json +1 -0
  329. package/datepicker/reducer/bs-datepicker.effects.d.ts +33 -0
  330. package/datepicker/reducer/bs-datepicker.effects.js +173 -0
  331. package/datepicker/reducer/bs-datepicker.effects.js.map +1 -0
  332. package/datepicker/reducer/bs-datepicker.effects.metadata.json +1 -0
  333. package/datepicker/reducer/bs-datepicker.reducer.d.ts +3 -0
  334. package/datepicker/reducer/bs-datepicker.reducer.js +230 -0
  335. package/datepicker/reducer/bs-datepicker.reducer.js.map +1 -0
  336. package/datepicker/reducer/bs-datepicker.reducer.metadata.json +1 -0
  337. package/datepicker/reducer/bs-datepicker.state.d.ts +34 -0
  338. package/datepicker/reducer/bs-datepicker.state.js +14 -0
  339. package/datepicker/reducer/bs-datepicker.state.js.map +1 -0
  340. package/datepicker/reducer/bs-datepicker.state.metadata.json +1 -0
  341. package/datepicker/reducer/bs-datepicker.store.d.ts +5 -0
  342. package/datepicker/reducer/bs-datepicker.store.js +34 -0
  343. package/datepicker/reducer/bs-datepicker.store.js.map +1 -0
  344. package/datepicker/reducer/bs-datepicker.store.metadata.json +1 -0
  345. package/datepicker/themes/bs/bs-calendar-layout.component.d.ts +2 -0
  346. package/datepicker/themes/bs/bs-calendar-layout.component.js +16 -0
  347. package/datepicker/themes/bs/bs-calendar-layout.component.js.map +1 -0
  348. package/datepicker/themes/bs/bs-calendar-layout.component.metadata.json +1 -0
  349. package/datepicker/themes/bs/bs-current-date-view.component.d.ts +3 -0
  350. package/datepicker/themes/bs/bs-current-date-view.component.js +19 -0
  351. package/datepicker/themes/bs/bs-current-date-view.component.js.map +1 -0
  352. package/datepicker/themes/bs/bs-current-date-view.component.metadata.json +1 -0
  353. package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +8 -0
  354. package/datepicker/themes/bs/bs-custom-dates-view.component.js +21 -0
  355. package/datepicker/themes/bs/bs-custom-dates-view.component.js.map +1 -0
  356. package/datepicker/themes/bs/bs-custom-dates-view.component.metadata.json +1 -0
  357. package/datepicker/themes/bs/bs-datepicker-container.component.d.ts +20 -0
  358. package/datepicker/themes/bs/bs-datepicker-container.component.js +85 -0
  359. package/datepicker/themes/bs/bs-datepicker-container.component.js.map +1 -0
  360. package/datepicker/themes/bs/bs-datepicker-container.component.metadata.json +1 -0
  361. package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.d.ts +4 -0
  362. package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.js +29 -0
  363. package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.js.map +1 -0
  364. package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.metadata.json +1 -0
  365. package/datepicker/themes/bs/bs-datepicker-navigation-view.component.d.ts +9 -0
  366. package/datepicker/themes/bs/bs-datepicker-navigation-view.component.js +33 -0
  367. package/datepicker/themes/bs/bs-datepicker-navigation-view.component.js.map +1 -0
  368. package/datepicker/themes/bs/bs-datepicker-navigation-view.component.metadata.json +1 -0
  369. package/datepicker/themes/bs/bs-datepicker-view.html +61 -0
  370. package/datepicker/themes/bs/bs-daterangepicker-container.component.d.ts +21 -0
  371. package/datepicker/themes/bs/bs-daterangepicker-container.component.js +102 -0
  372. package/datepicker/themes/bs/bs-daterangepicker-container.component.js.map +1 -0
  373. package/datepicker/themes/bs/bs-daterangepicker-container.component.metadata.json +1 -0
  374. package/datepicker/themes/bs/bs-days-calendar-view.component.d.ts +14 -0
  375. package/datepicker/themes/bs/bs-days-calendar-view.component.js +43 -0
  376. package/datepicker/themes/bs/bs-days-calendar-view.component.js.map +1 -0
  377. package/datepicker/themes/bs/bs-days-calendar-view.component.metadata.json +1 -0
  378. package/datepicker/themes/bs/bs-months-calendar-view.component.d.ts +13 -0
  379. package/datepicker/themes/bs/bs-months-calendar-view.component.js +41 -0
  380. package/datepicker/themes/bs/bs-months-calendar-view.component.js.map +1 -0
  381. package/datepicker/themes/bs/bs-months-calendar-view.component.metadata.json +1 -0
  382. package/datepicker/themes/bs/bs-timepicker-view.component.d.ts +5 -0
  383. package/datepicker/themes/bs/bs-timepicker-view.component.js +19 -0
  384. package/datepicker/themes/bs/bs-timepicker-view.component.js.map +1 -0
  385. package/datepicker/themes/bs/bs-timepicker-view.component.metadata.json +1 -0
  386. package/datepicker/themes/bs/bs-years-calendar-view.component.d.ts +13 -0
  387. package/datepicker/themes/bs/bs-years-calendar-view.component.js +42 -0
  388. package/datepicker/themes/bs/bs-years-calendar-view.component.js.map +1 -0
  389. package/datepicker/themes/bs/bs-years-calendar-view.component.metadata.json +1 -0
  390. package/datepicker/utils/bs-calendar-utils.d.ts +5 -0
  391. package/datepicker/utils/bs-calendar-utils.js +22 -0
  392. package/datepicker/utils/bs-calendar-utils.js.map +1 -0
  393. package/datepicker/utils/bs-calendar-utils.metadata.json +1 -0
  394. package/datepicker/utils/matrix-utils.d.ts +9 -0
  395. package/datepicker/utils/matrix-utils.js +14 -0
  396. package/datepicker/utils/matrix-utils.js.map +1 -0
  397. package/datepicker/utils/matrix-utils.metadata.json +1 -0
  398. package/datepicker/utils/scss/mixins.css +2 -0
  399. package/datepicker/utils/scss/mixins.css.map +12 -0
  400. package/datepicker/utils/scss/mixins.scss +24 -0
  401. package/datepicker/utils/scss/variables.css +2 -0
  402. package/datepicker/utils/scss/variables.css.map +12 -0
  403. package/datepicker/utils/scss/variables.scss +36 -0
  404. package/datepicker/yearpicker.component.js +4 -2
  405. package/datepicker/yearpicker.component.js.map +1 -1
  406. package/datepicker/yearpicker.component.metadata.json +1 -1
  407. package/dropdown/bs-dropdown-container.component.d.ts +3 -2
  408. package/dropdown/bs-dropdown-container.component.js +19 -3
  409. package/dropdown/bs-dropdown-container.component.js.map +1 -1
  410. package/dropdown/bs-dropdown-container.component.metadata.json +1 -1
  411. package/dropdown/bs-dropdown-menu.directive.js +2 -1
  412. package/dropdown/bs-dropdown-menu.directive.js.map +1 -1
  413. package/dropdown/bs-dropdown-toggle.directive.js +2 -1
  414. package/dropdown/bs-dropdown-toggle.directive.js.map +1 -1
  415. package/dropdown/bs-dropdown.config.js +2 -1
  416. package/dropdown/bs-dropdown.config.js.map +1 -1
  417. package/dropdown/bs-dropdown.directive.d.ts +5 -0
  418. package/dropdown/bs-dropdown.directive.js +40 -2
  419. package/dropdown/bs-dropdown.directive.js.map +1 -1
  420. package/dropdown/bs-dropdown.directive.metadata.json +1 -1
  421. package/dropdown/bs-dropdown.module.js +2 -1
  422. package/dropdown/bs-dropdown.module.js.map +1 -1
  423. package/dropdown/bs-dropdown.state.js +2 -1
  424. package/dropdown/bs-dropdown.state.js.map +1 -1
  425. package/dropdown/index.js.map +1 -1
  426. package/index.d.ts +2 -1
  427. package/index.js +7 -3
  428. package/index.js.map +1 -1
  429. package/index.metadata.json +1 -1
  430. package/locale.d.ts +17 -0
  431. package/locale.js +18 -0
  432. package/locale.js.map +1 -0
  433. package/locale.metadata.json +1 -0
  434. package/mini-ngrx/LICENCE +21 -0
  435. package/mini-ngrx/index.js.map +1 -1
  436. package/mini-ngrx/index.metadata.json +1 -1
  437. package/mini-ngrx/state.class.js +17 -8
  438. package/mini-ngrx/state.class.js.map +1 -1
  439. package/mini-ngrx/state.class.metadata.json +1 -1
  440. package/mini-ngrx/store.class.js +20 -10
  441. package/mini-ngrx/store.class.js.map +1 -1
  442. package/mini-ngrx/store.class.metadata.json +1 -1
  443. package/modal/bs-modal.service.js +3 -2
  444. package/modal/bs-modal.service.js.map +1 -1
  445. package/modal/index.js.map +1 -1
  446. package/modal/modal-backdrop.component.js +4 -2
  447. package/modal/modal-backdrop.component.js.map +1 -1
  448. package/modal/modal-container.component.js +2 -1
  449. package/modal/modal-container.component.js.map +1 -1
  450. package/modal/modal-options.class.js +4 -2
  451. package/modal/modal-options.class.js.map +1 -1
  452. package/modal/modal.component.d.ts +2 -2
  453. package/modal/modal.component.js +3 -2
  454. package/modal/modal.component.js.map +1 -1
  455. package/modal/modal.module.js +2 -1
  456. package/modal/modal.module.js.map +1 -1
  457. package/ng2-bootstrap.js +2 -1
  458. package/ng2-bootstrap.js.map +1 -1
  459. package/package.json +30 -34
  460. package/pagination/index.js.map +1 -1
  461. package/pagination/pager.component.js +3 -2
  462. package/pagination/pager.component.js.map +1 -1
  463. package/pagination/pager.component.metadata.json +1 -1
  464. package/pagination/pagination.component.js +2 -1
  465. package/pagination/pagination.component.js.map +1 -1
  466. package/pagination/pagination.component.metadata.json +1 -1
  467. package/pagination/pagination.config.js +3 -1
  468. package/pagination/pagination.config.js.map +1 -1
  469. package/pagination/pagination.module.js +2 -1
  470. package/pagination/pagination.module.js.map +1 -1
  471. package/popover/index.js.map +1 -1
  472. package/popover/popover-container.component.js +5 -3
  473. package/popover/popover-container.component.js.map +1 -1
  474. package/popover/popover-container.component.metadata.json +1 -1
  475. package/popover/popover.config.d.ts +2 -1
  476. package/popover/popover.config.js +4 -2
  477. package/popover/popover.config.js.map +1 -1
  478. package/popover/popover.directive.d.ts +9 -1
  479. package/popover/popover.directive.js +10 -1
  480. package/popover/popover.directive.js.map +1 -1
  481. package/popover/popover.directive.metadata.json +1 -1
  482. package/popover/popover.module.js +2 -1
  483. package/popover/popover.module.js.map +1 -1
  484. package/positioning/index.js.map +1 -1
  485. package/positioning/ng-positioning.d.ts +2 -0
  486. package/positioning/ng-positioning.js +30 -4
  487. package/positioning/ng-positioning.js.map +1 -1
  488. package/positioning/ng-positioning.metadata.json +1 -1
  489. package/positioning/positioning.service.js +2 -1
  490. package/positioning/positioning.service.js.map +1 -1
  491. package/positioning/positioning.service.metadata.json +1 -1
  492. package/progressbar/bar.component.js +2 -1
  493. package/progressbar/bar.component.js.map +1 -1
  494. package/progressbar/index.js.map +1 -1
  495. package/progressbar/progress.directive.js +2 -1
  496. package/progressbar/progress.directive.js.map +1 -1
  497. package/progressbar/progressbar.component.js +2 -1
  498. package/progressbar/progressbar.component.js.map +1 -1
  499. package/progressbar/progressbar.config.js +2 -1
  500. package/progressbar/progressbar.config.js.map +1 -1
  501. package/progressbar/progressbar.module.js +2 -1
  502. package/progressbar/progressbar.module.js.map +1 -1
  503. package/rating/index.js.map +1 -1
  504. package/rating/rating.component.js +2 -1
  505. package/rating/rating.component.js.map +1 -1
  506. package/rating/rating.module.js +2 -1
  507. package/rating/rating.module.js.map +1 -1
  508. package/sortable/draggable-item.js.map +1 -1
  509. package/sortable/draggable-item.metadata.json +1 -0
  510. package/sortable/draggable-item.service.js +2 -1
  511. package/sortable/draggable-item.service.js.map +1 -1
  512. package/sortable/index.js.map +1 -1
  513. package/sortable/sortable.component.js +2 -1
  514. package/sortable/sortable.component.js.map +1 -1
  515. package/sortable/sortable.component.metadata.json +1 -1
  516. package/sortable/sortable.module.js +2 -1
  517. package/sortable/sortable.module.js.map +1 -1
  518. package/spec/ng-bootstrap/license +23 -0
  519. package/tabs/index.js.map +1 -1
  520. package/tabs/ng-transclude.directive.js +2 -1
  521. package/tabs/ng-transclude.directive.js.map +1 -1
  522. package/tabs/tab-heading.directive.js +2 -1
  523. package/tabs/tab-heading.directive.js.map +1 -1
  524. package/tabs/tab.directive.js +7 -3
  525. package/tabs/tab.directive.js.map +1 -1
  526. package/tabs/tabs.module.js +2 -1
  527. package/tabs/tabs.module.js.map +1 -1
  528. package/tabs/tabset.component.js +4 -3
  529. package/tabs/tabset.component.js.map +1 -1
  530. package/tabs/tabset.config.js +2 -1
  531. package/tabs/tabset.config.js.map +1 -1
  532. package/timepicker/index.js.map +1 -1
  533. package/timepicker/reducer/timepicker.actions.js +2 -1
  534. package/timepicker/reducer/timepicker.actions.js.map +1 -1
  535. package/timepicker/reducer/timepicker.reducer.d.ts +1 -3
  536. package/timepicker/reducer/timepicker.reducer.js +10 -3
  537. package/timepicker/reducer/timepicker.reducer.js.map +1 -1
  538. package/timepicker/reducer/timepicker.reducer.metadata.json +1 -1
  539. package/timepicker/reducer/timepicker.store.js +15 -7
  540. package/timepicker/reducer/timepicker.store.js.map +1 -1
  541. package/timepicker/timepicker-controls.util.js.map +1 -1
  542. package/timepicker/timepicker.component.js +4 -2
  543. package/timepicker/timepicker.component.js.map +1 -1
  544. package/timepicker/timepicker.component.metadata.json +1 -1
  545. package/timepicker/timepicker.config.js +2 -1
  546. package/timepicker/timepicker.config.js.map +1 -1
  547. package/timepicker/timepicker.models.js.map +1 -1
  548. package/timepicker/timepicker.models.metadata.json +1 -0
  549. package/timepicker/timepicker.module.js +2 -1
  550. package/timepicker/timepicker.module.js.map +1 -1
  551. package/timepicker/timepicker.utils.js.map +1 -1
  552. package/tooltip/index.js.map +1 -1
  553. package/tooltip/tooltip-container.component.js +24 -3
  554. package/tooltip/tooltip-container.component.js.map +1 -1
  555. package/tooltip/tooltip-container.component.metadata.json +1 -1
  556. package/tooltip/tooltip.config.js +2 -1
  557. package/tooltip/tooltip.config.js.map +1 -1
  558. package/tooltip/tooltip.directive.js +17 -15
  559. package/tooltip/tooltip.directive.js.map +1 -1
  560. package/tooltip/tooltip.module.js +2 -1
  561. package/tooltip/tooltip.module.js.map +1 -1
  562. package/tsconfig.spec.json +39 -0
  563. package/typeahead/index.js.map +1 -1
  564. package/typeahead/latin-map.js.map +1 -1
  565. package/typeahead/typeahead-container.component.d.ts +1 -0
  566. package/typeahead/typeahead-container.component.js +3 -1
  567. package/typeahead/typeahead-container.component.js.map +1 -1
  568. package/typeahead/typeahead-container.component.metadata.json +1 -1
  569. package/typeahead/typeahead-match.class.js +2 -1
  570. package/typeahead/typeahead-match.class.js.map +1 -1
  571. package/typeahead/typeahead-options.class.js +2 -1
  572. package/typeahead/typeahead-options.class.js.map +1 -1
  573. package/typeahead/typeahead-utils.js.map +1 -1
  574. package/typeahead/typeahead.directive.d.ts +3 -0
  575. package/typeahead/typeahead.directive.js +19 -8
  576. package/typeahead/typeahead.directive.js.map +1 -1
  577. package/typeahead/typeahead.directive.metadata.json +1 -1
  578. package/typeahead/typeahead.module.js +2 -1
  579. package/typeahead/typeahead.module.js.map +1 -1
  580. package/utils/decorators.js +1 -0
  581. package/utils/decorators.js.map +1 -1
  582. package/utils/facade/browser.js.map +1 -1
  583. package/utils/index.js.map +1 -1
  584. package/utils/linked-list.class.js +5 -3
  585. package/utils/linked-list.class.js.map +1 -1
  586. package/utils/linked-list.class.metadata.json +1 -1
  587. package/utils/ng2-bootstrap-config.js +27 -0
  588. package/utils/ng2-bootstrap-config.js.map +1 -1
  589. package/utils/ng2-bootstrap-config.metadata.json +1 -1
  590. package/utils/trigger.class.js +2 -1
  591. package/utils/trigger.class.js.map +1 -1
  592. package/utils/triggers.d.ts +3 -0
  593. package/utils/triggers.js +44 -0
  594. package/utils/triggers.js.map +1 -1
  595. package/utils/triggers.metadata.json +1 -1
  596. package/utils/utils.class.js +2 -1
  597. package/utils/utils.class.js.map +1 -1
  598. package/utils/warn-once.d.ts +1 -0
  599. package/utils/warn-once.js +12 -0
  600. package/utils/warn-once.js.map +1 -0
  601. package/utils/warn-once.metadata.json +1 -0
@@ -9,7 +9,7 @@ export var CHECKBOX_CONTROL_VALUE_ACCESSOR = {
9
9
  /**
10
10
  * Add checkbox functionality to any element
11
11
  */
12
- export var ButtonCheckboxDirective = (function () {
12
+ var ButtonCheckboxDirective = (function () {
13
13
  function ButtonCheckboxDirective() {
14
14
  /** Truthy value, will be set to ngModel */
15
15
  this.btnCheckboxTrue = true;
@@ -80,4 +80,5 @@ export var ButtonCheckboxDirective = (function () {
80
80
  };
81
81
  return ButtonCheckboxDirective;
82
82
  }());
83
+ export { ButtonCheckboxDirective };
83
84
  //# sourceMappingURL=button-checkbox.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-checkbox.directive.js","sourceRoot":"","sources":["../../src/buttons/button-checkbox.directive.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAU,UAAU,EAAE,MAAM,eAAe;OACxF,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB;AAExE,oEAAoE;AAEpE,OAAO,IAAM,+BAA+B,GAAQ;IAClD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IACtD,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF;;GAEG;AAEH;IAAA;QACE,2CAA2C;QACnC,oBAAe,GAAQ,IAAI,CAAC;QACpC,0CAA0C;QAClC,qBAAgB,GAAQ,KAAK,CAAC;QAE9B,UAAK,GAAY,KAAK,CAAC;QAKrB,aAAQ,GAAQ,QAAQ,CAAC,SAAS,CAAC;QACnC,cAAS,GAAQ,QAAQ,CAAC,SAAS,CAAC;IAgEhD,CAAC;IA9DC,gBAAgB;IAET,yCAAO,GAAd;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,C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Y;QACnC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IACI,kCAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,+BAA+B,CAAC,EAAC,EAAG,EAAE;KACvG,CAAC;IACF,kBAAkB;IACX,sCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACK,sCAAc,GAA2C;QAChE,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACrC,kBAAkB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACtC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,EAAG,EAAE,EAAE;QAC3D,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAG,EAAE,EAAE;KACtD,CAAC;IACF,8BAAC;AAAD,CAAC,AA5ED,IA4EC","sourcesContent":["import { Directive, HostBinding, HostListener, Input, OnInit, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// TODO: config: activeClass - Class to apply to the checked buttons\n\nexport const CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonCheckboxDirective),\n multi: true\n};\n\n/**\n * Add checkbox functionality to any element\n */\n\nexport class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {\n /** Truthy value, will be set to ngModel */\n public btnCheckboxTrue: any = true;\n /** Falsy value, will be set to ngModel */\n public btnCheckboxFalse: any = false;\n\n public state: boolean = false;\n\n protected value: any;\n protected isDisabled: boolean;\n\n protected onChange: any = Function.prototype;\n protected onTouched: any = Function.prototype;\n\n // view -> model\n \n public onClick(): void {\n if (this.isDisabled) {\n return;\n }\n\n this.toggle(!this.state);\n this.onChange(this.value);\n }\n\n public ngOnInit(): any {\n this.toggle(this.trueValue === this.value);\n }\n\n protected get trueValue(): boolean {\n return typeof this.btnCheckboxTrue !== 'undefined'\n ? this.btnCheckboxTrue\n : true;\n }\n\n protected get falseValue(): boolean {\n return typeof this.btnCheckboxFalse !== 'undefined'\n ? this.btnCheckboxFalse\n : false;\n }\n\n public toggle(state: boolean): void {\n this.state = state;\n this.value = this.state ? this.trueValue : this.falseValue;\n }\n\n // ControlValueAccessor\n // model -> view\n public writeValue(value: any): void {\n this.state = this.trueValue === value;\n this.value = value ? this.trueValue : this.falseValue;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n }\n\n public registerOnChange(fn: (_: any) => {}): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => {}): void {\n this.onTouched = fn;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[btnCheckbox]', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR]}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'btnCheckboxTrue': [{ type: Input },],\n'btnCheckboxFalse': [{ type: Input },],\n'state': [{ type: HostBinding, args: ['class.active', ] },],\n'onClick': [{ type: HostListener, args: ['click', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/buttons/button-checkbox.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAA,EAAW,WAAA,EAAa,YAAA,EAAc,KAAA,EAAe,UAAA,EAAW,MAAO,eAAA,CAAgB;AAChG,OAAO,EAAwB,iBAAA,EAAkB,MAAO,gBAAA,CAAiB;AAEzE,oEAAoE;AAEpE,MAAM,CAAC,IAAM,+BAAA,GAAuC;IAClD,OAAO,EAAE,i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uBAAuB;IACvB,gBAAgB;IACT,4CAAU,GAAjB,UAAkB,KAAU;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;IACxD,CAAC;IAEM,kDAAgB,GAAvB,UAAwB,UAAmB;QACzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,kDAAgB,GAAvB,UAAwB,EAAkB;QACxC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAEM,mDAAiB,GAAxB,UAAyB,EAAY;QACnC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IACI,kCAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,+BAA+B,CAAC,EAAC,EAAG,EAAE;KACvG,CAAC;IACF,kBAAkB;IACX,sCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACK,sCAAc,GAA2C;QAChE,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACrC,kBAAkB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACtC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,EAAG,EAAE,EAAE;QAC3D,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAG,EAAE,EAAE;KACtD,CAAC;IACF,8BAAC;CA5ED,AA4EC,IAAA;SA5EY,uBAAuB","file":"button-checkbox.directive.js","sourceRoot":"","sourcesContent":["import { Directive, HostBinding, HostListener, Input, OnInit, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// TODO: config: activeClass - Class to apply to the checked buttons\n\nexport const CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonCheckboxDirective),\n multi: true\n};\n\n/**\n * Add checkbox functionality to any element\n */\n\nexport class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {\n /** Truthy value, will be set to ngModel */\n public btnCheckboxTrue: any = true;\n /** Falsy value, will be set to ngModel */\n public btnCheckboxFalse: any = false;\n\n public state: boolean = false;\n\n protected value: any;\n protected isDisabled: boolean;\n\n protected onChange: any = Function.prototype;\n protected onTouched: any = Function.prototype;\n\n // view -> model\n \n public onClick(): void {\n if (this.isDisabled) {\n return;\n }\n\n this.toggle(!this.state);\n this.onChange(this.value);\n }\n\n public ngOnInit(): any {\n this.toggle(this.trueValue === this.value);\n }\n\n protected get trueValue(): boolean {\n return typeof this.btnCheckboxTrue !== 'undefined'\n ? this.btnCheckboxTrue\n : true;\n }\n\n protected get falseValue(): boolean {\n return typeof this.btnCheckboxFalse !== 'undefined'\n ? this.btnCheckboxFalse\n : false;\n }\n\n public toggle(state: boolean): void {\n this.state = state;\n this.value = this.state ? this.trueValue : this.falseValue;\n }\n\n // ControlValueAccessor\n // model -> view\n public writeValue(value: any): void {\n this.state = this.trueValue === value;\n this.value = value ? this.trueValue : this.falseValue;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this.isDisabled = isDisabled;\n }\n\n public registerOnChange(fn: (_: any) => {}): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => {}): void {\n this.onTouched = fn;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[btnCheckbox]', providers: [CHECKBOX_CONTROL_VALUE_ACCESSOR]}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'btnCheckboxTrue': [{ type: Input },],\n'btnCheckboxFalse': [{ type: Input },],\n'state': [{ type: HostBinding, args: ['class.active', ] },],\n'onClick': [{ type: HostListener, args: ['click', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -9,7 +9,7 @@ export var RADIO_CONTROL_VALUE_ACCESSOR = {
9
9
  * Create radio buttons or groups of buttons.
10
10
  * A value of a selected button is bound to a variable specified via ngModel.
11
11
  */
12
- export var ButtonRadioDirective = (function () {
12
+ var ButtonRadioDirective = (function () {
13
13
  function ButtonRadioDirective(el, cdr) {
14
14
  this.cdr = cdr;
15
15
  this.onChange = Function.prototype;
@@ -75,4 +75,5 @@ export var ButtonRadioDirective = (function () {
75
75
  };
76
76
  return ButtonRadioDirective;
77
77
  }());
78
+ export { ButtonRadioDirective };
78
79
  //# sourceMappingURL=button-radio.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-radio.directive.js","sourceRoot":"","sources":["../../src/buttons/button-radio.directive.ts"],"names":[],"mappings":"OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,KAAK,EAEL,iBAAiB,EAClB,MAAM,eAAe;OACf,EAAwB,iBAAiB,EAAE,MAAM,gBAAgB;AAExE,OAAO,IAAM,4BAA4B,GAAQ;IAC/C,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAoB,EAApB,CAAoB,CAAC;IACnD,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF;;;GAGG;AAEH;IAwCE,8BAAmB,EAAc,EAAU,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;QAtC1D,aAAQ,GAAQ,QAAQ,CAAC,SAAS,CAAC;QACnC,cAAS,GAAQ,QAAQ,CAAC,SAAS,CAAC;QAsCzC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IA3BD,sBAAW,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IAEM,gDAAiB,GAAxB,UAAyB,EAAO;QAC9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IACI,+BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,4BAA4B,CAAC,EAAC,EAAG,EAAE;KACjG,CAAC;IACF,kBAAkB;IACX,mCAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,UAAU,GAAG;QACpB,EAAC,IAAI,EAAE,iBAAiB,GAAG;KAC1B,EAH6F,CAG7F,CAAC;IACK,mCAAc,GAA2C;QAChE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC9B,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACjC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC3B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,EAAG,EAAE,EAAE;QAC9D,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAG,EAAE,EAAE;KACtD,CAAC;IACF,2BAAC;AAAD,CAAC,AAjFD,IAiFC","sourcesContent":["import {\n Directive,\n ElementRef,\n HostBinding,\n forwardRef,\n HostListener,\n Input,\n OnInit,\n ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport const RADIO_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonRadioDirective),\n multi: true\n};\n\n/**\n * Create radio buttons or groups of buttons.\n * A value of a selected button is bound to a variable specified via ngModel.\n */\n\nexport class ButtonRadioDirective implements ControlValueAccessor, OnInit {\n\n public onChange: any = Function.prototype;\n public onTouched: any = Function.prototype;\n\n /** Radio button value, will be set to `ngModel` */\n public btnRadio: any;\n /** If `true` — radio button can be unchecked */\n public uncheckable: boolean;\n /** Current value of radio component or group */\n public value: any;\n\n protected el: ElementRef;\n\n \n public get isActive(): boolean {\n return this.btnRadio === this.value;\n }\n\n \n public onClick(): void {\n if (this.el.nativeElement.attributes.disabled) {\n return;\n }\n\n if (this.uncheckable && this.btnRadio === this.value) {\n this.value = undefined;\n this.onTouched();\n this.onChange(this.value);\n return;\n }\n\n if (this.btnRadio !== this.value) {\n this.value = this.btnRadio;\n this.onTouched();\n this.onChange(this.value);\n return;\n }\n }\n\n public constructor(el: ElementRef, private cdr: ChangeDetectorRef) {\n this.el = el;\n }\n\n public ngOnInit(): void {\n this.uncheckable = typeof this.uncheckable !== 'undefined';\n }\n\n public onBlur(): void {\n this.onTouched();\n }\n\n // ControlValueAccessor\n // model -> view\n public writeValue(value: any): void {\n this.value = value;\n this.cdr.markForCheck();\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[btnRadio]', providers: [RADIO_CONTROL_VALUE_ACCESSOR]}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: ChangeDetectorRef, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'btnRadio': [{ type: Input },],\n'uncheckable': [{ type: Input },],\n'value': [{ type: Input },],\n'isActive': [{ type: HostBinding, args: ['class.active', ] },],\n'onClick': [{ type: HostListener, args: ['click', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/buttons/button-radio.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAA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AAE,EAAE;QAC9D,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAG,EAAE,EAAE;KACtD,CAAC;IACF,2BAAC;CAjFD,AAiFC,IAAA;SAjFY,oBAAoB","file":"button-radio.directive.js","sourceRoot":"","sourcesContent":["import {\n Directive,\n ElementRef,\n HostBinding,\n forwardRef,\n HostListener,\n Input,\n OnInit,\n ChangeDetectorRef\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport const RADIO_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ButtonRadioDirective),\n multi: true\n};\n\n/**\n * Create radio buttons or groups of buttons.\n * A value of a selected button is bound to a variable specified via ngModel.\n */\n\nexport class ButtonRadioDirective implements ControlValueAccessor, OnInit {\n\n public onChange: any = Function.prototype;\n public onTouched: any = Function.prototype;\n\n /** Radio button value, will be set to `ngModel` */\n public btnRadio: any;\n /** If `true` — radio button can be unchecked */\n public uncheckable: boolean;\n /** Current value of radio component or group */\n public value: any;\n\n protected el: ElementRef;\n\n \n public get isActive(): boolean {\n return this.btnRadio === this.value;\n }\n\n \n public onClick(): void {\n if (this.el.nativeElement.attributes.disabled) {\n return;\n }\n\n if (this.uncheckable && this.btnRadio === this.value) {\n this.value = undefined;\n this.onTouched();\n this.onChange(this.value);\n return;\n }\n\n if (this.btnRadio !== this.value) {\n this.value = this.btnRadio;\n this.onTouched();\n this.onChange(this.value);\n return;\n }\n }\n\n public constructor(el: ElementRef, private cdr: ChangeDetectorRef) {\n this.el = el;\n }\n\n public ngOnInit(): void {\n this.uncheckable = typeof this.uncheckable !== 'undefined';\n }\n\n public onBlur(): void {\n this.onTouched();\n }\n\n // ControlValueAccessor\n // model -> view\n public writeValue(value: any): void {\n this.value = value;\n this.cdr.markForCheck();\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[btnRadio]', providers: [RADIO_CONTROL_VALUE_ACCESSOR]}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: ChangeDetectorRef, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'btnRadio': [{ type: Input },],\n'uncheckable': [{ type: Input },],\n'value': [{ type: Input },],\n'isActive': [{ type: HostBinding, args: ['class.active', ] },],\n'onClick': [{ type: HostListener, args: ['click', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { ButtonCheckboxDirective } from './button-checkbox.directive';
3
3
  import { ButtonRadioDirective } from './button-radio.directive';
4
- export var ButtonsModule = (function () {
4
+ var ButtonsModule = (function () {
5
5
  function ButtonsModule() {
6
6
  }
7
7
  ButtonsModule.forRoot = function () {
@@ -17,4 +17,5 @@ export var ButtonsModule = (function () {
17
17
  ButtonsModule.ctorParameters = function () { return []; };
18
18
  return ButtonsModule;
19
19
  }());
20
+ export { ButtonsModule };
20
21
  //# sourceMappingURL=buttons.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttons.module.js","sourceRoot":"","sources":["../../src/buttons/buttons.module.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAuB,MAAM,eAAe;OAEtD,EAAE,uBAAuB,EAAE,MAAM,6BAA6B;OAC9D,EAAE,oBAAoB,EAAE,MAAM,0BAA0B;AAG/D;IAAA;IAaA,CAAC;IAZe,qBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IAClD,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;oBAC7D,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;iBACzD,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,4BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,oBAAC;AAAD,CAAC,AAbD,IAaC","sourcesContent":["import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { ButtonCheckboxDirective } from './button-checkbox.directive';\nimport { ButtonRadioDirective } from './button-radio.directive';\n\n\nexport class ButtonsModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: ButtonsModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: [ButtonCheckboxDirective, ButtonRadioDirective],\n exports: [ButtonCheckboxDirective, ButtonRadioDirective]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/buttons/buttons.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAA,EAA8B,MAAO,eAAA,CAAgB;AAE9D,OAAO,EAAE,uBAAA,EAAwB,MAAO,6BAAA,CAA8B;AACtE,OAAO,EAAE,oBAAA,EAAqB,MAAO,0BAAA,CAA2B;AAGhE;IAAA;IAaA,CAAC;IAZe,qBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IAClD,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;oBAC7D,OAAO,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;iBACzD,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,4BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,oBAAC;CAbD,AAaC,IAAA;SAbY,aAAa","file":"buttons.module.js","sourceRoot":"","sourcesContent":["import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { ButtonCheckboxDirective } from './button-checkbox.directive';\nimport { ButtonRadioDirective } from './button-radio.directive';\n\n\nexport class ButtonsModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: ButtonsModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: [ButtonCheckboxDirective, ButtonRadioDirective],\n exports: [ButtonCheckboxDirective, ButtonRadioDirective]\n}, ] },\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
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/buttons/index.ts"],"names":[],"mappings":"AAAA,SAAS,uBAAuB,QAAQ,6BAA6B,CAAC;AACtE,SAAS,oBAAoB,QAAQ,0BAA0B,CAAC;AAChE,SAAS,aAAa,QAAQ,kBAAkB,CAAC","sourcesContent":["export { ButtonCheckboxDirective } from './button-checkbox.directive';\nexport { ButtonRadioDirective } from './button-radio.directive';\nexport { ButtonsModule } from './buttons.module';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/buttons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { ButtonCheckboxDirective } from './button-checkbox.directive';\nexport { ButtonRadioDirective } from './button-radio.directive';\nexport { ButtonsModule } from './buttons.module';\n"]}
@@ -10,7 +10,7 @@
10
10
  * 3) if first or last slide is active and noWrap is true, there should be "disabled" class on the nav buttons.
11
11
  * 4) default interval should be equal 5000
12
12
  */
13
- import { OnDestroy, EventEmitter } from '@angular/core';
13
+ import { OnDestroy, EventEmitter, NgZone } from '@angular/core';
14
14
  import { LinkedList } from '../utils';
15
15
  import { SlideComponent } from './slide.component';
16
16
  import { CarouselConfig } from './carousel.config';
@@ -23,6 +23,7 @@ export declare enum Direction {
23
23
  * Base element to create carousel
24
24
  */
25
25
  export declare class CarouselComponent implements OnDestroy {
26
+ private ngZone;
26
27
  /** If `true` — carousel will not cycle continuously and will have hard stops (prevent looping) */
27
28
  noWrap: boolean;
28
29
  /** If `true` — will disable pausing on carousel mouse hover */
@@ -43,7 +44,7 @@ export declare class CarouselComponent implements OnDestroy {
43
44
  protected isPlaying: boolean;
44
45
  protected destroyed: boolean;
45
46
  readonly isBs4: boolean;
46
- constructor(config: CarouselConfig);
47
+ constructor(config: CarouselConfig, ngZone: NgZone);
47
48
  ngOnDestroy(): void;
48
49
  /**
49
50
  * Adds new slide. If this slide is first in collection - set it as active and starts auto changing
@@ -1,5 +1,17 @@
1
1
  // todo: add animation
2
- import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ /***
3
+ * pause (not yet supported) (?string='hover') - event group name which pauses the cycling of the carousel, if hover pauses on mouseenter and resumes on mouseleave
4
+ keyboard (not yet supported) (?boolean=true) - if false carousel will not react to keyboard events
5
+ note: swiping not yet supported
6
+ */
7
+ /****
8
+ * Problems:
9
+ * 1) if we set an active slide via model changes, .active class remains on a current slide.
10
+ * 2) if we have only one slide, we shouldn't show prev/next nav buttons
11
+ * 3) if first or last slide is active and noWrap is true, there should be "disabled" class on the nav buttons.
12
+ * 4) default interval should be equal 5000
13
+ */
14
+ import { Component, Input, Output, EventEmitter, NgZone } from '@angular/core';
3
15
  import { isBs3, LinkedList } from '../utils';
4
16
  import { CarouselConfig } from './carousel.config';
5
17
  export var Direction;
@@ -11,8 +23,9 @@ export var Direction;
11
23
  /**
12
24
  * Base element to create carousel
13
25
  */
14
- export var CarouselComponent = (function () {
15
- function CarouselComponent(config) {
26
+ var CarouselComponent = (function () {
27
+ function CarouselComponent(config, ngZone) {
28
+ this.ngZone = ngZone;
16
29
  /** Will be emitted when active slide has been changed. Part of two-way-bindable [(activeSlide)] property */
17
30
  this.activeSlideChange = new EventEmitter(false);
18
31
  this._slides = new LinkedList();
@@ -220,15 +233,19 @@ export var CarouselComponent = (function () {
220
233
  this.resetTimer();
221
234
  var interval = +this.interval;
222
235
  if (!isNaN(interval) && interval > 0) {
223
- this.currentInterval = setInterval(function () {
224
- var nInterval = +_this.interval;
225
- if (_this.isPlaying && !isNaN(_this.interval) && nInterval > 0 && _this.slides.length) {
226
- _this.nextSlide();
227
- }
228
- else {
229
- _this.pause();
230
- }
231
- }, interval);
236
+ this.currentInterval = this.ngZone.runOutsideAngular(function () {
237
+ return setInterval(function () {
238
+ var nInterval = +_this.interval;
239
+ _this.ngZone.run(function () {
240
+ if (_this.isPlaying && !isNaN(_this.interval) && nInterval > 0 && _this.slides.length) {
241
+ _this.nextSlide();
242
+ }
243
+ else {
244
+ _this.pause();
245
+ }
246
+ });
247
+ }, interval);
248
+ });
232
249
  }
233
250
  };
234
251
  /**
@@ -249,6 +266,7 @@ export var CarouselComponent = (function () {
249
266
  /** @nocollapse */
250
267
  CarouselComponent.ctorParameters = function () { return [
251
268
  { type: CarouselConfig, },
269
+ { type: NgZone, },
252
270
  ]; };
253
271
  CarouselComponent.propDecorators = {
254
272
  'noWrap': [{ type: Input },],
@@ -259,4 +277,5 @@ export var CarouselComponent = (function () {
259
277
  };
260
278
  return CarouselComponent;
261
279
  }());
280
+ export { CarouselComponent };
262
281
  //# sourceMappingURL=carousel.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.component.js","sourceRoot":"","sources":["../../src/carousel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ause (not yet supported) (?string='hover') - event group name which pauses the cycling of the carousel, if hover pauses on mouseenter and resumes on mouseleave\n keyboard (not yet supported) (?boolean=true) - if false carousel will not react to keyboard events\n note: swiping not yet supported\n */\n/****\n * Problems:\n * 1) if we set an active slide via model changes, .active class remains on a current slide.\n * 2) if we have only one slide, we shouldn't show prev/next nav buttons\n * 3) if first or last slide is active and noWrap is true, there should be \"disabled\" class on the nav buttons.\n * 4) default interval should be equal 5000\n */\n\nimport { Component, Input, OnDestroy, Output, EventEmitter } from '@angular/core';\n\nimport { isBs3, LinkedList } from '../utils';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\n\nexport enum Direction {UNKNOWN, NEXT, PREV}\n\n/**\n * Base element to create carousel\n */\n\nexport class CarouselComponent implements OnDestroy {\n /** If `true` — carousel will not cycle continuously and will have hard stops (prevent looping) */\n public noWrap: boolean;\n /** If `true` — will disable pausing on carousel mouse hover */\n public noPause: boolean;\n\n protected _currentActiveSlide: number;\n\n /** Will be emitted when active slide has been changed. Part of two-way-bindable [(activeSlide)] property */\n public activeSlideChange: EventEmitter <any> = new EventEmitter<any>(false);\n\n /** Index of currently displayed slide(started for 0) */\n \n public set activeSlide(index: number) {\n if (this._slides.length && index !== this._currentActiveSlide) {\n this._select(index);\n }\n }\n public get activeSlide(): number {\n return this._currentActiveSlide;\n }\n\n protected _interval: number;\n\n /**\n * Delay of item cycling in milliseconds. If false, carousel won't cycle automatically.\n */\n \n public get interval(): number {\n return this._interval;\n }\n public set interval(value: number) {\n this._interval = value;\n this.restartTimer();\n }\n\n protected _slides: LinkedList<SlideComponent> = new LinkedList<SlideComponent>();\n public get slides(): SlideComponent[] {\n return this._slides.toArray();\n }\n\n protected currentInterval: any;\n protected isPlaying: boolean;\n protected destroyed: boolean = false;\n\n public get isBs4():boolean {\n return !isBs3();\n }\n\n public constructor(config: CarouselConfig) {\n Object.assign(this, config);\n }\n\n public ngOnDestroy(): void {\n this.destroyed = true;\n }\n\n /**\n * Adds new slide. If this slide is first in collection - set it as active and starts auto changing\n * @param slide\n */\n public addSlide(slide: SlideComponent): void {\n this._slides.add(slide);\n if (this._slides.length === 1) {\n this._currentActiveSlide = void 0;\n this.activeSlide = 0;\n this.play();\n }\n }\n\n /**\n * Removes specified slide. If this slide is active - will roll to another slide\n * @param slide\n */\n public removeSlide(slide: SlideComponent): void {\n const remIndex = this._slides.indexOf(slide);\n\n if (this._currentActiveSlide === remIndex) {\n\n // removing of active slide\n let nextSlideIndex: number = void 0;\n if (this._slides.length > 1) {\n // if this slide last - will roll to first slide, if noWrap flag is FALSE or to previous, if noWrap is TRUE\n // in case, if this slide in middle of collection, index of next slide is same to removed\n nextSlideIndex = !this.isLast(remIndex) ? remIndex :\n this.noWrap ? remIndex - 1 : 0;\n }\n this._slides.remove(remIndex);\n\n // prevents exception with changing some value after checking\n setTimeout(() => {\n this._select(nextSlideIndex);\n }, 0);\n } else {\n this._slides.remove(remIndex);\n const currentSlideIndex = this.getCurrentSlideIndex();\n setTimeout(() => {\n // after removing, need to actualize index of current active slide\n this._currentActiveSlide = currentSlideIndex;\n this.activeSlideChange.emit(this._currentActiveSlide);\n }, 0);\n\n }\n }\n\n /**\n * Rolling to next slide\n * @param force: {boolean} if true - will ignore noWrap flag\n */\n public nextSlide(force: boolean = false): void {\n this.activeSlide = this.findNextSlideIndex(Direction.NEXT, force);\n }\n\n /**\n * Rolling to previous slide\n * @param force: {boolean} if true - will ignore noWrap flag\n */\n public previousSlide(force: boolean = false): void {\n this.activeSlide = this.findNextSlideIndex(Direction.PREV, force);\n }\n\n /**\n * Rolling to specified slide\n * @param index: {number} index of slide, which must be shown\n */\n public selectSlide(index: number): void {\n this.activeSlide = index;\n }\n\n /**\n * Starts a auto changing of slides\n */\n public play(): void {\n if (!this.isPlaying) {\n this.isPlaying = true;\n this.restartTimer();\n }\n }\n\n /**\n * Stops a auto changing of slides\n */\n public pause(): void {\n if (!this.noPause) {\n this.isPlaying = false;\n this.resetTimer();\n }\n }\n\n /**\n * Finds and returns index of currently displayed slide\n * @returns {number}\n */\n public getCurrentSlideIndex(): number {\n return this._slides.findIndex((slide: SlideComponent) => slide.active);\n }\n\n /**\n * Defines, whether the specified index is last in collection\n * @param index\n * @returns {boolean}\n */\n public isLast(index: number): boolean {\n return index + 1 >= this._slides.length;\n }\n\n /**\n * Defines next slide index, depending of direction\n * @param direction: Direction(UNKNOWN|PREV|NEXT)\n * @param force: {boolean} if TRUE - will ignore noWrap flag, else will return undefined if next slide require wrapping\n * @returns {any}\n */\n private findNextSlideIndex(direction: Direction, force: boolean): number {\n let nextSlideIndex: number = 0;\n\n if (!force && (this.isLast(this.activeSlide) && direction !== Direction.PREV && this.noWrap)) {\n return void 0;\n }\n\n switch (direction) {\n case Direction.NEXT:\n // if this is last slide, not force, looping is disabled and need to going forward - select current slide, as a next\n nextSlideIndex = (!this.isLast(this._currentActiveSlide)) ? this._currentActiveSlide + 1 :\n (!force && this.noWrap ) ? this._currentActiveSlide : 0;\n break;\n case Direction.PREV:\n // if this is first slide, not force, looping is disabled and need to going backward - select current slide, as a next\n nextSlideIndex = (this._currentActiveSlide > 0) ? this._currentActiveSlide - 1 :\n (!force && this.noWrap ) ? this._currentActiveSlide : this._slides.length - 1;\n break;\n default:\n throw new Error('Unknown direction');\n }\n return nextSlideIndex;\n }\n\n /**\n * Sets a slide, which specified through index, as active\n * @param index\n * @private\n */\n private _select(index: number): void {\n if (isNaN(index)) {\n this.pause();\n return;\n }\n let currentSlide = this._slides.get(this._currentActiveSlide);\n if (currentSlide) {\n currentSlide.active = false;\n }\n let nextSlide = this._slides.get(index);\n if (nextSlide) {\n this._currentActiveSlide = index;\n nextSlide.active = true;\n this.activeSlide = index;\n this.activeSlideChange.emit(index);\n }\n }\n\n /**\n * Starts loop of auto changing of slides\n */\n private restartTimer(): any {\n this.resetTimer();\n let interval = +this.interval;\n if (!isNaN(interval) && interval > 0) {\n this.currentInterval = setInterval(\n () => {\n let nInterval = +this.interval;\n if (this.isPlaying && !isNaN(this.interval) && nInterval > 0 && this.slides.length) {\n this.nextSlide();\n } else {\n this.pause();\n }\n },\n interval);\n }\n }\n\n /**\n * Stops loop of auto changing of slides\n */\n private resetTimer(): void {\n if (this.currentInterval) {\n clearInterval(this.currentInterval);\n this.currentInterval = void 0;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'carousel',\n template: `\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n `\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CarouselConfig, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'noWrap': [{ type: Input },],\n'noPause': [{ type: Input },],\n'activeSlideChange': [{ type: Output },],\n'activeSlide': [{ type: Input },],\n'interval': [{ type: Input },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/carousel/carousel.component.ts"],"names":[],"mappings":"AAAA,sBAAC;AAED;;;;GA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E,EAAE;QAC7B,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACxC,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACjC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;KAC7B,CAAC;IACF,wBAAC;CA3RD,AA2RC,IAAA;SA3RY,iBAAiB","file":"carousel.component.js","sourceRoot":"","sourcesContent":["// todo: add animation\n\n/***\n * pause (not yet supported) (?string='hover') - event group name which pauses the cycling of the carousel, if hover pauses on mouseenter and resumes on mouseleave\n keyboard (not yet supported) (?boolean=true) - if false carousel will not react to keyboard events\n note: swiping not yet supported\n */\n/****\n * Problems:\n * 1) if we set an active slide via model changes, .active class remains on a current slide.\n * 2) if we have only one slide, we shouldn't show prev/next nav buttons\n * 3) if first or last slide is active and noWrap is true, there should be \"disabled\" class on the nav buttons.\n * 4) default interval should be equal 5000\n */\n\nimport { Component, Input, OnDestroy, Output, EventEmitter, NgZone } from '@angular/core';\n\nimport { isBs3, LinkedList } from '../utils';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\n\nexport enum Direction {UNKNOWN, NEXT, PREV}\n\n/**\n * Base element to create carousel\n */\n\nexport class CarouselComponent implements OnDestroy {\n /** If `true` — carousel will not cycle continuously and will have hard stops (prevent looping) */\n public noWrap: boolean;\n /** If `true` — will disable pausing on carousel mouse hover */\n public noPause: boolean;\n\n protected _currentActiveSlide: number;\n\n /** Will be emitted when active slide has been changed. Part of two-way-bindable [(activeSlide)] property */\n public activeSlideChange: EventEmitter <any> = new EventEmitter<any>(false);\n\n /** Index of currently displayed slide(started for 0) */\n \n public set activeSlide(index: number) {\n if (this._slides.length && index !== this._currentActiveSlide) {\n this._select(index);\n }\n }\n public get activeSlide(): number {\n return this._currentActiveSlide;\n }\n\n protected _interval: number;\n\n /**\n * Delay of item cycling in milliseconds. If false, carousel won't cycle automatically.\n */\n \n public get interval(): number {\n return this._interval;\n }\n public set interval(value: number) {\n this._interval = value;\n this.restartTimer();\n }\n\n protected _slides: LinkedList<SlideComponent> = new LinkedList<SlideComponent>();\n public get slides(): SlideComponent[] {\n return this._slides.toArray();\n }\n\n protected currentInterval: any;\n protected isPlaying: boolean;\n protected destroyed: boolean = false;\n\n public get isBs4():boolean {\n return !isBs3();\n }\n\n public constructor(config: CarouselConfig, private ngZone: NgZone) {\n Object.assign(this, config);\n }\n\n public ngOnDestroy(): void {\n this.destroyed = true;\n }\n\n /**\n * Adds new slide. If this slide is first in collection - set it as active and starts auto changing\n * @param slide\n */\n public addSlide(slide: SlideComponent): void {\n this._slides.add(slide);\n if (this._slides.length === 1) {\n this._currentActiveSlide = void 0;\n this.activeSlide = 0;\n this.play();\n }\n }\n\n /**\n * Removes specified slide. If this slide is active - will roll to another slide\n * @param slide\n */\n public removeSlide(slide: SlideComponent): void {\n const remIndex = this._slides.indexOf(slide);\n\n if (this._currentActiveSlide === remIndex) {\n\n // removing of active slide\n let nextSlideIndex: number = void 0;\n if (this._slides.length > 1) {\n // if this slide last - will roll to first slide, if noWrap flag is FALSE or to previous, if noWrap is TRUE\n // in case, if this slide in middle of collection, index of next slide is same to removed\n nextSlideIndex = !this.isLast(remIndex) ? remIndex :\n this.noWrap ? remIndex - 1 : 0;\n }\n this._slides.remove(remIndex);\n\n // prevents exception with changing some value after checking\n setTimeout(() => {\n this._select(nextSlideIndex);\n }, 0);\n } else {\n this._slides.remove(remIndex);\n const currentSlideIndex = this.getCurrentSlideIndex();\n setTimeout(() => {\n // after removing, need to actualize index of current active slide\n this._currentActiveSlide = currentSlideIndex;\n this.activeSlideChange.emit(this._currentActiveSlide);\n }, 0);\n\n }\n }\n\n /**\n * Rolling to next slide\n * @param force: {boolean} if true - will ignore noWrap flag\n */\n public nextSlide(force: boolean = false): void {\n this.activeSlide = this.findNextSlideIndex(Direction.NEXT, force);\n }\n\n /**\n * Rolling to previous slide\n * @param force: {boolean} if true - will ignore noWrap flag\n */\n public previousSlide(force: boolean = false): void {\n this.activeSlide = this.findNextSlideIndex(Direction.PREV, force);\n }\n\n /**\n * Rolling to specified slide\n * @param index: {number} index of slide, which must be shown\n */\n public selectSlide(index: number): void {\n this.activeSlide = index;\n }\n\n /**\n * Starts a auto changing of slides\n */\n public play(): void {\n if (!this.isPlaying) {\n this.isPlaying = true;\n this.restartTimer();\n }\n }\n\n /**\n * Stops a auto changing of slides\n */\n public pause(): void {\n if (!this.noPause) {\n this.isPlaying = false;\n this.resetTimer();\n }\n }\n\n /**\n * Finds and returns index of currently displayed slide\n * @returns {number}\n */\n public getCurrentSlideIndex(): number {\n return this._slides.findIndex((slide: SlideComponent) => slide.active);\n }\n\n /**\n * Defines, whether the specified index is last in collection\n * @param index\n * @returns {boolean}\n */\n public isLast(index: number): boolean {\n return index + 1 >= this._slides.length;\n }\n\n /**\n * Defines next slide index, depending of direction\n * @param direction: Direction(UNKNOWN|PREV|NEXT)\n * @param force: {boolean} if TRUE - will ignore noWrap flag, else will return undefined if next slide require wrapping\n * @returns {any}\n */\n private findNextSlideIndex(direction: Direction, force: boolean): number {\n let nextSlideIndex: number = 0;\n\n if (!force && (this.isLast(this.activeSlide) && direction !== Direction.PREV && this.noWrap)) {\n return void 0;\n }\n\n switch (direction) {\n case Direction.NEXT:\n // if this is last slide, not force, looping is disabled and need to going forward - select current slide, as a next\n nextSlideIndex = (!this.isLast(this._currentActiveSlide)) ? this._currentActiveSlide + 1 :\n (!force && this.noWrap ) ? this._currentActiveSlide : 0;\n break;\n case Direction.PREV:\n // if this is first slide, not force, looping is disabled and need to going backward - select current slide, as a next\n nextSlideIndex = (this._currentActiveSlide > 0) ? this._currentActiveSlide - 1 :\n (!force && this.noWrap ) ? this._currentActiveSlide : this._slides.length - 1;\n break;\n default:\n throw new Error('Unknown direction');\n }\n return nextSlideIndex;\n }\n\n /**\n * Sets a slide, which specified through index, as active\n * @param index\n * @private\n */\n private _select(index: number): void {\n if (isNaN(index)) {\n this.pause();\n return;\n }\n let currentSlide = this._slides.get(this._currentActiveSlide);\n if (currentSlide) {\n currentSlide.active = false;\n }\n let nextSlide = this._slides.get(index);\n if (nextSlide) {\n this._currentActiveSlide = index;\n nextSlide.active = true;\n this.activeSlide = index;\n this.activeSlideChange.emit(index);\n }\n }\n\n /**\n * Starts loop of auto changing of slides\n */\n private restartTimer(): any {\n this.resetTimer();\n let interval = +this.interval;\n if (!isNaN(interval) && interval > 0) {\n this.currentInterval = this.ngZone.runOutsideAngular(() => {\n return setInterval(() => {\n let nInterval = +this.interval;\n this.ngZone.run(() => {\n if (this.isPlaying && !isNaN(this.interval) && nInterval > 0 && this.slides.length) {\n this.nextSlide();\n } else {\n this.pause();\n }\n });\n }, interval);\n });\n }\n }\n\n /**\n * Stops loop of auto changing of slides\n */\n private resetTimer(): void {\n if (this.currentInterval) {\n clearInterval(this.currentInterval);\n this.currentInterval = void 0;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'carousel',\n template: `\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n `\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CarouselConfig, },\n{type: NgZone, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'noWrap': [{ type: Input },],\n'noPause': [{ type: Input },],\n'activeSlideChange': [{ type: Output },],\n'activeSlide': [{ type: Input },],\n'interval': [{ type: Input },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":3,"metadata":{"Direction":{"UNKNOWN":0,"NEXT":1,"PREV":2},"CarouselComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"carousel","template":"\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n "}]}],"members":{"noWrap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"noPause":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"activeSlideChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"activeSlide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"interval":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./carousel.config","name":"CarouselConfig"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"nextSlide":[{"__symbolic":"method"}],"previousSlide":[{"__symbolic":"method"}],"selectSlide":[{"__symbolic":"method"}],"play":[{"__symbolic":"method"}],"pause":[{"__symbolic":"method"}],"getCurrentSlideIndex":[{"__symbolic":"method"}],"isLast":[{"__symbolic":"method"}],"findNextSlideIndex":[{"__symbolic":"method"}],"_select":[{"__symbolic":"method"}],"restartTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"Direction":{"UNKNOWN":0,"NEXT":1,"PREV":2},"CarouselComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"carousel","template":"\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n "}]}],"members":{"noWrap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"noPause":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"activeSlideChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"activeSlide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"interval":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./carousel.config","name":"CarouselConfig"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"nextSlide":[{"__symbolic":"method"}],"previousSlide":[{"__symbolic":"method"}],"selectSlide":[{"__symbolic":"method"}],"play":[{"__symbolic":"method"}],"pause":[{"__symbolic":"method"}],"getCurrentSlideIndex":[{"__symbolic":"method"}],"isLast":[{"__symbolic":"method"}],"findNextSlideIndex":[{"__symbolic":"method"}],"_select":[{"__symbolic":"method"}],"restartTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":3,"metadata":{"Direction":{"UNKNOWN":0,"NEXT":1,"PREV":2},"CarouselComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"carousel","template":"\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n "}]}],"members":{"noWrap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"noPause":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"activeSlideChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"activeSlide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"interval":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./carousel.config","name":"CarouselConfig"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"nextSlide":[{"__symbolic":"method"}],"previousSlide":[{"__symbolic":"method"}],"selectSlide":[{"__symbolic":"method"}],"play":[{"__symbolic":"method"}],"pause":[{"__symbolic":"method"}],"getCurrentSlideIndex":[{"__symbolic":"method"}],"isLast":[{"__symbolic":"method"}],"findNextSlideIndex":[{"__symbolic":"method"}],"_select":[{"__symbolic":"method"}],"restartTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"Direction":{"UNKNOWN":0,"NEXT":1,"PREV":2},"CarouselComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"carousel","template":"\n <div (mouseenter)=\"pause()\" (mouseleave)=\"play()\" (mouseup)=\"play()\" class=\"carousel slide\">\n <ol class=\"carousel-indicators\" *ngIf=\"slides.length > 1\">\n <li *ngFor=\"let slidez of slides; let i = index;\" [class.active]=\"slidez.active === true\" (click)=\"selectSlide(i)\"></li>\n </ol>\n <div class=\"carousel-inner\"><ng-content></ng-content></div>\n <a class=\"left carousel-control carousel-control-prev\" [class.disabled]=\"activeSlide === 0 && noWrap\" (click)=\"previousSlide()\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-prev carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span *ngIf=\"isBs4\" class=\"sr-only\">Previous</span>\n </a>\n <a class=\"right carousel-control carousel-control-next\" (click)=\"nextSlide()\" [class.disabled]=\"isLast(activeSlide) && noWrap\" *ngIf=\"slides.length > 1\">\n <span class=\"icon-next carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\">Next</span>\n </a>\n </div>\n "}]}],"members":{"noWrap":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"noPause":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"activeSlideChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"activeSlide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"interval":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./carousel.config","name":"CarouselConfig"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"nextSlide":[{"__symbolic":"method"}],"previousSlide":[{"__symbolic":"method"}],"selectSlide":[{"__symbolic":"method"}],"play":[{"__symbolic":"method"}],"pause":[{"__symbolic":"method"}],"getCurrentSlideIndex":[{"__symbolic":"method"}],"isLast":[{"__symbolic":"method"}],"findNextSlideIndex":[{"__symbolic":"method"}],"_select":[{"__symbolic":"method"}],"restartTimer":[{"__symbolic":"method"}],"resetTimer":[{"__symbolic":"method"}]}}}}]
@@ -1,5 +1,5 @@
1
1
  import { Injectable } from '@angular/core';
2
- export var CarouselConfig = (function () {
2
+ var CarouselConfig = (function () {
3
3
  function CarouselConfig() {
4
4
  /** Default interval of auto changing of slides */
5
5
  this.interval = 5000;
@@ -15,4 +15,5 @@ export var CarouselConfig = (function () {
15
15
  CarouselConfig.ctorParameters = function () { return []; };
16
16
  return CarouselConfig;
17
17
  }());
18
+ export { CarouselConfig };
18
19
  //# sourceMappingURL=carousel.config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.config.js","sourceRoot":"","sources":["../../src/carousel/carousel.config.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE,MAAM,eAAe;AAG1C;IAAA;QACE,kDAAkD;QAC3C,aAAQ,GAAW,IAAI,CAAC;QAE/B,uDAAuD;QAChD,YAAO,GAAY,KAAK,CAAC;QAEhC,0DAA0D;QACnD,WAAM,GAAY,KAAK,CAAC;IAOjC,CAAC;IANM,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;AAAD,CAAC,AAfD,IAeC","sourcesContent":["import { Injectable } from '@angular/core';\n\n\nexport class CarouselConfig {\n /** Default interval of auto changing of slides */\n public interval: number = 5000;\n\n /** Is loop of auto changing of slides can be paused */\n public noPause: boolean = false;\n\n /** Is slides can wrap from the last to the first slide */\n public noWrap: boolean = false;\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
+ {"version":3,"sources":["../../.tmp/carousel/carousel.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAG3C;IAAA;QACE,kDAAkD;QAC3C,aAAQ,GAAW,IAAI,CAAC;QAE/B,uDAAuD;QAChD,YAAO,GAAY,KAAK,CAAC;QAEhC,0DAA0D;QACnD,WAAM,GAAY,KAAK,CAAC;IAOjC,CAAC;IANM,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;CAfD,AAeC,IAAA;SAfY,cAAc","file":"carousel.config.js","sourceRoot":"","sourcesContent":["import { Injectable } from '@angular/core';\n\n\nexport class CarouselConfig {\n /** Default interval of auto changing of slides */\n public interval: number = 5000;\n\n /** Is loop of auto changing of slides can be paused */\n public noPause: boolean = false;\n\n /** Is slides can wrap from the last to the first slide */\n public noWrap: boolean = false;\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"]}
@@ -3,7 +3,7 @@ import { NgModule } from '@angular/core';
3
3
  import { CarouselComponent } from './carousel.component';
4
4
  import { SlideComponent } from './slide.component';
5
5
  import { CarouselConfig } from './carousel.config';
6
- export var CarouselModule = (function () {
6
+ var CarouselModule = (function () {
7
7
  function CarouselModule() {
8
8
  }
9
9
  CarouselModule.forRoot = function () {
@@ -21,4 +21,5 @@ export var CarouselModule = (function () {
21
21
  CarouselModule.ctorParameters = function () { return []; };
22
22
  return CarouselModule;
23
23
  }());
24
+ export { CarouselModule };
24
25
  //# sourceMappingURL=carousel.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.module.js","sourceRoot":"","sources":["../../src/carousel/carousel.module.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB;OACvC,EAAE,QAAQ,EAAuB,MAAM,eAAe;OAEtD,EAAE,iBAAiB,EAAE,MAAM,sBAAsB;OACjD,EAAE,cAAc,EAAE,MAAM,mBAAmB;OAC3C,EAAE,cAAc,EAAE,MAAM,mBAAmB;AAGlD;IAAA;IAeA,CAAC;IAde,sBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IACnD,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC;oBACjD,OAAO,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC;oBAC5C,SAAS,EAAE,CAAC,cAAc,CAAC;iBAC5B,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;AAAD,CAAC,AAfD,IAeC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\n\n\nexport class CarouselModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: CarouselModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [SlideComponent, CarouselComponent],\n exports: [SlideComponent, CarouselComponent],\n providers: [CarouselConfig]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/carousel/carousel.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAA,EAAa,MAAO,iBAAA,CAAkB;AAC/C,OAAO,EAAE,QAAA,EAA8B,MAAO,eAAA,CAAgB;AAE9D,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AACzD,OAAO,EAAE,cAAA,EAAe,MAAO,mBAAA,CAAoB;AACnD,OAAO,EAAE,cAAA,EAAe,MAAO,mBAAA,CAAoB;AAGnD;IAAA;IAeA,CAAC;IAde,sBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IACnD,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC;oBACjD,OAAO,EAAE,CAAC,cAAc,EAAE,iBAAiB,CAAC;oBAC5C,SAAS,EAAE,CAAC,cAAc,CAAC;iBAC5B,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;CAfD,AAeC,IAAA;SAfY,cAAc","file":"carousel.module.js","sourceRoot":"","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\nimport { SlideComponent } from './slide.component';\nimport { CarouselConfig } from './carousel.config';\n\n\nexport class CarouselModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: CarouselModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [SlideComponent, CarouselComponent],\n exports: [SlideComponent, CarouselComponent],\n providers: [CarouselConfig]\n}, ] },\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
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/carousel/index.ts"],"names":[],"mappings":"AAAA,SAAS,iBAAiB,QAAQ,sBAAsB,CAAC;AACzD,SAAS,cAAc,QAAQ,mBAAmB,CAAC;AACnD,SAAS,cAAc,QAAQ,mBAAmB,CAAC;AACnD,SAAS,cAAc,QAAQ,mBAAmB,CAAC","sourcesContent":["export { CarouselComponent } from './carousel.component';\nexport { CarouselModule } from './carousel.module';\nexport { SlideComponent } from './slide.component';\nexport { CarouselConfig } from './carousel.config';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { CarouselComponent } from './carousel.component';\nexport { CarouselModule } from './carousel.module';\nexport { SlideComponent } from './slide.component';\nexport { CarouselConfig } from './carousel.config';\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Component, HostBinding, Input } from '@angular/core';
2
2
  import { CarouselComponent } from './carousel.component';
3
- export var SlideComponent = (function () {
3
+ var SlideComponent = (function () {
4
4
  function SlideComponent(carousel) {
5
5
  /** Wraps element by appropriate CSS classes */
6
6
  this.addClass = true;
@@ -30,4 +30,5 @@ export var SlideComponent = (function () {
30
30
  };
31
31
  return SlideComponent;
32
32
  }());
33
+ export { SlideComponent };
33
34
  //# sourceMappingURL=slide.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slide.component.js","sourceRoot":"","sources":["../../src/carousel/slide.component.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE,WAAW,EAAa,KAAK,EAAU,MAAM,eAAe;OAEzE,EAAE,iBAAiB,EAAE,MAAM,sBAAsB;AAGxD;IAcE,wBAAmB,QAA0B;QAR7C,+CAA+C;QAGxC,aAAQ,GAAW,IAAI,CAAC;QAM7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,8EAA8E;IACvE,iCAAQ,GAAf;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,kFAAkF;IAC3E,oCAAW,GAAlB;QACE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oBACxB,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE,uGAIT;iBACF,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,iBAAiB,GAAG;KAC1B,EAF6F,CAE7F,CAAC;IACK,6BAAc,GAA2C;QAChE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC5E,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,YAAY,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE;KAClH,CAAC;IACF,qBAAC;AAAD,CAAC,AA7CD,IA6CC","sourcesContent":["import { Component, HostBinding, OnDestroy, Input, OnInit } from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\n\n\nexport class SlideComponent implements OnInit, OnDestroy {\n\n /** Is current slide active */\n \n public active:boolean;\n\n /** Wraps element by appropriate CSS classes */\n \n \n public addClass:boolean = true;\n\n /** Link to Parent(container-collection) component */\n protected carousel:CarouselComponent;\n\n public constructor(carousel:CarouselComponent) {\n this.carousel = carousel;\n }\n\n /** Fires changes in container collection after adding a new slide instance */\n public ngOnInit():void {\n this.carousel.addSlide(this);\n }\n\n /** Fires changes in container collection after removing of this slide instance */\n public ngOnDestroy():void {\n this.carousel.removeSlide(this);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'slide',\n template: `\n <div [class.active]=\"active\" class=\"item\">\n <ng-content></ng-content>\n </div>\n `\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CarouselComponent, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'active': [{ type: HostBinding, args: ['class.active', ] },{ type: Input },],\n'addClass': [{ type: HostBinding, args: ['class.item', ] },{ type: HostBinding, args: ['class.carousel-item', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/carousel/slide.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAA,EAAW,WAAA,EAAwB,KAAA,EAAc,MAAO,eAAA,CAAgB;AAEjF,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AAGzD;IAcE,wBAAmB,QAA0B;QAR7C,+CAA+C;QAGxC,aAAQ,GAAW,IAAI,CAAC;QAM7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,8EAA8E;IACvE,iCAAQ,GAAf;QACE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,kFAAkF;IAC3E,oCAAW,GAAlB;QACE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;oBACxB,QAAQ,EAAE,OAAO;oBACjB,QAAQ,EAAE,uGAIT;iBACF,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,iBAAiB,GAAG;KAC1B,EAF6F,CAE7F,CAAC;IACK,6BAAc,GAA2C;QAChE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,cAAc,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC5E,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,YAAY,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE;KAClH,CAAC;IACF,qBAAC;CA7CD,AA6CC,IAAA;SA7CY,cAAc","file":"slide.component.js","sourceRoot":"","sourcesContent":["import { Component, HostBinding, OnDestroy, Input, OnInit } from '@angular/core';\n\nimport { CarouselComponent } from './carousel.component';\n\n\nexport class SlideComponent implements OnInit, OnDestroy {\n\n /** Is current slide active */\n \n public active:boolean;\n\n /** Wraps element by appropriate CSS classes */\n \n \n public addClass:boolean = true;\n\n /** Link to Parent(container-collection) component */\n protected carousel:CarouselComponent;\n\n public constructor(carousel:CarouselComponent) {\n this.carousel = carousel;\n }\n\n /** Fires changes in container collection after adding a new slide instance */\n public ngOnInit():void {\n this.carousel.addSlide(this);\n }\n\n /** Fires changes in container collection after removing of this slide instance */\n public ngOnDestroy():void {\n this.carousel.removeSlide(this);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n selector: 'slide',\n template: `\n <div [class.active]=\"active\" class=\"item\">\n <ng-content></ng-content>\n </div>\n `\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CarouselComponent, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'active': [{ type: HostBinding, args: ['class.active', ] },{ type: Input },],\n'addClass': [{ type: HostBinding, args: ['class.item', ] },{ type: HostBinding, args: ['class.carousel-item', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1,5 +1,6 @@
1
+ // todo: add animations when https://github.com/angular/angular/issues/9947 solved
1
2
  import { Directive, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer } from '@angular/core';
2
- export var CollapseDirective = (function () {
3
+ var CollapseDirective = (function () {
3
4
  function CollapseDirective(_el, _renderer) {
4
5
  /** This event fires as soon as content collapses */
5
6
  this.collapsed = new EventEmitter();
@@ -97,4 +98,5 @@ export var CollapseDirective = (function () {
97
98
  };
98
99
  return CollapseDirective;
99
100
  }());
101
+ export { CollapseDirective };
100
102
  //# sourceMappingURL=collapse.directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.directive.js","sourceRoot":"","sources":["../../src/collapse/collapse.directive.ts"],"names":[],"mappings":"OACO,EACL,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,EACvE,QAAQ,EACT,MAAM,eAAe;AAGtB;IAqCE,2BAAmB,GAAe,EAAE,SAAmB;QApCvD,oDAAoD;QAC5C,cAAS,GAAsB,IAAI,YAAY,EAAE,CAAC;QAC1D,0DAA0D;QAClD,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QAIzD,QAAQ;QAID,eAAU,GAAY,IAAI,CAAC;QAClC,SAAS;QAEF,gBAAW,GAAY,KAAK,CAAC;QACpC,cAAc;QAEP,eAAU,GAAY,IAAI,CAAC;QAClC,kBAAkB;QAEX,iBAAY,GAAY,KAAK,CAAC;QAiBnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAfD,sBAAW,uCAAQ;aAKnB;YACE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;QATD,gEAAgE;aAEhE,UAAoB,KAAc;YAChC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;;;OAAA;IAcD,mDAAmD;IAC5C,kCAAM,GAAb;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YACpB,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAED,sCAAsC;IAC/B,gCAAI,GAAX;QACE,IAAI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EAAE;KACL,CAAC;IACF,kBAAkB;IACX,gCAAc,GAAmE,cAAM,OAAA;QAC9F,EAAC,IAAI,EAAE,UAAU,GAAG;QACpB,EAAC,IAAI,EAAE,QAAQ,GAAG;KACjB,EAH6F,CAG7F,CAAC;IACK,gCAAc,GAA2C;QAChE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAChC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC/B,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,eAAe,EAAG,EAAE,EAAE;QAC9D,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,UAAU,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,YAAY,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,oBAAoB,EAAG,EAAE,EAAE;QAChK,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,kBAAkB,EAAG,EAAE,EAAE;QACrE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,gBAAgB,EAAG,EAAE,EAAE;QAClE,cAAc,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,kBAAkB,EAAG,EAAE,EAAE;QACtE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;KAC7B,CAAC;IACF,wBAAC;AAAD,CAAC,AAnHD,IAmHC","sourcesContent":["// todo: add animations when https://github.com/angular/angular/issues/9947 solved\nimport {\n Directive, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output,\n Renderer, style\n} from '@angular/core';\n\n\nexport class CollapseDirective {\n /** This event fires as soon as content collapses */\n public collapsed: EventEmitter<any> = new EventEmitter();\n /** This event fires as soon as content becomes visible */\n public expanded: EventEmitter<any> = new EventEmitter();\n\n \n public display: string;\n // shown\n \n \n \n public isExpanded: boolean = true;\n // hidden\n \n public isCollapsed: boolean = false;\n // stale state\n \n public isCollapse: boolean = true;\n // animation state\n \n public isCollapsing: boolean = false;\n\n /** A flag indicating visibility of content (shown or hidden) */\n \n public set collapse(value: boolean) {\n this.isExpanded = value;\n this.toggle();\n }\n\n public get collapse(): boolean {\n return this.isExpanded;\n }\n\n protected _el: ElementRef;\n protected _renderer: Renderer;\n\n public constructor(_el: ElementRef, _renderer: Renderer) {\n this._el = _el;\n this._renderer = _renderer;\n }\n\n /** allows to manually toggle content visibility */\n public toggle(): void {\n if (this.isExpanded) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /** allows to manually hide content */\n public hide(): void {\n this.isCollapse = false;\n this.isCollapsing = true;\n\n this.isExpanded = false;\n this.isCollapsed = true;\n\n this.isCollapse = true;\n this.isCollapsing = false;\n\n this.display = 'none';\n this.collapsed.emit(this);\n }\n\n /** allows to manually show collapsed content */\n public show(): void {\n this.isCollapse = false;\n this.isCollapsing = true;\n\n this.isExpanded = true;\n this.isCollapsed = false;\n\n this.display = 'block';\n // this.height = 'auto';\n this.isCollapse = true;\n this.isCollapsing = false;\n this._renderer.setElementStyle(this._el.nativeElement, 'overflow', 'visible');\n this._renderer.setElementStyle(this._el.nativeElement, 'height', 'auto');\n this.expanded.emit(this);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[collapse]',\n exportAs: 'bs-collapse',\n /* tslint:disable-next-line */\n host: {'[class.collapse]': 'true'}/*,\n animations: [\n trigger('active', [\n state('void', style({height: 0})),\n state('closed', style({height: 0})),\n state('open', style({height: '*'})),\n transition('void => closed', [animate(0)]),\n transition('closed => open', [animate('350ms ease-out')]),\n transition('open => closed', [animate('350ms ease-out')])\n ])\n ]*/\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: Renderer, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'collapsed': [{ type: Output },],\n'expanded': [{ type: Output },],\n'display': [{ type: HostBinding, args: ['style.display', ] },],\n'isExpanded': [{ type: HostBinding, args: ['class.in', ] },{ type: HostBinding, args: ['class.show', ] },{ type: HostBinding, args: ['attr.aria-expanded', ] },],\n'isCollapsed': [{ type: HostBinding, args: ['attr.aria-hidden', ] },],\n'isCollapse': [{ type: HostBinding, args: ['class.collapse', ] },],\n'isCollapsing': [{ type: HostBinding, args: ['class.collapsing', ] },],\n'collapse': [{ type: Input },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/collapse/collapse.directive.ts"],"names":[],"mappings":"AAAA,kFAAC;AACD,OAAO,EACL,SAAS,EAAE,UAAA,EAAY,YAAA,EAAc,WAAA,EAAa,KAAA,EAAe,MAAA,EACjE,QAAQ,EACT,MAAM,eAAA,CAAgB;AAGvB;IAqCE,2BAAmB,GAAe,EAAE,SAAmB;QApCvD,oDAAoD;QAC5C,cAAS,GAAsB,IAAI,YAAY,EAAE,CAAC;QAC1D,0DAA0D;QAClD,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QAIzD,QAAQ;QAID,eAAU,GAAY,IAAI,CAAC;QAClC,SAAS;QAEF,gBAAW,GAAY,KAAK,CAAC;QACpC,cAAc;QAEP,eAAU,GAAY,IAAI,CAAC;QAClC,kBAAkB;QAEX,iBAAY,GAAY,KAAK,CAAC;QAiBnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAfD,sBAAW,uCAAQ;aAKnB;YACE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;QATD,gEAAgE;aAEhE,UAAoB,KAAc;YAChC,IAAI,CA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WAAW,EAAE,IAAI,EAAE,CAAC,kBAAkB,EAAG,EAAE,EAAE;QACtE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;KAC7B,CAAC;IACF,wBAAC;CAnHD,AAmHC,IAAA;SAnHY,iBAAiB","file":"collapse.directive.js","sourceRoot":"","sourcesContent":["// todo: add animations when https://github.com/angular/angular/issues/9947 solved\nimport {\n Directive, ElementRef, EventEmitter, HostBinding, Input, OnInit, Output,\n Renderer, style\n} from '@angular/core';\n\n\nexport class CollapseDirective {\n /** This event fires as soon as content collapses */\n public collapsed: EventEmitter<any> = new EventEmitter();\n /** This event fires as soon as content becomes visible */\n public expanded: EventEmitter<any> = new EventEmitter();\n\n \n public display: string;\n // shown\n \n \n \n public isExpanded: boolean = true;\n // hidden\n \n public isCollapsed: boolean = false;\n // stale state\n \n public isCollapse: boolean = true;\n // animation state\n \n public isCollapsing: boolean = false;\n\n /** A flag indicating visibility of content (shown or hidden) */\n \n public set collapse(value: boolean) {\n this.isExpanded = value;\n this.toggle();\n }\n\n public get collapse(): boolean {\n return this.isExpanded;\n }\n\n protected _el: ElementRef;\n protected _renderer: Renderer;\n\n public constructor(_el: ElementRef, _renderer: Renderer) {\n this._el = _el;\n this._renderer = _renderer;\n }\n\n /** allows to manually toggle content visibility */\n public toggle(): void {\n if (this.isExpanded) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /** allows to manually hide content */\n public hide(): void {\n this.isCollapse = false;\n this.isCollapsing = true;\n\n this.isExpanded = false;\n this.isCollapsed = true;\n\n this.isCollapse = true;\n this.isCollapsing = false;\n\n this.display = 'none';\n this.collapsed.emit(this);\n }\n\n /** allows to manually show collapsed content */\n public show(): void {\n this.isCollapse = false;\n this.isCollapsing = true;\n\n this.isExpanded = true;\n this.isCollapsed = false;\n\n this.display = 'block';\n // this.height = 'auto';\n this.isCollapse = true;\n this.isCollapsing = false;\n this._renderer.setElementStyle(this._el.nativeElement, 'overflow', 'visible');\n this._renderer.setElementStyle(this._el.nativeElement, 'height', 'auto');\n this.expanded.emit(this);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[collapse]',\n exportAs: 'bs-collapse',\n /* tslint:disable-next-line */\n host: {'[class.collapse]': 'true'}/*,\n animations: [\n trigger('active', [\n state('void', style({height: 0})),\n state('closed', style({height: 0})),\n state('open', style({height: '*'})),\n transition('void => closed', [animate(0)]),\n transition('closed => open', [animate('350ms ease-out')]),\n transition('open => closed', [animate('350ms ease-out')])\n ])\n ]*/\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: Renderer, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'collapsed': [{ type: Output },],\n'expanded': [{ type: Output },],\n'display': [{ type: HostBinding, args: ['style.display', ] },],\n'isExpanded': [{ type: HostBinding, args: ['class.in', ] },{ type: HostBinding, args: ['class.show', ] },{ type: HostBinding, args: ['attr.aria-expanded', ] },],\n'isCollapsed': [{ type: HostBinding, args: ['attr.aria-hidden', ] },],\n'isCollapse': [{ type: HostBinding, args: ['class.collapse', ] },],\n'isCollapsing': [{ type: HostBinding, args: ['class.collapsing', ] },],\n'collapse': [{ type: Input },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { CollapseDirective } from './collapse.directive';
3
- export var CollapseModule = (function () {
3
+ var CollapseModule = (function () {
4
4
  function CollapseModule() {
5
5
  }
6
6
  CollapseModule.forRoot = function () {
@@ -16,4 +16,5 @@ export var CollapseModule = (function () {
16
16
  CollapseModule.ctorParameters = function () { return []; };
17
17
  return CollapseModule;
18
18
  }());
19
+ export { CollapseModule };
19
20
  //# sourceMappingURL=collapse.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.module.js","sourceRoot":"","sources":["../../src/collapse/collapse.module.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAuB,MAAM,eAAe;OAEtD,EAAE,iBAAiB,EAAE,MAAM,sBAAsB;AAGxD;IAAA;IAaA,CAAC;IAZe,sBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IACnD,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;AAAD,CAAC,AAbD,IAaC","sourcesContent":["import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CollapseDirective } from './collapse.directive';\n\n\nexport class CollapseModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: CollapseModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: [CollapseDirective],\n exports: [CollapseDirective]\n}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/collapse/collapse.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAA,EAA8B,MAAO,eAAA,CAAgB;AAE9D,OAAO,EAAE,iBAAA,EAAkB,MAAO,sBAAA,CAAuB;AAGzD;IAAA;IAaA,CAAC;IAZe,sBAAO,GAArB;QACE,MAAM,CAAC,EAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;IACnD,CAAC;IACI,yBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B,EAAG,EAAE;KACL,CAAC;IACF,kBAAkB;IACX,6BAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACF,qBAAC;CAbD,AAaC,IAAA;SAbY,cAAc","file":"collapse.module.js","sourceRoot":"","sourcesContent":["import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CollapseDirective } from './collapse.directive';\n\n\nexport class CollapseModule {\n public static forRoot(): ModuleWithProviders {\n return {ngModule: CollapseModule, providers: []};\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: [CollapseDirective],\n exports: [CollapseDirective]\n}, ] },\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
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/collapse/index.ts"],"names":[],"mappings":"AAAA,SAAS,iBAAiB,QAAQ,sBAAsB,CAAC;AACzD,SAAS,cAAc,QAAQ,mBAAmB,CAAC","sourcesContent":["export { CollapseDirective } from './collapse.directive';\nexport { CollapseModule } from './collapse.module';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/collapse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export { CollapseDirective } from './collapse.directive';\nexport { CollapseModule } from './collapse.module';\n"]}
@@ -1,6 +1,7 @@
1
- export var BsComponentRef = (function () {
1
+ var BsComponentRef = (function () {
2
2
  function BsComponentRef() {
3
3
  }
4
4
  return BsComponentRef;
5
5
  }());
6
+ export { BsComponentRef };
6
7
  //# sourceMappingURL=bs-component-ref.class.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bs-component-ref.class.js","sourceRoot":"","sources":["../../src/component-loader/bs-component-ref.class.ts"],"names":[],"mappings":"AAEA;IAAA;IAGA,CAAC;IAAD,qBAAC;AAAD,CAAC,AAHD,IAGC","sourcesContent":["import { TemplateRef, ViewContainerRef } from '@angular/core';\n\nexport class BsComponentRef<T> {\n templateRef: TemplateRef<T>;\n viewContainer: ViewContainerRef;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
1
+ {"version":3,"sources":["../../.tmp/component-loader/bs-component-ref.class.ts"],"names":[],"mappings":"AAEA;IAAA;IAGA,CAAC;IAAD,qBAAC;AAAD,CAHA,AAGC,IAAA","file":"bs-component-ref.class.js","sourceRoot":"","sourcesContent":["import { TemplateRef, ViewContainerRef } from '@angular/core';\n\nexport class BsComponentRef<T> {\n templateRef: TemplateRef<T>;\n viewContainer: ViewContainerRef;\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":3,"metadata":{"BsComponentRef":{"__symbolic":"class"}}},{"__symbolic":"module","version":1,"metadata":{"BsComponentRef":{"__symbolic":"class"}}}]
1
+ [{"__symbolic":"module","version":3,"metadata":{"BsComponentRef":{"__symbolic":"class","arity":1}}},{"__symbolic":"module","version":1,"metadata":{"BsComponentRef":{"__symbolic":"class","arity":1}}}]
@@ -1,12 +1,6 @@
1
- import { ComponentRef, ElementRef, EventEmitter, Provider, TemplateRef, Type } from '@angular/core';
1
+ import { ComponentRef, EmbeddedViewRef, EventEmitter, Provider, TemplateRef, Type, ViewContainerRef } from '@angular/core';
2
2
  import { PositioningOptions } from '../positioning';
3
- export interface ListenOptions {
4
- target?: ElementRef;
5
- triggers?: string;
6
- show?: Function;
7
- hide?: Function;
8
- toggle?: Function;
9
- }
3
+ import { ListenOptions } from './listen-options.model';
10
4
  export declare class ComponentLoader<T> {
11
5
  private _viewContainerRef;
12
6
  private _renderer;
@@ -22,6 +16,7 @@ export declare class ComponentLoader<T> {
22
16
  onHidden: EventEmitter<any>;
23
17
  instance: T;
24
18
  _componentRef: ComponentRef<T>;
19
+ _inlineViewRef: EmbeddedViewRef<T>;
25
20
  private _providers;
26
21
  private _componentFactory;
27
22
  private _zoneSubscription;
@@ -43,20 +38,26 @@ export declare class ComponentLoader<T> {
43
38
  * event names.
44
39
  */
45
40
  private triggers;
41
+ _listenOpts: ListenOptions;
42
+ _globalListener: Function;
46
43
  attach(compType: Type<T>): ComponentLoader<T>;
47
44
  to(container?: string): ComponentLoader<T>;
48
45
  position(opts?: PositioningOptions): ComponentLoader<T>;
49
46
  provide(provider: Provider): ComponentLoader<T>;
50
47
  show(opts?: {
51
48
  content?: string | TemplateRef<any>;
49
+ context?: any;
52
50
  [key: string]: any;
53
51
  }): ComponentRef<T>;
54
52
  hide(): ComponentLoader<T>;
55
53
  toggle(): void;
56
54
  dispose(): void;
57
55
  listen(listenOpts: ListenOptions): ComponentLoader<T>;
56
+ _removeGlobalListener(): void;
57
+ attachInline(vRef: ViewContainerRef, template: TemplateRef<any>): ComponentLoader<T>;
58
+ _registerOutsideClick(): void;
58
59
  getInnerComponent(): ComponentRef<T>;
59
60
  private _subscribePositioning();
60
61
  private _unsubscribePositioning();
61
- private _getContentRef(content);
62
+ private _getContentRef(content, context?);
62
63
  }