mis-crystal-design-system 2.5.0 → 2.5.1

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 (277) hide show
  1. package/action-list/index.d.ts +1 -1
  2. package/action-list/public_api.d.ts +2 -2
  3. package/async-search-dropdown/async-dropdown.component.d.ts +4 -4
  4. package/async-search-dropdown/index.d.ts +1 -1
  5. package/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.metadata.json +1 -1
  6. package/async-search-dropdown/public_api.d.ts +2 -2
  7. package/bundles/mis-crystal-design-system-action-list.umd.js +1 -1
  8. package/bundles/mis-crystal-design-system-action-list.umd.js.map +1 -1
  9. package/bundles/mis-crystal-design-system-action-list.umd.min.js +1 -1
  10. package/bundles/mis-crystal-design-system-action-list.umd.min.js.map +1 -1
  11. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js +15 -15
  12. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.js.map +1 -1
  13. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js +1 -1
  14. package/bundles/mis-crystal-design-system-async-search-dropdown.umd.min.js.map +1 -1
  15. package/bundles/mis-crystal-design-system-button.umd.js +25 -25
  16. package/bundles/mis-crystal-design-system-button.umd.js.map +1 -1
  17. package/bundles/mis-crystal-design-system-button.umd.min.js +1 -1
  18. package/bundles/mis-crystal-design-system-button.umd.min.js.map +1 -1
  19. package/bundles/mis-crystal-design-system-checkbox.umd.js +5 -6
  20. package/bundles/mis-crystal-design-system-checkbox.umd.js.map +1 -1
  21. package/bundles/mis-crystal-design-system-checkbox.umd.min.js.map +1 -1
  22. package/bundles/mis-crystal-design-system-chip.umd.js +6 -7
  23. package/bundles/mis-crystal-design-system-chip.umd.js.map +1 -1
  24. package/bundles/mis-crystal-design-system-chip.umd.min.js +1 -1
  25. package/bundles/mis-crystal-design-system-chip.umd.min.js.map +1 -1
  26. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js +22 -19
  27. package/bundles/mis-crystal-design-system-datepicker_v2.umd.js.map +1 -1
  28. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js +1 -1
  29. package/bundles/mis-crystal-design-system-datepicker_v2.umd.min.js.map +1 -1
  30. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js +26 -49
  31. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.js.map +1 -1
  32. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js +1 -1
  33. package/bundles/mis-crystal-design-system-daterangepicker_v2.umd.min.js.map +1 -1
  34. package/bundles/mis-crystal-design-system-drawer.umd.js +9 -12
  35. package/bundles/mis-crystal-design-system-drawer.umd.js.map +1 -1
  36. package/bundles/mis-crystal-design-system-drawer.umd.min.js.map +1 -1
  37. package/bundles/mis-crystal-design-system-dropdown.umd.js.map +1 -1
  38. package/bundles/mis-crystal-design-system-dropdown.umd.min.js.map +1 -1
  39. package/bundles/mis-crystal-design-system-fab.umd.js +11 -14
  40. package/bundles/mis-crystal-design-system-fab.umd.js.map +1 -1
  41. package/bundles/mis-crystal-design-system-fab.umd.min.js.map +1 -1
  42. package/bundles/mis-crystal-design-system-input.umd.js +7 -7
  43. package/bundles/mis-crystal-design-system-input.umd.js.map +1 -1
  44. package/bundles/mis-crystal-design-system-input.umd.min.js +1 -1
  45. package/bundles/mis-crystal-design-system-input.umd.min.js.map +1 -1
  46. package/bundles/mis-crystal-design-system-loader.umd.js +3 -4
  47. package/bundles/mis-crystal-design-system-loader.umd.js.map +1 -1
  48. package/bundles/mis-crystal-design-system-loader.umd.min.js +1 -1
  49. package/bundles/mis-crystal-design-system-loader.umd.min.js.map +1 -1
  50. package/bundles/mis-crystal-design-system-modal.umd.js +8 -12
  51. package/bundles/mis-crystal-design-system-modal.umd.js.map +1 -1
  52. package/bundles/mis-crystal-design-system-modal.umd.min.js.map +1 -1
  53. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.js.map +1 -1
  54. package/bundles/mis-crystal-design-system-multi-select-dropdown.umd.min.js.map +1 -1
  55. package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.js.map +1 -1
  56. package/bundles/mis-crystal-design-system-nested-multi-select-dropdown.umd.min.js.map +1 -1
  57. package/bundles/mis-crystal-design-system-radio-button.umd.js +6 -7
  58. package/bundles/mis-crystal-design-system-radio-button.umd.js.map +1 -1
  59. package/bundles/mis-crystal-design-system-radio-button.umd.min.js +1 -1
  60. package/bundles/mis-crystal-design-system-radio-button.umd.min.js.map +1 -1
  61. package/bundles/mis-crystal-design-system-switch.umd.js +3 -4
  62. package/bundles/mis-crystal-design-system-switch.umd.js.map +1 -1
  63. package/bundles/mis-crystal-design-system-switch.umd.min.js +1 -1
  64. package/bundles/mis-crystal-design-system-switch.umd.min.js.map +1 -1
  65. package/bundles/mis-crystal-design-system-table.umd.js +40 -58
  66. package/bundles/mis-crystal-design-system-table.umd.js.map +1 -1
  67. package/bundles/mis-crystal-design-system-table.umd.min.js +1 -1
  68. package/bundles/mis-crystal-design-system-table.umd.min.js.map +1 -1
  69. package/bundles/mis-crystal-design-system-toast.umd.js +28 -33
  70. package/bundles/mis-crystal-design-system-toast.umd.js.map +1 -1
  71. package/bundles/mis-crystal-design-system-toast.umd.min.js +1 -1
  72. package/bundles/mis-crystal-design-system-toast.umd.min.js.map +1 -1
  73. package/bundles/mis-crystal-design-system.umd.js.map +1 -1
  74. package/button/button.component.d.ts +4 -4
  75. package/button/button.directive.d.ts +3 -3
  76. package/button/button.directive.scss +1 -1
  77. package/button/button.module.d.ts +1 -1
  78. package/button/index.d.ts +1 -1
  79. package/button/mis-crystal-design-system-button.metadata.json +1 -1
  80. package/button/public_api.d.ts +2 -2
  81. package/checkbox/checkbox.component.d.ts +3 -3
  82. package/checkbox/checkbox.module.d.ts +1 -1
  83. package/checkbox/index.d.ts +1 -1
  84. package/checkbox/mis-crystal-design-system-checkbox.metadata.json +1 -1
  85. package/checkbox/public_api.d.ts +2 -2
  86. package/chip/chip.component.d.ts +2 -2
  87. package/chip/chip.module.d.ts +1 -1
  88. package/chip/index.d.ts +1 -1
  89. package/chip/mis-crystal-design-system-chip.metadata.json +1 -1
  90. package/chip/public_api.d.ts +2 -2
  91. package/datepicker_v2/index.d.ts +1 -1
  92. package/datepicker_v2/mis-crystal-design-system-datepicker_v2.metadata.json +1 -1
  93. package/datepicker_v2/public_api.d.ts +3 -3
  94. package/daterangepicker_v2/index.d.ts +1 -1
  95. package/daterangepicker_v2/mis-crystal-design-system-daterangepicker_v2.metadata.json +1 -1
  96. package/daterangepicker_v2/public_api.d.ts +3 -3
  97. package/drawer/index.d.ts +1 -1
  98. package/drawer/mis-crystal-design-system-drawer.metadata.json +1 -1
  99. package/drawer/public_api.d.ts +4 -4
  100. package/dropdown/dropdown.module.d.ts +1 -1
  101. package/dropdown/index.d.ts +1 -1
  102. package/dropdown/mis-crystal-design-system-dropdown.metadata.json +1 -1
  103. package/dropdown/public_api.d.ts +2 -2
  104. package/esm2015/action-list/action-list.component.js +2 -2
  105. package/esm2015/action-list/index.js +2 -2
  106. package/esm2015/action-list/public_api.js +3 -3
  107. package/esm2015/async-search-dropdown/async-dropdown.component.js +25 -25
  108. package/esm2015/async-search-dropdown/async-dropdown.module.js +7 -7
  109. package/esm2015/async-search-dropdown/index.js +2 -2
  110. package/esm2015/async-search-dropdown/public_api.js +3 -3
  111. package/esm2015/button/button.component.js +10 -10
  112. package/esm2015/button/button.directive.js +19 -19
  113. package/esm2015/button/button.module.js +5 -5
  114. package/esm2015/button/index.js +2 -2
  115. package/esm2015/button/public_api.js +3 -3
  116. package/esm2015/checkbox/checkbox.component.js +8 -9
  117. package/esm2015/checkbox/checkbox.module.js +5 -5
  118. package/esm2015/checkbox/index.js +2 -2
  119. package/esm2015/checkbox/public_api.js +3 -3
  120. package/esm2015/chip/chip.component.js +8 -9
  121. package/esm2015/chip/chip.module.js +4 -4
  122. package/esm2015/chip/index.js +2 -2
  123. package/esm2015/chip/public_api.js +3 -3
  124. package/esm2015/datepicker_v2/datepicker-constants.js +2 -2
  125. package/esm2015/datepicker_v2/datepicker.module.js +3 -3
  126. package/esm2015/datepicker_v2/index.js +2 -2
  127. package/esm2015/datepicker_v2/models/dp-config.model.js +1 -1
  128. package/esm2015/datepicker_v2/public_api.js +3 -3
  129. package/esm2015/datepicker_v2/tz-dp-container/tz-dp-container.component.js +12 -9
  130. package/esm2015/datepicker_v2/utils/index.js +13 -13
  131. package/esm2015/daterangepicker_v2/daterangepicker-constants.js +2 -2
  132. package/esm2015/daterangepicker_v2/daterangepicker.module.js +2 -2
  133. package/esm2015/daterangepicker_v2/index.js +2 -2
  134. package/esm2015/daterangepicker_v2/public_api.js +3 -3
  135. package/esm2015/daterangepicker_v2/tz-drp-container/tz-drp-container.component.js +15 -38
  136. package/esm2015/daterangepicker_v2/utils/index.js +13 -13
  137. package/esm2015/drawer/drawer-body/drawer-body.component.js +4 -7
  138. package/esm2015/drawer/drawer.module.js +4 -4
  139. package/esm2015/drawer/drawer.service.js +4 -4
  140. package/esm2015/drawer/index.js +2 -2
  141. package/esm2015/drawer/public_api.js +5 -5
  142. package/esm2015/dropdown/dropdown.module.js +5 -5
  143. package/esm2015/dropdown/index.js +2 -2
  144. package/esm2015/dropdown/public_api.js +3 -3
  145. package/esm2015/fab/fab.component.js +11 -14
  146. package/esm2015/fab/fab.module.js +3 -3
  147. package/esm2015/fab/index.js +2 -2
  148. package/esm2015/fab/public_api.js +3 -3
  149. package/esm2015/index.js +2 -2
  150. package/esm2015/input/directives/input/input.directive.js +7 -7
  151. package/esm2015/input/index.js +2 -2
  152. package/esm2015/input/mis-input.component.js +8 -8
  153. package/esm2015/input/mis-input.module.js +7 -7
  154. package/esm2015/input/public_api.js +4 -4
  155. package/esm2015/loader/index.js +2 -2
  156. package/esm2015/loader/loader.component.js +5 -6
  157. package/esm2015/loader/loader.module.js +4 -4
  158. package/esm2015/loader/public_api.js +3 -3
  159. package/esm2015/menu/index.js +2 -2
  160. package/esm2015/modal/index.js +2 -2
  161. package/esm2015/modal/modal.module.js +10 -14
  162. package/esm2015/modal/modal.service.js +3 -3
  163. package/esm2015/modal/module-wrapper/module-wrapper.component.js +4 -4
  164. package/esm2015/modal/public_api.js +5 -5
  165. package/esm2015/multi-select-dropdown/index.js +2 -2
  166. package/esm2015/multi-select-dropdown/multi-select-dropdown.module.js +7 -7
  167. package/esm2015/multi-select-dropdown/public_api.js +3 -3
  168. package/esm2015/nested-multi-select-dropdown/index.js +2 -2
  169. package/esm2015/nested-multi-select-dropdown/nested-multi-select-dropdown.module.js +7 -7
  170. package/esm2015/nested-multi-select-dropdown/public_api.js +3 -3
  171. package/esm2015/public-api.js +1 -1
  172. package/esm2015/radio-button/index.js +2 -2
  173. package/esm2015/radio-button/public_api.js +3 -3
  174. package/esm2015/radio-button/radio-button.component.js +9 -10
  175. package/esm2015/radio-button/radio-button.module.js +5 -5
  176. package/esm2015/switch/index.js +2 -2
  177. package/esm2015/switch/public_api.js +3 -3
  178. package/esm2015/switch/switch.component.js +6 -7
  179. package/esm2015/switch/switch.module.js +5 -5
  180. package/esm2015/table/custom-table-cell.directive.js +3 -3
  181. package/esm2015/table/filter/filter.component.js +11 -13
  182. package/esm2015/table/index.js +2 -2
  183. package/esm2015/table/public_api.js +5 -5
  184. package/esm2015/table/sub-table/sub-table.component.js +12 -13
  185. package/esm2015/table/table.component.js +21 -22
  186. package/esm2015/table/table.module.js +7 -21
  187. package/esm2015/toast/index.js +2 -2
  188. package/esm2015/toast/toast.component.js +12 -14
  189. package/esm2015/toast/toast.data.service.js +3 -3
  190. package/esm2015/toast/toast.module.js +9 -9
  191. package/esm2015/toast/toast.service.js +23 -26
  192. package/fab/index.d.ts +1 -1
  193. package/fab/mis-crystal-design-system-fab.metadata.json +1 -1
  194. package/fab/public_api.d.ts +2 -2
  195. package/fesm2015/mis-crystal-design-system-action-list.js +1 -1
  196. package/fesm2015/mis-crystal-design-system-action-list.js.map +1 -1
  197. package/fesm2015/mis-crystal-design-system-async-search-dropdown.js +20 -20
  198. package/fesm2015/mis-crystal-design-system-async-search-dropdown.js.map +1 -1
  199. package/fesm2015/mis-crystal-design-system-button.js +25 -25
  200. package/fesm2015/mis-crystal-design-system-button.js.map +1 -1
  201. package/fesm2015/mis-crystal-design-system-checkbox.js +5 -6
  202. package/fesm2015/mis-crystal-design-system-checkbox.js.map +1 -1
  203. package/fesm2015/mis-crystal-design-system-chip.js +6 -7
  204. package/fesm2015/mis-crystal-design-system-chip.js.map +1 -1
  205. package/fesm2015/mis-crystal-design-system-datepicker_v2.js +24 -21
  206. package/fesm2015/mis-crystal-design-system-datepicker_v2.js.map +1 -1
  207. package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js +28 -51
  208. package/fesm2015/mis-crystal-design-system-daterangepicker_v2.js.map +1 -1
  209. package/fesm2015/mis-crystal-design-system-drawer.js +9 -12
  210. package/fesm2015/mis-crystal-design-system-drawer.js.map +1 -1
  211. package/fesm2015/mis-crystal-design-system-dropdown.js.map +1 -1
  212. package/fesm2015/mis-crystal-design-system-fab.js +11 -14
  213. package/fesm2015/mis-crystal-design-system-fab.js.map +1 -1
  214. package/fesm2015/mis-crystal-design-system-input.js +8 -8
  215. package/fesm2015/mis-crystal-design-system-input.js.map +1 -1
  216. package/fesm2015/mis-crystal-design-system-loader.js +3 -4
  217. package/fesm2015/mis-crystal-design-system-loader.js.map +1 -1
  218. package/fesm2015/mis-crystal-design-system-modal.js +8 -12
  219. package/fesm2015/mis-crystal-design-system-modal.js.map +1 -1
  220. package/fesm2015/mis-crystal-design-system-multi-select-dropdown.js.map +1 -1
  221. package/fesm2015/mis-crystal-design-system-nested-multi-select-dropdown.js.map +1 -1
  222. package/fesm2015/mis-crystal-design-system-radio-button.js +6 -7
  223. package/fesm2015/mis-crystal-design-system-radio-button.js.map +1 -1
  224. package/fesm2015/mis-crystal-design-system-switch.js +3 -4
  225. package/fesm2015/mis-crystal-design-system-switch.js.map +1 -1
  226. package/fesm2015/mis-crystal-design-system-table.js +42 -60
  227. package/fesm2015/mis-crystal-design-system-table.js.map +1 -1
  228. package/fesm2015/mis-crystal-design-system-toast.js +28 -33
  229. package/fesm2015/mis-crystal-design-system-toast.js.map +1 -1
  230. package/fesm2015/mis-crystal-design-system.js.map +1 -1
  231. package/index.d.ts +1 -1
  232. package/input/directives/input/input.directive.d.ts +3 -3
  233. package/input/index.d.ts +1 -1
  234. package/input/mis-crystal-design-system-input.metadata.json +1 -1
  235. package/input/mis-input.component.d.ts +4 -4
  236. package/input/public_api.d.ts +3 -3
  237. package/loader/index.d.ts +1 -1
  238. package/loader/loader.component.d.ts +1 -1
  239. package/loader/loader.module.d.ts +1 -1
  240. package/loader/mis-crystal-design-system-loader.metadata.json +1 -1
  241. package/loader/public_api.d.ts +2 -2
  242. package/menu/index.d.ts +1 -1
  243. package/modal/index.d.ts +1 -1
  244. package/modal/mis-crystal-design-system-modal.metadata.json +1 -1
  245. package/modal/modal.module.d.ts +1 -1
  246. package/modal/public_api.d.ts +4 -4
  247. package/multi-select-dropdown/index.d.ts +1 -1
  248. package/multi-select-dropdown/mis-crystal-design-system-multi-select-dropdown.metadata.json +1 -1
  249. package/multi-select-dropdown/multi-select-dropdown.module.d.ts +1 -1
  250. package/multi-select-dropdown/public_api.d.ts +2 -2
  251. package/nested-multi-select-dropdown/index.d.ts +1 -1
  252. package/nested-multi-select-dropdown/mis-crystal-design-system-nested-multi-select-dropdown.metadata.json +1 -1
  253. package/nested-multi-select-dropdown/nested-multi-select-dropdown.module.d.ts +1 -1
  254. package/nested-multi-select-dropdown/public_api.d.ts +2 -2
  255. package/package.json +1 -1
  256. package/radio-button/index.d.ts +1 -1
  257. package/radio-button/mis-crystal-design-system-radio-button.metadata.json +1 -1
  258. package/radio-button/public_api.d.ts +2 -2
  259. package/radio-button/radio-button.component.d.ts +2 -2
  260. package/radio-button/radio-button.module.d.ts +1 -1
  261. package/switch/index.d.ts +1 -1
  262. package/switch/mis-crystal-design-system-switch.metadata.json +1 -1
  263. package/switch/public_api.d.ts +2 -2
  264. package/switch/switch.component.d.ts +2 -2
  265. package/switch/switch.module.d.ts +1 -1
  266. package/table/custom-table-cell.directive.d.ts +1 -1
  267. package/table/filter/filter.component.d.ts +1 -1
  268. package/table/index.d.ts +1 -1
  269. package/table/mis-crystal-design-system-table.metadata.json +1 -1
  270. package/table/public_api.d.ts +7 -7
  271. package/table/sub-table/sub-table.component.d.ts +6 -6
  272. package/table/table.component.d.ts +6 -6
  273. package/toast/index.d.ts +1 -1
  274. package/toast/mis-crystal-design-system-toast.metadata.json +1 -1
  275. package/toast/toast.component.d.ts +1 -1
  276. package/toast/toast.module.d.ts +1 -1
  277. package/toast/toast.service.d.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","DropdownComponent","eRef","overlay","viewContainerRef","this","isOpen","isSearchInputFocused","searchInput","searchData","data","height","width","label","dropdownListHeight","dropdownListWidth","dropdownListPosition","searchEnabled","selectedItem","noDataMessage","onChange","EventEmitter","prototype","ngOnInit","clickout","event","nativeElement","contains","target","onCancel","filterByValue","array","string","filter","toLowerCase","includes","searchInputOnChange","newValue","searchInputFocused","isFocused","searchInputCanceled","stopPropagation","toggleDropdown","openDropdown","popupContainer","selectElement","template","origin","_this","positionsBottom","ConnectionPositionPair","originX","originY","overlayX","overlayY","positionsTop","positionStrategy","position","flexibleConnectedTo","withPositions","arguments","length","concat","__spread","reverse","withPush","configs","OverlayConfig","hasBackdrop","backdropClass","scrollStrategy","scrollStrategies","reposition","clientWidth","overlayRef","updateSize","attach","TemplatePortal","backdropClick","subscribe","res","selectItem","item","emit","_a","detach","Component","args","selector","ElementRef","Overlay","ViewContainerRef","Input","Output","ViewChild","static","HostListener","DropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":";;;;;;;;;;;;;;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ACI,MAAO,CAAEC,SAAUF,EAAgBG,UAAW,8BAPrDC,EAAAA,SAAQd,KAAA,CAAC,CACNe,aAAc,CAACrG,GACfsG,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aACxBC,QAAS,CAACzG","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef } from \"@angular/core\";\n\n@Component({\n selector: \"mis-dropdown\",\n templateUrl: \"./dropdown.component.html\",\n styleUrls: [\"./dropdown.component.scss\"]\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = \"\";\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = \"\";\n @Input() width: string = \"\";\n @Input() label: string = \"Select\";\n\n @Input() dropdownListHeight: string = \"\";\n @Input() dropdownListWidth: string = \"\";\n @Input() dropdownListPosition: \"Left\" | \"Right\" = \"Left\";\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: \"\", label: \"\" };\n @Input() noDataMessage: string = \"No Data\";\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(\"select\", { static: false }) selectElement: ElementRef;\n @ViewChild(\"popupContainer\", { static: false }) popupContainer: TemplateRef<Element>;\n private overlayRef: OverlayRef;\n\n constructor(private eRef: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n ngOnInit() {}\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o => o.label.toLowerCase().includes(string.toLowerCase()));\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = \"\";\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = \"\";\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n if (this.isOpen) this.openDropdown(this.popupContainer, this.selectElement.nativeElement);\n else this.onCancel();\n }\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionsBottom = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, 0, 4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, 0, 4)\n ];\n const positionsTop = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" }, 0, -4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }, 0, -4)\n ];\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n ...(this.dropdownListPosition === \"Right\" ? positionsBottom.reverse() : positionsBottom),\n ...(this.dropdownListPosition === \"Right\" ? positionsTop.reverse() : positionsTop)\n ])\n .withPush(true);\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n if (this.dropdownListWidth) this.overlayRef.updateSize({ width: this.dropdownListWidth });\n if (this.dropdownListHeight) this.overlayRef.updateSize({ height: this.dropdownListHeight });\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.onCancel();\n });\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.overlayRef?.detach();\n this.searchInput = \"\";\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../projects/mis-components/dropdown/dropdown.component.ts","../../../projects/mis-components/dropdown/dropdown.module.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","DropdownComponent","eRef","overlay","viewContainerRef","this","isOpen","isSearchInputFocused","searchInput","searchData","data","height","width","label","dropdownListHeight","dropdownListWidth","dropdownListPosition","searchEnabled","selectedItem","noDataMessage","onChange","EventEmitter","prototype","ngOnInit","clickout","event","nativeElement","contains","target","onCancel","filterByValue","array","string","filter","toLowerCase","includes","searchInputOnChange","newValue","searchInputFocused","isFocused","searchInputCanceled","stopPropagation","toggleDropdown","openDropdown","popupContainer","selectElement","template","origin","_this","positionsBottom","ConnectionPositionPair","originX","originY","overlayX","overlayY","positionsTop","positionStrategy","position","flexibleConnectedTo","withPositions","arguments","length","concat","__spread","reverse","withPush","configs","OverlayConfig","hasBackdrop","backdropClass","scrollStrategy","scrollStrategies","reposition","clientWidth","overlayRef","updateSize","attach","TemplatePortal","backdropClick","subscribe","res","selectItem","item","emit","_a","detach","Component","args","selector","ElementRef","Overlay","ViewContainerRef","Input","Output","ViewChild","static","HostListener","DropdownModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,EAgEcZ,OAAOC,wBC/K9B,SAAAiB,EAAoBC,EAA0BC,EAA0BC,GAApDC,KAAAH,KAAAA,EAA0BG,K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2D,WAAA,SAAWC,GACT7E,KAAKe,SAAS+D,KAAKD,GACnB7E,KAAKqC,kBAEPzC,EAAAqB,UAAAO,SAAA,iBACExB,KAAKE,sBAAuB,EAC5BF,KAAKC,QAAS,EACC,QAAf8E,EAAA/E,KAAKqE,kBAAU,IAAAU,GAAAA,EAAEC,SACjBhF,KAAKG,YAAc,6BAzGtB8E,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,eACV1C,SAAA,w7PAJkB2C,EAAAA,kBAFaC,EAAAA,eAE0EC,EAAAA,kDAaxGC,EAAAA,sBACAA,EAAAA,qBACAA,EAAAA,qBACAA,EAAAA,kCAEAA,EAAAA,iCACAA,EAAAA,oCACAA,EAAAA,6BAEAA,EAAAA,4BACAA,EAAAA,6BACAA,EAAAA,wBAEAC,EAAAA,8BAEAC,EAAAA,UAASP,KAAA,CAAC,SAAU,CAAEQ,QAAQ,4BAC9BD,EAAAA,UAASP,KAAA,CAAC,iBAAkB,CAAEQ,QAAQ,sBAMtCC,EAAAA,aAAYT,KAAA,CAAC,iBAAkB,CAAC,+BC3BnC,SAAAU,YACSA,EAAAC,QAAP,WACE,MAAO,CAAEC,SAAUF,EAAgBG,UAAW,8BAPjDC,EAAAA,SAAQd,KAAA,CAAC,CACRe,aAAc,CAACrG,GACfsG,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aACxBC,QAAS,CAACzG","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, TemplateRef, ViewChild, ViewContainerRef } from \"@angular/core\";\n\n@Component({\n selector: \"mis-dropdown\",\n templateUrl: \"./dropdown.component.html\",\n styleUrls: [\"./dropdown.component.scss\"]\n})\nexport class DropdownComponent implements OnInit {\n isOpen = false;\n isSearchInputFocused: boolean = false;\n searchInput: string = \"\";\n searchData: DropdownItem[] = [];\n\n @Input() data: DropdownItem[] = [];\n @Input() height: string = \"\";\n @Input() width: string = \"\";\n @Input() label: string = \"Select\";\n\n @Input() dropdownListHeight: string = \"\";\n @Input() dropdownListWidth: string = \"\";\n @Input() dropdownListPosition: \"Left\" | \"Right\" = \"Left\";\n\n @Input() searchEnabled: boolean = true;\n @Input() selectedItem: DropdownItem = { value: \"\", label: \"\" };\n @Input() noDataMessage: string = \"No Data\";\n\n @Output() onChange: EventEmitter<any> = new EventEmitter();\n\n @ViewChild(\"select\", { static: false }) selectElement: ElementRef;\n @ViewChild(\"popupContainer\", { static: false }) popupContainer: TemplateRef<Element>;\n private overlayRef: OverlayRef;\n\n constructor(private eRef: ElementRef, private overlay: Overlay, private viewContainerRef: ViewContainerRef) {}\n ngOnInit() {}\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n const isClickedOutside = !this.eRef.nativeElement.contains(event.target);\n if (isClickedOutside) {\n this.onCancel();\n }\n }\n filterByValue(array: DropdownItem[], string: string) {\n return array.filter(o => o.label.toLowerCase().includes(string.toLowerCase()));\n }\n searchInputOnChange(newValue) {\n this.searchInput = newValue;\n if (newValue) {\n this.searchData = this.filterByValue(this.data, newValue);\n } else {\n this.searchData = [];\n this.searchInput = \"\";\n }\n }\n searchInputFocused(isFocused: boolean) {\n this.isSearchInputFocused = isFocused;\n }\n searchInputCanceled(event) {\n event.stopPropagation();\n this.searchInput = \"\";\n this.isSearchInputFocused = false;\n }\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n if (this.isOpen) this.openDropdown(this.popupContainer, this.selectElement.nativeElement);\n else this.onCancel();\n }\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionsBottom = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }, 0, 4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"bottom\" }, { overlayX: \"end\", overlayY: \"top\" }, 0, 4)\n ];\n const positionsTop = [\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" }, 0, -4),\n new ConnectionPositionPair({ originX: \"end\", originY: \"top\" }, { overlayX: \"end\", overlayY: \"bottom\" }, 0, -4)\n ];\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n ...(this.dropdownListPosition === \"Right\" ? positionsBottom.reverse() : positionsBottom),\n ...(this.dropdownListPosition === \"Right\" ? positionsTop.reverse() : positionsTop)\n ])\n .withPush(true);\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n if (this.dropdownListWidth) this.overlayRef.updateSize({ width: this.dropdownListWidth });\n if (this.dropdownListHeight) this.overlayRef.updateSize({ height: this.dropdownListHeight });\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.onCancel();\n });\n }\n selectItem(item) {\n this.onChange.emit(item);\n this.toggleDropdown();\n }\n onCancel() {\n this.isSearchInputFocused = false;\n this.isOpen = false;\n this.overlayRef?.detach();\n this.searchInput = \"\";\n }\n}\nexport interface DropdownItem {\n label: string;\n value: string;\n icon?: string;\n disabled?: boolean;\n}\n","import { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\nimport { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { DropdownComponent } from \"./dropdown.component\";\n\n@NgModule({\n declarations: [DropdownComponent],\n imports: [CommonModule, FormsModule],\n exports: [DropdownComponent]\n})\nexport class DropdownModule {\n static forRoot(): ModuleWithProviders<DropdownModule> {\n return { ngModule: DropdownModule, providers: [] };\n }\n}\n"]}
