monkey-style-guide-v2 0.0.17 → 0.0.18

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 (279) hide show
  1. package/assets/scss/directives/_badge.scss +49 -0
  2. package/assets/scss/directives/_index.scss +1 -0
  3. package/assets/scss/table/_styles.scss +0 -33
  4. package/esm2022/lib/components/accordion/accordion.component.mjs +102 -0
  5. package/esm2022/lib/components/accordion/index.mjs +7 -0
  6. package/esm2022/lib/components/action-bar/action-bar.component.mjs +46 -0
  7. package/esm2022/lib/components/action-bar/index.mjs +7 -0
  8. package/esm2022/lib/components/alert/alert.component.mjs +50 -0
  9. package/esm2022/lib/components/alert/index.mjs +7 -0
  10. package/esm2022/lib/components/avatar/avatar.component.mjs +55 -0
  11. package/esm2022/lib/components/avatar/index.mjs +7 -0
  12. package/esm2022/lib/components/badge/badge.component.mjs +74 -0
  13. package/esm2022/lib/components/badge/index.mjs +7 -0
  14. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +56 -0
  15. package/esm2022/lib/components/breadcrumb/index.mjs +7 -0
  16. package/esm2022/lib/components/{monkey-button/monkey-button.component.mjs → button/button.component.mjs} +1 -1
  17. package/esm2022/lib/components/button/index.mjs +7 -0
  18. package/esm2022/lib/components/checkbox/checkbox.component.mjs +219 -0
  19. package/esm2022/lib/components/checkbox/index.mjs +7 -0
  20. package/esm2022/lib/components/date-range/date-range.component.mjs +239 -0
  21. package/esm2022/lib/components/date-range/index.mjs +7 -0
  22. package/esm2022/lib/components/date-range/month/index.mjs +7 -0
  23. package/esm2022/lib/components/date-range/month/month.component.mjs +148 -0
  24. package/esm2022/lib/components/date-range/quick-actions/index.mjs +7 -0
  25. package/esm2022/lib/components/date-range/quick-actions/quick-actions.component.mjs +48 -0
  26. package/esm2022/lib/components/date-range/utils.mjs +102 -0
  27. package/esm2022/lib/components/divider/divider.component.mjs +44 -0
  28. package/esm2022/lib/components/divider/index.mjs +7 -0
  29. package/esm2022/lib/components/form-field/form-field-control.mjs +15 -0
  30. package/esm2022/lib/components/form-field/form-field.component.mjs +268 -0
  31. package/esm2022/lib/components/form-field/form-field.module.mjs +21 -0
  32. package/esm2022/lib/components/form-field/index.mjs +10 -0
  33. package/esm2022/lib/components/form-field/utils.mjs +16 -0
  34. package/esm2022/lib/components/icon/icon.component.mjs +51 -0
  35. package/esm2022/lib/components/icon/index.mjs +7 -0
  36. package/esm2022/lib/components/{monkey-icon-button/monkey-icon-button.component.mjs → icon-button/icon-button.component.mjs} +2 -2
  37. package/esm2022/lib/components/icon-button/index.mjs +7 -0
  38. package/esm2022/lib/components/index.mjs +27 -21
  39. package/esm2022/lib/components/input/index.mjs +9 -0
  40. package/esm2022/lib/components/input/input-currency.directive.mjs +185 -0
  41. package/esm2022/lib/components/input/input.directive.mjs +185 -0
  42. package/esm2022/lib/components/input/input.module.mjs +24 -0
  43. package/esm2022/lib/components/input/validators.mjs +22 -0
  44. package/esm2022/lib/components/input-code/index.mjs +7 -0
  45. package/esm2022/lib/components/input-code/input-code.component.mjs +232 -0
  46. package/esm2022/lib/components/input-upload/index.mjs +7 -0
  47. package/esm2022/lib/components/input-upload/input-upload.component.mjs +238 -0
  48. package/esm2022/lib/components/{monkey-modal → modal}/components/default.mjs +8 -6
  49. package/esm2022/lib/components/{monkey-modal → modal}/directives/actions.mjs +1 -1
  50. package/esm2022/lib/components/{monkey-modal → modal}/directives/content.mjs +1 -1
  51. package/esm2022/lib/components/{monkey-modal → modal}/directives/subtitle.mjs +1 -1
  52. package/esm2022/lib/components/{monkey-modal → modal}/directives/title.mjs +1 -1
  53. package/esm2022/lib/components/modal/index.mjs +16 -0
  54. package/esm2022/lib/components/modal/modal-config.mjs +20 -0
  55. package/esm2022/lib/components/modal/modal-ref.mjs +49 -0
  56. package/esm2022/lib/components/modal/modal.component.mjs +117 -0
  57. package/esm2022/lib/components/modal/modal.module.mjs +53 -0
  58. package/esm2022/lib/components/modal/modal.service.mjs +137 -0
  59. package/esm2022/lib/components/modal/utils.mjs +23 -0
  60. package/esm2022/lib/components/option/index.mjs +7 -0
  61. package/esm2022/lib/components/{monkey-option/monkey-option.component.mjs → option/option.component.mjs} +1 -1
  62. package/esm2022/lib/components/security-level/index.mjs +7 -0
  63. package/esm2022/lib/components/{monkey-security-level/monkey-security-level.component.mjs → security-level/security-level.component.mjs} +1 -1
  64. package/esm2022/lib/components/select/index.mjs +7 -0
  65. package/esm2022/lib/components/select/select.component.mjs +448 -0
  66. package/esm2022/lib/components/status/index.mjs +7 -0
  67. package/esm2022/lib/components/{monkey-status/monkey-status.component.mjs → status/status.component.mjs} +1 -1
  68. package/esm2022/lib/components/{monkey-table → table}/components/pagination-action/pagination-action.mjs +2 -2
  69. package/esm2022/lib/components/table/components/pagination-label/pagination-label.mjs +34 -0
  70. package/esm2022/lib/components/table/components/pagination-size/pagination-size.mjs +57 -0
  71. package/esm2022/lib/components/table/directives/column-checked.mjs +109 -0
  72. package/esm2022/lib/components/table/directives/column-expansible.mjs +134 -0
  73. package/esm2022/lib/components/table/directives/column-sortable.mjs +97 -0
  74. package/esm2022/lib/components/{monkey-table → table}/directives/column-stick.mjs +1 -1
  75. package/esm2022/lib/components/table/index.mjs +15 -0
  76. package/esm2022/lib/components/{monkey-table/table.mjs → table/table.component.mjs} +3 -2
  77. package/esm2022/lib/components/table/table.module.mjs +64 -0
  78. package/esm2022/lib/components/toast/index.mjs +7 -0
  79. package/esm2022/lib/components/toast/toast.component.mjs +79 -0
  80. package/esm2022/lib/components/toggle/index.mjs +7 -0
  81. package/esm2022/lib/components/{monkey-toggle/monkey-toggle.component.mjs → toggle/toggle.component.mjs} +6 -1
  82. package/esm2022/lib/components/toggle-line/index.mjs +8 -0
  83. package/esm2022/lib/components/toggle-line/toggle-line-button/index.mjs +7 -0
  84. package/esm2022/lib/components/{monkey-toggle-line/monkey-toggle-line-button/monkey-toggle-line-button.component.mjs → toggle-line/toggle-line-button/toggle-line-button.component.mjs} +3 -3
  85. package/esm2022/lib/components/toggle-line/toggle-line.component.mjs +85 -0
  86. package/esm2022/lib/components/tooltip/index.mjs +8 -0
  87. package/esm2022/lib/components/tooltip/tooltip/index.mjs +7 -0
  88. package/esm2022/lib/components/tooltip/tooltip/tooltip.component.mjs +58 -0
  89. package/esm2022/lib/components/tooltip/tooltip.directive.mjs +180 -0
  90. package/esm2022/lib/directives/badge.mjs +74 -0
  91. package/esm2022/lib/directives/index.mjs +2 -1
  92. package/esm2022/lib/directives/module.mjs +33 -4
  93. package/esm2022/lib/interfaces/sizes.mjs +1 -1
  94. package/esm2022/lib/services/dictionary.service.mjs +224 -0
  95. package/esm2022/lib/services/icons.service.mjs +56 -0
  96. package/esm2022/lib/services/index.mjs +8 -4
  97. package/esm2022/lib/services/toast.service.mjs +72 -0
  98. package/esm2022/lib/tokens/index.mjs +3 -0
  99. package/esm2022/utils/utils.mjs +32 -1
  100. package/fesm2022/monkey-style-guide-v2.mjs +2254 -391
  101. package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
  102. package/lib/components/accordion/index.d.ts +6 -0
  103. package/lib/components/action-bar/action-bar.component.d.ts +9 -0
  104. package/lib/components/action-bar/index.d.ts +6 -0
  105. package/lib/components/alert/index.d.ts +6 -0
  106. package/lib/components/avatar/avatar.component.d.ts +30 -0
  107. package/lib/components/avatar/index.d.ts +6 -0
  108. package/lib/components/badge/badge.component.d.ts +19 -0
  109. package/lib/components/badge/index.d.ts +6 -0
  110. package/lib/components/breadcrumb/index.d.ts +6 -0
  111. package/lib/components/button/index.d.ts +6 -0
  112. package/lib/components/{monkey-checkbox/monkey-checkbox.component.d.ts → checkbox/checkbox.component.d.ts} +1 -1
  113. package/lib/components/checkbox/index.d.ts +6 -0
  114. package/lib/components/date-range/date-range.component.d.ts +59 -0
  115. package/lib/components/date-range/index.d.ts +6 -0
  116. package/lib/components/date-range/month/index.d.ts +6 -0
  117. package/lib/components/date-range/month/month.component.d.ts +38 -0
  118. package/lib/components/date-range/quick-actions/index.d.ts +6 -0
  119. package/lib/components/date-range/quick-actions/quick-actions.component.d.ts +19 -0
  120. package/lib/components/date-range/utils.d.ts +40 -0
  121. package/lib/components/divider/index.d.ts +6 -0
  122. package/lib/components/{monkey-form-field/form-field.d.ts → form-field/form-field.component.d.ts} +9 -4
  123. package/lib/components/{monkey-form-field/module.d.ts → form-field/form-field.module.d.ts} +1 -1
  124. package/lib/components/form-field/index.d.ts +9 -0
  125. package/lib/components/icon/index.d.ts +6 -0
  126. package/lib/components/icon-button/index.d.ts +6 -0
  127. package/lib/components/index.d.ts +26 -20
  128. package/lib/components/input/index.d.ts +8 -0
  129. package/lib/components/{monkey-input/monkey-input-currency.directive.d.ts → input/input-currency.directive.d.ts} +2 -2
  130. package/lib/components/{monkey-input/monkey-input.directive.d.ts → input/input.directive.d.ts} +8 -2
  131. package/lib/components/{monkey-input/monkey-input.module.d.ts → input/input.module.d.ts} +2 -2
  132. package/lib/components/input-code/index.d.ts +6 -0
  133. package/lib/components/input-code/input-code.component.d.ts +48 -0
  134. package/lib/components/input-upload/index.d.ts +6 -0
  135. package/lib/components/input-upload/input-upload.component.d.ts +64 -0
  136. package/lib/components/{monkey-modal → modal}/components/default.d.ts +0 -1
  137. package/lib/components/modal/index.d.ts +15 -0
  138. package/lib/components/{monkey-modal → modal}/modal-config.d.ts +3 -2
  139. package/lib/components/{monkey-modal → modal}/modal-ref.d.ts +1 -0
  140. package/lib/components/{monkey-modal/modal.d.ts → modal/modal.component.d.ts} +3 -4
  141. package/lib/components/{monkey-modal → modal}/modal.module.d.ts +4 -4
  142. package/lib/components/option/index.d.ts +6 -0
  143. package/lib/components/security-level/index.d.ts +6 -0
  144. package/lib/components/select/index.d.ts +6 -0
  145. package/lib/components/{monkey-select/monkey-select.component.d.ts → select/select.component.d.ts} +31 -13
  146. package/lib/components/status/index.d.ts +6 -0
  147. package/lib/components/{monkey-table → table}/directives/column-checked.d.ts +2 -2
  148. package/lib/components/{monkey-table → table}/directives/column-expansible.d.ts +1 -1
  149. package/lib/components/{monkey-table → table}/directives/column-sortable.d.ts +1 -1
  150. package/lib/components/{monkey-table → table}/index.d.ts +6 -1
  151. package/lib/components/table/table.module.d.ts +16 -0
  152. package/lib/components/toast/index.d.ts +6 -0
  153. package/lib/components/{monkey-toast/monkey-toast.component.d.ts → toast/toast.component.d.ts} +5 -0
  154. package/lib/components/toggle/index.d.ts +6 -0
  155. package/lib/components/toggle-line/index.d.ts +7 -0
  156. package/lib/components/toggle-line/toggle-line-button/index.d.ts +6 -0
  157. package/lib/components/{monkey-toggle-line/monkey-toggle-line.component.d.ts → toggle-line/toggle-line.component.d.ts} +1 -1
  158. package/lib/components/tooltip/index.d.ts +7 -0
  159. package/lib/components/tooltip/tooltip/index.d.ts +6 -0
  160. package/lib/directives/badge.d.ts +24 -0
  161. package/lib/directives/index.d.ts +1 -0
  162. package/lib/directives/module.d.ts +2 -1
  163. package/lib/interfaces/sizes.d.ts +1 -1
  164. package/lib/services/dictionary.service.d.ts +11 -0
  165. package/lib/services/{monkey-icons.service.d.ts → icons.service.d.ts} +2 -0
  166. package/lib/services/index.d.ts +7 -3
  167. package/lib/services/{monkey-toast.service.d.ts → toast.service.d.ts} +5 -0
  168. package/lib/tokens/index.d.ts +3 -0
  169. package/monkey-style-guide-v2-0.0.18.tgz +0 -0
  170. package/package.json +2 -1
  171. package/utils/utils.d.ts +5 -0
  172. package/esm2022/lib/components/monkey-accordion/index.mjs +0 -2
  173. package/esm2022/lib/components/monkey-accordion/monkey-accordion.component.mjs +0 -102
  174. package/esm2022/lib/components/monkey-alert/index.mjs +0 -2
  175. package/esm2022/lib/components/monkey-alert/monkey-alert.component.mjs +0 -50
  176. package/esm2022/lib/components/monkey-breadcrumb/index.mjs +0 -2
  177. package/esm2022/lib/components/monkey-breadcrumb/monkey-breadcrumb.component.mjs +0 -56
  178. package/esm2022/lib/components/monkey-button/index.mjs +0 -2
  179. package/esm2022/lib/components/monkey-checkbox/index.mjs +0 -2
  180. package/esm2022/lib/components/monkey-checkbox/monkey-checkbox.component.mjs +0 -216
  181. package/esm2022/lib/components/monkey-divider/index.mjs +0 -2
  182. package/esm2022/lib/components/monkey-divider/monkey-divider.component.mjs +0 -44
  183. package/esm2022/lib/components/monkey-form-field/form-field-control.mjs +0 -15
  184. package/esm2022/lib/components/monkey-form-field/form-field.mjs +0 -250
  185. package/esm2022/lib/components/monkey-form-field/index.mjs +0 -5
  186. package/esm2022/lib/components/monkey-form-field/module.mjs +0 -21
  187. package/esm2022/lib/components/monkey-form-field/utils.mjs +0 -16
  188. package/esm2022/lib/components/monkey-icon/index.mjs +0 -2
  189. package/esm2022/lib/components/monkey-icon/monkey-icon.component.mjs +0 -51
  190. package/esm2022/lib/components/monkey-icon-button/index.mjs +0 -2
  191. package/esm2022/lib/components/monkey-input/index.mjs +0 -5
  192. package/esm2022/lib/components/monkey-input/monkey-input-currency.directive.mjs +0 -187
  193. package/esm2022/lib/components/monkey-input/monkey-input.directive.mjs +0 -166
  194. package/esm2022/lib/components/monkey-input/monkey-input.module.mjs +0 -24
  195. package/esm2022/lib/components/monkey-input/validators.mjs +0 -17
  196. package/esm2022/lib/components/monkey-modal/index.mjs +0 -12
  197. package/esm2022/lib/components/monkey-modal/modal-config.mjs +0 -18
  198. package/esm2022/lib/components/monkey-modal/modal-ref.mjs +0 -46
  199. package/esm2022/lib/components/monkey-modal/modal.mjs +0 -119
  200. package/esm2022/lib/components/monkey-modal/modal.module.mjs +0 -53
  201. package/esm2022/lib/components/monkey-modal/service.mjs +0 -92
  202. package/esm2022/lib/components/monkey-modal/utils.mjs +0 -23
  203. package/esm2022/lib/components/monkey-option/index.mjs +0 -2
  204. package/esm2022/lib/components/monkey-security-level/index.mjs +0 -2
  205. package/esm2022/lib/components/monkey-select/index.mjs +0 -2
  206. package/esm2022/lib/components/monkey-select/monkey-select.component.mjs +0 -352
  207. package/esm2022/lib/components/monkey-status/index.mjs +0 -2
  208. package/esm2022/lib/components/monkey-table/components/pagination-label/pagination-label.mjs +0 -34
  209. package/esm2022/lib/components/monkey-table/components/pagination-size/pagination-size.mjs +0 -57
  210. package/esm2022/lib/components/monkey-table/directives/column-checked.mjs +0 -109
  211. package/esm2022/lib/components/monkey-table/directives/column-expansible.mjs +0 -134
  212. package/esm2022/lib/components/monkey-table/directives/column-sortable.mjs +0 -97
  213. package/esm2022/lib/components/monkey-table/index.mjs +0 -10
  214. package/esm2022/lib/components/monkey-table/table.module.mjs +0 -60
  215. package/esm2022/lib/components/monkey-toast/index.mjs +0 -2
  216. package/esm2022/lib/components/monkey-toast/monkey-toast.component.mjs +0 -74
  217. package/esm2022/lib/components/monkey-toggle/index.mjs +0 -2
  218. package/esm2022/lib/components/monkey-toggle-line/index.mjs +0 -3
  219. package/esm2022/lib/components/monkey-toggle-line/monkey-toggle-line-button/index.mjs +0 -2
  220. package/esm2022/lib/components/monkey-toggle-line/monkey-toggle-line.component.mjs +0 -85
  221. package/esm2022/lib/components/monkey-tooltip/index.mjs +0 -3
  222. package/esm2022/lib/components/monkey-tooltip/monkey-tooltip.directive.mjs +0 -175
  223. package/esm2022/lib/components/monkey-tooltip/tooltip/index.mjs +0 -2
  224. package/esm2022/lib/components/monkey-tooltip/tooltip/tooltip.component.mjs +0 -53
  225. package/esm2022/lib/services/monkey-destroy.service.mjs +0 -15
  226. package/esm2022/lib/services/monkey-icons.service.mjs +0 -45
  227. package/esm2022/lib/services/monkey-toast.service.mjs +0 -72
  228. package/lib/components/monkey-accordion/index.d.ts +0 -1
  229. package/lib/components/monkey-alert/index.d.ts +0 -1
  230. package/lib/components/monkey-breadcrumb/index.d.ts +0 -1
  231. package/lib/components/monkey-button/index.d.ts +0 -1
  232. package/lib/components/monkey-checkbox/index.d.ts +0 -1
  233. package/lib/components/monkey-divider/index.d.ts +0 -1
  234. package/lib/components/monkey-form-field/index.d.ts +0 -4
  235. package/lib/components/monkey-icon/index.d.ts +0 -1
  236. package/lib/components/monkey-icon-button/index.d.ts +0 -1
  237. package/lib/components/monkey-input/index.d.ts +0 -4
  238. package/lib/components/monkey-modal/index.d.ts +0 -11
  239. package/lib/components/monkey-option/index.d.ts +0 -1
  240. package/lib/components/monkey-security-level/index.d.ts +0 -1
  241. package/lib/components/monkey-select/index.d.ts +0 -1
  242. package/lib/components/monkey-status/index.d.ts +0 -1
  243. package/lib/components/monkey-table/table.module.d.ts +0 -15
  244. package/lib/components/monkey-toast/index.d.ts +0 -1
  245. package/lib/components/monkey-toggle/index.d.ts +0 -1
  246. package/lib/components/monkey-toggle-line/index.d.ts +0 -2
  247. package/lib/components/monkey-toggle-line/monkey-toggle-line-button/index.d.ts +0 -1
  248. package/lib/components/monkey-tooltip/index.d.ts +0 -2
  249. package/lib/components/monkey-tooltip/tooltip/index.d.ts +0 -1
  250. package/lib/services/monkey-destroy.service.d.ts +0 -8
  251. package/monkey-style-guide-v2-0.0.17.tgz +0 -0
  252. /package/lib/components/{monkey-accordion/monkey-accordion.component.d.ts → accordion/accordion.component.d.ts} +0 -0
  253. /package/lib/components/{monkey-alert/monkey-alert.component.d.ts → alert/alert.component.d.ts} +0 -0
  254. /package/lib/components/{monkey-breadcrumb/monkey-breadcrumb.component.d.ts → breadcrumb/breadcrumb.component.d.ts} +0 -0
  255. /package/lib/components/{monkey-button/monkey-button.component.d.ts → button/button.component.d.ts} +0 -0
  256. /package/lib/components/{monkey-divider/monkey-divider.component.d.ts → divider/divider.component.d.ts} +0 -0
  257. /package/lib/components/{monkey-form-field → form-field}/form-field-control.d.ts +0 -0
  258. /package/lib/components/{monkey-form-field → form-field}/utils.d.ts +0 -0
  259. /package/lib/components/{monkey-icon/monkey-icon.component.d.ts → icon/icon.component.d.ts} +0 -0
  260. /package/lib/components/{monkey-icon-button/monkey-icon-button.component.d.ts → icon-button/icon-button.component.d.ts} +0 -0
  261. /package/lib/components/{monkey-input → input}/validators.d.ts +0 -0
  262. /package/lib/components/{monkey-modal → modal}/directives/actions.d.ts +0 -0
  263. /package/lib/components/{monkey-modal → modal}/directives/content.d.ts +0 -0
  264. /package/lib/components/{monkey-modal → modal}/directives/subtitle.d.ts +0 -0
  265. /package/lib/components/{monkey-modal → modal}/directives/title.d.ts +0 -0
  266. /package/lib/components/{monkey-modal/service.d.ts → modal/modal.service.d.ts} +0 -0
  267. /package/lib/components/{monkey-modal → modal}/utils.d.ts +0 -0
  268. /package/lib/components/{monkey-option/monkey-option.component.d.ts → option/option.component.d.ts} +0 -0
  269. /package/lib/components/{monkey-security-level/monkey-security-level.component.d.ts → security-level/security-level.component.d.ts} +0 -0
  270. /package/lib/components/{monkey-status/monkey-status.component.d.ts → status/status.component.d.ts} +0 -0
  271. /package/lib/components/{monkey-table → table}/components/pagination-action/pagination-action.d.ts +0 -0
  272. /package/lib/components/{monkey-table → table}/components/pagination-label/pagination-label.d.ts +0 -0
  273. /package/lib/components/{monkey-table → table}/components/pagination-size/pagination-size.d.ts +0 -0
  274. /package/lib/components/{monkey-table → table}/directives/column-stick.d.ts +0 -0
  275. /package/lib/components/{monkey-table/table.d.ts → table/table.component.d.ts} +0 -0
  276. /package/lib/components/{monkey-toggle/monkey-toggle.component.d.ts → toggle/toggle.component.d.ts} +0 -0
  277. /package/lib/components/{monkey-toggle-line/monkey-toggle-line-button/monkey-toggle-line-button.component.d.ts → toggle-line/toggle-line-button/toggle-line-button.component.d.ts} +0 -0
  278. /package/lib/components/{monkey-tooltip → tooltip}/tooltip/tooltip.component.d.ts +0 -0
  279. /package/lib/components/{monkey-tooltip/monkey-tooltip.directive.d.ts → tooltip/tooltip.directive.d.ts} +0 -0
@@ -2,15 +2,17 @@ import { trigger, state, style, transition, animate, keyframes } from '@angular/
2
2
  import * as i1$1 from '@angular/common';
3
3
  import { CommonModule, CurrencyPipe, NgTemplateOutlet, DOCUMENT } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, inject, TemplateRef, booleanAttribute, Component, Input, ViewEncapsulation, input, output, HostListener, Directive, NgModule, EventEmitter, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, Output, HostBinding, ElementRef, DEFAULT_CURRENCY_CODE, ContentChild, LOCALE_ID, InjectionToken, Optional, Inject, ViewChild } from '@angular/core';
6
- import { Subject, takeUntil, merge, Subscription } from 'rxjs';
5
+ import { Injectable, inject, TemplateRef, booleanAttribute, Component, Input, input, ViewEncapsulation, HostBinding, output, effect, HostListener, Directive, NgModule, EventEmitter, DestroyRef, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, Output, InjectionToken, LOCALE_ID, ElementRef, DEFAULT_CURRENCY_CODE, ContentChild, computed, Optional, ViewChildren, ViewChild, Inject } from '@angular/core';
7
6
  import { DomSanitizer } from '@angular/platform-browser';
8
7
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
9
8
  import * as i1 from '@angular/cdk/overlay';
10
9
  import { OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
11
10
  import { Router, NavigationStart } from '@angular/router';
12
- import * as i1$2 from '@angular/forms';
11
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
+ import * as i2 from '@angular/forms';
13
13
  import { NgControl, FormControlDirective, NgModel, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
14
+ import { format, parseISO, subYears, addYears, subMonths, addMonths, getMonth, getYear, startOfWeek, startOfMonth, endOfWeek, endOfMonth, isSameMonth, isBefore, isAfter, isToday, addDays, isWithinInterval, subDays } from 'date-fns';
15
+ import { BehaviorSubject, map, merge, Subject, debounceTime, Subscription } from 'rxjs';
14
16
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
15
17
  import { getSupportedInputTypes } from '@angular/cdk/platform';
16
18
  import { hasModifierKey } from '@angular/cdk/keycodes';
@@ -46,20 +48,44 @@ function getRandomString(len, charSet) {
46
48
  })
47
49
  .join('');
48
50
  }
49
-
50
- class MonkeyDestroyService extends Subject {
51
- ngOnDestroy() {
52
- this.next();
53
- this.complete();
54
- }
55
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDestroyService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
56
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDestroyService }); }
51
+ const objHaveProperty = (obj, property) => {
52
+ return typeof obj === 'object' && obj !== null && property in obj;
53
+ };
54
+ function formatFileSize(bytes) {
55
+ if (bytes === 0)
56
+ return '0 Bytes';
57
+ const k = 1024;
58
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
59
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
60
+ return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;
61
+ }
62
+ function getFileExtension(filename) {
63
+ const name = filename.toLowerCase();
64
+ const lastDotIndex = name.lastIndexOf('.');
65
+ return lastDotIndex === -1 ? '' : name.slice(lastDotIndex + 1);
66
+ }
67
+ function sanitizeString(input) {
68
+ return input
69
+ .replace(/<script.*?>.*?<\/script>/gi, '')
70
+ .replace(/on\w+="[^"]*"/gi, '')
71
+ .replace(/on\w+='[^']*'/gi, '')
72
+ .replace(/javascript:/gi, '')
73
+ .replace(/<\/?[^>]+>/gi, '')
74
+ .trim();
75
+ }
76
+ function normalizeStringToSearch(text) {
77
+ return text
78
+ .normalize('NFD')
79
+ .replace(/[\u0300-\u036f]/g, '')
80
+ .toLowerCase();
57
81
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDestroyService, decorators: [{
59
- type: Injectable
60
- }] });
61
82
 
