@main-class/componentes 2.1.9 → 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 (341) 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 -9
  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 -22
  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-item/select-item.component.mjs +0 -19
  178. package/esm2020/input/src/select-item/select-item.module.mjs +0 -20
  179. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.component.mjs +0 -170
  180. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.module.mjs +0 -32
  181. package/esm2020/input/src/select-radio/select-radio.component.mjs +0 -143
  182. package/esm2020/input/src/select-radio/select-radio.module.mjs +0 -32
  183. package/esm2020/loader/index.mjs +0 -4
  184. package/esm2020/loader/main-class-componentes-loader.mjs +0 -5
  185. package/esm2020/loader/src/loader.component.mjs +0 -125
  186. package/esm2020/loader/src/loader.module.mjs +0 -37
  187. package/esm2020/loader/src/loader.service.mjs +0 -72
  188. package/esm2020/main-class-componentes.mjs +0 -5
  189. package/esm2020/misc/index.mjs +0 -27
  190. package/esm2020/misc/main-class-componentes-misc.mjs +0 -5
  191. package/esm2020/misc/src/cnpj/cnpj-model.directive.mjs +0 -17
  192. package/esm2020/misc/src/cnpj/cnpj.directive.mjs +0 -36
  193. package/esm2020/misc/src/cnpj/cnpj.module.mjs +0 -26
  194. package/esm2020/misc/src/cnpj/cnpjs.pipe.mjs +0 -19
  195. package/esm2020/misc/src/cpf/cpf-model.directive.mjs +0 -17
  196. package/esm2020/misc/src/cpf/cpf.directive.mjs +0 -36
  197. package/esm2020/misc/src/cpf/cpf.module.mjs +0 -24
  198. package/esm2020/misc/src/cpf/cpf.pipe.mjs +0 -19
  199. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj-model.directive.mjs +0 -29
  200. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.directive.mjs +0 -37
  201. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.module.mjs +0 -24
  202. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.pipe.mjs +0 -22
  203. package/esm2020/misc/src/info/info.component.mjs +0 -20
  204. package/esm2020/misc/src/info/info.module.mjs +0 -24
  205. package/esm2020/misc/src/monetario/monetario-mask.mjs +0 -32
  206. package/esm2020/misc/src/monetario/monetario-model.directive.mjs +0 -133
  207. package/esm2020/misc/src/monetario/monetario.module.mjs +0 -21
  208. package/esm2020/misc/src/monetario/monetario.pipe.mjs +0 -17
  209. package/esm2020/misc/src/porcentagem/porcentagem-mask.mjs +0 -32
  210. package/esm2020/misc/src/porcentagem/porcentagem-model.directive.mjs +0 -108
  211. package/esm2020/misc/src/porcentagem/porcentagem.module.mjs +0 -21
  212. package/esm2020/misc/src/porcentagem/porcentagem.pipe.mjs +0 -17
  213. package/esm2020/misc/src/telefone/telefone-model.directive.mjs +0 -29
  214. package/esm2020/misc/src/telefone/telefone.module.mjs +0 -25
  215. package/esm2020/misc/src/telefone/telefone.pipe.mjs +0 -37
  216. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.directive.mjs +0 -25
  217. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.module.mjs +0 -20
  218. package/esm2020/model/index.mjs +0 -3
  219. package/esm2020/model/main-class-componentes-model.mjs +0 -5
  220. package/esm2020/model/src/masked-model.directive.mjs +0 -155
  221. package/esm2020/model/src/model.module.mjs +0 -24
  222. package/esm2020/pipe/index.mjs +0 -3
  223. package/esm2020/pipe/main-class-componentes-pipe.mjs +0 -5
  224. package/esm2020/pipe/src/nome-resumido.pipe.mjs +0 -20
  225. package/esm2020/pipe/src/pipe.module.mjs +0 -24
  226. package/esm2020/public-api.mjs +0 -5
  227. package/esm2020/scroll/index.mjs +0 -3
  228. package/esm2020/scroll/main-class-componentes-scroll.mjs +0 -5
  229. package/esm2020/scroll/src/scroll-container/scroll-container.component.mjs +0 -72
  230. package/esm2020/scroll/src/scroll.module.mjs +0 -22
  231. package/esm2020/table/index.mjs +0 -12
  232. package/esm2020/table/main-class-componentes-table.mjs +0 -5
  233. package/esm2020/table/src/column/column-cell.directive.mjs +0 -16
  234. package/esm2020/table/src/column/column-footer.directive.mjs +0 -16
  235. package/esm2020/table/src/column/column-header.directive.mjs +0 -16
  236. package/esm2020/table/src/column/column.directive.mjs +0 -37
  237. package/esm2020/table/src/infinite-table/infinite-table.component.mjs +0 -95
  238. package/esm2020/table/src/paginated-table/paginated-table.component.mjs +0 -69
  239. package/esm2020/table/src/paginator/paginator.component.mjs +0 -19
  240. package/esm2020/table/src/paginator-i18n.mjs +0 -23
  241. package/esm2020/table/src/table/table.component.mjs +0 -119
  242. package/esm2020/table/src/table.module.mjs +0 -120
  243. package/esm2020/table/src/td/td.component.mjs +0 -18
  244. package/esm2020/table/src/th/th.component.mjs +0 -18
  245. package/esm2020/util/index.mjs +0 -2
  246. package/esm2020/util/main-class-componentes-util.mjs +0 -5
  247. package/esm2020/util/src/string.util.mjs +0 -12
  248. package/fesm2015/main-class-componentes-arquivo.mjs +0 -389
  249. package/fesm2015/main-class-componentes-arquivo.mjs.map +0 -1
  250. package/fesm2015/main-class-componentes-core.mjs +0 -225
  251. package/fesm2015/main-class-componentes-core.mjs.map +0 -1
  252. package/fesm2015/main-class-componentes-crud.mjs +0 -176
  253. package/fesm2015/main-class-componentes-crud.mjs.map +0 -1
  254. package/fesm2015/main-class-componentes-date.mjs +0 -162
  255. package/fesm2015/main-class-componentes-date.mjs.map +0 -1
  256. package/fesm2015/main-class-componentes-dialog.mjs +0 -206
  257. package/fesm2015/main-class-componentes-dialog.mjs.map +0 -1
  258. package/fesm2015/main-class-componentes-form.mjs +0 -209
  259. package/fesm2015/main-class-componentes-form.mjs.map +0 -1
  260. package/fesm2015/main-class-componentes-input.mjs +0 -1878
  261. package/fesm2015/main-class-componentes-input.mjs.map +0 -1
  262. package/fesm2015/main-class-componentes-loader.mjs +0 -236
  263. package/fesm2015/main-class-componentes-loader.mjs.map +0 -1
  264. package/fesm2015/main-class-componentes-misc.mjs +0 -787
  265. package/fesm2015/main-class-componentes-misc.mjs.map +0 -1
  266. package/fesm2015/main-class-componentes-model.mjs +0 -183
  267. package/fesm2015/main-class-componentes-model.mjs.map +0 -1
  268. package/fesm2015/main-class-componentes-pipe.mjs +0 -48
  269. package/fesm2015/main-class-componentes-pipe.mjs.map +0 -1
  270. package/fesm2015/main-class-componentes-scroll.mjs +0 -98
  271. package/fesm2015/main-class-componentes-scroll.mjs.map +0 -1
  272. package/fesm2015/main-class-componentes-table.mjs +0 -532
  273. package/fesm2015/main-class-componentes-table.mjs.map +0 -1
  274. package/fesm2015/main-class-componentes-util.mjs +0 -18
  275. package/fesm2015/main-class-componentes-util.mjs.map +0 -1
  276. package/fesm2015/main-class-componentes.mjs.map +0 -1
  277. package/fesm2020/main-class-componentes-arquivo.mjs +0 -372
  278. package/fesm2020/main-class-componentes-arquivo.mjs.map +0 -1
  279. package/fesm2020/main-class-componentes-core.mjs.map +0 -1
  280. package/fesm2020/main-class-componentes-crud.mjs +0 -154
  281. package/fesm2020/main-class-componentes-crud.mjs.map +0 -1
  282. package/fesm2020/main-class-componentes-date.mjs +0 -162
  283. package/fesm2020/main-class-componentes-date.mjs.map +0 -1
  284. package/fesm2020/main-class-componentes-dialog.mjs +0 -201
  285. package/fesm2020/main-class-componentes-dialog.mjs.map +0 -1
  286. package/fesm2020/main-class-componentes-form.mjs +0 -204
  287. package/fesm2020/main-class-componentes-form.mjs.map +0 -1
  288. package/fesm2020/main-class-componentes-input.mjs +0 -1862
  289. package/fesm2020/main-class-componentes-input.mjs.map +0 -1
  290. package/fesm2020/main-class-componentes-loader.mjs.map +0 -1
  291. package/fesm2020/main-class-componentes-misc.mjs +0 -785
  292. package/fesm2020/main-class-componentes-misc.mjs.map +0 -1
  293. package/fesm2020/main-class-componentes-model.mjs +0 -183
  294. package/fesm2020/main-class-componentes-model.mjs.map +0 -1
  295. package/fesm2020/main-class-componentes-pipe.mjs +0 -48
  296. package/fesm2020/main-class-componentes-pipe.mjs.map +0 -1
  297. package/fesm2020/main-class-componentes-scroll.mjs +0 -98
  298. package/fesm2020/main-class-componentes-scroll.mjs.map +0 -1
  299. package/fesm2020/main-class-componentes-table.mjs +0 -519
  300. package/fesm2020/main-class-componentes-table.mjs.map +0 -1
  301. package/fesm2020/main-class-componentes-util.mjs +0 -18
  302. package/fesm2020/main-class-componentes-util.mjs.map +0 -1
  303. package/fesm2020/main-class-componentes.mjs +0 -9
  304. package/fesm2020/main-class-componentes.mjs.map +0 -1
  305. package/form/src/form.module.d.ts +0 -12
  306. package/input/src/input-datetime/input-datetime.module.d.ts +0 -13
  307. package/input/src/input-fileupload/input-fileupload.module.d.ts +0 -18
  308. package/input/src/input-telefone-internacional/input-telefone-internacional.module.d.ts +0 -11
  309. package/input/src/option-checkbox/option-checkbox.module.d.ts +0 -14
  310. package/input/src/select-chips/select-chips.module.d.ts +0 -13
  311. package/input/src/select-item/select-item.component.d.ts +0 -11
  312. package/input/src/select-item/select-item.module.d.ts +0 -8
  313. package/input/src/select-many-checkbox/select-many-checkbox.module.d.ts +0 -11
  314. package/input/src/select-radio/select-radio.module.d.ts +0 -11
  315. package/loader/src/loader.module.d.ts +0 -11
  316. package/misc/src/cnpj/cnpj-model.directive.d.ts +0 -8
  317. package/misc/src/cnpj/cnpj.module.d.ts +0 -11
  318. package/misc/src/cpf/cpf-model.directive.d.ts +0 -8
  319. package/misc/src/cpf/cpf.module.d.ts +0 -10
  320. package/misc/src/cpf-cnpj/cpf-cnpj-model.directive.d.ts +0 -10
  321. package/misc/src/cpf-cnpj/cpf-cnpj.module.d.ts +0 -10
  322. package/misc/src/info/info.component.d.ts +0 -9
  323. package/misc/src/info/info.module.d.ts +0 -9
  324. package/misc/src/monetario/monetario-model.directive.d.ts +0 -32
  325. package/misc/src/monetario/monetario.module.d.ts +0 -9
  326. package/misc/src/porcentagem/porcentagem-model.directive.d.ts +0 -28
  327. package/misc/src/porcentagem/porcentagem.module.d.ts +0 -9
  328. package/misc/src/telefone/telefone-model.directive.d.ts +0 -10
  329. package/misc/src/telefone/telefone.module.d.ts +0 -10
  330. package/misc/src/unsafe-inner-html/unsafe-inner-html.module.d.ts +0 -8
  331. package/model/index.d.ts +0 -2
  332. package/model/src/masked-model.directive.d.ts +0 -31
  333. package/model/src/model.module.d.ts +0 -8
  334. package/pipe/src/pipe.module.d.ts +0 -8
  335. package/scroll/index.d.ts +0 -2
  336. package/scroll/src/scroll-container/scroll-container.component.d.ts +0 -34
  337. package/scroll/src/scroll.module.d.ts +0 -8
  338. package/table/src/infinite-table/infinite-table.component.d.ts +0 -21
  339. package/table/src/table.module.d.ts +0 -29
  340. package/util/index.d.ts +0 -1
  341. package/util/src/string.util.d.ts +0 -4
