@main-class/componentes 2.2.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/README.md +49 -10
  2. package/arquivo/index.d.ts +0 -1
  3. package/arquivo/src/download-arquivo.directive.d.ts +1 -1
  4. package/arquivo/src/imagem.directive.d.ts +2 -2
  5. package/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +1 -1
  6. package/arquivo/src/preview-arquivo/preview-arquivo.component.d.ts +6 -6
  7. package/core/index.d.ts +0 -1
  8. package/crud/index.d.ts +4 -1
  9. package/crud/src/abstract-consulta-paginada-component.d.ts +3 -3
  10. package/crud/src/abstract-edicao-component.d.ts +1 -1
  11. package/crud/src/query/query-field/query-field.component.d.ts +37 -0
  12. package/crud/src/query/query-form-field/query-form-field.component.d.ts +11 -0
  13. package/crud/src/query/query-form.component.d.ts +23 -0
  14. package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +13 -0
  15. package/dialog/index.d.ts +7 -1
  16. package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +2 -2
  17. package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +1 -1
  18. package/dialog/src/dialog-sidebar/modal-template/modal-body.directive.d.ts +9 -0
  19. package/dialog/src/dialog-sidebar/modal-template/modal-close.directive.d.ts +9 -0
  20. package/dialog/src/dialog-sidebar/modal-template/modal-footer.directive.d.ts +6 -0
  21. package/dialog/src/dialog-sidebar/modal-template/modal-header.directive.d.ts +6 -0
  22. package/dialog/src/dialog-sidebar/modal-template/modal-template.component.d.ts +12 -0
  23. package/dialog/src/dialog-sidebar/modal.component.d.ts +8 -0
  24. package/dialog/src/dialog-sidebar/sidebar-modal-ref.d.ts +17 -0
  25. package/dialog/src/dialog.service.d.ts +6 -1
  26. package/fesm2022/main-class-componentes-arquivo.mjs +370 -0
  27. package/fesm2022/main-class-componentes-arquivo.mjs.map +1 -0
  28. package/{fesm2020 → fesm2022}/main-class-componentes-core.mjs +36 -56
  29. package/fesm2022/main-class-componentes-core.mjs.map +1 -0
  30. package/fesm2022/main-class-componentes-crud.mjs +443 -0
  31. package/fesm2022/main-class-componentes-crud.mjs.map +1 -0
  32. package/fesm2022/main-class-componentes-dialog.mjs +393 -0
  33. package/fesm2022/main-class-componentes-dialog.mjs.map +1 -0
  34. package/fesm2022/main-class-componentes-form.mjs +196 -0
  35. package/fesm2022/main-class-componentes-form.mjs.map +1 -0
  36. package/fesm2022/main-class-componentes-input.mjs +2040 -0
  37. package/fesm2022/main-class-componentes-input.mjs.map +1 -0
  38. package/{fesm2020 → fesm2022}/main-class-componentes-loader.mjs +38 -59
  39. package/fesm2022/main-class-componentes-loader.mjs.map +1 -0
  40. package/fesm2022/main-class-componentes-misc.mjs +353 -0
  41. package/fesm2022/main-class-componentes-misc.mjs.map +1 -0
  42. package/fesm2022/main-class-componentes-pipe.mjs +27 -0
  43. package/fesm2022/main-class-componentes-pipe.mjs.map +1 -0
  44. package/fesm2022/main-class-componentes-table.mjs +384 -0
  45. package/fesm2022/main-class-componentes-table.mjs.map +1 -0
  46. package/{fesm2015 → fesm2022}/main-class-componentes.mjs +4 -1
  47. package/fesm2022/main-class-componentes.mjs.map +1 -0
  48. package/form/index.d.ts +0 -1
  49. package/form/src/form.component.d.ts +2 -2
  50. package/form/src/mensagens-erro/mensagens-erro.component.d.ts +6 -3
  51. package/form/src/single-click.directive.d.ts +2 -2
  52. package/input/index.d.ts +13 -11
  53. package/input/src/abstract-mat-form-field-control.d.ts +5 -5
  54. package/input/src/abstract-mat-form-field-select-control.d.ts +30 -0
  55. package/input/src/input-currency/input-currency.component.d.ts +11 -0
  56. package/input/src/input-datetime/input-datetime.component.d.ts +11 -12
  57. package/input/src/input-fileupload/input-fileupload.component.d.ts +5 -5
  58. package/input/src/input-fileupload/input-fileupload.directive.d.ts +1 -1
  59. package/input/src/input-mask/input-cep.component.d.ts +11 -0
  60. package/input/src/input-mask/input-cnpj.component.d.ts +11 -0
  61. package/input/src/input-mask/input-cpf-cnpj.component.d.ts +8 -0
  62. package/input/src/input-mask/input-cpf.component.d.ts +11 -0
  63. package/input/src/input-mask/input-mask.component.d.ts +20 -0
  64. package/input/src/input-mask/input-phone.component.d.ts +12 -0
  65. package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +1 -1
  66. package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +1 -1
  67. package/input/src/option-checkbox/all-option-checkbox.component.d.ts +3 -3
  68. package/input/src/option-checkbox/node-pool.d.ts +1 -1
  69. package/input/src/option-checkbox/option-checkbox-group.component.d.ts +2 -2
  70. package/input/src/option-checkbox/option-checkbox.component.d.ts +3 -3
  71. package/input/src/option-checkbox/option-node.d.ts +1 -1
  72. package/input/src/select-autocomplete/select-autocomplete.component.d.ts +21 -0
  73. package/input/src/select-chips/select-chips.component.d.ts +10 -53
  74. package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +9 -49
  75. package/input/src/select-option/delegate-option-provider.directive.d.ts +13 -0
  76. package/input/src/select-option/select-option-provider.d.ts +10 -0
  77. package/input/src/select-option/select-option.component.d.ts +10 -0
  78. package/input/src/select-option/select-option.d.ts +4 -0
  79. package/input/src/select-radio/select-radio.component.d.ts +7 -45
  80. package/loader/index.d.ts +0 -1
  81. package/loader/src/loader.component.d.ts +3 -3
  82. package/loader/src/loader.service.d.ts +3 -3
  83. package/misc/index.d.ts +1 -15
  84. package/misc/src/cnpj/cnpj.directive.d.ts +2 -2
  85. package/misc/src/cnpj/cnpjs.pipe.d.ts +2 -2
  86. package/misc/src/cpf/cpf.directive.d.ts +2 -2
  87. package/misc/src/cpf/cpf.pipe.d.ts +2 -2
  88. package/misc/src/cpf-cnpj/cpf-cnpj.directive.d.ts +2 -2
  89. package/misc/src/cpf-cnpj/cpf-cnpj.pipe.d.ts +2 -2
  90. package/misc/src/mask/mask.pipe.d.ts +8 -0
  91. package/misc/src/monetario/monetario-mask.d.ts +1 -1
  92. package/misc/src/monetario/monetario.pipe.d.ts +1 -1
  93. package/misc/src/porcentagem/porcentagem-mask.d.ts +1 -1
  94. package/misc/src/porcentagem/porcentagem.pipe.d.ts +1 -1
  95. package/misc/src/telefone/telefone.pipe.d.ts +1 -1
  96. package/misc/src/unsafe-inner-html/unsafe-inner-html.directive.d.ts +1 -1
  97. package/package.json +19 -99
  98. package/pipe/index.d.ts +0 -1
  99. package/pipe/src/nome-resumido.pipe.d.ts +1 -1
  100. package/public-api.d.ts +2 -2
  101. package/table/index.d.ts +0 -2
  102. package/table/src/column/column-cell.directive.d.ts +1 -1
  103. package/table/src/column/column-footer.directive.d.ts +1 -1
  104. package/table/src/column/column-header.directive.d.ts +1 -1
  105. package/table/src/column/column.directive.d.ts +2 -2
  106. package/table/src/paginated-table/paginated-table.component.d.ts +10 -8
  107. package/table/src/paginator/paginator.component.d.ts +1 -1
  108. package/table/src/table/table.component.d.ts +7 -7
  109. package/table/src/td/td.component.d.ts +1 -1
  110. package/table/src/th/th.component.d.ts +1 -1
  111. package/arquivo/src/arquivo.module.d.ts +0 -17
  112. package/core/src/core.module.d.ts +0 -9
  113. package/crud/src/abstract-consulta-component.d.ts +0 -30
  114. package/date/index.d.ts +0 -3
  115. package/date/src/date.module.d.ts +0 -9
  116. package/date/src/validator/data-validator.directive.d.ts +0 -23
  117. package/date/src/validator/futuro.directive.d.ts +0 -8
  118. package/dialog/src/dialog.module.d.ts +0 -16
  119. package/esm2020/arquivo/index.mjs +0 -7
  120. package/esm2020/arquivo/main-class-componentes-arquivo.mjs +0 -5
  121. package/esm2020/arquivo/src/arquivo-manager.service.mjs +0 -3
  122. package/esm2020/arquivo/src/arquivo.module.mjs +0 -47
  123. package/esm2020/arquivo/src/download-arquivo.directive.mjs +0 -46
  124. package/esm2020/arquivo/src/imagem.directive.mjs +0 -89
  125. package/esm2020/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.mjs +0 -65
  126. package/esm2020/arquivo/src/preview-arquivo/preview-arquivo.component.mjs +0 -139
  127. package/esm2020/core/index.mjs +0 -6
  128. package/esm2020/core/main-class-componentes-core.mjs +0 -5
  129. package/esm2020/core/src/core.module.mjs +0 -32
  130. package/esm2020/core/src/criptografia/criptografia.service.mjs +0 -16
  131. package/esm2020/core/src/mensageria/mensageria.service.mjs +0 -57
  132. package/esm2020/core/src/mobile/mobile.service.mjs +0 -43
  133. package/esm2020/core/src/validator/valida-modulo11.service.mjs +0 -95
  134. package/esm2020/crud/index.mjs +0 -5
  135. package/esm2020/crud/main-class-componentes-crud.mjs +0 -5
  136. package/esm2020/crud/src/abstract-consulta-component.mjs +0 -55
  137. package/esm2020/crud/src/abstract-consulta-paginada-component.mjs +0 -48
  138. package/esm2020/crud/src/abstract-edicao-component.mjs +0 -30
  139. package/esm2020/crud/src/abstract-edicao-modal-component.mjs +0 -19
  140. package/esm2020/date/index.mjs +0 -4
  141. package/esm2020/date/main-class-componentes-date.mjs +0 -5
  142. package/esm2020/date/src/date.module.mjs +0 -25
  143. package/esm2020/date/src/validator/data-validator.directive.mjs +0 -105
  144. package/esm2020/date/src/validator/futuro.directive.mjs +0 -33
  145. package/esm2020/dialog/index.mjs +0 -5
  146. package/esm2020/dialog/main-class-componentes-dialog.mjs +0 -5
  147. package/esm2020/dialog/src/dialog-confirmacao/dialog-confirmacao.component.mjs +0 -44
  148. package/esm2020/dialog/src/dialog-iframe/dialog-iframe.component.mjs +0 -60
  149. package/esm2020/dialog/src/dialog.module.mjs +0 -53
  150. package/esm2020/dialog/src/dialog.service.mjs +0 -53
  151. package/esm2020/form/index.mjs +0 -5
  152. package/esm2020/form/main-class-componentes-form.mjs +0 -5
  153. package/esm2020/form/src/form.component.mjs +0 -106
  154. package/esm2020/form/src/form.module.mjs +0 -36
  155. package/esm2020/form/src/mensagens-erro/mensagens-erro.component.mjs +0 -33
  156. package/esm2020/form/src/single-click.directive.mjs +0 -35
  157. package/esm2020/input/index.mjs +0 -24
  158. package/esm2020/input/main-class-componentes-input.mjs +0 -5
  159. package/esm2020/input/src/abstract-mat-form-field-control.mjs +0 -116
  160. package/esm2020/input/src/input-datetime/input-datetime.component.mjs +0 -130
  161. package/esm2020/input/src/input-datetime/input-datetime.module.mjs +0 -101
  162. package/esm2020/input/src/input-fileupload/input-fileupload.component.mjs +0 -357
  163. package/esm2020/input/src/input-fileupload/input-fileupload.directive.mjs +0 -37
  164. package/esm2020/input/src/input-fileupload/input-fileupload.module.mjs +0 -57
  165. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.mjs +0 -29
  166. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional.component.mjs +0 -78
  167. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional.module.mjs +0 -33
  168. package/esm2020/input/src/option-checkbox/all-option-checkbox.component.mjs +0 -38
  169. package/esm2020/input/src/option-checkbox/node-pool.mjs +0 -93
  170. package/esm2020/input/src/option-checkbox/option-checkbox-group.component.mjs +0 -80
  171. package/esm2020/input/src/option-checkbox/option-checkbox.component.mjs +0 -62
  172. package/esm2020/input/src/option-checkbox/option-checkbox.module.mjs +0 -39
  173. package/esm2020/input/src/option-checkbox/option-checkbox.service.mjs +0 -54
  174. package/esm2020/input/src/option-checkbox/option-node.mjs +0 -24
  175. package/esm2020/input/src/select-chips/select-chips.component.mjs +0 -202
  176. package/esm2020/input/src/select-chips/select-chips.module.mjs +0 -40
  177. package/esm2020/input/src/select-chips-autocomplete/select-chips-autocomplete.component.mjs +0 -207
  178. package/esm2020/input/src/select-chips-autocomplete/select-chips-autocomplete.module.mjs +0 -40
  179. package/esm2020/input/src/select-item/select-item.component.mjs +0 -19
  180. package/esm2020/input/src/select-item/select-item.module.mjs +0 -20
  181. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.component.mjs +0 -170
  182. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.module.mjs +0 -32
  183. package/esm2020/input/src/select-radio/select-radio.component.mjs +0 -143
  184. package/esm2020/input/src/select-radio/select-radio.module.mjs +0 -32
  185. package/esm2020/loader/index.mjs +0 -4
  186. package/esm2020/loader/main-class-componentes-loader.mjs +0 -5
  187. package/esm2020/loader/src/loader.component.mjs +0 -125
  188. package/esm2020/loader/src/loader.module.mjs +0 -37
  189. package/esm2020/loader/src/loader.service.mjs +0 -72
  190. package/esm2020/main-class-componentes.mjs +0 -5
  191. package/esm2020/misc/index.mjs +0 -27
  192. package/esm2020/misc/main-class-componentes-misc.mjs +0 -5
  193. package/esm2020/misc/src/cnpj/cnpj-model.directive.mjs +0 -17
  194. package/esm2020/misc/src/cnpj/cnpj.directive.mjs +0 -36
  195. package/esm2020/misc/src/cnpj/cnpj.module.mjs +0 -26
  196. package/esm2020/misc/src/cnpj/cnpjs.pipe.mjs +0 -19
  197. package/esm2020/misc/src/cpf/cpf-model.directive.mjs +0 -17
  198. package/esm2020/misc/src/cpf/cpf.directive.mjs +0 -36
  199. package/esm2020/misc/src/cpf/cpf.module.mjs +0 -24
  200. package/esm2020/misc/src/cpf/cpf.pipe.mjs +0 -19
  201. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj-model.directive.mjs +0 -29
  202. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.directive.mjs +0 -37
  203. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.module.mjs +0 -24
  204. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.pipe.mjs +0 -22
  205. package/esm2020/misc/src/info/info.component.mjs +0 -20
  206. package/esm2020/misc/src/info/info.module.mjs +0 -24
  207. package/esm2020/misc/src/monetario/monetario-mask.mjs +0 -32
  208. package/esm2020/misc/src/monetario/monetario-model.directive.mjs +0 -133
  209. package/esm2020/misc/src/monetario/monetario.module.mjs +0 -21
  210. package/esm2020/misc/src/monetario/monetario.pipe.mjs +0 -17
  211. package/esm2020/misc/src/porcentagem/porcentagem-mask.mjs +0 -32
  212. package/esm2020/misc/src/porcentagem/porcentagem-model.directive.mjs +0 -108
  213. package/esm2020/misc/src/porcentagem/porcentagem.module.mjs +0 -21
  214. package/esm2020/misc/src/porcentagem/porcentagem.pipe.mjs +0 -17
  215. package/esm2020/misc/src/telefone/telefone-model.directive.mjs +0 -29
  216. package/esm2020/misc/src/telefone/telefone.module.mjs +0 -25
  217. package/esm2020/misc/src/telefone/telefone.pipe.mjs +0 -37
  218. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.directive.mjs +0 -25
  219. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.module.mjs +0 -20
  220. package/esm2020/model/index.mjs +0 -3
  221. package/esm2020/model/main-class-componentes-model.mjs +0 -5
  222. package/esm2020/model/src/masked-model.directive.mjs +0 -155
  223. package/esm2020/model/src/model.module.mjs +0 -24
  224. package/esm2020/pipe/index.mjs +0 -3
  225. package/esm2020/pipe/main-class-componentes-pipe.mjs +0 -5
  226. package/esm2020/pipe/src/nome-resumido.pipe.mjs +0 -20
  227. package/esm2020/pipe/src/pipe.module.mjs +0 -24
  228. package/esm2020/public-api.mjs +0 -5
  229. package/esm2020/scroll/index.mjs +0 -3
  230. package/esm2020/scroll/main-class-componentes-scroll.mjs +0 -5
  231. package/esm2020/scroll/src/scroll-container/scroll-container.component.mjs +0 -72
  232. package/esm2020/scroll/src/scroll.module.mjs +0 -22
  233. package/esm2020/table/index.mjs +0 -12
  234. package/esm2020/table/main-class-componentes-table.mjs +0 -5
  235. package/esm2020/table/src/column/column-cell.directive.mjs +0 -16
  236. package/esm2020/table/src/column/column-footer.directive.mjs +0 -16
  237. package/esm2020/table/src/column/column-header.directive.mjs +0 -16
  238. package/esm2020/table/src/column/column.directive.mjs +0 -37
  239. package/esm2020/table/src/infinite-table/infinite-table.component.mjs +0 -95
  240. package/esm2020/table/src/paginated-table/paginated-table.component.mjs +0 -69
  241. package/esm2020/table/src/paginator/paginator.component.mjs +0 -19
  242. package/esm2020/table/src/paginator-i18n.mjs +0 -23
  243. package/esm2020/table/src/table/table.component.mjs +0 -119
  244. package/esm2020/table/src/table.module.mjs +0 -120
  245. package/esm2020/table/src/td/td.component.mjs +0 -18
  246. package/esm2020/table/src/th/th.component.mjs +0 -18
  247. package/esm2020/util/index.mjs +0 -2
  248. package/esm2020/util/main-class-componentes-util.mjs +0 -5
  249. package/esm2020/util/src/string.util.mjs +0 -12
  250. package/fesm2015/main-class-componentes-arquivo.mjs +0 -389
  251. package/fesm2015/main-class-componentes-arquivo.mjs.map +0 -1
  252. package/fesm2015/main-class-componentes-core.mjs +0 -225
  253. package/fesm2015/main-class-componentes-core.mjs.map +0 -1
  254. package/fesm2015/main-class-componentes-crud.mjs +0 -176
  255. package/fesm2015/main-class-componentes-crud.mjs.map +0 -1
  256. package/fesm2015/main-class-componentes-date.mjs +0 -162
  257. package/fesm2015/main-class-componentes-date.mjs.map +0 -1
  258. package/fesm2015/main-class-componentes-dialog.mjs +0 -206
  259. package/fesm2015/main-class-componentes-dialog.mjs.map +0 -1
  260. package/fesm2015/main-class-componentes-form.mjs +0 -209
  261. package/fesm2015/main-class-componentes-form.mjs.map +0 -1
  262. package/fesm2015/main-class-componentes-input.mjs +0 -2103
  263. package/fesm2015/main-class-componentes-input.mjs.map +0 -1
  264. package/fesm2015/main-class-componentes-loader.mjs +0 -236
  265. package/fesm2015/main-class-componentes-loader.mjs.map +0 -1
  266. package/fesm2015/main-class-componentes-misc.mjs +0 -787
  267. package/fesm2015/main-class-componentes-misc.mjs.map +0 -1
  268. package/fesm2015/main-class-componentes-model.mjs +0 -183
  269. package/fesm2015/main-class-componentes-model.mjs.map +0 -1
  270. package/fesm2015/main-class-componentes-pipe.mjs +0 -48
  271. package/fesm2015/main-class-componentes-pipe.mjs.map +0 -1
  272. package/fesm2015/main-class-componentes-scroll.mjs +0 -98
  273. package/fesm2015/main-class-componentes-scroll.mjs.map +0 -1
  274. package/fesm2015/main-class-componentes-table.mjs +0 -532
  275. package/fesm2015/main-class-componentes-table.mjs.map +0 -1
  276. package/fesm2015/main-class-componentes-util.mjs +0 -18
  277. package/fesm2015/main-class-componentes-util.mjs.map +0 -1
  278. package/fesm2015/main-class-componentes.mjs.map +0 -1
  279. package/fesm2020/main-class-componentes-arquivo.mjs +0 -372
  280. package/fesm2020/main-class-componentes-arquivo.mjs.map +0 -1
  281. package/fesm2020/main-class-componentes-core.mjs.map +0 -1
  282. package/fesm2020/main-class-componentes-crud.mjs +0 -154
  283. package/fesm2020/main-class-componentes-crud.mjs.map +0 -1
  284. package/fesm2020/main-class-componentes-date.mjs +0 -162
  285. package/fesm2020/main-class-componentes-date.mjs.map +0 -1
  286. package/fesm2020/main-class-componentes-dialog.mjs +0 -201
  287. package/fesm2020/main-class-componentes-dialog.mjs.map +0 -1
  288. package/fesm2020/main-class-componentes-form.mjs +0 -204
  289. package/fesm2020/main-class-componentes-form.mjs.map +0 -1
  290. package/fesm2020/main-class-componentes-input.mjs +0 -2085
  291. package/fesm2020/main-class-componentes-input.mjs.map +0 -1
  292. package/fesm2020/main-class-componentes-loader.mjs.map +0 -1
  293. package/fesm2020/main-class-componentes-misc.mjs +0 -785
  294. package/fesm2020/main-class-componentes-misc.mjs.map +0 -1
  295. package/fesm2020/main-class-componentes-model.mjs +0 -183
  296. package/fesm2020/main-class-componentes-model.mjs.map +0 -1
  297. package/fesm2020/main-class-componentes-pipe.mjs +0 -48
  298. package/fesm2020/main-class-componentes-pipe.mjs.map +0 -1
  299. package/fesm2020/main-class-componentes-scroll.mjs +0 -98
  300. package/fesm2020/main-class-componentes-scroll.mjs.map +0 -1
  301. package/fesm2020/main-class-componentes-table.mjs +0 -519
  302. package/fesm2020/main-class-componentes-table.mjs.map +0 -1
  303. package/fesm2020/main-class-componentes-util.mjs +0 -18
  304. package/fesm2020/main-class-componentes-util.mjs.map +0 -1
  305. package/fesm2020/main-class-componentes.mjs +0 -9
  306. package/fesm2020/main-class-componentes.mjs.map +0 -1
  307. package/form/src/form.module.d.ts +0 -12
  308. package/input/src/input-datetime/input-datetime.module.d.ts +0 -13
  309. package/input/src/input-fileupload/input-fileupload.module.d.ts +0 -18
  310. package/input/src/input-telefone-internacional/input-telefone-internacional.module.d.ts +0 -11
  311. package/input/src/option-checkbox/option-checkbox.module.d.ts +0 -14
  312. package/input/src/select-chips/select-chips.module.d.ts +0 -13
  313. package/input/src/select-chips-autocomplete/select-chips-autocomplete.component.d.ts +0 -60
  314. package/input/src/select-chips-autocomplete/select-chips-autocomplete.module.d.ts +0 -13
  315. package/input/src/select-item/select-item.component.d.ts +0 -11
  316. package/input/src/select-item/select-item.module.d.ts +0 -8
  317. package/input/src/select-many-checkbox/select-many-checkbox.module.d.ts +0 -11
  318. package/input/src/select-radio/select-radio.module.d.ts +0 -11
  319. package/loader/src/loader.module.d.ts +0 -11
  320. package/misc/src/cnpj/cnpj-model.directive.d.ts +0 -8
  321. package/misc/src/cnpj/cnpj.module.d.ts +0 -11
  322. package/misc/src/cpf/cpf-model.directive.d.ts +0 -8
  323. package/misc/src/cpf/cpf.module.d.ts +0 -10
  324. package/misc/src/cpf-cnpj/cpf-cnpj-model.directive.d.ts +0 -10
  325. package/misc/src/cpf-cnpj/cpf-cnpj.module.d.ts +0 -10
  326. package/misc/src/info/info.component.d.ts +0 -9
  327. package/misc/src/info/info.module.d.ts +0 -9
  328. package/misc/src/monetario/monetario-model.directive.d.ts +0 -32
  329. package/misc/src/monetario/monetario.module.d.ts +0 -9
  330. package/misc/src/porcentagem/porcentagem-model.directive.d.ts +0 -28
  331. package/misc/src/porcentagem/porcentagem.module.d.ts +0 -9
  332. package/misc/src/telefone/telefone-model.directive.d.ts +0 -10
  333. package/misc/src/telefone/telefone.module.d.ts +0 -10
  334. package/misc/src/unsafe-inner-html/unsafe-inner-html.module.d.ts +0 -8
  335. package/model/index.d.ts +0 -2
  336. package/model/src/masked-model.directive.d.ts +0 -31
  337. package/model/src/model.module.d.ts +0 -8
  338. package/pipe/src/pipe.module.d.ts +0 -8
  339. package/scroll/index.d.ts +0 -2
  340. package/scroll/src/scroll-container/scroll-container.component.d.ts +0 -34
  341. package/scroll/src/scroll.module.d.ts +0 -8
  342. package/table/src/infinite-table/infinite-table.component.d.ts +0 -21
  343. package/table/src/table.module.d.ts +0 -29
  344. package/util/index.d.ts +0 -1
  345. package/util/src/string.util.d.ts +0 -4