62
83
  /* eslint-disable max-len */
84
+ /** ************************
85
+ * Copyright Monkey Exchange. All Rights Reserved
86
+ * This style guide was developed by Monkey Exchange Team
87
+ * MIT Licence
88
+ ************************* */
63
89
  class MonkeyIconsService {
64
90
  constructor() {
65
91
  this._sanitizer = inject(DomSanitizer);
@@ -91,6 +117,12 @@ class MonkeyIconsService {
91
117
  get loading() {
92
118
  return this.handleTrust(`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_ajPY{transform-origin:center;animation:spinner_AtaB .75s infinite linear}@keyframes spinner_AtaB{100%{transform:rotate(360deg)}}</style><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_ajPY"/></svg>`);
93
119
  }
120
+ get searchFail() {
121
+ return this.handleTrust('<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M18.934 11.467v0c0 4.124-3.343 7.467-7.467 7.467v0C7.343 18.934 4 15.591 4 11.467v0C4 7.343 7.343 4 11.467 4v0c4.124 0 7.467 3.343 7.467 7.467Z" stroke="var(--mecx-color-gray-900)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="m20 20-3.25-3.25M13.815 9.11914 9.119 13.8151M13.815 13.8151 9.119 9.11914" stroke="var(--mecx-color-gray-900)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
122
+ }
123
+ get search() {
124
+ return this.handleTrust('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.920 1.521 C 4.175 1.717,1.944 3.809,1.558 6.548 C 1.500 6.965,1.500 7.722,1.558 8.120 C 1.945 10.745,3.921 12.721,6.547 13.108 C 6.735 13.136,7.016 13.152,7.333 13.152 C 7.885 13.152,8.225 13.111,8.738 12.985 C 9.504 12.797,10.253 12.439,10.859 11.972 C 10.972 11.885,11.074 11.813,11.085 11.813 C 11.097 11.813,11.677 12.384,12.373 13.082 C 13.070 13.779,13.691 14.381,13.754 14.418 C 14.182 14.673,14.673 14.182,14.418 13.754 C 14.381 13.691,13.779 13.070,13.082 12.373 C 12.384 11.677,11.813 11.097,11.813 11.085 C 11.813 11.074,11.885 10.972,11.972 10.859 C 12.439 10.253,12.797 9.504,12.985 8.738 C 13.111 8.225,13.152 7.885,13.152 7.333 C 13.152 6.782,13.111 6.441,12.985 5.928 C 12.471 3.841,10.826 2.196,8.738 1.681 C 8.150 1.536,7.501 1.479,6.920 1.521 M8.277 2.586 C 10.023 2.962,11.414 4.208,11.943 5.870 C 12.118 6.421,12.145 6.615,12.145 7.333 C 12.145 8.052,12.118 8.246,11.943 8.797 C 11.473 10.272,10.272 11.473,8.797 11.943 C 8.246 12.118,8.052 12.145,7.333 12.145 C 6.615 12.145,6.421 12.118,5.870 11.943 C 4.394 11.473,3.193 10.272,2.724 8.797 C 2.547 8.242,2.521 8.052,2.522 7.333 C 2.522 6.615,2.549 6.419,2.724 5.870 C 3.244 4.236,4.636 2.971,6.320 2.602 C 6.679 2.523,6.858 2.510,7.440 2.520 C 7.898 2.527,8.066 2.540,8.277 2.586 " stroke="none" fill-rule="evenodd" fill="var(--mecx-color-gray-900)"></path></svg>');
125
+ }
94
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
95
127
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, providedIn: 'root' }); }
96
128
  }
@@ -176,6 +208,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
176
208
  type: Injectable
177
209
  }], ctorParameters: () => [{ type: i1.Overlay }] });
178
210
 
