monkey-front-components 0.0.383 → 0.0.384

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 (276) hide show
  1. package/karma.conf.js +44 -0
  2. package/monkey-front-components-0.0.384.tgz +0 -0
  3. package/ng-package.json +10 -0
  4. package/package.json +7 -27
  5. package/src/lib/components/base/base-component.ts +359 -0
  6. package/src/lib/components/base/base-dynamic-array.ts +233 -0
  7. package/src/lib/components/base/base-dynamic.ts +90 -0
  8. package/src/lib/components/base/base-scroll-component.ts +52 -0
  9. package/src/lib/components/base/base-validators.ts +19 -0
  10. package/{lib/components/base/index.d.ts → src/lib/components/base/index.ts} +5 -5
  11. package/src/lib/components/dynamic/button/button.component.html +4 -0
  12. package/src/lib/components/dynamic/button/button.component.scss +7 -0
  13. package/src/lib/components/dynamic/button/button.component.ts +47 -0
  14. package/{lib/components/dynamic/button/index.d.ts → src/lib/components/dynamic/button/index.ts} +1 -1
  15. package/src/lib/components/dynamic/dynamic-directive.ts +102 -0
  16. package/src/lib/components/dynamic/dynamic.module.ts +53 -0
  17. package/src/lib/components/dynamic/file-upload/file-upload.component.html +10 -0
  18. package/src/lib/components/dynamic/file-upload/file-upload.component.ts +46 -0
  19. package/{lib/components/dynamic/file-upload/index.d.ts → src/lib/components/dynamic/file-upload/index.ts} +1 -1
  20. package/src/lib/components/dynamic/form/dynamic-form-array.component.html +19 -0
  21. package/src/lib/components/dynamic/form/dynamic-form-array.component.scss +10 -0
  22. package/src/lib/components/dynamic/form/dynamic-form-array.component.ts +75 -0
  23. package/src/lib/components/dynamic/form/dynamic-form.component.html +7 -0
  24. package/src/lib/components/dynamic/form/dynamic-form.component.ts +49 -0
  25. package/{lib/components/dynamic/form/index.d.ts → src/lib/components/dynamic/form/index.ts} +2 -2
  26. package/{lib/components/dynamic/index.d.ts → src/lib/components/dynamic/index.ts} +8 -8
  27. package/{lib/components/dynamic/input/index.d.ts → src/lib/components/dynamic/input/index.ts} +1 -1
  28. package/src/lib/components/dynamic/input/input.component.html +9 -0
  29. package/src/lib/components/dynamic/input/input.component.ts +58 -0
  30. package/{lib/components/dynamic/input-phone/index.d.ts → src/lib/components/dynamic/input-phone/index.ts} +1 -1
  31. package/src/lib/components/dynamic/input-phone/input-phone.component.html +7 -0
  32. package/src/lib/components/dynamic/input-phone/input-phone.component.ts +58 -0
  33. package/{lib/components/dynamic/radio/index.d.ts → src/lib/components/dynamic/radio/index.ts} +1 -1
  34. package/src/lib/components/dynamic/radio/radio.component.html +8 -0
  35. package/src/lib/components/dynamic/radio/radio.component.ts +22 -0
  36. package/{lib/components/dynamic/select/index.d.ts → src/lib/components/dynamic/select/index.ts} +1 -1
  37. package/src/lib/components/dynamic/select/select.component.html +14 -0
  38. package/src/lib/components/dynamic/select/select.component.ts +75 -0
  39. package/{lib/components/dynamic/select-search/index.d.ts → src/lib/components/dynamic/select-search/index.ts} +1 -1
  40. package/src/lib/components/dynamic/select-search/select-search.component.html +15 -0
  41. package/src/lib/components/dynamic/select-search/select-search.component.ts +76 -0
  42. package/{lib/components/index.d.ts → src/lib/components/index.ts} +3 -3
  43. package/src/lib/components/shared/filter/filter.component.html +51 -0
  44. package/src/lib/components/shared/filter/filter.component.scss +79 -0
  45. package/src/lib/components/shared/filter/filter.component.ts +117 -0
  46. package/src/lib/components/shared/filter/filter.module.ts +36 -0
  47. package/{lib/components/shared/filter/index.d.ts → src/lib/components/shared/filter/index.ts} +2 -2
  48. package/{lib/components/shared/filter/menu/index.d.ts → src/lib/components/shared/filter/menu/index.ts} +1 -1
  49. package/src/lib/components/shared/filter/menu/menu.component.html +28 -0
  50. package/src/lib/components/shared/filter/menu/menu.component.scss +62 -0
  51. package/src/lib/components/shared/filter/menu/menu.component.ts +122 -0
  52. package/src/lib/components/shared/filter/menu/menu.module.ts +41 -0
  53. package/src/lib/components/shared/filter/options/children/children.component.html +6 -0
  54. package/src/lib/components/shared/filter/options/children/children.component.scss +30 -0
  55. package/src/lib/components/shared/filter/options/children/children.component.ts +58 -0
  56. package/{lib/components/shared/filter/options/children/index.d.ts → src/lib/components/shared/filter/options/children/index.ts} +1 -1
  57. package/src/lib/components/shared/filter/options/currency/currency.component.html +3 -0
  58. package/src/lib/components/shared/filter/options/currency/currency.component.scss +19 -0
  59. package/src/lib/components/shared/filter/options/currency/currency.component.ts +52 -0
  60. package/{lib/components/shared/filter/options/currency/index.d.ts → src/lib/components/shared/filter/options/currency/index.ts} +1 -1
  61. package/src/lib/components/shared/filter/options/date-range/date-range.component.html +3 -0
  62. package/src/lib/components/shared/filter/options/date-range/date-range.component.scss +34 -0
  63. package/src/lib/components/shared/filter/options/date-range/date-range.component.ts +72 -0
  64. package/{lib/components/shared/filter/options/date-range/index.d.ts → src/lib/components/shared/filter/options/date-range/index.ts} +1 -1
  65. package/{lib/components/shared/filter/options/index.d.ts → src/lib/components/shared/filter/options/index.ts} +1 -1
  66. package/{lib/components/shared/filter/options/input/index.d.ts → src/lib/components/shared/filter/options/input/index.ts} +1 -1
  67. package/src/lib/components/shared/filter/options/input/input.component.html +3 -0
  68. package/src/lib/components/shared/filter/options/input/input.component.scss +19 -0
  69. package/src/lib/components/shared/filter/options/input/input.component.ts +52 -0
  70. package/src/lib/components/shared/filter/options/options.component.html +43 -0
  71. package/src/lib/components/shared/filter/options/options.component.scss +56 -0
  72. package/src/lib/components/shared/filter/options/options.component.ts +58 -0
  73. package/src/lib/components/shared/filter/options/options.module.ts +58 -0
  74. package/{lib/components/shared/filter/options/status/index.d.ts → src/lib/components/shared/filter/options/status/index.ts} +1 -1
  75. package/src/lib/components/shared/filter/options/status/status.component.html +4 -0
  76. package/src/lib/components/shared/filter/options/status/status.component.scss +29 -0
  77. package/src/lib/components/shared/filter/options/status/status.component.ts +73 -0
  78. package/{lib/components/shared/filter/selected/index.d.ts → src/lib/components/shared/filter/selected/index.ts} +1 -1
  79. package/src/lib/components/shared/filter/selected/item/children/children.component.html +19 -0
  80. package/src/lib/components/shared/filter/selected/item/children/children.component.scss +68 -0
  81. package/src/lib/components/shared/filter/selected/item/children/children.component.ts +49 -0
  82. package/{lib/components/shared/filter/selected/item/children/index.d.ts → src/lib/components/shared/filter/selected/item/children/index.ts} +1 -1
  83. package/src/lib/components/shared/filter/selected/item/currency/currency.component.html +1 -0
  84. package/src/lib/components/shared/filter/selected/item/currency/currency.component.scss +4 -0
  85. package/src/lib/components/shared/filter/selected/item/currency/currency.component.ts +26 -0
  86. package/{lib/components/shared/filter/selected/item/currency/index.d.ts → src/lib/components/shared/filter/selected/item/currency/index.ts} +1 -1
  87. package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.html +2 -0
  88. package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.scss +4 -0
  89. package/src/lib/components/shared/filter/selected/item/date-range/date-range.component.ts +39 -0
  90. package/{lib/components/shared/filter/selected/item/date-range/index.d.ts → src/lib/components/shared/filter/selected/item/date-range/index.ts} +1 -1
  91. package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.html +1 -0
  92. package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.scss +4 -0
  93. package/src/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.ts +29 -0
  94. package/{lib/components/shared/filter/selected/item/date-with-action/index.d.ts → src/lib/components/shared/filter/selected/item/date-with-action/index.ts} +1 -1
  95. package/{lib/components/shared/filter/selected/item/index.d.ts → src/lib/components/shared/filter/selected/item/index.ts} +7 -7
  96. package/{lib/components/shared/filter/selected/item/input/index.d.ts → src/lib/components/shared/filter/selected/item/input/index.ts} +1 -1
  97. package/src/lib/components/shared/filter/selected/item/input/input.component.html +1 -0
  98. package/src/lib/components/shared/filter/selected/item/input/input.component.scss +4 -0
  99. package/src/lib/components/shared/filter/selected/item/input/input.component.ts +26 -0
  100. package/src/lib/components/shared/filter/selected/item/item.component.html +38 -0
  101. package/src/lib/components/shared/filter/selected/item/item.component.scss +72 -0
  102. package/src/lib/components/shared/filter/selected/item/item.component.ts +71 -0
  103. package/{lib/components/shared/filter/selected/item/status/index.d.ts → src/lib/components/shared/filter/selected/item/status/index.ts} +1 -1
  104. package/src/lib/components/shared/filter/selected/item/status/status.component.html +1 -0
  105. package/src/lib/components/shared/filter/selected/item/status/status.component.scss +4 -0
  106. package/src/lib/components/shared/filter/selected/item/status/status.component.ts +36 -0
  107. package/src/lib/components/shared/filter/selected/selected.component.html +3 -0
  108. package/src/lib/components/shared/filter/selected/selected.component.scss +9 -0
  109. package/src/lib/components/shared/filter/selected/selected.component.ts +76 -0
  110. package/src/lib/components/shared/filter/selected/selected.module.ts +60 -0
  111. package/{lib/components/shared/index.d.ts → src/lib/components/shared/index.ts} +4 -4
  112. package/{lib/components/shared/password-strength/index.d.ts → src/lib/components/shared/password-strength/index.ts} +2 -2
  113. package/src/lib/components/shared/password-strength/password-strength.component.html +50 -0
  114. package/src/lib/components/shared/password-strength/password-strength.component.scss +70 -0
  115. package/src/lib/components/shared/password-strength/password-strength.component.ts +89 -0
  116. package/src/lib/components/shared/password-strength/password-strength.module.ts +24 -0
  117. package/src/lib/components/shared/password-strength/password-strength.ts +5 -0
  118. package/src/lib/components/shared/products/filter/filter.component.html +6 -0
  119. package/src/lib/components/shared/products/filter/filter.component.scss +20 -0
  120. package/src/lib/components/shared/products/filter/filter.component.ts +34 -0
  121. package/{lib/components/shared/products/index.d.ts → src/lib/components/shared/products/index.ts} +2 -2
  122. package/src/lib/components/shared/products/products.component.html +15 -0
  123. package/src/lib/components/shared/products/products.component.scss +70 -0
  124. package/src/lib/components/shared/products/products.component.ts +104 -0
  125. package/src/lib/components/shared/products/products.module.ts +13 -0
  126. package/{lib/components/shared/products/providers/index.d.ts → src/lib/components/shared/products/providers/index.ts} +1 -1
  127. package/src/lib/components/shared/products/providers/products.model.ts +60 -0
  128. package/{lib/components/shared/progress-bar/index.d.ts → src/lib/components/shared/progress-bar/index.ts} +3 -3
  129. package/src/lib/components/shared/progress-bar/progress-bar.component.html +3 -0
  130. package/src/lib/components/shared/progress-bar/progress-bar.component.scss +6 -0
  131. package/src/lib/components/shared/progress-bar/progress-bar.component.ts +27 -0
  132. package/src/lib/components/shared/progress-bar/progress-bar.module.ts +10 -0
  133. package/src/lib/components/shared/progress-bar/progress-bar.service.ts +59 -0
  134. package/src/lib/interfaces/field-config.ts +58 -0
  135. package/{lib/interfaces/index.d.ts → src/lib/interfaces/index.ts} +1 -1
  136. package/src/public-api.ts +5 -0
  137. package/src/test.ts +26 -0
  138. package/tsconfig.lib.json +20 -0
  139. package/tsconfig.lib.prod.json +10 -0
  140. package/tsconfig.spec.json +17 -0
  141. package/esm2020/lib/components/base/base-component.mjs +0 -322
  142. package/esm2020/lib/components/base/base-dynamic-array.mjs +0 -221
  143. package/esm2020/lib/components/base/base-dynamic.mjs +0 -99
  144. package/esm2020/lib/components/base/base-scroll-component.mjs +0 -55
  145. package/esm2020/lib/components/base/base-validators.mjs +0 -19
  146. package/esm2020/lib/components/base/index.mjs +0 -6
  147. package/esm2020/lib/components/dynamic/button/button.component.mjs +0 -52
  148. package/esm2020/lib/components/dynamic/button/index.mjs +0 -2
  149. package/esm2020/lib/components/dynamic/dynamic-directive.mjs +0 -95
  150. package/esm2020/lib/components/dynamic/dynamic.module.mjs +0 -84
  151. package/esm2020/lib/components/dynamic/file-upload/file-upload.component.mjs +0 -52
  152. package/esm2020/lib/components/dynamic/file-upload/index.mjs +0 -2
  153. package/esm2020/lib/components/dynamic/form/dynamic-form-array.component.mjs +0 -72
  154. package/esm2020/lib/components/dynamic/form/dynamic-form.component.mjs +0 -46
  155. package/esm2020/lib/components/dynamic/form/index.mjs +0 -3
  156. package/esm2020/lib/components/dynamic/index.mjs +0 -9
  157. package/esm2020/lib/components/dynamic/input/index.mjs +0 -2
  158. package/esm2020/lib/components/dynamic/input/input.component.mjs +0 -65
  159. package/esm2020/lib/components/dynamic/input-phone/index.mjs +0 -2
  160. package/esm2020/lib/components/dynamic/input-phone/input-phone.component.mjs +0 -65
  161. package/esm2020/lib/components/dynamic/radio/index.mjs +0 -2
  162. package/esm2020/lib/components/dynamic/radio/radio.component.mjs +0 -33
  163. package/esm2020/lib/components/dynamic/select/index.mjs +0 -2
  164. package/esm2020/lib/components/dynamic/select/select.component.mjs +0 -80
  165. package/esm2020/lib/components/dynamic/select-search/index.mjs +0 -2
  166. package/esm2020/lib/components/dynamic/select-search/select-search.component.mjs +0 -80
  167. package/esm2020/lib/components/index.mjs +0 -4
  168. package/esm2020/lib/components/shared/filter/filter.component.mjs +0 -119
  169. package/esm2020/lib/components/shared/filter/filter.module.mjs +0 -63
  170. package/esm2020/lib/components/shared/filter/index.mjs +0 -3
  171. package/esm2020/lib/components/shared/filter/menu/index.mjs +0 -2
  172. package/esm2020/lib/components/shared/filter/menu/menu.component.mjs +0 -120
  173. package/esm2020/lib/components/shared/filter/menu/menu.module.mjs +0 -70
  174. package/esm2020/lib/components/shared/filter/options/children/children.component.mjs +0 -50
  175. package/esm2020/lib/components/shared/filter/options/children/index.mjs +0 -2
  176. package/esm2020/lib/components/shared/filter/options/currency/currency.component.mjs +0 -46
  177. package/esm2020/lib/components/shared/filter/options/currency/index.mjs +0 -2
  178. package/esm2020/lib/components/shared/filter/options/date-range/date-range.component.mjs +0 -65
  179. package/esm2020/lib/components/shared/filter/options/date-range/index.mjs +0 -2
  180. package/esm2020/lib/components/shared/filter/options/index.mjs +0 -2
  181. package/esm2020/lib/components/shared/filter/options/input/index.mjs +0 -2
  182. package/esm2020/lib/components/shared/filter/options/input/input.component.mjs +0 -46
  183. package/esm2020/lib/components/shared/filter/options/options.component.mjs +0 -68
  184. package/esm2020/lib/components/shared/filter/options/options.module.mjs +0 -95
  185. package/esm2020/lib/components/shared/filter/options/status/index.mjs +0 -2
  186. package/esm2020/lib/components/shared/filter/options/status/status.component.mjs +0 -66
  187. package/esm2020/lib/components/shared/filter/selected/index.mjs +0 -2
  188. package/esm2020/lib/components/shared/filter/selected/item/children/children.component.mjs +0 -57
  189. package/esm2020/lib/components/shared/filter/selected/item/children/index.mjs +0 -2
  190. package/esm2020/lib/components/shared/filter/selected/item/currency/currency.component.mjs +0 -29
  191. package/esm2020/lib/components/shared/filter/selected/item/currency/index.mjs +0 -2
  192. package/esm2020/lib/components/shared/filter/selected/item/date-range/date-range.component.mjs +0 -42
  193. package/esm2020/lib/components/shared/filter/selected/item/date-range/index.mjs +0 -2
  194. package/esm2020/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.mjs +0 -33
  195. package/esm2020/lib/components/shared/filter/selected/item/date-with-action/index.mjs +0 -2
  196. package/esm2020/lib/components/shared/filter/selected/item/index.mjs +0 -8
  197. package/esm2020/lib/components/shared/filter/selected/item/input/index.mjs +0 -2
  198. package/esm2020/lib/components/shared/filter/selected/item/input/input.component.mjs +0 -28
  199. package/esm2020/lib/components/shared/filter/selected/item/item.component.mjs +0 -74
  200. package/esm2020/lib/components/shared/filter/selected/item/status/index.mjs +0 -2
  201. package/esm2020/lib/components/shared/filter/selected/item/status/status.component.mjs +0 -39
  202. package/esm2020/lib/components/shared/filter/selected/selected.component.mjs +0 -80
  203. package/esm2020/lib/components/shared/filter/selected/selected.module.mjs +0 -90
  204. package/esm2020/lib/components/shared/index.mjs +0 -5
  205. package/esm2020/lib/components/shared/password-strength/index.mjs +0 -3
  206. package/esm2020/lib/components/shared/password-strength/password-strength.component.mjs +0 -85
  207. package/esm2020/lib/components/shared/password-strength/password-strength.mjs +0 -2
  208. package/esm2020/lib/components/shared/password-strength/password-strength.module.mjs +0 -50
  209. package/esm2020/lib/components/shared/products/filter/filter.component.mjs +0 -36
  210. package/esm2020/lib/components/shared/products/index.mjs +0 -3
  211. package/esm2020/lib/components/shared/products/products.component.mjs +0 -91
  212. package/esm2020/lib/components/shared/products/products.module.mjs +0 -22
  213. package/esm2020/lib/components/shared/products/providers/index.mjs +0 -2
  214. package/esm2020/lib/components/shared/products/providers/products.model.mjs +0 -38
  215. package/esm2020/lib/components/shared/progress-bar/index.mjs +0 -4
  216. package/esm2020/lib/components/shared/progress-bar/progress-bar.component.mjs +0 -28
  217. package/esm2020/lib/components/shared/progress-bar/progress-bar.module.mjs +0 -18
  218. package/esm2020/lib/components/shared/progress-bar/progress-bar.service.mjs +0 -49
  219. package/esm2020/lib/interfaces/field-config.mjs +0 -2
  220. package/esm2020/lib/interfaces/index.mjs +0 -2
  221. package/esm2020/monkey-front-components.mjs +0 -5
  222. package/esm2020/public-api.mjs +0 -5
  223. package/fesm2015/monkey-front-components.mjs +0 -2877
  224. package/fesm2015/monkey-front-components.mjs.map +0 -1
  225. package/fesm2020/monkey-front-components.mjs +0 -2859
  226. package/fesm2020/monkey-front-components.mjs.map +0 -1
  227. package/lib/components/base/base-component.d.ts +0 -50
  228. package/lib/components/base/base-dynamic-array.d.ts +0 -34
  229. package/lib/components/base/base-dynamic.d.ts +0 -24
  230. package/lib/components/base/base-scroll-component.d.ts +0 -16
  231. package/lib/components/base/base-validators.d.ts +0 -1
  232. package/lib/components/dynamic/button/button.component.d.ts +0 -17
  233. package/lib/components/dynamic/dynamic-directive.d.ts +0 -22
  234. package/lib/components/dynamic/dynamic.module.d.ts +0 -20
  235. package/lib/components/dynamic/file-upload/file-upload.component.d.ts +0 -17
  236. package/lib/components/dynamic/form/dynamic-form-array.component.d.ts +0 -16
  237. package/lib/components/dynamic/form/dynamic-form.component.d.ts +0 -14
  238. package/lib/components/dynamic/input/input.component.d.ts +0 -20
  239. package/lib/components/dynamic/input-phone/input-phone.component.d.ts +0 -20
  240. package/lib/components/dynamic/radio/radio.component.d.ts +0 -11
  241. package/lib/components/dynamic/select/select.component.d.ts +0 -16
  242. package/lib/components/dynamic/select-search/select-search.component.d.ts +0 -16
  243. package/lib/components/shared/filter/filter.component.d.ts +0 -32
  244. package/lib/components/shared/filter/filter.module.d.ts +0 -14
  245. package/lib/components/shared/filter/menu/menu.component.d.ts +0 -24
  246. package/lib/components/shared/filter/menu/menu.module.d.ts +0 -14
  247. package/lib/components/shared/filter/options/children/children.component.d.ts +0 -17
  248. package/lib/components/shared/filter/options/currency/currency.component.d.ts +0 -17
  249. package/lib/components/shared/filter/options/date-range/date-range.component.d.ts +0 -24
  250. package/lib/components/shared/filter/options/input/input.component.d.ts +0 -17
  251. package/lib/components/shared/filter/options/options.component.d.ts +0 -20
  252. package/lib/components/shared/filter/options/options.module.d.ts +0 -18
  253. package/lib/components/shared/filter/options/status/status.component.d.ts +0 -19
  254. package/lib/components/shared/filter/selected/item/children/children.component.d.ts +0 -16
  255. package/lib/components/shared/filter/selected/item/currency/currency.component.d.ts +0 -11
  256. package/lib/components/shared/filter/selected/item/date-range/date-range.component.d.ts +0 -12
  257. package/lib/components/shared/filter/selected/item/date-with-action/date-with-action.component.d.ts +0 -11
  258. package/lib/components/shared/filter/selected/item/input/input.component.d.ts +0 -11
  259. package/lib/components/shared/filter/selected/item/item.component.d.ts +0 -20
  260. package/lib/components/shared/filter/selected/item/status/status.component.d.ts +0 -13
  261. package/lib/components/shared/filter/selected/selected.component.d.ts +0 -18
  262. package/lib/components/shared/filter/selected/selected.module.d.ts +0 -21
  263. package/lib/components/shared/password-strength/password-strength.component.d.ts +0 -23
  264. package/lib/components/shared/password-strength/password-strength.d.ts +0 -5
  265. package/lib/components/shared/password-strength/password-strength.module.d.ts +0 -12
  266. package/lib/components/shared/products/filter/filter.component.d.ts +0 -12
  267. package/lib/components/shared/products/products.component.d.ts +0 -20
  268. package/lib/components/shared/products/products.module.d.ts +0 -11
  269. package/lib/components/shared/products/providers/products.model.d.ts +0 -13
  270. package/lib/components/shared/progress-bar/progress-bar.component.d.ts +0 -12
  271. package/lib/components/shared/progress-bar/progress-bar.module.d.ts +0 -8
  272. package/lib/components/shared/progress-bar/progress-bar.service.d.ts +0 -14
  273. package/lib/interfaces/field-config.d.ts +0 -54
  274. package/monkey-front-components-0.0.383.tgz +0 -0
  275. package/monkey-front-components.d.ts +0 -5
  276. package/public-api.d.ts +0 -1
