@pepperi-addons/ngx-lib 0.3.15-beta.19 → 0.3.15-beta.21

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 (695) hide show
  1. package/address/address.component.d.ts +27 -27
  2. package/address/address.module.d.ts +2 -2
  3. package/address/pepperi-addons-ngx-lib-address.d.ts +4 -4
  4. package/address/public-api.d.ts +2 -2
  5. package/attachment/attachment.component.d.ts +82 -82
  6. package/attachment/attachment.module.d.ts +2 -2
  7. package/attachment/pepperi-addons-ngx-lib-attachment.d.ts +4 -4
  8. package/attachment/public-api.d.ts +2 -2
  9. package/bread-crumbs/bread-crumbs.component.d.ts +23 -23
  10. package/bread-crumbs/bread-crumbs.model.d.ts +11 -11
  11. package/bread-crumbs/bread-crumbs.module.d.ts +5 -5
  12. package/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.d.ts +4 -4
  13. package/bread-crumbs/public-api.d.ts +3 -3
  14. package/bundles/pepperi-addons-ngx-lib-address.umd.js +124 -124
  15. package/bundles/pepperi-addons-ngx-lib-attachment.umd.js +247 -247
  16. package/bundles/pepperi-addons-ngx-lib-bread-crumbs.umd.js +121 -121
  17. package/bundles/pepperi-addons-ngx-lib-button.umd.js +158 -158
  18. package/bundles/pepperi-addons-ngx-lib-carousel.umd.js +788 -788
  19. package/bundles/pepperi-addons-ngx-lib-checkbox.umd.js +192 -192
  20. package/bundles/pepperi-addons-ngx-lib-color.umd.js +299 -299
  21. package/bundles/pepperi-addons-ngx-lib-date.umd.js +667 -667
  22. package/bundles/pepperi-addons-ngx-lib-dialog.umd.js +184 -184
  23. package/bundles/pepperi-addons-ngx-lib-draggable-items.umd.js +151 -151
  24. package/bundles/pepperi-addons-ngx-lib-field-title.umd.js +57 -57
  25. package/bundles/pepperi-addons-ngx-lib-files-uploader.umd.js +260 -260
  26. package/bundles/pepperi-addons-ngx-lib-form.umd.js +3249 -3249
  27. package/bundles/pepperi-addons-ngx-lib-group-buttons.umd.js +87 -87
  28. package/bundles/pepperi-addons-ngx-lib-icon.umd.js +681 -681
  29. package/bundles/pepperi-addons-ngx-lib-image.umd.js +322 -322
  30. package/bundles/pepperi-addons-ngx-lib-images-filmstrip.umd.js +422 -422
  31. package/bundles/pepperi-addons-ngx-lib-link.umd.js +388 -388
  32. package/bundles/pepperi-addons-ngx-lib-list.umd.js +3191 -3191
  33. package/bundles/pepperi-addons-ngx-lib-menu.umd.js +646 -646
  34. package/bundles/pepperi-addons-ngx-lib-page-layout.umd.js +60 -60
  35. package/bundles/pepperi-addons-ngx-lib-profile-data-views-list.umd.js +543 -543
  36. package/bundles/pepperi-addons-ngx-lib-quantity-selector.umd.js +925 -925
  37. package/bundles/pepperi-addons-ngx-lib-query-builder.umd.js +1181 -1170
  38. package/bundles/pepperi-addons-ngx-lib-query-builder.umd.js.map +1 -1
  39. package/bundles/pepperi-addons-ngx-lib-remote-loader.umd.js +652 -652
  40. package/bundles/pepperi-addons-ngx-lib-rich-html-textarea.umd.js +275 -275
  41. package/bundles/pepperi-addons-ngx-lib-search.umd.js +326 -326
  42. package/bundles/pepperi-addons-ngx-lib-select.umd.js +575 -575
  43. package/bundles/pepperi-addons-ngx-lib-separator.umd.js +79 -79
  44. package/bundles/pepperi-addons-ngx-lib-side-bar.umd.js +163 -163
  45. package/bundles/pepperi-addons-ngx-lib-signature.umd.js +286 -286
  46. package/bundles/pepperi-addons-ngx-lib-size-detector.umd.js +113 -113
  47. package/bundles/pepperi-addons-ngx-lib-slider.umd.js +124 -124
  48. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js +1974 -1938
  49. package/bundles/pepperi-addons-ngx-lib-smart-filters.umd.js.map +1 -1
  50. package/bundles/pepperi-addons-ngx-lib-snack-bar.umd.js +148 -148
  51. package/bundles/pepperi-addons-ngx-lib-textarea.umd.js +211 -211
  52. package/bundles/pepperi-addons-ngx-lib-textbox-icon.umd.js +80 -80
  53. package/bundles/pepperi-addons-ngx-lib-textbox.umd.js +533 -533
  54. package/bundles/pepperi-addons-ngx-lib-top-bar.umd.js +129 -129
  55. package/bundles/pepperi-addons-ngx-lib.umd.js +4819 -4773
  56. package/bundles/pepperi-addons-ngx-lib.umd.js.map +1 -1
  57. package/button/button.component.d.ts +99 -99
  58. package/button/button.model.d.ts +14 -14
  59. package/button/button.module.d.ts +2 -2
  60. package/button/pepperi-addons-ngx-lib-button.d.ts +4 -4
  61. package/button/public-api.d.ts +3 -3
  62. package/carousel/carousel-item.directive.d.ts +9 -9
  63. package/carousel/carousel.component.d.ts +145 -145
  64. package/carousel/carousel.module.d.ts +2 -2
  65. package/carousel/pepperi-addons-ngx-lib-carousel.d.ts +4 -4
  66. package/carousel/public-api.d.ts +3 -3
  67. package/checkbox/checkbox.component.d.ts +47 -47
  68. package/checkbox/checkbox.module.d.ts +5 -5
  69. package/checkbox/pepperi-addons-ngx-lib-checkbox.d.ts +4 -4
  70. package/checkbox/public-api.d.ts +2 -2
  71. package/color/color-picker.component.d.ts +53 -53
  72. package/color/color.component.d.ts +26 -26
  73. package/color/color.model.d.ts +1 -1
  74. package/color/color.module.d.ts +5 -5
  75. package/color/pepperi-addons-ngx-lib-color.d.ts +5 -5
  76. package/color/public-api.d.ts +3 -3
  77. package/core/clipboard/clipboard.directive.d.ts +2 -2
  78. package/core/clipboard/clipboard.service.d.ts +2 -2
  79. package/core/clipboard/index.d.ts +1 -1
  80. package/core/clipboard/public-api.d.ts +2 -2
  81. package/core/common/directives/auto-width.directive.d.ts +16 -16
  82. package/core/common/directives/button-blur.directive.d.ts +6 -6
  83. package/core/common/directives/button-loader.directive.d.ts +23 -23
  84. package/core/common/directives/data-qa.directive.d.ts +8 -8
  85. package/core/common/directives/index.d.ts +1 -1
  86. package/core/common/directives/menu-blur.directive.d.ts +7 -7
  87. package/core/common/directives/prevent-multi-click.directive.d.ts +4 -4
  88. package/core/common/directives/print.directive.d.ts +72 -72
  89. package/core/common/directives/public-api.d.ts +7 -7
  90. package/core/common/index.d.ts +1 -1
  91. package/core/common/model/index.d.ts +1 -1
  92. package/core/common/model/papi.model.d.ts +2 -2
  93. package/core/common/model/public-api.d.ts +3 -3
  94. package/core/common/model/utilities.model.d.ts +5 -5
  95. package/core/common/model/wapi.model.d.ts +200 -200
  96. package/core/common/pipes/common-pipes.d.ts +36 -36
  97. package/core/common/pipes/date-ago.pipe.d.ts +8 -0
  98. package/core/common/pipes/index.d.ts +1 -1
  99. package/core/common/pipes/public-api.d.ts +2 -1
  100. package/core/common/public-api.d.ts +4 -4
  101. package/core/common/services/addon.service.d.ts +38 -38
  102. package/core/common/services/color.service.d.ts +48 -48
  103. package/core/common/services/cookie.service.d.ts +50 -50
  104. package/core/common/services/data-convertor.service.d.ts +41 -41
  105. package/core/common/services/file.service.d.ts +24 -24
  106. package/core/common/services/index.d.ts +1 -1
  107. package/core/common/services/jwt-helper.service.d.ts +10 -10
  108. package/core/common/services/public-api.d.ts +11 -11
  109. package/core/common/services/session.service.d.ts +15 -15
  110. package/core/common/services/translate.service.d.ts +9 -9
  111. package/core/common/services/utilities.service.d.ts +17 -17
  112. package/core/common/services/validator.service.d.ts +28 -28
  113. package/core/common/services/window-scrolling.service.d.ts +7 -7
  114. package/core/customization/customization.model.d.ts +264 -264
  115. package/core/customization/customization.service.d.ts +156 -156
  116. package/core/customization/index.d.ts +1 -1
  117. package/core/customization/public-api.d.ts +2 -2
  118. package/core/http/index.d.ts +1 -1
  119. package/core/http/interceptors/error.interceptor.d.ts +5 -5
  120. package/core/http/interceptors/index.d.ts +11 -11
  121. package/core/http/interceptors/loader.interceptor.d.ts +8 -8
  122. package/core/http/interceptors/profiler.interceptor.d.ts +5 -5
  123. package/core/http/public-api.d.ts +2 -2
  124. package/core/http/services/http.service.d.ts +25 -25
  125. package/core/http/services/loader.service.d.ts +10 -10
  126. package/core/index.d.ts +1 -1
  127. package/core/layout/index.d.ts +1 -1
  128. package/core/layout/layout.service.d.ts +33 -33
  129. package/core/layout/public-api.d.ts +2 -2
  130. package/core/layout/rtl.directive.d.ts +16 -16
  131. package/core/portal/attach.directive.d.ts +10 -10
  132. package/core/portal/index.d.ts +1 -1
  133. package/core/portal/portal.service.d.ts +9 -9
  134. package/core/portal/public-api.d.ts +3 -3
  135. package/core/portal/target.directive.d.ts +9 -9
  136. package/core/public-api.d.ts +7 -7
  137. package/core/scroll-to/index.d.ts +1 -1
  138. package/core/scroll-to/public-api.d.ts +1 -1
  139. package/core/scroll-to/scroll-to.service.d.ts +8 -8
  140. package/date/date.component.d.ts +66 -66
  141. package/date/date.model.d.ts +26 -26
  142. package/date/date.module.d.ts +5 -5
  143. package/date/pepperi-addons-ngx-lib-date.d.ts +5 -5
  144. package/date/public-api.d.ts +2 -2
  145. package/dialog/default-dialog.component.d.ts +9 -9
  146. package/dialog/dialog.component.d.ts +10 -10
  147. package/dialog/dialog.model.d.ts +27 -27
  148. package/dialog/dialog.module.d.ts +5 -5
  149. package/dialog/dialog.service.d.ts +24 -24
  150. package/dialog/pepperi-addons-ngx-lib-dialog.d.ts +5 -5
  151. package/dialog/public-api.d.ts +4 -4
  152. package/draggable-items/draggable-item/draggable-item.component.d.ts +8 -8
  153. package/draggable-items/draggable-items.component.d.ts +33 -33
  154. package/draggable-items/draggable-items.model.d.ts +7 -7
  155. package/draggable-items/draggable-items.module.d.ts +5 -5
  156. package/draggable-items/pepperi-addons-ngx-lib-draggable-items.d.ts +4 -4
  157. package/draggable-items/public-api.d.ts +4 -4
  158. package/esm2015/address/address.component.js +96 -96
  159. package/esm2015/address/address.module.js +30 -30
  160. package/esm2015/address/pepperi-addons-ngx-lib-address.js +4 -4
  161. package/esm2015/address/public-api.js +5 -5
  162. package/esm2015/attachment/attachment.component.js +208 -208
  163. package/esm2015/attachment/attachment.module.js +28 -28
  164. package/esm2015/attachment/pepperi-addons-ngx-lib-attachment.js +4 -4
  165. package/esm2015/attachment/public-api.js +5 -5
  166. package/esm2015/bread-crumbs/bread-crumbs.component.js +78 -78
  167. package/esm2015/bread-crumbs/bread-crumbs.model.js +6 -6
  168. package/esm2015/bread-crumbs/bread-crumbs.module.js +34 -34
  169. package/esm2015/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.js +4 -4
  170. package/esm2015/bread-crumbs/public-api.js +6 -6
  171. package/esm2015/button/button.component.js +127 -127
  172. package/esm2015/button/button.model.js +5 -5
  173. package/esm2015/button/button.module.js +26 -26
  174. package/esm2015/button/pepperi-addons-ngx-lib-button.js +4 -4
  175. package/esm2015/button/public-api.js +6 -6
  176. package/esm2015/carousel/carousel-item.directive.js +26 -26
  177. package/esm2015/carousel/carousel.component.js +699 -699
  178. package/esm2015/carousel/carousel.module.js +11 -11
  179. package/esm2015/carousel/pepperi-addons-ngx-lib-carousel.js +4 -4
  180. package/esm2015/carousel/public-api.js +7 -7
  181. package/esm2015/checkbox/checkbox.component.js +151 -151
  182. package/esm2015/checkbox/checkbox.module.js +39 -39
  183. package/esm2015/checkbox/pepperi-addons-ngx-lib-checkbox.js +4 -4
  184. package/esm2015/checkbox/public-api.js +5 -5
  185. package/esm2015/color/color-picker.component.js +197 -197
  186. package/esm2015/color/color.component.js +74 -74
  187. package/esm2015/color/color.model.js +1 -1
  188. package/esm2015/color/color.module.js +57 -57
  189. package/esm2015/color/pepperi-addons-ngx-lib-color.js +5 -5
  190. package/esm2015/color/public-api.js +6 -6
  191. package/esm2015/core/clipboard/clipboard.directive.js +19 -19
  192. package/esm2015/core/clipboard/clipboard.service.js +11 -11
  193. package/esm2015/core/clipboard/index.js +4 -4
  194. package/esm2015/core/clipboard/public-api.js +5 -5
  195. package/esm2015/core/common/directives/auto-width.directive.js +77 -77
  196. package/esm2015/core/common/directives/button-blur.directive.js +22 -22
  197. package/esm2015/core/common/directives/button-loader.directive.js +102 -102
  198. package/esm2015/core/common/directives/data-qa.directive.js +22 -22
  199. package/esm2015/core/common/directives/index.js +4 -4
  200. package/esm2015/core/common/directives/menu-blur.directive.js +28 -28
  201. package/esm2015/core/common/directives/prevent-multi-click.directive.js +21 -21
  202. package/esm2015/core/common/directives/print.directive.js +134 -134
  203. package/esm2015/core/common/directives/public-api.js +11 -11
  204. package/esm2015/core/common/index.js +4 -4
  205. package/esm2015/core/common/model/index.js +4 -4
  206. package/esm2015/core/common/model/papi.model.js +2 -2
  207. package/esm2015/core/common/model/public-api.js +6 -6
  208. package/esm2015/core/common/model/utilities.model.js +56 -56
  209. package/esm2015/core/common/model/wapi.model.js +155 -155
  210. package/esm2015/core/common/pipes/common-pipes.js +141 -141
  211. package/esm2015/core/common/pipes/date-ago.pipe.js +45 -0
  212. package/esm2015/core/common/pipes/index.js +4 -4
  213. package/esm2015/core/common/pipes/public-api.js +6 -5
  214. package/esm2015/core/common/public-api.js +7 -7
  215. package/esm2015/core/common/services/addon.service.js +160 -160
  216. package/esm2015/core/common/services/color.service.js +356 -356
  217. package/esm2015/core/common/services/cookie.service.js +147 -147
  218. package/esm2015/core/common/services/data-convertor.service.js +117 -117
  219. package/esm2015/core/common/services/file.service.js +211 -211
  220. package/esm2015/core/common/services/index.js +4 -4
  221. package/esm2015/core/common/services/jwt-helper.service.js +103 -103
  222. package/esm2015/core/common/services/public-api.js +14 -14
  223. package/esm2015/core/common/services/session.service.js +72 -72
  224. package/esm2015/core/common/services/translate.service.js +47 -47
  225. package/esm2015/core/common/services/utilities.service.js +125 -125
  226. package/esm2015/core/common/services/validator.service.js +272 -272
  227. package/esm2015/core/common/services/window-scrolling.service.js +30 -30
  228. package/esm2015/core/customization/customization.model.js +289 -289
  229. package/esm2015/core/customization/customization.service.js +777 -777
  230. package/esm2015/core/customization/index.js +4 -4
  231. package/esm2015/core/customization/public-api.js +5 -5
  232. package/esm2015/core/http/index.js +4 -4
  233. package/esm2015/core/http/interceptors/error.interceptor.js +23 -23
  234. package/esm2015/core/http/interceptors/index.js +23 -23
  235. package/esm2015/core/http/interceptors/loader.interceptor.js +32 -32
  236. package/esm2015/core/http/interceptors/profiler.interceptor.js +28 -28
  237. package/esm2015/core/http/public-api.js +5 -5
  238. package/esm2015/core/http/services/http.service.js +160 -160
  239. package/esm2015/core/http/services/loader.service.js +48 -48
  240. package/esm2015/core/index.js +4 -4
  241. package/esm2015/core/layout/index.js +4 -4
  242. package/esm2015/core/layout/layout.service.js +168 -168
  243. package/esm2015/core/layout/public-api.js +5 -5
  244. package/esm2015/core/layout/rtl.directive.js +46 -46
  245. package/esm2015/core/portal/attach.directive.js +26 -26
  246. package/esm2015/core/portal/index.js +4 -4
  247. package/esm2015/core/portal/portal.service.js +34 -34
  248. package/esm2015/core/portal/public-api.js +6 -6
  249. package/esm2015/core/portal/target.directive.js +23 -23
  250. package/esm2015/core/public-api.js +10 -10
  251. package/esm2015/core/scroll-to/index.js +4 -4
  252. package/esm2015/core/scroll-to/public-api.js +5 -5
  253. package/esm2015/core/scroll-to/scroll-to.service.js +81 -81
  254. package/esm2015/date/date.component.js +251 -251
  255. package/esm2015/date/date.model.js +44 -44
  256. package/esm2015/date/date.module.js +50 -50
  257. package/esm2015/date/pepperi-addons-ngx-lib-date.js +5 -5
  258. package/esm2015/date/public-api.js +5 -5
  259. package/esm2015/dialog/default-dialog.component.js +31 -31
  260. package/esm2015/dialog/dialog.component.js +28 -28
  261. package/esm2015/dialog/dialog.model.js +21 -21
  262. package/esm2015/dialog/dialog.module.js +39 -39
  263. package/esm2015/dialog/dialog.service.js +76 -76
  264. package/esm2015/dialog/pepperi-addons-ngx-lib-dialog.js +5 -5
  265. package/esm2015/dialog/public-api.js +7 -7
  266. package/esm2015/draggable-items/draggable-item/draggable-item.component.js +24 -24
  267. package/esm2015/draggable-items/draggable-items.component.js +91 -91
  268. package/esm2015/draggable-items/draggable-items.model.js +1 -1
  269. package/esm2015/draggable-items/draggable-items.module.js +42 -42
  270. package/esm2015/draggable-items/pepperi-addons-ngx-lib-draggable-items.js +4 -4
  271. package/esm2015/draggable-items/public-api.js +7 -7
  272. package/esm2015/field-title/field-title.component.js +31 -31
  273. package/esm2015/field-title/field-title.module.js +31 -31
  274. package/esm2015/field-title/pepperi-addons-ngx-lib-field-title.js +4 -4
  275. package/esm2015/field-title/public-api.js +5 -5
  276. package/esm2015/files-uploader/files-uploader.component.js +220 -220
  277. package/esm2015/files-uploader/files-uploader.module.js +49 -49
  278. package/esm2015/files-uploader/pepperi-addons-ngx-lib-files-uploader.js +4 -4
  279. package/esm2015/files-uploader/public-api.js +5 -5
  280. package/esm2015/form/field-generator.component.js +121 -121
  281. package/esm2015/form/form.component.js +1196 -1196
  282. package/esm2015/form/form.model.js +1 -1
  283. package/esm2015/form/form.module.js +107 -107
  284. package/esm2015/form/indicators.component.js +20 -20
  285. package/esm2015/form/internal-button.component.js +165 -165
  286. package/esm2015/form/internal-carusel.component.js +115 -115
  287. package/esm2015/form/internal-carusel.service.js +31 -31
  288. package/esm2015/form/internal-list.component.js +494 -494
  289. package/esm2015/form/internal-menu.component.js +54 -54
  290. package/esm2015/form/internal-page.component.js +350 -350
  291. package/esm2015/form/internal-page.service.js +120 -120
  292. package/esm2015/form/pepperi-addons-ngx-lib-form.js +13 -13
  293. package/esm2015/form/public-api.js +6 -6
  294. package/esm2015/group-buttons/group-buttons.component.js +57 -57
  295. package/esm2015/group-buttons/group-buttons.module.js +37 -37
  296. package/esm2015/group-buttons/pepperi-addons-ngx-lib-group-buttons.js +4 -4
  297. package/esm2015/group-buttons/public-api.js +5 -5
  298. package/esm2015/icon/icon-generated-all.model.js +100 -100
  299. package/esm2015/icon/icon-generated.model.js +389 -389
  300. package/esm2015/icon/icon-registry.service.js +22 -22
  301. package/esm2015/icon/icon.component.js +124 -124
  302. package/esm2015/icon/icon.module.js +14 -14
  303. package/esm2015/icon/icon.service.js +31 -31
  304. package/esm2015/icon/pepperi-addons-ngx-lib-icon.js +4 -4
  305. package/esm2015/icon/public-api.js +10 -10
  306. package/esm2015/image/image.component.js +228 -228
  307. package/esm2015/image/image.module.js +48 -48
  308. package/esm2015/image/image.service.js +54 -54
  309. package/esm2015/image/pepperi-addons-ngx-lib-image.js +4 -4
  310. package/esm2015/image/public-api.js +6 -6
  311. package/esm2015/images-filmstrip/images-filmstrip.component.js +372 -372
  312. package/esm2015/images-filmstrip/images-filmstrip.module.js +70 -70
  313. package/esm2015/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.js +4 -4
  314. package/esm2015/images-filmstrip/public-api.js +5 -5
  315. package/esm2015/link/link.component.js +315 -315
  316. package/esm2015/link/link.module.js +50 -50
  317. package/esm2015/link/link.pipes.js +13 -13
  318. package/esm2015/link/pepperi-addons-ngx-lib-link.js +5 -5
  319. package/esm2015/link/public-api.js +5 -5
  320. package/esm2015/list/list-actions.component.js +35 -35
  321. package/esm2015/list/list-carousel.component.js +94 -94
  322. package/esm2015/list/list-chooser.component.js +57 -57
  323. package/esm2015/list/list-pager.component.js +112 -112
  324. package/esm2015/list/list-sorting.component.js +54 -54
  325. package/esm2015/list/list-total.component.js +23 -23
  326. package/esm2015/list/list-views.component.js +71 -71
  327. package/esm2015/list/list.component.js +1127 -1127
  328. package/esm2015/list/list.model.js +3 -3
  329. package/esm2015/list/list.module.js +87 -87
  330. package/esm2015/list/list.pipes.js +39 -39
  331. package/esm2015/list/pepperi-addons-ngx-lib-list.js +6 -6
  332. package/esm2015/list/public-api.js +14 -14
  333. package/esm2015/list/virtual-scroller.js +1018 -1018
  334. package/esm2015/menu/menu-item.component.js +102 -102
  335. package/esm2015/menu/menu.component.js +173 -173
  336. package/esm2015/menu/menu.model.js +18 -18
  337. package/esm2015/menu/menu.module.js +39 -39
  338. package/esm2015/menu/pepperi-addons-ngx-lib-menu.js +5 -5
  339. package/esm2015/menu/public-api.js +6 -6
  340. package/esm2015/ngx-lib.module.js +79 -77
  341. package/esm2015/page-layout/page-layout.component.js +41 -41
  342. package/esm2015/page-layout/page-layout.module.js +20 -20
  343. package/esm2015/page-layout/pepperi-addons-ngx-lib-page-layout.js +4 -4
  344. package/esm2015/page-layout/public-api.js +5 -5
  345. package/esm2015/pepperi-addons-ngx-lib.js +8 -8
  346. package/esm2015/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.js +4 -4
  347. package/esm2015/profile-data-views-list/profile-data-view/profile-data-view.component.js +38 -38
  348. package/esm2015/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.js +59 -59
  349. package/esm2015/profile-data-views-list/profile-data-views-list.component.js +86 -86
  350. package/esm2015/profile-data-views-list/profile-data-views-list.model.js +1 -1
  351. package/esm2015/profile-data-views-list/profile-data-views-list.module.js +56 -56
  352. package/esm2015/profile-data-views-list/public-api.js +8 -8
  353. package/esm2015/public-api.js +5 -5
  354. package/esm2015/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.js +6 -6
  355. package/esm2015/quantity-selector/public-api.js +5 -5
  356. package/esm2015/quantity-selector/quantity-selector-validation.directive.js +43 -43
  357. package/esm2015/quantity-selector/quantity-selector.component.js +467 -467
  358. package/esm2015/quantity-selector/quantity-selector.module.js +52 -52
  359. package/esm2015/quantity-selector/quantity-selector.pipes.js +18 -18
  360. package/esm2015/query-builder/common/model/field.js +1 -1
  361. package/esm2015/query-builder/common/model/filter.js +1 -1
  362. package/esm2015/query-builder/common/model/legacy.js +2 -2
  363. package/esm2015/query-builder/common/model/operator-unit.js +41 -41
  364. package/esm2015/query-builder/common/model/operator.js +266 -255
  365. package/esm2015/query-builder/common/model/structure.js +1 -1
  366. package/esm2015/query-builder/common/model/type-map.js +27 -27
  367. package/esm2015/query-builder/common/model/type.js +5 -5
  368. package/esm2015/query-builder/common/services/output-query.service.js +112 -112
  369. package/esm2015/query-builder/common/services/query-structure.service.js +229 -229
  370. package/esm2015/query-builder/common/services/type-convertor.service.js +39 -39
  371. package/esm2015/query-builder/pepperi-addons-ngx-lib-query-builder.js +9 -9
  372. package/esm2015/query-builder/public-api.js +8 -8
  373. package/esm2015/query-builder/query-builder-item/query-builder-item.component.js +118 -118
  374. package/esm2015/query-builder/query-builder-section/query-builder-section.component.js +63 -63
  375. package/esm2015/query-builder/query-builder.component.js +107 -107
  376. package/esm2015/query-builder/query-builder.module.js +34 -34
  377. package/esm2015/query-builder/query-builder.service.js +102 -102
  378. package/esm2015/remote-loader/addon-block-loader.component.js +68 -68
  379. package/esm2015/remote-loader/pepperi-addons-ngx-lib-remote-loader.js +4 -4
  380. package/esm2015/remote-loader/public-api.js +8 -8
  381. package/esm2015/remote-loader/remote-loader.component.js +114 -114
  382. package/esm2015/remote-loader/remote-loader.model.js +1 -1
  383. package/esm2015/remote-loader/remote-loader.module.js +35 -35
  384. package/esm2015/remote-loader/remote-loader.service.js +111 -111
  385. package/esm2015/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.js +4 -4
  386. package/esm2015/rich-html-textarea/public-api.js +5 -5
  387. package/esm2015/rich-html-textarea/rich-html-textarea.component.js +219 -219
  388. package/esm2015/rich-html-textarea/rich-html-textarea.module.js +56 -56
  389. package/esm2015/search/pepperi-addons-ngx-lib-search.js +4 -4
  390. package/esm2015/search/public-api.js +6 -6
  391. package/esm2015/search/search.component.js +273 -273
  392. package/esm2015/search/search.model.js +1 -1
  393. package/esm2015/search/search.module.js +44 -44
  394. package/esm2015/select/pepperi-addons-ngx-lib-select.js +4 -4
  395. package/esm2015/select/public-api.js +5 -5
  396. package/esm2015/select/select.component.js +211 -211
  397. package/esm2015/select/select.module.js +42 -42
  398. package/esm2015/separator/pepperi-addons-ngx-lib-separator.js +4 -4
  399. package/esm2015/separator/public-api.js +5 -5
  400. package/esm2015/separator/separator.component.js +62 -62
  401. package/esm2015/separator/separator.module.js +12 -12
  402. package/esm2015/side-bar/pepperi-addons-ngx-lib-side-bar.js +4 -4
  403. package/esm2015/side-bar/public-api.js +6 -6
  404. package/esm2015/side-bar/side-bar.component.js +130 -130
  405. package/esm2015/side-bar/side-bar.model.js +1 -1
  406. package/esm2015/side-bar/side-bar.module.js +33 -33
  407. package/esm2015/signature/pepperi-addons-ngx-lib-signature.js +4 -4
  408. package/esm2015/signature/public-api.js +5 -5
  409. package/esm2015/signature/signature.component.js +233 -233
  410. package/esm2015/signature/signature.module.js +54 -54
  411. package/esm2015/size-detector/pepperi-addons-ngx-lib-size-detector.js +4 -4
  412. package/esm2015/size-detector/public-api.js +5 -5
  413. package/esm2015/size-detector/size-detector.component.js +88 -88
  414. package/esm2015/size-detector/size-detector.module.js +21 -21
  415. package/esm2015/slider/pepperi-addons-ngx-lib-slider.js +4 -4
  416. package/esm2015/slider/public-api.js +5 -5
  417. package/esm2015/slider/slider.component.js +95 -95
  418. package/esm2015/slider/slider.module.js +24 -24
  419. package/esm2015/smart-filters/boolean-filter/boolean-filter.component.js +70 -70
  420. package/esm2015/smart-filters/common/filter-actions.component.js +25 -25
  421. package/esm2015/smart-filters/common/model/base-filter-component.js +291 -291
  422. package/esm2015/smart-filters/common/model/creator.js +75 -75
  423. package/esm2015/smart-filters/common/model/field.js +116 -116
  424. package/esm2015/smart-filters/common/model/filter.js +1 -1
  425. package/esm2015/smart-filters/common/model/operator.js +271 -282
  426. package/esm2015/smart-filters/common/model/type.js +2 -2
  427. package/esm2015/smart-filters/date-filter/date-filter.component.js +164 -156
  428. package/esm2015/smart-filters/multi-select-filter/multi-select-filter.component.js +191 -153
  429. package/esm2015/smart-filters/number-filter/number-filter.component.js +109 -109
  430. package/esm2015/smart-filters/pepperi-addons-ngx-lib-smart-filters.js +4 -4
  431. package/esm2015/smart-filters/public-api.js +18 -18
  432. package/esm2015/smart-filters/smart-filters.component.js +130 -130
  433. package/esm2015/smart-filters/smart-filters.module.js +90 -90
  434. package/esm2015/smart-filters/text-filter/text-filter.component.js +86 -86
  435. package/esm2015/snack-bar/default-snack-bar.component.js +27 -27
  436. package/esm2015/snack-bar/pepperi-addons-ngx-lib-snack-bar.js +5 -5
  437. package/esm2015/snack-bar/public-api.js +7 -7
  438. package/esm2015/snack-bar/snack-bar.component.js +25 -25
  439. package/esm2015/snack-bar/snack-bar.model.js +6 -6
  440. package/esm2015/snack-bar/snack-bar.module.js +41 -41
  441. package/esm2015/snack-bar/snack-bar.service.js +62 -62
  442. package/esm2015/textarea/pepperi-addons-ngx-lib-textarea.js +4 -4
  443. package/esm2015/textarea/public-api.js +5 -5
  444. package/esm2015/textarea/textarea.component.js +160 -160
  445. package/esm2015/textarea/textarea.module.js +50 -50
  446. package/esm2015/textbox/pepperi-addons-ngx-lib-textbox.js +5 -5
  447. package/esm2015/textbox/public-api.js +5 -5
  448. package/esm2015/textbox/textbox-validation.directive.js +85 -85
  449. package/esm2015/textbox/textbox.component.js +391 -391
  450. package/esm2015/textbox/textbox.module.js +44 -44
  451. package/esm2015/textbox-icon/pepperi-addons-ngx-lib-textbox-icon.js +4 -4
  452. package/esm2015/textbox-icon/public-api.js +5 -5
  453. package/esm2015/textbox-icon/textbox-icon.component.js +40 -40
  454. package/esm2015/textbox-icon/textbox-icon.module.js +46 -46
  455. package/esm2015/top-bar/pepperi-addons-ngx-lib-top-bar.js +4 -4
  456. package/esm2015/top-bar/public-api.js +6 -6
  457. package/esm2015/top-bar/top-bar.component.js +98 -98
  458. package/esm2015/top-bar/top-bar.model.js +1 -1
  459. package/esm2015/top-bar/top-bar.module.js +40 -40
  460. package/fesm2015/pepperi-addons-ngx-lib-address.js +116 -116
  461. package/fesm2015/pepperi-addons-ngx-lib-attachment.js +227 -227
  462. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.js +109 -109
  463. package/fesm2015/pepperi-addons-ngx-lib-button.js +149 -149
  464. package/fesm2015/pepperi-addons-ngx-lib-carousel.js +731 -731
  465. package/fesm2015/pepperi-addons-ngx-lib-checkbox.js +178 -178
  466. package/fesm2015/pepperi-addons-ngx-lib-color.js +295 -295
  467. package/fesm2015/pepperi-addons-ngx-lib-date.js +320 -320
  468. package/fesm2015/pepperi-addons-ngx-lib-dialog.js +170 -170
  469. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.js +143 -143
  470. package/fesm2015/pepperi-addons-ngx-lib-field-title.js +55 -55
  471. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.js +252 -252
  472. package/fesm2015/pepperi-addons-ngx-lib-form.js +2693 -2693
  473. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.js +84 -84
  474. package/fesm2015/pepperi-addons-ngx-lib-icon.js +662 -662
  475. package/fesm2015/pepperi-addons-ngx-lib-image.js +306 -306
  476. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.js +409 -409
  477. package/fesm2015/pepperi-addons-ngx-lib-link.js +358 -358
  478. package/fesm2015/pepperi-addons-ngx-lib-list.js +2661 -2661
  479. package/fesm2015/pepperi-addons-ngx-lib-menu.js +314 -314
  480. package/fesm2015/pepperi-addons-ngx-lib-page-layout.js +55 -55
  481. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.js +219 -219
  482. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.js +556 -556
  483. package/fesm2015/pepperi-addons-ngx-lib-query-builder.js +1087 -1076
  484. package/fesm2015/pepperi-addons-ngx-lib-query-builder.js.map +1 -1
  485. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.js +303 -303
  486. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.js +256 -256
  487. package/fesm2015/pepperi-addons-ngx-lib-search.js +301 -301
  488. package/fesm2015/pepperi-addons-ngx-lib-select.js +241 -241
  489. package/fesm2015/pepperi-addons-ngx-lib-separator.js +71 -71
  490. package/fesm2015/pepperi-addons-ngx-lib-side-bar.js +154 -154
  491. package/fesm2015/pepperi-addons-ngx-lib-signature.js +270 -270
  492. package/fesm2015/pepperi-addons-ngx-lib-size-detector.js +103 -103
  493. package/fesm2015/pepperi-addons-ngx-lib-slider.js +112 -112
  494. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js +1539 -1504
  495. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.js.map +1 -1
  496. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.js +137 -137
  497. package/fesm2015/pepperi-addons-ngx-lib-textarea.js +194 -194
  498. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.js +78 -78
  499. package/fesm2015/pepperi-addons-ngx-lib-textbox.js +501 -501
  500. package/fesm2015/pepperi-addons-ngx-lib-top-bar.js +125 -125
  501. package/fesm2015/pepperi-addons-ngx-lib.js +4178 -4134
  502. package/fesm2015/pepperi-addons-ngx-lib.js.map +1 -1
  503. package/field-title/field-title.component.d.ts +11 -11
  504. package/field-title/field-title.module.d.ts +5 -5
  505. package/field-title/pepperi-addons-ngx-lib-field-title.d.ts +4 -4
  506. package/field-title/public-api.d.ts +2 -2
  507. package/files-uploader/files-uploader.component.d.ts +53 -53
  508. package/files-uploader/files-uploader.module.d.ts +5 -5
  509. package/files-uploader/pepperi-addons-ngx-lib-files-uploader.d.ts +4 -4
  510. package/files-uploader/public-api.d.ts +2 -2
  511. package/form/field-generator.component.d.ts +36 -36
  512. package/form/form.component.d.ts +90 -90
  513. package/form/form.model.d.ts +20 -20
  514. package/form/form.module.d.ts +5 -5
  515. package/form/indicators.component.d.ts +7 -7
  516. package/form/internal-button.component.d.ts +39 -39
  517. package/form/internal-carusel.component.d.ts +38 -38
  518. package/form/internal-carusel.service.d.ts +7 -7
  519. package/form/internal-list.component.d.ts +92 -92
  520. package/form/internal-menu.component.d.ts +16 -16
  521. package/form/internal-page.component.d.ts +72 -72
  522. package/form/internal-page.service.d.ts +19 -19
  523. package/form/pepperi-addons-ngx-lib-form.d.ts +13 -13
  524. package/form/public-api.d.ts +3 -3
  525. package/group-buttons/group-buttons.component.d.ts +20 -20
  526. package/group-buttons/group-buttons.module.d.ts +5 -5
  527. package/group-buttons/pepperi-addons-ngx-lib-group-buttons.d.ts +4 -4
  528. package/group-buttons/public-api.d.ts +2 -2
  529. package/icon/icon-generated-all.model.d.ts +99 -99
  530. package/icon/icon-generated.model.d.ts +394 -394
  531. package/icon/icon-registry.service.d.ts +6 -6
  532. package/icon/icon.component.d.ts +46 -46
  533. package/icon/icon.module.d.ts +2 -2
  534. package/icon/icon.service.d.ts +10 -10
  535. package/icon/pepperi-addons-ngx-lib-icon.d.ts +4 -4
  536. package/icon/public-api.d.ts +6 -6
  537. package/image/image.component.d.ts +63 -63
  538. package/image/image.module.d.ts +5 -5
  539. package/image/image.service.d.ts +11 -11
  540. package/image/pepperi-addons-ngx-lib-image.d.ts +4 -4
  541. package/image/public-api.d.ts +3 -3
  542. package/images-filmstrip/images-filmstrip.component.d.ts +84 -84
  543. package/images-filmstrip/images-filmstrip.module.d.ts +5 -5
  544. package/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.d.ts +4 -4
  545. package/images-filmstrip/public-api.d.ts +2 -2
  546. package/link/link.component.d.ts +131 -131
  547. package/link/link.module.d.ts +5 -5
  548. package/link/link.pipes.d.ts +4 -4
  549. package/link/pepperi-addons-ngx-lib-link.d.ts +5 -5
  550. package/link/public-api.d.ts +2 -2
  551. package/list/list-actions.component.d.ts +14 -14
  552. package/list/list-carousel.component.d.ts +36 -36
  553. package/list/list-chooser.component.d.ts +25 -25
  554. package/list/list-pager.component.d.ts +35 -35
  555. package/list/list-sorting.component.d.ts +26 -26
  556. package/list/list-total.component.d.ts +7 -7
  557. package/list/list-views.component.d.ts +31 -31
  558. package/list/list.component.d.ts +161 -161
  559. package/list/list.model.d.ts +31 -31
  560. package/list/list.module.d.ts +5 -5
  561. package/list/list.pipes.d.ts +11 -11
  562. package/list/pepperi-addons-ngx-lib-list.d.ts +6 -6
  563. package/list/public-api.d.ts +10 -10
  564. package/list/virtual-scroller.d.ts +176 -176
  565. package/menu/menu-item.component.d.ts +25 -25
  566. package/menu/menu.component.d.ts +43 -43
  567. package/menu/menu.model.d.ts +25 -25
  568. package/menu/menu.module.d.ts +5 -5
  569. package/menu/pepperi-addons-ngx-lib-menu.d.ts +5 -5
  570. package/menu/public-api.d.ts +3 -3
  571. package/ngx-lib.module.d.ts +2 -2
  572. package/package.json +1 -1
  573. package/page-layout/page-layout.component.d.ts +16 -16
  574. package/page-layout/page-layout.module.d.ts +2 -2
  575. package/page-layout/pepperi-addons-ngx-lib-page-layout.d.ts +4 -4
  576. package/page-layout/public-api.d.ts +2 -2
  577. package/pepperi-addons-ngx-lib.d.ts +8 -8
  578. package/pepperi-addons-ngx-lib.metadata.json +1 -1
  579. package/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.d.ts +4 -4
  580. package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +15 -15
  581. package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +21 -21
  582. package/profile-data-views-list/profile-data-views-list.component.d.ts +32 -32
  583. package/profile-data-views-list/profile-data-views-list.model.d.ts +18 -18
  584. package/profile-data-views-list/profile-data-views-list.module.d.ts +5 -5
  585. package/profile-data-views-list/public-api.d.ts +5 -5
  586. package/public-api.d.ts +2 -2
  587. package/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.d.ts +6 -6
  588. package/quantity-selector/public-api.d.ts +2 -2
  589. package/quantity-selector/quantity-selector-validation.directive.d.ts +13 -13
  590. package/quantity-selector/quantity-selector.component.d.ts +98 -98
  591. package/quantity-selector/quantity-selector.module.d.ts +5 -5
  592. package/quantity-selector/quantity-selector.pipes.d.ts +4 -4
  593. package/query-builder/common/model/field.d.ts +8 -8
  594. package/query-builder/common/model/filter.d.ts +6 -6
  595. package/query-builder/common/model/legacy.d.ts +29 -29
  596. package/query-builder/common/model/operator-unit.d.ts +13 -13
  597. package/query-builder/common/model/operator.d.ts +21 -21
  598. package/query-builder/common/model/structure.d.ts +4 -4
  599. package/query-builder/common/model/type-map.d.ts +12 -12
  600. package/query-builder/common/model/type.d.ts +4 -4
  601. package/query-builder/common/services/output-query.service.d.ts +44 -44
  602. package/query-builder/common/services/query-structure.service.d.ts +78 -78
  603. package/query-builder/common/services/type-convertor.service.d.ts +10 -10
  604. package/query-builder/pepperi-addons-ngx-lib-query-builder.d.ts +9 -9
  605. package/query-builder/pepperi-addons-ngx-lib-query-builder.metadata.json +1 -1
  606. package/query-builder/public-api.d.ts +5 -5
  607. package/query-builder/query-builder-item/query-builder-item.component.d.ts +38 -38
  608. package/query-builder/query-builder-section/query-builder-section.component.d.ts +27 -27
  609. package/query-builder/query-builder.component.d.ts +36 -36
  610. package/query-builder/query-builder.module.d.ts +2 -2
  611. package/query-builder/query-builder.service.d.ts +27 -27
  612. package/remote-loader/addon-block-loader.component.d.ts +25 -25
  613. package/remote-loader/pepperi-addons-ngx-lib-remote-loader.d.ts +4 -4
  614. package/remote-loader/public-api.d.ts +5 -5
  615. package/remote-loader/remote-loader.component.d.ts +24 -24
  616. package/remote-loader/remote-loader.model.d.ts +34 -34
  617. package/remote-loader/remote-loader.module.d.ts +2 -2
  618. package/remote-loader/remote-loader.service.d.ts +23 -23
  619. package/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.d.ts +4 -4
  620. package/rich-html-textarea/public-api.d.ts +2 -2
  621. package/rich-html-textarea/rich-html-textarea.component.d.ts +75 -75
  622. package/rich-html-textarea/rich-html-textarea.module.d.ts +5 -5
  623. package/search/pepperi-addons-ngx-lib-search.d.ts +4 -4
  624. package/search/public-api.d.ts +3 -3
  625. package/search/search.component.d.ts +61 -61
  626. package/search/search.model.d.ts +14 -14
  627. package/search/search.module.d.ts +5 -5
  628. package/select/pepperi-addons-ngx-lib-select.d.ts +4 -4
  629. package/select/public-api.d.ts +2 -2
  630. package/select/select.component.d.ts +50 -50
  631. package/select/select.module.d.ts +5 -5
  632. package/separator/pepperi-addons-ngx-lib-separator.d.ts +4 -4
  633. package/separator/public-api.d.ts +2 -2
  634. package/separator/separator.component.d.ts +19 -19
  635. package/separator/separator.module.d.ts +2 -2
  636. package/side-bar/pepperi-addons-ngx-lib-side-bar.d.ts +4 -4
  637. package/side-bar/public-api.d.ts +3 -3
  638. package/side-bar/side-bar.component.d.ts +38 -38
  639. package/side-bar/side-bar.model.d.ts +4 -4
  640. package/side-bar/side-bar.module.d.ts +5 -5
  641. package/signature/pepperi-addons-ngx-lib-signature.d.ts +4 -4
  642. package/signature/public-api.d.ts +2 -2
  643. package/signature/signature.component.d.ts +65 -65
  644. package/signature/signature.module.d.ts +5 -5
  645. package/size-detector/pepperi-addons-ngx-lib-size-detector.d.ts +4 -4
  646. package/size-detector/public-api.d.ts +2 -2
  647. package/size-detector/size-detector.component.d.ts +26 -26
  648. package/size-detector/size-detector.module.d.ts +2 -2
  649. package/slider/pepperi-addons-ngx-lib-slider.d.ts +4 -4
  650. package/slider/public-api.d.ts +2 -2
  651. package/slider/slider.component.d.ts +36 -36
  652. package/slider/slider.module.d.ts +2 -2
  653. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +25 -26
  654. package/smart-filters/common/filter-actions.component.d.ts +9 -9
  655. package/smart-filters/common/model/base-filter-component.d.ts +70 -70
  656. package/smart-filters/common/model/creator.d.ts +6 -6
  657. package/smart-filters/common/model/field.d.ts +69 -69
  658. package/smart-filters/common/model/filter.d.ts +11 -11
  659. package/smart-filters/common/model/operator.d.ts +51 -50
  660. package/smart-filters/common/model/type.d.ts +4 -4
  661. package/smart-filters/date-filter/date-filter.component.d.ts +56 -54
  662. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +53 -39
  663. package/smart-filters/number-filter/number-filter.component.d.ts +48 -47
  664. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.d.ts +4 -4
  665. package/smart-filters/pepperi-addons-ngx-lib-smart-filters.metadata.json +1 -1
  666. package/smart-filters/public-api.d.ts +14 -14
  667. package/smart-filters/smart-filters.component.d.ts +32 -32
  668. package/smart-filters/smart-filters.module.d.ts +5 -5
  669. package/smart-filters/text-filter/text-filter.component.d.ts +25 -26
  670. package/snack-bar/default-snack-bar.component.d.ts +10 -10
  671. package/snack-bar/pepperi-addons-ngx-lib-snack-bar.d.ts +5 -5
  672. package/snack-bar/public-api.d.ts +4 -4
  673. package/snack-bar/snack-bar.component.d.ts +9 -9
  674. package/snack-bar/snack-bar.model.d.ts +8 -8
  675. package/snack-bar/snack-bar.module.d.ts +5 -5
  676. package/snack-bar/snack-bar.service.d.ts +21 -21
  677. package/src/assets/i18n/en.ngx-lib.json +16 -1
  678. package/textarea/pepperi-addons-ngx-lib-textarea.d.ts +4 -4
  679. package/textarea/public-api.d.ts +2 -2
  680. package/textarea/textarea.component.d.ts +51 -51
  681. package/textarea/textarea.module.d.ts +5 -5
  682. package/textbox/pepperi-addons-ngx-lib-textbox.d.ts +5 -5
  683. package/textbox/public-api.d.ts +2 -2
  684. package/textbox/textbox-validation.directive.d.ts +18 -18
  685. package/textbox/textbox.component.d.ts +134 -134
  686. package/textbox/textbox.module.d.ts +5 -5
  687. package/textbox-icon/pepperi-addons-ngx-lib-textbox-icon.d.ts +4 -4
  688. package/textbox-icon/public-api.d.ts +2 -2
  689. package/textbox-icon/textbox-icon.component.d.ts +10 -10
  690. package/textbox-icon/textbox-icon.module.d.ts +5 -5
  691. package/top-bar/pepperi-addons-ngx-lib-top-bar.d.ts +4 -4
  692. package/top-bar/public-api.d.ts +3 -3
  693. package/top-bar/top-bar.component.d.ts +36 -36
  694. package/top-bar/top-bar.model.d.ts +4 -4
  695. package/top-bar/top-bar.module.d.ts +5 -5
