@main-class/componentes 2.2.1 → 3.0.0

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