@@ -0,0 +1,28 @@
1
+ <div class="d-flex flex-column" #actionElement>
2
+ <ng-container *ngFor="let menu of _model; let index = index">
3
+ <ng-container *ngIf="menu?.children; else withoutChildren">
4
+ <div class="item no-action">
5
+ {{ menu.label | translate }}
6
+ </div>
7
+ <div class="separator"></div>
8
+ <ng-container *ngFor="let child of menu?.children">
9
+ <div class="item children" (click)="onHandleChildrenAction(menu, child)">
10
+ {{ child.label | translate }}
11
+ </div>
12
+ </ng-container>
13
+ </ng-container>
14
+ <ng-template #withoutChildren>
15
+ <div class="item" (click)="onHandleShowMenu(menu)">
16
+ {{ menu.label | translate }}
17
+ </div>
18
+ </ng-template>
19
+ <ng-container *ngIf="_model[index+1]?.group as next; _model[index]?.group as current">
20
+ <div class="separator" *ngIf="next !== current"></div>
21
+ </ng-container>
22
+ </ng-container>
23
+ </div>
24
+ <ng-container
25
+ *monkeyecxPopover="_showMenu; target: $any(actionElement); closed: closeMenu; dir: 'rt'">
26
+ <mecx-filter-options [option]="_menuOption" (onClose)="onHandleClose()"
27
+ (onSubmit)="onHandleSubmit($event)" [closeDirectly]="true"></mecx-filter-options>
28
+ </ng-container>
@@ -0,0 +1,62 @@
1
+ @import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
2
+
3
+ :host {
4
+ display: flex;
5
+ flex-direction: column;
6
+ background: #fafafa;
7
+ border: 1px solid #d6d6d6;
8
+ box-sizing: border-box;
9
+ box-shadow: 0px 4px 36px -8px #6d6d6d3a;
10
+ border-radius: 16px !important;
11
+ min-width: 192px;
12
+ margin: 4px 8px;
13
+ overflow: auto;
14
+ max-height: 500px;
15
+
16
+ ::ng-deep monkey-button {
17
+ width: 100%;
18
+
19
+ button {
20
+ justify-content: flex-start !important;
21
+ width: 100%;
22
+ }
23
+ }
24
+
25
+ .item {
26
+ font-style: normal;
27
+ font-weight: 400;
28
+ font-size: 16px;
29
+ line-height: 24px;
30
+ color: #72717e;
31
+ padding: 8px 24px 8px 24px;
32
+
33
+ &.no-action {
34
+ cursor: not-allowed;
35
+ padding: 8px;
36
+ margin: 0px !important;
37
+ font-weight: 500;
38
+ }
39
+
40
+ &:first-child {
41
+ margin: 12px 0px 0px 0px;
42
+ }
43
+
44
+ &:last-child {
45
+ margin: 0px 0px 12px 0px;
46
+ }
47
+
48
+ &:not(.no-action) {
49
+ cursor: pointer;
50
+
51
+ &:hover {
52
+ background-color: map-get($mecx-theme, 200) !important;
53
+ color: map-get($mecx-theme, main) !important;
54
+ font-weight: 400;
55
+ }
56
+ }
57
+ }
58
+
59
+ .separator {
60
+ border-bottom: 1px solid #ebebeb;
61
+ }
62
+ }
@@ -0,0 +1,122 @@
1
+ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
2
+ import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren, MonkeyEcxUtils } from 'monkey-front-core';
3
+
4
+ @Component({
5
+ selector: 'mecx-filter-menu',
6
+ templateUrl: './menu.component.html',
7
+ styleUrls: ['./menu.component.scss']
8
+ })
9
+ export class MECXFilterMenuComponent implements OnChanges {
10
+ @Input() model: MonkeyEcxFilterMenu[] = [];
11
+
12
+ @Output() onClose = new EventEmitter<any>();
13
+
14
+ @Output() onSubmit = new EventEmitter<any>();
15
+
16
+ _onHandleSubmit: Function = null;
17
+
18
+ _model: MonkeyEcxFilterMenu[] = [];
19
+
20
+ _showMenu = false;
21
+
22
+ _menuOption: MonkeyEcxFilterMenu | MonkeyEcxFilterMenuChildren = null;
23
+
24
+ closeMenu = () => {
25
+ this._showMenu = false;
26
+ };
27
+
28
+ constructor() {
29
+ // not to do
30
+ }
31
+
32
+ private validateValue({ field, value, getValue }: any) {
33
+ try {
34
+ value = value || getValue()?.[field];
35
+ if (!value) return false;
36
+ if (typeof value === 'object') {
37
+ return value && JSON.stringify(value) !== '{}';
38
+ }
39
+ return MonkeyEcxUtils.persistNullEmptyUndefined(value);
40
+ } catch (e) {
41
+ // not to do
42
+ }
43
+ return false;
44
+ }
45
+
46
+ private onHandleSubmitValue(value: any) {
47
+ this.onSubmit.next(value);
48
+ this.onHandleClose();
49
+ }
50
+
51
+ private onHandleMenus(value: any[]) {
52
+ this._model = value?.map((_: any) => {
53
+ const { children } = _;
54
+ let obj = null;
55
+ if (children) {
56
+ obj = {
57
+ ..._,
58
+ children: children?.filter((_: any) => {
59
+ return !this.validateValue(_);
60
+ })
61
+ };
62
+ } else if (!this.validateValue(_)) {
63
+ obj = {
64
+ ..._,
65
+ ...obj || {}
66
+ };
67
+ }
68
+
69
+ return obj;
70
+ })?.filter((_) => {
71
+ return _;
72
+ });
73
+
74
+ this._model = this._model?.sort((a, b) => {
75
+ const groupA = `${a?.group}`.toLowerCase();
76
+ const groupB = `${b?.group}`.toLowerCase();
77
+ return groupA !== groupB ? 1 : -1;
78
+ });
79
+ }
80
+
81
+ ngOnChanges(changes: SimpleChanges) {
82
+ if (changes.model) {
83
+ const { currentValue } = changes.model;
84
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
85
+ this.onHandleMenus(currentValue);
86
+ }
87
+ }
88
+ }
89
+
90
+ onHandleChildrenAction(option: MonkeyEcxFilterMenu, child: MonkeyEcxFilterMenuChildren) {
91
+ const { field, type, action } = child;
92
+ if (type === 'with-action') {
93
+ this.onHandleSubmitValue({
94
+ [option.field]: JSON.stringify({
95
+ [field]: action()
96
+ })
97
+ });
98
+ } else {
99
+ this._showMenu = true;
100
+ this._menuOption = child;
101
+ this.onHandleSubmit = (event: any) => {
102
+ this.onHandleSubmitValue({
103
+ [option.field]: JSON.stringify(event)
104
+ });
105
+ };
106
+ }
107
+ }
108
+
109
+ onHandleShowMenu(option: MonkeyEcxFilterMenu) {
110
+ this._showMenu = true;
111
+ this._menuOption = option;
112
+ }
113
+
114
+ onHandleClose() {
115
+ this._showMenu = false;
116
+ this.onClose.next();
117
+ }
118
+
119
+ onHandleSubmit(event: any) {
120
+ this.onHandleSubmitValue(event);
121
+ }
122
+ }
@@ -0,0 +1,41 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { RouterModule } from '@angular/router';
3
+ import { TranslateModule } from '@ngx-translate/core';
4
+ import { CommonModule } from '@angular/common';
5
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
6
+ import { MonkeyEcxDirectivesModule } from 'monkey-front-core';
7
+ import {
8
+ MonkeyBadgeModule,
9
+ MonkeyButtonModule,
10
+ MonkeyCheckboxModule,
11
+ MonkeyDateRangePickerModule,
12
+ MonkeyIconModule,
13
+ MonkeyInputModule,
14
+ MonkeyOptionModule,
15
+ MonkeySelectModule
16
+ } from 'monkey-style-guide';
17
+ import { MECXFilterOptionsModule } from '../options';
18
+ import { MECXFilterMenuComponent } from './menu.component';
19
+
20
+ @NgModule({
21
+ declarations: [MECXFilterMenuComponent],
22
+ imports: [
23
+ CommonModule,
24
+ FormsModule,
25
+ ReactiveFormsModule,
26
+ MonkeyEcxDirectivesModule,
27
+ MonkeyButtonModule,
28
+ MonkeyBadgeModule,
29
+ MonkeyIconModule,
30
+ MonkeyInputModule,
31
+ MonkeyCheckboxModule,
32
+ MonkeySelectModule,
33
+ MonkeyOptionModule,
34
+ MonkeyDateRangePickerModule,
35
+ RouterModule,
36
+ MECXFilterOptionsModule,
37
+ TranslateModule.forChild()
38
+ ],
39
+ exports: [MECXFilterMenuComponent]
40
+ })
41
+ export class MECXFilterMenuModule {}
@@ -0,0 +1,6 @@
1
+ <ng-container *ngFor="let child of option?.children">
2
+ <div class="item" (click)="onHandleChildrenAction(child)"
3
+ [class.selected]="onHandleValidateSelected(child)">
4
+ {{ child.label | translate }}
5
+ </div>
6
+ </ng-container>
@@ -0,0 +1,30 @@
1
+ @import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
2
+
3
+ :host {
4
+ display: flex;
5
+ flex-direction: column;
6
+ min-width: 180px;
7
+
8
+ .item {
9
+ cursor: pointer;
10
+ font-style: normal;
11
+ font-weight: 400;
12
+ font-size: 16px;
13
+ line-height: 24px;
14
+ color: #72717e;
15
+ padding: 8px 24px 8px 24px;
16
+
17
+ &.selected {
18
+ cursor: not-allowed !important;
19
+ background-color: map-get($mecx-theme, 400) !important;
20
+ color: map-get(map-get($mecx-theme, contrast), main) !important;
21
+ font-weight: 400;
22
+ }
23
+
24
+ &:hover {
25
+ background-color: map-get($mecx-theme, 100) !important;
26
+ color: #72717e !important;
27
+ font-weight: 400;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,58 @@
1
+ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
2
+ import { MonkeyEcxFilterMenu } from 'monkey-front-core';
3
+ import { Subscription } from 'rxjs';
4
+ import { debounceTime } from 'rxjs/operators';
5
+
6
+ @Component({
7
+ selector: 'mecx-filter-options-children',
8
+ templateUrl: './children.component.html',
9
+ styleUrls: ['./children.component.scss']
10
+ })
11
+ export class MECXFilterOptionsChildrenComponent implements OnInit, OnDestroy {
12
+ @Input() option: MonkeyEcxFilterMenu = null;
13
+
14
+ @Output() onSubmit = new EventEmitter<any>();
15
+
16
+ @Output() onShow = new EventEmitter<any>();
17
+
18
+ private eventHandle = new EventEmitter<any>();
19
+
20
+ private eventSubscription: Subscription;
21
+
22
+ constructor() {
23
+ // not to do
24
+ }
25
+
26
+ ngOnInit() {
27
+ const {
28
+ eventHandle,
29
+ onSubmit,
30
+ option: { field }
31
+ } = this;
32
+
33
+ this.eventSubscription = eventHandle.pipe(debounceTime(100)).subscribe((value: any) => {
34
+ onSubmit.next({ [field]: value });
35
+ });
36
+ }
37
+
38
+ ngOnDestroy() {
39
+ this.eventSubscription.unsubscribe();
40
+ }
41
+
42
+ onHandleChildrenAction(child: any) {
43
+ const { field, type, action } = child;
44
+ if (type === 'with-action') {
45
+ this.eventHandle.next(
46
+ JSON.stringify({
47
+ [field]: action()
48
+ })
49
+ );
50
+ } else {
51
+ this.onShow.next(child);
52
+ }
53
+ }
54
+
55
+ onHandleValidateSelected({ field, getValue }: any) {
56
+ return !!getValue()?.[field];
57
+ }
58
+ }
@@ -1 +1 @@
1
- export * from './children.component';
1
+ export * from './children.component';
@@ -0,0 +1,3 @@
1
+ <monkey-input currency="true" type="text" maxLength="25" [(value)]="_value"
2
+ (onChange)="onChangeFilter($event)">
3
+ </monkey-input>
@@ -0,0 +1,19 @@
1
+ @import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
2
+
3
+ :host {
4
+ display: flex;
5
+ flex-direction: column;
6
+ max-width: 232px;
7
+ min-width: 180px;
8
+ padding: 12px 12px 8px 12px;
9
+ color: #72717e;
10
+
11
+ .title {
12
+ color: #4b4a53;
13
+ font-size: 18px;
14
+ line-height: 21px;
15
+ font-weight: 500;
16
+ text-align: left;
17
+ margin-bottom: 4px;
18
+ }
19
+ }
@@ -0,0 +1,52 @@
1
+ import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
2
+ import { MonkeyEcxFilterMenu } from 'monkey-front-core';
3
+ import { Subscription } from 'rxjs';
4
+ import { debounceTime } from 'rxjs/operators';
5
+
6
+ @Component({
7
+ selector: 'mecx-filter-options-currency',
8
+ templateUrl: './currency.component.html',
9
+ styleUrls: ['./currency.component.scss']
10
+ })
11
+ export class MECXFilterOptionsCurrencyComponent implements OnInit, OnChanges, OnDestroy {
12
+ @Input() option: MonkeyEcxFilterMenu = null;
13
+
14
+ @Output() onSubmit = new EventEmitter<any>();
15
+
16
+ _value = 0;
17
+
18
+ private eventHandle = new EventEmitter<any>();
19
+
20
+ private eventSubscription: Subscription;
21
+
22
+ constructor() {
23
+ // not to do
24
+ }
25
+
26
+ ngOnInit() {
27
+ const { eventHandle, onSubmit, option: { field } } = this;
28
+
29
+ this.eventSubscription = eventHandle
30
+ .pipe(debounceTime(800))
31
+ .subscribe((value: number) => {
32
+ onSubmit.next({ [field]: value });
33
+ });
34
+ }
35
+
36
+ ngOnDestroy() {
37
+ this.eventSubscription.unsubscribe();
38
+ }
39
+
40
+ ngOnChanges(changes: SimpleChanges) {
41
+ if (changes.option) {
42
+ const { currentValue } = changes.option;
43
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
44
+ this._value = currentValue?.value;
45
+ }
46
+ }
47
+ }
48
+
49
+ onChangeFilter(value: number) {
50
+ this.eventHandle.next(value);
51
+ }
52
+ }
@@ -1 +1 @@
1
- export * from './currency.component';
1
+ export * from './currency.component';
@@ -0,0 +1,3 @@
1
+ <monkey-date-range-picker [(value)]="_value" [i18n]="'CALENDAR' | translate"
2
+ [moveDaysForward]="_moveDaysForward" (onChange)="onChangeFilter($event)">
3
+ </monkey-date-range-picker>
@@ -0,0 +1,34 @@
1
+ @import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
2
+
3
+ :host {
4
+ display: flex;
5
+ flex-direction: column;
6
+ padding: 12px 12px 8px 12px;
7
+
8
+ .title {
9
+ color: #4b4a53;
10
+ font-size: 18px;
11
+ line-height: 21px;
12
+ font-weight: 500;
13
+ text-align: left;
14
+ margin-bottom: 4px;
15
+ }
16
+
17
+ ::ng-deep mecx-date-range-picker-group-action {
18
+ display: none;
19
+ }
20
+
21
+ ::ng-deep
22
+ monkey-date-range-picker
23
+ mecx-date-range-picker-group
24
+ mecx-date-range-picker-group-info {
25
+ display: none;
26
+ }
27
+
28
+ ::ng-deep
29
+ monkey-date-range-picker
30
+ mecx-date-range-picker-group
31
+ mecx-date-range-picker-group-header {
32
+ display: none;
33
+ }
34
+ }
@@ -0,0 +1,72 @@
1
+ import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { MonkeyEcxFilterMenu, MonkeyEcxFilterMenuChildren, MonkeyEcxUtils } from 'monkey-front-core';
4
+ import { Subscription } from 'rxjs';
5
+ import { debounceTime } from 'rxjs/operators';
6
+
7
+ @Component({
8
+ selector: 'mecx-filter-options-date-range',
9
+ templateUrl: './date-range.component.html',
10
+ styleUrls: ['./date-range.component.scss']
11
+ })
12
+ export class MECXFilterOptionsDateRangeComponent implements OnInit, OnChanges, OnDestroy {
13
+ @Input() option: MonkeyEcxFilterMenu | MonkeyEcxFilterMenuChildren = null;
14
+
15
+ @Output() onSubmit = new EventEmitter<any>();
16
+
17
+ _value: any = {
18
+ startDate: null,
19
+ endDate: null
20
+ };
21
+
22
+ _form: FormGroup;
23
+
24
+ _moveDaysForward = true;
25
+
26
+ private eventHandle = new EventEmitter<any>();
27
+
28
+ private eventSubscription: Subscription;
29
+
30
+ constructor() {
31
+ // not to do
32
+ }
33
+
34
+ private onHandleSelectedValue({ field, value, getValue }: any) {
35
+ try {
36
+ value = value || getValue()?.[field];
37
+ if (MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
38
+ this._value = JSON.parse(value);
39
+ }
40
+ } catch (e) {
41
+ // not to do
42
+ }
43
+ }
44
+
45
+ ngOnInit() {
46
+ const { eventHandle, onSubmit, option: { field } } = this;
47
+
48
+ this.eventSubscription = eventHandle
49
+ .pipe(debounceTime(800))
50
+ .subscribe((value: number) => {
51
+ onSubmit.next({ [field]: value });
52
+ });
53
+ }
54
+
55
+ ngOnDestroy() {
56
+ this.eventSubscription.unsubscribe();
57
+ }
58
+
59
+ ngOnChanges(changes: SimpleChanges) {
60
+ if (changes.option) {
61
+ const { currentValue } = changes.option;
62
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
63
+ this.onHandleSelectedValue(currentValue);
64
+ }
65
+ }
66
+ }
67
+
68
+ onChangeFilter(value: { startDate: string, endDate: string }) {
69
+ if (!value?.endDate) return;
70
+ this.eventHandle.next(JSON.stringify(value));
71
+ }
72
+ }
@@ -1 +1 @@
1
- export * from './date-range.component';
1
+ export * from './date-range.component';
@@ -1 +1 @@
1
- export * from './options.module';
1
+ export * from './options.module';
@@ -1 +1 @@
1
- export * from './input.component';
1
+ export * from './input.component';
@@ -0,0 +1,3 @@
1
+ <monkey-input type="text" maxLength="255" [(value)]="_value"
2
+ (onChange)="onChangeFilter($event)">
3
+ </monkey-input>
@@ -0,0 +1,19 @@
1
+ @import 'node_modules/monkey-style-guide/assets/scss/partials/variables';
2
+
3
+ :host {
4
+ display: flex;
5
+ flex-direction: column;
6
+ max-width: 232px;
7
+ min-width: 180px;
8
+ padding: 12px 12px 8px 12px;
9
+ color: #72717e;
10
+
11
+ .title {
12
+ color: #4b4a53;
13
+ font-size: 18px;
14
+ line-height: 21px;
15
+ font-weight: 500;
16
+ text-align: left;
17
+ margin-bottom: 4px;
18
+ }
19
+ }
@@ -0,0 +1,52 @@
1
+ import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
2
+ import { MonkeyEcxFilterMenu } from 'monkey-front-core';
3
+ import { Subscription } from 'rxjs';
4
+ import { debounceTime } from 'rxjs/operators';
5
+
6
+ @Component({
7
+ selector: 'mecx-filter-options-input',
8
+ templateUrl: './input.component.html',
9
+ styleUrls: ['./input.component.scss']
10
+ })
11
+ export class MECXFilterOptionsInputComponent implements OnInit, OnChanges, OnDestroy {
12
+ @Input() option: MonkeyEcxFilterMenu = null;
13
+
14
+ @Output() onSubmit = new EventEmitter<any>();
15
+
16
+ _value = '';
17
+
18
+ private eventHandle = new EventEmitter<any>();
19
+
20
+ private eventSubscription: Subscription;
21
+
22
+ constructor() {
23
+ // not to do
24
+ }
25
+
26
+ ngOnInit() {
27
+ const { eventHandle, onSubmit, option: { field } } = this;
28
+
29
+ this.eventSubscription = eventHandle
30
+ .pipe(debounceTime(800))
31
+ .subscribe((value: string) => {
32
+ onSubmit.next({ [field]: value });
33
+ });
34
+ }
35
+
36
+ ngOnDestroy() {
37
+ this.eventSubscription.unsubscribe();
38
+ }
39
+
40
+ ngOnChanges(changes: SimpleChanges) {
41
+ if (changes.option) {
42
+ const { currentValue } = changes.option;
43
+ if (currentValue && JSON.stringify(currentValue) !== '{}') {
44
+ this._value = currentValue?.value;
45
+ }
46
+ }
47
+ }
48
+
49
+ onChangeFilter(value: number) {
50
+ this.eventHandle.next(value);
51
+ }
52
+ }
@@ -0,0 +1,43 @@
1
+ <div class="d-flex justify-content-between header">
2
+ <span class="title">
3
+ {{ option?.label | translate }}
4
+ </span>
5
+ <div class="close" #actionElement (click)="onHandleShowMenu()">
6
+ <monkey-icon icon="close-12" color="#474747"></monkey-icon>
7
+ </div>
8
+ </div>
9
+ <ng-container *ngIf="option?.type as type">
10
+ <ng-container *ngIf="option?.children; else withoutChildren">
11
+ <mecx-filter-options-children [option]="option" (onSubmit)="onHandleSubmitChildren($event)"
12
+ (onShow)="onShowFromChildren.next($event)">
13
+ </mecx-filter-options-children>
14
+ </ng-container>
15
+ <ng-template #withoutChildren>
16
+ <ng-container [ngSwitch]="type">
17
+ <mecx-filter-options-status *ngSwitchCase="'status'" [option]="option"
18
+ (onSubmit)="onHandleSubmit($event)">
19
+ </mecx-filter-options-status>
20
+ <mecx-filter-options-date-range *ngSwitchCase="'date-range'" [option]="option"
21
+ (onSubmit)="onHandleSubmit($event)">
22
+ </mecx-filter-options-date-range>
23
+ <mecx-filter-options-currency *ngSwitchCase="'currency'" [option]="option"
24
+ (onSubmit)="onHandleSubmit($event)">
25
+ </mecx-filter-options-currency>
26
+ <mecx-filter-options-input *ngSwitchCase="'input'" [option]="option"
27
+ (onSubmit)="onHandleSubmit($event)">
28
+ </mecx-filter-options-input>
29
+ </ng-container>
30
+ </ng-template>
31
+ </ng-container>
32
+
33
+ <ng-container
34
+ *monkeyecxPopover="_showMenu; target: $any(actionElement); closed: closeMenu; dir: 'ltr'">
35
+ <div class="close-menu">
36
+ <monkey-button type="tertiary" color="error" (click)="onRemove.next()" size="sm">
37
+ {{ 'BUTTONS.REMOVE' | translate }}
38
+ </monkey-button>
39
+ <monkey-button type="tertiary" color="theme" (click)="onClose.next()" size="sm">
40
+ {{ 'BUTTONS.CLOSE' | translate }}
41
+ </monkey-button>
42
+ </div>
43
+ </ng-container>