@@ -19,10 +19,9 @@
19
19
  }
20
20
  };
21
21
  FabComponent.prototype.ngOnInit = function () {
22
- this.options = Object.assign({ size: 56, backgroundColorClosed: '#0937B2', backgroundColorOpened: '#3a5fc1' }, this.options);
23
- };
24
- FabComponent.prototype.ngOnDestroy = function () {
22
+ this.options = Object.assign({ size: 56, backgroundColorClosed: "#0937B2", backgroundColorOpened: "#3a5fc1" }, this.options);
25
23
  };
24
+ FabComponent.prototype.ngOnDestroy = function () { };
26
25
  FabComponent.prototype.clickItem = function (item) {
27
26
  this.closeFab();
28
27
  item.click();
@@ -43,18 +42,16 @@
43
42
  animations.trigger("slideUpFab", [
44
43
  animations.transition(":enter", [
45
44
  animations.style({ transform: "translateY(50px)", opacity: 0 }),
46
- animations.animate("300ms ease-out", animations.style({ transform: "translateY(0px)", opacity: 1 })),
47
- ]),
48
- animations.transition(":leave", [
49
- animations.animate("200ms ease-out", animations.style({ transform: "translateY(70px)", opacity: 0 })),
45
+ animations.animate("300ms ease-out", animations.style({ transform: "translateY(0px)", opacity: 1 }))
50
46
  ]),
47
+ animations.transition(":leave", [animations.animate("200ms ease-out", animations.style({ transform: "translateY(70px)", opacity: 0 }))])
51
48
  ]),
52
49
  animations.trigger("rotateButton", [
53
- animations.state('default', animations.style({ transform: 'rotate(0)' })),
54
- animations.state('rotated', animations.style({ transform: 'rotate(45deg)' })),
55
- animations.transition('rotated => default', animations.animate('300ms ease-out')),
56
- animations.transition('default => rotated', animations.animate('200ms ease-in'))
57
- ]),
50
+ animations.state("default", animations.style({ transform: "rotate(0)" })),
51
+ animations.state("rotated", animations.style({ transform: "rotate(45deg)" })),
52
+ animations.transition("rotated => default", animations.animate("300ms ease-out")),
53
+ animations.transition("default => rotated", animations.animate("200ms ease-in"))
54
+ ])
58
55
  ],
