@main-class/componentes 1.18.7 → 1.19.1

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