monkey-style-guide-v2 0.0.16 → 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 (271) 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 -20
  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/modal/components/default.mjs +70 -0
  49. package/esm2022/lib/components/modal/directives/actions.mjs +29 -0
  50. package/esm2022/lib/components/modal/directives/content.mjs +26 -0
  51. package/esm2022/lib/components/modal/directives/subtitle.mjs +26 -0
  52. package/esm2022/lib/components/modal/directives/title.mjs +26 -0
  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 +2611 -275
  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 -19
  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/modal/components/default.d.ts +17 -0
  137. package/lib/components/modal/directives/actions.d.ts +7 -0
  138. package/lib/components/modal/directives/content.d.ts +6 -0
  139. package/lib/components/modal/directives/subtitle.d.ts +6 -0
  140. package/lib/components/modal/directives/title.d.ts +6 -0
  141. package/lib/components/modal/index.d.ts +15 -0
  142. package/lib/components/modal/modal-config.d.ts +34 -0
  143. package/lib/components/modal/modal-ref.d.ts +27 -0
  144. package/lib/components/modal/modal.component.d.ts +22 -0
  145. package/lib/components/modal/modal.module.d.ts +16 -0
  146. package/lib/components/modal/modal.service.d.ts +28 -0
  147. package/lib/components/modal/utils.d.ts +16 -0
  148. package/lib/components/option/index.d.ts +6 -0
  149. package/lib/components/security-level/index.d.ts +6 -0
  150. package/lib/components/select/index.d.ts +6 -0
  151. package/lib/components/{monkey-select/monkey-select.component.d.ts → select/select.component.d.ts} +31 -13
  152. package/lib/components/status/index.d.ts +6 -0
  153. package/lib/components/{monkey-table → table}/directives/column-checked.d.ts +2 -2
  154. package/lib/components/{monkey-table → table}/directives/column-expansible.d.ts +1 -1
  155. package/lib/components/{monkey-table → table}/directives/column-sortable.d.ts +1 -1
  156. package/lib/components/{monkey-table → table}/index.d.ts +6 -1
  157. package/lib/components/table/table.module.d.ts +16 -0
  158. package/lib/components/toast/index.d.ts +6 -0
  159. package/lib/components/{monkey-toast/monkey-toast.component.d.ts → toast/toast.component.d.ts} +5 -0
  160. package/lib/components/toggle/index.d.ts +6 -0
  161. package/lib/components/toggle-line/index.d.ts +7 -0
  162. package/lib/components/toggle-line/toggle-line-button/index.d.ts +6 -0
  163. package/lib/components/{monkey-toggle-line/monkey-toggle-line.component.d.ts → toggle-line/toggle-line.component.d.ts} +1 -1
  164. package/lib/components/tooltip/index.d.ts +7 -0
  165. package/lib/components/tooltip/tooltip/index.d.ts +6 -0
  166. package/lib/directives/badge.d.ts +24 -0
  167. package/lib/directives/index.d.ts +1 -0
  168. package/lib/directives/module.d.ts +2 -1
  169. package/lib/interfaces/sizes.d.ts +1 -1
  170. package/lib/services/dictionary.service.d.ts +11 -0
  171. package/lib/services/{monkey-icons.service.d.ts → icons.service.d.ts} +2 -0
  172. package/lib/services/index.d.ts +7 -3
  173. package/lib/services/{monkey-toast.service.d.ts → toast.service.d.ts} +5 -0
  174. package/lib/tokens/index.d.ts +3 -0
  175. package/monkey-style-guide-v2-0.0.18.tgz +0 -0
  176. package/package.json +2 -1
  177. package/utils/utils.d.ts +5 -0
  178. package/esm2022/lib/components/monkey-accordion/index.mjs +0 -2
  179. package/esm2022/lib/components/monkey-accordion/monkey-accordion.component.mjs +0 -102
  180. package/esm2022/lib/components/monkey-alert/index.mjs +0 -2
  181. package/esm2022/lib/components/monkey-alert/monkey-alert.component.mjs +0 -50
  182. package/esm2022/lib/components/monkey-breadcrumb/index.mjs +0 -2
  183. package/esm2022/lib/components/monkey-breadcrumb/monkey-breadcrumb.component.mjs +0 -56
  184. package/esm2022/lib/components/monkey-button/index.mjs +0 -2
  185. package/esm2022/lib/components/monkey-checkbox/index.mjs +0 -2
  186. package/esm2022/lib/components/monkey-checkbox/monkey-checkbox.component.mjs +0 -216
  187. package/esm2022/lib/components/monkey-divider/index.mjs +0 -2
  188. package/esm2022/lib/components/monkey-divider/monkey-divider.component.mjs +0 -44
  189. package/esm2022/lib/components/monkey-form-field/form-field-control.mjs +0 -15
  190. package/esm2022/lib/components/monkey-form-field/form-field.mjs +0 -250
  191. package/esm2022/lib/components/monkey-form-field/index.mjs +0 -5
  192. package/esm2022/lib/components/monkey-form-field/module.mjs +0 -21
  193. package/esm2022/lib/components/monkey-form-field/utils.mjs +0 -16
  194. package/esm2022/lib/components/monkey-icon/index.mjs +0 -2
  195. package/esm2022/lib/components/monkey-icon/monkey-icon.component.mjs +0 -51
  196. package/esm2022/lib/components/monkey-icon-button/index.mjs +0 -2
  197. package/esm2022/lib/components/monkey-input/index.mjs +0 -5
  198. package/esm2022/lib/components/monkey-input/monkey-input-currency.directive.mjs +0 -187
  199. package/esm2022/lib/components/monkey-input/monkey-input.directive.mjs +0 -166
  200. package/esm2022/lib/components/monkey-input/monkey-input.module.mjs +0 -24
  201. package/esm2022/lib/components/monkey-input/validators.mjs +0 -17
  202. package/esm2022/lib/components/monkey-option/index.mjs +0 -2
  203. package/esm2022/lib/components/monkey-security-level/index.mjs +0 -2
  204. package/esm2022/lib/components/monkey-select/index.mjs +0 -2
  205. package/esm2022/lib/components/monkey-select/monkey-select.component.mjs +0 -352
  206. package/esm2022/lib/components/monkey-status/index.mjs +0 -2
  207. package/esm2022/lib/components/monkey-table/components/pagination-label/pagination-label.mjs +0 -34
  208. package/esm2022/lib/components/monkey-table/components/pagination-size/pagination-size.mjs +0 -57
  209. package/esm2022/lib/components/monkey-table/directives/column-checked.mjs +0 -109
  210. package/esm2022/lib/components/monkey-table/directives/column-expansible.mjs +0 -134
  211. package/esm2022/lib/components/monkey-table/directives/column-sortable.mjs +0 -97
  212. package/esm2022/lib/components/monkey-table/index.mjs +0 -10
  213. package/esm2022/lib/components/monkey-table/table.module.mjs +0 -60
  214. package/esm2022/lib/components/monkey-toast/index.mjs +0 -2
  215. package/esm2022/lib/components/monkey-toast/monkey-toast.component.mjs +0 -74
  216. package/esm2022/lib/components/monkey-toggle/index.mjs +0 -2
  217. package/esm2022/lib/components/monkey-toggle-line/index.mjs +0 -3
  218. package/esm2022/lib/components/monkey-toggle-line/monkey-toggle-line-button/index.mjs +0 -2
  219. package/esm2022/lib/components/monkey-toggle-line/monkey-toggle-line.component.mjs +0 -85
  220. package/esm2022/lib/components/monkey-tooltip/index.mjs +0 -3
  221. package/esm2022/lib/components/monkey-tooltip/monkey-tooltip.directive.mjs +0 -175
  222. package/esm2022/lib/components/monkey-tooltip/tooltip/index.mjs +0 -2
  223. package/esm2022/lib/components/monkey-tooltip/tooltip/tooltip.component.mjs +0 -53
  224. package/esm2022/lib/services/monkey-destroy.service.mjs +0 -15
  225. package/esm2022/lib/services/monkey-icons.service.mjs +0 -45
  226. package/esm2022/lib/services/monkey-toast.service.mjs +0 -72
  227. package/lib/components/monkey-accordion/index.d.ts +0 -1
  228. package/lib/components/monkey-alert/index.d.ts +0 -1
  229. package/lib/components/monkey-breadcrumb/index.d.ts +0 -1
  230. package/lib/components/monkey-button/index.d.ts +0 -1
  231. package/lib/components/monkey-checkbox/index.d.ts +0 -1
  232. package/lib/components/monkey-divider/index.d.ts +0 -1
  233. package/lib/components/monkey-form-field/index.d.ts +0 -4
  234. package/lib/components/monkey-icon/index.d.ts +0 -1
  235. package/lib/components/monkey-icon-button/index.d.ts +0 -1
  236. package/lib/components/monkey-input/index.d.ts +0 -4
  237. package/lib/components/monkey-option/index.d.ts +0 -1
  238. package/lib/components/monkey-security-level/index.d.ts +0 -1
  239. package/lib/components/monkey-select/index.d.ts +0 -1
  240. package/lib/components/monkey-status/index.d.ts +0 -1
  241. package/lib/components/monkey-table/table.module.d.ts +0 -15
  242. package/lib/components/monkey-toast/index.d.ts +0 -1
  243. package/lib/components/monkey-toggle/index.d.ts +0 -1
  244. package/lib/components/monkey-toggle-line/index.d.ts +0 -2
  245. package/lib/components/monkey-toggle-line/monkey-toggle-line-button/index.d.ts +0 -1
  246. package/lib/components/monkey-tooltip/index.d.ts +0 -2
  247. package/lib/components/monkey-tooltip/tooltip/index.d.ts +0 -1
  248. package/lib/services/monkey-destroy.service.d.ts +0 -8
  249. package/monkey-style-guide-v2-0.0.16.tgz +0 -0
  250. /package/lib/components/{monkey-accordion/monkey-accordion.component.d.ts → accordion/accordion.component.d.ts} +0 -0
  251. /package/lib/components/{monkey-alert/monkey-alert.component.d.ts → alert/alert.component.d.ts} +0 -0
  252. /package/lib/components/{monkey-breadcrumb/monkey-breadcrumb.component.d.ts → breadcrumb/breadcrumb.component.d.ts} +0 -0
  253. /package/lib/components/{monkey-button/monkey-button.component.d.ts → button/button.component.d.ts} +0 -0
  254. /package/lib/components/{monkey-divider/monkey-divider.component.d.ts → divider/divider.component.d.ts} +0 -0
  255. /package/lib/components/{monkey-form-field → form-field}/form-field-control.d.ts +0 -0
  256. /package/lib/components/{monkey-form-field → form-field}/utils.d.ts +0 -0
  257. /package/lib/components/{monkey-icon/monkey-icon.component.d.ts → icon/icon.component.d.ts} +0 -0
  258. /package/lib/components/{monkey-icon-button/monkey-icon-button.component.d.ts → icon-button/icon-button.component.d.ts} +0 -0
  259. /package/lib/components/{monkey-input → input}/validators.d.ts +0 -0
  260. /package/lib/components/{monkey-option/monkey-option.component.d.ts → option/option.component.d.ts} +0 -0
  261. /package/lib/components/{monkey-security-level/monkey-security-level.component.d.ts → security-level/security-level.component.d.ts} +0 -0
  262. /package/lib/components/{monkey-status/monkey-status.component.d.ts → status/status.component.d.ts} +0 -0
  263. /package/lib/components/{monkey-table → table}/components/pagination-action/pagination-action.d.ts +0 -0
  264. /package/lib/components/{monkey-table → table}/components/pagination-label/pagination-label.d.ts +0 -0
  265. /package/lib/components/{monkey-table → table}/components/pagination-size/pagination-size.d.ts +0 -0
  266. /package/lib/components/{monkey-table → table}/directives/column-stick.d.ts +0 -0
  267. /package/lib/components/{monkey-table/table.d.ts → table/table.component.d.ts} +0 -0
  268. /package/lib/components/{monkey-toggle/monkey-toggle.component.d.ts → toggle/toggle.component.d.ts} +0 -0
  269. /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
  270. /package/lib/components/{monkey-tooltip → tooltip}/tooltip/tooltip.component.d.ts +0 -0
  271. /package/lib/components/{monkey-tooltip/monkey-tooltip.directive.d.ts → tooltip/tooltip.directive.d.ts} +0 -0