59
56
  styles: [".fab-wrapper{position:fixed;right:24px;bottom:24px;z-index:1000}.fab-wrapper .fab-item{position:relative;padding:0 0 16px 8px}.fab-wrapper .fab-item .fab-tooltip{position:absolute;background-color:#181f33;border-radius:4px;color:#fff;padding:8px;display:flex;justify-content:center;align-items:center;white-space:nowrap;right:100%;top:calc(50% - 8px);transform:translateY(-50%)}.fab-wrapper .fab-item .fab-button{width:40px;height:40px}.fab-wrapper .fab-container,.fab-wrapper .fab-item .fab-button{cursor:pointer;border-radius:50%;display:flex;justify-content:center;align-items:center}.fab-wrapper .fab-container{width:56px;height:56px}.add-img{height:24px;width:24px}"]
60
57
  },] }
@@ -66,7 +63,7 @@
66
63
  show: [{ type: core.Input }],
67
64
  options: [{ type: core.Input }],
68
65
  items: [{ type: core.Input }],
69
- clickout: [{ type: core.HostListener, args: ['document:click', ['$event'],] }]
66
+ clickout: [{ type: core.HostListener, args: ["document:click", ["$event"],] }]
70
67
  };
71
68
 
72
69
  var FabModule = /** @class */ (function () {
@@ -81,7 +78,7 @@
81
78
  { type: core.NgModule, args: [{
82
79
  declarations: [FabComponent],
83
80
  imports: [common.CommonModule],
84
- exports: [FabComponent],
81
+ exports: [FabComponent]
85
82
  },] }
86
83
  ];
87
84
 
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-fab.umd.js","sources":["../../../projects/mis-components/fab/fab.component.ts","../../../projects/mis-components/fab/fab.module.ts","../../../projects/mis-components/fab/mis-crystal-design-system-fab.ts"],"sourcesContent":["/** @format */\n\nimport { Component, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { trigger, transition, style, animate, state } from \"@angular/animations\";\n\nexport type FabOptions = {\n backgroundColorClosed?: string;\n backgroundColorOpened?: string;\n size?: number;\n}\n\nexport type FabItem = {\n label?: string;\n icon: string;\n backgroundColor?: string;\n id?: string;\n click?: () => any;\n}\n\nexport type FabItems = FabItem[]\n\n@Component({\n selector: \"mis-fab\",\n templateUrl: \"./fab.component.html\",\n styleUrls: [\"./fab.component.scss\"],\n animations: [\n trigger(\"slideUpFab\", [\n transition(\":enter\", [\n style({ transform: \"translateY(50px)\", opacity: 0 }),\n animate(\"300ms ease-out\", style({ transform: \"translateY(0px)\", opacity: 1 })),\n ]),\n transition(\":leave\", [\n animate(\"200ms ease-out\", style({ transform: \"translateY(70px)\", opacity: 0 })),\n ]),\n ]),\n trigger(\"rotateButton\", [\n state('default', style({ transform: 'rotate(0)' })),\n state('rotated', style({ transform: 'rotate(45deg)' })),\n transition('rotated => default', animate('300ms ease-out')),\n transition('default => rotated', animate('200ms ease-in'))\n ]),\n ],\n})\nexport class FabComponent implements OnInit, OnDestroy {\n\n @Input() show: boolean = false;\n @Input() options: FabOptions = {};\n @Input() items: FabItems = []\n\n isOpen: boolean = false;\n\n\n constructor(private eRef: ElementRef) { }\n\n @HostListener('document:click', ['$event'])\n clickout(event) {\n if (!this.eRef.nativeElement.contains(event.target)) {\n this.closeFab()\n }\n }\n\n ngOnInit(): void {\n this.options = {\n size: 56,\n backgroundColorClosed: '#0937B2',\n backgroundColorOpened: '#3a5fc1',\n ...this.options\n }\n }\n\n ngOnDestroy(): void {\n }\n\n clickItem(item: FabItem) {\n this.closeFab();\n item.click();\n }\n\n closeFab() {\n this.isOpen = false;\n }\n\n toogleFab() {\n this.isOpen = !this.isOpen;\n }\n\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FabComponent } from './fab.component';\n\n@NgModule({\n declarations: [FabComponent],\n imports: [CommonModule],\n exports: [FabComponent],\n})\nexport class FabModule {\n static forRoot(): ModuleWithProviders<FabModule> {\n return { ngModule: FabModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","trigger","transition","style","animate","state","ElementRef","Input","HostListener","NgModule","CommonModule"],"mappings":";;;;;;IAAA;;QAoDE,sBAAoB,IAAgB;YAAhB,SAAI,GAAJ,IAAI,CAAY;YAP3B,SAAI,GAAY,KAAK,CAAC;YACtB,YAAO,GAAe,EAAE,CAAC;YACzB,UAAK,GAAa,EAAE,CAAA;YAE7B,WAAM,GAAY,KAAK,CAAC;SAGiB;QAGzC,+BAAQ,GAAR,UAAS,KAAK;YACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBACnD,IAAI,CAAC,QAAQ,EAAE,CAAA;aAChB;SACF;QAED,+BAAQ,GAAR;YACE,IAAI,CAAC,OAAO,mBACV,IAAI,EAAE,EAAE,EACR,qBAAqB,EAAE,SAAS,EAChC,qBAAqB,EAAE,SAAS,IAC7B,IAAI,CAAC,OAAO,CAChB,CAAA;SACF;QAED,kCAAW,GAAX;SACC;QAED,gCAAS,GAAT,UAAU,IAAa;YACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;QAED,+BAAQ,GAAR;YACE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;QAED,gCAAS,GAAT;YACE,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;SAC5B;;;;gBA/DFA,cAAS,SA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,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB;;;ICRD;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-fab.umd.js","sources":["../../../projects/mis-components/fab/fab.component.ts","../../../projects/mis-components/fab/fab.module.ts","../../../projects/mis-components/fab/mis-crystal-design-system-fab.ts"],"sourcesContent":["/** @format */\n\nimport { Component, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { trigger, transition, style, animate, state } from \"@angular/animations\";\n\nexport type FabOptions = {\n backgroundColorClosed?: string;\n backgroundColorOpened?: string;\n size?: number;\n};\n\nexport type FabItem = {\n label?: string;\n icon: string;\n backgroundColor?: string;\n id?: string;\n click?: () => any;\n};\n\nexport type FabItems = FabItem[];\n\n@Component({\n selector: \"mis-fab\",\n templateUrl: \"./fab.component.html\",\n styleUrls: [\"./fab.component.scss\"],\n animations: [\n trigger(\"slideUpFab\", [\n transition(\":enter\", [\n style({ transform: \"translateY(50px)\", opacity: 0 }),\n animate(\"300ms ease-out\", style({ transform: \"translateY(0px)\", opacity: 1 }))\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translateY(70px)\", opacity: 0 }))])\n ]),\n trigger(\"rotateButton\", [\n state(\"default\", style({ transform: \"rotate(0)\" })),\n state(\"rotated\", style({ transform: \"rotate(45deg)\" })),\n transition(\"rotated => default\", animate(\"300ms ease-out\")),\n transition(\"default => rotated\", animate(\"200ms ease-in\"))\n ])\n ]\n})\nexport class FabComponent implements OnInit, OnDestroy {\n @Input() show: boolean = false;\n @Input() options: FabOptions = {};\n @Input() items: FabItems = [];\n\n isOpen: boolean = false;\n\n constructor(private eRef: ElementRef) {}\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n if (!this.eRef.nativeElement.contains(event.target)) {\n this.closeFab();\n }\n }\n\n ngOnInit(): void {\n this.options = {\n size: 56,\n backgroundColorClosed: \"#0937B2\",\n backgroundColorOpened: \"#3a5fc1\",\n ...this.options\n };\n }\n\n ngOnDestroy(): void {}\n\n clickItem(item: FabItem) {\n this.closeFab();\n item.click();\n }\n\n closeFab() {\n this.isOpen = false;\n }\n\n toogleFab() {\n this.isOpen = !this.isOpen;\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FabComponent } from \"./fab.component\";\n\n@NgModule({\n declarations: [FabComponent],\n imports: [CommonModule],\n exports: [FabComponent]\n})\nexport class FabModule {\n static forRoot(): ModuleWithProviders<FabModule> {\n return { ngModule: FabModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","trigger","transition","style","animate","state","ElementRef","Input","HostListener","NgModule","CommonModule"],"mappings":";;;;;;IAAA;;QAgDE,sBAAoB,IAAgB;YAAhB,SAAI,GAAJ,IAAI,CAAY;YAN3B,SAAI,GAAY,KAAK,CAAC;YACtB,YAAO,GAAe,EAAE,CAAC;YACzB,UAAK,GAAa,EAAE,CAAC;YAE9B,WAAM,GAAY,KAAK,CAAC;SAEgB;QAGxC,+BAAQ,GAAR,UAAS,KAAK;YACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBACnD,IAAI,CAAC,QAAQ,EAAE,CAAC;aACjB;SACF;QAED,+BAAQ,GAAR;YACE,IAAI,CAAC,OAAO,mBACV,IAAI,EAAE,EAAE,EACR,qBAAqB,EAAE,SAAS,EAChC,qBAAqB,EAAE,SAAS,IAC7B,IAAI,CAAC,OAAO,CAChB,CAAC;SACH;QAED,kCAAW,GAAX,eAAsB;QAEtB,gCAAS,GAAT,UAAU,IAAa;YACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;QAED,+BAAQ,GAAR;YACE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;QAED,gCAAS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;;;gBARFC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAACC,mBAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB;;;ICRD;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/mis-components/fab/fab.component.ts","../../../projects/mis-components/fab/fab.module.ts"],"names":["FabComponent","eRef","this","show","options","items","isOpen","prototype","clickout","event","nativeElement","contains","target","closeFab","ngOnInit","Object","assign","size","backgroundColorClosed","backgroundColorOpened","ngOnDestroy","clickItem","item","click","toogleFab","Component","args","selector","template","animations","trigger","transition","style","transform","opacity","animate","state","ElementRef","Input","HostListener","FabModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","exports"],"mappings":"ojBAoDE,SAAAA,EAAoBC,GAAAC,KAAAD,KAAAA,EAPXC,KAAAC,MAAgB,EAChBD,KAAAE,QAAsB,GACtBF,KAAAG,MAAkB,GAE3BH,KAAAI,QAAkB,SAMlBN,EAAAO,UAAAC,SAAA,SAASC,GACFP,KAAKD,KAAKS,cAAcC,SAASF,EAAMG,SAC1CV,KAAKW,YAITb,EAAAO,UAAAO,SAAA,WACEZ,KAAKE,QAAOW,OAAAC,OAAA,CACVC,KAAM,GACNC,sBAAuB,UACvBC,sBAAuB,WACpBjB,KAAKE,UAIZJ,EAAAO,UAAAa,YAAA,aAGApB,EAAAO,UAAAc,UAAA,SAAUC,GACRpB,KAAKW,WACLS,EAAKC,SAGPvB,EAAAO,UAAAM,SAAA,WACEX,KAAKI,QAAS,GAGhBN,EAAAO,UAAAiB,UAAA,WACEtB,KAAKI,QAAUJ,KAAKI,iCA9DvBmB,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,UACVC,SAAA,g9CAEAC,WAAY,CACVC,EAAAA,QAAQ,aAAc,CACpBC,EAAAA,WAAW,SAAU,CACnBC,EAAAA,MAAM,CAAEC,UAAW,mBAAoBC,QAAS,IAChDC,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,kBAAmBC,QAAS,OAE3EH,EAAAA,WAAW,SAAU,CACnBI,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,mBAAoBC,QAAS,SAG9EJ,EAAAA,QAAQ,eAAgB,CACtBM,EAAAA,MAAM,UAAWJ,EAAAA,MAAM,CAAEC,UAAW,eACpCG,EAAAA,MAAM,UAAWJ,EAAAA,MAAM,CAAEC,UAAW,mBACpCF,EAAAA,WAAW,qBAAsBI,EAAAA,QAAQ,mBACzCJ,EAAAA,WAAW,qBAAsBI,EAAAA,QAAQ,4uBArC3BE,EAAAA,4CA2CjBC,EAAAA,uBACAA,EAAAA,qBACAA,EAAAA,wBAOAC,EAAAA,aAAYb,KAAA,CAAC,iBAAkB,CAAC,+BC7CnC,SAAAc,YACSA,EAAAC,QAAP,WACE,MAAO,CAAEC,SAAUF,EAAWG,UAAW,8BAP5CC,EAAAA,SAAQlB,KAAA,CAAC,CACRmB,aAAc,CAAC7C,GACf8C,QAAS,CAACC,EAAAA,cACVC,QAAS,CAAChD","sourcesContent":["/** @format */\n\nimport { Component, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { trigger, transition, style, animate, state } from \"@angular/animations\";\n\nexport type FabOptions = {\n backgroundColorClosed?: string;\n backgroundColorOpened?: string;\n size?: number;\n}\n\nexport type FabItem = {\n label?: string;\n icon: string;\n backgroundColor?: string;\n id?: string;\n click?: () => any;\n}\n\nexport type FabItems = FabItem[]\n\n@Component({\n selector: \"mis-fab\",\n templateUrl: \"./fab.component.html\",\n styleUrls: [\"./fab.component.scss\"],\n animations: [\n trigger(\"slideUpFab\", [\n transition(\":enter\", [\n style({ transform: \"translateY(50px)\", opacity: 0 }),\n animate(\"300ms ease-out\", style({ transform: \"translateY(0px)\", opacity: 1 })),\n ]),\n transition(\":leave\", [\n animate(\"200ms ease-out\", style({ transform: \"translateY(70px)\", opacity: 0 })),\n ]),\n ]),\n trigger(\"rotateButton\", [\n state('default', style({ transform: 'rotate(0)' })),\n state('rotated', style({ transform: 'rotate(45deg)' })),\n transition('rotated => default', animate('300ms ease-out')),\n transition('default => rotated', animate('200ms ease-in'))\n ]),\n ],\n})\nexport class FabComponent implements OnInit, OnDestroy {\n\n @Input() show: boolean = false;\n @Input() options: FabOptions = {};\n @Input() items: FabItems = []\n\n isOpen: boolean = false;\n\n\n constructor(private eRef: ElementRef) { }\n\n @HostListener('document:click', ['$event'])\n clickout(event) {\n if (!this.eRef.nativeElement.contains(event.target)) {\n this.closeFab()\n }\n }\n\n ngOnInit(): void {\n this.options = {\n size: 56,\n backgroundColorClosed: '#0937B2',\n backgroundColorOpened: '#3a5fc1',\n ...this.options\n }\n }\n\n ngOnDestroy(): void {\n }\n\n clickItem(item: FabItem) {\n this.closeFab();\n item.click();\n }\n\n closeFab() {\n this.isOpen = false;\n }\n\n toogleFab() {\n this.isOpen = !this.isOpen;\n }\n\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FabComponent } from './fab.component';\n\n@NgModule({\n declarations: [FabComponent],\n imports: [CommonModule],\n exports: [FabComponent],\n})\nexport class FabModule {\n static forRoot(): ModuleWithProviders<FabModule> {\n return { ngModule: FabModule, providers: [] };\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../projects/mis-components/fab/fab.component.ts","../../../projects/mis-components/fab/fab.module.ts"],"names":["FabComponent","eRef","this","show","options","items","isOpen","prototype","clickout","event","nativeElement","contains","target","closeFab","ngOnInit","Object","assign","size","backgroundColorClosed","backgroundColorOpened","ngOnDestroy","clickItem","item","click","toogleFab","Component","args","selector","template","animations","trigger","transition","style","transform","opacity","animate","state","ElementRef","Input","HostListener","FabModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","exports"],"mappings":"ojBAgDE,SAAAA,EAAoBC,GAAAC,KAAAD,KAAAA,EANXC,KAAAC,MAAgB,EAChBD,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EAAWG,UAAW,8BAP5CC,EAAAA,SAAQlB,KAAA,CAAC,CACRmB,aAAc,CAAC7C,GACf8C,QAAS,CAACC,EAAAA,cACVC,QAAS,CAAChD","sourcesContent":["/** @format */\n\nimport { Component, ElementRef, HostListener, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { trigger, transition, style, animate, state } from \"@angular/animations\";\n\nexport type FabOptions = {\n backgroundColorClosed?: string;\n backgroundColorOpened?: string;\n size?: number;\n};\n\nexport type FabItem = {\n label?: string;\n icon: string;\n backgroundColor?: string;\n id?: string;\n click?: () => any;\n};\n\nexport type FabItems = FabItem[];\n\n@Component({\n selector: \"mis-fab\",\n templateUrl: \"./fab.component.html\",\n styleUrls: [\"./fab.component.scss\"],\n animations: [\n trigger(\"slideUpFab\", [\n transition(\":enter\", [\n style({ transform: \"translateY(50px)\", opacity: 0 }),\n animate(\"300ms ease-out\", style({ transform: \"translateY(0px)\", opacity: 1 }))\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translateY(70px)\", opacity: 0 }))])\n ]),\n trigger(\"rotateButton\", [\n state(\"default\", style({ transform: \"rotate(0)\" })),\n state(\"rotated\", style({ transform: \"rotate(45deg)\" })),\n transition(\"rotated => default\", animate(\"300ms ease-out\")),\n transition(\"default => rotated\", animate(\"200ms ease-in\"))\n ])\n ]\n})\nexport class FabComponent implements OnInit, OnDestroy {\n @Input() show: boolean = false;\n @Input() options: FabOptions = {};\n @Input() items: FabItems = [];\n\n isOpen: boolean = false;\n\n constructor(private eRef: ElementRef) {}\n\n @HostListener(\"document:click\", [\"$event\"])\n clickout(event) {\n if (!this.eRef.nativeElement.contains(event.target)) {\n this.closeFab();\n }\n }\n\n ngOnInit(): void {\n this.options = {\n size: 56,\n backgroundColorClosed: \"#0937B2\",\n backgroundColorOpened: \"#3a5fc1\",\n ...this.options\n };\n }\n\n ngOnDestroy(): void {}\n\n clickItem(item: FabItem) {\n this.closeFab();\n item.click();\n }\n\n closeFab() {\n this.isOpen = false;\n }\n\n toogleFab() {\n this.isOpen = !this.isOpen;\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FabComponent } from \"./fab.component\";\n\n@NgModule({\n declarations: [FabComponent],\n imports: [CommonModule],\n exports: [FabComponent]\n})\nexport class FabModule {\n static forRoot(): ModuleWithProviders<FabModule> {\n return { ngModule: FabModule, providers: [] };\n }\n}\n"]}
@@ -23,7 +23,7 @@
23
23
  _this.validityChange.next(!((_b = _this.control.control) === null || _b === void 0 ? void 0 : _b.invalid));