211
+ /** ************************
212
+ * Copyright Monkey Exchange. All Rights Reserved
213
+ * This style guide was developed by Monkey Exchange Team
214
+ * MIT Licence
215
+ ************************* */
216
+
179
217
  /** ************************
180
218
  * Copyright Monkey Exchange. All Rights Reserved
181
219
  * This style guide was developed by Monkey Exchange Team
@@ -271,6 +309,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
271
309
  type: Input
272
310
  }] } });
273
311
 
312
+ /** ************************
313
+ * Copyright Monkey Exchange. All Rights Reserved
314
+ * This style guide was developed by Monkey Exchange Team
315
+ * MIT Licence
316
+ ************************* */
317
+
318
+ /** ************************
319
+ * Copyright Monkey Exchange. All Rights Reserved
320
+ * This style guide was developed by Monkey Exchange Team
321
+ * MIT Licence
322
+ ************************* */
323
+ class MonkeyActionBarComponent {
324
+ constructor() {
325
+ this.label = input();
326
+ this.position = input();
327
+ this.open = input();
328
+ }
329
+ get classes() {
330
+ return this.position();
331
+ }
332
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyActionBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
333
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyActionBarComponent, isStandalone: true, selector: "monkey-action-bar", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-action-bar" }, properties: { "attr.id": "id", "id": "id", "class.open": "open()", "class": "this.classes" } }, ngImport: i0, template: `@if (open()) {
334
+ <span style="font-size: 13px" data-testid="label" *ngIf="label() as lb">
335
+ {{ lb }}
336
+ </span>
337
+
338
+ <ng-content></ng-content>
339
+ }`, isInline: true, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px #2f32373d,0 8px 8px #2f323705,0 16px 16px 8px #2f323729}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
340
+ }
341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyActionBarComponent, decorators: [{
342
+ type: Component,
343
+ args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-action-bar', standalone: true, template: `@if (open()) {
344
+ <span style="font-size: 13px" data-testid="label" *ngIf="label() as lb">
345
+ {{ lb }}
346
+ </span>
347
+
348
+ <ng-content></ng-content>
349
+ }`, host: {
350
+ 'data-testid': 'monkey-action-bar',
351
+ '[attr.id]': 'id',
352
+ '[id]': 'id',
353
+ '[class.open]': 'open()'
354
+ }, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px #2f32373d,0 8px 8px #2f323705,0 16px 16px 8px #2f323729}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"] }]
355
+ }], propDecorators: { classes: [{
356
+ type: HostBinding,
357
+ args: ['class']
358
+ }] } });
359
+
360
+ /** ************************
361
+ * Copyright Monkey Exchange. All Rights Reserved
362
+ * This style guide was developed by Monkey Exchange Team
363
+ * MIT Licence
364
+ ************************* */
365
+
274
366
  /** ************************
275
367
  * Copyright Monkey Exchange. All Rights Reserved
276
368
  * This style guide was developed by Monkey Exchange Team
@@ -301,15 +393,15 @@ class MonkeyIconComponent {
301
393
  }
302
394
  }
303
395
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
304
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconComponent, isStandalone: true, selector: "monkey-icon", inputs: { icon: "icon", size: "size", id: "id" }, host: { properties: { "class": "_icon+' '+size", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "", styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
396
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconComponent, isStandalone: true, selector: "monkey-icon", inputs: { icon: "icon", size: "size", id: "id" }, host: { properties: { "class": "_icon+' '+size", "attr.id": "id", "id": "id" } }, ngImport: i0, template: '', isInline: true, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
305
397
  }
306
398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, decorators: [{
307
399
  type: Component,
308
- args: [{ selector: 'monkey-icon', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, host: {
400
+ args: [{ selector: 'monkey-icon', standalone: true, imports: [CommonModule], template: '', encapsulation: ViewEncapsulation.None, host: {
309
401
  '[class]': `_icon+' '+size`,
310
402
  '[attr.id]': 'id',
311
403
  '[id]': 'id'
312
- }, template: "", styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"] }]
404
+ }, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"] }]
313
405
  }], ctorParameters: () => [], propDecorators: { icon: [{
314
406
  type: Input
315
407
  }], size: [{
@@ -318,6 +410,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
318
410
  type: Input
319
411
  }] } });
320
412
 
413
+ /** ************************
414
+ * Copyright Monkey Exchange. All Rights Reserved
415
+ * This style guide was developed by Monkey Exchange Team
416
+ * MIT Licence
417
+ ************************* */
418
+
321
419
  /** ************************
322
420
  * Copyright Monkey Exchange. All Rights Reserved
323
421
  * This style guide was developed by Monkey Exchange Team
@@ -351,7 +449,7 @@ class MonkeyAlertComponent {
351
449
  return typeIcons[type];
352
450
  }
353
451
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
354
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyAlertComponent, isStandalone: true, selector: "monkey-alert", inputs: { buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onButtonClicked: "onButtonClicked" }, host: { attributes: { "data-testid": "monkey-alert" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div [class]=\"'monkey-alert__card ' + type()\">\n @if (type()) {\n <monkey-icon size=\"lg\" [class]=\"'monkey-alert__card__type-' + type()\" [icon]=\"icon(type())\" />\n }\n <div class=\"monkey-alert__card__content\">\n <h4 class=\"monkey-alert__card__title\">{{ title() }}</h4>\n <h5 class=\"monkey-alert__card__message\">{{ message() }}</h5>\n @if (buttonLabel()) {\n <div>\n <a class=\"monkey-alert__card__link\" (click)=\"onButtonClicked.emit()\">\n {{ buttonLabel() }}\n </a>\n </div>\n }\n </div>\n</div>\n", styles: ["monkey-alert{display:flex}monkey-alert .monkey-alert__card{border-radius:8px;display:flex;gap:8px;padding:24px}monkey-alert .monkey-alert__card.alert{background-color:#fff8eb;border:solid 2px var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.alert>.mk-i{color:var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.default{background-color:var(--mecx-color-gray-50);border:solid 2px var(--mecx-color-gray-400)}monkey-alert .monkey-alert__card.default>.mk-i{color:var(--mecx-color-gray-900)}monkey-alert .monkey-alert__card.error{background-color:#ffecec;border:solid 2px #fa3838}monkey-alert .monkey-alert__card.error>.mk-i{color:var(--mecx-color-error-700)}monkey-alert .monkey-alert__card.info{background-color:var(--mecx-color-question-100);border:solid 2px var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.info>.mk-i{color:var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.success{background-color:#f5fffb;border:solid 2px var(--mecx-color-success-500)}monkey-alert .monkey-alert__card.success>.mk-i{color:var(--mecx-color-success-500)}monkey-alert .monkey-alert__card__content{display:flex;flex-direction:column;gap:8px}monkey-alert .monkey-alert__card__title{color:var(--mecx-color-gray-900);font-size:18px;font-weight:400;letter-spacing:.54px;line-height:24px}monkey-alert .monkey-alert__card__message{color:var(--mecx-color-gray-700);font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px}monkey-alert .monkey-alert__card__link{color:var(--mecx-color-gray-900);cursor:pointer;font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px;text-decoration:underline}\n"], dependencies: [{ kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
452
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyAlertComponent, isStandalone: true, selector: "monkey-alert", inputs: { buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onButtonClicked: "onButtonClicked" }, host: { attributes: { "data-testid": "monkey-alert" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div [class]=\"'monkey-alert__card ' + type()\">\n @if (type()) {\n <monkey-icon size=\"lg\" [class]=\"'monkey-alert__card__type-' + type()\" [icon]=\"icon(type())\" />\n }\n <div class=\"monkey-alert__card__content\">\n <h4 class=\"monkey-alert__card__title\">{{ title() }}</h4>\n <h5 class=\"monkey-alert__card__message\">{{ message() }}</h5>\n @if (buttonLabel()) {\n <div>\n <a class=\"monkey-alert__card__link\" (click)=\"onButtonClicked.emit()\">\n {{ buttonLabel() }}\n </a>\n </div>\n }\n </div>\n</div>\n", styles: ["monkey-alert{display:flex}monkey-alert .monkey-alert__card{border-radius:8px;display:flex;gap:8px;padding:24px}monkey-alert .monkey-alert__card.alert{background-color:var(--mecx-color-warning-100);border:solid 2px var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.alert>.mk-i{color:var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.default{background-color:var(--mecx-color-gray-50);border:solid 2px var(--mecx-color-gray-400)}monkey-alert .monkey-alert__card.default>.mk-i{color:var(--mecx-color-gray-900)}monkey-alert .monkey-alert__card.error{background-color:var(--mecx-color-error-100);border:solid 2px var(--mecx-color-error-500)}monkey-alert .monkey-alert__card.error>.mk-i{color:var(--mecx-color-error-500)}monkey-alert .monkey-alert__card.info{background-color:var(--mecx-color-question-100);border:solid 2px var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.info>.mk-i{color:var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.success{background-color:var(--mecx-color-success-100);border:solid 2px var(--mecx-color-success-500)}monkey-alert .monkey-alert__card.success>.mk-i{color:var(--mecx-color-success-500)}monkey-alert .monkey-alert__card__content{display:flex;flex-direction:column;gap:8px}monkey-alert .monkey-alert__card__title{color:var(--mecx-color-gray-900);font-size:18px;font-weight:400;letter-spacing:.54px;line-height:24px}monkey-alert .monkey-alert__card__message{color:var(--mecx-color-gray-700);font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px}monkey-alert .monkey-alert__card__link{color:var(--mecx-color-gray-900);cursor:pointer;font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px;text-decoration:underline}\n"], dependencies: [{ kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
355
453
  }
356
454
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAlertComponent, decorators: [{
357
455
  type: Component,
@@ -359,11 +457,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
359
457
  'data-testid': 'monkey-alert',
360
458
  '[attr.id]': 'id',
361
459
  '[id]': 'id'
362
- }, template: "<div [class]=\"'monkey-alert__card ' + type()\">\n @if (type()) {\n <monkey-icon size=\"lg\" [class]=\"'monkey-alert__card__type-' + type()\" [icon]=\"icon(type())\" />\n }\n <div class=\"monkey-alert__card__content\">\n <h4 class=\"monkey-alert__card__title\">{{ title() }}</h4>\n <h5 class=\"monkey-alert__card__message\">{{ message() }}</h5>\n @if (buttonLabel()) {\n <div>\n <a class=\"monkey-alert__card__link\" (click)=\"onButtonClicked.emit()\">\n {{ buttonLabel() }}\n </a>\n </div>\n }\n </div>\n</div>\n", styles: ["monkey-alert{display:flex}monkey-alert .monkey-alert__card{border-radius:8px;display:flex;gap:8px;padding:24px}monkey-alert .monkey-alert__card.alert{background-color:#fff8eb;border:solid 2px var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.alert>.mk-i{color:var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.default{background-color:var(--mecx-color-gray-50);border:solid 2px var(--mecx-color-gray-400)}monkey-alert .monkey-alert__card.default>.mk-i{color:var(--mecx-color-gray-900)}monkey-alert .monkey-alert__card.error{background-color:#ffecec;border:solid 2px #fa3838}monkey-alert .monkey-alert__card.error>.mk-i{color:var(--mecx-color-error-700)}monkey-alert .monkey-alert__card.info{background-color:var(--mecx-color-question-100);border:solid 2px var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.info>.mk-i{color:var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.success{background-color:#f5fffb;border:solid 2px var(--mecx-color-success-500)}monkey-alert .monkey-alert__card.success>.mk-i{color:var(--mecx-color-success-500)}monkey-alert .monkey-alert__card__content{display:flex;flex-direction:column;gap:8px}monkey-alert .monkey-alert__card__title{color:var(--mecx-color-gray-900);font-size:18px;font-weight:400;letter-spacing:.54px;line-height:24px}monkey-alert .monkey-alert__card__message{color:var(--mecx-color-gray-700);font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px}monkey-alert .monkey-alert__card__link{color:var(--mecx-color-gray-900);cursor:pointer;font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px;text-decoration:underline}\n"] }]
460
+ }, template: "<div [class]=\"'monkey-alert__card ' + type()\">\n @if (type()) {\n <monkey-icon size=\"lg\" [class]=\"'monkey-alert__card__type-' + type()\" [icon]=\"icon(type())\" />\n }\n <div class=\"monkey-alert__card__content\">\n <h4 class=\"monkey-alert__card__title\">{{ title() }}</h4>\n <h5 class=\"monkey-alert__card__message\">{{ message() }}</h5>\n @if (buttonLabel()) {\n <div>\n <a class=\"monkey-alert__card__link\" (click)=\"onButtonClicked.emit()\">\n {{ buttonLabel() }}\n </a>\n </div>\n }\n </div>\n</div>\n", styles: ["monkey-alert{display:flex}monkey-alert .monkey-alert__card{border-radius:8px;display:flex;gap:8px;padding:24px}monkey-alert .monkey-alert__card.alert{background-color:var(--mecx-color-warning-100);border:solid 2px var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.alert>.mk-i{color:var(--mecx-color-warning-500)}monkey-alert .monkey-alert__card.default{background-color:var(--mecx-color-gray-50);border:solid 2px var(--mecx-color-gray-400)}monkey-alert .monkey-alert__card.default>.mk-i{color:var(--mecx-color-gray-900)}monkey-alert .monkey-alert__card.error{background-color:var(--mecx-color-error-100);border:solid 2px var(--mecx-color-error-500)}monkey-alert .monkey-alert__card.error>.mk-i{color:var(--mecx-color-error-500)}monkey-alert .monkey-alert__card.info{background-color:var(--mecx-color-question-100);border:solid 2px var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.info>.mk-i{color:var(--mecx-color-question-500)}monkey-alert .monkey-alert__card.success{background-color:var(--mecx-color-success-100);border:solid 2px var(--mecx-color-success-500)}monkey-alert .monkey-alert__card.success>.mk-i{color:var(--mecx-color-success-500)}monkey-alert .monkey-alert__card__content{display:flex;flex-direction:column;gap:8px}monkey-alert .monkey-alert__card__title{color:var(--mecx-color-gray-900);font-size:18px;font-weight:400;letter-spacing:.54px;line-height:24px}monkey-alert .monkey-alert__card__message{color:var(--mecx-color-gray-700);font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px}monkey-alert .monkey-alert__card__link{color:var(--mecx-color-gray-900);cursor:pointer;font-size:14px;font-weight:400;letter-spacing:.42px;line-height:24px;text-decoration:underline}\n"] }]
363
461
  }], ctorParameters: () => [], propDecorators: { id: [{
364
462
  type: Input
365
463
  }] } });
366
464
 
465
+ /** ************************
466
+ * Copyright Monkey Exchange. All Rights Reserved
467
+ * This style guide was developed by Monkey Exchange Team
468
+ * MIT Licence
469
+ ************************* */
470
+
471
+ /** ************************
472
+ * Copyright Monkey Exchange. All Rights Reserved
473
+ * This style guide was developed by Monkey Exchange Team
474
+ * MIT Licence
475
+ ************************* */
476
+ class MonkeyAvatarComponent {
477
+ constructor() {
478
+ this._id = inject(IdGenerator).getId('monkey-avatar-');
479
+ this.size = input('xs');
480
+ this.src = input.required();
481
+ this.id = input();
482
+ this.avatar = '?';
483
+ this.avatarType = 'name';
484
+ effect(() => {
485
+ this._id = this.id() || this._id;
486
+ this.handleAvatarType();
487
+ });
488
+ }
489
+ getInitial(text) {
490
+ return text.toUpperCase()[0];
491
+ }
492
+ handleAvatarType() {
493
+ const { getInitial, src } = this;
494
+ const value = src();
495
+ if (objHaveProperty(value, 'iconName')) {
496
+ this.avatarType = 'icon';
497
+ this.avatar = value.iconName;
498
+ return;
499
+ }
500
+ if (objHaveProperty(value, 'imageUrl')) {
501
+ this.avatarType = 'image';
502
+ this.avatar = value.imageUrl;
503
+ return;
504
+ }
505
+ if (objHaveProperty(value, 'name')) {
506
+ this.avatarType = 'name';
507
+ this.avatar = getInitial(value.name);
508
+ }
509
+ }
510
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
511
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyAvatarComponent, isStandalone: true, selector: "monkey-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-avatar" }, properties: { "attr.id": "_id", "id": "_id" } }, ngImport: i0, template: "<div class=\"monkey-avatar\" [class]=\"size()\">\n @switch (avatarType) {\n @case ('name') {\n <p [class]=\"size()\">{{ avatar }}</p>\n }\n\n @case ('icon') {\n <monkey-icon [icon]=\"avatar\" [size]=\"size()\" />\n }\n\n @case ('image') {\n <img loading=\"lazy\" [alt]=\"'Avatar ' + avatarType\" [class]=\"size()\" [src]=\"avatar\" />\n }\n }\n</div>\n", styles: [".monkey-avatar{align-items:center;background:#f1f2f3;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.monkey-avatar.xs{height:24px;width:24px}.monkey-avatar.sm{height:32px;width:32px}.monkey-avatar.md{border-radius:8px;height:40px;width:40px}.monkey-avatar.lg{border-radius:12px;height:48px;width:48px}.monkey-avatar p{font-style:normal;font-weight:400;letter-spacing:.26px;line-height:16px}.monkey-avatar p.xs{font-size:16px}.monkey-avatar p.sm{font-size:18px}.monkey-avatar p.md{font-size:20px}.monkey-avatar p.lg{font-size:22px}.monkey-avatar img{border-radius:4px;height:auto}.monkey-avatar img.xs{width:24px}.monkey-avatar img.sm{width:32px}.monkey-avatar img.md{border-radius:8px;width:40px}.monkey-avatar img.lg{border-radius:12px;width:48px}\n"], dependencies: [{ kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }] }); }
512
+ }
513
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAvatarComponent, decorators: [{
514
+ type: Component,
515
+ args: [{ imports: [MonkeyIconComponent], selector: 'monkey-avatar', standalone: true, host: {
516
+ 'data-testid': 'monkey-avatar',
517
+ '[attr.id]': '_id',
518
+ '[id]': '_id'
519
+ }, template: "<div class=\"monkey-avatar\" [class]=\"size()\">\n @switch (avatarType) {\n @case ('name') {\n <p [class]=\"size()\">{{ avatar }}</p>\n }\n\n @case ('icon') {\n <monkey-icon [icon]=\"avatar\" [size]=\"size()\" />\n }\n\n @case ('image') {\n <img loading=\"lazy\" [alt]=\"'Avatar ' + avatarType\" [class]=\"size()\" [src]=\"avatar\" />\n }\n }\n</div>\n", styles: [".monkey-avatar{align-items:center;background:#f1f2f3;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.monkey-avatar.xs{height:24px;width:24px}.monkey-avatar.sm{height:32px;width:32px}.monkey-avatar.md{border-radius:8px;height:40px;width:40px}.monkey-avatar.lg{border-radius:12px;height:48px;width:48px}.monkey-avatar p{font-style:normal;font-weight:400;letter-spacing:.26px;line-height:16px}.monkey-avatar p.xs{font-size:16px}.monkey-avatar p.sm{font-size:18px}.monkey-avatar p.md{font-size:20px}.monkey-avatar p.lg{font-size:22px}.monkey-avatar img{border-radius:4px;height:auto}.monkey-avatar img.xs{width:24px}.monkey-avatar img.sm{width:32px}.monkey-avatar img.md{border-radius:8px;width:40px}.monkey-avatar img.lg{border-radius:12px;width:48px}\n"] }]
520
+ }], ctorParameters: () => [] });
521
+
522
+ /** ************************
523
+ * Copyright Monkey Exchange. All Rights Reserved
524
+ * This style guide was developed by Monkey Exchange Team
525
+ * MIT Licence
526
+ ************************* */
527
+
528
+ /** ************************
529
+ * Copyright Monkey Exchange. All Rights Reserved
530
+ * This style guide was developed by Monkey Exchange Team
531
+ * MIT Licence
532
+ ************************* */
533
+ class MonkeyBadgeComponent {
534
+ constructor() {
535
+ this.idGenerator = inject(IdGenerator);
536
+ this.id = this.idGenerator.getId('monkey-badge-');
537
+ this.hostVariables = {};
538
+ this.size = 'sm';
539
+ this.largePadding = false;
540
+ this.icon = '';
541
+ this.text = '';
542
+ }
543
+ set type(value) {
544
+ const styles = {
545
+ success: { background: '#F5FFFB', color: '#005236' },
546
+ alert: { background: '#FFF8EB', color: '#1F2024' },
547
+ error: { background: '#FFECEC', color: '#DB0505' },
548
+ info: { background: '#F4EBFF', color: '#2D0264' },
549
+ default: { background: '#f8fafb', color: '#1f2024' }
550
+ }[value];
551
+ this.hostVariables = {
552
+ '--monkey-badge-background': styles?.background,
553
+ '--monkey-badge-color': styles?.color
554
+ };
555
+ }
556
+ set typeColors(value) {
557
+ if (value) {
558
+ this.hostVariables = {
559
+ '--monkey-badge-background': value?.background,
560
+ '--monkey-badge-color': value?.color
561
+ };
562
+ }
563
+ }
564
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
565
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyBadgeComponent, isStandalone: true, selector: "monkey-badge", inputs: { type: "type", typeColors: "typeColors", size: "size", largePadding: ["largePadding", "largePadding", booleanAttribute], icon: "icon", text: "text" }, host: { attributes: { "data-testid": "monkey-badge" }, properties: { "attr.id": "id", "style": "this.hostVariables", "class": "this.size", "class.large-padding": "this.largePadding" } }, ngImport: i0, template: "@if (text) {\n @if (icon) {\n <monkey-icon class=\"icon\" [icon]=\"icon\"></monkey-icon>\n }\n <span>\n {{ text }}\n </span>\n} @else {\n <ng-content></ng-content>\n}\n", styles: [":host{gap:4px;display:inline-flex;font-weight:500;padding:8px 12px;border-radius:8px;align-items:start;font-style:normal;letter-spacing:.24px;color:var(--monkey-badge-color, #1f2024);background-color:var(--monkey-badge-background, #f8fafb)}:host.large-padding{padding:12px 16px}:host.sm{font-size:12px;line-height:16px}:host.sm .icon{font-size:16px}:host.md{font-size:16px;line-height:20px}:host.md .icon{font-size:20px}:host.lg{font-size:20px;line-height:24px}:host.lg .icon{font-size:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }] }); }
566
+ }
567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBadgeComponent, decorators: [{
568
+ type: Component,
569
+ args: [{ selector: 'monkey-badge', standalone: true, imports: [CommonModule, MonkeyIconComponent], host: {
570
+ 'data-testid': 'monkey-badge',
571
+ '[attr.id]': 'id'
572
+ }, template: "@if (text) {\n @if (icon) {\n <monkey-icon class=\"icon\" [icon]=\"icon\"></monkey-icon>\n }\n <span>\n {{ text }}\n </span>\n} @else {\n <ng-content></ng-content>\n}\n", styles: [":host{gap:4px;display:inline-flex;font-weight:500;padding:8px 12px;border-radius:8px;align-items:start;font-style:normal;letter-spacing:.24px;color:var(--monkey-badge-color, #1f2024);background-color:var(--monkey-badge-background, #f8fafb)}:host.large-padding{padding:12px 16px}:host.sm{font-size:12px;line-height:16px}:host.sm .icon{font-size:16px}:host.md{font-size:16px;line-height:20px}:host.md .icon{font-size:20px}:host.lg{font-size:20px;line-height:24px}:host.lg .icon{font-size:24px}\n"] }]
573
+ }], propDecorators: { hostVariables: [{
574
+ type: HostBinding,
575
+ args: ['style']
576
+ }], type: [{
577
+ type: Input
578
+ }], typeColors: [{
579
+ type: Input
580
+ }], size: [{
581
+ type: HostBinding,
582
+ args: ['class']
583
+ }, {
584
+ type: Input
585
+ }], largePadding: [{
586
+ type: HostBinding,
587
+ args: ['class.large-padding']
588
+ }, {
589
+ type: Input,
590
+ args: [{ transform: booleanAttribute }]
591
+ }], icon: [{
592
+ type: Input
593
+ }], text: [{
594
+ type: Input
595
+ }] } });
596
+
597
+ /** ************************
598
+ * Copyright Monkey Exchange. All Rights Reserved
599
+ * This style guide was developed by Monkey Exchange Team
600
+ * MIT Licence
601
+ ************************* */
602
+
367
603
  /** ************************
368
604
  * Copyright Monkey Exchange. All Rights Reserved
369
605
  * This style guide was developed by Monkey Exchange Team
@@ -414,6 +650,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
414
650
  type: Input
415
651
  }] } });
416
652
 
653
+ /** ************************
654
+ * Copyright Monkey Exchange. All Rights Reserved
655
+ * This style guide was developed by Monkey Exchange Team
656
+ * MIT Licence
657
+ ************************* */
658
+
417
659
  /** ************************
418
660
  * Copyright Monkey Exchange. All Rights Reserved
419
661
  * This style guide was developed by Monkey Exchange Team
@@ -463,6 +705,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
463
705
  args: ['click', ['$event']]
464
706
  }] } });
465
707
 
708
+ /** ************************
709
+ * Copyright Monkey Exchange. All Rights Reserved
710
+ * This style guide was developed by Monkey Exchange Team
711
+ * MIT Licence
712
+ ************************* */
713
+
714
+ /** ************************
715
+ * Copyright Monkey Exchange. All Rights Reserved
716
+ * This style guide was developed by Monkey Exchange Team
717
+ * MIT Licence
718
+ ************************* */
719
+ class MonkeyBadgeDirective {
720
+ constructor(el, renderer) {
721
+ this.el = el;
722
+ this.renderer = renderer;
723
+ this.badgePosition = 'right';
724
+ this.badgeSize = 'md';
725
+ this.badgeHidden = false;
726
+ this.monkeyBadge = '';
727
+ this.badgeBackground = null;
728
+ this.badgeColor = null;
729
+ this.badgeEl = null;
730
+ // not to do
731
+ }
732
+ ngOnChanges() {
733
+ const { badgeHidden, badgeEl, renderer, el } = this;
734
+ if (badgeHidden) {
735
+ this.removeBadge();
736
+ return;
737
+ }
738
+ if (!badgeEl) {
739
+ this.badgeEl = renderer.createElement('span');
740
+ renderer.setStyle(el.nativeElement, 'position', 'relative');
741
+ renderer.appendChild(el.nativeElement, this.badgeEl);
742
+ }
743
+ this.updateBadge();
744
+ }
745
+ updateBadge() {
746
+ const { badgeEl, renderer, monkeyBadge, badgeSize, badgeColor, badgePosition, badgeBackground } = this;
747
+ renderer.addClass(badgeEl, 'monkey-badge');
748
+ renderer.addClass(badgeEl, `monkey-badge-${badgeSize}`);
749
+ renderer.addClass(badgeEl, `monkey-badge-${badgePosition}`);
750
+ renderer.setAttribute(badgeEl, 'style', `
751
+ --badge-background: ${badgeBackground ?? 'unset'};
752
+ --badge-color: ${badgeColor ?? 'unset'}
753
+ `);
754
+ this.renderer.setProperty(this.badgeEl, 'textContent', monkeyBadge);
755
+ }
756
+ removeBadge() {
757
+ const { renderer, el, badgeEl } = this;
758
+ if (!el.nativeElement || !badgeEl)
759
+ return;
760
+ renderer.removeChild(el.nativeElement, badgeEl);
761
+ renderer.removeStyle(el.nativeElement, 'position');
762
+ this.badgeEl = null;
763
+ }
764
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBadgeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
765
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyBadgeDirective, selector: "[monkeyBadge]", inputs: { badgePosition: "badgePosition", badgeSize: "badgeSize", badgeHidden: "badgeHidden", monkeyBadge: "monkeyBadge", badgeBackground: "badgeBackground", badgeColor: "badgeColor" }, usesOnChanges: true, ngImport: i0 }); }
766
+ }
767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBadgeDirective, decorators: [{
768
+ type: Directive,
769
+ args: [{
770
+ selector: '[monkeyBadge]'
771
+ }]
772
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { badgePosition: [{
773
+ type: Input
774
+ }], badgeSize: [{
775
+ type: Input
776
+ }], badgeHidden: [{
777
+ type: Input
778
+ }], monkeyBadge: [{
779
+ type: Input
780
+ }], badgeBackground: [{
781
+ type: Input
782
+ }], badgeColor: [{
783
+ type: Input
784
+ }] } });
785
+
466
786
  /** ************************
467
787
  * Copyright Monkey Exchange. All Rights Reserved
468
788
  * This style guide was developed by Monkey Exchange Team
@@ -591,17 +911,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
591
911
  ************************* */
592
912
  class MonkeyDirectivesModule {
593
913
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
594
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyError, MonkeyHelper, MonkeyInfo, MonkeyLabel, MonkeyPrefix, MonkeySuffix], exports: [MonkeyError, MonkeyHelper, MonkeyInfo, MonkeyLabel, MonkeyPrefix, MonkeySuffix] }); }
914
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyError,
915
+ MonkeyHelper,
916
+ MonkeyInfo,
917
+ MonkeyLabel,
918
+ MonkeyPrefix,
919
+ MonkeySuffix,
920
+ MonkeyBadgeDirective], exports: [MonkeyError,
921
+ MonkeyHelper,
922
+ MonkeyInfo,
923
+ MonkeyLabel,
924
+ MonkeyPrefix,
925
+ MonkeySuffix,
926
+ MonkeyBadgeDirective] }); }
595
927
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule }); }
596
928
  }
597
929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, decorators: [{
598
930
  type: NgModule,
599
931
  args: [{
600
- declarations: [MonkeyError, MonkeyHelper, MonkeyInfo, MonkeyLabel, MonkeyPrefix, MonkeySuffix],
601
- exports: [MonkeyError, MonkeyHelper, MonkeyInfo, MonkeyLabel, MonkeyPrefix, MonkeySuffix]
932
+ declarations: [
933
+ MonkeyError,
934
+ MonkeyHelper,
935
+ MonkeyInfo,
936
+ MonkeyLabel,
937
+ MonkeyPrefix,
938
+ MonkeySuffix,
939
+ MonkeyBadgeDirective
940
+ ],
941
+ exports: [
942
+ MonkeyError,
943
+ MonkeyHelper,
944
+ MonkeyInfo,
945
+ MonkeyLabel,
946
+ MonkeyPrefix,
947
+ MonkeySuffix,
948
+ MonkeyBadgeDirective
949
+ ]
602
950
  }]
603
951
  }] });
604
952
 
953
+ /** ************************
954
+ * Copyright Monkey Exchange. All Rights Reserved
955
+ * This style guide was developed by Monkey Exchange Team
956
+ * MIT Licence
957
+ ************************* */
605
958
  class MonkeyCheckboxComponent {
606
959
  constructor() {
607
960
  this.disabled = false;
@@ -610,7 +963,7 @@ class MonkeyCheckboxComponent {
610
963
  this.showFooter = true;
611
964
  this.size = 'md';
612
965
  this.onChange = new EventEmitter();
613
- this._destroyed = inject(MonkeyDestroyService);
966
+ this._destroyRef = inject(DestroyRef);
614
967
  this.icons = inject(MonkeyIconsService);
615
968
  this.idGenerator = inject(IdGenerator);
616
969
  this.injector = inject(Injector);
@@ -652,7 +1005,7 @@ class MonkeyCheckboxComponent {
652
1005
  }
653
1006
  else if (ngControl instanceof FormControlName) {
654
1007
  this.control = this.injector.get(FormGroupDirective).getControl(ngControl);
655
- this.control.statusChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
1008
+ this.control.statusChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
656
1009
  this.cdr.markForCheck();
657
1010
  });
658
1011
  }
@@ -717,8 +1070,7 @@ class MonkeyCheckboxComponent {
717
1070
  // eslint-disable-next-line no-use-before-define
718
1071
  useExisting: MonkeyCheckboxComponent,
719
1072
  multi: true
720
- },
721
- MonkeyDestroyService
1073
+ }
722
1074
  ], queries: [{ propertyName: "infoChildren", predicate: MonkeyInfo, descendants: true }, { propertyName: "labelChildren", predicate: MonkeyLabel, descendants: true }, { propertyName: "helperChildren", predicate: MonkeyHelper, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconIndeterminate\"></div>\n } @else if (value) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconCheck\"></div>\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:#fff;border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], animations: [
723
1075
  trigger('iconAnimation', [
724
1076
  transition(':enter', [
@@ -767,8 +1119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
767
1119
  // eslint-disable-next-line no-use-before-define
768
1120
  useExisting: MonkeyCheckboxComponent,
769
1121
  multi: true
770
- },
771
- MonkeyDestroyService
1122
+ }
772
1123
  ], host: {
773
1124
  'data-testid': 'input-checkbox',
774
1125
  class: 'mecx-checkbox',
@@ -815,41 +1166,227 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
815
1166
  * This style guide was developed by Monkey Exchange Team
816
1167
  * MIT Licence
817
1168
  ************************* */
818
- class MonkeyDividerComponent {
819
- get classes() {
820
- return `${this.size()} ${this.vertical() ? 'vertical' : ''}`;
821
- }
822
- get id() {
823
- return this._id;
824
- }
825
- set id(value) {
826
- this._id = value || this._uid;
827
- }
1169
+
1170
+ const MECX_I18N_WRAPPER = new InjectionToken('');
1171
+
1172
+ /* eslint-disable no-console */
1173
+ /** ************************
1174
+ * Copyright Monkey Exchange. All Rights Reserved
1175
+ * This style guide was developed by Monkey Exchange Team
1176
+ * MIT Licence
1177
+ ************************* */
1178
+ class MonkeyDictionaryService {
828
1179
  constructor() {
829
- this.size = input('sm');
830
- this.vertical = input(false, {
831
- transform: booleanAttribute
1180
+ this._localeId = inject(LOCALE_ID);
1181
+ this._destroyRef = inject(DestroyRef);
1182
+ this._data$ = new BehaviorSubject({
1183
+ 'pt-BR': {
1184
+ 'NO-RESULTS': 'Nenhum resultado encontrado',
1185
+ 'NO-DATA': 'Sem dados',
1186
+ LOADING: 'Carregando...',
1187
+ 'DATE-RANGE': {
1188
+ 'START-DATE': 'Data de início',
1189
+ 'END-DATE': 'Data de término',
1190
+ INVALID: 'Intervalo de datas inválido',
1191
+ ACTIONS: {
1192
+ CANCEL: 'Cancelar',
1193
+ APPLY: 'Aplicar'
1194
+ },
1195
+ 'WEEK-DAYS': ['Dom.', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sab.'],
1196
+ MONTHS: {
1197
+ 0: 'Janeiro',
1198
+ 1: 'Fevereiro',
1199
+ 2: 'Março',
1200
+ 3: 'Abril',
1201
+ 4: 'Maio',
1202
+ 5: 'Junho',
1203
+ 6: 'Julho',
1204
+ 7: 'Agosto',
1205
+ 8: 'Setembro',
1206
+ 9: 'Outubro',
1207
+ 10: 'Novembro',
1208
+ 11: 'Dezembro'
1209
+ },
1210
+ 'QUICK-ACTIONS': {
1211
+ CUSTOM: 'Customizado',
1212
+ LAST_30_DAYS: 'Ultimos 30 dias',
1213
+ LAST_60_DAYS: 'Ultimos 60 dias',
1214
+ LAST_90_DAYS: 'Ultimos 90 dias',
1215
+ LAST_6_MONTHS: 'Ultimos 6 meses',
1216
+ LAST_12_MONTHS: 'Ultimos 12 meses',
1217
+ NEXT_30_DAYS: 'Próximos 30 dias',
1218
+ NEXT_60_DAYS: 'Próximos 60 dias',
1219
+ NEXT_90_DAYS: 'Próximos 90 dias',
1220
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1221
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1222
+ }
1223
+ }
1224
+ },
1225
+ 'es-CL': {
1226
+ 'NO-RESULTS': 'No se encontraron resultados',
1227
+ 'NO-DATA': 'Sin datos',
1228
+ LOADING: 'Cargando...',
1229
+ 'DATE-RANGE': {
1230
+ 'START-DATE': 'Fecha de inicio',
1231
+ 'END-DATE': 'Fecha de termino',
1232
+ INVALID: 'Rango de fechas no válido',
1233
+ ACTIONS: {
1234
+ CANCEL: 'Cancelar',
1235
+ APPLY: 'Aplicar'
1236
+ },
1237
+ 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1238
+ MONTHS: {
1239
+ 0: 'Enero',
1240
+ 1: 'Febrero',
1241
+ 2: 'Marzo',
1242
+ 3: 'Abril',
1243
+ 4: 'Mayo',
1244
+ 5: 'Junio',
1245
+ 6: 'Julio',
1246
+ 7: 'Agosto',
1247
+ 8: 'Septiembre',
1248
+ 9: 'Octubre',
1249
+ 10: 'Noviembre',
1250
+ 11: 'Diciembre'
1251
+ },
1252
+ 'QUICK-ACTIONS': {
1253
+ CUSTOM: 'Personalizado',
1254
+ LAST_30_DAYS: 'Últimos 30 días',
1255
+ LAST_60_DAYS: 'Últimos 60 días',
1256
+ LAST_90_DAYS: 'Últimos 90 días',
1257
+ LAST_6_MONTHS: 'Últimos 6 meses',
1258
+ LAST_12_MONTHS: 'Últimos 12 meses',
1259
+ NEXT_30_DAYS: 'Próximos 30 días',
1260
+ NEXT_60_DAYS: 'Próximos 60 días',
1261
+ NEXT_90_DAYS: 'Próximos 90 días',
1262
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1263
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1264
+ }
1265
+ }
1266
+ },
1267
+ 'es-MX': {
1268
+ 'NO-RESULTS': 'No se encontraron resultados',
1269
+ 'NO-DATA': 'Sin datos',
1270
+ LOADING: 'Cargando...',
1271
+ 'DATE-RANGE': {
1272
+ 'START-DATE': 'Fecha de inicio',
1273
+ 'END-DATE': 'Fecha de termino',
1274
+ INVALID: 'Rango de fechas no válido',
1275
+ ACTIONS: {
1276
+ CANCEL: 'Cancelar',
1277
+ APPLY: 'Aplicar'
1278
+ },
1279
+ 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1280
+ MONTHS: {
1281
+ 0: 'Enero',
1282
+ 1: 'Febrero',
1283
+ 2: 'Marzo',
1284
+ 3: 'Abril',
1285
+ 4: 'Mayo',
1286
+ 5: 'Junio',
1287
+ 6: 'Julio',
1288
+ 7: 'Agosto',
1289
+ 8: 'Septiembre',
1290
+ 9: 'Octubre',
1291
+ 10: 'Noviembre',
1292
+ 11: 'Diciembre'
1293
+ },
1294
+ 'QUICK-ACTIONS': {
1295
+ CUSTOM: 'Personalizado',
1296
+ LAST_30_DAYS: 'Últimos 30 días',
1297
+ LAST_60_DAYS: 'Últimos 60 días',
1298
+ LAST_90_DAYS: 'Últimos 90 días',
1299
+ LAST_6_MONTHS: 'Últimos 6 meses',
1300
+ LAST_12_MONTHS: 'Últimos 12 meses',
1301
+ NEXT_30_DAYS: 'Próximos 30 días',
1302
+ NEXT_60_DAYS: 'Próximos 60 días',
1303
+ NEXT_90_DAYS: 'Próximos 90 días',
1304
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1305
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1306
+ }
1307
+ }
1308
+ },
1309
+ 'en-US': {
1310
+ 'NO-RESULTS': 'No results found',
1311
+ 'NO-DATA': 'No data',
1312
+ LOADING: 'Loading...',
1313
+ 'DATE-RANGE': {
1314
+ 'START-DATE': 'Start date',
1315
+ 'END-DATE': 'End Date',
1316
+ INVALID: 'Invalid date range',
1317
+ ACTIONS: {
1318
+ CANCEL: 'Cancel',
1319
+ APPLY: 'Apply'
1320
+ },
1321
+ 'WEEK-DAYS': ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
1322
+ MONTHS: {
1323
+ 0: 'January',
1324
+ 1: 'February',
1325
+ 2: 'March',
1326
+ 3: 'April',
1327
+ 4: 'May',
1328
+ 5: 'June',
1329
+ 6: 'July',
1330
+ 7: 'August',
1331
+ 8: 'September',
1332
+ 9: 'October',
1333
+ 10: 'November',
1334
+ 11: 'December'
1335
+ },
1336
+ 'QUICK-ACTIONS': {
1337
+ CUSTOM: 'Custom',
1338
+ LAST_30_DAYS: 'Last 30 days',
1339
+ LAST_60_DAYS: 'Last 60 days',
1340
+ LAST_90_DAYS: 'Last 90 days',
1341
+ LAST_6_MONTHS: 'Last 6 months',
1342
+ LAST_12_MONTHS: 'Last 12 months',
1343
+ NEXT_30_DAYS: 'Next 30 days',
1344
+ NEXT_60_DAYS: 'Next 60 days',
1345
+ NEXT_90_DAYS: 'Next 90 days',
1346
+ NEXT_6_MONTHS: 'Next 6 months',
1347
+ NEXT_12_MONTHS: 'Next 12 months'
1348
+ }
1349
+ }
1350
+ }
1351
+ });
1352
+ const tokenSubject = inject(MECX_I18N_WRAPPER, { optional: true });
1353
+ tokenSubject?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
1354
+ this.handleWrapperValues(value);
832
1355
  });
833
- this._uid = inject(IdGenerator).getId('monkey-divider-');
834
- // eslint-disable-next-line no-self-assign
835
- this.id = this.id;
836
1356
  }
837
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
838
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeyDividerComponent, isStandalone: true, selector: "monkey-divider", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-divider" }, properties: { "attr.id": "id", "id": "id", "class": "this.classes" } }, ngImport: i0, template: '', isInline: true, styles: ["monkey-divider{display:flex;box-sizing:border-box;width:100%;background-color:var(--mecx-color-gray-200)}monkey-divider.lg{height:4px}monkey-divider.lg.vertical{width:4px!important}monkey-divider.md{height:2px}monkey-divider.md.vertical{width:2px!important}monkey-divider.sm{height:1px}monkey-divider.sm.vertical{width:1px!important}monkey-divider.vertical{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None }); }
1357
+ handleWrapperValues(value) {
1358
+ try {
1359
+ const locale = this._localeId || 'pt-BR';
1360
+ const wrappedData = JSON.parse(value);
1361
+ const currentData = this._data$.value;
1362
+ const updated = {
1363
+ ...currentData,
1364
+ [locale]: {
1365
+ ...currentData[locale],
1366
+ ...wrappedData
1367
+ }
1368
+ };
1369
+ this._data$.next(updated);
1370
+ }
1371
+ catch (e) {
1372
+ console.error(`MonkeyDictionaryService - handleWrapperValues -> ${e}`);
1373
+ }
1374
+ }
1375
+ get(key) {
1376
+ const locale = this._localeId || 'pt-BR';
1377
+ return this._data$.pipe(map((data) => {
1378
+ return data[locale]?.[key] ?? null;
1379
+ }));
1380
+ }
1381
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1382
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDictionaryService, providedIn: 'root' }); }
839
1383
  }
840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, decorators: [{
841
- type: Component,
842
- args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-divider', standalone: true, template: '', host: {
843
- 'data-testid': 'monkey-divider',
844
- '[attr.id]': 'id',
845
- '[id]': 'id'
846
- }, styles: ["monkey-divider{display:flex;box-sizing:border-box;width:100%;background-color:var(--mecx-color-gray-200)}monkey-divider.lg{height:4px}monkey-divider.lg.vertical{width:4px!important}monkey-divider.md{height:2px}monkey-divider.md.vertical{width:2px!important}monkey-divider.sm{height:1px}monkey-divider.sm.vertical{width:1px!important}monkey-divider.vertical{height:100%}\n"] }]
847
- }], ctorParameters: () => [], propDecorators: { classes: [{
848
- type: HostBinding,
849
- args: ['class']
850
- }], id: [{
851
- type: Input
852
- }] } });
1384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDictionaryService, decorators: [{
1385
+ type: Injectable,
1386
+ args: [{
1387
+ providedIn: 'root'
1388
+ }]
1389
+ }], ctorParameters: () => [] });
853
1390
 
854
1391
  /** ************************
855
1392
  * Copyright Monkey Exchange. All Rights Reserved
@@ -898,6 +1435,9 @@ class MonkeyFormFieldComponent {
898
1435
  get labelId() {
899
1436
  return this._labelId;
900
1437
  }
1438
+ get hideBorder() {
1439
+ return this.control.type === 'input-code';
1440
+ }
901
1441
  get showHeader() {
902
1442
  return this.hasLabel || this.hasHelper;
903
1443
  }
@@ -905,6 +1445,9 @@ class MonkeyFormFieldComponent {
905
1445
  return this.hasInfo || this.hasError;
906
1446
  }
907
1447
  get showInvalid() {
1448
+ if (this.showLoading) {
1449
+ return false;
1450
+ }
908
1451
  const touched = this.control.ngControl?.touched || false;
909
1452
  const invalid = this.control.ngControl?.invalid || false;
910
1453
  return (this.hasError && !this._isFocused && touched && invalid && !this.control.disableToBeDirty);
@@ -913,10 +1456,10 @@ class MonkeyFormFieldComponent {
913
1456
  return (!!this.control.ngControl?.control?.value &&
914
1457
  !this.control.disabled &&
915
1458
  !this.control.loading &&
916
- !this.hideClear);
1459
+ (!this.hideAction || this.enableClear));
917
1460
  }
918
1461
  get showCalendar() {
919
- return this.control.type === 'date';
1462
+ return this.control.type === 'date' && !this.hideAction;
920
1463
  }
921
1464
  get showCurrency() {
922
1465
  return this.control.currency;
@@ -928,13 +1471,14 @@ class MonkeyFormFieldComponent {
928
1471
  return this.control.loading || false;
929
1472
  }
930
1473
  constructor() {
1474
+ this.size = 'md';
931
1475
  this.elementRef = inject(ElementRef);
932
1476
  this._icons = inject(MonkeyIconsService);
933
1477
  this._changeDetectorRef = inject(ChangeDetectorRef);
934
1478
  this._idGenerator = inject(IdGenerator);
935
1479
  this._labelId = this._idGenerator.getId('monkey-label-');
936
1480
  this._uid = inject(IdGenerator).getId('monkey-form-field-');
937
- this._destroyed = new Subject();
1481
+ this._destroyRef = inject(DestroyRef);
938
1482
  this._isFocused = null;
939
1483
  this._previousControl = null;
940
1484
  this.currencySymbol = getCurrencySymbol(inject(DEFAULT_CURRENCY_CODE));
@@ -1009,7 +1553,7 @@ class MonkeyFormFieldComponent {
1009
1553
  this._valueChanges?.unsubscribe();
1010
1554
  if (control.ngControl && control.ngControl.valueChanges) {
1011
1555
  this._valueChanges = control.ngControl.valueChanges
1012
- .pipe(takeUntil(this._destroyed))
1556
+ .pipe(takeUntilDestroyed(this._destroyRef))
1013
1557
  .subscribe(() => {
1014
1558
  this._changeDetectorRef.markForCheck();
1015
1559
  });
@@ -1038,8 +1582,6 @@ class MonkeyFormFieldComponent {
1038
1582
  ngOnDestroy() {
1039
1583
  this._stateChanges?.unsubscribe();
1040
1584
  this._valueChanges?.unsubscribe();
1041
- this._destroyed.next();
1042
- this._destroyed.complete();
1043
1585
  }
1044
1586
  getFooterMessages() {
1045
1587
  const touched = this.control.ngControl?.touched;
@@ -1051,7 +1593,12 @@ class MonkeyFormFieldComponent {
1051
1593
  const isTouched = touched;
1052
1594
  const isInvalid = invalid;
1053
1595
  const isNotFocused = !isFocused;
1054
- if (isControlEnabled && isTouched && isInvalid && isNotFocused && isControlDisableToBeDirty) {
1596
+ if (!this.showLoading &&
1597
+ isControlEnabled &&
1598
+ isTouched &&
1599
+ isInvalid &&
1600
+ isNotFocused &&
1601
+ isControlDisableToBeDirty) {
1055
1602
  return 'error';
1056
1603
  }
1057
1604
  if (hasInfoChildren) {
@@ -1082,7 +1629,7 @@ class MonkeyFormFieldComponent {
1082
1629
  }
1083
1630
  }
1084
1631
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1085
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: { id: "id", hideClear: ["hideClear", "hideClear", booleanAttribute] }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "attr.id": "id", "id": "id" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabel, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelper, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefix, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffix, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfo, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyError, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:8px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
1632
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: { id: "id", hideAction: ["hideAction", "hideAction", booleanAttribute], enableClear: ["enableClear", "enableClear", booleanAttribute], size: "size" }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "class.mecx-form-field-borderless": "hideBorder", "attr.id": "id", "id": "id", "class": "size" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabel, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelper, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefix, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffix, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfo, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyError, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"], encapsulation: i0.ViewEncapsulation.None }); }
1086
1633
  }
1087
1634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, decorators: [{
1088
1635
  type: Component,
@@ -1091,14 +1638,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1091
1638
  '[class.mecx-disabled]': 'control.disabled',
1092
1639
  '[class.mecx-form-field-focused]': 'control.focused',
1093
1640
  '[class.mecx-form-field-invalid]': 'showInvalid',
1641
+ '[class.mecx-form-field-borderless]': 'hideBorder',
1094
1642
  '[attr.id]': 'id',
1095
- '[id]': 'id'
1096
- }, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:8px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}\n"] }]
1643
+ '[id]': 'id',
1644
+ '[class]': 'size'
1645
+ }, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"] }]
1097
1646
  }], ctorParameters: () => [], propDecorators: { id: [{
1098
1647
  type: Input
1099
- }], hideClear: [{
1648
+ }], hideAction: [{
1649
+ type: Input,
1650
+ args: [{ transform: booleanAttribute }]
1651
+ }], enableClear: [{
1100
1652
  type: Input,
1101
1653
  args: [{ transform: booleanAttribute }]
1654
+ }], size: [{
1655
+ type: Input
1102
1656
  }], _formFieldControl: [{
1103
1657
  type: ContentChild,
1104
1658
  args: [MonkeyFormFieldControl]
@@ -1145,53 +1699,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1145
1699
  * This style guide was developed by Monkey Exchange Team
1146
1700
  * MIT Licence
1147
1701
  ************************* */
1148
- class MonkeyIconButtonComponent {
1149
- get id() {
1150
- return this._id;
1151
- }
1152
- set id(value) {
1153
- this._id = value || this._uid;
1154
- }
1155
- constructor() {
1156
- this.type = 'primary';
1157
- this.size = 'md';
1158
- this.disabled = false;
1159
- this.icon = '';
1160
- this._uid = inject(IdGenerator).getId('monkey-icon-button-');
1161
- // eslint-disable-next-line no-self-assign
1162
- this.id = this.id;
1163
- }
1164
- onClick(event) {
1165
- if (this.disabled) {
1166
- event.stopPropagation();
1167
- event.preventDefault();
1168
- event.stopImmediatePropagation();
1169
- }
1170
- }
1171
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1172
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconButtonComponent, isStandalone: true, selector: "monkey-icon-button", inputs: { type: "type", size: "size", disabled: "disabled", icon: "icon", id: "id" }, host: { attributes: { "data-testid": "monkey-icon-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
1173
- }
1174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, decorators: [{
1175
- type: Component,
1176
- args: [{ selector: 'monkey-icon-button', standalone: true, imports: [CommonModule, MonkeyIconComponent], encapsulation: ViewEncapsulation.None, host: {
1177
- 'data-testid': 'monkey-icon-button',
1178
- '[attr.id]': 'id',
1179
- '[id]': 'id'
1180
- }, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
1181
- }], ctorParameters: () => [], propDecorators: { type: [{
1182
- type: Input
1183
- }], size: [{
1184
- type: Input
1185
- }], disabled: [{
1186
- type: Input
1187
- }], icon: [{
1188
- type: Input
1189
- }], id: [{
1190
- type: Input
1191
- }], onClick: [{
1192
- type: HostListener,
1193
- args: ['click', ['$event']]
1194
- }] } });
1195
1702
 
1196
1703
  /** ************************
1197
1704
  * Copyright Monkey Exchange. All Rights Reserved
@@ -1248,7 +1755,7 @@ class MonkeyInputCurrencyDirective {
1248
1755
  this._changeDetectorRef = inject(ChangeDetectorRef);
1249
1756
  this._currencyCode = inject(DEFAULT_CURRENCY_CODE);
1250
1757
  this._localeId = inject(LOCALE_ID);
1251
- this._destroyed = new Subject();
1758
+ this._destroyRef = inject(DestroyRef);
1252
1759
  this._rawValue = 0;
1253
1760
  this.ngControl = inject(NgControl, { self: true, optional: true });
1254
1761
  this.focused = false;
@@ -1285,7 +1792,7 @@ class MonkeyInputCurrencyDirective {
1285
1792
  this.handleControlValue();
1286
1793
  this._valueChanges?.unsubscribe();
1287
1794
  this._valueChanges = this.ngControl?.control?.valueChanges
1288
- .pipe(takeUntil(this._destroyed))
1795
+ .pipe(takeUntilDestroyed(this._destroyRef))
1289
1796
  .subscribe(() => {
1290
1797
  this.handleControlValue();
1291
1798
  });
@@ -1325,8 +1832,7 @@ class MonkeyInputCurrencyDirective {
1325
1832
  provide: MonkeyFormFieldControl,
1326
1833
  // eslint-disable-next-line no-use-before-define
1327
1834
  useExisting: MonkeyInputCurrencyDirective
1328
- },
1329
- MonkeyDestroyService
1835
+ }
1330
1836
  ], exportAs: ["monkeyInput"], usesOnChanges: true, ngImport: i0 }); }
1331
1837
  }
1332
1838
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCurrencyDirective, decorators: [{
@@ -1354,8 +1860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1354
1860
  provide: MonkeyFormFieldControl,
1355
1861
  // eslint-disable-next-line no-use-before-define
1356
1862
  useExisting: MonkeyInputCurrencyDirective
1357
- },
1358
- MonkeyDestroyService
1863
+ }
1359
1864
  ]
1360
1865
  }]
1361
1866
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.CurrencyPipe }], propDecorators: { name: [{
@@ -1371,6 +1876,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1371
1876
  type: Input
1372
1877
  }] } });
1373
1878
 
1879
+ /** ************************
1880
+ * Copyright Monkey Exchange. All Rights Reserved
1881
+ * This style guide was developed by Monkey Exchange Team
1882
+ * MIT Licence
1883
+ ************************* */
1374
1884
  const INPUT_INVALID_TYPES = [
1375
1885
  'button',
1376
1886
  'checkbox',
@@ -1426,6 +1936,24 @@ class MonkeyInputDirective {
1426
1936
  this._type = value || 'text';
1427
1937
  this._elementRef.nativeElement.type = this._type;
1428
1938
  }
1939
+ get min() {
1940
+ return this._min;
1941
+ }
1942
+ set min(value) {
1943
+ this._min = value;
1944
+ if (this._type === 'date') {
1945
+ this._elementRef.nativeElement.min = this._min;
1946
+ }
1947
+ }
1948
+ get max() {
1949
+ return this._max;
1950
+ }
1951
+ set max(value) {
1952
+ this._max = value;
1953
+ if (this._type === 'date') {
1954
+ this._elementRef.nativeElement.max = this._max;
1955
+ }
1956
+ }
1429
1957
  get currency() {
1430
1958
  return false;
1431
1959
  }
@@ -1490,13 +2018,12 @@ class MonkeyInputDirective {
1490
2018
  this.ngControl?.control?.markAsTouched();
1491
2019
  }
1492
2020
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1493
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: { name: "name", disabled: ["disabled", "disabled", booleanAttribute], id: "id", required: "required", type: "type", percent: "percent" }, host: { attributes: { "data-testid": "monkey-input" }, listeners: { "focus": "focusChanged(true)", "focusout": "focusOutChanged()", "blur": "focusChanged(false)" }, properties: { "class.mecx-input-disabled": "disabled", "id": "id", "disabled": "disabled", "required": "required", "attr.name": "name || null", "attr.disabled": "disabled || null", "attr.aria-invalid": "(empty && required) ? null : errorState", "attr.aria-required": "required", "attr.id": "id" }, classAttribute: "mecx-input" }, providers: [
2021
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: { name: "name", disabled: ["disabled", "disabled", booleanAttribute], id: "id", required: "required", type: "type", min: "min", max: "max", percent: "percent" }, host: { attributes: { "data-testid": "monkey-input" }, listeners: { "focus": "focusChanged(true)", "focusout": "focusOutChanged()", "blur": "focusChanged(false)" }, properties: { "class.mecx-input-disabled": "disabled", "id": "id", "disabled": "disabled", "required": "required", "attr.name": "name || null", "attr.disabled": "disabled || null", "attr.aria-invalid": "(empty && required) ? null : errorState", "attr.aria-required": "required", "attr.id": "id" }, classAttribute: "mecx-input" }, providers: [
1494
2022
  {
1495
2023
  provide: MonkeyFormFieldControl,
1496
2024
  // eslint-disable-next-line no-use-before-define
1497
2025
  useExisting: MonkeyInputDirective
1498
- },
1499
- MonkeyDestroyService
2026
+ }
1500
2027
  ], exportAs: ["monkeyInput"], usesOnChanges: true, ngImport: i0 }); }
1501
2028
  }
1502
2029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputDirective, decorators: [{
@@ -1525,8 +2052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1525
2052
  provide: MonkeyFormFieldControl,
1526
2053
  // eslint-disable-next-line no-use-before-define
1527
2054
  useExisting: MonkeyInputDirective
1528
- },
1529
- MonkeyDestroyService
2055
+ }
1530
2056
  ]
1531
2057
  }]
1532
2058
  }], ctorParameters: () => [], propDecorators: { name: [{
@@ -1540,6 +2066,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1540
2066
  type: Input
1541
2067
  }], type: [{
1542
2068
  type: Input
2069
+ }], min: [{
2070
+ type: Input
2071
+ }], max: [{
2072
+ type: Input
1543
2073
  }], percent: [{
1544
2074
  type: Input
1545
2075
  }] } });
@@ -1568,197 +2098,1142 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1568
2098
  * This style guide was developed by Monkey Exchange Team
1569
2099
  * MIT Licence
1570
2100
  ************************* */
1571
- class MonkeyModalRef {
1572
- constructor(overlayRef, config) {
1573
- this.overlayRef = overlayRef;
1574
- this.config = config;
1575
- this.closed = new Subject();
1576
- this.id = config.id;
1577
- this.icon = config.icon;
1578
- this.disableClose = config.disableClose;
1579
- this.closeOnNavigation = config.closeOnNavigation;
1580
- this.backdropClick = overlayRef.backdropClick();
1581
- this.keydownEvents = overlayRef.keydownEvents();
1582
- this.outsidePointerEvents = overlayRef.outsidePointerEvents();
1583
- this.keydownEvents.subscribe((event) => {
1584
- if (event.key === 'Escape' && !this.disableClose && !hasModifierKey(event)) {
1585
- event.preventDefault();
1586
- this.close(undefined);
1587
- }
1588
- });
1589
- this.backdropClick.subscribe(() => {
1590
- if (!this.disableClose) {
1591
- this.close(undefined);
1592
- }
1593
- });
2101
+
2102
+ /** ************************
2103
+ * Copyright Monkey Exchange. All Rights Reserved
2104
+ * This style guide was developed by Monkey Exchange Team
2105
+ * MIT Licence
2106
+ ************************* */
2107
+ class MonkeyIconButtonComponent {
2108
+ get id() {
2109
+ return this._id;
1594
2110
  }
1595
- close(result) {
1596
- if (this.componentInstance) {
1597
- const closedSubject = this.closed;
1598
- this.overlayRef.dispose();
1599
- closedSubject.next(result);
1600
- closedSubject.complete();
1601
- // eslint-disable-next-line no-multi-assign
1602
- this.componentInstance = null;
1603
- }
2111
+ set id(value) {
2112
+ this._id = value || this._uid;
1604
2113
  }
1605
- afterClosed() {
1606
- return this.closed;
2114
+ constructor() {
2115
+ this.type = 'primary';
2116
+ this.size = 'md';
2117
+ this.disabled = false;
2118
+ this.icon = '';
2119
+ this._uid = inject(IdGenerator).getId('monkey-icon-button-');
2120
+ // eslint-disable-next-line no-self-assign
2121
+ this.id = this.id;
2122
+ }
2123
+ onClick(event) {
2124
+ if (this.disabled) {
2125
+ event.stopPropagation();
2126
+ event.preventDefault();
2127
+ event.stopImmediatePropagation();
2128
+ }
1607
2129
  }
2130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2131
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconButtonComponent, isStandalone: true, selector: "monkey-icon-button", inputs: { type: "type", size: "size", disabled: "disabled", icon: "icon", id: "id" }, host: { attributes: { "data-testid": "monkey-icon-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
1608
2132
  }
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, decorators: [{
2134
+ type: Component,
2135
+ args: [{ selector: 'monkey-icon-button', standalone: true, imports: [CommonModule, MonkeyIconComponent], encapsulation: ViewEncapsulation.None, host: {
2136
+ 'data-testid': 'monkey-icon-button',
2137
+ '[attr.id]': 'id',
2138
+ '[id]': 'id'
2139
+ }, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
2140
+ }], ctorParameters: () => [], propDecorators: { type: [{
2141
+ type: Input
2142
+ }], size: [{
2143
+ type: Input
2144
+ }], disabled: [{
2145
+ type: Input
2146
+ }], icon: [{
2147
+ type: Input
2148
+ }], id: [{
2149
+ type: Input
2150
+ }], onClick: [{
2151
+ type: HostListener,
2152
+ args: ['click', ['$event']]
2153
+ }] } });
1609
2154
 
1610
2155
  /** ************************
1611
2156
  * Copyright Monkey Exchange. All Rights Reserved
1612
2157
  * This style guide was developed by Monkey Exchange Team
1613
2158
  * MIT Licence
1614
2159
  ************************* */
1615
- const MECX_MODAL_DATA = new InjectionToken('mecxModalData');
1616
- const MECX_MODAL_DEFAULT_CONFIG = new InjectionToken('mecxModalDefaultConfig');
1617
- /**
1618
- * @license
1619
- * Copyright Google LLC All Rights Reserved.
1620
- *
1621
- * Use of this source code is governed by an MIT-style license that can be
1622
- * found in the LICENSE file at https://angular.dev/license
1623
- */
1624
- function reverseForEach(items, callback) {
1625
- let i = items.length;
1626
- // eslint-disable-next-line no-plusplus
1627
- while (i--) {
1628
- callback(items[i]);
1629
- }
1630
- }
1631
2160
 
1632
- class MonkeyModalComponent {
1633
- constructor(_elementRef, viewContainerRef, overlayRef, modalRef) {
1634
- this._elementRef = _elementRef;
1635
- this.viewContainerRef = viewContainerRef;
1636
- this.overlayRef = overlayRef;
1637
- this.modalRef = modalRef;
1638
- this._navigationSubscription = null;
1639
- this._router = inject(Router);
1640
- // not to do
1641
- }
1642
- ngAfterViewInit() {
1643
- console.log(this.modalRef);
1644
- if (this._elementRef) {
1645
- this._elementRef.nativeElement.focus();
2161
+ /* eslint-disable no-unused-vars */
2162
+ /** ************************
2163
+ * Copyright Monkey Exchange. All Rights Reserved
2164
+ * This style guide was developed by Monkey Exchange Team
2165
+ * MIT Licence
2166
+ ************************* */
2167
+ var QuickActionsEnum;
2168
+ (function (QuickActionsEnum) {
2169
+ QuickActionsEnum[QuickActionsEnum["LAST_30_DAYS"] = -30] = "LAST_30_DAYS";
2170
+ QuickActionsEnum[QuickActionsEnum["LAST_60_DAYS"] = -60] = "LAST_60_DAYS";
2171
+ QuickActionsEnum[QuickActionsEnum["LAST_90_DAYS"] = -90] = "LAST_90_DAYS";
2172
+ QuickActionsEnum[QuickActionsEnum["LAST_6_MONTHS"] = -180] = "LAST_6_MONTHS";
2173
+ QuickActionsEnum[QuickActionsEnum["LAST_12_MONTHS"] = -365] = "LAST_12_MONTHS";
2174
+ QuickActionsEnum[QuickActionsEnum["NEXT_30_DAYS"] = 30] = "NEXT_30_DAYS";
2175
+ QuickActionsEnum[QuickActionsEnum["NEXT_60_DAYS"] = 60] = "NEXT_60_DAYS";
2176
+ QuickActionsEnum[QuickActionsEnum["NEXT_90_DAYS"] = 90] = "NEXT_90_DAYS";
2177
+ QuickActionsEnum[QuickActionsEnum["NEXT_6_MONTHS"] = 180] = "NEXT_6_MONTHS";
2178
+ QuickActionsEnum[QuickActionsEnum["NEXT_12_MONTHS"] = 365] = "NEXT_12_MONTHS";
2179
+ })(QuickActionsEnum || (QuickActionsEnum = {}));
2180
+ function parseStringDate(val) {
2181
+ if (typeof val === 'string') {
2182
+ return format(parseISO(val), 'yyyy-MM-dd');
2183
+ }
2184
+ return val.toISOString().split('T')[0];
2185
+ }
2186
+ function getDefaultdates() {
2187
+ return {
2188
+ minDate: format(subYears(new Date(), 15), 'yyyy-MM-dd'),
2189
+ maxDate: format(addYears(new Date(), 15), 'yyyy-MM-dd')
2190
+ };
2191
+ }
2192
+ function buildCalendars(date, action) {
2193
+ if (action) {
2194
+ if (action === 'previous') {
2195
+ date = subMonths(date, 1);
1646
2196
  }
1647
- if (this.modalRef?.closeOnNavigation) {
1648
- this._navigationSubscription = this._router.events.subscribe((event) => {
1649
- if (event instanceof NavigationStart) {
1650
- this.close();
1651
- }
1652
- });
2197
+ else {
2198
+ date = addMonths(date, 1);
1653
2199
  }
1654
2200
  }
1655
- ngOnDestroy() {
1656
- if (this._navigationSubscription) {
1657
- this._navigationSubscription.unsubscribe();
1658
- this._navigationSubscription = null;
2201
+ const firstMonth = getMonth(date);
2202
+ const firstYear = getYear(date);
2203
+ const secondDate = addMonths(date, 1);
2204
+ const secondMonth = getMonth(secondDate);
2205
+ const secondYear = getYear(secondDate);
2206
+ return {
2207
+ firstCalendar: {
2208
+ month: firstMonth,
2209
+ year: firstYear
2210
+ },
2211
+ secondCalendar: {
2212
+ month: secondMonth,
2213
+ year: secondYear
1659
2214
  }
2215
+ };
2216
+ }
2217
+ function buildMonthByDays(year, month, minDate, maxDate) {
2218
+ const date = new Date(year, month, 1);
2219
+ const start = startOfWeek(startOfMonth(date), { weekStartsOn: 0 });
2220
+ const end = endOfWeek(endOfMonth(date), { weekStartsOn: 0 });
2221
+ const days = [];
2222
+ let blockPrev = false;
2223
+ let blockNext = false;
2224
+ let current = start;
2225
+ while (current <= end) {
2226
+ const isCurrentMonth = isSameMonth(current, date);
2227
+ const isBeforeMin = minDate
2228
+ ? isBefore(parseStringDate(current), parseStringDate(minDate))
2229
+ : false;
2230
+ if (isBeforeMin) {
2231
+ blockPrev = true;
2232
+ }
2233
+ const isAfterMax = maxDate
2234
+ ? isAfter(parseStringDate(current), parseStringDate(maxDate))
2235
+ : false;
2236
+ if (isAfterMax) {
2237
+ blockNext = true;
2238
+ }
2239
+ days.push({
2240
+ date: isCurrentMonth ? current : null,
2241
+ isDisabled: !isCurrentMonth || isBeforeMin || isAfterMax,
2242
+ isToday: isToday(current)
2243
+ });
2244
+ current = addDays(current, 1);
1660
2245
  }
1661
- close() {
1662
- this.overlayRef?.dispose();
1663
- }
1664
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.OverlayRef, optional: true }, { token: MonkeyModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1665
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyModalComponent, selector: "monkey-modal", host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "modalRef?.id || null" }, classAttribute: "mecx-modal" }, ngImport: i0, template: `
1666
- <div class="mecx-modal-header">
1667
- <div class="mecx-modal-header-group">
1668
- <div class="mecx-modal-header-title">
1669
- @if (modalRef?.icon) {
1670
- <div class="mecx-modal-header-icon">
1671
- <monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
1672
- </div>
1673
- }
1674
- <ng-content select="monkey-modal-title"></ng-content>
1675
- <ng-content select="[monkey-modal-title]"></ng-content>
1676
- </div>
1677
-
1678
- <ng-content select="monkey-modal-subtitle"></ng-content>
1679
- <ng-content select="[monkey-modal-subtitle]"></ng-content>
1680
- </div>
1681
- @if (!modalRef?.disableClose) {
1682
- <monkey-icon-button
1683
- size="sm"
1684
- type="tertiary"
1685
- icon="close"
1686
- class="mecx-modal-close"
1687
- (click)="close()"
1688
- >
1689
- x
1690
- </monkey-icon-button>
1691
- }
1692
- </div>
1693
- <ng-content select="monkey-modal-content"></ng-content>
1694
- <ng-content select="[monkey-modal-content]"></ng-content>
1695
- <ng-content select="monkey-modal-actions"></ng-content>
1696
- <ng-content select="[monkey-modal-actions]"></ng-content>
1697
- `, isInline: true, styles: ["monkey-modal{display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"], dependencies: [{ kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
2246
+ return {
2247
+ blockPrev,
2248
+ blockNext,
2249
+ days
2250
+ };
2251
+ }
2252
+ function getEnumKeys(enumObj) {
2253
+ return Object.entries(enumObj)
2254
+ .filter(([key]) => {
2255
+ return Number.isNaN(Number(key));
2256
+ })
2257
+ .map(([key, value]) => {
2258
+ return { key, value };
2259
+ });
1698
2260
  }
1699
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, decorators: [{
1700
- type: Component,
1701
- args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-modal', template: `
1702
- <div class="mecx-modal-header">
1703
- <div class="mecx-modal-header-group">
1704
- <div class="mecx-modal-header-title">
1705
- @if (modalRef?.icon) {
1706
- <div class="mecx-modal-header-icon">
1707
- <monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
1708
- </div>
1709
- }
1710
- <ng-content select="monkey-modal-title"></ng-content>
1711
- <ng-content select="[monkey-modal-title]"></ng-content>
1712
- </div>
1713
2261
 