@@ -2,16 +2,20 @@ 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, ViewChild, Optional, Inject } 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
- import { Router } from '@angular/router';
11
- import * as i1$2 from '@angular/forms';
9
+ import { OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
10
+ import { Router, NavigationStart } from '@angular/router';
11
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
+ import * as i2 from '@angular/forms';
12
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';
13
16
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
14
17
  import { getSupportedInputTypes } from '@angular/cdk/platform';
18
+ import { hasModifierKey } from '@angular/cdk/keycodes';
15
19
 
16
20
  const counters = {};
17
21
  class IdGenerator {
@@ -44,20 +48,44 @@ function getRandomString(len, charSet) {
44
48
  })
45
49
  .join('');
46
50
  }
47
-
48
- class MonkeyDestroyService extends Subject {
49
- ngOnDestroy() {
50
- this.next();
51
- this.complete();
52
- }
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDestroyService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
54
- 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();
55
81
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDestroyService, decorators: [{
57
- type: Injectable
58
- }] });
59
82
 
60
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
+ ************************* */
61
89
  class MonkeyIconsService {
62
90
  constructor() {
63
91
  this._sanitizer = inject(DomSanitizer);
@@ -89,6 +117,12 @@ class MonkeyIconsService {
89
117
  get loading() {
90
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>`);
91
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
+ }
92
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
93
127
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, providedIn: 'root' }); }
94
128
  }
@@ -174,6 +208,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
174
208
  type: Injectable
175
209
  }], ctorParameters: () => [{ type: i1.Overlay }] });
176
210
 
211
+ /** ************************
212
+ * Copyright Monkey Exchange. All Rights Reserved
213
+ * This style guide was developed by Monkey Exchange Team
214
+ * MIT Licence
215
+ ************************* */
216
+
177
217
  /** ************************
178
218
  * Copyright Monkey Exchange. All Rights Reserved
179
219
  * This style guide was developed by Monkey Exchange Team
@@ -269,6 +309,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
269
309
  type: Input
270
310
  }] } });
271
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
+
272
366
  /** ************************
273
367
  * Copyright Monkey Exchange. All Rights Reserved
274
368
  * This style guide was developed by Monkey Exchange Team
@@ -299,15 +393,15 @@ class MonkeyIconComponent {
299
393
  }
300
394
  }
301
395
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
302
- 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 }); }
303
397
  }
304
398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, decorators: [{
305
399
  type: Component,
306
- 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: {
307
401
  '[class]': `_icon+' '+size`,
308
402
  '[attr.id]': 'id',
309
403
  '[id]': 'id'
310
- }, 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"] }]
311
405
  }], ctorParameters: () => [], propDecorators: { icon: [{
312
406
  type: Input
313
407
  }], size: [{
@@ -316,6 +410,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
316
410
  type: Input
317
411
  }] } });
318
412
 
413
+ /** ************************
414
+ * Copyright Monkey Exchange. All Rights Reserved
415
+ * This style guide was developed by Monkey Exchange Team
416
+ * MIT Licence
417
+ ************************* */
418
+
319
419
  /** ************************
320
420
  * Copyright Monkey Exchange. All Rights Reserved
321
421
  * This style guide was developed by Monkey Exchange Team
@@ -349,7 +449,7 @@ class MonkeyAlertComponent {
349
449
  return typeIcons[type];
350
450
  }
351
451
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
352
- 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 }); }
353
453
  }
354
454
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAlertComponent, decorators: [{
355
455
  type: Component,
@@ -357,11 +457,149 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
357
457
  'data-testid': 'monkey-alert',
358
458
  '[attr.id]': 'id',
359
459
  '[id]': 'id'
360
- }, 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"] }]
361
461
  }], ctorParameters: () => [], propDecorators: { id: [{
362
462
  type: Input
363
463
  }] } });
364
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
+
365
603
  /** ************************
366
604
  * Copyright Monkey Exchange. All Rights Reserved
367
605
  * This style guide was developed by Monkey Exchange Team
@@ -412,6 +650,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
412
650
  type: Input
413
651
  }] } });
414
652
 
653
+ /** ************************
654
+ * Copyright Monkey Exchange. All Rights Reserved
655
+ * This style guide was developed by Monkey Exchange Team
656
+ * MIT Licence
657
+ ************************* */
658
+
415
659
  /** ************************
416
660
  * Copyright Monkey Exchange. All Rights Reserved
417
661
  * This style guide was developed by Monkey Exchange Team
@@ -461,6 +705,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
461
705
  args: ['click', ['$event']]
462
706
  }] } });
463
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
+
464
786
  /** ************************
465
787
  * Copyright Monkey Exchange. All Rights Reserved
466
788
  * This style guide was developed by Monkey Exchange Team
@@ -589,17 +911,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
589
911
  ************************* */
590
912
  class MonkeyDirectivesModule {
591
913
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
592
- 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] }); }
593
927
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule }); }
594
928
  }
595
929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, decorators: [{
596
930
  type: NgModule,
597
931
  args: [{
598
- declarations: [MonkeyError, MonkeyHelper, MonkeyInfo, MonkeyLabel, MonkeyPrefix, MonkeySuffix],
599
- 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
+ ]
600
950
  }]
601
951
  }] });
602
952
 
953
+ /** ************************
954
+ * Copyright Monkey Exchange. All Rights Reserved
955
+ * This style guide was developed by Monkey Exchange Team
956
+ * MIT Licence
957
+ ************************* */
603
958
  class MonkeyCheckboxComponent {
604
959
  constructor() {
605
960
  this.disabled = false;
@@ -608,7 +963,7 @@ class MonkeyCheckboxComponent {
608
963
  this.showFooter = true;
609
964
  this.size = 'md';
610
965
  this.onChange = new EventEmitter();
611
- this._destroyed = inject(MonkeyDestroyService);
966
+ this._destroyRef = inject(DestroyRef);
612
967
  this.icons = inject(MonkeyIconsService);
613
968
  this.idGenerator = inject(IdGenerator);
614
969
  this.injector = inject(Injector);
@@ -650,7 +1005,7 @@ class MonkeyCheckboxComponent {
650
1005
  }
651
1006
  else if (ngControl instanceof FormControlName) {
652
1007
  this.control = this.injector.get(FormGroupDirective).getControl(ngControl);
653
- this.control.statusChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
1008
+ this.control.statusChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
654
1009
  this.cdr.markForCheck();
655
1010
  });
656
1011
  }
@@ -715,8 +1070,7 @@ class MonkeyCheckboxComponent {
715
1070
  // eslint-disable-next-line no-use-before-define
716
1071
  useExisting: MonkeyCheckboxComponent,
717
1072
  multi: true
718
- },
719
- MonkeyDestroyService
1073
+ }
720
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: [
721
1075
  trigger('iconAnimation', [
722
1076
  transition(':enter', [
@@ -765,8 +1119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
765
1119
  // eslint-disable-next-line no-use-before-define
766
1120
  useExisting: MonkeyCheckboxComponent,
767
1121
  multi: true
768
- },
769
- MonkeyDestroyService
1122
+ }
770
1123
  ], host: {
771
1124
  'data-testid': 'input-checkbox',
772
1125
  class: 'mecx-checkbox',
@@ -813,41 +1166,227 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
813
1166
  * This style guide was developed by Monkey Exchange Team
814
1167
  * MIT Licence
815
1168
  ************************* */
816
- class MonkeyDividerComponent {
817
- get classes() {
818
- return `${this.size()} ${this.vertical() ? 'vertical' : ''}`;
819
- }
820
- get id() {
821
- return this._id;
822
- }
823
- set id(value) {
824
- this._id = value || this._uid;
825
- }
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 {
826
1179
  constructor() {
827
- this.size = input('sm');
828
- this.vertical = input(false, {
829
- 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);
830
1355
  });
831
- this._uid = inject(IdGenerator).getId('monkey-divider-');
832
- // eslint-disable-next-line no-self-assign
833
- this.id = this.id;
834
1356
  }
835
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
836
- 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' }); }
837
1383
  }
838
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDividerComponent, decorators: [{
839
- type: Component,
840
- args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-divider', standalone: true, template: '', host: {
841
- 'data-testid': 'monkey-divider',
842
- '[attr.id]': 'id',
843
- '[id]': 'id'
844
- }, 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"] }]
845
- }], ctorParameters: () => [], propDecorators: { classes: [{
846
- type: HostBinding,
847
- args: ['class']
848
- }], id: [{
849
- type: Input
850
- }] } });
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: () => [] });
851
1390
 
852
1391
  /** ************************
853
1392
  * Copyright Monkey Exchange. All Rights Reserved
@@ -896,6 +1435,9 @@ class MonkeyFormFieldComponent {
896
1435
  get labelId() {
897
1436
  return this._labelId;
898
1437
  }
1438
+ get hideBorder() {
1439
+ return this.control.type === 'input-code';
1440
+ }
899
1441
  get showHeader() {
900
1442
  return this.hasLabel || this.hasHelper;
901
1443
  }
@@ -903,6 +1445,9 @@ class MonkeyFormFieldComponent {
903
1445
  return this.hasInfo || this.hasError;
904
1446
  }
905
1447
  get showInvalid() {
1448
+ if (this.showLoading) {
1449
+ return false;
1450
+ }
906
1451
  const touched = this.control.ngControl?.touched || false;
907
1452
  const invalid = this.control.ngControl?.invalid || false;
908
1453
  return (this.hasError && !this._isFocused && touched && invalid && !this.control.disableToBeDirty);
@@ -911,10 +1456,10 @@ class MonkeyFormFieldComponent {
911
1456
  return (!!this.control.ngControl?.control?.value &&
912
1457
  !this.control.disabled &&
913
1458
  !this.control.loading &&
914
- !this.hideClear);
1459
+ (!this.hideAction || this.enableClear));
915
1460
  }
916
1461
  get showCalendar() {
917
- return this.control.type === 'date';
1462
+ return this.control.type === 'date' && !this.hideAction;
918
1463
  }
919
1464
  get showCurrency() {
920
1465
  return this.control.currency;
@@ -926,13 +1471,14 @@ class MonkeyFormFieldComponent {
926
1471
  return this.control.loading || false;
927
1472
  }
928
1473
  constructor() {
1474
+ this.size = 'md';
929
1475
  this.elementRef = inject(ElementRef);
930
1476
  this._icons = inject(MonkeyIconsService);
931
1477
  this._changeDetectorRef = inject(ChangeDetectorRef);
932
1478
  this._idGenerator = inject(IdGenerator);
933
1479
  this._labelId = this._idGenerator.getId('monkey-label-');
934
1480
  this._uid = inject(IdGenerator).getId('monkey-form-field-');
935
- this._destroyed = new Subject();
1481
+ this._destroyRef = inject(DestroyRef);
936
1482
  this._isFocused = null;
937
1483
  this._previousControl = null;
938
1484
  this.currencySymbol = getCurrencySymbol(inject(DEFAULT_CURRENCY_CODE));
@@ -1007,7 +1553,7 @@ class MonkeyFormFieldComponent {
1007
1553
  this._valueChanges?.unsubscribe();
1008
1554
  if (control.ngControl && control.ngControl.valueChanges) {
1009
1555
  this._valueChanges = control.ngControl.valueChanges
1010
- .pipe(takeUntil(this._destroyed))
1556
+ .pipe(takeUntilDestroyed(this._destroyRef))
1011
1557
  .subscribe(() => {
1012
1558
  this._changeDetectorRef.markForCheck();
1013
1559
  });
@@ -1036,8 +1582,6 @@ class MonkeyFormFieldComponent {
1036
1582
  ngOnDestroy() {
1037
1583
  this._stateChanges?.unsubscribe();
1038
1584
  this._valueChanges?.unsubscribe();
1039
- this._destroyed.next();
1040
- this._destroyed.complete();
1041
1585
  }
1042
1586
  getFooterMessages() {
1043
1587
  const touched = this.control.ngControl?.touched;
@@ -1049,7 +1593,12 @@ class MonkeyFormFieldComponent {
1049
1593
  const isTouched = touched;
1050
1594
  const isInvalid = invalid;
1051
1595
  const isNotFocused = !isFocused;
1052
- if (isControlEnabled && isTouched && isInvalid && isNotFocused && isControlDisableToBeDirty) {
1596
+ if (!this.showLoading &&
1597
+ isControlEnabled &&
1598
+ isTouched &&
1599
+ isInvalid &&
1600
+ isNotFocused &&
1601
+ isControlDisableToBeDirty) {
1053
1602
  return 'error';
1054
1603
  }
1055
1604
  if (hasInfoChildren) {
@@ -1080,7 +1629,7 @@ class MonkeyFormFieldComponent {
1080
1629
  }
1081
1630
  }
1082
1631
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1083
- 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 }); }
1084
1633
  }
1085
1634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, decorators: [{
1086
1635
  type: Component,
@@ -1089,14 +1638,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1089
1638
  '[class.mecx-disabled]': 'control.disabled',
1090
1639
  '[class.mecx-form-field-focused]': 'control.focused',
1091
1640
  '[class.mecx-form-field-invalid]': 'showInvalid',
1641
+ '[class.mecx-form-field-borderless]': 'hideBorder',
1092
1642
  '[attr.id]': 'id',
1093
- '[id]': 'id'
1094
- }, 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"] }]
1095
1646
  }], ctorParameters: () => [], propDecorators: { id: [{
1096
1647
  type: Input
1097
- }], hideClear: [{
1648
+ }], hideAction: [{
1649
+ type: Input,
1650
+ args: [{ transform: booleanAttribute }]
1651
+ }], enableClear: [{
1098
1652
  type: Input,
1099
1653
  args: [{ transform: booleanAttribute }]
1654
+ }], size: [{
1655
+ type: Input
1100
1656
  }], _formFieldControl: [{
1101
1657
  type: ContentChild,
1102
1658
  args: [MonkeyFormFieldControl]
@@ -1143,53 +1699,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1143
1699
  * This style guide was developed by Monkey Exchange Team
1144
1700
  * MIT Licence
1145
1701
  ************************* */
1146
- class MonkeyIconButtonComponent {
1147
- get id() {
1148
- return this._id;
1149
- }
1150
- set id(value) {
1151
- this._id = value || this._uid;
1152
- }
1153
- constructor() {
1154
- this.type = 'primary';
1155
- this.size = 'md';
1156
- this.disabled = false;
1157
- this.icon = '';
1158
- this._uid = inject(IdGenerator).getId('monkey-icon-button-');
1159
- // eslint-disable-next-line no-self-assign
1160
- this.id = this.id;
1161
- }
1162
- onClick(event) {
1163
- if (this.disabled) {
1164
- event.stopPropagation();
1165
- event.preventDefault();
1166
- event.stopImmediatePropagation();
1167
- }
1168
- }
1169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1170
- 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 }); }
1171
- }
1172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, decorators: [{
1173
- type: Component,
1174
- args: [{ selector: 'monkey-icon-button', standalone: true, imports: [CommonModule, MonkeyIconComponent], encapsulation: ViewEncapsulation.None, host: {
1175
- 'data-testid': 'monkey-icon-button',
1176
- '[attr.id]': 'id',
1177
- '[id]': 'id'
1178
- }, 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"] }]
1179
- }], ctorParameters: () => [], propDecorators: { type: [{
1180
- type: Input
1181
- }], size: [{
1182
- type: Input
1183
- }], disabled: [{
1184
- type: Input
1185
- }], icon: [{
1186
- type: Input
1187
- }], id: [{
1188
- type: Input
1189
- }], onClick: [{
1190
- type: HostListener,
1191
- args: ['click', ['$event']]
1192
- }] } });
1193
1702
 
1194
1703
  /** ************************
1195
1704
  * Copyright Monkey Exchange. All Rights Reserved
@@ -1246,7 +1755,7 @@ class MonkeyInputCurrencyDirective {
1246
1755
  this._changeDetectorRef = inject(ChangeDetectorRef);
1247
1756
  this._currencyCode = inject(DEFAULT_CURRENCY_CODE);
1248
1757
  this._localeId = inject(LOCALE_ID);
1249
- this._destroyed = new Subject();
1758
+ this._destroyRef = inject(DestroyRef);
1250
1759
  this._rawValue = 0;
1251
1760
  this.ngControl = inject(NgControl, { self: true, optional: true });
1252
1761
  this.focused = false;
@@ -1283,7 +1792,7 @@ class MonkeyInputCurrencyDirective {
1283
1792
  this.handleControlValue();
1284
1793
  this._valueChanges?.unsubscribe();
1285
1794
  this._valueChanges = this.ngControl?.control?.valueChanges
1286
- .pipe(takeUntil(this._destroyed))
1795
+ .pipe(takeUntilDestroyed(this._destroyRef))
1287
1796
  .subscribe(() => {
1288
1797
  this.handleControlValue();
1289
1798
  });
@@ -1323,8 +1832,7 @@ class MonkeyInputCurrencyDirective {
1323
1832
  provide: MonkeyFormFieldControl,
1324
1833
  // eslint-disable-next-line no-use-before-define
1325
1834
  useExisting: MonkeyInputCurrencyDirective
1326
- },
1327
- MonkeyDestroyService
1835
+ }
1328
1836
  ], exportAs: ["monkeyInput"], usesOnChanges: true, ngImport: i0 }); }
1329
1837
  }
1330
1838
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCurrencyDirective, decorators: [{
@@ -1352,8 +1860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1352
1860
  provide: MonkeyFormFieldControl,
1353
1861
  // eslint-disable-next-line no-use-before-define
1354
1862
  useExisting: MonkeyInputCurrencyDirective
1355
- },
1356
- MonkeyDestroyService
1863
+ }
1357
1864
  ]
1358
1865
  }]
1359
1866
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.CurrencyPipe }], propDecorators: { name: [{
@@ -1369,6 +1876,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1369
1876
  type: Input
1370
1877
  }] } });
1371
1878
 
1879
+ /** ************************
1880
+ * Copyright Monkey Exchange. All Rights Reserved
1881
+ * This style guide was developed by Monkey Exchange Team
1882
+ * MIT Licence
1883
+ ************************* */
1372
1884
  const INPUT_INVALID_TYPES = [
1373
1885
  'button',
1374
1886
  'checkbox',
@@ -1424,6 +1936,24 @@ class MonkeyInputDirective {
1424
1936
  this._type = value || 'text';
1425
1937
  this._elementRef.nativeElement.type = this._type;
1426
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
+ }
1427
1957
  get currency() {
1428
1958
  return false;
1429
1959
  }
@@ -1488,13 +2018,12 @@ class MonkeyInputDirective {
1488
2018
  this.ngControl?.control?.markAsTouched();
1489
2019
  }
1490
2020
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1491
- 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: [
1492
2022
  {
1493
2023
  provide: MonkeyFormFieldControl,
1494
2024
  // eslint-disable-next-line no-use-before-define
1495
2025
  useExisting: MonkeyInputDirective
1496
- },
1497
- MonkeyDestroyService
2026
+ }
1498
2027
  ], exportAs: ["monkeyInput"], usesOnChanges: true, ngImport: i0 }); }
1499
2028
  }
1500
2029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputDirective, decorators: [{
@@ -1523,8 +2052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1523
2052
  provide: MonkeyFormFieldControl,
1524
2053
  // eslint-disable-next-line no-use-before-define
1525
2054
  useExisting: MonkeyInputDirective
1526
- },
1527
- MonkeyDestroyService
2055
+ }
1528
2056
  ]
1529
2057
  }]
1530
2058
  }], ctorParameters: () => [], propDecorators: { name: [{
@@ -1538,6 +2066,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1538
2066
  type: Input
1539
2067
  }], type: [{
1540
2068
  type: Input
2069
+ }], min: [{
2070
+ type: Input
2071
+ }], max: [{
2072
+ type: Input
1541
2073
  }], percent: [{
1542
2074
  type: Input
1543
2075
  }] } });
@@ -1566,22 +2098,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1566
2098
  * This style guide was developed by Monkey Exchange Team
1567
2099
  * MIT Licence
1568
2100
  ************************* */
1569
- class MonkeySecurityLevelComponent {
1570
- get class() {
1571
- if (this.score() === 0) {
1572
- return 'empty';
1573
- }
1574
- if (this.score() < 300) {
1575
- return 'weak';
1576
- }
1577
- if (this.score() >= 300 && this.score() < 800) {
1578
- return 'medium';
1579
- }
1580
- if (this.score() >= 800 && this.score() < 1000) {
1581
- return 'strong';
1582
- }
1583
- return 'very-strong';
1584
- }
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 {
1585
2108
  get id() {
1586
2109
  return this._id;
1587
2110
  }
@@ -1589,28 +2112,44 @@ class MonkeySecurityLevelComponent {
1589
2112
  this._id = value || this._uid;
1590
2113
  }
1591
2114
  constructor() {
1592
- this.label = input();
1593
- this.score = input.required();
1594
- this.strengthLabel = input();
1595
- this._uid = inject(IdGenerator).getId('monkey-security-level-');
2115
+ this.type = 'primary';
2116
+ this.size = 'md';
2117
+ this.disabled = false;
2118
+ this.icon = '';
2119
+ this._uid = inject(IdGenerator).getId('monkey-icon-button-');
1596
2120
  // eslint-disable-next-line no-self-assign
1597
2121
  this.id = this.id;
1598
2122
  }
1599
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1600
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeySecurityLevelComponent, isStandalone: true, selector: "monkey-security-level", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, score: { classPropertyName: "score", publicName: "score", isSignal: true, isRequired: true, transformFunction: null }, strengthLabel: { classPropertyName: "strengthLabel", publicName: "strengthLabel", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-security-level" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
2123
+ onClick(event) {
2124
+ if (this.disabled) {
2125
+ event.stopPropagation();
2126
+ event.preventDefault();
2127
+ event.stopImmediatePropagation();
2128
+ }
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 }); }
1601
2132
  }
1602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, decorators: [{
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, decorators: [{
1603
2134
  type: Component,
1604
- args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-security-level', standalone: true, host: {
1605
- 'data-testid': 'monkey-security-level',
2135
+ args: [{ selector: 'monkey-icon-button', standalone: true, imports: [CommonModule, MonkeyIconComponent], encapsulation: ViewEncapsulation.None, host: {
2136
+ 'data-testid': 'monkey-icon-button',
1606
2137
  '[attr.id]': 'id',
1607
2138
  '[id]': 'id'
1608
- }, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"] }]
1609
- }], ctorParameters: () => [], propDecorators: { class: [{
1610
- type: HostBinding,
1611
- args: ['class']
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
1612
2148
  }], id: [{
1613
2149
  type: Input
2150
+ }], onClick: [{
2151
+ type: HostListener,
2152
+ args: ['click', ['$event']]
1614
2153
  }] } });
1615
2154
 
1616
2155
  /** ************************
@@ -1618,47 +2157,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1618
2157
  * This style guide was developed by Monkey Exchange Team
1619
2158
  * MIT Licence
1620
2159
  ************************* */
1621
- class MonkeyStatusComponent {
1622
- get class() {
1623
- return `${this.type()} ${this.size()}`;
1624
- }
1625
- get id() {
1626
- return this._id;
1627
- }
1628
- set id(value) {
1629
- this._id = value || this._uid;
2160
+
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);
2196
+ }
2197
+ else {
2198
+ date = addMonths(date, 1);
2199
+ }
1630
2200
  }
1631
- constructor() {
1632
- this.type = input.required();
1633
- this.size = input('md');
1634
- this.label = input();
1635
- this._uid = inject(IdGenerator).getId('monkey-status-');
1636
- // eslint-disable-next-line no-self-assign
1637
- this.id = this.id;
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
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);
1638
2245
  }
1639
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1640
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeyStatusComponent, isStandalone: true, selector: "monkey-status", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-status" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
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
+ });
1641
2260
  }
1642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
1643
- type: Component,
1644
- args: [{ selector: 'monkey-status', standalone: true, imports: [CommonModule], host: {
1645
- 'data-testid': 'monkey-status',
1646
- '[attr.id]': 'id',
1647
- '[id]': 'id'
1648
- }, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"] }]
1649
- }], ctorParameters: () => [], propDecorators: { class: [{
1650
- type: HostBinding,
1651
- args: ['class']
1652
- }], id: [{
1653
- type: Input
1654
- }] } });
1655
2261
 
1656
2262
  /** ************************
1657
2263
  * Copyright Monkey Exchange. All Rights Reserved
1658
2264
  * This style guide was developed by Monkey Exchange Team
1659
2265
  * MIT Licence
1660
2266
  ************************* */
1661
- class MonkeyPaginationActionComponent {
2267
+ class MonkeyDateRangeMonthComponent {
2268
+ set startDate(val) {
2269
+ this._handledStartDate = val;
2270
+ }
2271
+ set endDate(val) {
2272
+ this._handledEndDate = val;
2273
+ }
1662
2274
  get id() {
1663
2275
  return this._id;
1664
2276
  }
@@ -1666,36 +2278,121 @@ class MonkeyPaginationActionComponent {
1666
2278
  this._id = value || this._uid;
1667
2279
  }
1668
2280
  constructor() {
1669
- this.next = false;
1670
- this.prev = false;
1671
- this.onAction = new EventEmitter();
1672
- this._uid = inject(IdGenerator).getId('monkey-pagination-action-');
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');
1673
2286
  // eslint-disable-next-line no-self-assign
1674
2287
  this.id = this.id;
1675
2288
  }
1676
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1677
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationActionComponent, isStandalone: true, selector: "monkey-pagination-action", inputs: { disabled: "disabled", first: "first", last: "last", next: "next", prev: "prev", id: "id" }, outputs: { onAction: "onAction" }, host: { attributes: { "data-testid": "monkey-pagination-action" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationAction"], ngImport: i0, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
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"] }] }); }
1678
2365
  }
1679
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, decorators: [{
2366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeMonthComponent, decorators: [{
1680
2367
  type: Component,
1681
- args: [{ standalone: true, imports: [CommonModule, MonkeyButtonComponent], encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-action', exportAs: 'monkeyPaginationAction', host: {
1682
- 'data-testid': 'monkey-pagination-action',
2368
+ args: [{ selector: 'monkey-date-range-month', standalone: true, imports: [CommonModule, MonkeyIconButtonComponent], host: {
2369
+ 'data-testid': 'month',
1683
2370
  '[attr.id]': 'id',
1684
2371
  '[id]': 'id'
1685
- }, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"] }]
1686
- }], ctorParameters: () => [], propDecorators: { disabled: [{
1687
- type: Input
1688
- }], first: [{
1689
- type: Input
1690
- }], last: [{
1691
- type: Input
1692
- }], next: [{
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: [{
1693
2374
  type: Input,
1694
2375
  args: [{ required: true }]
1695
- }], prev: [{
2376
+ }], year: [{
1696
2377
  type: Input,
1697
2378
  args: [{ required: true }]
1698
- }], onAction: [{
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: [{
1699
2396
  type: Output
1700
2397
  }], id: [{
1701
2398
  type: Input
@@ -1706,7 +2403,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1706
2403
  * This style guide was developed by Monkey Exchange Team
1707
2404
  * MIT Licence
1708
2405
  ************************* */
1709
- class MonkeyPaginationLabelComponent {
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 {
1710
2413
  get id() {
1711
2414
  return this._id;
1712
2415
  }
@@ -1714,21 +2417,31 @@ class MonkeyPaginationLabelComponent {
1714
2417
  this._id = value || this._uid;
1715
2418
  }
1716
2419
  constructor() {
1717
- this._uid = inject(IdGenerator).getId('monkey-pagination-label-');
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');
1718
2425
  // eslint-disable-next-line no-self-assign
1719
2426
  this.id = this.id;
1720
2427
  }
1721
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1722
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationLabelComponent, isStandalone: true, selector: "monkey-pagination-label", inputs: { id: "id" }, host: { attributes: { "data-testid": "monkey-pagination-label" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationLabel"], ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
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" }] }); }
1723
2434
  }
1724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, decorators: [{
2435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeQuickActionsComponent, decorators: [{
1725
2436
  type: Component,
1726
- args: [{ standalone: true, encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-label', exportAs: 'monkeyPaginationLabel', host: {
1727
- 'data-testid': 'monkey-pagination-label',
2437
+ args: [{ selector: 'monkey-date-range-quick-actions', standalone: true, imports: [CommonModule], host: {
2438
+ 'data-testid': 'quick-actions',
1728
2439
  '[attr.id]': 'id',
1729
2440
  '[id]': 'id'
1730
- }, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"] }]
1731
- }], ctorParameters: () => [], propDecorators: { 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: [{
1732
2445
  type: Input
1733
2446
  }] } });
1734
2447
 
@@ -1737,8 +2450,1280 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1737
2450
  * This style guide was developed by Monkey Exchange Team
1738
2451
  * MIT Licence
1739
2452
  ************************* */
1740
- class MonkeyOptionComponent {
1741
- constructor() {
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: [{
2938
+ type: Optional
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
+ }] } });
3186
+
3187
+ /** ************************
3188
+ * Copyright Monkey Exchange. All Rights Reserved
3189
+ * This style guide was developed by Monkey Exchange Team
3190
+ * MIT Licence
3191
+ ************************* */
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 {
3199
+ constructor() {
3200
+ this.mkAlign = 'end';
3201
+ this.id = inject(IdGenerator).getId('monkey-modal-actions-');
3202
+ }
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 }); }
3205
+ }
3206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, decorators: [{
3207
+ type: Directive,
3208
+ args: [{
3209
+ selector: 'monkey-modal-actions, [monkey-modal-actions]',
3210
+ host: {
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',
3237
+ '[attr.id]': 'id || null'
3238
+ }
3239
+ }]
3240
+ }] });
3241
+
3242
+ /** ************************
3243
+ * Copyright Monkey Exchange. All Rights Reserved
3244
+ * This style guide was developed by Monkey Exchange Team
3245
+ * MIT Licence
3246
+ ************************* */
3247
+ class MonkeyModalSubtitleDirective {
3248
+ constructor() {
3249
+ this.id = inject(IdGenerator).getId('monkey-modal-subtitle-');
3250
+ }
3251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3252
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalSubtitleDirective, selector: "monkey-modal-subtitle, [monkey-modal-subtitle]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-subtitle" }, ngImport: i0 }); }
3253
+ }
3254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalSubtitleDirective, decorators: [{
3255
+ type: Directive,
3256
+ args: [{
3257
+ selector: 'monkey-modal-subtitle, [monkey-modal-subtitle]',
3258
+ host: {
3259
+ class: 'mecx-modal-subtitle',
3260
+ '[attr.id]': 'id || null'
3261
+ }
3262
+ }]
3263
+ }] });
3264
+
3265
+ /** ************************
3266
+ * Copyright Monkey Exchange. All Rights Reserved
3267
+ * This style guide was developed by Monkey Exchange Team
3268
+ * MIT Licence
3269
+ ************************* */
3270
+ class MonkeyModalTitleDirective {
3271
+ constructor() {
3272
+ this.id = inject(IdGenerator).getId('monkey-modal-title-');
3273
+ }
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 }); }
3276
+ }
3277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, decorators: [{
3278
+ type: Directive,
3279
+ args: [{
3280
+ selector: 'monkey-modal-title, [monkey-modal-title]',
3281
+ host: {
3282
+ class: 'mecx-modal-title',
3283
+ '[attr.id]': 'id || null'
3284
+ }
3285
+ }]
3286
+ }] });
3287
+
3288
+ /** ************************
3289
+ * Copyright Monkey Exchange. All Rights Reserved
3290
+ * This style guide was developed by Monkey Exchange Team
3291
+ * MIT Licence
3292
+ ************************* */
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]);
3484
+ }
3485
+ }
3486
+
3487
+ /** ************************
3488
+ * Copyright Monkey Exchange. All Rights Reserved
3489
+ * This style guide was developed by Monkey Exchange Team
3490
+ * MIT Licence
3491
+ ************************* */
3492
+ class MonkeyModalDefaultComponent {
3493
+ constructor(config, modalRef) {
3494
+ this.config = config;
3495
+ this.modalRef = modalRef;
3496
+ this.title = '';
3497
+ this.subtitle = '';
3498
+ this.content = '';
3499
+ this.cancelLabel = '';
3500
+ this.okLabel = '';
3501
+ // not to do
3502
+ }
3503
+ onSubmit() {
3504
+ this.modalRef.close(true);
3505
+ }
3506
+ onClose() {
3507
+ this.modalRef.close();
3508
+ }
3509
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalDefaultComponent, deps: [{ token: MECX_MODAL_DEFAULT_CONFIG }, { token: MonkeyModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
3510
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalDefaultComponent, selector: "monkey-modal-default", ngImport: i0, template: `
3511
+ <monkey-modal>
3512
+ <monkey-modal-title [innerHTML]="config.title"></monkey-modal-title>
3513
+ <monkey-modal-subtitle [innerHTML]="config.subtitle"></monkey-modal-subtitle>
3514
+ <monkey-modal-content [innerHTML]="config.content"></monkey-modal-content>
3515
+ <monkey-modal-actions mkAlign="end">
3516
+ <monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
3517
+ <monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
3518
+ </monkey-modal-actions>
3519
+ </monkey-modal>
3520
+ `, isInline: true, dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyModalComponent, selector: "monkey-modal" }, { kind: "directive", type: MonkeyModalTitleDirective, selector: "monkey-modal-title, [monkey-modal-title]" }, { kind: "directive", type: MonkeyModalSubtitleDirective, selector: "monkey-modal-subtitle, [monkey-modal-subtitle]" }, { kind: "directive", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]" }, { kind: "directive", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: ["mkAlign"] }] }); }
3521
+ }
3522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalDefaultComponent, decorators: [{
3523
+ type: Component,
3524
+ args: [{
3525
+ selector: 'monkey-modal-default',
3526
+ template: `
3527
+ <monkey-modal>
3528
+ <monkey-modal-title [innerHTML]="config.title"></monkey-modal-title>
3529
+ <monkey-modal-subtitle [innerHTML]="config.subtitle"></monkey-modal-subtitle>
3530
+ <monkey-modal-content [innerHTML]="config.content"></monkey-modal-content>
3531
+ <monkey-modal-actions mkAlign="end">
3532
+ <monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
3533
+ <monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
3534
+ </monkey-modal-actions>
3535
+ </monkey-modal>
3536
+ `
3537
+ }]
3538
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
3539
+ type: Inject,
3540
+ args: [MECX_MODAL_DEFAULT_CONFIG]
3541
+ }] }, { type: MonkeyModalRef, decorators: [{
3542
+ type: Inject,
3543
+ args: [MonkeyModalRef]
3544
+ }] }] });
3545
+
3546
+ /** ************************
3547
+ * Copyright Monkey Exchange. All Rights Reserved
3548
+ * This style guide was developed by Monkey Exchange Team
3549
+ * MIT Licence
3550
+ ************************* */
3551
+ class MonkeyModalModule {
3552
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3553
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, declarations: [MonkeyModalComponent,
3554
+ MonkeyModalDefaultComponent,
3555
+ MonkeyModalTitleDirective,
3556
+ MonkeyModalSubtitleDirective,
3557
+ MonkeyModalContentDirective,
3558
+ MonkeyModalActionsDirective], imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent], exports: [MonkeyModalComponent,
3559
+ MonkeyModalTitleDirective,
3560
+ MonkeyModalSubtitleDirective,
3561
+ MonkeyModalContentDirective,
3562
+ MonkeyModalActionsDirective] }); }
3563
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent] }); }
3564
+ }
3565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, decorators: [{
3566
+ type: NgModule,
3567
+ args: [{
3568
+ imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent],
3569
+ declarations: [
3570
+ MonkeyModalComponent,
3571
+ MonkeyModalDefaultComponent,
3572
+ MonkeyModalTitleDirective,
3573
+ MonkeyModalSubtitleDirective,
3574
+ MonkeyModalContentDirective,
3575
+ MonkeyModalActionsDirective
3576
+ ],
3577
+ exports: [
3578
+ MonkeyModalComponent,
3579
+ MonkeyModalTitleDirective,
3580
+ MonkeyModalSubtitleDirective,
3581
+ MonkeyModalContentDirective,
3582
+ MonkeyModalActionsDirective
3583
+ ]
3584
+ }]
3585
+ }] });
3586
+
3587
+ /** ************************
3588
+ * Copyright Monkey Exchange. All Rights Reserved
3589
+ * This style guide was developed by Monkey Exchange Team
3590
+ * MIT Licence
3591
+ ************************* */
3592
+ class MonkeyModalService {
3593
+ constructor(overlay, injector) {
3594
+ this.overlay = overlay;
3595
+ this.injector = injector;
3596
+ this._idGenerator = inject(IdGenerator);
3597
+ this._openDialogsAtThisLevel = [];
3598
+ this._parentDialog = inject(MonkeyModalService, { optional: true, skipSelf: true });
3599
+ // not to do
3600
+ }
3601
+ get openDialogs() {
3602
+ return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
3603
+ }
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
+ }
3642
+ const state = new OverlayConfig({
3643
+ positionStrategy,
3644
+ scrollStrategy: this.overlay.scrollStrategies.block(),
3645
+ panelClass: config.panelClass,
3646
+ hasBackdrop: config.hasBackdrop,
3647
+ minWidth: config.minWidth,
3648
+ minHeight: config.minHeight,
3649
+ maxWidth: config.maxWidth,
3650
+ maxHeight: config.maxHeight,
3651
+ width: config.width,
3652
+ height: config.height,
3653
+ disposeOnNavigation: config.closeOnNavigation
3654
+ });
3655
+ if (config.backdropClass) {
3656
+ state.backdropClass = config.backdropClass;
3657
+ }
3658
+ if (!config.width && config.maxWidth) {
3659
+ state.width = '100%';
3660
+ }
3661
+ if (!config.height && config.maxHeight) {
3662
+ state.height = '100%';
3663
+ }
3664
+ return state;
3665
+ }
3666
+ createInjector(config, dialogRef, overlayRef, fallbackInjector) {
3667
+ const providers = [
3668
+ { provide: OverlayRef, useValue: overlayRef },
3669
+ { provide: MonkeyModalRef, useValue: dialogRef },
3670
+ { provide: MECX_MODAL_DATA, useValue: config.data }
3671
+ ];
3672
+ if (config.providers) {
3673
+ providers.push(...config.providers);
3674
+ }
3675
+ return Injector.create({ parent: fallbackInjector, providers });
3676
+ }
3677
+ open(component, config) {
3678
+ const defaultConfig = new MonkeyModalConfig();
3679
+ config = { ...defaultConfig, ...config };
3680
+ config.id = this._idGenerator.getId('monkey-modal-');
3681
+ const overlayConfig = this.getOverlayConfig(config);
3682
+ const overlayRef = this.overlay.create(overlayConfig);
3683
+ const modalRef = new MonkeyModalRef(overlayRef, config);
3684
+ const injector = this.createInjector(config, modalRef, overlayRef, this.injector);
3685
+ const componentPortal = new ComponentPortal(component, null, injector);
3686
+ const componentRef = overlayRef.attach(componentPortal);
3687
+ const componentElement = componentRef.location.nativeElement;
3688
+ componentElement.style.width = '100%';
3689
+ componentElement.style.height = '100%';
3690
+ modalRef.componentInstance = componentRef.instance;
3691
+ this.openDialogs.push(modalRef);
3692
+ return modalRef;
3693
+ }
3694
+ openDefault(params, config) {
3695
+ const providers = [{ provide: MECX_MODAL_DEFAULT_CONFIG, useValue: params }];
3696
+ config.providers = providers;
3697
+ config.icon = config.icon ? config.icon : 'help';
3698
+ return this.open(MonkeyModalDefaultComponent, config);
3699
+ }
3700
+ closeAll() {
3701
+ reverseForEach(this.openDialogs, (dialog) => {
3702
+ return dialog.close();
3703
+ });
3704
+ this.openDialogs.splice(0, this.openDialogs.length);
3705
+ }
3706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, deps: [{ token: i1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
3707
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, providedIn: 'root' }); }
3708
+ }
3709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, decorators: [{
3710
+ type: Injectable,
3711
+ args: [{ providedIn: 'root' }]
3712
+ }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }] });
3713
+
3714
+ /** ************************
3715
+ * Copyright Monkey Exchange. All Rights Reserved
3716
+ * This style guide was developed by Monkey Exchange Team
3717
+ * MIT Licence
3718
+ ************************* */
3719
+
3720
+ /** ************************
3721
+ * Copyright Monkey Exchange. All Rights Reserved
3722
+ * This style guide was developed by Monkey Exchange Team
3723
+ * MIT Licence
3724
+ ************************* */
3725
+ class MonkeyOptionComponent {
3726
+ constructor() {
1742
3727
  this.idGenerator = inject(IdGenerator);
1743
3728
  this.disabled = false;
1744
3729
  this.selected = false;
@@ -1783,6 +3768,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1783
3768
  args: ['click', ['$event']]
1784
3769
  }] } });
1785
3770
 
3771
+ /** ************************
3772
+ * Copyright Monkey Exchange. All Rights Reserved
3773
+ * This style guide was developed by Monkey Exchange Team
3774
+ * MIT Licence
3775
+ ************************* */
3776
+
3777
+ /** ************************
3778
+ * Copyright Monkey Exchange. All Rights Reserved
3779
+ * This style guide was developed by Monkey Exchange Team
3780
+ * MIT Licence
3781
+ ************************* */
3782
+ class MonkeySecurityLevelComponent {
3783
+ get class() {
3784
+ if (this.score() === 0) {
3785
+ return 'empty';
3786
+ }
3787
+ if (this.score() < 300) {
3788
+ return 'weak';
3789
+ }
3790
+ if (this.score() >= 300 && this.score() < 800) {
3791
+ return 'medium';
3792
+ }
3793
+ if (this.score() >= 800 && this.score() < 1000) {
3794
+ return 'strong';
3795
+ }
3796
+ return 'very-strong';
3797
+ }
3798
+ get id() {
3799
+ return this._id;
3800
+ }
3801
+ set id(value) {
3802
+ this._id = value || this._uid;
3803
+ }
3804
+ constructor() {
3805
+ this.label = input();
3806
+ this.score = input.required();
3807
+ this.strengthLabel = input();
3808
+ this._uid = inject(IdGenerator).getId('monkey-security-level-');
3809
+ // eslint-disable-next-line no-self-assign
3810
+ this.id = this.id;
3811
+ }
3812
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3813
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeySecurityLevelComponent, isStandalone: true, selector: "monkey-security-level", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, score: { classPropertyName: "score", publicName: "score", isSignal: true, isRequired: true, transformFunction: null }, strengthLabel: { classPropertyName: "strengthLabel", publicName: "strengthLabel", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-security-level" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
3814
+ }
3815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, decorators: [{
3816
+ type: Component,
3817
+ args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-security-level', standalone: true, host: {
3818
+ 'data-testid': 'monkey-security-level',
3819
+ '[attr.id]': 'id',
3820
+ '[id]': 'id'
3821
+ }, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"] }]
3822
+ }], ctorParameters: () => [], propDecorators: { class: [{
3823
+ type: HostBinding,
3824
+ args: ['class']
3825
+ }], id: [{
3826
+ type: Input
3827
+ }] } });
3828
+
3829
+ /** ************************
3830
+ * Copyright Monkey Exchange. All Rights Reserved
3831
+ * This style guide was developed by Monkey Exchange Team
3832
+ * MIT Licence
3833
+ ************************* */
3834
+
1786
3835
  /** ************************
1787
3836
  * Copyright Monkey Exchange. All Rights Reserved
1788
3837
  * This style guide was developed by Monkey Exchange Team
@@ -1825,13 +3874,16 @@ class MonkeySelectComponent {
1825
3874
  this.formField = formField;
1826
3875
  this.tabIndex = 0;
1827
3876
  this.onChange = new EventEmitter();
3877
+ this.onSearch = new EventEmitter();
1828
3878
  this.placeholder = '';
1829
3879
  this.loading = false;
3880
+ this.showSearch = true;
3881
+ this.searchPlaceholder = '';
3882
+ this.callbackSearch = false;
1830
3883
  this._value = null;
1831
3884
  this.labelSelected = '';
1832
3885
  this.overlayRef = null;
1833
- this.isOpen = false;
1834
- this._destroyed = inject(MonkeyDestroyService);
3886
+ this._destroyRef = inject(DestroyRef);
1835
3887
  this.iconArrowDown = inject(MonkeyIconsService).arrowDown;
1836
3888
  this.idGenerator = inject(IdGenerator);
1837
3889
  this.ngControl = inject(NgControl, { self: true, optional: true });
@@ -1843,6 +3895,14 @@ class MonkeySelectComponent {
1843
3895
  this.percent = false;
1844
3896
  this.stateChanges = new Subject();
1845
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 = '';
1846
3906
  this.onAnimationEnd = (event) => {
1847
3907
  if (event.toState === 'closed') {
1848
3908
  this.closeOverlay();
@@ -1877,30 +3937,6 @@ class MonkeySelectComponent {
1877
3937
  }
1878
3938
  });
1879
3939
  }
1880
- ngAfterContentInit() {
1881
- this.initializeOptions();
1882
- this.options.changes.subscribe((resp) => {
1883
- this.updateSelectedLabel();
1884
- this.initializeOptions();
1885
- this.changeSelected();
1886
- });
1887
- }
1888
- ngOnDestroy() {
1889
- if (this.overlayRef) {
1890
- this.overlayRef.dispose();
1891
- }
1892
- }
1893
- toggleDropdown() {
1894
- if (!this.disabled) {
1895
- if (this.isOpen) {
1896
- this.closeDropdown();
1897
- this._onTouched();
1898
- }
1899
- else {
1900
- this.openDropdown();
1901
- }
1902
- }
1903
- }
1904
3940
  openDropdown() {
1905
3941
  if (this.options?.length) {
1906
3942
  this.formField.control.disableToBeDirty = true;
@@ -1913,6 +3949,9 @@ class MonkeySelectComponent {
1913
3949
  this.isOpen = false;
1914
3950
  this.focused = false;
1915
3951
  this.formField.control.disableToBeDirty = false;
3952
+ if (!this.callbackSearch) {
3953
+ this.searchData = '';
3954
+ }
1916
3955
  }
1917
3956
  closeOverlay() {
1918
3957
  if (this.overlayRef) {
@@ -1920,6 +3959,30 @@ class MonkeySelectComponent {
1920
3959
  this.overlayRef = null;
1921
3960
  }
1922
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
+ }
1923
3986
  createOverlay() {
1924
3987
  if (this.overlayRef) {
1925
3988
  return;
@@ -1964,10 +4027,75 @@ class MonkeySelectComponent {
1964
4027
  this.overlayRef.attach(portal);
1965
4028
  this.overlayRef
1966
4029
  .backdropClick()
1967
- .pipe(takeUntil(this._destroyed))
4030
+ .pipe(takeUntilDestroyed(this._destroyRef))
1968
4031
  .subscribe(() => {
1969
4032
  return this.closeDropdown();
1970
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
+ }
1971
4099
  }
1972
4100
  selectOption(option) {
1973
4101
  if (!option.disabled && !this.disabled) {
@@ -1981,12 +4109,6 @@ class MonkeySelectComponent {
1981
4109
  });
1982
4110
  }
1983
4111
  }
1984
- updateSelectedLabel() {
1985
- const selectedOption = this.options.find((opt) => {
1986
- return opt.value === this.value;
1987
- });
1988
- this.labelSelected = selectedOption ? selectedOption.displayContent : '';
1989
- }
1990
4112
  writeValue(value) {
1991
4113
  this.value = value;
1992
4114
  this.changeSelected();
@@ -2029,12 +4151,21 @@ class MonkeySelectComponent {
2029
4151
  this.stateChanges.next();
2030
4152
  }
2031
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
+ }
2032
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 }); }
2033
- 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: [
2034
4166
  // eslint-disable-next-line no-use-before-define
2035
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent },
2036
- MonkeyDestroyService
2037
- ], 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: [
2038
4169
  trigger('animation', [
2039
4170
  transition(':enter', [
2040
4171
  style({
@@ -2056,10 +4187,9 @@ class MonkeySelectComponent {
2056
4187
  }
2057
4188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, decorators: [{
2058
4189
  type: Component,
2059
- 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: [
2060
4191
  // eslint-disable-next-line no-use-before-define
2061
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent },
2062
- MonkeyDestroyService
4192
+ { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
2063
4193
  ], animations: [
2064
4194
  trigger('animation', [
2065
4195
  transition(':enter', [
@@ -2087,7 +4217,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2087
4217
  '[attr.tabindex]': 'disabled ? -1 : tabIndex',
2088
4218
  '(focus)': '_onFocus()',
2089
4219
  '(blur)': '_onBlur()'
2090
- }, 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"] }]
2091
4221
  }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: MonkeyFormFieldComponent, decorators: [{
2092
4222
  type: Optional
2093
4223
  }] }], propDecorators: { overlayTemplate: [{
@@ -2106,12 +4236,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2106
4236
  type: Input
2107
4237
  }], onChange: [{
2108
4238
  type: Output
4239
+ }], onSearch: [{
4240
+ type: Output
2109
4241
  }], placeholder: [{
2110
4242
  type: Input,
2111
4243
  args: [{ required: true }]
2112
4244
  }], loading: [{
2113
4245
  type: Input,
2114
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 }]
2115
4255
  }], disabled: [{
2116
4256
  type: Input,
2117
4257
  args: [{ transform: booleanAttribute }]
@@ -2122,6 +4262,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2122
4262
  type: Input
2123
4263
  }] } });
2124
4264
 
4265
+ /** ************************
4266
+ * Copyright Monkey Exchange. All Rights Reserved
4267
+ * This style guide was developed by Monkey Exchange Team
4268
+ * MIT Licence
4269
+ ************************* */
4270
+
4271
+ /** ************************
4272
+ * Copyright Monkey Exchange. All Rights Reserved
4273
+ * This style guide was developed by Monkey Exchange Team
4274
+ * MIT Licence
4275
+ ************************* */
4276
+ class MonkeyStatusComponent {
4277
+ get class() {
4278
+ return `${this.type()} ${this.size()}`;
4279
+ }
4280
+ get id() {
4281
+ return this._id;
4282
+ }
4283
+ set id(value) {
4284
+ this._id = value || this._uid;
4285
+ }
4286
+ constructor() {
4287
+ this.type = input.required();
4288
+ this.size = input('md');
4289
+ this.label = input();
4290
+ this._uid = inject(IdGenerator).getId('monkey-status-');
4291
+ // eslint-disable-next-line no-self-assign
4292
+ this.id = this.id;
4293
+ }
4294
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4295
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeyStatusComponent, isStandalone: true, selector: "monkey-status", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-status" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
4296
+ }
4297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
4298
+ type: Component,
4299
+ args: [{ selector: 'monkey-status', standalone: true, imports: [CommonModule], host: {
4300
+ 'data-testid': 'monkey-status',
4301
+ '[attr.id]': 'id',
4302
+ '[id]': 'id'
4303
+ }, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"] }]
4304
+ }], ctorParameters: () => [], propDecorators: { class: [{
4305
+ type: HostBinding,
4306
+ args: ['class']
4307
+ }], id: [{
4308
+ type: Input
4309
+ }] } });
4310
+
4311
+ /** ************************
4312
+ * Copyright Monkey Exchange. All Rights Reserved
4313
+ * This style guide was developed by Monkey Exchange Team
4314
+ * MIT Licence
4315
+ ************************* */
4316
+
4317
+ /** ************************
4318
+ * Copyright Monkey Exchange. All Rights Reserved
4319
+ * This style guide was developed by Monkey Exchange Team
4320
+ * MIT Licence
4321
+ ************************* */
4322
+ class MonkeyPaginationActionComponent {
4323
+ get id() {
4324
+ return this._id;
4325
+ }
4326
+ set id(value) {
4327
+ this._id = value || this._uid;
4328
+ }
4329
+ constructor() {
4330
+ this.next = false;
4331
+ this.prev = false;
4332
+ this.onAction = new EventEmitter();
4333
+ this._uid = inject(IdGenerator).getId('monkey-pagination-action-');
4334
+ // eslint-disable-next-line no-self-assign
4335
+ this.id = this.id;
4336
+ }
4337
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4338
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationActionComponent, isStandalone: true, selector: "monkey-pagination-action", inputs: { disabled: "disabled", first: "first", last: "last", next: "next", prev: "prev", id: "id" }, outputs: { onAction: "onAction" }, host: { attributes: { "data-testid": "monkey-pagination-action" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationAction"], ngImport: i0, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
4339
+ }
4340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, decorators: [{
4341
+ type: Component,
4342
+ args: [{ standalone: true, imports: [CommonModule, MonkeyButtonComponent], encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-action', exportAs: 'monkeyPaginationAction', host: {
4343
+ 'data-testid': 'monkey-pagination-action',
4344
+ '[attr.id]': 'id',
4345
+ '[id]': 'id'
4346
+ }, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"] }]
4347
+ }], ctorParameters: () => [], propDecorators: { disabled: [{
4348
+ type: Input
4349
+ }], first: [{
4350
+ type: Input
4351
+ }], last: [{
4352
+ type: Input
4353
+ }], next: [{
4354
+ type: Input,
4355
+ args: [{ required: true }]
4356
+ }], prev: [{
4357
+ type: Input,
4358
+ args: [{ required: true }]
4359
+ }], onAction: [{
4360
+ type: Output
4361
+ }], id: [{
4362
+ type: Input
4363
+ }] } });
4364
+
4365
+ /** ************************
4366
+ * Copyright Monkey Exchange. All Rights Reserved
4367
+ * This style guide was developed by Monkey Exchange Team
4368
+ * MIT Licence
4369
+ ************************* */
4370
+ class MonkeyPaginationLabelComponent {
4371
+ get id() {
4372
+ return this._id;
4373
+ }
4374
+ set id(value) {
4375
+ this._id = value || this._uid;
4376
+ }
4377
+ constructor() {
4378
+ this._uid = inject(IdGenerator).getId('monkey-pagination-label-');
4379
+ // eslint-disable-next-line no-self-assign
4380
+ this.id = this.id;
4381
+ }
4382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4383
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationLabelComponent, isStandalone: true, selector: "monkey-pagination-label", inputs: { id: "id" }, host: { attributes: { "data-testid": "monkey-pagination-label" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationLabel"], ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
4384
+ }
4385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, decorators: [{
4386
+ type: Component,
4387
+ args: [{ standalone: true, encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-label', exportAs: 'monkeyPaginationLabel', host: {
4388
+ 'data-testid': 'monkey-pagination-label',
4389
+ '[attr.id]': 'id',
4390
+ '[id]': 'id'
4391
+ }, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"] }]
4392
+ }], ctorParameters: () => [], propDecorators: { id: [{
4393
+ type: Input
4394
+ }] } });
4395
+
2125
4396
  /** ************************
2126
4397
  * Copyright Monkey Exchange. All Rights Reserved
2127
4398
  * This style guide was developed by Monkey Exchange Team
@@ -2142,7 +4413,7 @@ class MonkeyPaginationSizeComponent {
2142
4413
  this.id = this.id;
2143
4414
  }
2144
4415
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2145
- 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 }); }
2146
4417
  }
2147
4418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, decorators: [{
2148
4419
  type: Component,
@@ -2157,7 +4428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2157
4428
  'data-testid': 'monkey-pagination-size',
2158
4429
  '[attr.id]': 'id',
2159
4430
  '[id]': 'id'
2160
- }, 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"] }]
2161
4432
  }], ctorParameters: () => [], propDecorators: { size: [{
2162
4433
  type: Input,
2163
4434
  args: [{ required: true }]
@@ -2258,7 +4529,7 @@ class MonkeyTableComponent {
2258
4529
  }
2259
4530
  }
2260
4531
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2261
- 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 }); }
2262
4533
  }
2263
4534
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, decorators: [{
2264
4535
  type: Component,
@@ -2658,7 +4929,8 @@ class MonkeyTableModule {
2658
4929
  MonkeyColumnStick,
2659
4930
  MonkeyColumnChecked,
2660
4931
  MonkeyColumnSortable,
2661
- MonkeyColumnExpansible], imports: [MonkeyButtonComponent,
4932
+ MonkeyColumnExpansible], imports: [CommonModule,
4933
+ MonkeyButtonComponent,
2662
4934
  MonkeyPaginationSizeComponent,
2663
4935
  MonkeyPaginationLabelComponent,
2664
4936
  MonkeyPaginationActionComponent], exports: [MonkeyTableComponent,
@@ -2666,7 +4938,8 @@ class MonkeyTableModule {
2666
4938
  MonkeyColumnChecked,
2667
4939
  MonkeyColumnSortable,
2668
4940
  MonkeyColumnExpansible] }); }
2669
- 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,
2670
4943
  MonkeyPaginationSizeComponent,
2671
4944
  MonkeyPaginationActionComponent] }); }
2672
4945
  }
@@ -2674,6 +4947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2674
4947
  type: NgModule,
2675
4948
  args: [{
2676
4949
  imports: [
4950
+ CommonModule,
2677
4951
  MonkeyButtonComponent,
2678
4952
  MonkeyPaginationSizeComponent,
2679
4953
  MonkeyPaginationLabelComponent,
@@ -2696,6 +4970,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2696
4970
  }]
2697
4971
  }] });
2698
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
+ ************************* */
2699
4984
  class MonkeyToastComponent {
2700
4985
  get id() {
2701
4986
  return this._id;
@@ -2727,7 +5012,7 @@ class MonkeyToastComponent {
2727
5012
  }
2728
5013
  }
2729
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 }); }
2730
- 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 }); }
2731
5016
  }
2732
5017
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastComponent, decorators: [{
2733
5018
  type: Component,
@@ -2736,7 +5021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2736
5021
  '(animationend)': 'onAnimationEnd($event)',
2737
5022
  '[attr.id]': 'id',
2738
5023
  '[id]': 'id'
2739
- }, 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"] }]
2740
5025
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { message: [{
2741
5026
  type: Input
2742
5027
  }], icon: [{
@@ -2764,6 +5049,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2764
5049
  args: ['animation']
2765
5050
  }] } });
2766
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
+ ************************* */
2767
5063
  class MonkeyToggleComponent {
2768
5064
  set value(_) {
2769
5065
  if (typeof _ === 'string') {
@@ -2828,6 +5124,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2828
5124
  args: ['click', ['$event']]
2829
5125
  }] } });
2830
5126
 
5127
+ /** ************************
5128
+ * Copyright Monkey Exchange. All Rights Reserved
5129
+ * This style guide was developed by Monkey Exchange Team
5130
+ * MIT Licence
5131
+ ************************* */
5132
+
2831
5133
  /** ************************
2832
5134
  * Copyright Monkey Exchange. All Rights Reserved
2833
5135
  * This style guide was developed by Monkey Exchange Team
@@ -2839,17 +5141,23 @@ class MonkeyToggleLineButtonComponent {
2839
5141
  this.onChange = new EventEmitter();
2840
5142
  }
2841
5143
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2842
- 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 }); }
2843
5145
  }
2844
5146
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineButtonComponent, decorators: [{
2845
5147
  type: Component,
2846
- 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"] }]
2847
5149
  }], propDecorators: { disabled: [{
2848
5150
  type: Input
2849
5151
  }], onChange: [{
2850
5152
  type: Output
2851
5153
  }] } });
2852
5154
 
5155
+ /** ************************
5156
+ * Copyright Monkey Exchange. All Rights Reserved
5157
+ * This style guide was developed by Monkey Exchange Team
5158
+ * MIT Licence
5159
+ ************************* */
5160
+
2853
5161
  /** ************************
2854
5162
  * Copyright Monkey Exchange. All Rights Reserved
2855
5163
  * This style guide was developed by Monkey Exchange Team
@@ -2899,7 +5207,7 @@ class MonkeyToggleLineComponent {
2899
5207
  this.subscriptions.unsubscribe();
2900
5208
  }
2901
5209
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2902
- 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 }); }
2903
5211
  }
2904
5212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleLineComponent, decorators: [{
2905
5213
  type: Component,
@@ -2907,7 +5215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2907
5215
  'data-testid': 'monkey-toggle-line',
2908
5216
  '[attr.id]': 'id',
2909
5217
  '[id]': 'id'
2910
- }, 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"] }]
2911
5219
  }], ctorParameters: () => [], propDecorators: { value: [{
2912
5220
  type: Input
2913
5221
  }], name: [{
@@ -2929,6 +5237,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2929
5237
  type: Input
2930
5238
  }] } });
2931
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
+ ************************* */
2932
5251
  class MonkeyTooltipComponent {
2933
5252
  get id() {
2934
5253
  return this._id;
@@ -2952,7 +5271,7 @@ class MonkeyTooltipComponent {
2952
5271
  }
2953
5272
  }
2954
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 }); }
2955
- 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"] }] }); }
2956
5275
  }
2957
5276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipComponent, decorators: [{
2958
5277
  type: Component,
@@ -2963,7 +5282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2963
5282
  '(animationend)': 'onAnimationEnd($event)',
2964
5283
  '[attr.id]': 'id',
2965
5284
  '[id]': 'id'
2966
- }, 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"] }]
2967
5286
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { text: [{
2968
5287
  type: Input
2969
5288
  }], template: [{
@@ -2978,6 +5297,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2978
5297
  type: Input
2979
5298
  }] } });
2980
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
+ ************************* */
2981
5311
  class MonkeyTooltipDirective {
2982
5312
  constructor(viewContainerRef, elementRef, appRef, document) {
2983
5313
  this.viewContainerRef = viewContainerRef;
@@ -3155,9 +5485,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3155
5485
  * MIT Licence
3156
5486
  ************************* */
3157
5487
 
5488
+ /** ************************
5489
+ * Copyright Monkey Exchange. All Rights Reserved
5490
+ * This style guide was developed by Monkey Exchange Team
5491
+ * MIT Licence
5492
+ ************************* */
5493
+
3158
5494
  /**
3159
5495
  * Generated bundle index. Do not edit.
3160
5496
  */
3161
5497
 
3162
- export { 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, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, ToastRef, getCurrencySymbol, 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 };
3163
5499
  //# sourceMappingURL=monkey-style-guide-v2.mjs.map