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