@@ -0,0 +1,2040 @@
1
+ import { Subject, BehaviorSubject, concat, of, debounceTime, Observable, combineLatest } from 'rxjs';
2
+ import * as i0 from '@angular/core';
3
+ import { Input, HostBinding, ViewChild, Component, InjectionToken, QueryList, ContentChildren, Optional, Self, Inject, forwardRef, LOCALE_ID, EventEmitter, Output, Directive, Injectable } from '@angular/core';
4
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
5
+ import * as i1 from '@angular/material/core';
6
+ import { MAT_DATE_LOCALE } from '@angular/material/core';
7
+ import * as i2 from '@angular/forms';
8
+ import { FormControl, FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule } from '@angular/forms';
9
+ import { map, switchMap } from 'rxjs/operators';
10
+ import { MatInput } from '@angular/material/input';
11
+ import { monetarioMask } from '@main-class/componentes/misc';
12
+ import { MatFormFieldControl, MatPrefix, MatSuffix } from '@angular/material/form-field';
13
+ import * as i3 from '@mat-datetimepicker/core';
14
+ import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepickerModule } from '@mat-datetimepicker/core';
15
+ import { MomentDatetimeAdapter } from '@mat-datetimepicker/moment';
16
+ import moment from 'moment';
17
+ import { ARQUIVO_MANAGER_SERVICE, PreviewArquivoComponent, DownloadArquivoDirective } from '@main-class/componentes/arquivo';
18
+ import { MatChipGrid, MatChip, MatChipInput } from '@angular/material/chips';
19
+ import { NgClass, AsyncPipe, NgStyle } from '@angular/common';
20
+ import { MatProgressSpinner } from '@angular/material/progress-spinner';
21
+ import { MatIcon } from '@angular/material/icon';
22
+ import { MatIconButton } from '@angular/material/button';
23
+ import { MatTooltip } from '@angular/material/tooltip';
24
+ import { MatCheckbox } from '@angular/material/checkbox';
25
+ import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete';
26
+ import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
27
+ import * as i3$1 from 'lac-mat-tel-input';
28
+ import { LacMatTelInputModule, phoneNumberValidator } from 'lac-mat-tel-input';
29
+
30
+ class AbstractMatFormFieldControl {
31
+ errorStateMatcher;
32
+ ngControl;
33
+ parentForm;
34
+ parentFormGroup;
35
+ static nextId = 0;
36
+ $value;
37
+ $placeholder = '';
38
+ $disabled = false;
39
+ $required = false;
40
+ focused = false;
41
+ input;
42
+ stateChanges = new Subject();
43
+ id = `custom-input-${AbstractMatFormFieldControl.nextId++}`;
44
+ describedBy = '';
45
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
46
+ this.errorStateMatcher = errorStateMatcher;
47
+ this.ngControl = ngControl;
48
+ this.parentForm = parentForm;
49
+ this.parentFormGroup = parentFormGroup;
50
+ if (this.ngControl != null) {
51
+ this.ngControl.valueAccessor = this;
52
+ }
53
+ }
54
+ onChange = (val) => {
55
+ };
56
+ onTouched = () => {
57
+ };
58
+ get value() {
59
+ return this.$value;
60
+ }
61
+ set value(value) {
62
+ this.$value = value;
63
+ this.onChange(value);
64
+ this.stateChanges.next();
65
+ }
66
+ get empty() {
67
+ return !this.value;
68
+ }
69
+ onContainerClick(event) {
70
+ }
71
+ get shouldLabelFloat() {
72
+ return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
73
+ }
74
+ get placeholder() {
75
+ return this.$placeholder;
76
+ }
77
+ set placeholder(plh) {
78
+ this.$placeholder = plh;
79
+ this.stateChanges.next();
80
+ }
81
+ get required() {
82
+ return this.$required;
83
+ }
84
+ set required(value) {
85
+ this.$required = coerceBooleanProperty(value);
86
+ this.stateChanges.next();
87
+ }
88
+ get disabled() {
89
+ return this.$disabled;
90
+ }
91
+ set disabled(value) {
92
+ this.$disabled = coerceBooleanProperty(value);
93
+ this.stateChanges.next();
94
+ }
95
+ get errorState() {
96
+ return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
97
+ }
98
+ get controlType() {
99
+ return 'custom-input';
100
+ }
101
+ setDescribedByIds(ids) {
102
+ this.describedBy = ids.join(' ');
103
+ }
104
+ ngOnDestroy() {
105
+ this.stateChanges.complete();
106
+ }
107
+ registerOnTouched(fn) {
108
+ this.onTouched = fn;
109
+ }
110
+ registerOnChange(fn) {
111
+ this.onChange = fn;
112
+ }
113
+ setDisabledState(isDisabled) {
114
+ this.disabled = isDisabled;
115
+ }
116
+ writeValue(value) {
117
+ this.$value = value;
118
+ }
119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldControl, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl }, { token: i2.NgForm }, { token: i2.FormGroupDirective }], target: i0.ɵɵFactoryTarget.Component });
120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AbstractMatFormFieldControl, isStandalone: true, selector: "ng-component", inputs: { placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: '', isInline: true });
121
+ }
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldControl, decorators: [{
123
+ type: Component,
124
+ args: [{
125
+ template: ''
126
+ }]
127
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl }, { type: i2.NgForm }, { type: i2.FormGroupDirective }], propDecorators: { input: [{
128
+ type: ViewChild,
129
+ args: ['input']
130
+ }], id: [{
131
+ type: HostBinding
132
+ }], describedBy: [{
133
+ type: HostBinding,
134
+ args: ['attr.aria-describedby']
135
+ }], shouldLabelFloat: [{
136
+ type: HostBinding,
137
+ args: ['class.floating']
138
+ }], placeholder: [{
139
+ type: Input
140
+ }], required: [{
141
+ type: Input
142
+ }], disabled: [{
143
+ type: Input
144
+ }] } });
145
+
146
+ const SELECT_OPTION_PROVIDER = new InjectionToken('mainclass.SELECT_OPTION_PROVIDER');
147
+
148
+ class SelectOptionComponent {
149
+ value;
150
+ $label;
151
+ set label(label) {
152
+ this.$label = label !== null && label !== undefined ? String(label) : undefined;
153
+ }
154
+ get label() {
155
+ return this.$label;
156
+ }
157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: SelectOptionComponent, isStandalone: true, selector: "mcl-select-option", inputs: { value: "value", label: "label" }, ngImport: i0, template: "", styles: [""] });
159
+ }
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectOptionComponent, decorators: [{
161
+ type: Component,
162
+ args: [{ selector: 'mcl-select-option', imports: [], template: "" }]
163
+ }], propDecorators: { value: [{
164
+ type: Input
165
+ }], label: [{
166
+ type: Input
167
+ }] } });
168
+
169
+ class AbstractMatFormFieldSelectControl extends AbstractMatFormFieldControl {
170
+ optionProvider;
171
+ optionsSubscription;
172
+ $args = new BehaviorSubject(undefined);
173
+ wvt;
174
+ filteredOptions;
175
+ control = new FormControl('');
176
+ trackBy = (val) => val;
177
+ options = new QueryList();
178
+ defaultOptionProvider = {
179
+ type: () => 'object',
180
+ label: (value) => {
181
+ return this.options.find(op => this.doTrackBy(op.value) === this.doTrackBy(value))?.label || '';
182
+ },
183
+ provide: (search) => {
184
+ return concat(of({}), this.options.changes).pipe(map(() => {
185
+ return this.options.filter(op => {
186
+ if (!search || typeof search !== 'string') {
187
+ return true;
188
+ }
189
+ if (op.label !== undefined && op.label !== null) {
190
+ return String(op.label).toLowerCase()?.indexOf(search.toLowerCase()) >= 0;
191
+ }
192
+ return false;
193
+ });
194
+ }));
195
+ }
196
+ };
197
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
198
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
199
+ this.optionProvider = optionProvider;
200
+ }
201
+ doTrackBy(val) {
202
+ if (this.optionProvider && this.optionProvider.trackBy) {
203
+ return this.optionProvider.trackBy(val);
204
+ }
205
+ return this.trackBy(val);
206
+ }
207
+ set args(args) {
208
+ this.$args.next(args);
209
+ }
210
+ ngAfterContentInit() {
211
+ this.filteredOptions = concat(of(''), this.control.valueChanges).pipe(debounceTime(300), switchMap(value => {
212
+ return (this.optionProvider || this.defaultOptionProvider).provide(value);
213
+ }));
214
+ this.optionsSubscription = this.options.changes.subscribe(() => {
215
+ if (this.value !== undefined && this.value !== null) {
216
+ this.control.setValue((this.optionProvider || this.defaultOptionProvider).label(this.value));
217
+ }
218
+ });
219
+ this.options.notifyOnChanges();
220
+ }
221
+ ngOnDestroy() {
222
+ super.ngOnDestroy();
223
+ this.optionsSubscription?.unsubscribe();
224
+ }
225
+ seleciona(event) {
226
+ this.doSeleciona(event.option.value);
227
+ }
228
+ doSeleciona(value) {
229
+ this.onTouched();
230
+ if (value) {
231
+ this.value = value;
232
+ this.control.setValue(this.optionProvider.label(value));
233
+ }
234
+ else {
235
+ this.value = undefined;
236
+ this.control.setValue('');
237
+ }
238
+ this.stateChanges.next();
239
+ }
240
+ writeValue(value) {
241
+ clearTimeout(this.wvt);
242
+ this.wvt = setTimeout(() => {
243
+ super.writeValue(value);
244
+ if (value) {
245
+ this.control.setValue(this.optionProvider.label(value));
246
+ }
247
+ else {
248
+ this.control.setValue('');
249
+ }
250
+ }, 150);
251
+ }
252
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldSelectControl, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
253
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AbstractMatFormFieldSelectControl, isStandalone: true, selector: "ng-component", inputs: { trackBy: "trackBy", args: "args" }, queries: [{ propertyName: "options", predicate: SelectOptionComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
254
+ }
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldSelectControl, decorators: [{
256
+ type: Component,
257
+ args: [{
258
+ template: ''
259
+ }]
260
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
261
+ type: Optional
262
+ }, {
263
+ type: Self
264
+ }] }, { type: i2.NgForm, decorators: [{
265
+ type: Optional
266
+ }] }, { type: i2.FormGroupDirective, decorators: [{
267
+ type: Optional
268
+ }] }, { type: undefined, decorators: [{
269
+ type: Self
270
+ }, {
271
+ type: Optional
272
+ }, {
273
+ type: Inject,
274
+ args: [SELECT_OPTION_PROVIDER]
275
+ }] }], propDecorators: { trackBy: [{
276
+ type: Input
277
+ }], options: [{
278
+ type: ContentChildren,
279
+ args: [SelectOptionComponent]
280
+ }], args: [{
281
+ type: Input
282
+ }] } });
283
+
284
+ class InputCurrencyComponent extends AbstractMatFormFieldControl {
285
+ get value() {
286
+ return super.value;
287
+ }
288
+ set value(value) {
289
+ const unformatted = this.removeMask(value);
290
+ if (unformatted) {
291
+ super.value = unformatted;
292
+ this.input.nativeElement.text = this.applyMask(unformatted);
293
+ }
294
+ }
295
+ applyMask(value) {
296
+ if (value) {
297
+ return monetarioMask(value);
298
+ }
299
+ return undefined;
300
+ }
301
+ removeMask(value) {
302
+ if (value) {
303
+ return monetarioMask(value, '', '', '.');
304
+ }
305
+ return undefined;
306
+ }
307
+ writeValue(value) {
308
+ super.writeValue(value);
309
+ const masked = this.applyMask(value);
310
+ if (masked !== this.value) {
311
+ this.input.nativeElement.text = masked;
312
+ }
313
+ }
314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCurrencyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
315
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCurrencyComponent, isStandalone: true, selector: "mcl-input[currency]", providers: [{
316
+ provide: NG_VALUE_ACCESSOR,
317
+ useExisting: forwardRef(() => InputCurrencyComponent),
318
+ multi: true
319
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ 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: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] });
320
+ }
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCurrencyComponent, decorators: [{
322
+ type: Component,
323
+ args: [{ selector: 'mcl-input[currency]', imports: [
324
+ FormsModule,
325
+ MatInput
326
+ ], providers: [{
327
+ provide: NG_VALUE_ACCESSOR,
328
+ useExisting: forwardRef(() => InputCurrencyComponent),
329
+ multi: true
330
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
331
+ }] });
332
+
333
+ class InputMaskComponent extends AbstractMatFormFieldControl {
334
+ /**
335
+ * Example ###.###
336
+ * @private
337
+ */
338
+ $mask;
339
+ keepMask;
340
+ get value() {
341
+ return super.value;
342
+ }
343
+ set value(value) {
344
+ const unformatted = this.removeMask(value);
345
+ if (unformatted) {
346
+ super.value = this.keepMask ? this.applyMask(unformatted) : unformatted;
347
+ this.input.nativeElement.text = this.applyMask(unformatted);
348
+ }
349
+ }
350
+ set mask(mask) {
351
+ if (this.$mask !== mask) {
352
+ this.$mask = mask;
353
+ this.writeValue(this.value);
354
+ }
355
+ }
356
+ applyMask(value) {
357
+ if (value && this.$mask) {
358
+ value = this.removeMask(value);
359
+ let result = '';
360
+ for (let im = 0, iv = 0; im < this.$mask.length && iv < value.length; im++) {
361
+ if (this.$mask[im] === '#') {
362
+ result += value[iv];
363
+ iv++;
364
+ }
365
+ else {
366
+ result += this.$mask[im];
367
+ }
368
+ }
369
+ return result;
370
+ }
371
+ return "";
372
+ }
373
+ removeMask(value) {
374
+ if (typeof value === "number") {
375
+ value = String(value).padStart(this.$mask?.replace(/[^#]/, '')?.length || 0, '0');
376
+ }
377
+ if (value) {
378
+ return value.replaceAll(/\D+/g, '');
379
+ }
380
+ return undefined;
381
+ }
382
+ writeValue(value) {
383
+ super.writeValue(value);
384
+ const masked = this.applyMask(value);
385
+ if (masked !== this.value) {
386
+ this.input.nativeElement.text = masked;
387
+ }
388
+ }
389
+ validate(control) {
390
+ if (control.value) {
391
+ if (control.value.length !== this.$mask?.replaceAll(/[^#]/g, '')?.length) {
392
+ return { 'incompleteMask': true };
393
+ }
394
+ }
395
+ return null;
396
+ }
397
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputMaskComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
398
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputMaskComponent, isStandalone: true, selector: "mcl-input[mask]", inputs: { keepMask: "keepMask", mask: "mask" }, providers: [{
399
+ provide: NG_VALUE_ACCESSOR,
400
+ useExisting: forwardRef(() => InputMaskComponent),
401
+ multi: true
402
+ }, {
403
+ provide: NG_VALIDATORS,
404
+ useExisting: forwardRef(() => InputMaskComponent),
405
+ multi: true
406
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
407
+ }
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputMaskComponent, decorators: [{
409
+ type: Component,
410
+ args: [{ selector: 'mcl-input[mask]', imports: [
411
+ MatInput,
412
+ FormsModule
413
+ ], providers: [{
414
+ provide: NG_VALUE_ACCESSOR,
415
+ useExisting: forwardRef(() => InputMaskComponent),
416
+ multi: true
417
+ }, {
418
+ provide: NG_VALIDATORS,
419
+ useExisting: forwardRef(() => InputMaskComponent),
420
+ multi: true
421
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
422
+ }], propDecorators: { keepMask: [{
423
+ type: Input
424
+ }], mask: [{
425
+ type: Input
426
+ }] } });
427
+
428
+ class InputDatetimeComponent extends AbstractMatFormFieldControl {
429
+ adapter;
430
+ formats;
431
+ type = 'date';
432
+ readonly;
433
+ name;
434
+ picker;
435
+ innerValue;
436
+ $maskedValue;
437
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, adapter, formats) {
438
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
439
+ this.adapter = adapter;
440
+ this.formats = formats;
441
+ }
442
+ get empty() {
443
+ return !this.$maskedValue;
444
+ }
445
+ get maskedValue() {
446
+ return this.$maskedValue;
447
+ }
448
+ set maskedValue(maskedValue) {
449
+ if (this.$maskedValue !== maskedValue) {
450
+ this.onTouched();
451
+ this.$maskedValue = maskedValue;
452
+ if (maskedValue) {
453
+ if (maskedValue.match(new RegExp(`^${this.mask.replace(/#/g, '\\d')}$`))) {
454
+ this.innerValue = this.adapter.parse(maskedValue, this.format)?.toDate();
455
+ }
456
+ else {
457
+ this.innerValue = undefined;
458
+ }
459
+ }
460
+ else {
461
+ this.innerValue = undefined;
462
+ }
463
+ this.onChange(this.innerValue);
464
+ this.stateChanges.next();
465
+ }
466
+ }
467
+ get mask() {
468
+ switch (this.type) {
469
+ case 'date':
470
+ return '##/##/####';
471
+ case 'time':
472
+ return '##:##';
473
+ }
474
+ return '##/##/#### ##:##';
475
+ }
476
+ get format() {
477
+ switch (this.type) {
478
+ case 'date':
479
+ return this.formats.display.dateInput;
480
+ case 'time':
481
+ return this.formats.display.timeInput;
482
+ }
483
+ return this.formats.display.datetimeInput;
484
+ }
485
+ get value() {
486
+ return this.innerValue;
487
+ }
488
+ set value(value) {
489
+ if (this.innerValue !== value) {
490
+ this.onTouched();
491
+ if (value) {
492
+ this.innerValue = value instanceof Date ? value : value.toDate();
493
+ this.$maskedValue = this.adapter.format(moment(this.innerValue), this.format);
494
+ }
495
+ else {
496
+ this.innerValue = undefined;
497
+ this.$maskedValue = '';
498
+ }
499
+ this.onChange(this.innerValue);
500
+ this.stateChanges.next();
501
+ }
502
+ }
503
+ writeValue(value) {
504
+ this.innerValue = value;
505
+ if (value) {
506
+ this.$maskedValue = this.adapter.format(moment(value), this.format);
507
+ }
508
+ else {
509
+ this.$maskedValue = '';
510
+ }
511
+ this.stateChanges.next();
512
+ }
513
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: DatetimeAdapter }, { token: MAT_DATETIME_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
514
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputDatetimeComponent, isStandalone: true, selector: "mcl-input-datetime", inputs: { type: "type", readonly: "readonly", name: "name" }, providers: [
515
+ {
516
+ provide: MatFormFieldControl,
517
+ useExisting: InputDatetimeComponent
518
+ },
519
+ { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
520
+ {
521
+ provide: DatetimeAdapter,
522
+ useClass: MomentDatetimeAdapter
523
+ },
524
+ {
525
+ provide: MAT_DATETIME_FORMATS,
526
+ useValue: {
527
+ parse: {
528
+ dateInput: 'L',
529
+ monthInput: 'MMMM',
530
+ timeInput: 'LT',
531
+ datetimeInput: 'L LT'
532
+ },
533
+ display: {
534
+ dateInput: 'L',
535
+ monthInput: 'MMMM',
536
+ datetimeInput: 'L LT',
537
+ timeInput: 'LT',
538
+ monthYearLabel: 'MMM YYYY',
539
+ dateA11yLabel: 'LL',
540
+ monthYearA11yLabel: 'MMMM YYYY',
541
+ popupHeaderDateLabel: 'ddd, DD MMM'
542
+ }
543
+ }
544
+ }
545
+ ], viewQueries: [{ propertyName: "picker", first: true, predicate: ["pickerData"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dateinput\">\n <mcl-input [disabled]=\"disabled\" ngModel\n [(ngModel)]=\"maskedValue\" [mask]=\"mask\"\n (focus)=\"focused = true\" (blur)=\"focused = false\" [keepMask]=\"true\"\n />\n <mat-datetimepicker [disabled]=\"disabled || readonly\"\n [type]=\"type\" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]=\"pickerData\"></mat-datetimepicker-toggle>\n</div>\n<input class=\"hidden\" [(ngModel)]=\"value\" [matDatetimepicker]=\"pickerData\" />\n", styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatDatetimepickerModule }, { kind: "component", type: i3.MatDatetimepickerComponent, selector: "mat-datetimepicker", inputs: ["multiYearSelector", "twelvehour", "startView", "mode", "timeInterval", "ariaNextMonthLabel", "ariaPrevMonthLabel", "ariaNextYearLabel", "ariaPrevYearLabel", "preventSameDateTimeSelection", "panelClass", "startAt", "openOnFocus", "type", "touchUi", "disabled"], outputs: ["selectedChanged", "opened", "closed", "viewChanged"], exportAs: ["matDatetimepicker"] }, { kind: "component", type: i3.MatDatetimepickerToggleComponent, selector: "mat-datetimepicker-toggle", inputs: ["for", "disabled"], exportAs: ["matDatetimepickerToggle"] }, { kind: "directive", type: i3.MatDatetimepickerInputDirective, selector: "input[matDatetimepicker]", inputs: ["matDatetimepicker", "matDatepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["matDatepickerInput"] }, { 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: "component", type: InputMaskComponent, selector: "mcl-input[mask]", inputs: ["keepMask", "mask"] }] });
546
+ }
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, decorators: [{
548
+ type: Component,
549
+ args: [{ selector: 'mcl-input-datetime', imports: [
550
+ MatDatetimepickerModule,
551
+ FormsModule,
552
+ InputMaskComponent
553
+ ], providers: [
554
+ {
555
+ provide: MatFormFieldControl,
556
+ useExisting: InputDatetimeComponent
557
+ },
558
+ { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
559
+ {
560
+ provide: DatetimeAdapter,
561
+ useClass: MomentDatetimeAdapter
562
+ },
563
+ {
564
+ provide: MAT_DATETIME_FORMATS,
565
+ useValue: {
566
+ parse: {
567
+ dateInput: 'L',
568
+ monthInput: 'MMMM',
569
+ timeInput: 'LT',
570
+ datetimeInput: 'L LT'
571
+ },
572
+ display: {
573
+ dateInput: 'L',
574
+ monthInput: 'MMMM',
575
+ datetimeInput: 'L LT',
576
+ timeInput: 'LT',
577
+ monthYearLabel: 'MMM YYYY',
578
+ dateA11yLabel: 'LL',
579
+ monthYearA11yLabel: 'MMMM YYYY',
580
+ popupHeaderDateLabel: 'ddd, DD MMM'
581
+ }
582
+ }
583
+ }
584
+ ], template: "<div class=\"dateinput\">\n <mcl-input [disabled]=\"disabled\" ngModel\n [(ngModel)]=\"maskedValue\" [mask]=\"mask\"\n (focus)=\"focused = true\" (blur)=\"focused = false\" [keepMask]=\"true\"\n />\n <mat-datetimepicker [disabled]=\"disabled || readonly\"\n [type]=\"type\" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]=\"pickerData\"></mat-datetimepicker-toggle>\n</div>\n<input class=\"hidden\" [(ngModel)]=\"value\" [matDatetimepicker]=\"pickerData\" />\n", styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}\n"] }]
585
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
586
+ type: Optional
587
+ }, {
588
+ type: Self
589
+ }] }, { type: i2.NgForm, decorators: [{
590
+ type: Optional
591
+ }] }, { type: i2.FormGroupDirective, decorators: [{
592
+ type: Optional
593
+ }] }, { type: i3.DatetimeAdapter, decorators: [{
594
+ type: Inject,
595
+ args: [DatetimeAdapter]
596
+ }] }, { type: undefined, decorators: [{
597
+ type: Inject,
598
+ args: [MAT_DATETIME_FORMATS]
599
+ }] }], propDecorators: { type: [{
600
+ type: Input
601
+ }], readonly: [{
602
+ type: Input
603
+ }], name: [{
604
+ type: Input
605
+ }], picker: [{
606
+ type: ViewChild,
607
+ args: ['pickerData']
608
+ }] } });
609
+
610
+ class InputFileUploadComponent {
611
+ errorStateMatcher;
612
+ ngControl;
613
+ parentForm;
614
+ changeDetectorRef;
615
+ parentFormGroup;
616
+ arquivoService;
617
+ static nextId = 0;
618
+ $placeholder = '';
619
+ $disabled = false;
620
+ $required = false;
621
+ value;
622
+ multiple;
623
+ limite;
624
+ accept;
625
+ template = 'preview';
626
+ agrupadores;
627
+ input;
628
+ selectCancel = new EventEmitter();
629
+ stateChanges = new Subject();
630
+ change = new EventEmitter();
631
+ id = `input-fileupload-${InputFileUploadComponent.nextId++}`;
632
+ describedBy = '';
633
+ constructor(errorStateMatcher, ngControl, parentForm, changeDetectorRef, parentFormGroup, arquivoService) {
634
+ this.errorStateMatcher = errorStateMatcher;
635
+ this.ngControl = ngControl;
636
+ this.parentForm = parentForm;
637
+ this.changeDetectorRef = changeDetectorRef;
638
+ this.parentFormGroup = parentFormGroup;
639
+ this.arquivoService = arquivoService;
640
+ if (this.ngControl != null) {
641
+ this.ngControl.valueAccessor = this;
642
+ }
643
+ }
644
+ onChange = (val) => {
645
+ };
646
+ onTouched = () => {
647
+ };
648
+ get focused() {
649
+ return this.value && (this.multiple ? this.value.find((a) => a.loading) : this.value.loading);
650
+ }
651
+ get empty() {
652
+ return !this.value;
653
+ }
654
+ onContainerClick(event) {
655
+ // Não necessário
656
+ }
657
+ get shouldLabelFloat() {
658
+ return true;
659
+ }
660
+ get placeholder() {
661
+ return this.$placeholder;
662
+ }
663
+ set placeholder(plh) {
664
+ this.$placeholder = plh;
665
+ this.stateChanges.next();
666
+ }
667
+ get required() {
668
+ return this.$required;
669
+ }
670
+ set required(value) {
671
+ this.$required = coerceBooleanProperty(value);
672
+ this.stateChanges.next();
673
+ }
674
+ get disabled() {
675
+ return this.$disabled;
676
+ }
677
+ set disabled(value) {
678
+ this.$disabled = coerceBooleanProperty(value);
679
+ this.stateChanges.next();
680
+ }
681
+ get errorState() {
682
+ return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
683
+ }
684
+ get controlType() {
685
+ return 'input-fileupload';
686
+ }
687
+ setDescribedByIds(ids) {
688
+ this.describedBy = ids.join(' ');
689
+ }
690
+ ngOnDestroy() {
691
+ this.stateChanges.complete();
692
+ }
693
+ upload(arquivo) {
694
+ return new Observable(observer => {
695
+ if (!this.validaFormato(arquivo.nome)) {
696
+ arquivo.error = { fileFormat: true };
697
+ observer.error('Formato inválido');
698
+ this.onChange(this.value);
699
+ this.change.emit(this.value);
700
+ this.stateChanges.next();
701
+ return;
702
+ }
703
+ if (this.limite) {
704
+ const total = this.parseLimite();
705
+ if ((arquivo.length || 0) > total) {
706
+ arquivo.error = {
707
+ fileSize: {
708
+ limite: this.limite,
709
+ }
710
+ };
711
+ observer.error('Tamanho inválido');
712
+ this.onChange(this.value);
713
+ this.change.emit(this.value);
714
+ this.stateChanges.next();
715
+ return;
716
+ }
717
+ }
718
+ this.arquivoService.upload(arquivo.file, ...(this.agrupadores || []))
719
+ .subscribe({
720
+ next: event => {
721
+ if (event.type === 'conclusao') {
722
+ arquivo.progresso = undefined;
723
+ if (this.multiple) {
724
+ this.value = [
725
+ ...(this.value || []).map((a) => a === arquivo ? event.attachment : a)
726
+ ];
727
+ this.onChange(this.value);
728
+ this.change.emit(this.value);
729
+ this.stateChanges.next();
730
+ }
731
+ else {
732
+ this.value = event.attachment;
733
+ this.onChange(event.attachment);
734
+ this.change.emit(event.attachment);
735
+ this.stateChanges.next();
736
+ }
737
+ observer.next(null);
738
+ observer.complete();
739
+ }
740
+ else if (event.type === 'progresso') {
741
+ arquivo.progresso = event.progresso;
742
+ this.stateChanges.next();
743
+ }
744
+ },
745
+ error: err => {
746
+ arquivo.error = { fileError: true };
747
+ this.onChange(this.value);
748
+ this.change.emit(this.value);
749
+ this.stateChanges.next();
750
+ observer.error(err);
751
+ }
752
+ });
753
+ });
754
+ }
755
+ parseLimite() {
756
+ let total = Number(this.limite.replace(/\D+/g, ''));
757
+ if (this.limite.toUpperCase().indexOf('GB') >= 0) {
758
+ total = total * 1024 * 1024 * 1024;
759
+ }
760
+ if (this.limite.toUpperCase().indexOf('MB') >= 0) {
761
+ total = total * 1024 * 1024;
762
+ }
763
+ if (this.limite.toUpperCase().indexOf('KB') >= 0) {
764
+ total = total * 1024;
765
+ }
766
+ return total;
767
+ }
768
+ validaFormato(filename) {
769
+ if (this.accept) {
770
+ let formats = [];
771
+ if (typeof this.accept === 'string') {
772
+ formats = [this.accept];
773
+ }
774
+ else {
775
+ formats = this.accept;
776
+ }
777
+ for (const format of formats) {
778
+ if (filename.toLowerCase().indexOf(format.toLowerCase()) === filename.length - format.length) {
779
+ return true;
780
+ }
781
+ }
782
+ return false;
783
+ }
784
+ return true;
785
+ }
786
+ uploadNext() {
787
+ if (this.multiple) {
788
+ if (this.value) {
789
+ for (const item of this.value) {
790
+ if (item.loading && !item.error) {
791
+ this.upload(item).subscribe(() => this.uploadNext(), err => this.uploadNext());
792
+ break;
793
+ }
794
+ }
795
+ }
796
+ }
797
+ else if (this.value && this.value.loading && !this.value.error) {
798
+ this.upload(this.value).subscribe(() => this.uploadNext(), err => this.uploadNext());
799
+ }
800
+ }
801
+ onFileChange(event) {
802
+ this.onTouched();
803
+ if (event.target.files && event.target.files.length) {
804
+ if (this.multiple) {
805
+ const arqs = [];
806
+ for (const file of event.target.files) {
807
+ arqs.push({
808
+ file,
809
+ loading: true,
810
+ nome: file.name,
811
+ length: file.size,
812
+ });
813
+ }
814
+ this.value = [
815
+ ...(this.value || []),
816
+ ...arqs
817
+ ];
818
+ this.onChange(this.value);
819
+ this.change.emit(this.value);
820
+ this.stateChanges.next();
821
+ }
822
+ else {
823
+ this.value = {
824
+ file: event.target.files[0],
825
+ length: event.target.files[0].size,
826
+ loading: true,
827
+ nome: event.target.files[0].name
828
+ };
829
+ this.onChange(this.value);
830
+ this.change.emit(this.value);
831
+ this.stateChanges.next();
832
+ }
833
+ this.uploadNext();
834
+ }
835
+ else {
836
+ this.selectCancel.emit();
837
+ }
838
+ event.target.value = '';
839
+ }
840
+ openFileChooser() {
841
+ if (!this.disabled) {
842
+ this.input.nativeElement.click();
843
+ }
844
+ }
845
+ async remover(arquivo) {
846
+ if (this.value) {
847
+ if (this.multiple) {
848
+ if (Array.isArray(this.value)) {
849
+ this.value.splice(this.value.indexOf(arquivo), 1);
850
+ if (this.value.length) {
851
+ this.value = [...this.value];
852
+ this.onChange(this.value);
853
+ this.change.emit(this.value);
854
+ this.stateChanges.next();
855
+ }
856
+ else {
857
+ this.value = undefined;
858
+ this.onChange(undefined);
859
+ this.change.emit(undefined);
860
+ this.stateChanges.next();
861
+ }
862
+ }
863
+ }
864
+ else {
865
+ this.value = undefined;
866
+ this.onChange(undefined);
867
+ this.change.emit(undefined);
868
+ this.stateChanges.next();
869
+ }
870
+ }
871
+ }
872
+ registerOnTouched(fn) {
873
+ this.onTouched = fn;
874
+ }
875
+ registerOnChange(fn) {
876
+ this.onChange = fn;
877
+ }
878
+ setDisabledState(isDisabled) {
879
+ this.disabled = isDisabled;
880
+ }
881
+ writeValue(obj) {
882
+ if (obj) {
883
+ if (this.multiple) {
884
+ this.value = obj.map((a) => typeof a === 'string' ? { url: a } : a);
885
+ this.stateChanges.next();
886
+ }
887
+ else if (typeof obj === 'string') {
888
+ this.value = { url: obj };
889
+ this.stateChanges.next();
890
+ }
891
+ else {
892
+ this.value = obj;
893
+ this.stateChanges.next();
894
+ }
895
+ }
896
+ else {
897
+ this.value = obj;
898
+ this.stateChanges.next();
899
+ }
900
+ }
901
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i0.ChangeDetectorRef }, { token: i2.FormGroupDirective, optional: true }, { token: ARQUIVO_MANAGER_SERVICE }], target: i0.ɵɵFactoryTarget.Component });
902
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: InputFileUploadComponent, isStandalone: true, selector: "mcl-input-fileupload", inputs: { multiple: "multiple", limite: "limite", accept: "accept", template: "template", agrupadores: "agrupadores", placeholder: "placeholder", required: "required", disabled: "disabled" }, outputs: { selectCancel: "selectCancel", stateChanges: "change", change: "change" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [
903
+ {
904
+ provide: MatFormFieldControl,
905
+ useExisting: InputFileUploadComponent
906
+ }
907
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (multiple && template == 'chips') {\r\n <div class=\"chips\">\r\n @if (value?.length) {\r\n <mat-chip-grid>\r\n @for (arquivo of value; track arquivo) {\r\n <mat-chip [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n {{ arquivo.nome || arquivo.filename }}\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n </mat-chip-grid>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (multiple && template == 'preview') {\r\n <div class=\"previews\">\r\n @if (value?.length) {\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"20px\" fxFlexAlign=\"center\">\r\n @for (arquivo of value; track arquivo) {\r\n <div>\r\n <div class=\"preview\" [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n <mcl-preview-arquivo [group]=\"value\" [arquivo]=\"arquivo\"></mcl-preview-arquivo>\r\n\r\n @if (!disabled) {\r\n <div class=\"footer\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"\r\n ></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (template == 'manual') {\r\n <div>\r\n <input type=\"file\" [disabled]=\"disabled\" (change)=\"onFileChange($event)\" #input\r\n [multiple]=\"multiple\" style=\"display: none\"/>\r\n </div>\r\n}\r\n\r\n@if (!multiple && template != 'manual') {\r\n <input #input type=\"file\" style=\"display: none\"\r\n (change)=\"onFileChange($event)\"/>\r\n\r\n <div class=\"input\">\r\n @if (!value) {\r\n <button mat-icon-button type=\"button\"\r\n (click)=\"openFileChooser()\"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n }\r\n @if (value && !value.loading && !value.error) {\r\n <button mat-icon-button type=\"button\"\r\n [mclDownloadArquivo]=\"value\"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if (value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefixdisabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n }\r\n @if (value?.loading && !value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefix disabled>\r\n <mat-spinner [value]=\"value.progresso\"\r\n [diameter]=\"24\"></mat-spinner>\r\n </button>\r\n }\r\n @if (!value) {\r\n <input matInput readonly (click)=\"openFileChooser()\" [required]=\"required\"\r\n value=\"Selecione um arquivo...\"/>\r\n }\r\n @if (value && value.loading && !value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n value=\"Submetendo arquivo...\"/>\r\n }\r\n @if (value && value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && !value.loading) {\r\n <input matInput readonly [mclDownloadArquivo]=\"value\" [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && (!value.loading || value?.error) && !disabled) {\r\n <button mat-icon-button type=\"button\" matSuffix\r\n matTooltip=\"Remover\" (click)=\"remover(value)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}mat-chip>mat-spinner,mat-chip>mat-icon,.preview .footer>mat-spinner,.preview .footer>mat-icon{margin-right:5px;vertical-align:middle}mat-chip a,.preview .footer a{padding:5px}mat-chip a mat-icon,.preview .footer a mat-icon{margin-left:10px;vertical-align:middle}mat-chip.error,.preview.error{color:red}mat-chip.success,.preview.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer mat-icon,.preview .footer a{flex:1}.input{display:flex}.input input{flex:1 1 auto}\n"], dependencies: [{ kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "component", type: MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PreviewArquivoComponent, selector: "mcl-preview-arquivo", inputs: ["showLoading", "height", "width", "group", "arquivo"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: DownloadArquivoDirective, selector: "[mclDownloadArquivo]", inputs: ["mclDownloadArquivo", "target"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }] });
908
+ }
909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadComponent, decorators: [{
910
+ type: Component,
911
+ args: [{ selector: 'mcl-input-fileupload', imports: [
912
+ MatChipGrid,
913
+ MatChip,
914
+ NgClass,
915
+ MatProgressSpinner,
916
+ MatIcon,
917
+ PreviewArquivoComponent,
918
+ MatIconButton,
919
+ MatPrefix,
920
+ DownloadArquivoDirective,
921
+ MatInput,
922
+ MatTooltip,
923
+ MatSuffix
924
+ ], providers: [
925
+ {
926
+ provide: MatFormFieldControl,
927
+ useExisting: InputFileUploadComponent
928
+ }
929
+ ], template: "@if (multiple && template == 'chips') {\r\n <div class=\"chips\">\r\n @if (value?.length) {\r\n <mat-chip-grid>\r\n @for (arquivo of value; track arquivo) {\r\n <mat-chip [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n {{ arquivo.nome || arquivo.filename }}\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </mat-chip>\r\n }\r\n </mat-chip-grid>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (multiple && template == 'preview') {\r\n <div class=\"previews\">\r\n @if (value?.length) {\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"20px\" fxFlexAlign=\"center\">\r\n @for (arquivo of value; track arquivo) {\r\n <div>\r\n <div class=\"preview\" [ngClass]=\"{'error':arquivo.loading && arquivo.error,'success':!arquivo.loading}\">\r\n <mcl-preview-arquivo [group]=\"value\" [arquivo]=\"arquivo\"></mcl-preview-arquivo>\r\n\r\n @if (!disabled) {\r\n <div class=\"footer\">\r\n @if (arquivo.loading && !arquivo.error) {\r\n <mat-spinner [value]=\"arquivo.progresso\" [diameter]=\"24\"\r\n ></mat-spinner>\r\n }\r\n @if (arquivo.loading && arquivo.error) {\r\n <mat-icon class=\"error\">remove_circle_outline</mat-icon>\r\n }\r\n @if (!arquivo.loading) {\r\n <mat-icon class=\"success\">check_circle_outline</mat-icon>\r\n }\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n @if (!disabled) {\r\n <a (click)=\"remover(arquivo)\" href=\"javascript:void(0)\">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n }\r\n\r\n @if (value?.length && !disabled) {\r\n <hr/>\r\n }\r\n\r\n @if (!disabled) {\r\n <input type=\"file\" (change)=\"onFileChange($event)\" #input [multiple]=\"multiple\"/>\r\n }\r\n </div>\r\n}\r\n\r\n@if (template == 'manual') {\r\n <div>\r\n <input type=\"file\" [disabled]=\"disabled\" (change)=\"onFileChange($event)\" #input\r\n [multiple]=\"multiple\" style=\"display: none\"/>\r\n </div>\r\n}\r\n\r\n@if (!multiple && template != 'manual') {\r\n <input #input type=\"file\" style=\"display: none\"\r\n (change)=\"onFileChange($event)\"/>\r\n\r\n <div class=\"input\">\r\n @if (!value) {\r\n <button mat-icon-button type=\"button\"\r\n (click)=\"openFileChooser()\"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n }\r\n @if (value && !value.loading && !value.error) {\r\n <button mat-icon-button type=\"button\"\r\n [mclDownloadArquivo]=\"value\"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if (value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefixdisabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n }\r\n @if (value?.loading && !value?.error) {\r\n <button mat-icon-button type=\"button\" matPrefix disabled>\r\n <mat-spinner [value]=\"value.progresso\"\r\n [diameter]=\"24\"></mat-spinner>\r\n </button>\r\n }\r\n @if (!value) {\r\n <input matInput readonly (click)=\"openFileChooser()\" [required]=\"required\"\r\n value=\"Selecione um arquivo...\"/>\r\n }\r\n @if (value && value.loading && !value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n value=\"Submetendo arquivo...\"/>\r\n }\r\n @if (value && value.error) {\r\n <input matInput readonly [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && !value.loading) {\r\n <input matInput readonly [mclDownloadArquivo]=\"value\" [required]=\"required\"\r\n [value]=\"value?.nome || value?.filename\"/>\r\n }\r\n @if (value && (!value.loading || value?.error) && !disabled) {\r\n <button mat-icon-button type=\"button\" matSuffix\r\n matTooltip=\"Remover\" (click)=\"remover(value)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: ["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}mat-chip>mat-spinner,mat-chip>mat-icon,.preview .footer>mat-spinner,.preview .footer>mat-icon{margin-right:5px;vertical-align:middle}mat-chip a,.preview .footer a{padding:5px}mat-chip a mat-icon,.preview .footer a mat-icon{margin-left:10px;vertical-align:middle}mat-chip.error,.preview.error{color:red}mat-chip.success,.preview.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer mat-icon,.preview .footer a{flex:1}.input{display:flex}.input input{flex:1 1 auto}\n"] }]
930
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
931
+ type: Optional
932
+ }, {
933
+ type: Self
934
+ }] }, { type: i2.NgForm, decorators: [{
935
+ type: Optional
936
+ }] }, { type: i0.ChangeDetectorRef }, { type: i2.FormGroupDirective, decorators: [{
937
+ type: Optional
938
+ }] }, { type: undefined, decorators: [{
939
+ type: Inject,
940
+ args: [ARQUIVO_MANAGER_SERVICE]
941
+ }] }], propDecorators: { multiple: [{
942
+ type: Input
943
+ }], limite: [{
944
+ type: Input
945
+ }], accept: [{
946
+ type: Input
947
+ }], template: [{
948
+ type: Input
949
+ }], agrupadores: [{
950
+ type: Input
951
+ }], input: [{
952
+ type: ViewChild,
953
+ args: ['input']
954
+ }], selectCancel: [{
955
+ type: Output
956
+ }], stateChanges: [{
957
+ type: Output,
958
+ args: ['change']
959
+ }], change: [{
960
+ type: Output
961
+ }], id: [{
962
+ type: HostBinding
963
+ }], describedBy: [{
964
+ type: HostBinding,
965
+ args: ['attr.aria-describedby']
966
+ }], shouldLabelFloat: [{
967
+ type: HostBinding,
968
+ args: ['class.floating']
969
+ }], placeholder: [{
970
+ type: Input
971
+ }], required: [{
972
+ type: Input
973
+ }], disabled: [{
974
+ type: Input
975
+ }] } });
976
+
977
+ class InputFileUploadValidatorDirective {
978
+ multiple = false;
979
+ validate(control) {
980
+ if (control.value) {
981
+ if (this.multiple && Array.isArray(control.value)) {
982
+ const error = control.value.find(a => a.loading && a.error);
983
+ if (error) {
984
+ return error.error;
985
+ }
986
+ if (control.value.find(a => a.loading)) {
987
+ return { fileUploading: true };
988
+ }
989
+ }
990
+ else if (control.value.loading && control.value.error) {
991
+ return control.value.error;
992
+ }
993
+ else if (control.value.loading) {
994
+ return { fileUploading: true };
995
+ }
996
+ }
997
+ return null;
998
+ }
999
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1000
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: InputFileUploadValidatorDirective, isStandalone: true, selector: "mcl-input-fileupload,[mclFileupload]", inputs: { multiple: "multiple" }, providers: [{ provide: NG_VALIDATORS, useExisting: InputFileUploadValidatorDirective, multi: true }], ngImport: i0 });
1001
+ }
1002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputFileUploadValidatorDirective, decorators: [{
1003
+ type: Directive,
1004
+ args: [{
1005
+ selector: 'mcl-input-fileupload,[mclFileupload]',
1006
+ providers: [{ provide: NG_VALIDATORS, useExisting: InputFileUploadValidatorDirective, multi: true }]
1007
+ }]
1008
+ }], propDecorators: { multiple: [{
1009
+ type: Input
1010
+ }] } });
1011
+
1012
+ class InputCnpjComponent extends InputMaskComponent {
1013
+ optionProvider;
1014
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1015
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1016
+ this.optionProvider = optionProvider;
1017
+ this.mask = '##.###.###/####-##';
1018
+ }
1019
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCnpjComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1020
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCnpjComponent, isStandalone: true, selector: "mcl-input[cnpj]", providers: [{
1021
+ provide: NG_VALUE_ACCESSOR,
1022
+ useExisting: forwardRef(() => InputCnpjComponent),
1023
+ multi: true
1024
+ }, {
1025
+ provide: NG_VALIDATORS,
1026
+ useExisting: forwardRef(() => InputCnpjComponent),
1027
+ multi: true
1028
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
1029
+ }
1030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCnpjComponent, decorators: [{
1031
+ type: Component,
1032
+ args: [{ selector: 'mcl-input[cnpj]', imports: [
1033
+ MatInput,
1034
+ FormsModule
1035
+ ], providers: [{
1036
+ provide: NG_VALUE_ACCESSOR,
1037
+ useExisting: forwardRef(() => InputCnpjComponent),
1038
+ multi: true
1039
+ }, {
1040
+ provide: NG_VALIDATORS,
1041
+ useExisting: forwardRef(() => InputCnpjComponent),
1042
+ multi: true
1043
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1044
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1045
+ type: Optional
1046
+ }, {
1047
+ type: Self
1048
+ }] }, { type: i2.NgForm, decorators: [{
1049
+ type: Optional
1050
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1051
+ type: Optional
1052
+ }] }, { type: undefined, decorators: [{
1053
+ type: Self
1054
+ }, {
1055
+ type: Optional
1056
+ }, {
1057
+ type: Inject,
1058
+ args: [SELECT_OPTION_PROVIDER]
1059
+ }] }] });
1060
+
1061
+ class InputCepComponent extends InputMaskComponent {
1062
+ optionProvider;
1063
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1064
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1065
+ this.optionProvider = optionProvider;
1066
+ this.mask = '##.###-###';
1067
+ }
1068
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCepComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1069
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCepComponent, isStandalone: true, selector: "mcl-input[cep]", providers: [{
1070
+ provide: NG_VALUE_ACCESSOR,
1071
+ useExisting: forwardRef(() => InputCepComponent),
1072
+ multi: true
1073
+ }, {
1074
+ provide: NG_VALIDATORS,
1075
+ useExisting: forwardRef(() => InputCepComponent),
1076
+ multi: true
1077
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
1078
+ }
1079
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCepComponent, decorators: [{
1080
+ type: Component,
1081
+ args: [{ selector: 'mcl-input[cep]', imports: [
1082
+ MatInput,
1083
+ FormsModule
1084
+ ], providers: [{
1085
+ provide: NG_VALUE_ACCESSOR,
1086
+ useExisting: forwardRef(() => InputCepComponent),
1087
+ multi: true
1088
+ }, {
1089
+ provide: NG_VALIDATORS,
1090
+ useExisting: forwardRef(() => InputCepComponent),
1091
+ multi: true
1092
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1093
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1094
+ type: Optional
1095
+ }, {
1096
+ type: Self
1097
+ }] }, { type: i2.NgForm, decorators: [{
1098
+ type: Optional
1099
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1100
+ type: Optional
1101
+ }] }, { type: undefined, decorators: [{
1102
+ type: Self
1103
+ }, {
1104
+ type: Optional
1105
+ }, {
1106
+ type: Inject,
1107
+ args: [SELECT_OPTION_PROVIDER]
1108
+ }] }] });
1109
+
1110
+ class InputCpfCnpjComponent extends InputMaskComponent {
1111
+ get value() {
1112
+ return super.value;
1113
+ }
1114
+ set value(value) {
1115
+ const unmasked = this.removeMask(value);
1116
+ if (!!unmasked) {
1117
+ if (unmasked.length > 11) {
1118
+ this.mask = '##.###.###/####-##';
1119
+ }
1120
+ else {
1121
+ this.mask = '###.###.###-##';
1122
+ }
1123
+ super.value = value;
1124
+ }
1125
+ }
1126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfCnpjComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1127
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCpfCnpjComponent, isStandalone: true, selector: "mcl-input[cpfCnpj]", providers: [{
1128
+ provide: NG_VALUE_ACCESSOR,
1129
+ useExisting: forwardRef(() => InputCpfCnpjComponent),
1130
+ multi: true
1131
+ }, {
1132
+ provide: NG_VALIDATORS,
1133
+ useExisting: forwardRef(() => InputCpfCnpjComponent),
1134
+ multi: true
1135
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
1136
+ }
1137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfCnpjComponent, decorators: [{
1138
+ type: Component,
1139
+ args: [{ selector: 'mcl-input[cpfCnpj]', imports: [
1140
+ MatInput,
1141
+ FormsModule
1142
+ ], providers: [{
1143
+ provide: NG_VALUE_ACCESSOR,
1144
+ useExisting: forwardRef(() => InputCpfCnpjComponent),
1145
+ multi: true
1146
+ }, {
1147
+ provide: NG_VALIDATORS,
1148
+ useExisting: forwardRef(() => InputCpfCnpjComponent),
1149
+ multi: true
1150
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1151
+ }] });
1152
+
1153
+ class InputCpfComponent extends InputMaskComponent {
1154
+ optionProvider;
1155
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1156
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1157
+ this.optionProvider = optionProvider;
1158
+ this.mask = '###.###.###-##';
1159
+ }
1160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1161
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputCpfComponent, isStandalone: true, selector: "mcl-input[cpf]", providers: [{
1162
+ provide: NG_VALUE_ACCESSOR,
1163
+ useExisting: forwardRef(() => InputCpfComponent),
1164
+ multi: true
1165
+ }, {
1166
+ provide: NG_VALIDATORS,
1167
+ useExisting: forwardRef(() => InputCpfComponent),
1168
+ multi: true
1169
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
1170
+ }
1171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputCpfComponent, decorators: [{
1172
+ type: Component,
1173
+ args: [{ selector: 'mcl-input[cpf]', imports: [
1174
+ MatInput,
1175
+ FormsModule
1176
+ ], providers: [{
1177
+ provide: NG_VALUE_ACCESSOR,
1178
+ useExisting: forwardRef(() => InputCpfComponent),
1179
+ multi: true
1180
+ }, {
1181
+ provide: NG_VALIDATORS,
1182
+ useExisting: forwardRef(() => InputCpfComponent),
1183
+ multi: true
1184
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1185
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1186
+ type: Optional
1187
+ }, {
1188
+ type: Self
1189
+ }] }, { type: i2.NgForm, decorators: [{
1190
+ type: Optional
1191
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1192
+ type: Optional
1193
+ }] }, { type: undefined, decorators: [{
1194
+ type: Self
1195
+ }, {
1196
+ type: Optional
1197
+ }, {
1198
+ type: Inject,
1199
+ args: [SELECT_OPTION_PROVIDER]
1200
+ }] }] });
1201
+
1202
+ class InputPhoneComponent extends InputMaskComponent {
1203
+ optionProvider;
1204
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1205
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1206
+ this.optionProvider = optionProvider;
1207
+ }
1208
+ applyMask(value) {
1209
+ if (value) {
1210
+ const unmasked = this.removeMask(value);
1211
+ if (unmasked.length > 2 && unmasked[2] === '9') {
1212
+ this.mask = '(##) #####-####';
1213
+ }
1214
+ else {
1215
+ this.mask = '(##) ####-####';
1216
+ }
1217
+ }
1218
+ return super.applyMask(value);
1219
+ }
1220
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputPhoneComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1221
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputPhoneComponent, isStandalone: true, selector: "mcl-input[phone]", providers: [{
1222
+ provide: NG_VALUE_ACCESSOR,
1223
+ useExisting: forwardRef(() => InputPhoneComponent),
1224
+ multi: true
1225
+ }, {
1226
+ provide: NG_VALIDATORS,
1227
+ useExisting: forwardRef(() => InputPhoneComponent),
1228
+ multi: true
1229
+ }], usesInheritance: true, ngImport: i0, template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n", styles: [""], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { 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"] }] });
1230
+ }
1231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputPhoneComponent, decorators: [{
1232
+ type: Component,
1233
+ args: [{ selector: 'mcl-input[phone]', imports: [
1234
+ MatInput,
1235
+ FormsModule
1236
+ ], providers: [{
1237
+ provide: NG_VALUE_ACCESSOR,
1238
+ useExisting: forwardRef(() => InputPhoneComponent),
1239
+ multi: true
1240
+ }, {
1241
+ provide: NG_VALIDATORS,
1242
+ useExisting: forwardRef(() => InputPhoneComponent),
1243
+ multi: true
1244
+ }], template: "<input matInput [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n (focusin)=\"onTouched()\"/>\n" }]
1245
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1246
+ type: Optional
1247
+ }, {
1248
+ type: Self
1249
+ }] }, { type: i2.NgForm, decorators: [{
1250
+ type: Optional
1251
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1252
+ type: Optional
1253
+ }] }, { type: undefined, decorators: [{
1254
+ type: Self
1255
+ }, {
1256
+ type: Optional
1257
+ }, {
1258
+ type: Inject,
1259
+ args: [SELECT_OPTION_PROVIDER]
1260
+ }] }] });
1261
+
1262
+ class OptionNode {
1263
+ pool;
1264
+ value;
1265
+ subject;
1266
+ constructor(pool, value, selected = false) {
1267
+ this.pool = pool;
1268
+ this.value = value;
1269
+ this.subject = new BehaviorSubject(selected);
1270
+ }
1271
+ get model() {
1272
+ return this.pool.model();
1273
+ }
1274
+ get observable() {
1275
+ return this.subject;
1276
+ }
1277
+ setSelected(selected) {
1278
+ this.subject.next(selected);
1279
+ }
1280
+ dispose() {
1281
+ this.subject.complete();
1282
+ }
1283
+ touched() {
1284
+ this.pool.touched();
1285
+ }
1286
+ }
1287
+
1288
+ class NodePool {
1289
+ name;
1290
+ _nodes = new BehaviorSubject([]);
1291
+ _touch = new Subject();
1292
+ _groups = [];
1293
+ constructor(name) {
1294
+ this.name = name;
1295
+ }
1296
+ model() {
1297
+ return this._nodes
1298
+ .pipe(switchMap(ns => combineLatest(ns
1299
+ .map(n => n.observable
1300
+ .pipe(map(selected => ({
1301
+ selected,
1302
+ value: n.value
1303
+ })))))))
1304
+ .pipe(map(ops => {
1305
+ const model = ops.filter(o => o.selected).map(o => o.value);
1306
+ return model.length ? model : undefined;
1307
+ }));
1308
+ }
1309
+ touch() {
1310
+ return this._touch;
1311
+ }
1312
+ all() {
1313
+ return this._nodes
1314
+ .pipe(switchMap(ns => combineLatest(ns
1315
+ .map(n => n.observable))))
1316
+ .pipe(map(ops => {
1317
+ if (ops.length) {
1318
+ const first = ops[0];
1319
+ for (const o of ops) {
1320
+ if (o !== first) {
1321
+ return false;
1322
+ }
1323
+ }
1324
+ return !!first;
1325
+ }
1326
+ return false;
1327
+ }));
1328
+ }
1329
+ get empty() {
1330
+ return !this._nodes.value.length && !this._groups.length;
1331
+ }
1332
+ dispose() {
1333
+ this._nodes.complete();
1334
+ this._touch.complete();
1335
+ }
1336
+ touched() {
1337
+ this._touch.next(undefined);
1338
+ }
1339
+ register(value) {
1340
+ const selected = !!this.lastValues && this.lastValues.indexOf(value) >= 0;
1341
+ const node = new OptionNode(this, value, selected);
1342
+ this._nodes.next([
1343
+ ...this._nodes.value,
1344
+ node
1345
+ ]);
1346
+ return node;
1347
+ }
1348
+ unregister(node) {
1349
+ this._nodes.next(this._nodes.value.filter(n => n !== node));
1350
+ node.dispose();
1351
+ }
1352
+ registerGroup(group) {
1353
+ this._groups.push(group);
1354
+ }
1355
+ unregisterGroup(group) {
1356
+ this._groups.splice(this._groups.indexOf(group), 1);
1357
+ }
1358
+ lastValues = [];
1359
+ writeValue(values) {
1360
+ if (values !== this.lastValues) {
1361
+ this.lastValues = values || [];
1362
+ if (values) {
1363
+ this._nodes.value.forEach(n => {
1364
+ n.setSelected(values.indexOf(n.value) >= 0);
1365
+ });
1366
+ }
1367
+ else {
1368
+ this._nodes.value.forEach(n => {
1369
+ n.setSelected(false);
1370
+ });
1371
+ }
1372
+ }
1373
+ }
1374
+ setAll(selected) {
1375
+ this._nodes.value.forEach(m => m.setSelected(selected));
1376
+ }
1377
+ }
1378
+
1379
+ class OptionCheckboxService {
1380
+ nodes = {};
1381
+ getPool(name) {
1382
+ if (!this.nodes[name]) {
1383
+ this.nodes[name] = new NodePool(name);
1384
+ }
1385
+ return this.nodes[name];
1386
+ }
1387
+ registerGroup(name, group) {
1388
+ const pool = this.getPool(name);
1389
+ pool.registerGroup(group);
1390
+ return pool;
1391
+ }
1392
+ unregisterGroup(name, group) {
1393
+ if (this.nodes[name]) {
1394
+ this.nodes[name].unregisterGroup(group);
1395
+ if (this.nodes[name].empty) {
1396
+ this.nodes[name].dispose();
1397
+ delete this.nodes[name];
1398
+ }
1399
+ }
1400
+ }
1401
+ unregister(name, node) {
1402
+ if (this.nodes[name]) {
1403
+ this.nodes[name].unregister(node);
1404
+ if (this.nodes[name].empty) {
1405
+ this.nodes[name].dispose();
1406
+ delete this.nodes[name];
1407
+ }
1408
+ }
1409
+ }
1410
+ register(name, value) {
1411
+ return this.getPool(name).register(value);
1412
+ }
1413
+ setAll(name, selected) {
1414
+ if (this.nodes[name]) {
1415
+ this.nodes[name].setAll(selected);
1416
+ }
1417
+ }
1418
+ writeValue(name, model) {
1419
+ this.getPool(name)?.writeValue(model);
1420
+ }
1421
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1422
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, providedIn: 'root' });
1423
+ }
1424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxService, decorators: [{
1425
+ type: Injectable,
1426
+ args: [{
1427
+ providedIn: 'root'
1428
+ }]
1429
+ }] });
1430
+
1431
+ class AllOptionCheckboxComponent {
1432
+ fotonOptionCheckboxService;
1433
+ _name;
1434
+ disabled = false;
1435
+ change = new EventEmitter();
1436
+ selected;
1437
+ pool;
1438
+ constructor(fotonOptionCheckboxService) {
1439
+ this.fotonOptionCheckboxService = fotonOptionCheckboxService;
1440
+ }
1441
+ get name() {
1442
+ return this._name;
1443
+ }
1444
+ set name(name) {
1445
+ this._name = name;
1446
+ this.pool = this.fotonOptionCheckboxService.getPool(name);
1447
+ this.selected = this.pool.all();
1448
+ }
1449
+ setSelected(selected) {
1450
+ this.pool?.touched();
1451
+ this.fotonOptionCheckboxService.setAll(this.name, selected);
1452
+ this.change.emit();
1453
+ }
1454
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AllOptionCheckboxComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1455
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AllOptionCheckboxComponent, isStandalone: true, selector: "mcl-option-checkbox[select-all-option]", inputs: { disabled: "disabled", name: "name" }, outputs: { change: "change" }, ngImport: i0, template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n", dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: "pipe", type: AsyncPipe, name: "async" }] });
1456
+ }
1457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AllOptionCheckboxComponent, decorators: [{
1458
+ type: Component,
1459
+ args: [{ selector: 'mcl-option-checkbox[select-all-option]', imports: [
1460
+ MatCheckbox,
1461
+ FormsModule,
1462
+ AsyncPipe
1463
+ ], template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n" }]
1464
+ }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1465
+ type: Input
1466
+ }], change: [{
1467
+ type: Output
1468
+ }], name: [{
1469
+ type: Input
1470
+ }] } });
1471
+
1472
+ class OptionCheckboxComponent {
1473
+ fotonOptionCheckboxService;
1474
+ _name;
1475
+ _value;
1476
+ node;
1477
+ selected;
1478
+ disabled = false;
1479
+ change = new EventEmitter();
1480
+ constructor(fotonOptionCheckboxService) {
1481
+ this.fotonOptionCheckboxService = fotonOptionCheckboxService;
1482
+ }
1483
+ setSelected(selected) {
1484
+ if (this.node) {
1485
+ this.node.touched();
1486
+ this.node.setSelected(selected);
1487
+ this.change.emit();
1488
+ }
1489
+ }
1490
+ get value() {
1491
+ return this.node ? this.node.value : undefined;
1492
+ }
1493
+ set value(v) {
1494
+ if (v != this.value) {
1495
+ if (this.node) {
1496
+ this.node.value = v;
1497
+ }
1498
+ else {
1499
+ this._value = v;
1500
+ }
1501
+ }
1502
+ }
1503
+ get name() {
1504
+ return this._name;
1505
+ }
1506
+ set name(n) {
1507
+ if (n !== this.name && !this.node) {
1508
+ this.node = this.fotonOptionCheckboxService.register(n, this._value);
1509
+ this.selected = this.node.observable;
1510
+ this._name = n;
1511
+ }
1512
+ }
1513
+ onBlur() {
1514
+ }
1515
+ ngOnDestroy() {
1516
+ this.fotonOptionCheckboxService.unregister(this.name, this.node);
1517
+ }
1518
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1519
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: OptionCheckboxComponent, isStandalone: true, selector: "mcl-option-checkbox:not([select-all-option])", inputs: { disabled: "disabled", value: "value", name: "name" }, outputs: { change: "change" }, ngImport: i0, template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n", dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: "pipe", type: AsyncPipe, name: "async" }] });
1520
+ }
1521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxComponent, decorators: [{
1522
+ type: Component,
1523
+ args: [{ selector: 'mcl-option-checkbox:not([select-all-option])', imports: [
1524
+ MatCheckbox,
1525
+ FormsModule,
1526
+ AsyncPipe
1527
+ ], template: "<mat-checkbox [disabled]=\"disabled\"\n [ngModel]=\"selected | async\"\n (ngModelChange)=\"setSelected($event)\"\n [indeterminate]=\"(selected | async) === undefined\" >\n <ng-content></ng-content>\n</mat-checkbox>\n" }]
1528
+ }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1529
+ type: Input
1530
+ }], change: [{
1531
+ type: Output
1532
+ }], value: [{
1533
+ type: Input
1534
+ }], name: [{
1535
+ type: Input
1536
+ }] } });
1537
+
1538
+ class OptionCheckboxGroupComponent {
1539
+ optionCheckboxService;
1540
+ callbackTimeout;
1541
+ _name;
1542
+ pool;
1543
+ disabled = false;
1544
+ change = new EventEmitter();
1545
+ touched = new EventEmitter();
1546
+ constructor(optionCheckboxService) {
1547
+ this.optionCheckboxService = optionCheckboxService;
1548
+ }
1549
+ onTouchedCallback = () => {
1550
+ };
1551
+ onChangeCallback = () => {
1552
+ };
1553
+ get name() {
1554
+ return this._name;
1555
+ }
1556
+ set name(n) {
1557
+ if (n !== this.name && !this.pool) {
1558
+ this.pool = this.optionCheckboxService.registerGroup(n, this);
1559
+ this.pool.touch().subscribe(() => {
1560
+ this.onTouchedCallback();
1561
+ this.touched.emit();
1562
+ });
1563
+ this.pool.model().subscribe(model => {
1564
+ clearTimeout(this.callbackTimeout);
1565
+ this.callbackTimeout = setTimeout(() => {
1566
+ this.onChangeCallback(model);
1567
+ this.change.emit(model);
1568
+ });
1569
+ });
1570
+ this._name = n;
1571
+ }
1572
+ }
1573
+ onBlur() {
1574
+ }
1575
+ ngOnDestroy() {
1576
+ this.optionCheckboxService.unregisterGroup(this.name, this);
1577
+ }
1578
+ writeValue(value) {
1579
+ this.optionCheckboxService.writeValue(this.name, value);
1580
+ }
1581
+ registerOnChange(fn) {
1582
+ this.onChangeCallback = fn;
1583
+ }
1584
+ registerOnTouched(fn) {
1585
+ this.onTouchedCallback = fn;
1586
+ }
1587
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxGroupComponent, deps: [{ token: OptionCheckboxService }], target: i0.ɵɵFactoryTarget.Component });
1588
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: OptionCheckboxGroupComponent, isStandalone: true, selector: "mcl-option-checkbox-group", inputs: { disabled: "disabled", name: "name" }, outputs: { change: "change", touched: "touched" }, providers: [
1589
+ {
1590
+ provide: NG_VALUE_ACCESSOR,
1591
+ useExisting: OptionCheckboxGroupComponent,
1592
+ multi: true
1593
+ }
1594
+ ], ngImport: i0, template: '', isInline: true });
1595
+ }
1596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionCheckboxGroupComponent, decorators: [{
1597
+ type: Component,
1598
+ args: [{
1599
+ selector: 'mcl-option-checkbox-group',
1600
+ template: '',
1601
+ providers: [
1602
+ {
1603
+ provide: NG_VALUE_ACCESSOR,
1604
+ useExisting: OptionCheckboxGroupComponent,
1605
+ multi: true
1606
+ }
1607
+ ]
1608
+ }]
1609
+ }], ctorParameters: () => [{ type: OptionCheckboxService }], propDecorators: { disabled: [{
1610
+ type: Input
1611
+ }], change: [{
1612
+ type: Output
1613
+ }], touched: [{
1614
+ type: Output
1615
+ }], name: [{
1616
+ type: Input
1617
+ }] } });
1618
+
1619
+ class SelectChipsComponent extends AbstractMatFormFieldSelectControl {
1620
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1621
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider);
1622
+ }
1623
+ add(event) {
1624
+ this.onTouched();
1625
+ const value = event.value;
1626
+ if (!!value) {
1627
+ this.value = [
1628
+ ...(this.value || []),
1629
+ value
1630
+ ];
1631
+ this.onChange(this.value);
1632
+ }
1633
+ }
1634
+ remove(item) {
1635
+ this.onTouched();
1636
+ if (this.value) {
1637
+ const index = this.value.indexOf(item);
1638
+ if (index >= 0) {
1639
+ this.value.splice(index, 1);
1640
+ }
1641
+ if (!this.value.length) {
1642
+ this.value = undefined;
1643
+ }
1644
+ this.onChange(this.value);
1645
+ }
1646
+ }
1647
+ selected(event) {
1648
+ this.onTouched();
1649
+ if (!this.value || !this.value.find((v) => v === event.option.value)) {
1650
+ this.value = [
1651
+ ...(this.value || []),
1652
+ event.option.value
1653
+ ];
1654
+ this.onChange(this.value);
1655
+ }
1656
+ this.control.setValue('');
1657
+ }
1658
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectChipsComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1659
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectChipsComponent, isStandalone: true, selector: "mcl-select-chips", providers: [
1660
+ {
1661
+ provide: MatFormFieldControl,
1662
+ useExisting: SelectChipsComponent
1663
+ }
1664
+ ], usesInheritance: true, ngImport: i0, template: "<mat-chip-grid #chipList>\n @for (item of value; track doTrackBy(value)) {\n <mat-chip\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\">\n {{ item }}\n @if (!disabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip>\n }\n <input\n [placeholder]=\"placeholder\" required\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\"\n [formControl]=\"control\"\n [matAutocomplete]=\"filterAutocomplete\"\n [matChipInputFor]=\"chipList\"\n (matChipInputTokenEnd)=\"add($event)\">\n</mat-chip-grid>\n<mat-autocomplete #filterAutocomplete=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [""], dependencies: [{ kind: "component", type: MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
1665
+ }
1666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectChipsComponent, decorators: [{
1667
+ type: Component,
1668
+ args: [{ selector: 'mcl-select-chips', imports: [
1669
+ MatChip,
1670
+ MatIcon,
1671
+ ReactiveFormsModule,
1672
+ MatAutocompleteTrigger,
1673
+ MatChipInput,
1674
+ MatChipGrid,
1675
+ AsyncPipe,
1676
+ MatAutocomplete,
1677
+ MatOption,
1678
+ ], providers: [
1679
+ {
1680
+ provide: MatFormFieldControl,
1681
+ useExisting: SelectChipsComponent
1682
+ }
1683
+ ], template: "<mat-chip-grid #chipList>\n @for (item of value; track doTrackBy(value)) {\n <mat-chip\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\">\n {{ item }}\n @if (!disabled) {\n <mat-icon matChipRemove>cancel</mat-icon>\n }\n </mat-chip>\n }\n <input\n [placeholder]=\"placeholder\" required\n (focusin)=\"focused = true\"\n (focusout)=\"focused = false\"\n [formControl]=\"control\"\n [matAutocomplete]=\"filterAutocomplete\"\n [matChipInputFor]=\"chipList\"\n (matChipInputTokenEnd)=\"add($event)\">\n</mat-chip-grid>\n<mat-autocomplete #filterAutocomplete=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n" }]
1684
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1685
+ type: Optional
1686
+ }, {
1687
+ type: Self
1688
+ }] }, { type: i2.NgForm, decorators: [{
1689
+ type: Optional
1690
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1691
+ type: Optional
1692
+ }] }, { type: undefined, decorators: [{
1693
+ type: Self
1694
+ }, {
1695
+ type: Optional
1696
+ }, {
1697
+ type: Inject,
1698
+ args: [SELECT_OPTION_PROVIDER]
1699
+ }] }] });
1700
+
1701
+ class SelectAutocompleteComponent extends AbstractMatFormFieldSelectControl {
1702
+ readonly;
1703
+ select = new EventEmitter();
1704
+ blur = new EventEmitter();
1705
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1706
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider);
1707
+ }
1708
+ get shouldLabelFloat() {
1709
+ return this.focused || !this.empty;
1710
+ }
1711
+ get empty() {
1712
+ return !this.value;
1713
+ }
1714
+ onFocus() {
1715
+ this.focused = true;
1716
+ this.stateChanges.next();
1717
+ }
1718
+ onBlur() {
1719
+ this.focused = false;
1720
+ this.stateChanges.next();
1721
+ this.blur.emit();
1722
+ }
1723
+ didTouch() {
1724
+ this.onTouched();
1725
+ }
1726
+ ngOnDestroy() {
1727
+ super.ngOnDestroy();
1728
+ this.optionsSubscription?.unsubscribe();
1729
+ }
1730
+ setDisabledState(isDisabled) {
1731
+ this.disabled = isDisabled;
1732
+ if (isDisabled) {
1733
+ this.control.disable();
1734
+ }
1735
+ else {
1736
+ this.control.enable();
1737
+ }
1738
+ }
1739
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1740
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectAutocompleteComponent, isStandalone: true, selector: "mcl-select-autocomplete", inputs: { readonly: "readonly" }, outputs: { select: "select", blur: "blur" }, providers: [
1741
+ {
1742
+ provide: MatFormFieldControl,
1743
+ useExisting: SelectAutocompleteComponent
1744
+ }
1745
+ ], usesInheritance: true, ngImport: i0, template: "<input matInput name=\"autocomplete\" autocomplete=\"off\"\n [formControl]=\"control\" [matAutocomplete]=\"autocompleteGeneric\"\n (keyup)=\"didTouch()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\n [disabled]=\"disabled\" [readonly]=\"readonly\"/>\n<mat-autocomplete #autocompleteGeneric=\"matAutocomplete\"\n (optionSelected)=\"seleciona($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [".mat-option{line-height:inherit;height:inherit}h3{color:#333;margin:5px;white-space:nowrap;font-size:16px}p{color:#666;margin:5px;white-space:nowrap;font-size:12px}\n"], dependencies: [{ kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1746
+ }
1747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, decorators: [{
1748
+ type: Component,
1749
+ args: [{ selector: 'mcl-select-autocomplete', imports: [
1750
+ MatInput,
1751
+ MatAutocompleteTrigger,
1752
+ ReactiveFormsModule,
1753
+ MatAutocomplete,
1754
+ MatOption,
1755
+ AsyncPipe
1756
+ ], providers: [
1757
+ {
1758
+ provide: MatFormFieldControl,
1759
+ useExisting: SelectAutocompleteComponent
1760
+ }
1761
+ ], template: "<input matInput name=\"autocomplete\" autocomplete=\"off\"\n [formControl]=\"control\" [matAutocomplete]=\"autocompleteGeneric\"\n (keyup)=\"didTouch()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\n [disabled]=\"disabled\" [readonly]=\"readonly\"/>\n<mat-autocomplete #autocompleteGeneric=\"matAutocomplete\"\n (optionSelected)=\"seleciona($event)\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-option [value]=\"opcao.value\">\n {{ opcao.label }}\n </mat-option>\n }\n</mat-autocomplete>\n", styles: [".mat-option{line-height:inherit;height:inherit}h3{color:#333;margin:5px;white-space:nowrap;font-size:16px}p{color:#666;margin:5px;white-space:nowrap;font-size:12px}\n"] }]
1762
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1763
+ type: Optional
1764
+ }, {
1765
+ type: Self
1766
+ }] }, { type: i2.NgForm, decorators: [{
1767
+ type: Optional
1768
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1769
+ type: Optional
1770
+ }] }, { type: undefined, decorators: [{
1771
+ type: Self
1772
+ }, {
1773
+ type: Optional
1774
+ }, {
1775
+ type: Inject,
1776
+ args: [SELECT_OPTION_PROVIDER]
1777
+ }] }], propDecorators: { readonly: [{
1778
+ type: Input
1779
+ }], select: [{
1780
+ type: Output
1781
+ }], blur: [{
1782
+ type: Output
1783
+ }] } });
1784
+
1785
+ class DelegateOptionProviderDirective {
1786
+ delegate;
1787
+ type() {
1788
+ return this.delegate?.type() || 'string';
1789
+ }
1790
+ provide(search) {
1791
+ return this.delegate.provide(search);
1792
+ }
1793
+ label(value) {
1794
+ return this.delegate.label(value);
1795
+ }
1796
+ trackBy(value) {
1797
+ if (!!this.delegate?.trackBy) {
1798
+ return this.delegate.trackBy(value);
1799
+ }
1800
+ return value;
1801
+ }
1802
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DelegateOptionProviderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1803
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: DelegateOptionProviderDirective, isStandalone: true, selector: "mcl-select-autocomplete[delegate]", inputs: { delegate: "delegate" }, providers: [{
1804
+ provide: SELECT_OPTION_PROVIDER,
1805
+ useExisting: DelegateOptionProviderDirective,
1806
+ }], ngImport: i0 });
1807
+ }
1808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DelegateOptionProviderDirective, decorators: [{
1809
+ type: Directive,
1810
+ args: [{
1811
+ selector: 'mcl-select-autocomplete[delegate]',
1812
+ providers: [{
1813
+ provide: SELECT_OPTION_PROVIDER,
1814
+ useExisting: DelegateOptionProviderDirective,
1815
+ }]
1816
+ }]
1817
+ }], propDecorators: { delegate: [{
1818
+ type: Input
1819
+ }] } });
1820
+
1821
+ class SelectManyCheckboxComponent extends AbstractMatFormFieldSelectControl {
1822
+ layout = 'grid';
1823
+ layoutColumns = 3;
1824
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1825
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider);
1826
+ }
1827
+ selected(value) {
1828
+ return !!this.value?.find((v) => v === value);
1829
+ }
1830
+ change(value, checked) {
1831
+ if (checked) {
1832
+ if (!this.selected(value)) {
1833
+ this.value = [
1834
+ ...(this.value || []),
1835
+ value
1836
+ ];
1837
+ }
1838
+ }
1839
+ else if (this.selected(value)) {
1840
+ this.value = [
1841
+ ...(this.value || []).filter((v) => v !== value),
1842
+ ];
1843
+ }
1844
+ }
1845
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectManyCheckboxComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1846
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectManyCheckboxComponent, isStandalone: true, selector: "mcl-select-many-checkbox", inputs: { layout: "layout", layoutColumns: "layoutColumns" }, providers: [
1847
+ {
1848
+ provide: MatFormFieldControl,
1849
+ useExisting: SelectManyCheckboxComponent
1850
+ }
1851
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? ((((filteredOptions | async)!.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"selected(opcao.value)\"\n (change)=\"change(opcao.value, $event.checked)\">\n {{ opcao.label }}\n </mat-checkbox>\n }\n</div>\n", styles: [".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width: 750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1852
+ }
1853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectManyCheckboxComponent, decorators: [{
1854
+ type: Component,
1855
+ args: [{ selector: 'mcl-select-many-checkbox', imports: [
1856
+ NgClass,
1857
+ NgStyle,
1858
+ MatCheckbox,
1859
+ AsyncPipe
1860
+ ], providers: [
1861
+ {
1862
+ provide: MatFormFieldControl,
1863
+ useExisting: SelectManyCheckboxComponent
1864
+ }
1865
+ ], template: "<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? ((((filteredOptions | async)!.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"selected(opcao.value)\"\n (change)=\"change(opcao.value, $event.checked)\">\n {{ opcao.label }}\n </mat-checkbox>\n }\n</div>\n", styles: [".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width: 750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical,.mat-checkbox-container.grid{flex-direction:column}}\n"] }]
1866
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1867
+ type: Optional
1868
+ }, {
1869
+ type: Self
1870
+ }] }, { type: i2.NgForm, decorators: [{
1871
+ type: Optional
1872
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1873
+ type: Optional
1874
+ }] }, { type: undefined, decorators: [{
1875
+ type: Self
1876
+ }, {
1877
+ type: Optional
1878
+ }, {
1879
+ type: Inject,
1880
+ args: [SELECT_OPTION_PROVIDER]
1881
+ }] }], propDecorators: { layout: [{
1882
+ type: Input
1883
+ }], layoutColumns: [{
1884
+ type: Input
1885
+ }] } });
1886
+
1887
+ class SelectRadioComponent extends AbstractMatFormFieldSelectControl {
1888
+ layout = 'vertical';
1889
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider) {
1890
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup, optionProvider);
1891
+ }
1892
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectRadioComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: SELECT_OPTION_PROVIDER, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1893
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectRadioComponent, isStandalone: true, selector: "mcl-select-radio", inputs: { layout: "layout" }, providers: [
1894
+ {
1895
+ provide: MatFormFieldControl,
1896
+ useExisting: SelectRadioComponent
1897
+ }
1898
+ ], usesInheritance: true, ngImport: i0, template: "<mat-radio-group\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal'}\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\">\n\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-radio-button [value]=\"opcao.value\">{{ opcao.label }}</mat-radio-button>\n }\n\n</mat-radio-group>\n", styles: ["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width: 750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}\n"], dependencies: [{ kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1899
+ }
1900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectRadioComponent, decorators: [{
1901
+ type: Component,
1902
+ args: [{ selector: 'mcl-select-radio', imports: [
1903
+ MatRadioGroup,
1904
+ NgClass,
1905
+ FormsModule,
1906
+ MatRadioButton,
1907
+ AsyncPipe
1908
+ ], providers: [
1909
+ {
1910
+ provide: MatFormFieldControl,
1911
+ useExisting: SelectRadioComponent
1912
+ }
1913
+ ], template: "<mat-radio-group\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal'}\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\">\n\n @for (opcao of filteredOptions | async; track doTrackBy(opcao.value)) {\n <mat-radio-button [value]=\"opcao.value\">{{ opcao.label }}</mat-radio-button>\n }\n\n</mat-radio-group>\n", styles: ["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width: 750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}\n"] }]
1914
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1915
+ type: Optional
1916
+ }, {
1917
+ type: Self
1918
+ }] }, { type: i2.NgForm, decorators: [{
1919
+ type: Optional
1920
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1921
+ type: Optional
1922
+ }] }, { type: undefined, decorators: [{
1923
+ type: Self
1924
+ }, {
1925
+ type: Optional
1926
+ }, {
1927
+ type: Inject,
1928
+ args: [SELECT_OPTION_PROVIDER]
1929
+ }] }], propDecorators: { layout: [{
1930
+ type: Input
1931
+ }] } });
1932
+
1933
+ class InputTelefoneInternacionalComponent extends AbstractMatFormFieldControl {
1934
+ preferredContries = ['br'];
1935
+ readonly;
1936
+ blur = new EventEmitter();
1937
+ alwaysShowCountry = false;
1938
+ telInput;
1939
+ $innerValue;
1940
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1941
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1942
+ }
1943
+ get value() {
1944
+ return this.$innerValue;
1945
+ }
1946
+ set value(value) {
1947
+ this.$innerValue = value;
1948
+ this.stateChanges.next();
1949
+ this.onChange(value?.replace(/[^\d+]/g, ''));
1950
+ }
1951
+ get shouldLabelFloat() {
1952
+ return this.focused || !this.empty || this.alwaysShowCountry;
1953
+ }
1954
+ get empty() {
1955
+ return !this.value;
1956
+ }
1957
+ onFocus() {
1958
+ this.focused = true;
1959
+ this.stateChanges.next();
1960
+ }
1961
+ onBlur() {
1962
+ this.focused = false;
1963
+ this.stateChanges.next();
1964
+ this.blur.emit();
1965
+ }
1966
+ writeValue(value) {
1967
+ this.value = value;
1968
+ }
1969
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalComponent, deps: [{ token: i1.ErrorStateMatcher }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1970
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputTelefoneInternacionalComponent, isStandalone: true, selector: "mcl-input-telefone-intl", inputs: { preferredContries: "preferredContries", readonly: "readonly", alwaysShowCountry: "alwaysShowCountry" }, outputs: { blur: "blur" }, providers: [
1971
+ {
1972
+ provide: MatFormFieldControl,
1973
+ useExisting: InputTelefoneInternacionalComponent
1974
+ },
1975
+ ], viewQueries: [{ propertyName: "telInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"input\">\n <lac-mat-country-selector\n [ngClass]=\"{'hidden': !focused && !value && !alwaysShowCountry}\"\n [preferredCountries]=\"preferredContries\"\n [selectorFor]=\"input\"\n searchPlaceholder=\"Filtrar paises...\"></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]=\"value\"\n (focusin)=\"onFocus()\" (focusout)=\"onBlur()\"></lac-mat-tel-input>\n</div>\n", styles: [".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}\n"], dependencies: [{ kind: "ngmodule", type: LacMatTelInputModule }, { kind: "component", type: i3$1.LacMatTelInputComponent, selector: "lac-mat-tel-input", inputs: ["required", "disabled", "internationalFormat"], outputs: ["blur"] }, { kind: "component", type: i3$1.LacMatCountrySelectorComponent, selector: "lac-mat-country-selector", inputs: ["selectorFor", "preferredCountries", "onlyCountries", "showDialCode", "disableSearch", "searchPlaceholder"], outputs: ["change"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"] }] });
1976
+ }
1977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalComponent, decorators: [{
1978
+ type: Component,
1979
+ args: [{ selector: 'mcl-input-telefone-intl', imports: [
1980
+ LacMatTelInputModule,
1981
+ NgClass,
1982
+ FormsModule
1983
+ ], providers: [
1984
+ {
1985
+ provide: MatFormFieldControl,
1986
+ useExisting: InputTelefoneInternacionalComponent
1987
+ },
1988
+ ], template: "<div class=\"input\">\n <lac-mat-country-selector\n [ngClass]=\"{'hidden': !focused && !value && !alwaysShowCountry}\"\n [preferredCountries]=\"preferredContries\"\n [selectorFor]=\"input\"\n searchPlaceholder=\"Filtrar paises...\"></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]=\"value\"\n (focusin)=\"onFocus()\" (focusout)=\"onBlur()\"></lac-mat-tel-input>\n</div>\n", styles: [".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}\n"] }]
1989
+ }], ctorParameters: () => [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1990
+ type: Optional
1991
+ }, {
1992
+ type: Self
1993
+ }] }, { type: i2.NgForm, decorators: [{
1994
+ type: Optional
1995
+ }] }, { type: i2.FormGroupDirective, decorators: [{
1996
+ type: Optional
1997
+ }] }], propDecorators: { preferredContries: [{
1998
+ type: Input
1999
+ }], readonly: [{
2000
+ type: Input
2001
+ }], blur: [{
2002
+ type: Output
2003
+ }], alwaysShowCountry: [{
2004
+ type: Input
2005
+ }], telInput: [{
2006
+ type: ViewChild,
2007
+ args: ['input']
2008
+ }] } });
2009
+
2010
+ class InputTelefoneInternacionalValidatorDirective {
2011
+ constructor() {
2012
+ }
2013
+ validate(control) {
2014
+ return phoneNumberValidator(control);
2015
+ }
2016
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2017
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: InputTelefoneInternacionalValidatorDirective, isStandalone: true, selector: "mcl-input-telefone-intl,[mclInputTelefoneIntl]", providers: [{
2018
+ provide: NG_VALIDATORS,
2019
+ useExisting: InputTelefoneInternacionalValidatorDirective,
2020
+ multi: true,
2021
+ }], ngImport: i0 });
2022
+ }
2023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, decorators: [{
2024
+ type: Directive,
2025
+ args: [{
2026
+ selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
2027
+ providers: [{
2028
+ provide: NG_VALIDATORS,
2029
+ useExisting: InputTelefoneInternacionalValidatorDirective,
2030
+ multi: true,
2031
+ }]
2032
+ }]
2033
+ }], ctorParameters: () => [] });
2034
+
2035
+ /**
2036
+ * Generated bundle index. Do not edit.
2037
+ */
2038
+
2039
+ export { AbstractMatFormFieldControl, AbstractMatFormFieldSelectControl, AllOptionCheckboxComponent, DelegateOptionProviderDirective, InputCepComponent, InputCnpjComponent, InputCpfCnpjComponent, InputCpfComponent, InputCurrencyComponent, InputDatetimeComponent, InputFileUploadComponent, InputFileUploadValidatorDirective, InputMaskComponent, InputPhoneComponent, InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, SELECT_OPTION_PROVIDER, SelectAutocompleteComponent, SelectChipsComponent, SelectManyCheckboxComponent, SelectOptionComponent, SelectRadioComponent };
2040
+ //# sourceMappingURL=main-class-componentes-input.mjs.map