@@ -4,802 +4,802 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['pepperi-addons'] = global['pepperi-addons'] || {}, global['pepperi-addons']['ngx-lib'] = global['pepperi-addons']['ngx-lib'] || {}, global['pepperi-addons']['ngx-lib'].carousel = {}), global.ng.core, global.ng.common));
5
5
  }(this, (function (exports, core, common) { 'use strict';
6
6
 
7
- var PepCarouselItemDirective = /** @class */ (function () {
8
- function PepCarouselItemDirective(elementRef) {
9
- this.display = 'inline-block';
10
- this._dragDisabled = false;
11
- this._elementRef = elementRef;
12
- }
13
- Object.defineProperty(PepCarouselItemDirective.prototype, "dragDisabled", {
14
- get: function () {
15
- return this._dragDisabled;
16
- },
17
- set: function (value) {
18
- this._dragDisabled = value;
19
- },
20
- enumerable: false,
21
- configurable: true
22
- });
23
- return PepCarouselItemDirective;
24
- }());
25
- PepCarouselItemDirective.decorators = [
26
- { type: core.Directive, args: [{
27
- selector: '[pepCarouselItem]',
28
- },] }
29
- ];
30
- PepCarouselItemDirective.ctorParameters = function () { return [
31
- { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
32
- ]; };
33
- PepCarouselItemDirective.propDecorators = {
34
- display: [{ type: core.HostBinding, args: ['style.display',] }],
35
- dragDisabled: [{ type: core.Input, args: ['dragDisabled',] }]
7
+ var PepCarouselItemDirective = /** @class */ (function () {
8
+ function PepCarouselItemDirective(elementRef) {
9
+ this.display = 'inline-block';
10
+ this._dragDisabled = false;
11
+ this._elementRef = elementRef;
12
+ }
13
+ Object.defineProperty(PepCarouselItemDirective.prototype, "dragDisabled", {
14
+ get: function () {
15
+ return this._dragDisabled;
16
+ },
17
+ set: function (value) {
18
+ this._dragDisabled = value;
19
+ },
20
+ enumerable: false,
21
+ configurable: true
22
+ });
23
+ return PepCarouselItemDirective;
24
+ }());
25
+ PepCarouselItemDirective.decorators = [
26
+ { type: core.Directive, args: [{
27
+ selector: '[pepCarouselItem]',
28
+ },] }
29
+ ];
30
+ PepCarouselItemDirective.ctorParameters = function () { return [
31
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
32
+ ]; };
33
+ PepCarouselItemDirective.propDecorators = {
34
+ display: [{ type: core.HostBinding, args: ['style.display',] }],
35
+ dragDisabled: [{ type: core.Input, args: ['dragDisabled',] }]
36
36
  };
37
37
 
38
- var PepCarouselComponent = /** @class */ (function () {
39
- function PepCarouselComponent(_elementRef, _renderer, _document) {
40
- this._elementRef = _elementRef;
41
- this._renderer = _renderer;
42
- this._document = _document;
43
- this._index = 0;
44
- this._scrollbarHidden = false;
45
- this._disabled = false;
46
- this._xDisabled = false;
47
- this._xWheelEnabled = false;
48
- this._yDisabled = false;
49
- this._dragDisabled = false;
50
- this._snapDisabled = false;
51
- this._snapOffset = 0;
52
- this._snapDuration = 500;
53
- this._isDragging = false;
54
- /**
55
- * Is the user currently pressing the element
56
- */
57
- this.isPressed = false;
58
- /**
59
- * Is the user currently scrolling the element
60
- */
61
- this.isScrolling = false;
62
- /**
63
- * The x coordinates on the element
64
- */
65
- this.downX = 0;
66
- /**
67
- * The y coordinates on the element
68
- */
69
- this.downY = 0;
70
- this.displayType = 'block';
71
- this.elWidth = null;
72
- this.elHeight = null;
73
- this._pointerEvents = 'auto';
74
- this.scrollbarWidth = null;
75
- this.isAnimating = false;
76
- this.prevChildrenLength = 0;
77
- this.indexBound = 0;
78
- this.dsInitialized = new core.EventEmitter();
79
- this.indexChanged = new core.EventEmitter();
80
- this.reachesLeftBound = new core.EventEmitter();
81
- this.reachesRightBound = new core.EventEmitter();
82
- this.snapAnimationFinished = new core.EventEmitter();
83
- this.dragStart = new core.EventEmitter();
84
- this.dragEnd = new core.EventEmitter();
85
- this.scrollbarWidth = this.getScrollbarWidth() + "px";
86
- }
87
- Object.defineProperty(PepCarouselComponent.prototype, "isDragging", {
88
- /**
89
- * Is the user currently dragging the element
90
- */
91
- get: function () {
92
- return this._isDragging;
93
- },
94
- enumerable: false,
95
- configurable: true
96
- });
97
- Object.defineProperty(PepCarouselComponent.prototype, "currIndex", {
98
- get: function () {
99
- return this._index;
100
- },
101
- set: function (value) {
102
- if (value !== this._index) {
103
- this._index = value;
104
- this.indexChanged.emit(value);
105
- }
106
- },
107
- enumerable: false,
108
- configurable: true
109
- });
110
- Object.defineProperty(PepCarouselComponent.prototype, "scrollbarHidden", {
111
- /**
112
- * Whether the scrollbar is hidden
113
- */
114
- get: function () {
115
- return this._scrollbarHidden;
116
- },
117
- set: function (value) {
118
- this._scrollbarHidden = value;
119
- },
120
- enumerable: false,
121
- configurable: true
122
- });
123
- Object.defineProperty(PepCarouselComponent.prototype, "disabled", {
124
- /**
125
- * Whether horizontally and vertically draging and scrolling is be disabled
126
- */
127
- get: function () {
128
- return this._disabled;
129
- },
130
- set: function (value) {
131
- this._disabled = value;
132
- },
133
- enumerable: false,
134
- configurable: true
135
- });
136
- Object.defineProperty(PepCarouselComponent.prototype, "xDisabled", {
137
- /**
138
- * Whether horizontally dragging and scrolling is be disabled
139
- */
140
- get: function () {
141
- return this._xDisabled;
142
- },
143
- set: function (value) {
144
- this._xDisabled = value;
145
- },
146
- enumerable: false,
147
- configurable: true
148
- });
149
- Object.defineProperty(PepCarouselComponent.prototype, "yDisabled", {
150
- /**
151
- * Whether vertically dragging and scrolling events is disabled
152
- */
153
- get: function () {
154
- return this._yDisabled;
155
- },
156
- set: function (value) {
157
- this._yDisabled = value;
158
- },
159
- enumerable: false,
160
- configurable: true
161
- });
162
- Object.defineProperty(PepCarouselComponent.prototype, "xWheelEnabled", {
163
- /**
164
- * Whether scrolling horizontally with mouse wheel is enabled
165
- */
166
- get: function () {
167
- return this._xWheelEnabled;
168
- },
169
- set: function (value) {
170
- this._xWheelEnabled = value;
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Object.defineProperty(PepCarouselComponent.prototype, "dragDisabled", {
176
- get: function () {
177
- return this._dragDisabled;
178
- },
179
- set: function (value) {
180
- this._dragDisabled = value;
181
- },
182
- enumerable: false,
183
- configurable: true
184
- });
185
- Object.defineProperty(PepCarouselComponent.prototype, "snapDisabled", {
186
- get: function () {
187
- return this._snapDisabled;
188
- },
189
- set: function (value) {
190
- this._snapDisabled = value;
191
- },
192
- enumerable: false,
193
- configurable: true
194
- });
195
- Object.defineProperty(PepCarouselComponent.prototype, "snapOffset", {
196
- get: function () {
197
- return this._snapOffset;
198
- },
199
- set: function (value) {
200
- this._snapOffset = value;
201
- },
202
- enumerable: false,
203
- configurable: true
204
- });
205
- Object.defineProperty(PepCarouselComponent.prototype, "snapDuration", {
206
- get: function () {
207
- return this._snapDuration;
208
- },
209
- set: function (value) {
210
- this._snapDuration = value;
211
- },
212
- enumerable: false,
213
- configurable: true
214
- });
215
- PepCarouselComponent.prototype.ngOnChanges = function () {
216
- this.setScrollBar();
217
- if (this.xDisabled || this.disabled || this._scrollbarHidden) {
218
- this.disableScroll('x');
219
- }
220
- else {
221
- this.enableScroll('x');
222
- }
223
- if (this.yDisabled || this.disabled) {
224
- this.disableScroll('y');
225
- }
226
- else {
227
- this.enableScroll('y');
228
- }
229
- };
230
- PepCarouselComponent.prototype.ngAfterViewInit = function () {
231
- // auto assign computed css
232
- this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'true');
233
- this.displayType =
234
- typeof window !== 'undefined'
235
- ? window.getComputedStyle(this._elementRef.nativeElement)
236
- .display
237
- : 'block';
238
- this._renderer.setStyle(this._contentRef.nativeElement, 'display', this.displayType);
239
- this._renderer.setStyle(this._contentRef.nativeElement, 'whiteSpace', 'noWrap');
240
- // store ele width height for later user
241
- this.markElDimension();
242
- this._renderer.setStyle(this._contentRef.nativeElement, 'width', this.elWidth);
243
- this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.elHeight);
244
- if (this.wrapper) {
245
- this.checkScrollbar();
246
- }
247
- this._onMouseDownListener = this._renderer.listen(this._contentRef.nativeElement, 'mousedown', this.onMouseDownHandler.bind(this));
248
- this._onScrollListener = this._renderer.listen(this._contentRef.nativeElement, 'scroll', this.onScrollHandler.bind(this));
249
- // prevent Firefox from dragging images
250
- this._onDragStartListener = this._renderer.listen('document', 'dragstart', function (e) {
251
- e.preventDefault();
252
- });
253
- this.checkNavStatus();
254
- this.dsInitialized.emit();
255
- this.adjustMarginToLastChild();
256
- };
257
- PepCarouselComponent.prototype.ngAfterViewChecked = function () {
258
- // avoid extra checks
259
- if (this._children.length !== this.prevChildrenLength) {
260
- this.markElDimension();
261
- this.checkScrollbar();
262
- this.prevChildrenLength = this._children.length;
263
- this.checkNavStatus();
264
- }
265
- };
266
- PepCarouselComponent.prototype.ngOnDestroy = function () {
267
- this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'false');
268
- if (this._onMouseDownListener) {
269
- this._onMouseDownListener = this._onMouseDownListener();
270
- }
271
- if (this._onScrollListener) {
272
- this._onScrollListener = this._onScrollListener();
273
- }
274
- if (this._onDragStartListener) {
275
- this._onDragStartListener = this._onDragStartListener();
276
- }
277
- };
278
- PepCarouselComponent.prototype.onMouseMoveHandler = function (event) {
279
- this.onMouseMove(event);
280
- };
281
- PepCarouselComponent.prototype.onMouseMove = function (event) {
282
- if (this.isPressed && !this.disabled) {
283
- // Workaround for prevent scroll stuck if browser lost focus
284
- // MouseEvent.buttons not support by Safari
285
- if (!event.buttons && !event.which) {
286
- return this.onMouseUpHandler(event);
287
- }
288
- this._pointerEvents = 'none';
289
- this._setIsDragging(true);
290
- // Drag X
291
- if (!this.xDisabled && !this.dragDisabled) {
292
- var clientX = event.clientX;
293
- this._contentRef.nativeElement.scrollLeft =
294
- this._contentRef.nativeElement.scrollLeft -
295
- clientX +
296
- this.downX;
297
- this.downX = clientX;
298
- }
299
- // Drag Y
300
- if (!this.yDisabled && !this.dragDisabled) {
301
- var clientY = event.clientY;
302
- this._contentRef.nativeElement.scrollTop =
303
- this._contentRef.nativeElement.scrollTop -
304
- clientY +
305
- this.downY;
306
- this.downY = clientY;
307
- }
308
- }
309
- };
310
- PepCarouselComponent.prototype.onMouseDownHandler = function (event) {
311
- var carouselItem = this.locateCarouselItem(event.target);
312
- if (carouselItem && carouselItem.dragDisabled) {
313
- return;
314
- }
315
- var isTouchEvent = event.type === 'touchstart';
316
- this._startGlobalListening(isTouchEvent);
317
- this.isPressed = true;
318
- var mouseEvent = event;
319
- this.downX = mouseEvent.clientX;
320
- this.downY = mouseEvent.clientY;
321
- clearTimeout(this.scrollToTimer);
322
- };
323
- PepCarouselComponent.prototype.onScrollHandler = function () {
324
- var _this = this;
325
- this.checkNavStatus();
326
- if (!this.isPressed && !this.isAnimating && !this.snapDisabled) {
327
- this.isScrolling = true;
328
- clearTimeout(this.scrollTimer);
329
- this.scrollTimer = setTimeout(function () {
330
- _this.isScrolling = false;
331
- _this.locateCurrentIndex(true);
332
- }, 500);
333
- }
334
- else {
335
- this.locateCurrentIndex();
336
- }
337
- };
338
- PepCarouselComponent.prototype.onMouseUpHandler = function (event) {
339
- if (this.isPressed) {
340
- this.isPressed = false;
341
- this._pointerEvents = 'auto';
342
- this._setIsDragging(false);
343
- if (!this.snapDisabled) {
344
- this.locateCurrentIndex(true);
345
- }
346
- else {
347
- this.locateCurrentIndex();
348
- }
349
- this._stopGlobalListening();
350
- }
351
- };
352
- /*
353
- * Nav button
354
- */
355
- PepCarouselComponent.prototype.moveLeft = function () {
356
- if (this.currIndex !== 0 || this.snapDisabled) {
357
- this.currIndex--;
358
- clearTimeout(this.scrollToTimer);
359
- this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
360
- }
361
- };
362
- PepCarouselComponent.prototype.moveRight = function () {
363
- var container = this.wrapper || this.parentNode;
364
- var containerWidth = container ? container.clientWidth : 0;
365
- if (!this.isScrollReachesRightEnd() &&
366
- this.currIndex <
367
- this.maximumIndex(containerWidth, this._children.toArray())) {
368
- this.currIndex++;
369
- clearTimeout(this.scrollToTimer);
370
- this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
371
- }
372
- };
373
- PepCarouselComponent.prototype.moveTo = function (index) {
374
- var container = this.wrapper || this.parentNode;
375
- var containerWidth = container ? container.clientWidth : 0;
376
- if (index >= 0 &&
377
- index !== this.currIndex &&
378
- this.currIndex <=
379
- this.maximumIndex(containerWidth, this._children.toArray())) {
380
- this.currIndex = Math.min(index, this.maximumIndex(containerWidth, this._children.toArray()));
381
- clearTimeout(this.scrollToTimer);
382
- this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
383
- }
384
- };
385
- PepCarouselComponent.prototype.checkNavStatus = function () {
386
- var _this = this;
387
- setTimeout(function () {
388
- var onlyOneItem = Boolean(_this._children.length <= 1);
389
- var containerIsLargerThanContent = Boolean(_this._contentRef.nativeElement.scrollWidth <=
390
- _this._contentRef.nativeElement.clientWidth);
391
- if (onlyOneItem || containerIsLargerThanContent) {
392
- // only one element
393
- _this.reachesLeftBound.emit(true);
394
- _this.reachesRightBound.emit(true);
395
- }
396
- else if (_this.isScrollReachesRightEnd()) {
397
- // reached right end
398
- _this.reachesLeftBound.emit(false);
399
- _this.reachesRightBound.emit(true);
400
- }
401
- else if (_this._contentRef.nativeElement.scrollLeft === 0 &&
402
- _this._contentRef.nativeElement.scrollWidth >
403
- _this._contentRef.nativeElement.clientWidth) {
404
- // reached left end
405
- _this.reachesLeftBound.emit(true);
406
- _this.reachesRightBound.emit(false);
407
- }
408
- else {
409
- // in the middle
410
- _this.reachesLeftBound.emit(false);
411
- _this.reachesRightBound.emit(false);
412
- }
413
- }, 0);
414
- };
415
- PepCarouselComponent.prototype.onWheel = function (event) {
416
- if (this._xWheelEnabled) {
417
- event.preventDefault();
418
- if (this._snapDisabled) {
419
- this._contentRef.nativeElement.scrollBy(event.deltaY, 0);
420
- }
421
- else {
422
- if (event.deltaY < 0) {
423
- this.moveLeft();
424
- }
425
- else if (event.deltaY > 0) {
426
- this.moveRight();
427
- }
428
- }
429
- }
430
- };
431
- PepCarouselComponent.prototype.onWindowResize = function () {
432
- this.refreshWrapperDimensions();
433
- this.checkNavStatus();
434
- };
435
- PepCarouselComponent.prototype._setIsDragging = function (value) {
436
- if (this._isDragging === value) {
437
- return;
438
- }
439
- this._isDragging = value;
440
- value ? this.dragStart.emit() : this.dragEnd.emit();
441
- };
442
- PepCarouselComponent.prototype._startGlobalListening = function (isTouchEvent) {
443
- if (!this._onMouseMoveListener) {
444
- var eventName = isTouchEvent ? 'touchmove' : 'mousemove';
445
- this._onMouseMoveListener = this._renderer.listen('document', eventName, this.onMouseMoveHandler.bind(this));
446
- }
447
- if (!this._onMouseUpListener) {
448
- var eventName = isTouchEvent ? 'touchend' : 'mouseup';
449
- this._onMouseUpListener = this._renderer.listen('document', eventName, this.onMouseUpHandler.bind(this));
450
- }
451
- };
452
- PepCarouselComponent.prototype._stopGlobalListening = function () {
453
- if (this._onMouseMoveListener) {
454
- this._onMouseMoveListener = this._onMouseMoveListener();
455
- }
456
- if (this._onMouseUpListener) {
457
- this._onMouseUpListener = this._onMouseUpListener();
458
- }
459
- };
460
- PepCarouselComponent.prototype.disableScroll = function (axis) {
461
- this._renderer.setStyle(this._contentRef.nativeElement, "overflow-" + axis, 'hidden');
462
- };
463
- PepCarouselComponent.prototype.enableScroll = function (axis) {
464
- this._renderer.setStyle(this._contentRef.nativeElement, "overflow-" + axis, 'auto');
465
- };
466
- PepCarouselComponent.prototype.hideScrollbar = function () {
467
- if (this._contentRef.nativeElement.style.display !== 'none' &&
468
- !this.wrapper) {
469
- this.parentNode = this._contentRef.nativeElement.parentNode;
470
- // create container element
471
- this.wrapper = this._renderer.createElement('div');
472
- this._renderer.addClass(this.wrapper, 'carousel-wrapper');
473
- // this._renderer.setAttribute(this.wrapper, 'class', 'carousel-wrapper');
474
- // this._renderer.addClass(this.wrapper, 'carousel-container');
475
- this.refreshWrapperDimensions();
476
- this._renderer.setStyle(this.wrapper, 'overflow', 'hidden');
477
- this._renderer.setStyle(this._contentRef.nativeElement, 'width', "calc(100% + " + this.scrollbarWidth + ")");
478
- this._renderer.setStyle(this._contentRef.nativeElement, 'height', "calc(100% + " + this.scrollbarWidth + ")");
479
- // Append container element to component element.
480
- this._renderer.appendChild(this._elementRef.nativeElement, this.wrapper);
481
- // Append content element to container element.
482
- this._renderer.appendChild(this.wrapper, this._contentRef.nativeElement);
483
- this.adjustMarginToLastChild();
484
- }
485
- };
486
- PepCarouselComponent.prototype.showScrollbar = function () {
487
- if (this.wrapper) {
488
- this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
489
- this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.wrapper.style.height);
490
- if (this.parentNode !== null) {
491
- this.parentNode.removeChild(this.wrapper);
492
- this.parentNode.appendChild(this._contentRef.nativeElement);
493
- }
494
- this.wrapper = null;
495
- this.adjustMarginToLastChild();
496
- }
497
- };
498
- PepCarouselComponent.prototype.checkScrollbar = function () {
499
- if (this._contentRef.nativeElement.scrollWidth <=
500
- this._contentRef.nativeElement.clientWidth) {
501
- this._renderer.setStyle(this._contentRef.nativeElement, 'height', '100%');
502
- }
503
- else {
504
- this._renderer.setStyle(this._contentRef.nativeElement, 'height', "calc(100% + " + this.scrollbarWidth + ")");
505
- }
506
- if (this._contentRef.nativeElement.scrollHeight <=
507
- this._contentRef.nativeElement.clientHeight) {
508
- this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
509
- }
510
- else {
511
- this._renderer.setStyle(this._contentRef.nativeElement, 'width', "calc(100% + " + this.scrollbarWidth + ")");
512
- }
513
- };
514
- PepCarouselComponent.prototype.setScrollBar = function () {
515
- if (this.scrollbarHidden) {
516
- this.hideScrollbar();
517
- }
518
- else {
519
- this.showScrollbar();
520
- }
521
- };
522
- PepCarouselComponent.prototype.getScrollbarWidth = function () {
523
- /**
524
- * Browser Scrollbar Widths (2016)
525
- * OSX (Chrome, Safari, Firefox) - 15px
526
- * Windows XP (IE7, Chrome, Firefox) - 17px
527
- * Windows 7 (IE10, IE11, Chrome, Firefox) - 17px
528
- * Windows 8.1 (IE11, Chrome, Firefox) - 17px
529
- * Windows 10 (IE11, Chrome, Firefox) - 17px
530
- * Windows 10 (Edge 12/13) - 12px
531
- */
532
- var outer = this._renderer.createElement('div');
533
- this._renderer.setStyle(outer, 'visibility', 'hidden');
534
- this._renderer.setStyle(outer, 'width', '100px');
535
- this._renderer.setStyle(outer, 'msOverflowStyle', 'scrollbar'); // needed for WinJS apps
536
- // document.body.appendChild(outer);
537
- this._renderer.appendChild(this._document.body, outer);
538
- // this._renderer.appendChild(this._renderer.selectRootElement('body'), outer);
539
- var widthNoScroll = outer.offsetWidth;
540
- // force scrollbars
541
- this._renderer.setStyle(outer, 'overflow', 'scroll');
542
- // add innerdiv
543
- var inner = this._renderer.createElement('div');
544
- this._renderer.setStyle(inner, 'width', '100%');
545
- this._renderer.appendChild(outer, inner);
546
- var widthWithScroll = inner.offsetWidth;
547
- // remove divs
548
- this._renderer.removeChild(this._document.body, outer);
549
- /**
550
- * Scrollbar width will be 0 on Mac OS with the
551
- * default "Only show scrollbars when scrolling" setting (Yosemite and up).
552
- * setting default width to 20;
553
- */
554
- return widthNoScroll - widthWithScroll || 20;
555
- };
556
- PepCarouselComponent.prototype.refreshWrapperDimensions = function () {
557
- if (this.wrapper) {
558
- var height = this._elementRef.nativeElement.style.height ||
559
- this._elementRef.nativeElement.offsetHeight;
560
- this._renderer.setStyle(this.wrapper, 'width', '100%');
561
- this._renderer.setStyle(this.wrapper, 'height', height === 0 ? 'auto' : height + 'px');
562
- }
563
- };
564
- /*
565
- * The below solution is heavily inspired from
566
- * https://gist.github.com/andjosh/6764939
567
- */
568
- PepCarouselComponent.prototype.scrollTo = function (element, to, duration) {
569
- var _this = this;
570
- this.isAnimating = true;
571
- var start = element.scrollLeft, change = to - start - this.snapOffset, increment = 20;
572
- var currentTime = 0;
573
- // t = current time
574
- // b = start value
575
- // c = change in value
576
- // d = duration
577
- var easeInOutQuad = function (t, b, c, d) {
578
- t /= d / 2;
579
- if (t < 1) {
580
- return (c / 2) * t * t + b;
581
- }
582
- t--;
583
- return (-c / 2) * (t * (t - 2) - 1) + b;
584
- };
585
- var animateScroll = function () {
586
- currentTime += increment;
587
- element.scrollLeft = easeInOutQuad(currentTime, start, change, duration);
588
- if (currentTime < duration) {
589
- _this.scrollToTimer = setTimeout(animateScroll, increment);
590
- }
591
- else {
592
- // run one more frame to make sure the animation is fully finished
593
- setTimeout(function () {
594
- _this.isAnimating = false;
595
- _this.snapAnimationFinished.emit(_this.currIndex);
596
- }, increment);
597
- }
598
- };
599
- animateScroll();
600
- };
601
- PepCarouselComponent.prototype.locateCurrentIndex = function (snap) {
602
- var _this = this;
603
- this.currentChildWidth(function (currentChildWidth, nextChildrenWidth, childrenWidth, idx, stop) {
604
- if (_this._contentRef.nativeElement.scrollLeft >=
605
- childrenWidth &&
606
- _this._contentRef.nativeElement.scrollLeft <=
607
- nextChildrenWidth) {
608
- if (nextChildrenWidth -
609
- _this._contentRef.nativeElement.scrollLeft >
610
- currentChildWidth / 2 &&
611
- !_this.isScrollReachesRightEnd()) {
612
- // roll back scrolling
613
- if (!_this.isAnimating) {
614
- _this.currIndex = idx;
615
- }
616
- if (snap) {
617
- _this.scrollTo(_this._contentRef.nativeElement, childrenWidth, _this.snapDuration);
618
- }
619
- }
620
- else if (_this._contentRef.nativeElement.scrollLeft !== 0) {
621
- // forward scrolling
622
- if (!_this.isAnimating) {
623
- _this.currIndex = idx + 1;
624
- }
625
- if (snap) {
626
- _this.scrollTo(_this._contentRef.nativeElement, childrenWidth + currentChildWidth, _this.snapDuration);
627
- }
628
- }
629
- stop();
630
- }
631
- else if (idx + 1 === _this._children.length - 1) {
632
- // reaches last index
633
- if (!_this.isAnimating) {
634
- _this.currIndex = idx + 1;
635
- }
636
- stop();
637
- }
638
- });
639
- };
640
- PepCarouselComponent.prototype.currentChildWidth = function (cb) {
641
- var childrenWidth = 0;
642
- var shouldBreak = false;
643
- var breakFunc = function () {
644
- shouldBreak = true;
645
- };
646
- var childrenArr = this._children.toArray();
647
- for (var i = 0; i < childrenArr.length; i++) {
648
- if (i === childrenArr.length - 1) {
649
- break;
650
- }
651
- if (shouldBreak) {
652
- break;
653
- }
654
- var nextChildrenWidth = childrenWidth +
655
- childrenArr[i + 1]._elementRef.nativeElement.clientWidth;
656
- var currentClildWidth = childrenArr[i]._elementRef.nativeElement.clientWidth;
657
- cb(currentClildWidth, nextChildrenWidth, childrenWidth, i, breakFunc);
658
- childrenWidth += currentClildWidth;
659
- }
660
- };
661
- PepCarouselComponent.prototype.toChildrenLocation = function () {
662
- var to = 0;
663
- var childrenArr = this._children.toArray();
664
- for (var i = 0; i < this.currIndex; i++) {
665
- to += childrenArr[i]._elementRef.nativeElement.clientWidth;
666
- }
667
- return to;
668
- };
669
- PepCarouselComponent.prototype.locateCarouselItem = function (element) {
670
- var item = null;
671
- var childrenArr = this._children.toArray();
672
- for (var i = 0; i < childrenArr.length; i++) {
673
- if (element === childrenArr[i]._elementRef.nativeElement) {
674
- item = childrenArr[i];
675
- }
676
- }
677
- return item;
678
- };
679
- PepCarouselComponent.prototype.markElDimension = function () {
680
- if (this.wrapper) {
681
- this.elWidth = this.wrapper.style.width;
682
- this.elHeight = this.wrapper.style.height;
683
- }
684
- else {
685
- this.elWidth =
686
- this._elementRef.nativeElement.style.width ||
687
- this._elementRef.nativeElement.offsetWidth + 'px';
688
- this.elHeight =
689
- this._elementRef.nativeElement.style.height ||
690
- this._elementRef.nativeElement.offsetHeight + 'px';
691
- }
692
- var container = this.wrapper || this.parentNode;
693
- var containerWidth = container ? container.clientWidth : 0;
694
- if (this._children.length > 1) {
695
- this.indexBound = this.maximumIndex(containerWidth, this._children.toArray());
696
- }
697
- };
698
- PepCarouselComponent.prototype.maximumIndex = function (containerWidth, childrenElements) {
699
- var count = 0;
700
- var childrenWidth = 0;
701
- for (var i = 0; i <= childrenElements.length; i++) {
702
- // last N element
703
- var carouselItemDirective = childrenElements[childrenElements.length - 1 - i];
704
- if (!carouselItemDirective) {
705
- break;
706
- }
707
- else {
708
- var nativeElement = carouselItemDirective._elementRef.nativeElement;
709
- var itemWidth = nativeElement.clientWidth;
710
- if (itemWidth === 0 && nativeElement.firstElementChild) {
711
- itemWidth =
712
- carouselItemDirective._elementRef.nativeElement
713
- .firstElementChild.clientWidth;
714
- }
715
- childrenWidth += itemWidth;
716
- if (childrenWidth < containerWidth) {
717
- count++;
718
- }
719
- else {
720
- break;
721
- }
722
- }
723
- }
724
- return childrenElements.length - count;
725
- };
726
- PepCarouselComponent.prototype.isScrollReachesRightEnd = function () {
727
- var scrollLeftPos = this._contentRef.nativeElement.scrollLeft +
728
- this._contentRef.nativeElement.offsetWidth;
729
- return scrollLeftPos >= this._contentRef.nativeElement.scrollWidth;
730
- };
731
- /**
732
- * adds a margin right style to the last child element which will resolve the issue
733
- * of last item gets cutoff.
734
- */
735
- PepCarouselComponent.prototype.adjustMarginToLastChild = function () {
736
- // if (this._children && this._children.length > 0 && this.hideScrollbar) {
737
- // const childrenArr = this._children.toArray();
738
- // const lastItem = childrenArr[childrenArr.length - 1]._elementRef.nativeElement;
739
- // if (this.wrapper && childrenArr.length > 1) {
740
- // this._renderer.setStyle(lastItem, 'margin-right', this.scrollbarWidth);
741
- // } else {
742
- // this._renderer.setStyle(lastItem, 'margin-right', 0);
743
- // }
744
- // }
745
- };
746
- return PepCarouselComponent;
747
- }());
748
- PepCarouselComponent.decorators = [
749
- { type: core.Component, args: [{
750
- selector: 'pep-carousel',
751
- template: "\n <div class=\"carousel-content\" #contentRef>\n <ng-content></ng-content>\n </div>\n ",
752
- styles: ["\n :host {\n overflow: hidden;\n display: block;\n }\n .carousel-content {\n height: 100%;\n overflow: auto;\n white-space: nowrap;\n }\n "]
753
- },] }
754
- ];
755
- PepCarouselComponent.ctorParameters = function () { return [
756
- { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
757
- { type: core.Renderer2, decorators: [{ type: core.Inject, args: [core.Renderer2,] }] },
758
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
759
- ]; };
760
- PepCarouselComponent.propDecorators = {
761
- _contentRef: [{ type: core.ViewChild, args: ['contentRef', { static: true },] }],
762
- _children: [{ type: core.ContentChildren, args: [PepCarouselItemDirective, { descendants: true },] }],
763
- _pointerEvents: [{ type: core.HostBinding, args: ['style.pointer-events',] }],
764
- dsInitialized: [{ type: core.Output }],
765
- indexChanged: [{ type: core.Output }],
766
- reachesLeftBound: [{ type: core.Output }],
767
- reachesRightBound: [{ type: core.Output }],
768
- snapAnimationFinished: [{ type: core.Output }],
769
- dragStart: [{ type: core.Output }],
770
- dragEnd: [{ type: core.Output }],
771
- scrollbarHidden: [{ type: core.Input, args: ['scrollbarHidden',] }],
772
- disabled: [{ type: core.Input, args: ['disabled',] }],
773
- xDisabled: [{ type: core.Input, args: ['xDisabled',] }],
774
- yDisabled: [{ type: core.Input, args: ['yDisabled',] }],
775
- xWheelEnabled: [{ type: core.Input, args: ['xWheelEnabled',] }],
776
- dragDisabled: [{ type: core.Input, args: ['dragDisabled',] }],
777
- snapDisabled: [{ type: core.Input, args: ['snapDisabled',] }],
778
- snapOffset: [{ type: core.Input, args: ['snapOffset',] }],
779
- snapDuration: [{ type: core.Input, args: ['snapDuration',] }],
780
- onWheel: [{ type: core.HostListener, args: ['wheel', ['$event'],] }],
781
- onWindowResize: [{ type: core.HostListener, args: ['window:resize',] }]
38
+ var PepCarouselComponent = /** @class */ (function () {
39
+ function PepCarouselComponent(_elementRef, _renderer, _document) {
40
+ this._elementRef = _elementRef;
41
+ this._renderer = _renderer;
42
+ this._document = _document;
43
+ this._index = 0;
44
+ this._scrollbarHidden = false;
45
+ this._disabled = false;
46
+ this._xDisabled = false;
47
+ this._xWheelEnabled = false;
48
+ this._yDisabled = false;
49
+ this._dragDisabled = false;
50
+ this._snapDisabled = false;
51
+ this._snapOffset = 0;
52
+ this._snapDuration = 500;
53
+ this._isDragging = false;
54
+ /**
55
+ * Is the user currently pressing the element
56
+ */
57
+ this.isPressed = false;
58
+ /**
59
+ * Is the user currently scrolling the element
60
+ */
61
+ this.isScrolling = false;
62
+ /**
63
+ * The x coordinates on the element
64
+ */
65
+ this.downX = 0;
66
+ /**
67
+ * The y coordinates on the element
68
+ */
69
+ this.downY = 0;
70
+ this.displayType = 'block';
71
+ this.elWidth = null;
72
+ this.elHeight = null;
73
+ this._pointerEvents = 'auto';
74
+ this.scrollbarWidth = null;
75
+ this.isAnimating = false;
76
+ this.prevChildrenLength = 0;
77
+ this.indexBound = 0;
78
+ this.dsInitialized = new core.EventEmitter();
79
+ this.indexChanged = new core.EventEmitter();
80
+ this.reachesLeftBound = new core.EventEmitter();
81
+ this.reachesRightBound = new core.EventEmitter();
82
+ this.snapAnimationFinished = new core.EventEmitter();
83
+ this.dragStart = new core.EventEmitter();
84
+ this.dragEnd = new core.EventEmitter();
85
+ this.scrollbarWidth = this.getScrollbarWidth() + "px";
86
+ }
87
+ Object.defineProperty(PepCarouselComponent.prototype, "isDragging", {
88
+ /**
89
+ * Is the user currently dragging the element
90
+ */
91
+ get: function () {
92
+ return this._isDragging;
93
+ },
94
+ enumerable: false,
95
+ configurable: true
96
+ });
97
+ Object.defineProperty(PepCarouselComponent.prototype, "currIndex", {
98
+ get: function () {
99
+ return this._index;
100
+ },
101
+ set: function (value) {
102
+ if (value !== this._index) {
103
+ this._index = value;
104
+ this.indexChanged.emit(value);
105
+ }
106
+ },
107
+ enumerable: false,
108
+ configurable: true
109
+ });
110
+ Object.defineProperty(PepCarouselComponent.prototype, "scrollbarHidden", {
111
+ /**
112
+ * Whether the scrollbar is hidden
113
+ */
114
+ get: function () {
115
+ return this._scrollbarHidden;
116
+ },
117
+ set: function (value) {
118
+ this._scrollbarHidden = value;
119
+ },
120
+ enumerable: false,
121
+ configurable: true
122
+ });
123
+ Object.defineProperty(PepCarouselComponent.prototype, "disabled", {
124
+ /**
125
+ * Whether horizontally and vertically draging and scrolling is be disabled
126
+ */
127
+ get: function () {
128
+ return this._disabled;
129
+ },
130
+ set: function (value) {
131
+ this._disabled = value;
132
+ },
133
+ enumerable: false,
134
+ configurable: true
135
+ });
136
+ Object.defineProperty(PepCarouselComponent.prototype, "xDisabled", {
137
+ /**
138
+ * Whether horizontally dragging and scrolling is be disabled
139
+ */
140
+ get: function () {
141
+ return this._xDisabled;
142
+ },
143
+ set: function (value) {
144
+ this._xDisabled = value;
145
+ },
146
+ enumerable: false,
147
+ configurable: true
148
+ });
149
+ Object.defineProperty(PepCarouselComponent.prototype, "yDisabled", {
150
+ /**
151
+ * Whether vertically dragging and scrolling events is disabled
152
+ */
153
+ get: function () {
154
+ return this._yDisabled;
155
+ },
156
+ set: function (value) {
157
+ this._yDisabled = value;
158
+ },
159
+ enumerable: false,
160
+ configurable: true
161
+ });
162
+ Object.defineProperty(PepCarouselComponent.prototype, "xWheelEnabled", {
163
+ /**
164
+ * Whether scrolling horizontally with mouse wheel is enabled
165
+ */
166
+ get: function () {
167
+ return this._xWheelEnabled;
168
+ },
169
+ set: function (value) {
170
+ this._xWheelEnabled = value;
171
+ },
172
+ enumerable: false,
173
+ configurable: true
174
+ });
175
+ Object.defineProperty(PepCarouselComponent.prototype, "dragDisabled", {
176
+ get: function () {
177
+ return this._dragDisabled;
178
+ },
179
+ set: function (value) {
180
+ this._dragDisabled = value;
181
+ },
182
+ enumerable: false,
183
+ configurable: true
184
+ });
185
+ Object.defineProperty(PepCarouselComponent.prototype, "snapDisabled", {
186
+ get: function () {
187
+ return this._snapDisabled;
188
+ },
189
+ set: function (value) {
190
+ this._snapDisabled = value;
191
+ },
192
+ enumerable: false,
193
+ configurable: true
194
+ });
195
+ Object.defineProperty(PepCarouselComponent.prototype, "snapOffset", {
196
+ get: function () {
197
+ return this._snapOffset;
198
+ },
199
+ set: function (value) {
200
+ this._snapOffset = value;
201
+ },
202
+ enumerable: false,
203
+ configurable: true
204
+ });
205
+ Object.defineProperty(PepCarouselComponent.prototype, "snapDuration", {
206
+ get: function () {
207
+ return this._snapDuration;
208
+ },
209
+ set: function (value) {
210
+ this._snapDuration = value;
211
+ },
212
+ enumerable: false,
213
+ configurable: true
214
+ });
215
+ PepCarouselComponent.prototype.ngOnChanges = function () {
216
+ this.setScrollBar();
217
+ if (this.xDisabled || this.disabled || this._scrollbarHidden) {
218
+ this.disableScroll('x');
219
+ }
220
+ else {
221
+ this.enableScroll('x');
222
+ }
223
+ if (this.yDisabled || this.disabled) {
224
+ this.disableScroll('y');
225
+ }
226
+ else {
227
+ this.enableScroll('y');
228
+ }
229
+ };
230
+ PepCarouselComponent.prototype.ngAfterViewInit = function () {
231
+ // auto assign computed css
232
+ this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'true');
233
+ this.displayType =
234
+ typeof window !== 'undefined'
235
+ ? window.getComputedStyle(this._elementRef.nativeElement)
236
+ .display
237
+ : 'block';
238
+ this._renderer.setStyle(this._contentRef.nativeElement, 'display', this.displayType);
239
+ this._renderer.setStyle(this._contentRef.nativeElement, 'whiteSpace', 'noWrap');
240
+ // store ele width height for later user
241
+ this.markElDimension();
242
+ this._renderer.setStyle(this._contentRef.nativeElement, 'width', this.elWidth);
243
+ this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.elHeight);
244
+ if (this.wrapper) {
245
+ this.checkScrollbar();
246
+ }
247
+ this._onMouseDownListener = this._renderer.listen(this._contentRef.nativeElement, 'mousedown', this.onMouseDownHandler.bind(this));
248
+ this._onScrollListener = this._renderer.listen(this._contentRef.nativeElement, 'scroll', this.onScrollHandler.bind(this));
249
+ // prevent Firefox from dragging images
250
+ this._onDragStartListener = this._renderer.listen('document', 'dragstart', function (e) {
251
+ e.preventDefault();
252
+ });
253
+ this.checkNavStatus();
254
+ this.dsInitialized.emit();
255
+ this.adjustMarginToLastChild();
256
+ };
257
+ PepCarouselComponent.prototype.ngAfterViewChecked = function () {
258
+ // avoid extra checks
259
+ if (this._children.length !== this.prevChildrenLength) {
260
+ this.markElDimension();
261
+ this.checkScrollbar();
262
+ this.prevChildrenLength = this._children.length;
263
+ this.checkNavStatus();
264
+ }
265
+ };
266
+ PepCarouselComponent.prototype.ngOnDestroy = function () {
267
+ this._renderer.setAttribute(this._contentRef.nativeElement, 'drag-scroll', 'false');
268
+ if (this._onMouseDownListener) {
269
+ this._onMouseDownListener = this._onMouseDownListener();
270
+ }
271
+ if (this._onScrollListener) {
272
+ this._onScrollListener = this._onScrollListener();
273
+ }
274
+ if (this._onDragStartListener) {
275
+ this._onDragStartListener = this._onDragStartListener();
276
+ }
277
+ };
278
+ PepCarouselComponent.prototype.onMouseMoveHandler = function (event) {
279
+ this.onMouseMove(event);
280
+ };
281
+ PepCarouselComponent.prototype.onMouseMove = function (event) {
282
+ if (this.isPressed && !this.disabled) {
283
+ // Workaround for prevent scroll stuck if browser lost focus
284
+ // MouseEvent.buttons not support by Safari
285
+ if (!event.buttons && !event.which) {
286
+ return this.onMouseUpHandler(event);
287
+ }
288
+ this._pointerEvents = 'none';
289
+ this._setIsDragging(true);
290
+ // Drag X
291
+ if (!this.xDisabled && !this.dragDisabled) {
292
+ var clientX = event.clientX;
293
+ this._contentRef.nativeElement.scrollLeft =
294
+ this._contentRef.nativeElement.scrollLeft -
295
+ clientX +
296
+ this.downX;
297
+ this.downX = clientX;
298
+ }
299
+ // Drag Y
300
+ if (!this.yDisabled && !this.dragDisabled) {
301
+ var clientY = event.clientY;
302
+ this._contentRef.nativeElement.scrollTop =
303
+ this._contentRef.nativeElement.scrollTop -
304
+ clientY +
305
+ this.downY;
306
+ this.downY = clientY;
307
+ }
308
+ }
309
+ };
310
+ PepCarouselComponent.prototype.onMouseDownHandler = function (event) {
311
+ var carouselItem = this.locateCarouselItem(event.target);
312
+ if (carouselItem && carouselItem.dragDisabled) {
313
+ return;
314
+ }
315
+ var isTouchEvent = event.type === 'touchstart';
316
+ this._startGlobalListening(isTouchEvent);
317
+ this.isPressed = true;
318
+ var mouseEvent = event;
319
+ this.downX = mouseEvent.clientX;
320
+ this.downY = mouseEvent.clientY;
321
+ clearTimeout(this.scrollToTimer);
322
+ };
323
+ PepCarouselComponent.prototype.onScrollHandler = function () {
324
+ var _this = this;
325
+ this.checkNavStatus();
326
+ if (!this.isPressed && !this.isAnimating && !this.snapDisabled) {
327
+ this.isScrolling = true;
328
+ clearTimeout(this.scrollTimer);
329
+ this.scrollTimer = setTimeout(function () {
330
+ _this.isScrolling = false;
331
+ _this.locateCurrentIndex(true);
332
+ }, 500);
333
+ }
334
+ else {
335
+ this.locateCurrentIndex();
336
+ }
337
+ };
338
+ PepCarouselComponent.prototype.onMouseUpHandler = function (event) {
339
+ if (this.isPressed) {
340
+ this.isPressed = false;
341
+ this._pointerEvents = 'auto';
342
+ this._setIsDragging(false);
343
+ if (!this.snapDisabled) {
344
+ this.locateCurrentIndex(true);
345
+ }
346
+ else {
347
+ this.locateCurrentIndex();
348
+ }
349
+ this._stopGlobalListening();
350
+ }
351
+ };
352
+ /*
353
+ * Nav button
354
+ */
355
+ PepCarouselComponent.prototype.moveLeft = function () {
356
+ if (this.currIndex !== 0 || this.snapDisabled) {
357
+ this.currIndex--;
358
+ clearTimeout(this.scrollToTimer);
359
+ this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
360
+ }
361
+ };
362
+ PepCarouselComponent.prototype.moveRight = function () {
363
+ var container = this.wrapper || this.parentNode;
364
+ var containerWidth = container ? container.clientWidth : 0;
365
+ if (!this.isScrollReachesRightEnd() &&
366
+ this.currIndex <
367
+ this.maximumIndex(containerWidth, this._children.toArray())) {
368
+ this.currIndex++;
369
+ clearTimeout(this.scrollToTimer);
370
+ this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
371
+ }
372
+ };
373
+ PepCarouselComponent.prototype.moveTo = function (index) {
374
+ var container = this.wrapper || this.parentNode;
375
+ var containerWidth = container ? container.clientWidth : 0;
376
+ if (index >= 0 &&
377
+ index !== this.currIndex &&
378
+ this.currIndex <=
379
+ this.maximumIndex(containerWidth, this._children.toArray())) {
380
+ this.currIndex = Math.min(index, this.maximumIndex(containerWidth, this._children.toArray()));
381
+ clearTimeout(this.scrollToTimer);
382
+ this.scrollTo(this._contentRef.nativeElement, this.toChildrenLocation(), this.snapDuration);
383
+ }
384
+ };
385
+ PepCarouselComponent.prototype.checkNavStatus = function () {
386
+ var _this = this;
387
+ setTimeout(function () {
388
+ var onlyOneItem = Boolean(_this._children.length <= 1);
389
+ var containerIsLargerThanContent = Boolean(_this._contentRef.nativeElement.scrollWidth <=
390
+ _this._contentRef.nativeElement.clientWidth);
391
+ if (onlyOneItem || containerIsLargerThanContent) {
392
+ // only one element
393
+ _this.reachesLeftBound.emit(true);
394
+ _this.reachesRightBound.emit(true);
395
+ }
396
+ else if (_this.isScrollReachesRightEnd()) {
397
+ // reached right end
398
+ _this.reachesLeftBound.emit(false);
399
+ _this.reachesRightBound.emit(true);
400
+ }
401
+ else if (_this._contentRef.nativeElement.scrollLeft === 0 &&
402
+ _this._contentRef.nativeElement.scrollWidth >
403
+ _this._contentRef.nativeElement.clientWidth) {
404
+ // reached left end
405
+ _this.reachesLeftBound.emit(true);
406
+ _this.reachesRightBound.emit(false);
407
+ }
408
+ else {
409
+ // in the middle
410
+ _this.reachesLeftBound.emit(false);
411
+ _this.reachesRightBound.emit(false);
412
+ }
413
+ }, 0);
414
+ };
415
+ PepCarouselComponent.prototype.onWheel = function (event) {
416
+ if (this._xWheelEnabled) {
417
+ event.preventDefault();
418
+ if (this._snapDisabled) {
419
+ this._contentRef.nativeElement.scrollBy(event.deltaY, 0);
420
+ }
421
+ else {
422
+ if (event.deltaY < 0) {
423
+ this.moveLeft();
424
+ }
425
+ else if (event.deltaY > 0) {
426
+ this.moveRight();
427
+ }
428
+ }
429
+ }
430
+ };
431
+ PepCarouselComponent.prototype.onWindowResize = function () {
432
+ this.refreshWrapperDimensions();
433
+ this.checkNavStatus();
434
+ };
435
+ PepCarouselComponent.prototype._setIsDragging = function (value) {
436
+ if (this._isDragging === value) {
437
+ return;
438
+ }
439
+ this._isDragging = value;
440
+ value ? this.dragStart.emit() : this.dragEnd.emit();
441
+ };
442
+ PepCarouselComponent.prototype._startGlobalListening = function (isTouchEvent) {
443
+ if (!this._onMouseMoveListener) {
444
+ var eventName = isTouchEvent ? 'touchmove' : 'mousemove';
445
+ this._onMouseMoveListener = this._renderer.listen('document', eventName, this.onMouseMoveHandler.bind(this));
446
+ }
447
+ if (!this._onMouseUpListener) {
448
+ var eventName = isTouchEvent ? 'touchend' : 'mouseup';
449
+ this._onMouseUpListener = this._renderer.listen('document', eventName, this.onMouseUpHandler.bind(this));
450
+ }
451
+ };
452
+ PepCarouselComponent.prototype._stopGlobalListening = function () {
453
+ if (this._onMouseMoveListener) {
454
+ this._onMouseMoveListener = this._onMouseMoveListener();
455
+ }
456
+ if (this._onMouseUpListener) {
457
+ this._onMouseUpListener = this._onMouseUpListener();
458
+ }
459
+ };
460
+ PepCarouselComponent.prototype.disableScroll = function (axis) {
461
+ this._renderer.setStyle(this._contentRef.nativeElement, "overflow-" + axis, 'hidden');
462
+ };
463
+ PepCarouselComponent.prototype.enableScroll = function (axis) {
464
+ this._renderer.setStyle(this._contentRef.nativeElement, "overflow-" + axis, 'auto');
465
+ };
466
+ PepCarouselComponent.prototype.hideScrollbar = function () {
467
+ if (this._contentRef.nativeElement.style.display !== 'none' &&
468
+ !this.wrapper) {
469
+ this.parentNode = this._contentRef.nativeElement.parentNode;
470
+ // create container element
471
+ this.wrapper = this._renderer.createElement('div');
472
+ this._renderer.addClass(this.wrapper, 'carousel-wrapper');
473
+ // this._renderer.setAttribute(this.wrapper, 'class', 'carousel-wrapper');
474
+ // this._renderer.addClass(this.wrapper, 'carousel-container');
475
+ this.refreshWrapperDimensions();
476
+ this._renderer.setStyle(this.wrapper, 'overflow', 'hidden');
477
+ this._renderer.setStyle(this._contentRef.nativeElement, 'width', "calc(100% + " + this.scrollbarWidth + ")");
478
+ this._renderer.setStyle(this._contentRef.nativeElement, 'height', "calc(100% + " + this.scrollbarWidth + ")");
479
+ // Append container element to component element.
480
+ this._renderer.appendChild(this._elementRef.nativeElement, this.wrapper);
481
+ // Append content element to container element.
482
+ this._renderer.appendChild(this.wrapper, this._contentRef.nativeElement);
483
+ this.adjustMarginToLastChild();
484
+ }
485
+ };
486
+ PepCarouselComponent.prototype.showScrollbar = function () {
487
+ if (this.wrapper) {
488
+ this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
489
+ this._renderer.setStyle(this._contentRef.nativeElement, 'height', this.wrapper.style.height);
490
+ if (this.parentNode !== null) {
491
+ this.parentNode.removeChild(this.wrapper);
492
+ this.parentNode.appendChild(this._contentRef.nativeElement);
493
+ }
494
+ this.wrapper = null;
495
+ this.adjustMarginToLastChild();
496
+ }
497
+ };
498
+ PepCarouselComponent.prototype.checkScrollbar = function () {
499
+ if (this._contentRef.nativeElement.scrollWidth <=
500
+ this._contentRef.nativeElement.clientWidth) {
501
+ this._renderer.setStyle(this._contentRef.nativeElement, 'height', '100%');
502
+ }
503
+ else {
504
+ this._renderer.setStyle(this._contentRef.nativeElement, 'height', "calc(100% + " + this.scrollbarWidth + ")");
505
+ }
506
+ if (this._contentRef.nativeElement.scrollHeight <=
507
+ this._contentRef.nativeElement.clientHeight) {
508
+ this._renderer.setStyle(this._contentRef.nativeElement, 'width', '100%');
509
+ }
510
+ else {
511
+ this._renderer.setStyle(this._contentRef.nativeElement, 'width', "calc(100% + " + this.scrollbarWidth + ")");
512
+ }
513
+ };
514
+ PepCarouselComponent.prototype.setScrollBar = function () {
515
+ if (this.scrollbarHidden) {
516
+ this.hideScrollbar();
517
+ }
518
+ else {
519
+ this.showScrollbar();
520
+ }
521
+ };
522
+ PepCarouselComponent.prototype.getScrollbarWidth = function () {
523
+ /**
524
+ * Browser Scrollbar Widths (2016)
525
+ * OSX (Chrome, Safari, Firefox) - 15px
526
+ * Windows XP (IE7, Chrome, Firefox) - 17px
527
+ * Windows 7 (IE10, IE11, Chrome, Firefox) - 17px
528
+ * Windows 8.1 (IE11, Chrome, Firefox) - 17px
529
+ * Windows 10 (IE11, Chrome, Firefox) - 17px
530
+ * Windows 10 (Edge 12/13) - 12px
531
+ */
532
+ var outer = this._renderer.createElement('div');
533
+ this._renderer.setStyle(outer, 'visibility', 'hidden');
534
+ this._renderer.setStyle(outer, 'width', '100px');
535
+ this._renderer.setStyle(outer, 'msOverflowStyle', 'scrollbar'); // needed for WinJS apps
536
+ // document.body.appendChild(outer);
537
+ this._renderer.appendChild(this._document.body, outer);
538
+ // this._renderer.appendChild(this._renderer.selectRootElement('body'), outer);
539
+ var widthNoScroll = outer.offsetWidth;
540
+ // force scrollbars
541
+ this._renderer.setStyle(outer, 'overflow', 'scroll');
542
+ // add innerdiv
543
+ var inner = this._renderer.createElement('div');
544
+ this._renderer.setStyle(inner, 'width', '100%');
545
+ this._renderer.appendChild(outer, inner);
546
+ var widthWithScroll = inner.offsetWidth;
547
+ // remove divs
548
+ this._renderer.removeChild(this._document.body, outer);
549
+ /**
550
+ * Scrollbar width will be 0 on Mac OS with the
551
+ * default "Only show scrollbars when scrolling" setting (Yosemite and up).
552
+ * setting default width to 20;
553
+ */
554
+ return widthNoScroll - widthWithScroll || 20;
555
+ };
556
+ PepCarouselComponent.prototype.refreshWrapperDimensions = function () {
557
+ if (this.wrapper) {
558
+ var height = this._elementRef.nativeElement.style.height ||
559
+ this._elementRef.nativeElement.offsetHeight;
560
+ this._renderer.setStyle(this.wrapper, 'width', '100%');
561
+ this._renderer.setStyle(this.wrapper, 'height', height === 0 ? 'auto' : height + 'px');
562
+ }
563
+ };
564
+ /*
565
+ * The below solution is heavily inspired from
566
+ * https://gist.github.com/andjosh/6764939
567
+ */
568
+ PepCarouselComponent.prototype.scrollTo = function (element, to, duration) {
569
+ var _this = this;
570
+ this.isAnimating = true;
571
+ var start = element.scrollLeft, change = to - start - this.snapOffset, increment = 20;
572
+ var currentTime = 0;
573
+ // t = current time
574
+ // b = start value
575
+ // c = change in value
576
+ // d = duration
577
+ var easeInOutQuad = function (t, b, c, d) {
578
+ t /= d / 2;
579
+ if (t < 1) {
580
+ return (c / 2) * t * t + b;
581
+ }
582
+ t--;
583
+ return (-c / 2) * (t * (t - 2) - 1) + b;
584
+ };
585
+ var animateScroll = function () {
586
+ currentTime += increment;
587
+ element.scrollLeft = easeInOutQuad(currentTime, start, change, duration);
588
+ if (currentTime < duration) {
589
+ _this.scrollToTimer = setTimeout(animateScroll, increment);
590
+ }
591
+ else {
592
+ // run one more frame to make sure the animation is fully finished
593
+ setTimeout(function () {
594
+ _this.isAnimating = false;
595
+ _this.snapAnimationFinished.emit(_this.currIndex);
596
+ }, increment);
597
+ }
598
+ };
599
+ animateScroll();
600
+ };
601
+ PepCarouselComponent.prototype.locateCurrentIndex = function (snap) {
602
+ var _this = this;
603
+ this.currentChildWidth(function (currentChildWidth, nextChildrenWidth, childrenWidth, idx, stop) {
604
+ if (_this._contentRef.nativeElement.scrollLeft >=
605
+ childrenWidth &&
606
+ _this._contentRef.nativeElement.scrollLeft <=
607
+ nextChildrenWidth) {
608
+ if (nextChildrenWidth -
609
+ _this._contentRef.nativeElement.scrollLeft >
610
+ currentChildWidth / 2 &&
611
+ !_this.isScrollReachesRightEnd()) {
612
+ // roll back scrolling
613
+ if (!_this.isAnimating) {
614
+ _this.currIndex = idx;
615
+ }
616
+ if (snap) {
617
+ _this.scrollTo(_this._contentRef.nativeElement, childrenWidth, _this.snapDuration);
618
+ }
619
+ }
620
+ else if (_this._contentRef.nativeElement.scrollLeft !== 0) {
621
+ // forward scrolling
622
+ if (!_this.isAnimating) {
623
+ _this.currIndex = idx + 1;
624
+ }
625
+ if (snap) {
626
+ _this.scrollTo(_this._contentRef.nativeElement, childrenWidth + currentChildWidth, _this.snapDuration);
627
+ }
628
+ }
629
+ stop();
630
+ }
631
+ else if (idx + 1 === _this._children.length - 1) {
632
+ // reaches last index
633
+ if (!_this.isAnimating) {
634
+ _this.currIndex = idx + 1;
635
+ }
636
+ stop();
637
+ }
638
+ });
639
+ };
640
+ PepCarouselComponent.prototype.currentChildWidth = function (cb) {
641
+ var childrenWidth = 0;
642
+ var shouldBreak = false;
643
+ var breakFunc = function () {
644
+ shouldBreak = true;
645
+ };
646
+ var childrenArr = this._children.toArray();
647
+ for (var i = 0; i < childrenArr.length; i++) {
648
+ if (i === childrenArr.length - 1) {
649
+ break;
650
+ }
651
+ if (shouldBreak) {
652
+ break;
653
+ }
654
+ var nextChildrenWidth = childrenWidth +
655
+ childrenArr[i + 1]._elementRef.nativeElement.clientWidth;
656
+ var currentClildWidth = childrenArr[i]._elementRef.nativeElement.clientWidth;
657
+ cb(currentClildWidth, nextChildrenWidth, childrenWidth, i, breakFunc);
658
+ childrenWidth += currentClildWidth;
659
+ }
660
+ };
661
+ PepCarouselComponent.prototype.toChildrenLocation = function () {
662
+ var to = 0;
663
+ var childrenArr = this._children.toArray();
664
+ for (var i = 0; i < this.currIndex; i++) {
665
+ to += childrenArr[i]._elementRef.nativeElement.clientWidth;
666
+ }
667
+ return to;
668
+ };
669
+ PepCarouselComponent.prototype.locateCarouselItem = function (element) {
670
+ var item = null;
671
+ var childrenArr = this._children.toArray();
672
+ for (var i = 0; i < childrenArr.length; i++) {
673
+ if (element === childrenArr[i]._elementRef.nativeElement) {
674
+ item = childrenArr[i];
675
+ }
676
+ }
677
+ return item;
678
+ };
679
+ PepCarouselComponent.prototype.markElDimension = function () {
680
+ if (this.wrapper) {
681
+ this.elWidth = this.wrapper.style.width;
682
+ this.elHeight = this.wrapper.style.height;
683
+ }
684
+ else {
685
+ this.elWidth =
686
+ this._elementRef.nativeElement.style.width ||
687
+ this._elementRef.nativeElement.offsetWidth + 'px';
688
+ this.elHeight =
689
+ this._elementRef.nativeElement.style.height ||
690
+ this._elementRef.nativeElement.offsetHeight + 'px';
691
+ }
692
+ var container = this.wrapper || this.parentNode;
693
+ var containerWidth = container ? container.clientWidth : 0;
694
+ if (this._children.length > 1) {
695
+ this.indexBound = this.maximumIndex(containerWidth, this._children.toArray());
696
+ }
697
+ };
698
+ PepCarouselComponent.prototype.maximumIndex = function (containerWidth, childrenElements) {
699
+ var count = 0;
700
+ var childrenWidth = 0;
701
+ for (var i = 0; i <= childrenElements.length; i++) {
702
+ // last N element
703
+ var carouselItemDirective = childrenElements[childrenElements.length - 1 - i];
704
+ if (!carouselItemDirective) {
705
+ break;
706
+ }
707
+ else {
708
+ var nativeElement = carouselItemDirective._elementRef.nativeElement;
709
+ var itemWidth = nativeElement.clientWidth;
710
+ if (itemWidth === 0 && nativeElement.firstElementChild) {
711
+ itemWidth =
712
+ carouselItemDirective._elementRef.nativeElement
713
+ .firstElementChild.clientWidth;
714
+ }
715
+ childrenWidth += itemWidth;
716
+ if (childrenWidth < containerWidth) {
717
+ count++;
718
+ }
719
+ else {
720
+ break;
721
+ }
722
+ }
723
+ }
724
+ return childrenElements.length - count;
725
+ };
726
+ PepCarouselComponent.prototype.isScrollReachesRightEnd = function () {
727
+ var scrollLeftPos = this._contentRef.nativeElement.scrollLeft +
728
+ this._contentRef.nativeElement.offsetWidth;
729
+ return scrollLeftPos >= this._contentRef.nativeElement.scrollWidth;
730
+ };
731
+ /**
732
+ * adds a margin right style to the last child element which will resolve the issue
733
+ * of last item gets cutoff.
734
+ */
735
+ PepCarouselComponent.prototype.adjustMarginToLastChild = function () {
736
+ // if (this._children && this._children.length > 0 && this.hideScrollbar) {
737
+ // const childrenArr = this._children.toArray();
738
+ // const lastItem = childrenArr[childrenArr.length - 1]._elementRef.nativeElement;
739
+ // if (this.wrapper && childrenArr.length > 1) {
740
+ // this._renderer.setStyle(lastItem, 'margin-right', this.scrollbarWidth);
741
+ // } else {
742
+ // this._renderer.setStyle(lastItem, 'margin-right', 0);
743
+ // }
744
+ // }
745
+ };
746
+ return PepCarouselComponent;
747
+ }());
748
+ PepCarouselComponent.decorators = [
749
+ { type: core.Component, args: [{
750
+ selector: 'pep-carousel',
751
+ template: "\n <div class=\"carousel-content\" #contentRef>\n <ng-content></ng-content>\n </div>\n ",
752
+ styles: ["\n :host {\n overflow: hidden;\n display: block;\n }\n .carousel-content {\n height: 100%;\n overflow: auto;\n white-space: nowrap;\n }\n "]
753
+ },] }
754
+ ];
755
+ PepCarouselComponent.ctorParameters = function () { return [
756
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
757
+ { type: core.Renderer2, decorators: [{ type: core.Inject, args: [core.Renderer2,] }] },
758
+ { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
759
+ ]; };
760
+ PepCarouselComponent.propDecorators = {
761
+ _contentRef: [{ type: core.ViewChild, args: ['contentRef', { static: true },] }],
762
+ _children: [{ type: core.ContentChildren, args: [PepCarouselItemDirective, { descendants: true },] }],
763
+ _pointerEvents: [{ type: core.HostBinding, args: ['style.pointer-events',] }],
764
+ dsInitialized: [{ type: core.Output }],
765
+ indexChanged: [{ type: core.Output }],
766
+ reachesLeftBound: [{ type: core.Output }],
767
+ reachesRightBound: [{ type: core.Output }],
768
+ snapAnimationFinished: [{ type: core.Output }],
769
+ dragStart: [{ type: core.Output }],
770
+ dragEnd: [{ type: core.Output }],
771
+ scrollbarHidden: [{ type: core.Input, args: ['scrollbarHidden',] }],
772
+ disabled: [{ type: core.Input, args: ['disabled',] }],
773
+ xDisabled: [{ type: core.Input, args: ['xDisabled',] }],
774
+ yDisabled: [{ type: core.Input, args: ['yDisabled',] }],
775
+ xWheelEnabled: [{ type: core.Input, args: ['xWheelEnabled',] }],
776
+ dragDisabled: [{ type: core.Input, args: ['dragDisabled',] }],
777
+ snapDisabled: [{ type: core.Input, args: ['snapDisabled',] }],
778
+ snapOffset: [{ type: core.Input, args: ['snapOffset',] }],
779
+ snapDuration: [{ type: core.Input, args: ['snapDuration',] }],
780
+ onWheel: [{ type: core.HostListener, args: ['wheel', ['$event'],] }],
781
+ onWindowResize: [{ type: core.HostListener, args: ['window:resize',] }]
782
782
  };
783
783
 
784
- var PepCarouselModule = /** @class */ (function () {
785
- function PepCarouselModule() {
786
- }
787
- return PepCarouselModule;
788
- }());
789
- PepCarouselModule.decorators = [
790
- { type: core.NgModule, args: [{
791
- exports: [PepCarouselComponent, PepCarouselItemDirective],
792
- declarations: [PepCarouselComponent, PepCarouselItemDirective],
793
- },] }
784
+ var PepCarouselModule = /** @class */ (function () {
785
+ function PepCarouselModule() {
786
+ }
787
+ return PepCarouselModule;
788
+ }());
789
+ PepCarouselModule.decorators = [
790
+ { type: core.NgModule, args: [{
791
+ exports: [PepCarouselComponent, PepCarouselItemDirective],
792
+ declarations: [PepCarouselComponent, PepCarouselItemDirective],
793
+ },] }
794
794
  ];
795
795
 
796
- /*
797
- * Public API Surface of carousel
798
- */
796
+ /*
797
+ * Public API Surface of carousel
798
+ */
799
799
  // export * from './carousel.model';
800
800
 
801
- /**
802
- * Generated bundle index. Do not edit.
801
+ /**
802
+ * Generated bundle index. Do not edit.
803
803
  */
804
804
 
805
805
  exports.PepCarouselComponent = PepCarouselComponent;