1714
- <ng-content select="monkey-modal-subtitle"></ng-content>
1715
- <ng-content select="[monkey-modal-subtitle]"></ng-content>
1716
- </div>
1717
- @if (!modalRef?.disableClose) {
1718
- <monkey-icon-button
1719
- size="sm"
1720
- type="tertiary"
1721
- icon="close"
1722
- class="mecx-modal-close"
1723
- (click)="close()"
1724
- >
1725
- x
1726
- </monkey-icon-button>
1727
- }
1728
- </div>
1729
- <ng-content select="monkey-modal-content"></ng-content>
1730
- <ng-content select="[monkey-modal-content]"></ng-content>
1731
- <ng-content select="monkey-modal-actions"></ng-content>
1732
- <ng-content select="[monkey-modal-actions]"></ng-content>
1733
- `, host: {
1734
- class: 'mecx-modal',
1735
- tabindex: '-1',
1736
- '[attr.id]': 'modalRef?.id || null'
1737
- }, styles: ["monkey-modal{display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"] }]
1738
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.OverlayRef, decorators: [{
1739
- type: Optional
1740
- }] }, { type: MonkeyModalRef, decorators: [{
2262
+ /** ************************
2263
+ * Copyright Monkey Exchange. All Rights Reserved
2264
+ * This style guide was developed by Monkey Exchange Team
2265
+ * MIT Licence
2266
+ ************************* */
2267
+ class MonkeyDateRangeMonthComponent {
2268
+ set startDate(val) {
2269
+ this._handledStartDate = val;
2270
+ }
2271
+ set endDate(val) {
2272
+ this._handledEndDate = val;
2273
+ }
2274
+ get id() {
2275
+ return this._id;
2276
+ }
2277
+ set id(value) {
2278
+ this._id = value || this._uid;
2279
+ }
2280
+ constructor() {
2281
+ this.onNavigate = new EventEmitter();
2282
+ this.onDate = new EventEmitter();
2283
+ this._uid = inject(IdGenerator).getId('monkey-date-range-month-');
2284
+ this._today = new Date();
2285
+ this.i18nDictionary = inject(MonkeyDictionaryService).get('DATE-RANGE');
2286
+ // eslint-disable-next-line no-self-assign
2287
+ this.id = this.id;
2288
+ }
2289
+ ngOnChanges() {
2290
+ this.daysInMonth = buildMonthByDays(this.year, this.month, this.minDate, this.maxDate);
2291
+ }
2292
+ isFirst(param) {
2293
+ const date = format(param.date, 'yyyy-MM-dd');
2294
+ return (this._handledStartDate && this._handledStartDate === date) || false;
2295
+ }
2296
+ isLast(param) {
2297
+ const date = format(param.date, 'yyyy-MM-dd');
2298
+ return (this._handledEndDate && this._handledEndDate === date) || false;
2299
+ }
2300
+ isSelected(param) {
2301
+ const date = format(param.date, 'yyyy-MM-dd');
2302
+ return ((this._handledStartDate && this._handledStartDate === date) ||
2303
+ (this._handledEndDate && this._handledEndDate === date) ||
2304
+ false);
2305
+ }
2306
+ isInRange(param) {
2307
+ if (!this._handledStartDate || !this._handledEndDate || !param.date)
2308
+ return false;
2309
+ const date = format(param.date, 'yyyy-MM-dd');
2310
+ return isWithinInterval(new Date(date), {
2311
+ start: new Date(this._handledStartDate),
2312
+ end: new Date(this._handledEndDate)
2313
+ });
2314
+ }
2315
+ isInRangeTemporary(param) {
2316
+ if (!this._handledStartDate ||
2317
+ !this.temporaryEndDate?.date ||
2318
+ !param.date ||
2319
+ param.isDisabled ||
2320
+ (this._handledStartDate && this._handledEndDate))
2321
+ return false;
2322
+ const date = format(param.date, 'yyyy-MM-dd');
2323
+ return isWithinInterval(new Date(date), {
2324
+ start: new Date(this._handledStartDate),
2325
+ end: new Date(this.temporaryEndDate.date)
2326
+ });
2327
+ }
2328
+ isInLastTemporary(param) {
2329
+ if (!this.temporaryEndDate?.date || !param.date || this._handledEndDate)
2330
+ return false;
2331
+ const date = format(param.date, 'yyyy-MM-dd');
2332
+ const cmp = format(this.temporaryEndDate?.date, 'yyyy-MM-dd');
2333
+ return (this.temporaryEndDate?.date && cmp === date) || false;
2334
+ }
2335
+ onSelectDate(event, param) {
2336
+ if (param?.isDisabled || !param.date) {
2337
+ event.preventDefault();
2338
+ return;
2339
+ }
2340
+ const date = format(param.date, 'yyyy-MM-dd');
2341
+ if (this._handledStartDate && this._handledEndDate) {
2342
+ this._handledStartDate = '';
2343
+ this._handledEndDate = '';
2344
+ }
2345
+ if (!this._handledStartDate) {
2346
+ this._handledStartDate = date;
2347
+ }
2348
+ else {
2349
+ this._handledEndDate = date;
2350
+ }
2351
+ const cmp = isAfter(this._handledStartDate, this._handledEndDate);
2352
+ if (this._handledStartDate && this._handledEndDate && cmp) {
2353
+ const start = this._handledStartDate;
2354
+ const end = this._handledEndDate;
2355
+ this._handledStartDate = end;
2356
+ this._handledEndDate = start;
2357
+ }
2358
+ this.onDate.next({
2359
+ startDate: this._handledStartDate,
2360
+ endDate: this._handledEndDate
2361
+ });
2362
+ }
2363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeMonthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2364
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeMonthComponent, isStandalone: true, selector: "monkey-date-range-month", inputs: { month: "month", year: "year", startDate: "startDate", endDate: "endDate", hidePrevious: ["hidePrevious", "hidePrevious", booleanAttribute], hideNext: ["hideNext", "hideNext", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onNavigate: "onNavigate", onDate: "onDate" }, host: { attributes: { "data-testid": "month" }, properties: { "attr.id": "id", "id": "id" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"header\">\n @if (!hidePrevious) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-left\"\n type=\"secondary\"\n class=\"previous\"\n [disabled]=\"daysInMonth.blockPrev\"\n (click)=\"onNavigate.next('previous')\"\n >\n </monkey-icon-button>\n }\n\n {{ i18n?.['MONTHS']?.[month] }} {{ year }}\n\n @if (!hideNext) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-right\"\n type=\"secondary\"\n class=\"next\"\n [disabled]=\"daysInMonth.blockNext\"\n (click)=\"onNavigate.next('next')\"\n >\n </monkey-icon-button>\n }\n </div>\n\n <div class=\"week-labels\">\n @for (day of i18n?.['WEEK-DAYS']; track day) {\n <span class=\"day\">{{ day }}</span>\n }\n </div>\n\n <div class=\"dates\">\n @for (day of daysInMonth.days; track $index) {\n <div\n class=\"day\"\n [class.disabled]=\"day!.isDisabled\"\n [class.in-range]=\"isInRange(day!)\"\n [class.selected]=\"isSelected(day!)\"\n [class.first]=\"isFirst(day!)\"\n [class.last]=\"isLast(day!)\"\n [class.in-range-temporary]=\"isInRangeTemporary(day!)\"\n [class.temporary-last]=\"isInLastTemporary(day!)\"\n (click)=\"onSelectDate($event, day!)\"\n (mouseenter)=\"temporaryEndDate = day!\"\n (mouseleave)=\"temporaryEndDate = null\"\n >\n {{ day!.date | date: 'd' }}\n @if (day?.isToday) {\n <span class=\"today\"></span>\n }\n </div>\n }\n </div>\n</ng-container>\n", styles: [":host{width:100%}:host .header{display:flex;align-items:center;justify-content:center;position:relative;margin-bottom:12px}:host .header monkey-icon-button{max-width:32px;background:transparent}:host .header monkey-icon-button.previous{position:absolute;left:0}:host .header monkey-icon-button.next{position:absolute;right:0}:host .week-labels{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-weight:700;font-size:.9rem;margin-bottom:4px;gap:12px 0}:host .week-labels .day{height:24px;border:none;background:transparent;text-align:center;display:flex;align-items:center;justify-content:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px}:host .dates{display:grid;grid-template-columns:repeat(7,1fr);gap:12px 0}:host .dates .day{height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px;position:relative;border:1px solid transparent;-webkit-user-select:none;user-select:none}:host .dates .day .today{position:absolute;width:60%;bottom:1px;font-size:36px;letter-spacing:1.48!important}:host .dates .day .today:not(.selected){border-bottom:2px solid var(--mecx-color-theme-main)}:host .dates .day.disabled{color:var(--mecx-color-gray-400);font-weight:400;cursor:not-allowed}:host .dates .day.selected{background-color:var(--mecx-color-theme-main)!important;color:var(--mecx-color-white)!important}:host .dates .day.in-range{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.in-range-temporary{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.first,:host .dates .day.last{background-color:var(--mecx-color-theme-main);color:var(--mecx-color-white)}:host .dates .day.first{border-top-left-radius:8px;border-bottom-left-radius:8px}:host .dates .day.last,:host .dates .day.temporary-last{border-top-right-radius:8px;border-bottom-right-radius:8px}:host .dates .day:hover:not(.disabled,.in-range):before{content:\"\";border:1px solid var(--mecx-color-theme-main);border-radius:8px;height:100%;width:100%;position:absolute}:host .dates .day:hover:not(.disabled,.in-range).selected{background:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }] }); }
2365
+ }
2366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeMonthComponent, decorators: [{
2367
+ type: Component,
2368
+ args: [{ selector: 'monkey-date-range-month', standalone: true, imports: [CommonModule, MonkeyIconButtonComponent], host: {
2369
+ 'data-testid': 'month',
2370
+ '[attr.id]': 'id',
2371
+ '[id]': 'id'
2372
+ }, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"header\">\n @if (!hidePrevious) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-left\"\n type=\"secondary\"\n class=\"previous\"\n [disabled]=\"daysInMonth.blockPrev\"\n (click)=\"onNavigate.next('previous')\"\n >\n </monkey-icon-button>\n }\n\n {{ i18n?.['MONTHS']?.[month] }} {{ year }}\n\n @if (!hideNext) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-right\"\n type=\"secondary\"\n class=\"next\"\n [disabled]=\"daysInMonth.blockNext\"\n (click)=\"onNavigate.next('next')\"\n >\n </monkey-icon-button>\n }\n </div>\n\n <div class=\"week-labels\">\n @for (day of i18n?.['WEEK-DAYS']; track day) {\n <span class=\"day\">{{ day }}</span>\n }\n </div>\n\n <div class=\"dates\">\n @for (day of daysInMonth.days; track $index) {\n <div\n class=\"day\"\n [class.disabled]=\"day!.isDisabled\"\n [class.in-range]=\"isInRange(day!)\"\n [class.selected]=\"isSelected(day!)\"\n [class.first]=\"isFirst(day!)\"\n [class.last]=\"isLast(day!)\"\n [class.in-range-temporary]=\"isInRangeTemporary(day!)\"\n [class.temporary-last]=\"isInLastTemporary(day!)\"\n (click)=\"onSelectDate($event, day!)\"\n (mouseenter)=\"temporaryEndDate = day!\"\n (mouseleave)=\"temporaryEndDate = null\"\n >\n {{ day!.date | date: 'd' }}\n @if (day?.isToday) {\n <span class=\"today\"></span>\n }\n </div>\n }\n </div>\n</ng-container>\n", styles: [":host{width:100%}:host .header{display:flex;align-items:center;justify-content:center;position:relative;margin-bottom:12px}:host .header monkey-icon-button{max-width:32px;background:transparent}:host .header monkey-icon-button.previous{position:absolute;left:0}:host .header monkey-icon-button.next{position:absolute;right:0}:host .week-labels{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-weight:700;font-size:.9rem;margin-bottom:4px;gap:12px 0}:host .week-labels .day{height:24px;border:none;background:transparent;text-align:center;display:flex;align-items:center;justify-content:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px}:host .dates{display:grid;grid-template-columns:repeat(7,1fr);gap:12px 0}:host .dates .day{height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px;position:relative;border:1px solid transparent;-webkit-user-select:none;user-select:none}:host .dates .day .today{position:absolute;width:60%;bottom:1px;font-size:36px;letter-spacing:1.48!important}:host .dates .day .today:not(.selected){border-bottom:2px solid var(--mecx-color-theme-main)}:host .dates .day.disabled{color:var(--mecx-color-gray-400);font-weight:400;cursor:not-allowed}:host .dates .day.selected{background-color:var(--mecx-color-theme-main)!important;color:var(--mecx-color-white)!important}:host .dates .day.in-range{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.in-range-temporary{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.first,:host .dates .day.last{background-color:var(--mecx-color-theme-main);color:var(--mecx-color-white)}:host .dates .day.first{border-top-left-radius:8px;border-bottom-left-radius:8px}:host .dates .day.last,:host .dates .day.temporary-last{border-top-right-radius:8px;border-bottom-right-radius:8px}:host .dates .day:hover:not(.disabled,.in-range):before{content:\"\";border:1px solid var(--mecx-color-theme-main);border-radius:8px;height:100%;width:100%;position:absolute}:host .dates .day:hover:not(.disabled,.in-range).selected{background:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}\n"] }]
2373
+ }], ctorParameters: () => [], propDecorators: { month: [{
2374
+ type: Input,
2375
+ args: [{ required: true }]
2376
+ }], year: [{
2377
+ type: Input,
2378
+ args: [{ required: true }]
2379
+ }], startDate: [{
2380
+ type: Input
2381
+ }], endDate: [{
2382
+ type: Input
2383
+ }], hidePrevious: [{
2384
+ type: Input,
2385
+ args: [{ transform: booleanAttribute }]
2386
+ }], hideNext: [{
2387
+ type: Input,
2388
+ args: [{ transform: booleanAttribute }]
2389
+ }], minDate: [{
2390
+ type: Input
2391
+ }], maxDate: [{
2392
+ type: Input
2393
+ }], onNavigate: [{
2394
+ type: Output
2395
+ }], onDate: [{
2396
+ type: Output
2397
+ }], id: [{
2398
+ type: Input
2399
+ }] } });
2400
+
2401
+ /** ************************
2402
+ * Copyright Monkey Exchange. All Rights Reserved
2403
+ * This style guide was developed by Monkey Exchange Team
2404
+ * MIT Licence
2405
+ ************************* */
2406
+
2407
+ /** ************************
2408
+ * Copyright Monkey Exchange. All Rights Reserved
2409
+ * This style guide was developed by Monkey Exchange Team
2410
+ * MIT Licence
2411
+ ************************* */
2412
+ class MonkeyDateRangeQuickActionsComponent {
2413
+ get id() {
2414
+ return this._id;
2415
+ }
2416
+ set id(value) {
2417
+ this._id = value || this._uid;
2418
+ }
2419
+ constructor() {
2420
+ this.onChange = new EventEmitter();
2421
+ this._uid = inject(IdGenerator).getId('monkey-date-range-month-quick-actions-');
2422
+ this.selectedAction = '';
2423
+ this.actions = getEnumKeys(QuickActionsEnum);
2424
+ this.i18nDictionary = inject(MonkeyDictionaryService).get('DATE-RANGE');
2425
+ // eslint-disable-next-line no-self-assign
2426
+ this.id = this.id;
2427
+ }
2428
+ onHandleAction({ key, value }) {
2429
+ this.selectedAction = key;
2430
+ this.onChange.next(value);
2431
+ }
2432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeQuickActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2433
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeQuickActionsComponent, isStandalone: true, selector: "monkey-date-range-quick-actions", inputs: { id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "quick-actions" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n @for (item of actions; track item.key) {\n <div\n class=\"item\"\n [class.selected]=\"item.key === selectedAction\"\n (click)=\"onHandleAction(item)\"\n [attr.tabindex]=\"$index\"\n >\n {{ i18n?.['QUICK-ACTIONS']?.[item.key] }}\n </div>\n }\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:24px 8px 12px 12px;gap:4px}:host .item{color:var(--mecx-color-gray-900);font-size:13px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.26px;padding:4px 12px;cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;border-radius:4px}:host .item.selected{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:hover{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2434
+ }
2435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeQuickActionsComponent, decorators: [{
2436
+ type: Component,
2437
+ args: [{ selector: 'monkey-date-range-quick-actions', standalone: true, imports: [CommonModule], host: {
2438
+ 'data-testid': 'quick-actions',
2439
+ '[attr.id]': 'id',
2440
+ '[id]': 'id'
2441
+ }, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n @for (item of actions; track item.key) {\n <div\n class=\"item\"\n [class.selected]=\"item.key === selectedAction\"\n (click)=\"onHandleAction(item)\"\n [attr.tabindex]=\"$index\"\n >\n {{ i18n?.['QUICK-ACTIONS']?.[item.key] }}\n </div>\n }\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:24px 8px 12px 12px;gap:4px}:host .item{color:var(--mecx-color-gray-900);font-size:13px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.26px;padding:4px 12px;cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;border-radius:4px}:host .item.selected{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:hover{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"] }]
2442
+ }], ctorParameters: () => [], propDecorators: { onChange: [{
2443
+ type: Output
2444
+ }], id: [{
2445
+ type: Input
2446
+ }] } });
2447
+
2448
+ /** ************************
2449
+ * Copyright Monkey Exchange. All Rights Reserved
2450
+ * This style guide was developed by Monkey Exchange Team
2451
+ * MIT Licence
2452
+ ************************* */
2453
+
2454
+ /** ************************
2455
+ * Copyright Monkey Exchange. All Rights Reserved
2456
+ * This style guide was developed by Monkey Exchange Team
2457
+ * MIT Licence
2458
+ ************************* */
2459
+ class MonkeyDateRangeComponent {
2460
+ set startDate(val) {
2461
+ this.handledStartDate = val;
2462
+ }
2463
+ set endDate(val) {
2464
+ this.handledEndDate = val;
2465
+ }
2466
+ set minDate(val) {
2467
+ this.handledMinDate = parseStringDate(val);
2468
+ }
2469
+ set maxDate(val) {
2470
+ this.handledMaxDate = parseStringDate(val);
2471
+ }
2472
+ get id() {
2473
+ return this._id;
2474
+ }
2475
+ set id(value) {
2476
+ this._id = value || this._uid;
2477
+ }
2478
+ constructor() {
2479
+ this.onCancel = new EventEmitter();
2480
+ this.onDate = new EventEmitter();
2481
+ this._uid = inject(IdGenerator).getId('monkey-date-range-');
2482
+ this._screenWidth = window.innerWidth;
2483
+ this._allowChangeFastAction = true;
2484
+ this._allowChangeSecondCalendar = true;
2485
+ this._today = new Date();
2486
+ this.i18nDictionary = inject(MonkeyDictionaryService).get('DATE-RANGE');
2487
+ this.isInvalidInterval = false;
2488
+ this.handledMinDate = getDefaultdates().minDate;
2489
+ this.handledMaxDate = getDefaultdates().maxDate;
2490
+ // eslint-disable-next-line no-self-assign
2491
+ this.id = this.id;
2492
+ }
2493
+ handleInitialValues() {
2494
+ const calendars = buildCalendars(this.handledStartDate || new Date());
2495
+ this.firstCalendar = calendars.firstCalendar;
2496
+ this.secondCalendar = calendars.secondCalendar;
2497
+ }
2498
+ handleProperties() {
2499
+ if (this._screenWidth < 950) {
2500
+ if (this._allowChangeFastAction) {
2501
+ this.hideQuickAction = true;
2502
+ this.allowFastActionOnHeader = false;
2503
+ }
2504
+ if (this._allowChangeSecondCalendar) {
2505
+ this.hideSecondCalendar = true;
2506
+ }
2507
+ }
2508
+ else {
2509
+ if (this._allowChangeFastAction) {
2510
+ this.hideQuickAction = false;
2511
+ this.allowFastActionOnHeader = false;
2512
+ }
2513
+ if (this._allowChangeSecondCalendar) {
2514
+ this.hideSecondCalendar = false;
2515
+ }
2516
+ }
2517
+ }
2518
+ handleInputChange(event, isStart) {
2519
+ const input = event.target;
2520
+ const { value } = input;
2521
+ const [year] = value.split('-');
2522
+ if (`${Number(year)}`.length < 4)
2523
+ return;
2524
+ if (!input.checkValidity()) {
2525
+ event.preventDefault();
2526
+ input.value = '';
2527
+ this.isInvalidInterval = true;
2528
+ return;
2529
+ }
2530
+ this.isInvalidInterval = false;
2531
+ if (isStart) {
2532
+ this.handledStartDate = value;
2533
+ }
2534
+ else {
2535
+ this.handledEndDate = value;
2536
+ }
2537
+ if (this.hideActions) {
2538
+ this.onSubmit();
2539
+ }
2540
+ }
2541
+ onResize(event) {
2542
+ this._screenWidth = event.target.innerWidth;
2543
+ this.handleProperties();
2544
+ }
2545
+ ngOnInit() {
2546
+ if (this.hideQuickAction) {
2547
+ this._allowChangeFastAction = false;
2548
+ }
2549
+ if (this.hideSecondCalendar) {
2550
+ this._allowChangeSecondCalendar = false;
2551
+ }
2552
+ if (this.allowFastActionOnHeader) {
2553
+ this._allowChangeFastAction = false;
2554
+ this.hideQuickAction = true;
2555
+ }
2556
+ this.handleInitialValues();
2557
+ this.handleProperties();
2558
+ }
2559
+ onHandleDate({ startDate, endDate }) {
2560
+ this.handledStartDate = startDate;
2561
+ this.handledEndDate = endDate;
2562
+ if (this.hideActions) {
2563
+ this.onSubmit();
2564
+ }
2565
+ }
2566
+ onSubmit() {
2567
+ this.onDate.next({
2568
+ startDate: this.handledStartDate ?? '',
2569
+ endDate: this.handledEndDate ?? ''
2570
+ });
2571
+ }
2572
+ onHandleQuickAction(event) {
2573
+ const isBackward = event < 0;
2574
+ const days = Math.abs(event);
2575
+ if (isBackward) {
2576
+ const baseDate = parseStringDate(this.handledEndDate || this.handledStartDate || this._today);
2577
+ let startDate = subDays(baseDate, days);
2578
+ if (isBefore(startDate, this.handledMinDate)) {
2579
+ startDate = this.handledMinDate;
2580
+ }
2581
+ this.handledStartDate = parseStringDate(startDate);
2582
+ this.handledEndDate = parseStringDate(baseDate);
2583
+ }
2584
+ else {
2585
+ const baseDate = parseStringDate(this.handledStartDate || this.handledEndDate || this._today);
2586
+ let endDate = addDays(baseDate, days);
2587
+ if (isAfter(endDate, this.handledMaxDate)) {
2588
+ endDate = this.handledMaxDate;
2589
+ }
2590
+ this.handledStartDate = parseStringDate(baseDate);
2591
+ this.handledEndDate = parseStringDate(endDate);
2592
+ }
2593
+ }
2594
+ onChangeInputStartDate(event) {
2595
+ this.handleInputChange(event, true);
2596
+ }
2597
+ onChangeInputEndDate(event) {
2598
+ this.handleInputChange(event, false);
2599
+ }
2600
+ onDataChange(event, isStart) {
2601
+ if (isStart) {
2602
+ this.handledStartDate = event;
2603
+ this.handledEndDate = '';
2604
+ }
2605
+ else {
2606
+ this.handledEndDate = event;
2607
+ }
2608
+ if (this.hideActions) {
2609
+ this.onSubmit();
2610
+ }
2611
+ }
2612
+ onHandleNavigate(action) {
2613
+ if (!action)
2614
+ return;
2615
+ const date = new Date(this.firstCalendar.year, this.firstCalendar.month, 1);
2616
+ const calendars = buildCalendars(date, action);
2617
+ this.firstCalendar = calendars.firstCalendar;
2618
+ this.secondCalendar = calendars.secondCalendar;
2619
+ }
2620
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2621
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeComponent, isStandalone: true, selector: "monkey-date-range", inputs: { startDate: "startDate", endDate: "endDate", hideQuickAction: ["hideQuickAction", "hideQuickAction", booleanAttribute], hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hideSecondCalendar: ["hideSecondCalendar", "hideSecondCalendar", booleanAttribute], allowFastActionOnHeader: ["allowFastActionOnHeader", "allowFastActionOnHeader", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onCancel: "onCancel", onDate: "onDate" }, host: { attributes: { "data-testid": "monkey-date-range" }, listeners: { "window:resize": "onResize($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyError, selector: "monkey-error" }, { kind: "directive", type: MonkeyLabel, selector: "monkey-label" }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyDateRangeMonthComponent, selector: "monkey-date-range-month", inputs: ["month", "year", "startDate", "endDate", "hidePrevious", "hideNext", "minDate", "maxDate", "id"], outputs: ["onNavigate", "onDate"] }, { kind: "component", type: MonkeyDateRangeQuickActionsComponent, selector: "monkey-date-range-quick-actions", inputs: ["id"], outputs: ["onChange"] }] }); }
2622
+ }
2623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeComponent, decorators: [{
2624
+ type: Component,
2625
+ args: [{ selector: 'monkey-date-range', standalone: true, imports: [
2626
+ CommonModule,
2627
+ FormsModule,
2628
+ MonkeyInputModule,
2629
+ MonkeyFormFieldModule,
2630
+ MonkeyDirectivesModule,
2631
+ MonkeyButtonComponent,
2632
+ MonkeyDateRangeMonthComponent,
2633
+ MonkeyDateRangeQuickActionsComponent
2634
+ ], host: {
2635
+ 'data-testid': 'monkey-date-range',
2636
+ '[attr.id]': 'id',
2637
+ '[id]': 'id'
2638
+ }, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"] }]
2639
+ }], ctorParameters: () => [], propDecorators: { startDate: [{
2640
+ type: Input
2641
+ }], endDate: [{
2642
+ type: Input
2643
+ }], hideQuickAction: [{
2644
+ type: Input,
2645
+ args: [{ transform: booleanAttribute }]
2646
+ }], hideHeader: [{
2647
+ type: Input,
2648
+ args: [{ transform: booleanAttribute }]
2649
+ }], hideActions: [{
2650
+ type: Input,
2651
+ args: [{ transform: booleanAttribute }]
2652
+ }], hideSecondCalendar: [{
2653
+ type: Input,
2654
+ args: [{ transform: booleanAttribute }]
2655
+ }], allowFastActionOnHeader: [{
2656
+ type: Input,
2657
+ args: [{ transform: booleanAttribute }]
2658
+ }], minDate: [{
2659
+ type: Input
2660
+ }], maxDate: [{
2661
+ type: Input
2662
+ }], onCancel: [{
2663
+ type: Output
2664
+ }], onDate: [{
2665
+ type: Output
2666
+ }], id: [{
2667
+ type: Input
2668
+ }], onResize: [{
2669
+ type: HostListener,
2670
+ args: ['window:resize', ['$event']]
2671
+ }] } });
2672
+
2673
+ /** ************************
2674
+ * Copyright Monkey Exchange. All Rights Reserved
2675
+ * This style guide was developed by Monkey Exchange Team
2676
+ * MIT Licence
2677
+ ************************* */
2678
+
2679
+ /** ************************
2680
+ * Copyright Monkey Exchange. All Rights Reserved
2681
+ * This style guide was developed by Monkey Exchange Team
2682
+ * MIT Licence
2683
+ ************************* */
2684
+ class MonkeyDividerComponent {
2685
+ get classes() {
2686
+ return `${this.size()} ${this.vertical() ? 'vertical' : ''}`;
2687
+ }
2688
+ get id() {
2689
+ return this._id;
2690
+ }
2691
+ set id(value) {
2692
+ this._id = value || this._uid;
2693
+ }
2694
+ constructor() {
2695
+ this.size = input('sm');
2696
+ this.vertical = input(false, {
2697
+ transform: booleanAttribute
2698
+ });
2699
+ this._uid = inject(IdGenerator).getId('monkey-divider-');
2700
+ // eslint-disable-next-line no-self-assign
2701
+ this.id = this.id;
2702
+ }
2703
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2704
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeyDividerComponent, isStandalone: true, selector: "monkey-divider", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-divider" }, properties: { "attr.id": "id", "id": "id", "class": "this.classes" } }, ngImport: i0, template: '', isInline: true, styles: ["monkey-divider{display:flex;box-sizing:border-box;width:100%;background-color:var(--mecx-color-gray-200)}monkey-divider.lg{height:4px}monkey-divider.lg.vertical{width:4px!important}monkey-divider.md{height:2px}monkey-divider.md.vertical{width:2px!important}monkey-divider.sm{height:1px}monkey-divider.sm.vertical{width:1px!important}monkey-divider.vertical{height:100%}\n"], encapsulation: i0.ViewEncapsulation.None }); }
2705
+ }
2706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, decorators: [{
2707
+ type: Component,
2708
+ args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-divider', standalone: true, template: '', host: {
2709
+ 'data-testid': 'monkey-divider',
2710
+ '[attr.id]': 'id',
2711
+ '[id]': 'id'
2712
+ }, styles: ["monkey-divider{display:flex;box-sizing:border-box;width:100%;background-color:var(--mecx-color-gray-200)}monkey-divider.lg{height:4px}monkey-divider.lg.vertical{width:4px!important}monkey-divider.md{height:2px}monkey-divider.md.vertical{width:2px!important}monkey-divider.sm{height:1px}monkey-divider.sm.vertical{width:1px!important}monkey-divider.vertical{height:100%}\n"] }]
2713
+ }], ctorParameters: () => [], propDecorators: { classes: [{
2714
+ type: HostBinding,
2715
+ args: ['class']
2716
+ }], id: [{
2717
+ type: Input
2718
+ }] } });
2719
+
2720
+ /** ************************
2721
+ * Copyright Monkey Exchange. All Rights Reserved
2722
+ * This style guide was developed by Monkey Exchange Team
2723
+ * MIT Licence
2724
+ ************************* */
2725
+
2726
+ /** ************************
2727
+ * Copyright Monkey Exchange. All Rights Reserved
2728
+ * This style guide was developed by Monkey Exchange Team
2729
+ * MIT Licence
2730
+ ************************* */
2731
+ class MonkeyInputCodeComponent {
2732
+ get disabled() {
2733
+ if (this.ngControl && this.ngControl.disabled !== null) {
2734
+ return this.ngControl.disabled;
2735
+ }
2736
+ return this._disabled;
2737
+ }
2738
+ set disabled(value) {
2739
+ this._disabled = value;
2740
+ if (this.focused) {
2741
+ this.focused = false;
2742
+ this.stateChanges.next();
2743
+ }
2744
+ }
2745
+ set value(value) {
2746
+ if (this._value !== value && value !== undefined) {
2747
+ this._value = value;
2748
+ this._onChange(value);
2749
+ this._onTouched();
2750
+ }
2751
+ }
2752
+ get value() {
2753
+ return this._value;
2754
+ }
2755
+ constructor(formField) {
2756
+ this.formField = formField;
2757
+ this.stateChanges = new Subject();
2758
+ this.type = 'input-code';
2759
+ this.currency = false;
2760
+ this.percent = false;
2761
+ this.id = inject(IdGenerator).getId('monkey-input-code-');
2762
+ this._onChange = () => { };
2763
+ this._onTouched = () => { };
2764
+ this._value = null;
2765
+ this.ngControl = inject(NgControl, { self: true, optional: true });
2766
+ this.focused = false;
2767
+ this.length = input(6);
2768
+ this.inputType = input('numeric');
2769
+ this.inputIndices = computed(() => {
2770
+ return Array.from({ length: this.length() }, (_, i) => {
2771
+ return '';
2772
+ });
2773
+ });
2774
+ this._disabled = false;
2775
+ if (this.ngControl) {
2776
+ this.ngControl.valueAccessor = this;
2777
+ }
2778
+ if (this.formField) {
2779
+ this.formField.hideAction = true;
2780
+ }
2781
+ }
2782
+ ngAfterViewInit() {
2783
+ if (this.formField) {
2784
+ const input = this.formField.elementRef.nativeElement.querySelector('.mecx-form-field-body');
2785
+ const height = input.offsetHeight > 40 ? input.offsetHeight : 40;
2786
+ this.inputs.forEach((inputEl) => {
2787
+ inputEl.nativeElement.style.height = `${height}px`;
2788
+ inputEl.nativeElement.style.width = `${height}px`;
2789
+ });
2790
+ }
2791
+ }
2792
+ _onFocus() {
2793
+ if (!this.disabled) {
2794
+ this.focused = true;
2795
+ this._onTouched();
2796
+ this.stateChanges.next();
2797
+ }
2798
+ }
2799
+ propagateCode() {
2800
+ const code = this.inputIndices().join('');
2801
+ this.writeValue(code);
2802
+ }
2803
+ focusNextInput(input) {
2804
+ const next = input.nextElementSibling;
2805
+ next?.focus();
2806
+ }
2807
+ focusPreviousInput(input) {
2808
+ const previous = input.previousElementSibling;
2809
+ previous?.focus();
2810
+ }
2811
+ setFullInputValue(value) {
2812
+ const chars = value?.slice(0, this.length()).split('') || '';
2813
+ chars.forEach((digit, index) => {
2814
+ this.inputIndices()[index] = digit;
2815
+ });
2816
+ }
2817
+ isInvalid() {
2818
+ return this.formField.showInvalid;
2819
+ }
2820
+ onContainerClick() {
2821
+ if (!this._value) {
2822
+ this.inputs.first.nativeElement.focus();
2823
+ }
2824
+ }
2825
+ onKeyDown(event, index) {
2826
+ const input = event.target;
2827
+ this.inputIndices()[index] = input.value;
2828
+ const { key } = event;
2829
+ const keys = {
2830
+ Backspace: () => {
2831
+ if (input.value === '') {
2832
+ this.focusPreviousInput(input);
2833
+ }
2834
+ },
2835
+ Delete: () => {
2836
+ if (input.value === '') {
2837
+ this.focusNextInput(input);
2838
+ }
2839
+ },
2840
+ ArrowLeft: () => {
2841
+ if (index > 0) {
2842
+ this.focusPreviousInput(input);
2843
+ event.preventDefault();
2844
+ }
2845
+ },
2846
+ ArrowUp: () => {
2847
+ if (index > 0) {
2848
+ this.focusPreviousInput(input);
2849
+ event.preventDefault();
2850
+ }
2851
+ },
2852
+ ArrowRight: () => {
2853
+ if (index < this.length()) {
2854
+ this.focusNextInput(input);
2855
+ event.preventDefault();
2856
+ }
2857
+ },
2858
+ ArrowDown: () => {
2859
+ if (index < this.length()) {
2860
+ this.focusNextInput(input);
2861
+ event.preventDefault();
2862
+ }
2863
+ }
2864
+ };
2865
+ if (keys[key]) {
2866
+ keys[key]();
2867
+ }
2868
+ }
2869
+ onInput(event, index) {
2870
+ const input = event.target;
2871
+ const { value } = input;
2872
+ if (value.length > 1) {
2873
+ this.setFullInputValue(value);
2874
+ input.value = value.charAt(0);
2875
+ }
2876
+ else {
2877
+ input.value = value;
2878
+ }
2879
+ this.inputIndices()[index] = input.value;
2880
+ if (input.value && index < this.length()) {
2881
+ this.focusNextInput(input);
2882
+ }
2883
+ this.propagateCode();
2884
+ }
2885
+ onPaste(event) {
2886
+ event.preventDefault();
2887
+ const pastedData = event.clipboardData?.getData('text').trim() ?? '';
2888
+ const chars = pastedData.slice(0, this.length()).split('');
2889
+ chars.forEach((digit, index) => {
2890
+ this.inputIndices()[index] = digit;
2891
+ });
2892
+ if (this.inputs.length > chars.length) {
2893
+ this.inputs.get(chars.length)?.nativeElement.focus();
2894
+ }
2895
+ if (this.inputs.length <= chars.length) {
2896
+ this.onBlur();
2897
+ }
2898
+ this.propagateCode();
2899
+ }
2900
+ onBlur() {
2901
+ this.focused = false;
2902
+ this.stateChanges.next();
2903
+ }
2904
+ onFocus(event) {
2905
+ const input = event.target;
2906
+ input.select();
2907
+ this._onFocus();
2908
+ }
2909
+ writeValue(value) {
2910
+ this.value = value;
2911
+ }
2912
+ registerOnChange(fn) {
2913
+ this._onChange = fn;
2914
+ }
2915
+ registerOnTouched(fn) {
2916
+ this._onTouched = fn;
2917
+ }
2918
+ setDisabledState(isDisabled) {
2919
+ this.disabled = isDisabled;
2920
+ }
2921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCodeComponent, deps: [{ token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyInputCodeComponent, isStandalone: true, selector: "monkey-input-code", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, inputType: { classPropertyName: "inputType", publicName: "inputType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-input-code" }, properties: { "attr.id": "id", "id": "id" } }, providers: [
2923
+ // eslint-disable-next-line no-use-before-define
2924
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputCodeComponent }
2925
+ ], viewQueries: [{ propertyName: "inputs", predicate: ["codeInput"], descendants: true }], ngImport: i0, template: "<div class=\"monkey-input-code\">\n @for (idx of inputIndices(); track $index; let i = $index) {\n <input\n #codeInput\n class=\"focus\"\n autocomplete=\"one-time-code\"\n [attr.type]=\"inputType()\"\n [disabled]=\"_disabled\"\n [attr.maxlength]=\"1\"\n [class.invalid]=\"isInvalid()\"\n [(ngModel)]=\"inputIndices()[i]\"\n (focus)=\"onFocus($event)\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (paste)=\"onPaste($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [".monkey-input-code{display:flex;gap:12px}.monkey-input-code input{box-sizing:border-box;border-radius:4px;border:2px solid var(--mecx-color-gray-400);color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;letter-spacing:.14px;line-height:24px;text-align:center}.monkey-input-code input:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:2px}.monkey-input-code input.invalid{border:2px solid var(--mecx-color-error-700)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
2926
+ }
2927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCodeComponent, decorators: [{
2928
+ type: Component,
2929
+ args: [{ selector: 'monkey-input-code', standalone: true, imports: [CommonModule, FormsModule], host: {
2930
+ 'data-testid': 'monkey-input-code',
2931
+ '[attr.id]': 'id',
2932
+ '[id]': 'id'
2933
+ }, providers: [
2934
+ // eslint-disable-next-line no-use-before-define
2935
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputCodeComponent }
2936
+ ], template: "<div class=\"monkey-input-code\">\n @for (idx of inputIndices(); track $index; let i = $index) {\n <input\n #codeInput\n class=\"focus\"\n autocomplete=\"one-time-code\"\n [attr.type]=\"inputType()\"\n [disabled]=\"_disabled\"\n [attr.maxlength]=\"1\"\n [class.invalid]=\"isInvalid()\"\n [(ngModel)]=\"inputIndices()[i]\"\n (focus)=\"onFocus($event)\"\n (input)=\"onInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (paste)=\"onPaste($event)\"\n (blur)=\"onBlur()\"\n />\n }\n</div>\n", styles: [".monkey-input-code{display:flex;gap:12px}.monkey-input-code input{box-sizing:border-box;border-radius:4px;border:2px solid var(--mecx-color-gray-400);color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;letter-spacing:.14px;line-height:24px;text-align:center}.monkey-input-code input:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:2px}.monkey-input-code input.invalid{border:2px solid var(--mecx-color-error-700)}\n"] }]
2937
+ }], ctorParameters: () => [{ type: MonkeyFormFieldComponent, decorators: [{
1741
2938
  type: Optional
1742
- }] }] });
2939
+ }] }], propDecorators: { disabled: [{
2940
+ type: Input,
2941
+ args: [{ transform: booleanAttribute }]
2942
+ }], value: [{
2943
+ type: Input
2944
+ }], inputs: [{
2945
+ type: ViewChildren,
2946
+ args: ['codeInput']
2947
+ }] } });
2948
+
2949
+ /** ************************
2950
+ * Copyright Monkey Exchange. All Rights Reserved
2951
+ * This style guide was developed by Monkey Exchange Team
2952
+ * MIT Licence
2953
+ ************************* */
2954
+
2955
+ /** ************************
2956
+ * Copyright Monkey Exchange. All Rights Reserved
2957
+ * This style guide was developed by Monkey Exchange Team
2958
+ * MIT Licence
2959
+ ************************* */
2960
+ class MonkeyInputUploadComponent {
2961
+ get disabled() {
2962
+ if (this.ngControl && this.ngControl.disabled !== null) {
2963
+ return this.ngControl.disabled;
2964
+ }
2965
+ return this._disabled;
2966
+ }
2967
+ set disabled(value) {
2968
+ this._disabled = value;
2969
+ if (this.focused) {
2970
+ this.focused = false;
2971
+ this.stateChanges.next();
2972
+ }
2973
+ }
2974
+ get required() {
2975
+ return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
2976
+ }
2977
+ set required(value) {
2978
+ this._required = value;
2979
+ this.stateChanges.next();
2980
+ }
2981
+ set value(value) {
2982
+ if (this._value !== value && value !== undefined) {
2983
+ this._value = value;
2984
+ this._onChange(value);
2985
+ this._onTouched(value);
2986
+ }
2987
+ }
2988
+ get value() {
2989
+ return this._value;
2990
+ }
2991
+ constructor() {
2992
+ this.progress = 0;
2993
+ this.placeholder = '';
2994
+ this.maxSizeBytes = 5 * 1024 * 1024;
2995
+ this.allowedExtensions = ['.jpg', '.jpeg', '.png', '.pdf', '.txt', '.xls', '.xlsx'];
2996
+ this.loading = false;
2997
+ this.tabIndex = 0;
2998
+ this._disabled = false;
2999
+ this._value = null;
3000
+ this.onChange = new EventEmitter();
3001
+ this.ngControl = inject(NgControl, { self: true, optional: true });
3002
+ this.idGenerator = inject(IdGenerator);
3003
+ this.id = this.idGenerator.getId('monkey-input-upload-');
3004
+ this.focused = false;
3005
+ this.type = '';
3006
+ this.currency = false;
3007
+ this.percent = false;
3008
+ this.stateChanges = new Subject();
3009
+ this._onChange = () => { };
3010
+ this._onTouched = () => { };
3011
+ if (this.ngControl) {
3012
+ this.ngControl.valueAccessor = this;
3013
+ }
3014
+ }
3015
+ validateFileSize(file) {
3016
+ return file.size <= this.maxSizeBytes;
3017
+ }
3018
+ validateFileExtension(file) {
3019
+ if (!this.allowedExtensions || !this.allowedExtensions.length) {
3020
+ return true;
3021
+ }
3022
+ const fileExtension = getFileExtension(file.name);
3023
+ const allowedExts = this.allowedExtensions.map((ext) => {
3024
+ return ext.trim().replace('.', '').toLowerCase();
3025
+ });
3026
+ return allowedExts.includes(fileExtension);
3027
+ }
3028
+ onContainerClick(event) {
3029
+ if (!this.loading) {
3030
+ this.fileInput.nativeElement.click();
3031
+ }
3032
+ }
3033
+ _onFocus() {
3034
+ if (!this.disabled) {
3035
+ this.focused = true;
3036
+ this._onTouched();
3037
+ this.stateChanges.next();
3038
+ }
3039
+ }
3040
+ _onBlur() {
3041
+ this.focused = false;
3042
+ this.stateChanges.next();
3043
+ }
3044
+ ngAfterContentInit() { }
3045
+ ngOnChanges(changes) { }
3046
+ ngOnDestroy() { }
3047
+ registerOnChange(fn) {
3048
+ this._onChange = fn;
3049
+ }
3050
+ registerOnTouched(fn) {
3051
+ this._onTouched = fn;
3052
+ }
3053
+ setDisabledState(isDisabled) {
3054
+ this.disabled = isDisabled;
3055
+ if (this.fileInput) {
3056
+ this.fileInput.nativeElement.disabled = isDisabled;
3057
+ }
3058
+ }
3059
+ writeValue(value) {
3060
+ this.value = value;
3061
+ }
3062
+ reset() {
3063
+ if (this.fileInput) {
3064
+ this.fileInput.nativeElement.value = '';
3065
+ }
3066
+ }
3067
+ onFileSelected(event) {
3068
+ const input = event.target;
3069
+ this._onTouched();
3070
+ if (!input.files?.length) {
3071
+ return;
3072
+ }
3073
+ const file = input.files.item(0);
3074
+ if (this.fileInput) {
3075
+ this.fileInput.nativeElement.value = '';
3076
+ }
3077
+ if (!this.validateFileSize(file)) {
3078
+ this.ngControl?.control?.setErrors({
3079
+ maxFileSize: true,
3080
+ sizeAllowed: formatFileSize(this.maxSizeBytes)
3081
+ });
3082
+ this._onBlur();
3083
+ this.reset();
3084
+ return;
3085
+ }
3086
+ if (!this.validateFileExtension(file)) {
3087
+ this.ngControl?.control?.setErrors({
3088
+ fileExtension: true,
3089
+ extensionAllowed: this.allowedExtensions.join(', ')
3090
+ });
3091
+ this._onBlur();
3092
+ this.reset();
3093
+ return;
3094
+ }
3095
+ this._onBlur();
3096
+ if (this.onChange.observed) {
3097
+ this.onChange.emit({ component: this, file: file });
3098
+ }
3099
+ else {
3100
+ this.value = {
3101
+ fileName: file.name,
3102
+ file
3103
+ };
3104
+ }
3105
+ }
3106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3107
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyInputUploadComponent, isStandalone: true, selector: "monkey-input-upload", inputs: { progress: "progress", placeholder: "placeholder", maxSizeBytes: "maxSizeBytes", allowedExtensions: "allowedExtensions", loading: ["loading", "loading", booleanAttribute], tabIndex: "tabIndex", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange" }, host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-input-upload'", "class.mecx-input-upload-disabled": "_disabled", "class.mecx-input-upload-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-input-upload" }, providers: [
3108
+ // eslint-disable-next-line no-use-before-define
3109
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputUploadComponent }
3110
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
3111
+ <div class="mecx-input-upload-value" [class.has-value]="value">
3112
+ {{ value?.fileName || placeholder }}
3113
+ </div>
3114
+ <input
3115
+ (change)="onFileSelected($event)"
3116
+ type="file"
3117
+ class="file-input"
3118
+ #fileInput
3119
+ [accept]="allowedExtensions.join(',')"
3120
+ />
3121
+ @if (loading) {
3122
+ <div class="progress">
3123
+ <div class="progress-bar" [style.width.%]="progress"></div>
3124
+ </div>
3125
+ }
3126
+ `, isInline: true, styles: [":host{display:inline-flex;width:100%;min-width:0;cursor:pointer}:host .progress{position:absolute;left:0;bottom:0;right:0;height:2px;background-color:var(--mecx-color-gray-300);width:100%}:host .progress .progress-bar{background-color:var(--mecx-color-success-main);height:100%;transition:width .2s}:host:focus-visible,:host:focus{outline:none}:host .mecx-input-upload-value{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:24px}:host .mecx-input-upload-value.has-value{color:var(--mecx-color-gray-900)}:host.mecx-input-upload-disabled .mecx-input-upload-value{color:var(--mecx-color-gray-400)!important}:host .file-input{display:none}\n"] }); }
3127
+ }
3128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputUploadComponent, decorators: [{
3129
+ type: Component,
3130
+ args: [{ selector: 'monkey-input-upload', standalone: true, imports: [], template: `
3131
+ <div class="mecx-input-upload-value" [class.has-value]="value">
3132
+ {{ value?.fileName || placeholder }}
3133
+ </div>
3134
+ <input
3135
+ (change)="onFileSelected($event)"
3136
+ type="file"
3137
+ class="file-input"
3138
+ #fileInput
3139
+ [accept]="allowedExtensions.join(',')"
3140
+ />
3141
+ @if (loading) {
3142
+ <div class="progress">
3143
+ <div class="progress-bar" [style.width.%]="progress"></div>
3144
+ </div>
3145
+ }
3146
+ `, providers: [
3147
+ // eslint-disable-next-line no-use-before-define
3148
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputUploadComponent }
3149
+ ], host: {
3150
+ '[attr.data-testid]': "'monkey-input-upload'",
3151
+ class: 'mecx-input-upload',
3152
+ '[class.mecx-input-upload-disabled]': '_disabled',
3153
+ '[class.mecx-input-upload-focused]': 'focused',
3154
+ '[attr.id]': 'id',
3155
+ '[attr.tabindex]': 'disabled ? -1 : tabIndex',
3156
+ '(focus)': '_onFocus()',
3157
+ '(blur)': '_onBlur()'
3158
+ }, styles: [":host{display:inline-flex;width:100%;min-width:0;cursor:pointer}:host .progress{position:absolute;left:0;bottom:0;right:0;height:2px;background-color:var(--mecx-color-gray-300);width:100%}:host .progress .progress-bar{background-color:var(--mecx-color-success-main);height:100%;transition:width .2s}:host:focus-visible,:host:focus{outline:none}:host .mecx-input-upload-value{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:24px}:host .mecx-input-upload-value.has-value{color:var(--mecx-color-gray-900)}:host.mecx-input-upload-disabled .mecx-input-upload-value{color:var(--mecx-color-gray-400)!important}:host .file-input{display:none}\n"] }]
3159
+ }], ctorParameters: () => [], propDecorators: { fileInput: [{
3160
+ type: ViewChild,
3161
+ args: ['fileInput']
3162
+ }], progress: [{
3163
+ type: Input
3164
+ }], placeholder: [{
3165
+ type: Input
3166
+ }], maxSizeBytes: [{
3167
+ type: Input
3168
+ }], allowedExtensions: [{
3169
+ type: Input
3170
+ }], loading: [{
3171
+ type: Input,
3172
+ args: [{ transform: booleanAttribute }]
3173
+ }], tabIndex: [{
3174
+ type: Input
3175
+ }], disabled: [{
3176
+ type: Input,
3177
+ args: [{ transform: booleanAttribute }]
3178
+ }], required: [{
3179
+ type: Input,
3180
+ args: [{ transform: booleanAttribute }]
3181
+ }], value: [{
3182
+ type: Input
3183
+ }], onChange: [{
3184
+ type: Output
3185
+ }] } });
1743
3186
 