24
24
  }
25
25
  });
26
- this.el.nativeElement.placeholder += ' ';
26
+ this.el.nativeElement.placeholder += " ";
27
27
  };
28
28
  MisInputDirective.prototype.ngOnDestroy = function () {
29
29
  this.endObs.next();
@@ -34,7 +34,7 @@
34
34
  MisInputDirective.decorators = [
35
35
  { type: core.Directive, args: [{
36
36
  // tslint:disable-next-line
37
- selector: 'input[misInput]',
37
+ selector: "input[misInput]"
38
38
  },] }
39
39
  ];
40
40
  MisInputDirective.ctorParameters = function () { return [
@@ -44,7 +44,7 @@
44
44
 
45
45
  var MisInputComponent = /** @class */ (function () {
46
46
  function MisInputComponent() {
47
- this.type = 'floating';
47
+ this.type = "floating";
48
48
  this.noHints = false;
49
49
  this.hasError = false; // show input in error state
50
50
  this.inputValidity = true;
@@ -58,7 +58,7 @@
58
58
  }
59
59
  (_a = this.inputSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
60
60
  this.inputSubscription = input === null || input === void 0 ? void 0 : input.validity.subscribe(function (res) { return (_this.inputValidity = res); });
61
- this.placeholder += ' ';
61
+ this.placeholder += " ";
62
62
  },
63
63
  enumerable: false,
64
64
  configurable: true
@@ -72,8 +72,8 @@
72
72
  }());
73
73
  MisInputComponent.decorators = [
74
74
  { type: core.Component, args: [{
75
- selector: 'mis-input',
76
- template: "<div class=\"input-container\" [ngClass]=\"{'rounded': type === 'rounded', 'floating': type === 'floating', 'has-error': !inputValidity || hasError, 'no-hint': noHints}\">\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{placeholder}}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>",
75
+ selector: "mis-input",
76
+ template: "<div\n class=\"input-container\"\n [ngClass]=\"{ rounded: type === 'rounded', floating: type === 'floating', 'has-error': !inputValidity || hasError, 'no-hint': noHints }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n",
77
77
  styles: [".input-container{position:relative;padding-bottom:24px}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px}.input-container .input-wrapper>:not(:last-child){margin-right:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0}.input-container.rounded .input-wrapper:focus-within,.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
78
78
  },] }
79
79
  ];
@@ -95,7 +95,7 @@
95
95
  { type: core.NgModule, args: [{
96
96
  declarations: [MisInputComponent, MisInputDirective],
97
97
  imports: [common.CommonModule, forms.FormsModule],
98
- exports: [MisInputComponent, MisInputDirective],
98
+ exports: [MisInputComponent, MisInputDirective]
99
99
  },] }
100
100
  ];
101
101
 
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-input.umd.js","sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts","../../../projects/mis-components/input/mis-crystal-design-system-input.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Directive({\n // tslint:disable-next-line\n selector: 'input[misInput]',\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(\n public el: ElementRef,\n @Self() @Optional() private control: NgControl\n ) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.statusChanges\n .pipe(takeUntil(this.endObs))\n .subscribe(() => {\n if(!this.control.control?.disabled){\n this.validityChange.next(!this.control.control?.invalid);\n }\n });\n this.el.nativeElement.placeholder += ' ';\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import {\n Component,\n ContentChild,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { MisInputDirective } from './directives/input/input.directive';\n\n@Component({\n selector: 'mis-input',\n templateUrl: './mis-input.component.html',\n styleUrls: ['./mis-input.component.scss'],\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: 'rounded' | 'floating' = 'floating';\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input.el.nativeElement.placeholder;\n }\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(\n (res) => (this.inputValidity = res)\n );\n this.placeholder += ' ';\n }\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MisInputDirective } from './directives/input/input.directive';\nimport { MisInputComponent } from './mis-input.component';\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective],\n})\nexport class MisInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ReplaySubject","Subject","takeUntil","Directive","ElementRef","NgControl","Self","Optional","Component","Input","ContentChild","NgModule","CommonModule","FormsModule"],"mappings":";;;;;;;QAiBE,2BACS,EAAc,EACO,OAAkB;YADvC,OAAE,GAAF,EAAE,CAAY;YACO,YAAO,GAAP,OAAO,CAAW;YAExC,mBAAc,GAA2B,IAAIA,kBAAa,CAAC,CAAC,CAA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0CAAE,WAAW,GAAG;gBACtC,IAAI,CAAC,iBAAiB,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,CAAC,SAAS,CAChD,UAAC,GAAG,IAAK,QAAC,KAAI,CAAC,aAAa,GAAG,GAAG,IAAC,CACpC,CAAC;gBACF,IAAI,CAAC,WAAW,IAAI,GAAG,CAAC;aACzB;;;WAAA;QAKD,oCAAQ,GAAR,eAAmB;QACnB,uCAAW,GAAX;;YACE,MAAA,IAAI,CAAC,iBAAiB,0CAAE,WAAW,GAAG;SACvC;;;;gBA3BFC,cAAS,SAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,6mBAAyC;;iBAE1C;;;;uBAEEC,UAAK;8BACLA,UAAK;0BACLA,UAAK;2BACLA,UAAK;4BACLC,iBAAY,SAAC,iBAAiB;;;;QCVjC;;;;;gBALCC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;oBACpD,OAAO,EAAE,CAACC,mBAAY,EAAEC,iBAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;iBAChD;;;ICVD;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-input.umd.js","sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts","../../../projects/mis-components/input/mis-crystal-design-system-input.ts"],"sourcesContent":["import { Directive, ElementRef, OnDestroy, OnInit, Optional, Self } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { ReplaySubject, Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\n@Directive({\n // tslint:disable-next-line\n selector: \"input[misInput]\"\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(public el: ElementRef, @Self() @Optional() private control: NgControl) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.statusChanges.pipe(takeUntil(this.endObs)).subscribe(() => {\n if (!this.control.control?.disabled) {\n this.validityChange.next(!this.control.control?.invalid);\n }\n });\n this.el.nativeElement.placeholder += \" \";\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import { Component, ContentChild, Input, OnDestroy, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\n\n@Component({\n selector: \"mis-input\",\n templateUrl: \"./mis-input.component.html\",\n styleUrls: [\"./mis-input.component.scss\"]\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: \"rounded\" | \"floating\" = \"floating\";\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input.el.nativeElement.placeholder;\n }\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(res => (this.inputValidity = res));\n this.placeholder += \" \";\n }\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\nimport { MisInputComponent } from \"./mis-input.component\";\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective]\n})\nexport class MisInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ReplaySubject","Subject","takeUntil","Directive","ElementRef","NgControl","Self","Optional","Component","Input","ContentChild","NgModule","CommonMod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BAAvE,iBAOC;;gBANC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;oBACrB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC;iBACvD;gBACD,MAAA,IAAI,CAAC,iBAAiB,0CAAE,WAAW,GAAG;gBACtC,IAAI,CAAC,iBAAiB,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,CAAC,SAAS,CAAC,UAAA,GAAG,IAAI,QAAC,KAAI,CAAC,aAAa,GAAG,GAAG,IAAC,CAAC,CAAC;gBACtF,IAAI,CAAC,WAAW,IAAI,GAAG,CAAC;aACzB;;;WAAA;QAKD,oCAAQ,GAAR,eAAmB;QACnB,uCAAW,GAAX;;YACE,MAAA,IAAI,CAAC,iBAAiB,0CAAE,WAAW,GAAG;SACvC;;;;gBAzBFC,cAAS,SAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,unBAAyC;;iBAE1C;;;;uBAEEC,UAAK;8BACLA,UAAK;0BACLA,UAAK;2BACLA,UAAK;4BACLC,iBAAY,SAAC,iBAAiB;;;;QCHjC;;;;;gBALCC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;oBACpD,OAAO,EAAE,CAACC,mBAAY,EAAEC,iBAAW,CAAC;oBACpC,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;iBAChD;;;ICVD;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/input",["exports","@angular/core","@angular/forms","rxjs","rxjs/operators","@angular/common"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self)["mis-crystal-design-system"]=n["mis-crystal-design-system"]||{},n["mis-crystal-design-system"].input={}),n.ng.core,n.ng.forms,n.rxjs,n.rxjs.operators,n.ng.common)}(this,(function(n,t,i,e,o,r){"use strict";var p=function(){function n(n,t){this.el=n,this.control=t,this.validityChange=new e.ReplaySubject(1),this.validity=this.validityChange.asObservable(),this.endObs=new e.Subject,this.focus=!1,this.hasValue=!1}return n.prototype.ngOnInit=function(){var n,t,i=this;null===(t=null===(n=this.control)||void 0===n?void 0:n.control)||void 0===t||t.statusChanges.pipe(o.takeUntil(this.endObs)).subscribe((function(){var n,t;(null===(n=i.control.control)||void 0===n?void 0:n.disabled)||i.validityChange.next(!(null===(t=i.control.control)||void 0===t?void 0:t.invalid))})),this.el.nativeElement.placeholder+=" "},n.prototype.ngOnDestroy=function(){this.endObs.next(),this.endObs.complete()},n}();p.decorators=[{type:t.Directive,args:[{selector:"input[misInput]"}]}],p.ctorParameters=function(){return[{type:t.ElementRef},{type:i.NgControl,decorators:[{type:t.Self},{type:t.Optional}]}]};var a=function(){function n(){this.type="floating",this.noHints=!1,this.hasError=!1,this.inputValidity=!0}return Object.defineProperty(n.prototype,"formInput",{set:function(n){var t,i=this;this.placeholder||(this.placeholder=n.el.nativeElement.placeholder),null===(t=this.inputSubscription)||void 0===t||t.unsubscribe(),this.inputSubscription=null==n?void 0:n.validity.subscribe((function(n){return i.inputValidity=n})),this.placeholder+=" "},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){var n;null===(n=this.inputSubscription)||void 0===n||n.unsubscribe()},n}();a.decorators=[{type:t.Component,args:[{selector:"mis-input",template:'<div class="input-container" [ngClass]="{\'rounded\': type === \'rounded\', \'floating\': type === \'floating\', \'has-error\': !inputValidity || hasError, \'no-hint\': noHints}">\n <div class="input-wrapper">\n <ng-content select="[mis-input-icon]"></ng-content>\n <div class="mis-input">\n <ng-content select="input"></ng-content>\n <span class="mis-placeholder">{{placeholder}}</span>\n </div>\n <ng-content select="[mis-input-act]"></ng-content>\n </div>\n <ng-content select="[mis-input-hint]"></ng-content>\n <ng-content select="[mis-input-error]"></ng-content>\n</div>',styles:[".input-container{position:relative;padding-bottom:24px}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px}.input-container .input-wrapper>:not(:last-child){margin-right:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0}.input-container.rounded .input-wrapper:focus-within,.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],a.ctorParameters=function(){return[]},a.propDecorators={type:[{type:t.Input}],placeholder:[{type:t.Input}],noHints:[{type:t.Input}],hasError:[{type:t.Input}],formInput:[{type:t.ContentChild,args:[p]}]};var s=function(){};s.decorators=[{type:t.NgModule,args:[{declarations:[a,p],imports:[r.CommonModule,i.FormsModule],exports:[a,p]}]}],n.MisInputComponent=a,n.MisInputDirective=p,n.MisInputModule=s,Object.defineProperty(n,"__esModule",{value:!0})}));
1
+ !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/input",["exports","@angular/core","@angular/forms","rxjs","rxjs/operators","@angular/common"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self)["mis-crystal-design-system"]=n["mis-crystal-design-system"]||{},n["mis-crystal-design-system"].input={}),n.ng.core,n.ng.forms,n.rxjs,n.rxjs.operators,n.ng.common)}(this,(function(n,t,i,e,o,r){"use strict";var p=function(){function n(n,t){this.el=n,this.control=t,this.validityChange=new e.ReplaySubject(1),this.validity=this.validityChange.asObservable(),this.endObs=new e.Subject,this.focus=!1,this.hasValue=!1}return n.prototype.ngOnInit=function(){var n,t,i=this;null===(t=null===(n=this.control)||void 0===n?void 0:n.control)||void 0===t||t.statusChanges.pipe(o.takeUntil(this.endObs)).subscribe((function(){var n,t;(null===(n=i.control.control)||void 0===n?void 0:n.disabled)||i.validityChange.next(!(null===(t=i.control.control)||void 0===t?void 0:t.invalid))})),this.el.nativeElement.placeholder+=" "},n.prototype.ngOnDestroy=function(){this.endObs.next(),this.endObs.complete()},n}();p.decorators=[{type:t.Directive,args:[{selector:"input[misInput]"}]}],p.ctorParameters=function(){return[{type:t.ElementRef},{type:i.NgControl,decorators:[{type:t.Self},{type:t.Optional}]}]};var a=function(){function n(){this.type="floating",this.noHints=!1,this.hasError=!1,this.inputValidity=!0}return Object.defineProperty(n.prototype,"formInput",{set:function(n){var t,i=this;this.placeholder||(this.placeholder=n.el.nativeElement.placeholder),null===(t=this.inputSubscription)||void 0===t||t.unsubscribe(),this.inputSubscription=null==n?void 0:n.validity.subscribe((function(n){return i.inputValidity=n})),this.placeholder+=" "},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){var n;null===(n=this.inputSubscription)||void 0===n||n.unsubscribe()},n}();a.decorators=[{type:t.Component,args:[{selector:"mis-input",template:'<div\n class="input-container"\n [ngClass]="{ rounded: type === \'rounded\', floating: type === \'floating\', \'has-error\': !inputValidity || hasError, \'no-hint\': noHints }"\n>\n <div class="input-wrapper">\n <ng-content select="[mis-input-icon]"></ng-content>\n <div class="mis-input">\n <ng-content select="input"></ng-content>\n <span class="mis-placeholder">{{ placeholder }}</span>\n </div>\n <ng-content select="[mis-input-act]"></ng-content>\n </div>\n <ng-content select="[mis-input-hint]"></ng-content>\n <ng-content select="[mis-input-error]"></ng-content>\n</div>\n',styles:[".input-container{position:relative;padding-bottom:24px}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px}.input-container .input-wrapper>:not(:last-child){margin-right:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0}.input-container.rounded .input-wrapper:focus-within,.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],a.ctorParameters=function(){return[]},a.propDecorators={type:[{type:t.Input}],placeholder:[{type:t.Input}],noHints:[{type:t.Input}],hasError:[{type:t.Input}],formInput:[{type:t.ContentChild,args:[p]}]};var s=function(){};s.decorators=[{type:t.NgModule,args:[{declarations:[a,p],imports:[r.CommonModule,i.FormsModule],exports:[a,p]}]}],n.MisInputComponent=a,n.MisInputDirective=p,n.MisInputModule=s,Object.defineProperty(n,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=mis-crystal-design-system-input.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts"],"names":["MisInputDirective","el","control","this","validityChange","ReplaySubject","validity","asObservable","endObs","Subject","focus","hasValue","prototype","ngOnInit","_this","_b","_a","statusChanges","pipe","takeUntil","subscribe","disabled","next","invalid","nativeElement","placeholder","ngOnDestroy","complete","Directive","args","selector","ElementRef","NgControl","decorators","type","Self","Optional","MisInputComponent","noHints","hasError","inputValidity","Object","defineProperty","input","inputSubscription","unsubscribe","res","Component","template","Input","ContentChild","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"uoBAiBE,SAAAA,EACSC,EACqBC,GADrBC,KAAAF,GAAAA,EACqBE,KAAAD,QAAAA,EAEtBC,KAAAC,eAAyC,IAAIC,EAAAA,cAAc,GACnEF,KAAAG,SAAWH,KAAKC,eAAeG,eAC/BJ,KAAAK,OAAwB,IAAIC,EAAAA,QAC5BN,KAAAO,OAAQ,EACRP,KAAAQ,UAAW,SAEXX,EAAAY,UAAAC,SAAA,WAAA,QAAAC,EAAAX,KACuB,QAArBY,EAAY,QAAZC,EAAAb,KAAKD,eAAO,IAAAc,OAAA,EAAAA,EAAEd,eAAO,IAAAa,GAAAA,EAAEE,cACpBC,KAAKC,EAAAA,UAAUhB,KAAKK,SACpBY,WAAU,oBACe,QAArBJ,EAACF,EAAKZ,QAA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AA,aACxBC,QAAS,CAACnB,EAAmBrC","sourcesContent":["import {\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Directive({\n // tslint:disable-next-line\n selector: 'input[misInput]',\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(\n public el: ElementRef,\n @Self() @Optional() private control: NgControl\n ) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.statusChanges\n .pipe(takeUntil(this.endObs))\n .subscribe(() => {\n if(!this.control.control?.disabled){\n this.validityChange.next(!this.control.control?.invalid);\n }\n });\n this.el.nativeElement.placeholder += ' ';\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import {\n Component,\n ContentChild,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { MisInputDirective } from './directives/input/input.directive';\n\n@Component({\n selector: 'mis-input',\n templateUrl: './mis-input.component.html',\n styleUrls: ['./mis-input.component.scss'],\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: 'rounded' | 'floating' = 'floating';\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input.el.nativeElement.placeholder;\n }\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(\n (res) => (this.inputValidity = res)\n );\n this.placeholder += ' ';\n }\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MisInputDirective } from './directives/input/input.directive';\nimport { MisInputComponent } from './mis-input.component';\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective],\n})\nexport class MisInputModule {}\n"]}
1
+ {"version":3,"sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts"],"names":["MisInputDirective","el","control","this","validityChange","ReplaySubject","validity","asObservable","endObs","Subject","focus","hasValue","prototype","ngOnInit","_this","_b","_a","statusChanges","pipe","takeUntil","subscribe","disabled","next","invalid","nativeElement","placeholder","ngOnDestroy","complete","Directive","args","selector","ElementRef","NgControl","decorators","type","Self","Optional","MisInputComponent","noHints","hasError","inputValidity","Object","defineProperty","input","inputSubscription","unsubscribe","res","Component","template","Input","ContentChild","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"uoBAUE,SAAAA,EAAmBC,EAA4CC,GAA5CC,KAAAF,GAAAA,EAA4CE,KAAAD,QAAAA,EACvDC,KAAAC,eAAyC,IAAIC,EAAAA,cAAc,GACnEF,KAAAG,SAAWH,KAAKC,eAAeG,eAC/BJ,KAAAK,OAAwB,IAAIC,EAAAA,QAC5BN,KAAAO,OAAQ,EACRP,KAAAQ,UAAW,SAEXX,EAAAY,UAAAC,SAAA,WAAA,QAAAC,EAAAX,KACuB,QAArBY,EAAY,QAAZC,EAAAb,KAAKD,eAAO,IAAAc,OAAA,EAAAA,EAAEd,eAAO,IAAAa,GAAAA,EAAEE,cAAcC,KAAKC,EAAAA,UAAUhB,KAAKK,SAASY,WAAU,oBACjD,QAArBJ,EAACF,EAAKZ,QAAQA,eAAO,IAAAc,OAAA,EAAAA,EAAEK,WACzBP,EAAKV,eAAekB,OAA0B,QAArBP,EAACD,EAAKZ,QAA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port { NgControl } from \"@angular/forms\";\nimport { ReplaySubject, Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\n@Directive({\n // tslint:disable-next-line\n selector: \"input[misInput]\"\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(public el: ElementRef, @Self() @Optional() private control: NgControl) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.statusChanges.pipe(takeUntil(this.endObs)).subscribe(() => {\n if (!this.control.control?.disabled) {\n this.validityChange.next(!this.control.control?.invalid);\n }\n });\n this.el.nativeElement.placeholder += \" \";\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import { Component, ContentChild, Input, OnDestroy, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\n\n@Component({\n selector: \"mis-input\",\n templateUrl: \"./mis-input.component.html\",\n styleUrls: [\"./mis-input.component.scss\"]\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: \"rounded\" | \"floating\" = \"floating\";\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input.el.nativeElement.placeholder;\n }\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(res => (this.inputValidity = res));\n this.placeholder += \" \";\n }\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\nimport { MisInputComponent } from \"./mis-input.component\";\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective]\n})\nexport class MisInputModule {}\n"]}
@@ -9,14 +9,13 @@
9
9
  /** Controls loader size */
10
10
  this.mobileView = false;
11
11
  }
12
- LoaderComponent.prototype.ngOnInit = function () {
13
- };
12
+ LoaderComponent.prototype.ngOnInit = function () { };
14
13
  return LoaderComponent;
15
14
  }());
16
15
  LoaderComponent.decorators = [
17
16
  { type: core.Component, args: [{
18
- selector: 'mis-loader',
19
- template: "<div id=\"spinner\" [ngClass]=\"{\n 'mobile': mobileView\n}\"></div>\n",
17
+ selector: "mis-loader",
18
+ template: "<div\n id=\"spinner\"\n [ngClass]=\"{\n mobile: mobileView\n }\"\n></div>\n",
20
19
  styles: ["#spinner{-webkit-animation:frames 1s linear infinite;animation:frames 1s linear infinite;background:transparent;border-radius:100%;border:4px solid #e0e0e0;border-top-color:#6200ee;width:40px;height:40px;padding:0;position:absolute}@-webkit-keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.mobile{height:20px!important;width:20px!important;border:2px solid #e0e0e0!important;border-top-color:#6200ee!important}"]
21
20
  },] }
22
21
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-loader.umd.js","sources":["../../../projects/mis-components/loader/loader.component.ts","../../../projects/mis-components/loader/loader.module.ts","../../../projects/mis-components/loader/mis-crystal-design-system-loader.ts"],"sourcesContent":["import {Component, Input, OnInit} from '@angular/core';\n\n@Component({\n selector: 'mis-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss']\n})\nexport class LoaderComponent implements OnInit{\n\n /** Controls loader size */\n @Input() mobileView: boolean = false\n\n constructor() {\n }\n ngOnInit(){\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LoaderComponent } from './loader.component';\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n exports: [LoaderComponent]\n})\nexport class LoaderModule {\n static forRoot(): ModuleWithProviders<LoaderModule> {\n return { ngModule: LoaderModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","Input","NgModule","CommonModule"],"mappings":";;;;;;;QAYE;;YAFS,eAAU,GAAY,KAAK,CAAA;SAGnC;QACD,kCAAQ,GAAR;SACC;;;;gBAbFA,cAAS,SAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,mFAAsC;;iBAEvC;;;;6BAIEC,UAAK;;;;QCAR;;QACS,oBAAO,GAAd;YACE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;SAClD;;;;gBARFC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;oBAC/B,OAAO,EAAE,CAACC,mBAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B;;;ICTD;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-loader.umd.js","sources":["../../../projects/mis-components/loader/loader.component.ts","../../../projects/mis-components/loader/loader.module.ts","../../../projects/mis-components/loader/mis-crystal-design-system-loader.ts"],"sourcesContent":["import { Component, Input, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"mis-loader\",\n templateUrl: \"./loader.component.html\",\n styleUrls: [\"./loader.component.scss\"]\n})\nexport class LoaderComponent implements OnInit {\n /** Controls loader size */\n @Input() mobileView: boolean = false;\n\n constructor() {}\n ngOnInit() {}\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { LoaderComponent } from \"./loader.component\";\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n exports: [LoaderComponent]\n})\nexport class LoaderModule {\n static forRoot(): ModuleWithProviders<LoaderModule> {\n return { ngModule: LoaderModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","Input","NgModule","CommonModule"],"mappings":";;;;;;;QAWE;;YAFS,eAAU,GAAY,KAAK,CAAC;SAErB;QAChB,kCAAQ,GAAR,eAAa;;;;gBAVdA,cAAS,SAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,6FAAsC;;iBAEvC;;;;6BAGEC,UAAK;;;;QCCR;;QACS,oBAAO,GAAd;YACE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;SAClD;;;;gBARFC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,eAAe,CAAC;oBAC/B,OAAO,EAAE,CAACC,mBAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B;;;ICTD;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/loader",["exports","@angular/core","@angular/common"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].loader={}),e.ng.core,e.ng.common)}(this,(function(e,o,r){"use strict";var t=function(){function e(){this.mobileView=!1}return e.prototype.ngOnInit=function(){},e}();t.decorators=[{type:o.Component,args:[{selector:"mis-loader",template:'<div id="spinner" [ngClass]="{\n \'mobile\': mobileView\n}"></div>\n',styles:["#spinner{-webkit-animation:frames 1s linear infinite;animation:frames 1s linear infinite;background:transparent;border-radius:100%;border:4px solid #e0e0e0;border-top-color:#6200ee;width:40px;height:40px;padding:0;position:absolute}@-webkit-keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.mobile{height:20px!important;width:20px!important;border:2px solid #e0e0e0!important;border-top-color:#6200ee!important}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={mobileView:[{type:o.Input}]};var n=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();n.decorators=[{type:o.NgModule,args:[{declarations:[t],imports:[r.CommonModule],exports:[t]}]}],e.LoaderComponent=t,e.LoaderModule=n,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/loader",["exports","@angular/core","@angular/common"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"].loader={}),e.ng.core,e.ng.common)}(this,(function(e,o,r){"use strict";var t=function(){function e(){this.mobileView=!1}return e.prototype.ngOnInit=function(){},e}();t.decorators=[{type:o.Component,args:[{selector:"mis-loader",template:'<div\n id="spinner"\n [ngClass]="{\n mobile: mobileView\n }"\n></div>\n',styles:["#spinner{-webkit-animation:frames 1s linear infinite;animation:frames 1s linear infinite;background:transparent;border-radius:100%;border:4px solid #e0e0e0;border-top-color:#6200ee;width:40px;height:40px;padding:0;position:absolute}@-webkit-keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes frames{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.mobile{height:20px!important;width:20px!important;border:2px solid #e0e0e0!important;border-top-color:#6200ee!important}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={mobileView:[{type:o.Input}]};var n=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();n.decorators=[{type:o.NgModule,args:[{declarations:[t],imports:[r.CommonModule],exports:[t]}]}],e.LoaderComponent=t,e.LoaderModule=n,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=mis-crystal-design-system-loader.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/mis-components/loader/loader.component.ts","../../../projects/mis-components/loader/loader.module.ts"],"names":["LoaderComponent","this","mobileView","prototype","ngOnInit","Component","args","selector","template","Input","LoaderModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","exports"],"mappings":"mfAYE,SAAAA,IAFSC,KAAAC,YAAsB,SAI/BF,EAAAG,UAAAC,SAAA,sCAZDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,aACVC,SAAA,6pBAMCC,EAAAA,0BCAH,SAAAC,YACSA,EAAAC,QAAP,WACE,MAAO,CAAEC,SAAUF,EAAcG,UAAW,8BAP/CC,EAAAA,SAAQR,KAAA,CAAC,CACRS,aAAc,CAACf,GACfgB,QAAS,CAACC,EAAAA,cACVC,QAAS,CAAClB","sourcesContent":["import {Component, Input, OnInit} from '@angular/core';\n\n@Component({\n selector: 'mis-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss']\n})\nexport class LoaderComponent implements OnInit{\n\n /** Controls loader size */\n @Input() mobileView: boolean = false\n\n constructor() {\n }\n ngOnInit(){\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LoaderComponent } from './loader.component';\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n exports: [LoaderComponent]\n})\nexport class LoaderModule {\n static forRoot(): ModuleWithProviders<LoaderModule> {\n return { ngModule: LoaderModule, providers: [] };\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../projects/mis-components/loader/loader.component.ts","../../../projects/mis-components/loader/loader.module.ts"],"names":["LoaderComponent","this","mobileView","prototype","ngOnInit","Component","args","selector","template","Input","LoaderModule","forRoot","ngModule","providers","NgModule","declarations","imports","CommonModule","exports"],"mappings":"mfAWE,SAAAA,IAFSC,KAAAC,YAAsB,SAG/BF,EAAAG,UAAAC,SAAA,sCAVDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,aACVC,SAAA,qqBAKCC,EAAAA,0BCCH,SAAAC,YACSA,EAAAC,QAAP,WACE,MAAO,CAAEC,SAAUF,EAAcG,UAAW,8BAP/CC,EAAAA,SAAQR,KAAA,CAAC,CACRS,aAAc,CAACf,GACfgB,QAAS,CAACC,EAAAA,cACVC,QAAS,CAAClB","sourcesContent":["import { Component, Input, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"mis-loader\",\n templateUrl: \"./loader.component.html\",\n styleUrls: [\"./loader.component.scss\"]\n})\nexport class LoaderComponent implements OnInit {\n /** Controls loader size */\n @Input() mobileView: boolean = false;\n\n constructor() {}\n ngOnInit() {}\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { LoaderComponent } from \"./loader.component\";\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n exports: [LoaderComponent]\n})\nexport class LoaderModule {\n static forRoot(): ModuleWithProviders<LoaderModule> {\n return { ngModule: LoaderModule, providers: [] };\n }\n}\n"]}
@@ -42,10 +42,10 @@
42
42
  animations.trigger("slideInOut", [
43
43
  animations.transition(":enter", [
44
44
  animations.style({ transform: "translateY(-30%)", opacity: 0 }),
45
- animations.animate("200ms ease-out", animations.style({ transform: "translatey(0%)", opacity: 1 })),
45
+ animations.animate("200ms ease-out", animations.style({ transform: "translatey(0%)", opacity: 1 }))
46
46
  ]),
47
- animations.transition(":leave", [animations.animate("200ms ease-out", animations.style({ transform: "translatey(-30%)", opacity: 0 }))]),
48
- ]),
47
+ animations.transition(":leave", [animations.animate("200ms ease-out", animations.style({ transform: "translatey(-30%)", opacity: 0 }))])
48
+ ])
49
49
  ],
50
50
  styles: [".mis-modal-body{display:block;width:100%;height:100%;background-color:transparent;border-radius:12px;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);overflow:hidden}"]
51
51
  },] }
@@ -70,7 +70,7 @@
70
70
  width: width,
71
71
  height: height,
72
72
  panelClass: "mis-modal",
73
- backdropClass: "mis-modal-overlay",
73
+ backdropClass: "mis-modal-overlay"
74
74
  });
75
75
  var overlayRef = this.overlay.create(config);
76
76
  var modalRef = new ModalRef(overlayRef);
@@ -112,7 +112,7 @@
112
112
  ModalService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ModalService_Factory() { return new ModalService(i0.ɵɵinject(i1.Overlay), i0.ɵɵinject(i0.INJECTOR)); }, token: ModalService, providedIn: "root" });
113
113
  ModalService.decorators = [
114
114
  { type: i0.Injectable, args: [{
115
- providedIn: "root",
115
+ providedIn: "root"
116
116
  },] }
117
117
  ];
118
118
  ModalService.ctorParameters = function () { return [
@@ -126,13 +126,13 @@
126
126
  ModalModule.forRoot = function () {
127
127
  return {
128
128
  ngModule: ModalModule,
129
- providers: [ModalService],
129
+ providers: [ModalService]
130
130
  };
131
131
  };
132
132
  ModalModule.forChild = function () {
133
133
  return {
134
134
  ngModule: ModalModule,
135
- providers: [ModalService],
135
+ providers: [ModalService]
136
136
  };
137
137
  };
138
138
  return ModalModule;
@@ -140,11 +140,7 @@
140
140
  ModalModule.decorators = [
141
141
  { type: i0.NgModule, args: [{
142
142
  declarations: [ModuleWrapperComponent],
143
- imports: [
144
- common.CommonModule,
145
- i1.OverlayModule,
146
- portal.PortalModule
147
- ],
143
+ imports: [common.CommonModule, i1.OverlayModule, portal.PortalModule],
148
144
  entryComponents: [ModuleWrapperComponent]
149
145
  },] }
150
146
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-modal.umd.js","sources":["../../../projects/mis-components/modal/modal-constants.ts","../../../projects/mis-components/modal/modal-ref.ts","../../../projects/mis-components/modal/module-wrapper/module-wrapper.component.ts","../../../projects/mis-components/modal/modal.service.ts","../../../projects/mis-components/modal/modal.module.ts","../../../projects/mis-components/modal/mis-crystal-design-system-modal.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const MODAL_DATA_VAR = new InjectionToken<any>(\"MISModalDataInjectionToken\");\n","/** @format */\n\nimport { OverlayRef } from \"@angular/cdk/overlay\";\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nexport class ModalRef {\n private afterClosed$ = new Subject<unknown>();\n afterClosed = this.afterClosed$.asObservable();\n\n constructor(public overlay: OverlayRef) {}\n\n close(data?: unknown): void {\n this.overlay.detach();\n this.overlay.dispose();\n this.afterClosed$.next(data);\n this.afterClosed$.complete();\n }\n}\n","import { trigger, transition, style, animate } from \"@angular/animations\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { Component, Injector, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ModalRef } from \"../modal-ref\";\n\n@Component({\n selector: \"mis-module-wrapper\",\n templateUrl: \"./module-wrapper.component.html\",\n styleUrls: [\"./module-wrapper.component.scss\"],\n animations: [\n trigger(\"slideInOut\", [\n transition(\":enter\", [\n style({ transform: \"translateY(-30%)\", opacity: 0 }),\n animate(\"200ms ease-out\", style({ transform: \"translatey(0%)\", opacity: 1 })),\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translatey(-30%)\", opacity: 0 }))]),\n ]),\n ],\n})\nexport class ModuleWrapperComponent {\n modalPortal: ComponentPortal<any>;\n constructor() {}\n\n @ViewChild(\"place\", { static: false, read: ViewContainerRef }) place: ViewContainerRef;\n\n bindComponent(type: any, injector: PortalInjector) {\n this.initComponent(type, injector);\n }\n\n private initComponent(type: any, injector: PortalInjector) {\n this.modalPortal = new ComponentPortal(type, this.place, injector);\n }\n}\n","import { ComponentType, Overlay, OverlayConfig } from \"@angular/cdk/overlay\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { ComponentRef, Injectable, Injector } from \"@angular/core\";\nimport { MODAL_DATA_VAR } from \"./modal-constants\";\nimport { ModalRef } from \"./modal-ref\";\nimport { ModuleWrapperComponent } from \"./module-wrapper/module-wrapper.component\";\n\ninterface IModalOptions {\n width?: string;\n height?: string;\n top?: string;\n right?: string;\n bottom?: string;\n left?: string;\n closeOnBackdropClick?: boolean;\n}\n@Injectable({\n providedIn: \"root\",\n})\nexport class ModalService {\n private componentInstance: ComponentRef<ModuleWrapperComponent>;\n\n constructor(private overlay: Overlay, private injector: Injector) {}\n\n show<T, D>(component: ComponentType<T>, data?: D, options?: IModalOptions): ModalRef {\n const positionStrategy = this.calculatePosition(options);\n const { width, height } = options || {};\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n width: width,\n height,\n panelClass: \"mis-modal\",\n backdropClass: \"mis-modal-overlay\",\n });\n const overlayRef = this.overlay.create(config);\n const modalRef = new ModalRef(overlayRef);\n const injector = this.createInjector(modalRef, this.injector, data);\n const portal = new ComponentPortal(ModuleWrapperComponent, null);\n this.componentInstance = overlayRef.attach(portal);\n if (options?.closeOnBackdropClick) {\n overlayRef.backdropClick().subscribe(() => modalRef.close());\n }\n this.componentInstance.instance.bindComponent(component, injector);\n return modalRef;\n }\n private createInjector<D>(ref: ModalRef, inj: Injector, data?: D): PortalInjector {\n const injectorTokens = new WeakMap();\n injectorTokens.set(ModalRef, ref);\n injectorTokens.set(MODAL_DATA_VAR, data);\n return new PortalInjector(inj, injectorTokens);\n }\n\n private calculatePosition(options: IModalOptions) {\n const position = this.overlay.position().global().centerHorizontally().centerVertically();\n if (options && screen.width > 600) {\n if (options.top) {\n position.top(options.top);\n }\n if (options.left) {\n position.left(options.left);\n }\n if (options.right) {\n position.right(options.right);\n }\n if (options.bottom) {\n position.bottom(options.bottom);\n }\n }\n return position;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ModuleWrapperComponent } from './module-wrapper/module-wrapper.component';\nimport { ModalService } from './modal.service';\n\n\n\n@NgModule({\n declarations: [ModuleWrapperComponent],\n imports: [\n CommonModule,\n OverlayModule, \n PortalModule\n ],\n entryComponents: [ModuleWrapperComponent]\n})\nexport class ModalModule { \n static forRoot(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService],\n };\n }\n\n static forChild(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ModuleWrapperComponent as ɵa} from './module-wrapper/module-wrapper.component';"],"names":["InjectionToken","Subject","ComponentPortal","Component","trigger","transition","style","animate","ViewChild","ViewContainerRef","OverlayConfig","portal","PortalInjector","Injectable","Overlay","Injector","NgModule","CommonModule","OverlayModule","PortalModule"],"mappings":";;;;;;IAAA;QAIa,cAAc,GAAG,IAAIA,iBAAc,CAAM,4BAA4B;;ICJlF;;QAUE,kBAAmB,OAAmB;YAAnB,YAAO,GAAP,OAAO,CAAY;YAH9B,iBAAY,GAAG,IAAIC,YAAO,EAAW,CAAC;YAC9C,gBAAW,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;SAEL;QAE1C,wBAAK,GAAL,UAAM,IAAc;YAClB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;SAC9B;uBACF;KAAA;;;QCGC;SAAgB;QAIhB,8CAAa,GAAb,UAAc,IAAS,EAAE,QAAwB;YAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SACpC;QAEO,8CAAa,GAAb,UAAc,IAAS,EAAE,QAAwB;YACvD,IAAI,CAAC,WAAW,GAAG,IAAIC,sBAAe,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;SACpE;;;;gBA1BFC,Y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jC,IAAI,OAAO,CAAC,GAAG,EAAE;oBACf,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;iBAC3B;gBACD,IAAI,OAAO,CAAC,IAAI,EAAE;oBAChB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBAC7B;gBACD,IAAI,OAAO,CAAC,KAAK,EAAE;oBACjB,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;iBAC/B;gBACD,IAAI,OAAO,CAAC,MAAM,EAAE;oBAClB,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjC;aACF;YACD,OAAO,QAAQ,CAAC;SACjB;;;;;gBAvDFC,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAlBuBC,UAAO;gBAEIC,WAAQ;;;;QCgB3C;;QACS,mBAAO,GAAd;YACE,OAAO;gBACL,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,CAAC,YAAY,CAAC;aAC1B,CAAC;SACH;QAEM,oBAAQ,GAAf;YACE,OAAO;gBACL,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,CAAC,YAAY,CAAC;aAC1B,CAAC;SACH;;;;gBAtBFC,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE;wBACPC,mBAAY;wBACZC,gBAAa;wBACbC,mBAAY;qBACb;oBACD,eAAe,EAAE,CAAC,sBAAsB,CAAC;iBAC1C;;;ICjBD;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-modal.umd.js","sources":["../../../projects/mis-components/modal/modal-constants.ts","../../../projects/mis-components/modal/modal-ref.ts","../../../projects/mis-components/modal/module-wrapper/module-wrapper.component.ts","../../../projects/mis-components/modal/modal.service.ts","../../../projects/mis-components/modal/modal.module.ts","../../../projects/mis-components/modal/mis-crystal-design-system-modal.ts"],"sourcesContent":["/** @format */\n\nimport { InjectionToken } from \"@angular/core\";\n\nexport const MODAL_DATA_VAR = new InjectionToken<any>(\"MISModalDataInjectionToken\");\n","/** @format */\n\nimport { OverlayRef } from \"@angular/cdk/overlay\";\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nexport class ModalRef {\n private afterClosed$ = new Subject<unknown>();\n afterClosed = this.afterClosed$.asObservable();\n\n constructor(public overlay: OverlayRef) {}\n\n close(data?: unknown): void {\n this.overlay.detach();\n this.overlay.dispose();\n this.afterClosed$.next(data);\n this.afterClosed$.complete();\n }\n}\n","import { trigger, transition, style, animate } from \"@angular/animations\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { Component, Injector, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ModalRef } from \"../modal-ref\";\n\n@Component({\n selector: \"mis-module-wrapper\",\n templateUrl: \"./module-wrapper.component.html\",\n styleUrls: [\"./module-wrapper.component.scss\"],\n animations: [\n trigger(\"slideInOut\", [\n transition(\":enter\", [\n style({ transform: \"translateY(-30%)\", opacity: 0 }),\n animate(\"200ms ease-out\", style({ transform: \"translatey(0%)\", opacity: 1 }))\n ]),\n transition(\":leave\", [animate(\"200ms ease-out\", style({ transform: \"translatey(-30%)\", opacity: 0 }))])\n ])\n ]\n})\nexport class ModuleWrapperComponent {\n modalPortal: ComponentPortal<any>;\n constructor() {}\n\n @ViewChild(\"place\", { static: false, read: ViewContainerRef }) place: ViewContainerRef;\n\n bindComponent(type: any, injector: PortalInjector) {\n this.initComponent(type, injector);\n }\n\n private initComponent(type: any, injector: PortalInjector) {\n this.modalPortal = new ComponentPortal(type, this.place, injector);\n }\n}\n","import { ComponentType, Overlay, OverlayConfig } from \"@angular/cdk/overlay\";\nimport { ComponentPortal, PortalInjector } from \"@angular/cdk/portal\";\nimport { ComponentRef, Injectable, Injector } from \"@angular/core\";\nimport { MODAL_DATA_VAR } from \"./modal-constants\";\nimport { ModalRef } from \"./modal-ref\";\nimport { ModuleWrapperComponent } from \"./module-wrapper/module-wrapper.component\";\n\ninterface IModalOptions {\n width?: string;\n height?: string;\n top?: string;\n right?: string;\n bottom?: string;\n left?: string;\n closeOnBackdropClick?: boolean;\n}\n@Injectable({\n providedIn: \"root\"\n})\nexport class ModalService {\n private componentInstance: ComponentRef<ModuleWrapperComponent>;\n\n constructor(private overlay: Overlay, private injector: Injector) {}\n\n show<T, D>(component: ComponentType<T>, data?: D, options?: IModalOptions): ModalRef {\n const positionStrategy = this.calculatePosition(options);\n const { width, height } = options || {};\n const config = new OverlayConfig({\n hasBackdrop: true,\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n width: width,\n height,\n panelClass: \"mis-modal\",\n backdropClass: \"mis-modal-overlay\"\n });\n const overlayRef = this.overlay.create(config);\n const modalRef = new ModalRef(overlayRef);\n const injector = this.createInjector(modalRef, this.injector, data);\n const portal = new ComponentPortal(ModuleWrapperComponent, null);\n this.componentInstance = overlayRef.attach(portal);\n if (options?.closeOnBackdropClick) {\n overlayRef.backdropClick().subscribe(() => modalRef.close());\n }\n this.componentInstance.instance.bindComponent(component, injector);\n return modalRef;\n }\n private createInjector<D>(ref: ModalRef, inj: Injector, data?: D): PortalInjector {\n const injectorTokens = new WeakMap();\n injectorTokens.set(ModalRef, ref);\n injectorTokens.set(MODAL_DATA_VAR, data);\n return new PortalInjector(inj, injectorTokens);\n }\n\n private calculatePosition(options: IModalOptions) {\n const position = this.overlay.position().global().centerHorizontally().centerVertically();\n if (options && screen.width > 600) {\n if (options.top) {\n position.top(options.top);\n }\n if (options.left) {\n position.left(options.left);\n }\n if (options.right) {\n position.right(options.right);\n }\n if (options.bottom) {\n position.bottom(options.bottom);\n }\n }\n return position;\n }\n}\n","import { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { OverlayModule } from \"@angular/cdk/overlay\";\nimport { PortalModule } from \"@angular/cdk/portal\";\nimport { ModuleWrapperComponent } from \"./module-wrapper/module-wrapper.component\";\nimport { ModalService } from \"./modal.service\";\n\n@NgModule({\n declarations: [ModuleWrapperComponent],\n imports: [CommonModule, OverlayModule, PortalModule],\n entryComponents: [ModuleWrapperComponent]\n})\nexport class ModalModule {\n static forRoot(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService]\n };\n }\n\n static forChild(): ModuleWithProviders<ModalModule> {\n return {\n ngModule: ModalModule,\n providers: [ModalService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {ModuleWrapperComponent as ɵa} from './module-wrapper/module-wrapper.component';"],"names":["InjectionToken","Subject","ComponentPortal","Component","trigger","transition","style","animate","ViewChild","ViewContainerRef","OverlayConfig","portal","PortalInjector","Injectable","Overlay","Injector","NgModule","CommonModule","OverlayModule","PortalModule"],"mappings":";;;;;;IAAA;QAIa,cAAc,GAAG,IAAIA,iBAAc,CAAM,4BAA4B;;ICJlF;;QAUE,kBAAmB,OAAmB;YAAnB,YAAO,GAAP,OAAO,CAAY;YAH9B,iBAAY,GAAG,IAAIC,YAAO,EAAW,CAAC;YAC9C,gBAAW,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;SAEL;QAE1C,wBAAK,GAAL,UAAM,IAAc;YAClB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;SAC9B;uBACF;KAAA;;;QCGC;SAAgB;QAIhB,8CAAa,GAAb,UAAc,IAAS,EAAE,QAAwB;YAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SACpC;QAEO,8CAAa,GAAb,UAAc,IAAS,EAAE,QAAwB;YACvD,IAAI,CAAC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