@@ -1,1862 +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 i6 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$1 from '@angular/material/legacy-chips';
43
- import { MatLegacyChipsModule } from '@angular/material/legacy-chips';
44
- import * as i4$2 from '@angular/material/radio';
45
- import { MatRadioModule } from '@angular/material/radio';
46
- import * as i4$3 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: i6.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: i6.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$1.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$1.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$1.MatLegacyChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6$1.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 SelectManyCheckboxComponent {
1394
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1395
- this.errorStateMatcher = errorStateMatcher;
1396
- this.ngControl = ngControl;
1397
- this.parentForm = parentForm;
1398
- this.parentFormGroup = parentFormGroup;
1399
- this.onChange = (val) => {
1400
- };
1401
- this.onTouched = () => {
1402
- };
1403
- this.$disabled = false;
1404
- this.$required = false;
1405
- this.layout = 'grid';
1406
- this.layoutColumns = 3;
1407
- this.stateChanges = new Subject();
1408
- this.id = `select-radio-${SelectManyCheckboxComponent.nextId++}`;
1409
- this.describedBy = '';
1410
- if (this.ngControl != null) {
1411
- this.ngControl.valueAccessor = this;
1412
- }
1413
- }
1414
- ngAfterViewInit() {
1415
- this.opcoes.changes.subscribe(() => {
1416
- this.updateOpcoes();
1417
- });
1418
- }
1419
- get value() {
1420
- return this.$value;
1421
- }
1422
- set value(value) {
1423
- this.$value = value;
1424
- this.onChange(value);
1425
- this.stateChanges.next();
1426
- }
1427
- get focused() {
1428
- return false;
1429
- }
1430
- get empty() {
1431
- return !this.value;
1432
- }
1433
- onContainerClick(event) {
1434
- }
1435
- get shouldLabelFloat() {
1436
- return true;
1437
- }
1438
- get placeholder() {
1439
- return this.$placeholder;
1440
- }
1441
- set placeholder(plh) {
1442
- this.$placeholder = plh;
1443
- this.stateChanges.next();
1444
- }
1445
- get required() {
1446
- return this.$required;
1447
- }
1448
- set required(value) {
1449
- this.$required = coerceBooleanProperty(value);
1450
- this.stateChanges.next();
1451
- }
1452
- get disabled() {
1453
- return this.$disabled;
1454
- }
1455
- set disabled(value) {
1456
- this.$disabled = coerceBooleanProperty(value);
1457
- this.stateChanges.next();
1458
- }
1459
- get errorState() {
1460
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1461
- }
1462
- get controlType() {
1463
- return 'select-chips';
1464
- }
1465
- setDescribedByIds(ids) {
1466
- this.describedBy = ids.join(' ');
1467
- }
1468
- ngOnDestroy() {
1469
- this.stateChanges.complete();
1470
- }
1471
- registerOnTouched(fn) {
1472
- this.onTouched = fn;
1473
- }
1474
- registerOnChange(fn) {
1475
- this.onChange = fn;
1476
- }
1477
- setDisabledState(isDisabled) {
1478
- this.disabled = isDisabled;
1479
- }
1480
- writeValue(value) {
1481
- this.updateOpcoes(value);
1482
- this.$value = value;
1483
- }
1484
- change(opcao, selected) {
1485
- opcao._selected = selected;
1486
- this.value = this.opcoesToValue();
1487
- }
1488
- updateOpcoes(value = this.value) {
1489
- for (const opcao of this.opcoes) {
1490
- opcao._selected = value && value.indexOf(opcao.value) >= 0;
1491
- }
1492
- }
1493
- opcoesToValue() {
1494
- const val = [];
1495
- for (const opcao of this.opcoes) {
1496
- if (opcao._selected) {
1497
- val.push(opcao.value);
1498
- }
1499
- }
1500
- return val.length ? val : undefined;
1501
- }
1502
- }
1503
- SelectManyCheckboxComponent.nextId = 0;
1504
- 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 });
1505
- 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: [
1506
- {
1507
- provide: MatFormFieldControl,
1508
- useExisting: SelectManyCheckboxComponent
1509
- }
1510
- ], 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"] }] });
1511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectManyCheckboxComponent, decorators: [{
1512
- type: Component,
1513
- args: [{ selector: 'mcl-select-many-checkbox', providers: [
1514
- {
1515
- provide: MatFormFieldControl,
1516
- useExisting: SelectManyCheckboxComponent
1517
- }
1518
- ], 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"] }]
1519
- }], ctorParameters: function () { return [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1520
- type: Optional
1521
- }, {
1522
- type: Self
1523
- }] }, { type: i2.NgForm, decorators: [{
1524
- type: Optional
1525
- }] }, { type: i2.FormGroupDirective, decorators: [{
1526
- type: Optional
1527
- }] }]; }, propDecorators: { layout: [{
1528
- type: Input
1529
- }], layoutColumns: [{
1530
- type: Input
1531
- }], input: [{
1532
- type: ViewChild,
1533
- args: ['input']
1534
- }], id: [{
1535
- type: HostBinding
1536
- }], describedBy: [{
1537
- type: HostBinding,
1538
- args: ['attr.aria-describedby']
1539
- }], opcoes: [{
1540
- type: ContentChildren,
1541
- args: [SelectItemComponent]
1542
- }], shouldLabelFloat: [{
1543
- type: HostBinding,
1544
- args: ['class.floating']
1545
- }], placeholder: [{
1546
- type: Input
1547
- }], required: [{
1548
- type: Input
1549
- }], disabled: [{
1550
- type: Input
1551
- }] } });
1552
-
1553
- class SelectManyCheckboxModule {
1554
- }
1555
- SelectManyCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectManyCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1556
- SelectManyCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectManyCheckboxModule, declarations: [SelectManyCheckboxComponent], imports: [CommonModule,
1557
- FormsModule,
1558
- SelectItemModule,
1559
- MatCheckboxModule], exports: [SelectManyCheckboxComponent, SelectItemModule] });
1560
- SelectManyCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectManyCheckboxModule, imports: [CommonModule,
1561
- FormsModule,
1562
- SelectItemModule,
1563
- MatCheckboxModule, SelectItemModule] });
1564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectManyCheckboxModule, decorators: [{
1565
- type: NgModule,
1566
- args: [{
1567
- declarations: [SelectManyCheckboxComponent],
1568
- exports: [SelectManyCheckboxComponent, SelectItemModule],
1569
- imports: [
1570
- CommonModule,
1571
- FormsModule,
1572
- SelectItemModule,
1573
- MatCheckboxModule
1574
- ],
1575
- }]
1576
- }] });
1577
-
1578
- class SelectRadioComponent {
1579
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1580
- this.errorStateMatcher = errorStateMatcher;
1581
- this.ngControl = ngControl;
1582
- this.parentForm = parentForm;
1583
- this.parentFormGroup = parentFormGroup;
1584
- this.onChange = (val) => {
1585
- };
1586
- this.onTouched = () => {
1587
- };
1588
- this.$disabled = false;
1589
- this.$required = false;
1590
- this.layout = 'vertical';
1591
- this.stateChanges = new Subject();
1592
- this.id = `select-radio-${SelectRadioComponent.nextId++}`;
1593
- this.describedBy = '';
1594
- if (this.ngControl != null) {
1595
- this.ngControl.valueAccessor = this;
1596
- }
1597
- }
1598
- get value() {
1599
- return this.$value;
1600
- }
1601
- set value(value) {
1602
- this.$value = value;
1603
- this.onChange(value);
1604
- this.stateChanges.next();
1605
- }
1606
- get focused() {
1607
- return false;
1608
- }
1609
- get empty() {
1610
- return !this.value;
1611
- }
1612
- onContainerClick(event) {
1613
- }
1614
- get shouldLabelFloat() {
1615
- return true;
1616
- }
1617
- get placeholder() {
1618
- return this.$placeholder;
1619
- }
1620
- set placeholder(plh) {
1621
- this.$placeholder = plh;
1622
- this.stateChanges.next();
1623
- }
1624
- get required() {
1625
- return this.$required;
1626
- }
1627
- set required(value) {
1628
- this.$required = coerceBooleanProperty(value);
1629
- this.stateChanges.next();
1630
- }
1631
- get disabled() {
1632
- return this.$disabled;
1633
- }
1634
- set disabled(value) {
1635
- this.$disabled = coerceBooleanProperty(value);
1636
- this.stateChanges.next();
1637
- }
1638
- get errorState() {
1639
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1640
- }
1641
- get controlType() {
1642
- return 'select-chips';
1643
- }
1644
- setDescribedByIds(ids) {
1645
- this.describedBy = ids.join(' ');
1646
- }
1647
- ngOnDestroy() {
1648
- this.stateChanges.complete();
1649
- }
1650
- registerOnTouched(fn) {
1651
- this.onTouched = fn;
1652
- }
1653
- registerOnChange(fn) {
1654
- this.onChange = fn;
1655
- }
1656
- setDisabledState(isDisabled) {
1657
- this.disabled = isDisabled;
1658
- }
1659
- writeValue(value) {
1660
- this.value = value;
1661
- }
1662
- }
1663
- SelectRadioComponent.nextId = 0;
1664
- 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 });
1665
- 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: [
1666
- {
1667
- provide: MatFormFieldControl,
1668
- useExisting: SelectRadioComponent
1669
- }
1670
- ], 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$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i4$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }] });
1671
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectRadioComponent, decorators: [{
1672
- type: Component,
1673
- args: [{ selector: 'mcl-select-radio', providers: [
1674
- {
1675
- provide: MatFormFieldControl,
1676
- useExisting: SelectRadioComponent
1677
- }
1678
- ], 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"] }]
1679
- }], ctorParameters: function () { return [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1680
- type: Optional
1681
- }, {
1682
- type: Self
1683
- }] }, { type: i2.NgForm, decorators: [{
1684
- type: Optional
1685
- }] }, { type: i2.FormGroupDirective, decorators: [{
1686
- type: Optional
1687
- }] }]; }, propDecorators: { layout: [{
1688
- type: Input
1689
- }], input: [{
1690
- type: ViewChild,
1691
- args: ['input']
1692
- }], id: [{
1693
- type: HostBinding
1694
- }], describedBy: [{
1695
- type: HostBinding,
1696
- args: ['attr.aria-describedby']
1697
- }], opcoes: [{
1698
- type: ContentChildren,
1699
- args: [SelectItemComponent]
1700
- }], shouldLabelFloat: [{
1701
- type: HostBinding,
1702
- args: ['class.floating']
1703
- }], placeholder: [{
1704
- type: Input
1705
- }], required: [{
1706
- type: Input
1707
- }], disabled: [{
1708
- type: Input
1709
- }] } });
1710
-
1711
- class SelectRadioModule {
1712
- }
1713
- SelectRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1714
- SelectRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectRadioModule, declarations: [SelectRadioComponent], imports: [CommonModule,
1715
- FormsModule,
1716
- SelectItemModule,
1717
- MatRadioModule], exports: [SelectRadioComponent, SelectItemModule] });
1718
- SelectRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectRadioModule, imports: [CommonModule,
1719
- FormsModule,
1720
- SelectItemModule,
1721
- MatRadioModule, SelectItemModule] });
1722
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectRadioModule, decorators: [{
1723
- type: NgModule,
1724
- args: [{
1725
- declarations: [SelectRadioComponent],
1726
- exports: [SelectRadioComponent, SelectItemModule],
1727
- imports: [
1728
- CommonModule,
1729
- FormsModule,
1730
- SelectItemModule,
1731
- MatRadioModule
1732
- ],
1733
- }]
1734
- }] });
1735
-
1736
- class InputTelefoneInternacionalComponent extends AbstractMatFormFieldControl {
1737
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1738
- super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1739
- this.preferredContries = ['br'];
1740
- this.blur = new EventEmitter();
1741
- this.alwaysShowCountry = false;
1742
- }
1743
- get value() {
1744
- return this.$innerValue;
1745
- }
1746
- set value(value) {
1747
- this.$innerValue = value;
1748
- this.stateChanges.next();
1749
- this.onChange(value?.replace(/[^\d+]/g, ''));
1750
- }
1751
- get shouldLabelFloat() {
1752
- return this.focused || !this.empty || this.alwaysShowCountry;
1753
- }
1754
- get empty() {
1755
- return !this.value;
1756
- }
1757
- onFocus() {
1758
- this.focused = true;
1759
- this.stateChanges.next();
1760
- }
1761
- onBlur() {
1762
- this.focused = false;
1763
- this.stateChanges.next();
1764
- this.blur.emit();
1765
- }
1766
- writeValue(value) {
1767
- this.value = value;
1768
- }
1769
- }
1770
- 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 });
1771
- 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: [
1772
- {
1773
- provide: MatFormFieldControl,
1774
- useExisting: InputTelefoneInternacionalComponent
1775
- },
1776
- ], 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$3.LacMatTelInputComponent, selector: "lac-mat-tel-input", inputs: ["required", "disabled", "internationalFormat"], outputs: ["blur"] }, { kind: "component", type: i4$3.LacMatCountrySelectorComponent, selector: "lac-mat-country-selector", inputs: ["preferredCountries", "onlyCountries", "selectorFor", "showDialCode", "disableSearch", "searchPlaceholder"], outputs: ["change"] }] });
1777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalComponent, decorators: [{
1778
- type: Component,
1779
- args: [{ selector: 'mcl-input-telefone-intl', providers: [
1780
- {
1781
- provide: MatFormFieldControl,
1782
- useExisting: InputTelefoneInternacionalComponent
1783
- },
1784
- ], 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"] }]
1785
- }], ctorParameters: function () { return [{ type: i1.ErrorStateMatcher }, { type: i2.NgControl, decorators: [{
1786
- type: Optional
1787
- }, {
1788
- type: Self
1789
- }] }, { type: i2.NgForm, decorators: [{
1790
- type: Optional
1791
- }] }, { type: i2.FormGroupDirective, decorators: [{
1792
- type: Optional
1793
- }] }]; }, propDecorators: { preferredContries: [{
1794
- type: Input
1795
- }], readonly: [{
1796
- type: Input
1797
- }], blur: [{
1798
- type: Output
1799
- }], alwaysShowCountry: [{
1800
- type: Input
1801
- }], telInput: [{
1802
- type: ViewChild,
1803
- args: ['input']
1804
- }] } });
1805
-
1806
- class InputTelefoneInternacionalValidatorDirective {
1807
- constructor() {
1808
- }
1809
- validate(control) {
1810
- return phoneNumberValidator(control);
1811
- }
1812
- }
1813
- InputTelefoneInternacionalValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1814
- InputTelefoneInternacionalValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: InputTelefoneInternacionalValidatorDirective, selector: "mcl-input-telefone-intl,[mclInputTelefoneIntl]", providers: [{
1815
- provide: NG_VALIDATORS,
1816
- useExisting: InputTelefoneInternacionalValidatorDirective,
1817
- multi: true,
1818
- }], ngImport: i0 });
1819
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalValidatorDirective, decorators: [{
1820
- type: Directive,
1821
- args: [{
1822
- selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
1823
- providers: [{
1824
- provide: NG_VALIDATORS,
1825
- useExisting: InputTelefoneInternacionalValidatorDirective,
1826
- multi: true,
1827
- }]
1828
- }]
1829
- }], ctorParameters: function () { return []; } });
1830
-
1831
- class InputTelefoneInternacionalModule {
1832
- }
1833
- InputTelefoneInternacionalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1834
- InputTelefoneInternacionalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalModule, declarations: [InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective], imports: [CommonModule,
1835
- FormsModule,
1836
- LacMatTelInputModule], exports: [InputTelefoneInternacionalComponent,
1837
- InputTelefoneInternacionalValidatorDirective] });
1838
- InputTelefoneInternacionalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalModule, imports: [CommonModule,
1839
- FormsModule,
1840
- LacMatTelInputModule] });
1841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: InputTelefoneInternacionalModule, decorators: [{
1842
- type: NgModule,
1843
- args: [{
1844
- declarations: [InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective],
1845
- exports: [
1846
- InputTelefoneInternacionalComponent,
1847
- InputTelefoneInternacionalValidatorDirective
1848
- ],
1849
- imports: [
1850
- CommonModule,
1851
- FormsModule,
1852
- LacMatTelInputModule,
1853
- ]
1854
- }]
1855
- }] });
1856
-
1857
- /**
1858
- * Generated bundle index. Do not edit.
1859
- */
1860
-
1861
- export { AbstractMatFormFieldControl, AllOptionCheckboxComponent, InputDatetimeComponent, InputDatetimeModule, InputFileUploadComponent, InputFileUploadValidatorDirective, InputFileuploadModule, InputTelefoneInternacionalComponent, InputTelefoneInternacionalModule, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, OptionCheckboxModule, SelectChipsComponent, SelectChipsModule, SelectItemComponent, SelectItemModule, SelectManyCheckboxComponent, SelectManyCheckboxModule, SelectRadioComponent, SelectRadioModule };
1862
- //# sourceMappingURL=main-class-componentes-input.mjs.map