1744
3187
  /** ************************
1745
3188
  * Copyright Monkey Exchange. All Rights Reserved
1746
3189
  * This style guide was developed by Monkey Exchange Team
1747
3190
  * MIT Licence
1748
3191
  ************************* */
1749
- class MonkeyModalTitleDirective {
3192
+
3193
+ /** ************************
3194
+ * Copyright Monkey Exchange. All Rights Reserved
3195
+ * This style guide was developed by Monkey Exchange Team
3196
+ * MIT Licence
3197
+ ************************* */
3198
+ class MonkeyModalActionsDirective {
1750
3199
  constructor() {
1751
- this.id = inject(IdGenerator).getId('monkey-modal-title-');
3200
+ this.mkAlign = 'end';
3201
+ this.id = inject(IdGenerator).getId('monkey-modal-actions-');
1752
3202
  }
1753
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1754
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalTitleDirective, selector: "monkey-modal-title, [monkey-modal-title]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-title" }, ngImport: i0 }); }
3203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3204
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: { mkAlign: "mkAlign" }, host: { properties: { "class": "'mecx-modal-actions align-'+mkAlign", "attr.id": "id || null" } }, ngImport: i0 }); }
1755
3205
  }
1756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, decorators: [{
3206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, decorators: [{
1757
3207
  type: Directive,
1758
3208
  args: [{
1759
- selector: 'monkey-modal-title, [monkey-modal-title]',
3209
+ selector: 'monkey-modal-actions, [monkey-modal-actions]',
1760
3210
  host: {
1761
- class: 'mecx-modal-title',
3211
+ '[class]': `'mecx-modal-actions align-'+mkAlign`,
3212
+ '[attr.id]': 'id || null'
3213
+ }
3214
+ }]
3215
+ }], propDecorators: { mkAlign: [{
3216
+ type: Input
3217
+ }] } });
3218
+
3219
+ /** ************************
3220
+ * Copyright Monkey Exchange. All Rights Reserved
3221
+ * This style guide was developed by Monkey Exchange Team
3222
+ * MIT Licence
3223
+ ************************* */
3224
+ class MonkeyModalContentDirective {
3225
+ constructor() {
3226
+ this.id = inject(IdGenerator).getId('monkey-modal-content-');
3227
+ }
3228
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3229
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-content" }, ngImport: i0 }); }
3230
+ }
3231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, decorators: [{
3232
+ type: Directive,
3233
+ args: [{
3234
+ selector: 'monkey-modal-content, [monkey-modal-content]',
3235
+ host: {
3236
+ class: 'mecx-modal-content',
1762
3237
  '[attr.id]': 'id || null'
1763
3238
  }
1764
3239
  }]
@@ -1792,19 +3267,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1792
3267
  * This style guide was developed by Monkey Exchange Team
1793
3268
  * MIT Licence
1794
3269
  ************************* */
1795
- class MonkeyModalContentDirective {
3270
+ class MonkeyModalTitleDirective {
1796
3271
  constructor() {
1797
- this.id = inject(IdGenerator).getId('monkey-modal-content-');
3272
+ this.id = inject(IdGenerator).getId('monkey-modal-title-');
1798
3273
  }
1799
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1800
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-content" }, ngImport: i0 }); }
3274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3275
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalTitleDirective, selector: "monkey-modal-title, [monkey-modal-title]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-title" }, ngImport: i0 }); }
1801
3276
  }
1802
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, decorators: [{
3277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, decorators: [{
1803
3278
  type: Directive,
1804
3279
  args: [{
1805
- selector: 'monkey-modal-content, [monkey-modal-content]',
3280
+ selector: 'monkey-modal-title, [monkey-modal-title]',
1806
3281
  host: {
1807
- class: 'mecx-modal-content',
3282
+ class: 'mecx-modal-title',
1808
3283
  '[attr.id]': 'id || null'
1809
3284
  }
1810
3285
  }]
@@ -1815,27 +3290,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1815
3290
  * This style guide was developed by Monkey Exchange Team
1816
3291
  * MIT Licence
1817
3292
  ************************* */
1818
- class MonkeyModalActionsDirective {
1819
- constructor() {
1820
- this.mkAlign = 'end';
1821
- this.id = inject(IdGenerator).getId('monkey-modal-actions-');
3293
+ class MonkeyModalConfig {
3294
+ constructor() {
3295
+ this.panelClass = '';
3296
+ this.hasBackdrop = true;
3297
+ this.backdropClass = 'mecx-modal-overlay';
3298
+ this.disableClose = false;
3299
+ this.disableBackdropClose = false;
3300
+ this.width = '';
3301
+ this.height = '';
3302
+ this.position = 'center-center';
3303
+ this.data = null;
3304
+ this.closeOnNavigation = true;
3305
+ }
3306
+ }
3307
+
3308
+ /** ************************
3309
+ * Copyright Monkey Exchange. All Rights Reserved
3310
+ * This style guide was developed by Monkey Exchange Team
3311
+ * MIT Licence
3312
+ ************************* */
3313
+ class MonkeyModalRef {
3314
+ constructor(overlayRef, config) {
3315
+ this.overlayRef = overlayRef;
3316
+ this.config = config;
3317
+ this.closed = new Subject();
3318
+ this.id = config.id;
3319
+ this.icon = config.icon;
3320
+ this.disableClose = config.disableClose;
3321
+ this.disableBackdropClose = config.disableBackdropClose;
3322
+ this.closeOnNavigation = config.closeOnNavigation;
3323
+ this.backdropClick = overlayRef.backdropClick();
3324
+ this.keydownEvents = overlayRef.keydownEvents();
3325
+ this.outsidePointerEvents = overlayRef.outsidePointerEvents();
3326
+ if (!this.disableBackdropClose) {
3327
+ this.keydownEvents.subscribe((event) => {
3328
+ if (event.key === 'Escape' && !this.disableClose && !hasModifierKey(event)) {
3329
+ event.preventDefault();
3330
+ this.close(undefined);
3331
+ }
3332
+ });
3333
+ this.backdropClick.subscribe(() => {
3334
+ if (!this.disableClose) {
3335
+ this.close(undefined);
3336
+ }
3337
+ });
3338
+ }
3339
+ }
3340
+ close(result) {
3341
+ if (this.componentInstance) {
3342
+ const closedSubject = this.closed;
3343
+ this.overlayRef.dispose();
3344
+ closedSubject.next(result);
3345
+ closedSubject.complete();
3346
+ // eslint-disable-next-line no-multi-assign
3347
+ this.componentInstance = null;
3348
+ }
3349
+ }
3350
+ afterClosed() {
3351
+ return this.closed;
3352
+ }
3353
+ }
3354
+
3355
+ class MonkeyModalComponent {
3356
+ constructor(_elementRef, overlayRef, modalRef) {
3357
+ this._elementRef = _elementRef;
3358
+ this.overlayRef = overlayRef;
3359
+ this.modalRef = modalRef;
3360
+ this._navigationSubscription = null;
3361
+ this._router = inject(Router);
3362
+ // not to do
3363
+ }
3364
+ ngAfterViewInit() {
3365
+ if (this._elementRef) {
3366
+ this._elementRef.nativeElement.focus();
3367
+ }
3368
+ if (this.modalRef?.closeOnNavigation) {
3369
+ this._navigationSubscription = this._router.events.subscribe((event) => {
3370
+ if (event instanceof NavigationStart) {
3371
+ this.close();
3372
+ }
3373
+ });
3374
+ }
3375
+ }
3376
+ ngOnDestroy() {
3377
+ if (this._navigationSubscription) {
3378
+ this._navigationSubscription.unsubscribe();
3379
+ this._navigationSubscription = null;
3380
+ }
3381
+ }
3382
+ close() {
3383
+ this.modalRef?.close();
3384
+ }
3385
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.OverlayRef, optional: true }, { token: MonkeyModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
3386
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyModalComponent, selector: "monkey-modal", host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "modalRef?.id || null" }, classAttribute: "mecx-modal" }, ngImport: i0, template: `
3387
+ <div class="mecx-modal-header">
3388
+ <div class="mecx-modal-header-group">
3389
+ <div class="mecx-modal-header-title">
3390
+ @if (modalRef?.icon) {
3391
+ <div class="mecx-modal-header-icon">
3392
+ <monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
3393
+ </div>
3394
+ }
3395
+ <ng-content select="monkey-modal-title"></ng-content>
3396
+ <ng-content select="[monkey-modal-title]"></ng-content>
3397
+ </div>
3398
+
3399
+ <ng-content select="monkey-modal-subtitle"></ng-content>
3400
+ <ng-content select="[monkey-modal-subtitle]"></ng-content>
3401
+ </div>
3402
+ @if (!modalRef?.disableClose) {
3403
+ <monkey-icon-button
3404
+ size="sm"
3405
+ type="tertiary"
3406
+ icon="close"
3407
+ class="mecx-modal-close"
3408
+ (click)="close()"
3409
+ >
3410
+ x
3411
+ </monkey-icon-button>
3412
+ }
3413
+ </div>
3414
+ <ng-content select="monkey-modal-content"></ng-content>
3415
+ <ng-content select="[monkey-modal-content]"></ng-content>
3416
+ <ng-content select="monkey-modal-actions"></ng-content>
3417
+ <ng-content select="[monkey-modal-actions]"></ng-content>
3418
+ `, isInline: true, styles: ["monkey-modal{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"], dependencies: [{ kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
3419
+ }
3420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, decorators: [{
3421
+ type: Component,
3422
+ args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-modal', template: `
3423
+ <div class="mecx-modal-header">
3424
+ <div class="mecx-modal-header-group">
3425
+ <div class="mecx-modal-header-title">
3426
+ @if (modalRef?.icon) {
3427
+ <div class="mecx-modal-header-icon">
3428
+ <monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
3429
+ </div>
3430
+ }
3431
+ <ng-content select="monkey-modal-title"></ng-content>
3432
+ <ng-content select="[monkey-modal-title]"></ng-content>
3433
+ </div>
3434
+
3435
+ <ng-content select="monkey-modal-subtitle"></ng-content>
3436
+ <ng-content select="[monkey-modal-subtitle]"></ng-content>
3437
+ </div>
3438
+ @if (!modalRef?.disableClose) {
3439
+ <monkey-icon-button
3440
+ size="sm"
3441
+ type="tertiary"
3442
+ icon="close"
3443
+ class="mecx-modal-close"
3444
+ (click)="close()"
3445
+ >
3446
+ x
3447
+ </monkey-icon-button>
3448
+ }
3449
+ </div>
3450
+ <ng-content select="monkey-modal-content"></ng-content>
3451
+ <ng-content select="[monkey-modal-content]"></ng-content>
3452
+ <ng-content select="monkey-modal-actions"></ng-content>
3453
+ <ng-content select="[monkey-modal-actions]"></ng-content>
3454
+ `, host: {
3455
+ class: 'mecx-modal',
3456
+ tabindex: '-1',
3457
+ '[attr.id]': 'modalRef?.id || null'
3458
+ }, styles: ["monkey-modal{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"] }]
3459
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.OverlayRef, decorators: [{
3460
+ type: Optional
3461
+ }] }, { type: MonkeyModalRef, decorators: [{
3462
+ type: Optional
3463
+ }] }] });
3464
+
3465
+ /** ************************
3466
+ * Copyright Monkey Exchange. All Rights Reserved
3467
+ * This style guide was developed by Monkey Exchange Team
3468
+ * MIT Licence
3469
+ ************************* */
3470
+ const MECX_MODAL_DATA = new InjectionToken('mecxModalData');
3471
+ const MECX_MODAL_DEFAULT_CONFIG = new InjectionToken('mecxModalDefaultConfig');
3472
+ /**
3473
+ * @license
3474
+ * Copyright Google LLC All Rights Reserved.
3475
+ *
3476
+ * Use of this source code is governed by an MIT-style license that can be
3477
+ * found in the LICENSE file at https://angular.dev/license
3478
+ */
3479
+ function reverseForEach(items, callback) {
3480
+ let i = items.length;
3481
+ // eslint-disable-next-line no-plusplus
3482
+ while (i--) {
3483
+ callback(items[i]);
1822
3484
  }
1823
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1824
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: { mkAlign: "mkAlign" }, host: { properties: { "class": "'mecx-modal-actions align-'+mkAlign", "attr.id": "id || null" } }, ngImport: i0 }); }
1825
3485
  }
1826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, decorators: [{
1827
- type: Directive,
1828
- args: [{
1829
- selector: 'monkey-modal-actions, [monkey-modal-actions]',
1830
- host: {
1831
- '[class]': `'mecx-modal-actions align-'+mkAlign`,
1832
- '[attr.id]': 'id || null'
1833
- }
1834
- }]
1835
- }], propDecorators: { mkAlign: [{
1836
- type: Input
1837
- }] } });
1838
3486
 
3487
+ /** ************************
3488
+ * Copyright Monkey Exchange. All Rights Reserved
3489
+ * This style guide was developed by Monkey Exchange Team
3490
+ * MIT Licence
3491
+ ************************* */
1839
3492
  class MonkeyModalDefaultComponent {
1840
3493
  constructor(config, modalRef) {
1841
3494
  this.config = config;
@@ -1847,9 +3500,6 @@ class MonkeyModalDefaultComponent {
1847
3500
  this.okLabel = '';
1848
3501
  // not to do
1849
3502
  }
1850
- ngAfterViewInit() {
1851
- // console.log(this.data);
1852
- }
1853
3503
  onSubmit() {
1854
3504
  this.modalRef.close(true);
1855
3505
  }
@@ -1893,24 +3543,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1893
3543
  args: [MonkeyModalRef]
1894
3544
  }] }] });
1895
3545
 
1896
- /** ************************
1897
- * Copyright Monkey Exchange. All Rights Reserved
1898
- * This style guide was developed by Monkey Exchange Team
1899
- * MIT Licence
1900
- ************************* */
1901
- class MonkeyModalConfig {
1902
- constructor() {
1903
- this.panelClass = '';
1904
- this.hasBackdrop = true;
1905
- this.backdropClass = 'mecx-modal-overlay';
1906
- this.disableClose = false;
1907
- this.width = '';
1908
- this.height = '';
1909
- this.data = null;
1910
- this.closeOnNavigation = true;
1911
- }
1912
- }
1913
-
1914
3546
  /** ************************
1915
3547
  * Copyright Monkey Exchange. All Rights Reserved
1916
3548
  * This style guide was developed by Monkey Exchange Team
@@ -1970,9 +3602,45 @@ class MonkeyModalService {
1970
3602
  return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
1971
3603
  }
1972
3604
  getOverlayConfig(config) {
3605
+ let positionStrategy;
3606
+ const marginStrategy = '20px';
3607
+ if (config.position === 'left-top') {
3608
+ positionStrategy = this.overlay.position().global().left(marginStrategy).top(marginStrategy);
3609
+ }
3610
+ else if (config.position === 'center-top') {
3611
+ positionStrategy = this.overlay.position().global().centerHorizontally().top(marginStrategy);
3612
+ }
3613
+ else if (config.position === 'right-top') {
3614
+ positionStrategy = this.overlay.position().global().right(marginStrategy).top(marginStrategy);
3615
+ }
3616
+ else if (config.position === 'left-center') {
3617
+ positionStrategy = this.overlay.position().global().left(marginStrategy).centerVertically();
3618
+ }
3619
+ else if (config.position === 'center-center') {
3620
+ positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically();
3621
+ }
3622
+ else if (config.position === 'right-center') {
3623
+ positionStrategy = this.overlay.position().global().right(marginStrategy).centerVertically();
3624
+ }
3625
+ else if (config.position === 'left-bottom') {
3626
+ positionStrategy = this.overlay
3627
+ .position()
3628
+ .global()
3629
+ .left(marginStrategy)
3630
+ .bottom(marginStrategy);
3631
+ }
3632
+ else if (config.position === 'center-bottom') {
3633
+ positionStrategy = this.overlay.position().global().centerHorizontally().bottom('20px');
3634
+ }
3635
+ else if (config.position === 'right-bottom') {
3636
+ positionStrategy = this.overlay
3637
+ .position()
3638
+ .global()
3639
+ .right(marginStrategy)
3640
+ .bottom(marginStrategy);
3641
+ }
1973
3642
  const state = new OverlayConfig({
1974
- positionStrategy: config?.positionStrategy ||
1975
- this.overlay.position().global().centerHorizontally().centerVertically(),
3643
+ positionStrategy,
1976
3644
  scrollStrategy: this.overlay.scrollStrategies.block(),
1977
3645
  panelClass: config.panelClass,
1978
3646
  hasBackdrop: config.hasBackdrop,
@@ -1987,6 +3655,12 @@ class MonkeyModalService {
1987
3655
  if (config.backdropClass) {
1988
3656
  state.backdropClass = config.backdropClass;
1989
3657
  }
3658
+ if (!config.width && config.maxWidth) {
3659
+ state.width = '100%';
3660
+ }
3661
+ if (!config.height && config.maxHeight) {
3662
+ state.height = '100%';
3663
+ }
1990
3664
  return state;
1991
3665
  }
1992
3666
  createInjector(config, dialogRef, overlayRef, fallbackInjector) {
@@ -2010,6 +3684,9 @@ class MonkeyModalService {
2010
3684
  const injector = this.createInjector(config, modalRef, overlayRef, this.injector);
2011
3685
  const componentPortal = new ComponentPortal(component, null, injector);
2012
3686
  const componentRef = overlayRef.attach(componentPortal);
3687
+ const componentElement = componentRef.location.nativeElement;
3688
+ componentElement.style.width = '100%';
3689
+ componentElement.style.height = '100%';
2013
3690
  modalRef.componentInstance = componentRef.instance;
2014
3691
  this.openDialogs.push(modalRef);
2015
3692
  return modalRef;
@@ -2034,6 +3711,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2034
3711
  args: [{ providedIn: 'root' }]
2035
3712
  }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }] });
2036
3713
 
3714
+ /** ************************
3715
+ * Copyright Monkey Exchange. All Rights Reserved
3716
+ * This style guide was developed by Monkey Exchange Team
3717
+ * MIT Licence
3718
+ ************************* */
3719
+
2037
3720
  /** ************************
2038
3721
  * Copyright Monkey Exchange. All Rights Reserved
2039
3722
  * This style guide was developed by Monkey Exchange Team
@@ -2085,6 +3768,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2085
3768
  args: ['click', ['$event']]
2086
3769
  }] } });
2087
3770
 
3771
+ /** ************************
3772
+ * Copyright Monkey Exchange. All Rights Reserved
3773
+ * This style guide was developed by Monkey Exchange Team
3774
+ * MIT Licence
3775
+ ************************* */
3776
+
2088
3777
  /** ************************
2089
3778
  * Copyright Monkey Exchange. All Rights Reserved
2090
3779
  * This style guide was developed by Monkey Exchange Team
@@ -2137,6 +3826,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2137
3826
  type: Input
2138
3827
  }] } });
2139
3828
 
3829
+ /** ************************
3830
+ * Copyright Monkey Exchange. All Rights Reserved
3831
+ * This style guide was developed by Monkey Exchange Team
3832
+ * MIT Licence
3833
+ ************************* */
3834
+
2140
3835
  /** ************************
2141
3836
  * Copyright Monkey Exchange. All Rights Reserved
2142
3837
  * This style guide was developed by Monkey Exchange Team
@@ -2179,13 +3874,16 @@ class MonkeySelectComponent {
2179
3874
  this.formField = formField;
2180
3875
  this.tabIndex = 0;
2181
3876
  this.onChange = new EventEmitter();
3877
+ this.onSearch = new EventEmitter();
2182
3878
  this.placeholder = '';
2183
3879
  this.loading = false;
3880
+ this.showSearch = true;
3881
+ this.searchPlaceholder = '';
3882
+ this.callbackSearch = false;
2184
3883
  this._value = null;
2185
3884
  this.labelSelected = '';
2186
3885
  this.overlayRef = null;
2187
- this.isOpen = false;
2188
- this._destroyed = inject(MonkeyDestroyService);
3886
+ this._destroyRef = inject(DestroyRef);
2189
3887
  this.iconArrowDown = inject(MonkeyIconsService).arrowDown;
2190
3888
  this.idGenerator = inject(IdGenerator);
2191
3889
  this.ngControl = inject(NgControl, { self: true, optional: true });
@@ -2197,6 +3895,14 @@ class MonkeySelectComponent {
2197
3895
  this.percent = false;
2198
3896
  this.stateChanges = new Subject();
2199
3897
  this.type = '';
3898
+ this.searchHandle = new EventEmitter();
3899
+ this.searchDictionary = inject(MonkeyDictionaryService).get('NO-DATA');
3900
+ this.loadingDictionary = inject(MonkeyDictionaryService).get('LOADING');
3901
+ this.imgSearchNoData = inject(MonkeyIconsService).searchFail;
3902
+ this.imgSearch = inject(MonkeyIconsService).search;
3903
+ this.showSearchNoData = false;
3904
+ this.isOpen = false;
3905
+ this.searchData = '';
2200
3906
  this.onAnimationEnd = (event) => {
2201
3907
  if (event.toState === 'closed') {
2202
3908
  this.closeOverlay();
@@ -2231,30 +3937,6 @@ class MonkeySelectComponent {
2231
3937
  }
2232
3938
  });
2233
3939
  }
2234
- ngAfterContentInit() {
2235
- this.initializeOptions();
2236
- this.options.changes.subscribe((resp) => {
2237
- this.updateSelectedLabel();
2238
- this.initializeOptions();
2239
- this.changeSelected();
2240
- });
2241
- }
2242
- ngOnDestroy() {
2243
- if (this.overlayRef) {
2244
- this.overlayRef.dispose();
2245
- }
2246
- }
2247
- toggleDropdown() {
2248
- if (!this.disabled) {
2249
- if (this.isOpen) {
2250
- this.closeDropdown();
2251
- this._onTouched();
2252
- }
2253
- else {
2254
- this.openDropdown();
2255
- }
2256
- }
2257
- }
2258
3940
  openDropdown() {
2259
3941
  if (this.options?.length) {
2260
3942
  this.formField.control.disableToBeDirty = true;
@@ -2267,6 +3949,9 @@ class MonkeySelectComponent {
2267
3949
  this.isOpen = false;
2268
3950
  this.focused = false;
2269
3951
  this.formField.control.disableToBeDirty = false;
3952
+ if (!this.callbackSearch) {
3953
+ this.searchData = '';
3954
+ }
2270
3955
  }
2271
3956
  closeOverlay() {
2272
3957
  if (this.overlayRef) {
@@ -2274,6 +3959,30 @@ class MonkeySelectComponent {
2274
3959
  this.overlayRef = null;
2275
3960
  }
2276
3961
  }
3962
+ initializeWithOverlay() {
3963
+ if (this.showSearch) {
3964
+ const element = this.overlayRef?.overlayElement.querySelector(`#${this.id}-search`);
3965
+ this.options.forEach((opt) => {
3966
+ const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
3967
+ if (!element)
3968
+ return;
3969
+ element.style.display = '';
3970
+ });
3971
+ setTimeout(() => {
3972
+ element?.focus();
3973
+ }, 0);
3974
+ this.showSearchNoData = false;
3975
+ }
3976
+ setTimeout(() => {
3977
+ const selected = this.options.find((opt) => {
3978
+ return opt.selected;
3979
+ });
3980
+ if (selected) {
3981
+ const element = this.overlayRef?.overlayElement.querySelector(`#${selected.id}`);
3982
+ element?.scrollIntoView({ behavior: 'instant', block: 'center' });
3983
+ }
3984
+ }, 0);
3985
+ }
2277
3986
  createOverlay() {
2278
3987
  if (this.overlayRef) {
2279
3988
  return;
@@ -2318,10 +4027,75 @@ class MonkeySelectComponent {
2318
4027
  this.overlayRef.attach(portal);
2319
4028
  this.overlayRef
2320
4029
  .backdropClick()
2321
- .pipe(takeUntil(this._destroyed))
4030
+ .pipe(takeUntilDestroyed(this._destroyRef))
2322
4031
  .subscribe(() => {
2323
4032
  return this.closeDropdown();
2324
4033
  });
4034
+ this.initializeWithOverlay();
4035
+ }
4036
+ updateSelectedLabel() {
4037
+ const selectedOption = this.options.find((opt) => {
4038
+ return opt.value === this.value;
4039
+ });
4040
+ this.labelSelected = selectedOption ? selectedOption.displayContent : '';
4041
+ }
4042
+ executeSearch(search) {
4043
+ let found = false;
4044
+ this.options.forEach((opt) => {
4045
+ const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
4046
+ if (!element)
4047
+ return;
4048
+ const isMatch = normalizeStringToSearch(opt.displayContent).includes(normalizeStringToSearch(search));
4049
+ if (isMatch) {
4050
+ found = true;
4051
+ }
4052
+ element.style.display = isMatch ? '' : 'none';
4053
+ });
4054
+ this.repositionScroll();
4055
+ this.showSearchNoData = !found;
4056
+ }
4057
+ repositionScroll() {
4058
+ const overlayElement = this.overlayRef?.overlayElement.querySelector('.mecx-select-overlay');
4059
+ if (overlayElement) {
4060
+ overlayElement.scrollTop = 0;
4061
+ }
4062
+ }
4063
+ ngOnInit() {
4064
+ this.searchHandle
4065
+ .pipe(debounceTime(200), takeUntilDestroyed(this._destroyRef))
4066
+ .subscribe((search) => {
4067
+ if (this.callbackSearch) {
4068
+ this.onSearch.next(search);
4069
+ this.repositionScroll();
4070
+ }
4071
+ else {
4072
+ this.executeSearch(search);
4073
+ }
4074
+ });
4075
+ }
4076
+ ngAfterContentInit() {
4077
+ this.initializeOptions();
4078
+ this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((resp) => {
4079
+ this.updateSelectedLabel();
4080
+ this.initializeOptions();
4081
+ this.changeSelected();
4082
+ });
4083
+ }
4084
+ ngOnDestroy() {
4085
+ if (this.overlayRef) {
4086
+ this.overlayRef.dispose();
4087
+ }
4088
+ }
4089
+ toggleDropdown() {
4090
+ if (!this.disabled) {
4091
+ if (this.isOpen) {
4092
+ this.closeDropdown();
4093
+ this._onTouched();
4094
+ }
4095
+ else {
4096
+ this.openDropdown();
4097
+ }
4098
+ }
2325
4099
  }
2326
4100
  selectOption(option) {
2327
4101
  if (!option.disabled && !this.disabled) {
@@ -2335,12 +4109,6 @@ class MonkeySelectComponent {
2335
4109
  });
2336
4110
  }
2337
4111
  }
2338
- updateSelectedLabel() {
2339
- const selectedOption = this.options.find((opt) => {
2340
- return opt.value === this.value;
2341
- });
2342
- this.labelSelected = selectedOption ? selectedOption.displayContent : '';
2343
- }
2344
4112
  writeValue(value) {
2345
4113
  this.value = value;
2346
4114
  this.changeSelected();
@@ -2383,12 +4151,21 @@ class MonkeySelectComponent {
2383
4151
  this.stateChanges.next();
2384
4152
  }
2385
4153
  }
4154
+ onHandleSearch(event) {
4155
+ try {
4156
+ const { value } = event.target;
4157
+ const handled = sanitizeString(value);
4158
+ this.searchHandle.next(handled || '');
4159
+ }
4160
+ catch (e) {
4161
+ // not to do
4162
+ }
4163
+ }
2386
4164
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, deps: [{ token: i1.Overlay }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2387
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-select" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-select-disabled": "_disabled", "class.mecx-select-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-select" }, providers: [
4165
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], showSearch: ["showSearch", "showSearch", booleanAttribute], searchPlaceholder: "searchPlaceholder", callbackSearch: ["callbackSearch", "callbackSearch", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-select" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-select-disabled": "_disabled", "class.mecx-select-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-select" }, providers: [
2388
4166
  // eslint-disable-next-line no-use-before-define
2389
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent },
2390
- MonkeyDestroyService
2391
- ], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }, { propertyName: "overlayEl", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden auto;border-radius:8px;box-shadow:0 16px 32px #d6d6d694;max-height:360px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], animations: [
4167
+ { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
4168
+ ], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }, { propertyName: "overlayEl", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <div class=\"mecx-select-search-icon\" [innerHTML]=\"imgSearch\"></div>\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <div class=\"mecx-select-search-no-data-icon\" [innerHTML]=\"imgSearchNoData\"></div>\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px #d6d6d694}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [
2392
4169
  trigger('animation', [
2393
4170
  transition(':enter', [
2394
4171
  style({
@@ -2410,10 +4187,9 @@ class MonkeySelectComponent {
2410
4187
  }
2411
4188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, decorators: [{
2412
4189
  type: Component,
2413
- args: [{ selector: 'monkey-select', standalone: true, imports: [ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
4190
+ args: [{ selector: 'monkey-select', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
2414
4191
  // eslint-disable-next-line no-use-before-define
2415
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent },
2416
- MonkeyDestroyService
4192
+ { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
2417
4193
  ], animations: [
2418
4194
  trigger('animation', [
2419
4195
  transition(':enter', [
@@ -2441,7 +4217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2441
4217
  '[attr.tabindex]': 'disabled ? -1 : tabIndex',
2442
4218
  '(focus)': '_onFocus()',
2443
4219
  '(blur)': '_onBlur()'
2444
- }, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden auto;border-radius:8px;box-shadow:0 16px 32px #d6d6d694;max-height:360px}\n"] }]
4220
+ }, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <div class=\"mecx-select-search-icon\" [innerHTML]=\"imgSearch\"></div>\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <div class=\"mecx-select-search-no-data-icon\" [innerHTML]=\"imgSearchNoData\"></div>\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px #d6d6d694}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"] }]
2445
4221
  }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: MonkeyFormFieldComponent, decorators: [{
2446
4222
  type: Optional
2447
4223
  }] }], propDecorators: { overlayTemplate: [{
@@ -2460,12 +4236,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2460
4236
  type: Input
2461
4237
  }], onChange: [{
2462
4238
  type: Output
4239
+ }], onSearch: [{
4240
+ type: Output
2463
4241
  }], placeholder: [{
2464
4242
  type: Input,
2465
4243
  args: [{ required: true }]
2466
4244
  }], loading: [{
2467
4245
  type: Input,
2468
4246
  args: [{ transform: booleanAttribute }]
4247
+ }], showSearch: [{
4248
+ type: Input,
4249
+ args: [{ transform: booleanAttribute }]
4250
+ }], searchPlaceholder: [{
4251
+ type: Input
4252
+ }], callbackSearch: [{
4253
+ type: Input,
4254
+ args: [{ transform: booleanAttribute }]
2469
4255
  }], disabled: [{
2470
4256
  type: Input,
2471
4257
  args: [{ transform: booleanAttribute }]
@@ -2476,6 +4262,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2476
4262
  type: Input
2477
4263
  }] } });
2478
4264
 
4265
+ /** ************************
4266
+ * Copyright Monkey Exchange. All Rights Reserved
4267
+ * This style guide was developed by Monkey Exchange Team
4268
+ * MIT Licence
4269
+ ************************* */
4270
+
2479
4271
  /** ************************
2480
4272
  * Copyright Monkey Exchange. All Rights Reserved
2481
4273
  * This style guide was developed by Monkey Exchange Team
@@ -2516,6 +4308,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2516
4308
  type: Input
2517
4309
  }] } });
2518
4310
 
4311
+ /** ************************
4312
+ * Copyright Monkey Exchange. All Rights Reserved
4313
+ * This style guide was developed by Monkey Exchange Team
4314
+ * MIT Licence
4315
+ ************************* */
4316
+
2519
4317
  /** ************************
2520
4318
  * Copyright Monkey Exchange. All Rights Reserved
2521
4319
  * This style guide was developed by Monkey Exchange Team
@@ -2615,7 +4413,7 @@ class MonkeyPaginationSizeComponent {
2615
4413
  this.id = this.id;
2616
4414
  }
2617
4415
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2618
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear>\n <monkey-select placeholder=\"''\" [ngModel]=\"size\" (onChange)=\"onChange.next($event)\">\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "disabled", "required", "value"], outputs: ["onChange"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideClear"], exportAs: ["monkeyFormField"] }], encapsulation: i0.ViewEncapsulation.None }); }
4416
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "callbackSearch", "disabled", "required", "value"], outputs: ["onChange", "onSearch"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }], encapsulation: i0.ViewEncapsulation.None }); }
2619
4417
  }
2620
4418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, decorators: [{
2621
4419
  type: Component,
@@ -2630,7 +4428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2630
4428
  'data-testid': 'monkey-pagination-size',
2631
4429
  '[attr.id]': 'id',
2632
4430
  '[id]': 'id'
2633
- }, template: "<ng-content></ng-content>\n<monkey-form-field hideClear>\n <monkey-select placeholder=\"''\" [ngModel]=\"size\" (onChange)=\"onChange.next($event)\">\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"] }]
4431
+ }, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"] }]
2634
4432
  }], ctorParameters: () => [], propDecorators: { size: [{
2635
4433
  type: Input,
2636
4434
  args: [{ required: true }]
@@ -2731,7 +4529,7 @@ class MonkeyTableComponent {
2731
4529
  }
2732
4530
  }
2733
4531
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2734
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTableComponent, selector: "monkey-table, table[monkey-table]", inputs: { scroll: "scroll", loading: "loading", loadingRef: "loadingRef" }, outputs: { sortChange: "sortChange" }, host: { properties: { "class.disabled": "this.loading" } }, queries: [{ propertyName: "_paginationActionChildren", predicate: MonkeyPaginationActionComponent, descendants: true }, { propertyName: "_paginationSizeChildren", predicate: MonkeyPaginationSizeComponent, descendants: true }], viewQueries: [{ propertyName: "_headerEl", first: true, predicate: ["header"], descendants: true, static: true }, { propertyName: "_tableHeaderEl", first: true, predicate: ["tableHeader"], descendants: true, static: true }, { propertyName: "_tableContentEl", first: true, predicate: ["tableContent"], descendants: true, static: true }, { propertyName: "_tableLoadingEl", first: true, predicate: ["tableLoading"], descendants: true, static: true }, { propertyName: "_tableScrollEl", first: true, predicate: ["tableScroll"], descendants: true, static: true }], exportAs: ["monkeyTable"], usesOnChanges: true, ngImport: i0, template: "<div class=\"mecx-table-container\">\n <div class=\"mecx-table-wrapper\">\n <div class=\"mecx-table-header\" #header>\n <table #tableHeader>\n <ng-content select=\"thead\"></ng-content>\n </table>\n </div>\n <div class=\"mecx-inner-scroll\" #tableScroll>\n <table #tableContent>\n <ng-content select=\"tbody\"></ng-content>\n </table>\n\n @if (loadingRef && loading) {\n <table #tableLoading>\n <ng-container *ngTemplateOutlet=\"loadingRef\"></ng-container>\n </table>\n }\n </div>\n </div>\n <div class=\"mecx-table-footer\">\n <ng-content select=\"monkey-pagination-size\"></ng-content>\n <div class=\"mecx-table-actions\">\n <ng-content select=\"monkey-pagination-label\"></ng-content>\n <ng-content select=\"monkey-pagination-action\"></ng-content>\n </div>\n </div>\n</div>\n", styles: ["monkey-table{position:relative;display:block;table-layout:fixed;border:2px solid var(--mecx-color-gray-400);border-radius:16px}.mecx-table-container{scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-table-wrapper{display:block}.mecx-table-header{overflow-x:hidden;overflow-y:scroll;white-space:nowrap;border-bottom:2px solid var(--mecx-color-gray-300);background:var(--mecx-color-gray-50);border-top-left-radius:16px;border-top-right-radius:16px}.mecx-table-header table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;height:48px}.mecx-table-header table thead{display:table-header-group;vertical-align:middle;unicode-bidi:isolate}.mecx-table-header table th{text-align:left;vertical-align:middle;padding:8px 12px;color:var(--mecx-color-gray-700);font-size:16px;font-weight:700;font-style:normal;white-space:nowrap;will-change:transform;backface-visibility:hidden;line-height:24px}.mecx-table-header table th svg{opacity:0;transform:opacity 2s ease-in-out}.mecx-table-header table th:hover svg{opacity:1}.mecx-table-header table .mecx-column-checked svg{opacity:1}.mecx-table-header .mecx-column-stick{position:sticky;background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-table-header .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-table-header .mecx-column-checked{position:sticky;left:0;border-right:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-inner-scroll{scroll-behavior:smooth}.mecx-inner-scroll table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;border-spacing:0px}.mecx-inner-scroll table td{text-align:left;border-bottom:2px solid var(--mecx-color-gray-100);padding:8px 12px;vertical-align:middle}.mecx-inner-scroll .mecx-column-stick{position:sticky;right:0;z-index:1;background:#fff}.mecx-inner-scroll .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-inner-scroll .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-inner-scroll .mecx-column-checked{position:sticky;left:0;z-index:1;border-right:1px solid var(--mecx-color-gray-200);background:#fff}.mecx-inner-scroll .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-table-footer{border-top:1px solid var(--mecx-color-gray-200);padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.mecx-table-footer .mecx-table-actions{display:flex;gap:8px;align-items:center}.mecx-column-sortable-disabled,.mecx-column-checked-disabled{pointer-events:none}.mecx-column-expansible{border-left:none!important;border-right:none!important}@keyframes rotate-right{0%{transform:rotate(0)}to{transform:rotate(90deg)}}@keyframes rotate-left{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.mecx-column-expansible .rotate-animation-right{animation:rotate-right .3s ease-in-out}.mecx-column-expansible .rotate-animation-left{animation:rotate-left .3s ease-in-out}\n"], encapsulation: i0.ViewEncapsulation.None }); }
4532
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTableComponent, selector: "monkey-table, table[monkey-table]", inputs: { scroll: "scroll", loading: "loading", loadingRef: "loadingRef" }, outputs: { sortChange: "sortChange" }, host: { properties: { "class.disabled": "this.loading" } }, queries: [{ propertyName: "_paginationActionChildren", predicate: MonkeyPaginationActionComponent, descendants: true }, { propertyName: "_paginationSizeChildren", predicate: MonkeyPaginationSizeComponent, descendants: true }], viewQueries: [{ propertyName: "_headerEl", first: true, predicate: ["header"], descendants: true, static: true }, { propertyName: "_tableHeaderEl", first: true, predicate: ["tableHeader"], descendants: true, static: true }, { propertyName: "_tableContentEl", first: true, predicate: ["tableContent"], descendants: true, static: true }, { propertyName: "_tableLoadingEl", first: true, predicate: ["tableLoading"], descendants: true, static: true }, { propertyName: "_tableScrollEl", first: true, predicate: ["tableScroll"], descendants: true, static: true }], exportAs: ["monkeyTable"], usesOnChanges: true, ngImport: i0, template: "<div class=\"mecx-table-container\">\n <div class=\"mecx-table-wrapper\">\n <div class=\"mecx-table-header\" #header>\n <table #tableHeader>\n <ng-content select=\"thead\"></ng-content>\n </table>\n </div>\n <div class=\"mecx-inner-scroll\" #tableScroll>\n <table #tableContent>\n <ng-content select=\"tbody\"></ng-content>\n </table>\n\n @if (loadingRef && loading) {\n <table #tableLoading>\n <ng-container *ngTemplateOutlet=\"loadingRef\"></ng-container>\n </table>\n }\n </div>\n </div>\n <div class=\"mecx-table-footer\">\n <ng-content select=\"monkey-pagination-size\"></ng-content>\n <div class=\"mecx-table-actions\">\n <ng-content select=\"monkey-pagination-label\"></ng-content>\n <ng-content select=\"monkey-pagination-action\"></ng-content>\n </div>\n </div>\n</div>\n", styles: ["monkey-table{position:relative;display:block;table-layout:fixed;border:2px solid var(--mecx-color-gray-400);border-radius:16px}.mecx-table-container{scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-table-wrapper{display:block}.mecx-table-header{overflow-x:hidden;overflow-y:scroll;white-space:nowrap;border-bottom:2px solid var(--mecx-color-gray-300);background:var(--mecx-color-gray-50);border-top-left-radius:16px;border-top-right-radius:16px}.mecx-table-header table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;height:48px}.mecx-table-header table thead{display:table-header-group;vertical-align:middle;unicode-bidi:isolate}.mecx-table-header table th{text-align:left;vertical-align:middle;padding:8px 12px;color:var(--mecx-color-gray-700);font-size:16px;font-weight:700;font-style:normal;white-space:nowrap;will-change:transform;backface-visibility:hidden;line-height:24px}.mecx-table-header table th svg{opacity:0;transform:opacity 2s ease-in-out}.mecx-table-header table th:hover svg{opacity:1}.mecx-table-header table .mecx-column-checked svg{opacity:1}.mecx-table-header .mecx-column-stick{position:sticky;background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-table-header .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-table-header .mecx-column-checked{position:sticky;left:0;border-right:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-inner-scroll{scroll-behavior:smooth}.mecx-inner-scroll table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;border-spacing:0px}.mecx-inner-scroll table td{text-align:left;border-bottom:2px solid var(--mecx-color-gray-100);padding:8px 12px;vertical-align:middle}.mecx-inner-scroll .mecx-column-stick{position:sticky;right:0;z-index:1;background:#fff}.mecx-inner-scroll .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-inner-scroll .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-inner-scroll .mecx-column-checked{position:sticky;left:0;z-index:1;border-right:1px solid var(--mecx-color-gray-200);background:#fff}.mecx-inner-scroll .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-table-footer{border-top:1px solid var(--mecx-color-gray-200);padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.mecx-table-footer .mecx-table-actions{display:flex;gap:8px;align-items:center}.mecx-column-sortable-disabled,.mecx-column-checked-disabled{pointer-events:none}.mecx-column-expansible{border-left:none!important;border-right:none!important}@keyframes rotate-right{0%{transform:rotate(0)}to{transform:rotate(90deg)}}@keyframes rotate-left{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.mecx-column-expansible .rotate-animation-right{animation:rotate-right .3s ease-in-out}.mecx-column-expansible .rotate-animation-left{animation:rotate-left .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
2735
4533
  }
2736
4534
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, decorators: [{
2737
4535
  type: Component,
@@ -3131,7 +4929,8 @@ class MonkeyTableModule {
3131
4929
  MonkeyColumnStick,
3132
4930
  MonkeyColumnChecked,
3133
4931
  MonkeyColumnSortable,
3134
- MonkeyColumnExpansible], imports: [MonkeyButtonComponent,
4932
+ MonkeyColumnExpansible], imports: [CommonModule,
4933
+ MonkeyButtonComponent,
3135
4934
  MonkeyPaginationSizeComponent,
3136
4935
  MonkeyPaginationLabelComponent,
3137
4936
  MonkeyPaginationActionComponent], exports: [MonkeyTableComponent,
@@ -3139,7 +4938,8 @@ class MonkeyTableModule {
3139
4938
  MonkeyColumnChecked,
3140
4939
  MonkeyColumnSortable,
3141
4940
  MonkeyColumnExpansible] }); }
3142
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableModule, imports: [MonkeyButtonComponent,
4941
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableModule, imports: [CommonModule,
4942
+ MonkeyButtonComponent,
3143
4943
  MonkeyPaginationSizeComponent,
3144
4944
  MonkeyPaginationActionComponent] }); }
3145
4945
  }
@@ -3147,6 +4947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3147
4947
  type: NgModule,
3148
4948
  args: [{
3149
4949
  imports: [
4950
+ CommonModule,
3150
4951
  MonkeyButtonComponent,
3151
4952
  MonkeyPaginationSizeComponent,
3152
4953
  MonkeyPaginationLabelComponent,
@@ -3169,6 +4970,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3169
4970
  }]
3170
4971
  }] });
3171
4972
 
4973
+ /** ************************
4974
+ * Copyright Monkey Exchange. All Rights Reserved
4975
+ * This style guide was developed by Monkey Exchange Team
4976
+ * MIT Licence
4977
+ ************************* */
4978
+
4979
+ /** ************************
4980
+ * Copyright Monkey Exchange. All Rights Reserved
4981
+ * This style guide was developed by Monkey Exchange Team
4982
+ * MIT Licence
4983
+ ************************* */
3172
4984
  class MonkeyToastComponent {
3173
4985
  get id() {
3174
4986
  return this._id;
@@ -3200,7 +5012,7 @@ class MonkeyToastComponent {
3200
5012
  }
3201
5013
  }
3202
5014
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3203
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyToastComponent, isStandalone: true, selector: "monkey-toast", inputs: { message: "message", icon: "icon", type: "type", isClosable: ["isClosable", "isClosable", booleanAttribute], actionLabel: "actionLabel", actionIcon: "actionIcon", id: "id" }, outputs: { onActionClick: "onActionClick", onClose: "onClose" }, host: { attributes: { "data-testid": "monkey-toast" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "attr.id": "id", "id": "id", "class": "this.class", "animation": "this.animationState" } }, ngImport: i0, template: "<div class=\"content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"action\">\n <monkey-button class=\"btn-action\" type=\"tertiary\" size=\"sm\" (click)=\"onActionClick.emit(id)\">\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"divider\"></div>\n <div class=\"close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .action .btn-action{margin:0!important}monkey-toast .action .btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .action .btn-action .mecx-button .content{padding:12px 8px}monkey-toast .action .btn-action .mecx-button:hover{color:#fff!important}monkey-toast .divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .close{display:flex}monkey-toast .close .btn-close{margin:0!important}monkey-toast .close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"], dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
5015
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyToastComponent, isStandalone: true, selector: "monkey-toast", inputs: { message: "message", icon: "icon", type: "type", isClosable: ["isClosable", "isClosable", booleanAttribute], actionLabel: "actionLabel", actionIcon: "actionIcon", id: "id" }, outputs: { onActionClick: "onActionClick", onClose: "onClose" }, host: { attributes: { "data-testid": "monkey-toast" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "attr.id": "id", "id": "id", "class": "this.class", "animation": "this.animationState" } }, ngImport: i0, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"], dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
3204
5016
  }
3205
5017
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastComponent, decorators: [{
3206
5018
  type: Component,
@@ -3209,7 +5021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3209
5021
  '(animationend)': 'onAnimationEnd($event)',
3210
5022
  '[attr.id]': 'id',
3211
5023
  '[id]': 'id'
3212
- }, template: "<div class=\"content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"action\">\n <monkey-button class=\"btn-action\" type=\"tertiary\" size=\"sm\" (click)=\"onActionClick.emit(id)\">\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"divider\"></div>\n <div class=\"close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .action .btn-action{margin:0!important}monkey-toast .action .btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .action .btn-action .mecx-button .content{padding:12px 8px}monkey-toast .action .btn-action .mecx-button:hover{color:#fff!important}monkey-toast .divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .close{display:flex}monkey-toast .close .btn-close{margin:0!important}monkey-toast .close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"] }]
5024
+ }, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"] }]
3213
5025
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { message: [{
3214
5026
  type: Input
3215
5027
  }], icon: [{
@@ -3237,6 +5049,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3237
5049
  args: ['animation']
3238
5050
  }] } });
3239
5051
 
5052
+ /** ************************
5053
+ * Copyright Monkey Exchange. All Rights Reserved
5054
+ * This style guide was developed by Monkey Exchange Team
5055
+ * MIT Licence
5056
+ ************************* */
5057
+
5058
+ /** ************************
5059
+ * Copyright Monkey Exchange. All Rights Reserved
5060
+ * This style guide was developed by Monkey Exchange Team
5061
+ * MIT Licence
5062
+ ************************* */
3240
5063
  class MonkeyToggleComponent {
3241
5064
  set value(_) {
3242
5065
  if (typeof _ === 'string') {
@@ -3301,6 +5124,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3301
5124
  args: ['click', ['$event']]
3302
5125
  }] } });
3303
5126
 
5127
+ /** ************************
5128
+ * Copyright Monkey Exchange. All Rights Reserved
5129
+ * This style guide was developed by Monkey Exchange Team
5130
+ * MIT Licence
5131
+ ************************* */
5132
+
3304
5133
  /** ************************
3305
5134
  * Copyright Monkey Exchange. All Rights Reserved
3306
5135
  * This style guide was developed by Monkey Exchange Team
@@ -3312,17 +5141,23 @@ class MonkeyToggleLineButtonComponent {
3312
5141
  this.onChange = new EventEmitter();
3313
5142
  }
3314
5143
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3315
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyToggleLineButtonComponent, isStandalone: true, selector: "monkey-toggle-line-button", inputs: { disabled: "disabled" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<input\n type=\"radio\"\n [name]=\"name\"\n [id]=\"value + '-' + name\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onChange.emit(this.value)\"\n/>\n<label [for]=\"value + '-' + name\">\n <ng-content></ng-content>\n</label>\n", styles: ["monkey-toggle-line-button{display:flex;width:100%}monkey-toggle-line-button input{display:none}monkey-toggle-line-button label{display:flex;box-sizing:border-box;gap:8px;background:unset;height:100%;width:100%;align-items:center;justify-content:center;letter-spacing:.03em;text-align:center;color:var(--mecx-color-gray-900);cursor:pointer;padding:4px 8px;border:2px solid var(--mecx-color-gray-400);transition:all .2s ease-in-out}monkey-toggle-line-button label monkey-icon{transition:all .2s ease-in-out}monkey-toggle-line-button input:disabled+label{color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-toggle-line-button input:disabled+label monkey-icon{color:var(--mecx-color-gray-400)!important}monkey-toggle-line-button input:checked+label[for*=true]{background-color:#00875a;color:#fff}monkey-toggle-line-button input:checked+label[for*=true] monkey-icon{color:#fff}monkey-toggle-line-button input:checked+label[for*=false]{background-color:#db0505;color:#fff}monkey-toggle-line-button input:checked+label[for*=false] monkey-icon{color:#fff}\n"], encapsulation: i0.ViewEncapsulation.None }); }
5144
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyToggleLineButtonComponent, isStandalone: true, selector: "monkey-toggle-line-button", inputs: { disabled: "disabled" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<input\n type=\"radio\"\n [name]=\"name\"\n [id]=\"value + '-' + name\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onChange.emit(this.value)\"\n/>\n<label [for]=\"value + '-' + name\">\n <ng-content></ng-content>\n</label>\n", styles: ["monkey-toggle-line-button{display:flex;width:100%}monkey-toggle-line-button input{display:none}monkey-toggle-line-button label{display:flex;box-sizing:border-box;gap:8px;background:unset;height:100%;width:100%;align-items:center;justify-content:center;letter-spacing:.03em;text-align:center;color:var(--mecx-color-gray-900);cursor:pointer;padding:4px 8px;border:2px solid var(--mecx-color-gray-400);transition:all .2s ease-in-out}monkey-toggle-line-button label monkey-icon{transition:all .2s ease-in-out}monkey-toggle-line-button input:disabled+label{color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-toggle-line-button input:disabled+label monkey-icon{color:var(--mecx-color-gray-400)!important}monkey-toggle-line-button input:checked+label[for*=true]{background-color:var(--mecx-color-success-main);color:#fff}monkey-toggle-line-button input:checked+label[for*=true] monkey-icon{color:#fff}monkey-toggle-line-button input:checked+label[for*=false]{background-color:var(--mecx-color-error-700);color:#fff}monkey-toggle-line-button input:checked+label[for*=false] monkey-icon{color:#fff}\n"], encapsulation: i0.ViewEncapsulation.None }); }
3316
5145
  }
3317
5146
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineButtonComponent, decorators: [{
3318
5147
  type: Component,
3319
- args: [{ selector: 'monkey-toggle-line-button', standalone: true, encapsulation: ViewEncapsulation.None, template: "<input\n type=\"radio\"\n [name]=\"name\"\n [id]=\"value + '-' + name\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onChange.emit(this.value)\"\n/>\n<label [for]=\"value + '-' + name\">\n <ng-content></ng-content>\n</label>\n", styles: ["monkey-toggle-line-button{display:flex;width:100%}monkey-toggle-line-button input{display:none}monkey-toggle-line-button label{display:flex;box-sizing:border-box;gap:8px;background:unset;height:100%;width:100%;align-items:center;justify-content:center;letter-spacing:.03em;text-align:center;color:var(--mecx-color-gray-900);cursor:pointer;padding:4px 8px;border:2px solid var(--mecx-color-gray-400);transition:all .2s ease-in-out}monkey-toggle-line-button label monkey-icon{transition:all .2s ease-in-out}monkey-toggle-line-button input:disabled+label{color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-toggle-line-button input:disabled+label monkey-icon{color:var(--mecx-color-gray-400)!important}monkey-toggle-line-button input:checked+label[for*=true]{background-color:#00875a;color:#fff}monkey-toggle-line-button input:checked+label[for*=true] monkey-icon{color:#fff}monkey-toggle-line-button input:checked+label[for*=false]{background-color:#db0505;color:#fff}monkey-toggle-line-button input:checked+label[for*=false] monkey-icon{color:#fff}\n"] }]
5148
+ args: [{ selector: 'monkey-toggle-line-button', standalone: true, encapsulation: ViewEncapsulation.None, template: "<input\n type=\"radio\"\n [name]=\"name\"\n [id]=\"value + '-' + name\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onChange.emit(this.value)\"\n/>\n<label [for]=\"value + '-' + name\">\n <ng-content></ng-content>\n</label>\n", styles: ["monkey-toggle-line-button{display:flex;width:100%}monkey-toggle-line-button input{display:none}monkey-toggle-line-button label{display:flex;box-sizing:border-box;gap:8px;background:unset;height:100%;width:100%;align-items:center;justify-content:center;letter-spacing:.03em;text-align:center;color:var(--mecx-color-gray-900);cursor:pointer;padding:4px 8px;border:2px solid var(--mecx-color-gray-400);transition:all .2s ease-in-out}monkey-toggle-line-button label monkey-icon{transition:all .2s ease-in-out}monkey-toggle-line-button input:disabled+label{color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-toggle-line-button input:disabled+label monkey-icon{color:var(--mecx-color-gray-400)!important}monkey-toggle-line-button input:checked+label[for*=true]{background-color:var(--mecx-color-success-main);color:#fff}monkey-toggle-line-button input:checked+label[for*=true] monkey-icon{color:#fff}monkey-toggle-line-button input:checked+label[for*=false]{background-color:var(--mecx-color-error-700);color:#fff}monkey-toggle-line-button input:checked+label[for*=false] monkey-icon{color:#fff}\n"] }]
3320
5149
  }], propDecorators: { disabled: [{
3321
5150
  type: Input
3322
5151
  }], onChange: [{
3323
5152
  type: Output
3324
5153
  }] } });
3325
5154
 
5155
+ /** ************************
5156
+ * Copyright Monkey Exchange. All Rights Reserved
5157
+ * This style guide was developed by Monkey Exchange Team
5158
+ * MIT Licence
5159
+ ************************* */
5160
+
3326
5161
  /** ************************
3327
5162
  * Copyright Monkey Exchange. All Rights Reserved
3328
5163
  * This style guide was developed by Monkey Exchange Team
@@ -3372,7 +5207,7 @@ class MonkeyToggleLineComponent {
3372
5207
  this.subscriptions.unsubscribe();
3373
5208
  }
3374
5209
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3375
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyToggleLineComponent, isStandalone: true, selector: "monkey-toggle-line", inputs: { value: "value", name: "name", size: "size", disabled: ["disabled", "disabled", booleanAttribute], id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-toggle-line" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, queries: [{ propertyName: "radioButtons", predicate: MonkeyToggleLineButtonComponent }], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["monkey-toggle-line{display:inline-flex;min-width:250px}monkey-toggle-line :first-child label{border-radius:8px 0 0 8px;border-right:none!important}monkey-toggle-line :first-child label monkey-icon{color:#db0505}monkey-toggle-line :last-child label{border-radius:0 8px 8px 0}monkey-toggle-line :last-child label monkey-icon{color:#00875a}monkey-toggle-line.lg{min-height:48px}monkey-toggle-line.lg label{font-size:16px}monkey-toggle-line.md{min-height:40px}monkey-toggle-line.md label{font-size:14px}monkey-toggle-line.sm{min-height:32px}monkey-toggle-line.sm label{font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
5210
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyToggleLineComponent, isStandalone: true, selector: "monkey-toggle-line", inputs: { value: "value", name: "name", size: "size", disabled: ["disabled", "disabled", booleanAttribute], id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-toggle-line" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, queries: [{ propertyName: "radioButtons", predicate: MonkeyToggleLineButtonComponent }], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["monkey-toggle-line{display:inline-flex;min-width:250px}monkey-toggle-line :first-child label{border-radius:8px 0 0 8px;border-right:none!important}monkey-toggle-line :first-child label monkey-icon{color:var(--mecx-color-error-700)}monkey-toggle-line :last-child label{border-radius:0 8px 8px 0}monkey-toggle-line :last-child label monkey-icon{color:var(--mecx-color-success-main)}monkey-toggle-line.lg{min-height:48px}monkey-toggle-line.lg label{font-size:16px}monkey-toggle-line.md{min-height:40px}monkey-toggle-line.md label{font-size:14px}monkey-toggle-line.sm{min-height:32px}monkey-toggle-line.sm label{font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
3376
5211
  }
3377
5212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineComponent, decorators: [{
3378
5213
  type: Component,
@@ -3380,7 +5215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3380
5215
  'data-testid': 'monkey-toggle-line',
3381
5216
  '[attr.id]': 'id',
3382
5217
  '[id]': 'id'
3383
- }, template: "<ng-content></ng-content>\n", styles: ["monkey-toggle-line{display:inline-flex;min-width:250px}monkey-toggle-line :first-child label{border-radius:8px 0 0 8px;border-right:none!important}monkey-toggle-line :first-child label monkey-icon{color:#db0505}monkey-toggle-line :last-child label{border-radius:0 8px 8px 0}monkey-toggle-line :last-child label monkey-icon{color:#00875a}monkey-toggle-line.lg{min-height:48px}monkey-toggle-line.lg label{font-size:16px}monkey-toggle-line.md{min-height:40px}monkey-toggle-line.md label{font-size:14px}monkey-toggle-line.sm{min-height:32px}monkey-toggle-line.sm label{font-size:14px}\n"] }]
5218
+ }, template: "<ng-content></ng-content>\n", styles: ["monkey-toggle-line{display:inline-flex;min-width:250px}monkey-toggle-line :first-child label{border-radius:8px 0 0 8px;border-right:none!important}monkey-toggle-line :first-child label monkey-icon{color:var(--mecx-color-error-700)}monkey-toggle-line :last-child label{border-radius:0 8px 8px 0}monkey-toggle-line :last-child label monkey-icon{color:var(--mecx-color-success-main)}monkey-toggle-line.lg{min-height:48px}monkey-toggle-line.lg label{font-size:16px}monkey-toggle-line.md{min-height:40px}monkey-toggle-line.md label{font-size:14px}monkey-toggle-line.sm{min-height:32px}monkey-toggle-line.sm label{font-size:14px}\n"] }]
3384
5219
  }], ctorParameters: () => [], propDecorators: { value: [{
3385
5220
  type: Input
3386
5221
  }], name: [{
@@ -3402,6 +5237,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3402
5237
  type: Input
3403
5238
  }] } });
3404
5239
 
5240
+ /** ************************
5241
+ * Copyright Monkey Exchange. All Rights Reserved
5242
+ * This style guide was developed by Monkey Exchange Team
5243
+ * MIT Licence
5244
+ ************************* */
5245
+
5246
+ /** ************************
5247
+ * Copyright Monkey Exchange. All Rights Reserved
5248
+ * This style guide was developed by Monkey Exchange Team
5249
+ * MIT Licence
5250
+ ************************* */
3405
5251
  class MonkeyTooltipComponent {
3406
5252
  get id() {
3407
5253
  return this._id;
@@ -3425,7 +5271,7 @@ class MonkeyTooltipComponent {
3425
5271
  }
3426
5272
  }
3427
5273
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3428
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTooltipComponent, isStandalone: true, selector: "monkey-tooltip", inputs: { text: "text", template: "template", left: "left", top: "top", id: "id" }, outputs: { afterClose: "afterClose" }, host: { attributes: { "data-testid": "monkey-tooltip" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "style.left.px": "left", "style.top.px": "top", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "@if(template) {\n<ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n} @if(text) {\n{{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
5274
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTooltipComponent, isStandalone: true, selector: "monkey-tooltip", inputs: { text: "text", template: "template", left: "left", top: "top", id: "id" }, outputs: { afterClose: "afterClose" }, host: { attributes: { "data-testid": "monkey-tooltip" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "style.left.px": "left", "style.top.px": "top", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
3429
5275
  }
3430
5276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipComponent, decorators: [{
3431
5277
  type: Component,
@@ -3436,7 +5282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3436
5282
  '(animationend)': 'onAnimationEnd($event)',
3437
5283
  '[attr.id]': 'id',
3438
5284
  '[id]': 'id'
3439
- }, template: "@if(template) {\n<ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n} @if(text) {\n{{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"] }]
5285
+ }, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"] }]
3440
5286
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { text: [{
3441
5287
  type: Input
3442
5288
  }], template: [{
@@ -3451,6 +5297,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3451
5297
  type: Input
3452
5298
  }] } });
3453
5299
 
5300
+ /** ************************
5301
+ * Copyright Monkey Exchange. All Rights Reserved
5302
+ * This style guide was developed by Monkey Exchange Team
5303
+ * MIT Licence
5304
+ ************************* */
5305
+
5306
+ /** ************************
5307
+ * Copyright Monkey Exchange. All Rights Reserved
5308
+ * This style guide was developed by Monkey Exchange Team
5309
+ * MIT Licence
5310
+ ************************* */
3454
5311
  class MonkeyTooltipDirective {
3455
5312
  constructor(viewContainerRef, elementRef, appRef, document) {
3456
5313
  this.viewContainerRef = viewContainerRef;
@@ -3628,9 +5485,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3628
5485
  * MIT Licence
3629
5486
  ************************* */
3630
5487
 
5488
+ /** ************************
5489
+ * Copyright Monkey Exchange. All Rights Reserved
5490
+ * This style guide was developed by Monkey Exchange Team
5491
+ * MIT Licence
5492
+ ************************* */
5493
+
3631
5494
  /**
3632
5495
  * Generated bundle index. Do not edit.
3633
5496
  */
3634
5497
 
3635
- export { MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MonkeyAccordionComponent, MonkeyAlertComponent, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDestroyService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyError, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelper, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyIconsService, MonkeyInfo, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyLabel, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalDefaultComponent, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, ToastRef, getCurrencySymbol, reverseForEach, validateType };
5498
+ export { MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyError, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelper, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyIconsService, MonkeyInfo, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyInputUploadComponent, MonkeyLabel, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, ToastRef, getCurrencySymbol };
3636
5499
  //# sourceMappingURL=monkey-style-guide-v2.mjs.map