@main-class/componentes 1.19.3 → 2.0.5

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 (503) hide show
  1. package/arquivo/src/arquivo.module.d.ts +15 -0
  2. package/arquivo/src/download-arquivo.directive.d.ts +4 -1
  3. package/arquivo/src/imagem.directive.d.ts +3 -0
  4. package/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +3 -0
  5. package/arquivo/src/preview-arquivo/preview-arquivo.component.d.ts +4 -1
  6. package/core/src/core.module.d.ts +5 -0
  7. package/core/src/criptografia/criptografia.service.d.ts +3 -0
  8. package/core/src/mensageria/mensageria.service.d.ts +3 -0
  9. package/core/src/mobile/mobile.service.d.ts +3 -0
  10. package/core/src/validator/valida-modulo11.service.d.ts +3 -0
  11. package/crud/src/abstract-consulta-component.d.ts +3 -0
  12. package/crud/src/abstract-consulta-paginada-component.d.ts +3 -0
  13. package/crud/src/abstract-edicao-component.d.ts +3 -0
  14. package/date/src/date.module.d.ts +7 -0
  15. package/date/src/validator/data-validator.directive.d.ts +3 -0
  16. package/date/src/validator/futuro.directive.d.ts +3 -0
  17. package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +3 -0
  18. package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +3 -0
  19. package/dialog/src/dialog.module.d.ts +12 -0
  20. package/dialog/src/dialog.service.d.ts +3 -0
  21. package/esm2020/arquivo/src/arquivo.module.mjs +47 -0
  22. package/esm2020/arquivo/src/download-arquivo.directive.mjs +46 -0
  23. package/esm2020/arquivo/src/imagem.directive.mjs +89 -0
  24. package/esm2020/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.mjs +65 -0
  25. package/esm2020/arquivo/src/preview-arquivo/preview-arquivo.component.mjs +139 -0
  26. package/esm2020/core/src/core.module.mjs +32 -0
  27. package/esm2020/core/src/criptografia/criptografia.service.mjs +16 -0
  28. package/esm2020/core/src/mensageria/mensageria.service.mjs +57 -0
  29. package/esm2020/core/src/mobile/mobile.service.mjs +43 -0
  30. package/esm2020/core/src/validator/valida-modulo11.service.mjs +95 -0
  31. package/esm2020/crud/src/abstract-consulta-component.mjs +55 -0
  32. package/esm2020/crud/src/abstract-consulta-paginada-component.mjs +45 -0
  33. package/esm2020/crud/src/abstract-edicao-component.mjs +30 -0
  34. package/esm2020/crud/src/abstract-edicao-modal-component.mjs +19 -0
  35. package/esm2020/date/src/date.module.mjs +25 -0
  36. package/esm2020/date/src/validator/data-validator.directive.mjs +105 -0
  37. package/esm2020/date/src/validator/futuro.directive.mjs +33 -0
  38. package/esm2020/dialog/src/dialog-confirmacao/dialog-confirmacao.component.mjs +44 -0
  39. package/esm2020/dialog/src/dialog-iframe/dialog-iframe.component.mjs +60 -0
  40. package/esm2020/dialog/src/dialog.module.mjs +53 -0
  41. package/esm2020/dialog/src/dialog.service.mjs +53 -0
  42. package/esm2020/form/src/form.component.mjs +106 -0
  43. package/esm2020/form/src/form.module.mjs +36 -0
  44. package/esm2020/form/src/mensagens-erro/mensagens-erro.component.mjs +33 -0
  45. package/esm2020/form/src/single-click.directive.mjs +35 -0
  46. package/esm2020/input/main-class-componentes-input.mjs +5 -0
  47. package/esm2020/input/src/abstract-mat-form-field-control.mjs +116 -0
  48. package/esm2020/input/src/input-datetime/input-datetime.component.mjs +130 -0
  49. package/esm2020/input/src/input-datetime/input-datetime.module.mjs +101 -0
  50. package/esm2020/input/src/input-fileupload/input-fileupload.component.mjs +355 -0
  51. package/esm2020/input/src/input-fileupload/input-fileupload.directive.mjs +37 -0
  52. package/esm2020/input/src/input-fileupload/input-fileupload.module.mjs +57 -0
  53. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.mjs +29 -0
  54. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional.component.mjs +78 -0
  55. package/esm2020/input/src/input-telefone-internacional/input-telefone-internacional.module.mjs +33 -0
  56. package/esm2020/input/src/option-checkbox/all-option-checkbox.component.mjs +38 -0
  57. package/esm2020/input/src/option-checkbox/option-checkbox-group.component.mjs +80 -0
  58. package/esm2020/input/src/option-checkbox/option-checkbox.component.mjs +62 -0
  59. package/esm2020/input/src/option-checkbox/option-checkbox.module.mjs +39 -0
  60. package/esm2020/input/src/option-checkbox/option-checkbox.service.mjs +54 -0
  61. package/esm2020/input/src/select-chips/select-chips.component.mjs +202 -0
  62. package/esm2020/input/src/select-chips/select-chips.module.mjs +40 -0
  63. package/esm2020/input/src/select-item/select-item.component.mjs +19 -0
  64. package/esm2020/input/src/select-item/select-item.module.mjs +20 -0
  65. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.component.mjs +170 -0
  66. package/esm2020/input/src/select-many-checkbox/select-many-checkbox.module.mjs +32 -0
  67. package/esm2020/input/src/select-radio/select-radio.component.mjs +143 -0
  68. package/esm2020/input/src/select-radio/select-radio.module.mjs +32 -0
  69. package/esm2020/loader/src/loader.component.mjs +125 -0
  70. package/esm2020/loader/src/loader.module.mjs +37 -0
  71. package/esm2020/loader/src/loader.service.mjs +72 -0
  72. package/esm2020/misc/src/cnpj/cnpj-model.directive.mjs +17 -0
  73. package/esm2020/misc/src/cnpj/cnpj.directive.mjs +36 -0
  74. package/esm2020/misc/src/cnpj/cnpj.module.mjs +26 -0
  75. package/esm2020/misc/src/cnpj/cnpjs.pipe.mjs +19 -0
  76. package/esm2020/misc/src/cpf/cpf-model.directive.mjs +17 -0
  77. package/esm2020/misc/src/cpf/cpf.directive.mjs +36 -0
  78. package/esm2020/misc/src/cpf/cpf.module.mjs +24 -0
  79. package/esm2020/misc/src/cpf/cpf.pipe.mjs +19 -0
  80. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj-model.directive.mjs +29 -0
  81. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.directive.mjs +37 -0
  82. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.module.mjs +24 -0
  83. package/esm2020/misc/src/cpf-cnpj/cpf-cnpj.pipe.mjs +22 -0
  84. package/esm2020/misc/src/info/info.component.mjs +20 -0
  85. package/esm2020/misc/src/info/info.module.mjs +24 -0
  86. package/{esm2015/misc/src/monetario/monetario-mask.js → esm2020/misc/src/monetario/monetario-mask.mjs} +0 -2
  87. package/esm2020/misc/src/monetario/monetario-model.directive.mjs +133 -0
  88. package/esm2020/misc/src/monetario/monetario.module.mjs +21 -0
  89. package/esm2020/misc/src/monetario/monetario.pipe.mjs +17 -0
  90. package/{esm2015/misc/src/porcentagem/porcentagem-mask.js → esm2020/misc/src/porcentagem/porcentagem-mask.mjs} +0 -2
  91. package/esm2020/misc/src/porcentagem/porcentagem-model.directive.mjs +108 -0
  92. package/esm2020/misc/src/porcentagem/porcentagem.module.mjs +21 -0
  93. package/esm2020/misc/src/porcentagem/porcentagem.pipe.mjs +17 -0
  94. package/esm2020/misc/src/telefone/telefone-model.directive.mjs +29 -0
  95. package/esm2020/misc/src/telefone/telefone.module.mjs +25 -0
  96. package/esm2020/misc/src/telefone/telefone.pipe.mjs +37 -0
  97. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.directive.mjs +25 -0
  98. package/esm2020/misc/src/unsafe-inner-html/unsafe-inner-html.module.mjs +20 -0
  99. package/esm2020/model/src/masked-model.directive.mjs +155 -0
  100. package/esm2020/model/src/model.module.mjs +24 -0
  101. package/esm2020/pipe/src/nome-resumido.pipe.mjs +20 -0
  102. package/esm2020/pipe/src/pipe.module.mjs +24 -0
  103. package/esm2020/scroll/src/scroll-container/scroll-container.component.mjs +72 -0
  104. package/esm2020/scroll/src/scroll.module.mjs +22 -0
  105. package/{esm2015/table/main-class-componentes-table.js → esm2020/table/main-class-componentes-table.mjs} +1 -2
  106. package/esm2020/table/src/column/column-cell.directive.mjs +16 -0
  107. package/esm2020/table/src/column/column-footer.directive.mjs +16 -0
  108. package/esm2020/table/src/column/column-header.directive.mjs +16 -0
  109. package/esm2020/table/src/column/column.directive.mjs +37 -0
  110. package/esm2020/table/src/infinite-table/infinite-table.component.mjs +95 -0
  111. package/esm2020/table/src/paginated-table/paginated-table.component.mjs +52 -0
  112. package/esm2020/table/src/paginator/paginator.component.mjs +19 -0
  113. package/esm2020/table/src/table/table.component.mjs +127 -0
  114. package/esm2020/table/src/table.module.mjs +120 -0
  115. package/esm2020/table/src/td/td.component.mjs +18 -0
  116. package/esm2020/table/src/th/th.component.mjs +18 -0
  117. package/fesm2015/main-class-componentes-arquivo.mjs +389 -0
  118. package/fesm2015/main-class-componentes-arquivo.mjs.map +1 -0
  119. package/fesm2015/{main-class-componentes-core.js → main-class-componentes-core.mjs} +43 -37
  120. package/fesm2015/main-class-componentes-core.mjs.map +1 -0
  121. package/fesm2015/{main-class-componentes-crud.js → main-class-componentes-crud.mjs} +32 -22
  122. package/fesm2015/main-class-componentes-crud.mjs.map +1 -0
  123. package/fesm2015/main-class-componentes-date.mjs +162 -0
  124. package/fesm2015/main-class-componentes-date.mjs.map +1 -0
  125. package/fesm2015/main-class-componentes-dialog.mjs +206 -0
  126. package/fesm2015/main-class-componentes-dialog.mjs.map +1 -0
  127. package/fesm2015/main-class-componentes-form.mjs +209 -0
  128. package/fesm2015/main-class-componentes-form.mjs.map +1 -0
  129. package/fesm2015/main-class-componentes-input.mjs +1876 -0
  130. package/fesm2015/main-class-componentes-input.mjs.map +1 -0
  131. package/fesm2015/main-class-componentes-loader.mjs +236 -0
  132. package/fesm2015/main-class-componentes-loader.mjs.map +1 -0
  133. package/fesm2015/main-class-componentes-misc.mjs +787 -0
  134. package/fesm2015/main-class-componentes-misc.mjs.map +1 -0
  135. package/fesm2015/{main-class-componentes-model.js → main-class-componentes-model.mjs} +46 -36
  136. package/fesm2015/main-class-componentes-model.mjs.map +1 -0
  137. package/fesm2015/main-class-componentes-pipe.mjs +48 -0
  138. package/fesm2015/main-class-componentes-pipe.mjs.map +1 -0
  139. package/fesm2015/main-class-componentes-scroll.mjs +98 -0
  140. package/fesm2015/main-class-componentes-scroll.mjs.map +1 -0
  141. package/fesm2015/main-class-componentes-table.mjs +518 -0
  142. package/fesm2015/main-class-componentes-table.mjs.map +1 -0
  143. package/fesm2015/{main-class-componentes-util.js → main-class-componentes-util.mjs} +1 -1
  144. package/fesm2015/main-class-componentes-util.mjs.map +1 -0
  145. package/fesm2015/{main-class-componentes.js → main-class-componentes.mjs} +1 -1
  146. package/fesm2015/main-class-componentes.mjs.map +1 -0
  147. package/fesm2020/main-class-componentes-arquivo.mjs +372 -0
  148. package/fesm2020/main-class-componentes-arquivo.mjs.map +1 -0
  149. package/fesm2020/main-class-componentes-core.mjs +238 -0
  150. package/fesm2020/main-class-componentes-core.mjs.map +1 -0
  151. package/fesm2020/main-class-componentes-crud.mjs +151 -0
  152. package/fesm2020/main-class-componentes-crud.mjs.map +1 -0
  153. package/fesm2020/main-class-componentes-date.mjs +162 -0
  154. package/fesm2020/main-class-componentes-date.mjs.map +1 -0
  155. package/fesm2020/main-class-componentes-dialog.mjs +201 -0
  156. package/fesm2020/main-class-componentes-dialog.mjs.map +1 -0
  157. package/fesm2020/main-class-componentes-form.mjs +204 -0
  158. package/fesm2020/main-class-componentes-form.mjs.map +1 -0
  159. package/fesm2020/main-class-componentes-input.mjs +1860 -0
  160. package/fesm2020/main-class-componentes-input.mjs.map +1 -0
  161. package/fesm2020/main-class-componentes-loader.mjs +234 -0
  162. package/fesm2020/main-class-componentes-loader.mjs.map +1 -0
  163. package/fesm2020/main-class-componentes-misc.mjs +785 -0
  164. package/fesm2020/main-class-componentes-misc.mjs.map +1 -0
  165. package/fesm2020/main-class-componentes-model.mjs +183 -0
  166. package/fesm2020/main-class-componentes-model.mjs.map +1 -0
  167. package/fesm2020/main-class-componentes-pipe.mjs +48 -0
  168. package/fesm2020/main-class-componentes-pipe.mjs.map +1 -0
  169. package/fesm2020/main-class-componentes-scroll.mjs +98 -0
  170. package/fesm2020/main-class-componentes-scroll.mjs.map +1 -0
  171. package/fesm2020/main-class-componentes-table.mjs +510 -0
  172. package/fesm2020/main-class-componentes-table.mjs.map +1 -0
  173. package/fesm2020/main-class-componentes-util.mjs +18 -0
  174. package/fesm2020/main-class-componentes-util.mjs.map +1 -0
  175. package/fesm2020/main-class-componentes.mjs +9 -0
  176. package/fesm2020/main-class-componentes.mjs.map +1 -0
  177. package/form/src/form.component.d.ts +3 -0
  178. package/form/src/form.module.d.ts +10 -0
  179. package/form/src/mensagens-erro/mensagens-erro.component.d.ts +3 -0
  180. package/form/src/single-click.directive.d.ts +3 -0
  181. package/{main-class-componentes.d.ts → index.d.ts} +1 -0
  182. package/input/src/abstract-mat-form-field-control.d.ts +3 -0
  183. package/input/src/input-datetime/input-datetime.component.d.ts +5 -2
  184. package/input/src/input-datetime/input-datetime.module.d.ts +11 -0
  185. package/input/src/input-fileupload/input-fileupload.component.d.ts +3 -0
  186. package/input/src/input-fileupload/input-fileupload.directive.d.ts +3 -0
  187. package/input/src/input-fileupload/input-fileupload.module.d.ts +16 -0
  188. package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +3 -0
  189. package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +3 -0
  190. package/input/src/input-telefone-internacional/input-telefone-internacional.module.d.ts +9 -0
  191. package/input/src/option-checkbox/all-option-checkbox.component.d.ts +3 -0
  192. package/input/src/option-checkbox/option-checkbox-group.component.d.ts +3 -0
  193. package/input/src/option-checkbox/option-checkbox.component.d.ts +3 -0
  194. package/input/src/option-checkbox/option-checkbox.module.d.ts +10 -0
  195. package/input/src/option-checkbox/option-checkbox.service.d.ts +3 -0
  196. package/input/src/select-chips/select-chips.component.d.ts +9 -6
  197. package/input/src/select-chips/select-chips.module.d.ts +11 -0
  198. package/input/src/select-item/select-item.component.d.ts +3 -0
  199. package/input/src/select-item/select-item.module.d.ts +6 -0
  200. package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +3 -0
  201. package/input/src/select-many-checkbox/select-many-checkbox.module.d.ts +9 -0
  202. package/input/src/select-radio/select-radio.component.d.ts +3 -0
  203. package/input/src/select-radio/select-radio.module.d.ts +9 -0
  204. package/loader/src/loader.component.d.ts +3 -0
  205. package/loader/src/loader.module.d.ts +7 -0
  206. package/loader/src/loader.service.d.ts +3 -0
  207. package/misc/src/cnpj/cnpj-model.directive.d.ts +3 -0
  208. package/misc/src/cnpj/cnpj.directive.d.ts +3 -0
  209. package/misc/src/cnpj/cnpj.module.d.ts +9 -0
  210. package/misc/src/cnpj/cnpjs.pipe.d.ts +3 -0
  211. package/misc/src/cpf/cpf-model.directive.d.ts +3 -0
  212. package/misc/src/cpf/cpf.directive.d.ts +3 -0
  213. package/misc/src/cpf/cpf.module.d.ts +8 -0
  214. package/misc/src/cpf/cpf.pipe.d.ts +3 -0
  215. package/misc/src/cpf-cnpj/cpf-cnpj-model.directive.d.ts +3 -0
  216. package/misc/src/cpf-cnpj/cpf-cnpj.directive.d.ts +3 -0
  217. package/misc/src/cpf-cnpj/cpf-cnpj.module.d.ts +8 -0
  218. package/misc/src/cpf-cnpj/cpf-cnpj.pipe.d.ts +3 -0
  219. package/misc/src/info/info.component.d.ts +3 -0
  220. package/misc/src/info/info.module.d.ts +7 -0
  221. package/misc/src/monetario/monetario-model.directive.d.ts +3 -0
  222. package/misc/src/monetario/monetario.module.d.ts +7 -0
  223. package/misc/src/monetario/monetario.pipe.d.ts +3 -0
  224. package/misc/src/porcentagem/porcentagem-model.directive.d.ts +3 -0
  225. package/misc/src/porcentagem/porcentagem.module.d.ts +7 -0
  226. package/misc/src/porcentagem/porcentagem.pipe.d.ts +3 -0
  227. package/misc/src/telefone/telefone-model.directive.d.ts +3 -0
  228. package/misc/src/telefone/telefone.module.d.ts +8 -0
  229. package/misc/src/telefone/telefone.pipe.d.ts +3 -0
  230. package/misc/src/unsafe-inner-html/unsafe-inner-html.directive.d.ts +3 -0
  231. package/misc/src/unsafe-inner-html/unsafe-inner-html.module.d.ts +6 -0
  232. package/model/src/masked-model.directive.d.ts +3 -0
  233. package/model/src/model.module.d.ts +6 -0
  234. package/package.json +135 -11
  235. package/pipe/src/nome-resumido.pipe.d.ts +3 -0
  236. package/pipe/src/pipe.module.d.ts +6 -0
  237. package/scroll/src/scroll-container/scroll-container.component.d.ts +3 -0
  238. package/scroll/src/scroll.module.d.ts +6 -0
  239. package/table/src/column/column-cell.directive.d.ts +3 -0
  240. package/table/src/column/column-footer.directive.d.ts +3 -0
  241. package/table/src/column/column-header.directive.d.ts +3 -0
  242. package/table/src/column/column.directive.d.ts +3 -0
  243. package/table/src/infinite-table/infinite-table.component.d.ts +3 -0
  244. package/table/src/paginated-table/paginated-table.component.d.ts +3 -0
  245. package/table/src/paginator/paginator.component.d.ts +3 -0
  246. package/table/src/table/table.component.d.ts +3 -0
  247. package/table/src/table.module.d.ts +24 -0
  248. package/table/src/td/td.component.d.ts +3 -0
  249. package/table/src/th/th.component.d.ts +3 -0
  250. package/arquivo/main-class-componentes-arquivo.d.ts +0 -4
  251. package/arquivo/main-class-componentes-arquivo.metadata.json +0 -1
  252. package/arquivo/package.json +0 -11
  253. package/bundles/main-class-componentes-arquivo.umd.js +0 -687
  254. package/bundles/main-class-componentes-arquivo.umd.js.map +0 -1
  255. package/bundles/main-class-componentes-arquivo.umd.min.js +0 -16
  256. package/bundles/main-class-componentes-arquivo.umd.min.js.map +0 -1
  257. package/bundles/main-class-componentes-core.umd.js +0 -252
  258. package/bundles/main-class-componentes-core.umd.js.map +0 -1
  259. package/bundles/main-class-componentes-core.umd.min.js +0 -2
  260. package/bundles/main-class-componentes-core.umd.min.js.map +0 -1
  261. package/bundles/main-class-componentes-crud.umd.js +0 -543
  262. package/bundles/main-class-componentes-crud.umd.js.map +0 -1
  263. package/bundles/main-class-componentes-crud.umd.min.js +0 -16
  264. package/bundles/main-class-componentes-crud.umd.min.js.map +0 -1
  265. package/bundles/main-class-componentes-date.umd.js +0 -185
  266. package/bundles/main-class-componentes-date.umd.js.map +0 -1
  267. package/bundles/main-class-componentes-date.umd.min.js +0 -2
  268. package/bundles/main-class-componentes-date.umd.min.js.map +0 -1
  269. package/bundles/main-class-componentes-dialog.umd.js +0 -214
  270. package/bundles/main-class-componentes-dialog.umd.js.map +0 -1
  271. package/bundles/main-class-componentes-dialog.umd.min.js +0 -2
  272. package/bundles/main-class-componentes-dialog.umd.min.js.map +0 -1
  273. package/bundles/main-class-componentes-form.umd.js +0 -211
  274. package/bundles/main-class-componentes-form.umd.js.map +0 -1
  275. package/bundles/main-class-componentes-form.umd.min.js +0 -2
  276. package/bundles/main-class-componentes-form.umd.min.js.map +0 -1
  277. package/bundles/main-class-componentes-input.umd.js +0 -2251
  278. package/bundles/main-class-componentes-input.umd.js.map +0 -1
  279. package/bundles/main-class-componentes-input.umd.min.js +0 -17
  280. package/bundles/main-class-componentes-input.umd.min.js.map +0 -1
  281. package/bundles/main-class-componentes-loader.umd.js +0 -241
  282. package/bundles/main-class-componentes-loader.umd.js.map +0 -1
  283. package/bundles/main-class-componentes-loader.umd.min.js +0 -2
  284. package/bundles/main-class-componentes-loader.umd.min.js.map +0 -1
  285. package/bundles/main-class-componentes-misc.umd.js +0 -1122
  286. package/bundles/main-class-componentes-misc.umd.js.map +0 -1
  287. package/bundles/main-class-componentes-misc.umd.min.js +0 -16
  288. package/bundles/main-class-componentes-misc.umd.min.js.map +0 -1
  289. package/bundles/main-class-componentes-model.umd.js +0 -196
  290. package/bundles/main-class-componentes-model.umd.js.map +0 -1
  291. package/bundles/main-class-componentes-model.umd.min.js +0 -2
  292. package/bundles/main-class-componentes-model.umd.min.js.map +0 -1
  293. package/bundles/main-class-componentes-pipe.umd.js +0 -58
  294. package/bundles/main-class-componentes-pipe.umd.js.map +0 -1
  295. package/bundles/main-class-componentes-pipe.umd.min.js +0 -2
  296. package/bundles/main-class-componentes-pipe.umd.min.js.map +0 -1
  297. package/bundles/main-class-componentes-scroll.umd.js +0 -106
  298. package/bundles/main-class-componentes-scroll.umd.js.map +0 -1
  299. package/bundles/main-class-componentes-scroll.umd.min.js +0 -2
  300. package/bundles/main-class-componentes-scroll.umd.min.js.map +0 -1
  301. package/bundles/main-class-componentes-table.umd.js +0 -787
  302. package/bundles/main-class-componentes-table.umd.js.map +0 -1
  303. package/bundles/main-class-componentes-table.umd.min.js +0 -17
  304. package/bundles/main-class-componentes-table.umd.min.js.map +0 -1
  305. package/bundles/main-class-componentes-util.umd.js +0 -31
  306. package/bundles/main-class-componentes-util.umd.js.map +0 -1
  307. package/bundles/main-class-componentes-util.umd.min.js +0 -2
  308. package/bundles/main-class-componentes-util.umd.min.js.map +0 -1
  309. package/bundles/main-class-componentes.umd.js +0 -16
  310. package/bundles/main-class-componentes.umd.js.map +0 -1
  311. package/bundles/main-class-componentes.umd.min.js +0 -2
  312. package/bundles/main-class-componentes.umd.min.js.map +0 -1
  313. package/core/main-class-componentes-core.d.ts +0 -4
  314. package/core/main-class-componentes-core.metadata.json +0 -1
  315. package/core/package.json +0 -11
  316. package/crud/main-class-componentes-crud.d.ts +0 -4
  317. package/crud/main-class-componentes-crud.metadata.json +0 -1
  318. package/crud/package.json +0 -11
  319. package/date/main-class-componentes-date.d.ts +0 -4
  320. package/date/main-class-componentes-date.metadata.json +0 -1
  321. package/date/package.json +0 -11
  322. package/dialog/main-class-componentes-dialog.d.ts +0 -4
  323. package/dialog/main-class-componentes-dialog.metadata.json +0 -1
  324. package/dialog/package.json +0 -11
  325. package/esm2015/arquivo/src/arquivo.module.js +0 -30
  326. package/esm2015/arquivo/src/download-arquivo.directive.js +0 -44
  327. package/esm2015/arquivo/src/imagem.directive.js +0 -80
  328. package/esm2015/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.js +0 -56
  329. package/esm2015/arquivo/src/preview-arquivo/preview-arquivo.component.js +0 -136
  330. package/esm2015/core/src/core.module.js +0 -27
  331. package/esm2015/core/src/criptografia/criptografia.service.js +0 -13
  332. package/esm2015/core/src/mensageria/mensageria.service.js +0 -48
  333. package/esm2015/core/src/mobile/mobile.service.js +0 -45
  334. package/esm2015/core/src/validator/valida-modulo11.service.js +0 -92
  335. package/esm2015/crud/src/abstract-consulta-component.js +0 -60
  336. package/esm2015/crud/src/abstract-consulta-paginada-component.js +0 -48
  337. package/esm2015/crud/src/abstract-edicao-component.js +0 -29
  338. package/esm2015/crud/src/abstract-edicao-modal-component.js +0 -24
  339. package/esm2015/date/src/date.module.js +0 -19
  340. package/esm2015/date/src/validator/data-validator.directive.js +0 -97
  341. package/esm2015/date/src/validator/futuro.directive.js +0 -26
  342. package/esm2015/dialog/src/dialog-confirmacao/dialog-confirmacao.component.js +0 -40
  343. package/esm2015/dialog/src/dialog-iframe/dialog-iframe.component.js +0 -59
  344. package/esm2015/dialog/src/dialog.module.js +0 -37
  345. package/esm2015/dialog/src/dialog.service.js +0 -55
  346. package/esm2015/form/src/form.component.js +0 -103
  347. package/esm2015/form/src/form.module.js +0 -25
  348. package/esm2015/form/src/mensagens-erro/mensagens-erro.component.js +0 -31
  349. package/esm2015/form/src/single-click.directive.js +0 -35
  350. package/esm2015/input/main-class-componentes-input.js +0 -6
  351. package/esm2015/input/src/abstract-mat-form-field-control.js +0 -110
  352. package/esm2015/input/src/input-datetime/input-datetime.component.js +0 -114
  353. package/esm2015/input/src/input-datetime/input-datetime.module.js +0 -60
  354. package/esm2015/input/src/input-fileupload/input-fileupload.component.js +0 -324
  355. package/esm2015/input/src/input-fileupload/input-fileupload.directive.js +0 -34
  356. package/esm2015/input/src/input-fileupload/input-fileupload.module.js +0 -34
  357. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.js +0 -22
  358. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional.component.js +0 -66
  359. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional.module.js +0 -23
  360. package/esm2015/input/src/option-checkbox/all-option-checkbox.component.js +0 -36
  361. package/esm2015/input/src/option-checkbox/option-checkbox-group.component.js +0 -71
  362. package/esm2015/input/src/option-checkbox/option-checkbox.component.js +0 -59
  363. package/esm2015/input/src/option-checkbox/option-checkbox.module.js +0 -30
  364. package/esm2015/input/src/option-checkbox/option-checkbox.service.js +0 -52
  365. package/esm2015/input/src/select-chips/select-chips.component.js +0 -177
  366. package/esm2015/input/src/select-chips/select-chips.module.js +0 -25
  367. package/esm2015/input/src/select-item/select-item.component.js +0 -20
  368. package/esm2015/input/src/select-item/select-item.module.js +0 -15
  369. package/esm2015/input/src/select-many-checkbox/select-many-checkbox.component.js +0 -150
  370. package/esm2015/input/src/select-many-checkbox/select-many-checkbox.module.js +0 -21
  371. package/esm2015/input/src/select-radio/select-radio.component.js +0 -124
  372. package/esm2015/input/src/select-radio/select-radio.module.js +0 -21
  373. package/esm2015/loader/src/loader.component.js +0 -112
  374. package/esm2015/loader/src/loader.module.js +0 -30
  375. package/esm2015/loader/src/loader.service.js +0 -70
  376. package/esm2015/misc/src/cnpj/cnpj-model.directive.js +0 -13
  377. package/esm2015/misc/src/cnpj/cnpj.directive.js +0 -31
  378. package/esm2015/misc/src/cnpj/cnpj.module.js +0 -19
  379. package/esm2015/misc/src/cnpj/cnpjs.pipe.js +0 -15
  380. package/esm2015/misc/src/cpf/cpf-model.directive.js +0 -13
  381. package/esm2015/misc/src/cpf/cpf.directive.js +0 -31
  382. package/esm2015/misc/src/cpf/cpf.module.js +0 -19
  383. package/esm2015/misc/src/cpf/cpf.pipe.js +0 -15
  384. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj-model.directive.js +0 -25
  385. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.directive.js +0 -32
  386. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.module.js +0 -19
  387. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.pipe.js +0 -18
  388. package/esm2015/misc/src/info/info.component.js +0 -20
  389. package/esm2015/misc/src/info/info.module.js +0 -17
  390. package/esm2015/misc/src/monetario/monetario-model.directive.js +0 -124
  391. package/esm2015/misc/src/monetario/monetario.module.js +0 -16
  392. package/esm2015/misc/src/monetario/monetario.pipe.js +0 -13
  393. package/esm2015/misc/src/porcentagem/porcentagem-model.directive.js +0 -99
  394. package/esm2015/misc/src/porcentagem/porcentagem.module.js +0 -16
  395. package/esm2015/misc/src/porcentagem/porcentagem.pipe.js +0 -13
  396. package/esm2015/misc/src/telefone/telefone-model.directive.js +0 -25
  397. package/esm2015/misc/src/telefone/telefone.module.js +0 -18
  398. package/esm2015/misc/src/telefone/telefone.pipe.js +0 -33
  399. package/esm2015/misc/src/unsafe-inner-html/unsafe-inner-html.directive.js +0 -23
  400. package/esm2015/misc/src/unsafe-inner-html/unsafe-inner-html.module.js +0 -15
  401. package/esm2015/model/src/masked-model.directive.js +0 -149
  402. package/esm2015/model/src/model.module.js +0 -19
  403. package/esm2015/pipe/src/nome-resumido.pipe.js +0 -16
  404. package/esm2015/pipe/src/pipe.module.js +0 -19
  405. package/esm2015/scroll/src/scroll-container/scroll-container.component.js +0 -69
  406. package/esm2015/scroll/src/scroll.module.js +0 -17
  407. package/esm2015/table/src/column/column-cell.directive.js +0 -15
  408. package/esm2015/table/src/column/column-footer.directive.js +0 -15
  409. package/esm2015/table/src/column/column-header.directive.js +0 -15
  410. package/esm2015/table/src/column/column.directive.js +0 -28
  411. package/esm2015/table/src/infinite-table/infinite-table.component.js +0 -92
  412. package/esm2015/table/src/paginated-table/paginated-table.component.js +0 -43
  413. package/esm2015/table/src/paginator/paginator.component.js +0 -12
  414. package/esm2015/table/src/table/table.component.js +0 -119
  415. package/esm2015/table/src/table.module.js +0 -74
  416. package/esm2015/table/src/td/td.component.js +0 -19
  417. package/esm2015/table/src/th/th.component.js +0 -19
  418. package/fesm2015/main-class-componentes-arquivo.js +0 -338
  419. package/fesm2015/main-class-componentes-arquivo.js.map +0 -1
  420. package/fesm2015/main-class-componentes-core.js.map +0 -1
  421. package/fesm2015/main-class-componentes-crud.js.map +0 -1
  422. package/fesm2015/main-class-componentes-date.js +0 -143
  423. package/fesm2015/main-class-componentes-date.js.map +0 -1
  424. package/fesm2015/main-class-componentes-dialog.js +0 -185
  425. package/fesm2015/main-class-componentes-dialog.js.map +0 -1
  426. package/fesm2015/main-class-componentes-form.js +0 -191
  427. package/fesm2015/main-class-componentes-form.js.map +0 -1
  428. package/fesm2015/main-class-componentes-input.js +0 -1611
  429. package/fesm2015/main-class-componentes-input.js.map +0 -1
  430. package/fesm2015/main-class-componentes-loader.js +0 -214
  431. package/fesm2015/main-class-componentes-loader.js.map +0 -1
  432. package/fesm2015/main-class-componentes-misc.js +0 -688
  433. package/fesm2015/main-class-componentes-misc.js.map +0 -1
  434. package/fesm2015/main-class-componentes-model.js.map +0 -1
  435. package/fesm2015/main-class-componentes-pipe.js +0 -40
  436. package/fesm2015/main-class-componentes-pipe.js.map +0 -1
  437. package/fesm2015/main-class-componentes-scroll.js +0 -91
  438. package/fesm2015/main-class-componentes-scroll.js.map +0 -1
  439. package/fesm2015/main-class-componentes-table.js +0 -446
  440. package/fesm2015/main-class-componentes-table.js.map +0 -1
  441. package/fesm2015/main-class-componentes-util.js.map +0 -1
  442. package/fesm2015/main-class-componentes.js.map +0 -1
  443. package/form/main-class-componentes-form.d.ts +0 -4
  444. package/form/main-class-componentes-form.metadata.json +0 -1
  445. package/form/package.json +0 -11
  446. package/input/main-class-componentes-input.d.ts +0 -5
  447. package/input/main-class-componentes-input.metadata.json +0 -1
  448. package/input/package.json +0 -11
  449. package/loader/main-class-componentes-loader.d.ts +0 -4
  450. package/loader/main-class-componentes-loader.metadata.json +0 -1
  451. package/loader/package.json +0 -11
  452. package/main-class-componentes.metadata.json +0 -1
  453. package/misc/main-class-componentes-misc.d.ts +0 -4
  454. package/misc/main-class-componentes-misc.metadata.json +0 -1
  455. package/misc/package.json +0 -11
  456. package/model/main-class-componentes-model.d.ts +0 -4
  457. package/model/main-class-componentes-model.metadata.json +0 -1
  458. package/model/package.json +0 -11
  459. package/pipe/main-class-componentes-pipe.d.ts +0 -4
  460. package/pipe/main-class-componentes-pipe.metadata.json +0 -1
  461. package/pipe/package.json +0 -11
  462. package/scroll/main-class-componentes-scroll.d.ts +0 -4
  463. package/scroll/main-class-componentes-scroll.metadata.json +0 -1
  464. package/scroll/package.json +0 -11
  465. package/table/main-class-componentes-table.d.ts +0 -5
  466. package/table/main-class-componentes-table.metadata.json +0 -1
  467. package/table/package.json +0 -11
  468. package/util/main-class-componentes-util.d.ts +0 -4
  469. package/util/main-class-componentes-util.metadata.json +0 -1
  470. package/util/package.json +0 -11
  471. /package/{esm2015/arquivo/index.js → esm2020/arquivo/index.mjs} +0 -0
  472. /package/{esm2015/arquivo/main-class-componentes-arquivo.js → esm2020/arquivo/main-class-componentes-arquivo.mjs} +0 -0
  473. /package/{esm2015/arquivo/src/arquivo-manager.service.js → esm2020/arquivo/src/arquivo-manager.service.mjs} +0 -0
  474. /package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  475. /package/{esm2015/core/main-class-componentes-core.js → esm2020/core/main-class-componentes-core.mjs} +0 -0
  476. /package/{esm2015/crud/index.js → esm2020/crud/index.mjs} +0 -0
  477. /package/{esm2015/crud/main-class-componentes-crud.js → esm2020/crud/main-class-componentes-crud.mjs} +0 -0
  478. /package/{esm2015/date/index.js → esm2020/date/index.mjs} +0 -0
  479. /package/{esm2015/date/main-class-componentes-date.js → esm2020/date/main-class-componentes-date.mjs} +0 -0
  480. /package/{esm2015/dialog/index.js → esm2020/dialog/index.mjs} +0 -0
  481. /package/{esm2015/dialog/main-class-componentes-dialog.js → esm2020/dialog/main-class-componentes-dialog.mjs} +0 -0
  482. /package/{esm2015/form/index.js → esm2020/form/index.mjs} +0 -0
  483. /package/{esm2015/form/main-class-componentes-form.js → esm2020/form/main-class-componentes-form.mjs} +0 -0
  484. /package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  485. /package/{esm2015/input/src/option-checkbox/node-pool.js → esm2020/input/src/option-checkbox/node-pool.mjs} +0 -0
  486. /package/{esm2015/input/src/option-checkbox/option-node.js → esm2020/input/src/option-checkbox/option-node.mjs} +0 -0
  487. /package/{esm2015/loader/index.js → esm2020/loader/index.mjs} +0 -0
  488. /package/{esm2015/loader/main-class-componentes-loader.js → esm2020/loader/main-class-componentes-loader.mjs} +0 -0
  489. /package/{esm2015/main-class-componentes.js → esm2020/main-class-componentes.mjs} +0 -0
  490. /package/{esm2015/misc/index.js → esm2020/misc/index.mjs} +0 -0
  491. /package/{esm2015/misc/main-class-componentes-misc.js → esm2020/misc/main-class-componentes-misc.mjs} +0 -0
  492. /package/{esm2015/model/index.js → esm2020/model/index.mjs} +0 -0
  493. /package/{esm2015/model/main-class-componentes-model.js → esm2020/model/main-class-componentes-model.mjs} +0 -0
  494. /package/{esm2015/pipe/index.js → esm2020/pipe/index.mjs} +0 -0
  495. /package/{esm2015/pipe/main-class-componentes-pipe.js → esm2020/pipe/main-class-componentes-pipe.mjs} +0 -0
  496. /package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  497. /package/{esm2015/scroll/index.js → esm2020/scroll/index.mjs} +0 -0
  498. /package/{esm2015/scroll/main-class-componentes-scroll.js → esm2020/scroll/main-class-componentes-scroll.mjs} +0 -0
  499. /package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  500. /package/{esm2015/table/src/paginator-i18n.js → esm2020/table/src/paginator-i18n.mjs} +0 -0
  501. /package/{esm2015/util/index.js → esm2020/util/index.mjs} +0 -0
  502. /package/{esm2015/util/main-class-componentes-util.js → esm2020/util/main-class-componentes-util.mjs} +0 -0
  503. /package/{esm2015/util/src/string.util.js → esm2020/util/src/string.util.mjs} +0 -0
@@ -1,2251 +0,0 @@
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
- OptionCheckboxModule.forRoot = function () {
1433
- return {
1434
- ngModule: OptionCheckboxModule,
1435
- providers: [
1436
- OptionCheckboxService
1437
- ]
1438
- };
1439
- };
1440
- return OptionCheckboxModule;
1441
- }());
1442
- OptionCheckboxModule.decorators = [
1443
- { type: core.NgModule, args: [{
1444
- declarations: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
1445
- exports: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
1446
- imports: [
1447
- common.CommonModule,
1448
- forms.FormsModule,
1449
- checkbox.MatCheckboxModule,
1450
- ]
1451
- },] }
1452
- ];
1453
-
1454
- var SelectItemComponent = /** @class */ (function () {
1455
- function SelectItemComponent() {
1456
- }
1457
- SelectItemComponent.prototype.ngOnInit = function () {
1458
- };
1459
- return SelectItemComponent;
1460
- }());
1461
- SelectItemComponent.decorators = [
1462
- { type: core.Component, args: [{
1463
- selector: 'mcl-select-item',
1464
- template: "",
1465
- styles: [""]
1466
- },] }
1467
- ];
1468
- SelectItemComponent.ctorParameters = function () { return []; };
1469
- SelectItemComponent.propDecorators = {
1470
- label: [{ type: core.Input }],
1471
- value: [{ type: core.Input }]
1472
- };
1473
-
1474
- var SelectChipsComponent = /** @class */ (function () {
1475
- function SelectChipsComponent(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1476
- var _this = this;
1477
- this.errorStateMatcher = errorStateMatcher;
1478
- this.ngControl = ngControl;
1479
- this.parentForm = parentForm;
1480
- this.parentFormGroup = parentFormGroup;
1481
- this.onChange = function (val) {
1482
- };
1483
- this.onTouched = function () {
1484
- };
1485
- this.$disabled = false;
1486
- this.$required = false;
1487
- this.focused = false;
1488
- this.filterCtrl = new forms.FormControl();
1489
- this.stateChanges = new rxjs.Subject();
1490
- this.id = "select-chips-" + SelectChipsComponent.nextId++;
1491
- this.describedBy = '';
1492
- if (this.ngControl != null) {
1493
- this.ngControl.valueAccessor = this;
1494
- }
1495
- this.opcoesFiltradas = this.filterCtrl.valueChanges.pipe(operators.startWith(null), operators.map(function (filtro) { return _this._filter(filtro); }));
1496
- }
1497
- Object.defineProperty(SelectChipsComponent.prototype, "value", {
1498
- get: function () {
1499
- return this.$value;
1500
- },
1501
- set: function (value) {
1502
- this.$value = value;
1503
- this.stateChanges.next();
1504
- },
1505
- enumerable: false,
1506
- configurable: true
1507
- });
1508
- Object.defineProperty(SelectChipsComponent.prototype, "empty", {
1509
- get: function () {
1510
- return !this.value;
1511
- },
1512
- enumerable: false,
1513
- configurable: true
1514
- });
1515
- SelectChipsComponent.prototype.onContainerClick = function (event) {
1516
- };
1517
- Object.defineProperty(SelectChipsComponent.prototype, "shouldLabelFloat", {
1518
- get: function () {
1519
- return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
1520
- },
1521
- enumerable: false,
1522
- configurable: true
1523
- });
1524
- Object.defineProperty(SelectChipsComponent.prototype, "placeholder", {
1525
- get: function () {
1526
- return this.$placeholder;
1527
- },
1528
- set: function (plh) {
1529
- this.$placeholder = plh;
1530
- this.stateChanges.next();
1531
- },
1532
- enumerable: false,
1533
- configurable: true
1534
- });
1535
- Object.defineProperty(SelectChipsComponent.prototype, "required", {
1536
- get: function () {
1537
- return this.$required;
1538
- },
1539
- set: function (value) {
1540
- this.$required = coercion.coerceBooleanProperty(value);
1541
- this.stateChanges.next();
1542
- },
1543
- enumerable: false,
1544
- configurable: true
1545
- });
1546
- Object.defineProperty(SelectChipsComponent.prototype, "disabled", {
1547
- get: function () {
1548
- return this.$disabled;
1549
- },
1550
- set: function (value) {
1551
- this.$disabled = coercion.coerceBooleanProperty(value);
1552
- this.stateChanges.next();
1553
- },
1554
- enumerable: false,
1555
- configurable: true
1556
- });
1557
- Object.defineProperty(SelectChipsComponent.prototype, "errorState", {
1558
- get: function () {
1559
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1560
- },
1561
- enumerable: false,
1562
- configurable: true
1563
- });
1564
- Object.defineProperty(SelectChipsComponent.prototype, "controlType", {
1565
- get: function () {
1566
- return 'select-chips';
1567
- },
1568
- enumerable: false,
1569
- configurable: true
1570
- });
1571
- SelectChipsComponent.prototype.setDescribedByIds = function (ids) {
1572
- this.describedBy = ids.join(' ');
1573
- };
1574
- SelectChipsComponent.prototype.ngOnDestroy = function () {
1575
- this.stateChanges.complete();
1576
- };
1577
- SelectChipsComponent.prototype.registerOnTouched = function (fn) {
1578
- this.onTouched = fn;
1579
- };
1580
- SelectChipsComponent.prototype.registerOnChange = function (fn) {
1581
- this.onChange = fn;
1582
- };
1583
- SelectChipsComponent.prototype.setDisabledState = function (isDisabled) {
1584
- this.disabled = isDisabled;
1585
- };
1586
- SelectChipsComponent.prototype.writeValue = function (value) {
1587
- this.value = value;
1588
- this.filterCtrl.setValue(this.filterCtrl.value);
1589
- };
1590
- SelectChipsComponent.prototype.add = function (event) {
1591
- this.onTouched();
1592
- var input = event.input;
1593
- var value = event.value;
1594
- var selected = util.StringUtil.normalize((value || ''));
1595
- var opcao = this.opcoes.toArray().find(function (op) { return util.StringUtil.normalize(op.label) === selected; });
1596
- if (opcao) {
1597
- if (!this.value || !this.value.find(function (v) { return v === opcao.value; })) {
1598
- this.value = __spread((this.value || []), [
1599
- opcao.value
1600
- ]);
1601
- this.onChange(this.value);
1602
- }
1603
- if (input) {
1604
- input.value = '';
1605
- }
1606
- this.filterCtrl.setValue(null);
1607
- }
1608
- };
1609
- SelectChipsComponent.prototype.remove = function (item) {
1610
- this.onTouched();
1611
- if (this.value) {
1612
- var index = this.value.indexOf(item);
1613
- if (index >= 0) {
1614
- this.value.splice(index, 1);
1615
- }
1616
- if (!this.value.length) {
1617
- this.value = undefined;
1618
- }
1619
- this.onChange(this.value);
1620
- }
1621
- };
1622
- SelectChipsComponent.prototype.selected = function (event) {
1623
- this.onTouched();
1624
- if (!this.value || !this.value.find(function (v) { return v === event.option.value; })) {
1625
- this.value = __spread((this.value || []), [
1626
- event.option.value
1627
- ]);
1628
- this.onChange(this.value);
1629
- }
1630
- this.filterInput.nativeElement.value = '';
1631
- this.filterCtrl.setValue(null);
1632
- };
1633
- SelectChipsComponent.prototype._filter = function (filtro) {
1634
- var _this = this;
1635
- var filterValue = filtro && util.StringUtil.normalize(filtro);
1636
- return this.opcoes.toArray()
1637
- .filter(function (opcao) { return !_this.value || _this.value.indexOf(opcao.value) < 0; })
1638
- .filter(function (opcao) { return !filterValue || util.StringUtil.normalize(opcao.label).indexOf(filterValue) >= 0; });
1639
- };
1640
- return SelectChipsComponent;
1641
- }());
1642
- SelectChipsComponent.nextId = 0;
1643
- SelectChipsComponent.decorators = [
1644
- { type: core.Component, args: [{
1645
- selector: 'mcl-select-chips',
1646
- 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",
1647
- providers: [
1648
- {
1649
- provide: formField.MatFormFieldControl,
1650
- useExisting: SelectChipsComponent
1651
- }
1652
- ],
1653
- styles: [""]
1654
- },] }
1655
- ];
1656
- SelectChipsComponent.ctorParameters = function () { return [
1657
- { type: core$1.ErrorStateMatcher },
1658
- { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
1659
- { type: forms.NgForm, decorators: [{ type: core.Optional }] },
1660
- { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] }
1661
- ]; };
1662
- SelectChipsComponent.propDecorators = {
1663
- input: [{ type: core.ViewChild, args: ['input',] }],
1664
- id: [{ type: core.HostBinding }],
1665
- describedBy: [{ type: core.HostBinding, args: ['attr.aria-describedby',] }],
1666
- opcoes: [{ type: core.ContentChildren, args: [SelectItemComponent,] }],
1667
- filterInput: [{ type: core.ViewChild, args: ['filterInput',] }],
1668
- filterAutocomplete: [{ type: core.ViewChild, args: ['filterAutocomplete',] }],
1669
- shouldLabelFloat: [{ type: core.HostBinding, args: ['class.floating',] }],
1670
- placeholder: [{ type: core.Input }],
1671
- required: [{ type: core.Input }],
1672
- disabled: [{ type: core.Input }]
1673
- };
1674
-
1675
- var SelectItemModule = /** @class */ (function () {
1676
- function SelectItemModule() {
1677
- }
1678
- return SelectItemModule;
1679
- }());
1680
- SelectItemModule.decorators = [
1681
- { type: core.NgModule, args: [{
1682
- declarations: [SelectItemComponent],
1683
- exports: [SelectItemComponent],
1684
- imports: [
1685
- common.CommonModule,
1686
- ],
1687
- },] }
1688
- ];
1689
-
1690
- var SelectChipsModule = /** @class */ (function () {
1691
- function SelectChipsModule() {
1692
- }
1693
- return SelectChipsModule;
1694
- }());
1695
- SelectChipsModule.decorators = [
1696
- { type: core.NgModule, args: [{
1697
- declarations: [SelectChipsComponent],
1698
- exports: [SelectChipsComponent, SelectItemModule],
1699
- imports: [
1700
- common.CommonModule,
1701
- chips.MatChipsModule,
1702
- icon.MatIconModule,
1703
- forms.ReactiveFormsModule,
1704
- autocomplete.MatAutocompleteModule,
1705
- SelectItemModule,
1706
- ],
1707
- },] }
1708
- ];
1709
-
1710
- var SelectManyCheckboxComponent = /** @class */ (function () {
1711
- function SelectManyCheckboxComponent(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1712
- this.errorStateMatcher = errorStateMatcher;
1713
- this.ngControl = ngControl;
1714
- this.parentForm = parentForm;
1715
- this.parentFormGroup = parentFormGroup;
1716
- this.onChange = function (val) {
1717
- };
1718
- this.onTouched = function () {
1719
- };
1720
- this.$disabled = false;
1721
- this.$required = false;
1722
- this.layout = 'grid';
1723
- this.layoutColumns = 3;
1724
- this.stateChanges = new rxjs.Subject();
1725
- this.id = "select-radio-" + SelectManyCheckboxComponent.nextId++;
1726
- this.describedBy = '';
1727
- if (this.ngControl != null) {
1728
- this.ngControl.valueAccessor = this;
1729
- }
1730
- }
1731
- SelectManyCheckboxComponent.prototype.ngAfterViewInit = function () {
1732
- var _this = this;
1733
- this.opcoes.changes.subscribe(function () {
1734
- _this.updateOpcoes();
1735
- });
1736
- };
1737
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "value", {
1738
- get: function () {
1739
- return this.$value;
1740
- },
1741
- set: function (value) {
1742
- this.$value = value;
1743
- this.onChange(value);
1744
- this.stateChanges.next();
1745
- },
1746
- enumerable: false,
1747
- configurable: true
1748
- });
1749
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "focused", {
1750
- get: function () {
1751
- return false;
1752
- },
1753
- enumerable: false,
1754
- configurable: true
1755
- });
1756
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "empty", {
1757
- get: function () {
1758
- return !this.value;
1759
- },
1760
- enumerable: false,
1761
- configurable: true
1762
- });
1763
- SelectManyCheckboxComponent.prototype.onContainerClick = function (event) {
1764
- };
1765
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "shouldLabelFloat", {
1766
- get: function () {
1767
- return true;
1768
- },
1769
- enumerable: false,
1770
- configurable: true
1771
- });
1772
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "placeholder", {
1773
- get: function () {
1774
- return this.$placeholder;
1775
- },
1776
- set: function (plh) {
1777
- this.$placeholder = plh;
1778
- this.stateChanges.next();
1779
- },
1780
- enumerable: false,
1781
- configurable: true
1782
- });
1783
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "required", {
1784
- get: function () {
1785
- return this.$required;
1786
- },
1787
- set: function (value) {
1788
- this.$required = coercion.coerceBooleanProperty(value);
1789
- this.stateChanges.next();
1790
- },
1791
- enumerable: false,
1792
- configurable: true
1793
- });
1794
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "disabled", {
1795
- get: function () {
1796
- return this.$disabled;
1797
- },
1798
- set: function (value) {
1799
- this.$disabled = coercion.coerceBooleanProperty(value);
1800
- this.stateChanges.next();
1801
- },
1802
- enumerable: false,
1803
- configurable: true
1804
- });
1805
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "errorState", {
1806
- get: function () {
1807
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1808
- },
1809
- enumerable: false,
1810
- configurable: true
1811
- });
1812
- Object.defineProperty(SelectManyCheckboxComponent.prototype, "controlType", {
1813
- get: function () {
1814
- return 'select-chips';
1815
- },
1816
- enumerable: false,
1817
- configurable: true
1818
- });
1819
- SelectManyCheckboxComponent.prototype.setDescribedByIds = function (ids) {
1820
- this.describedBy = ids.join(' ');
1821
- };
1822
- SelectManyCheckboxComponent.prototype.ngOnDestroy = function () {
1823
- this.stateChanges.complete();
1824
- };
1825
- SelectManyCheckboxComponent.prototype.registerOnTouched = function (fn) {
1826
- this.onTouched = fn;
1827
- };
1828
- SelectManyCheckboxComponent.prototype.registerOnChange = function (fn) {
1829
- this.onChange = fn;
1830
- };
1831
- SelectManyCheckboxComponent.prototype.setDisabledState = function (isDisabled) {
1832
- this.disabled = isDisabled;
1833
- };
1834
- SelectManyCheckboxComponent.prototype.writeValue = function (value) {
1835
- this.updateOpcoes(value);
1836
- this.$value = value;
1837
- };
1838
- SelectManyCheckboxComponent.prototype.change = function (opcao, selected) {
1839
- opcao._selected = selected;
1840
- this.value = this.opcoesToValue();
1841
- };
1842
- SelectManyCheckboxComponent.prototype.updateOpcoes = function (value) {
1843
- var e_1, _a;
1844
- if (value === void 0) { value = this.value; }
1845
- try {
1846
- for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
1847
- var opcao = _c.value;
1848
- opcao._selected = value && value.indexOf(opcao.value) >= 0;
1849
- }
1850
- }
1851
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1852
- finally {
1853
- try {
1854
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1855
- }
1856
- finally { if (e_1) throw e_1.error; }
1857
- }
1858
- };
1859
- SelectManyCheckboxComponent.prototype.opcoesToValue = function () {
1860
- var e_2, _a;
1861
- var val = [];
1862
- try {
1863
- for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
1864
- var opcao = _c.value;
1865
- if (opcao._selected) {
1866
- val.push(opcao.value);
1867
- }
1868
- }
1869
- }
1870
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1871
- finally {
1872
- try {
1873
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1874
- }
1875
- finally { if (e_2) throw e_2.error; }
1876
- }
1877
- return val.length ? val : undefined;
1878
- };
1879
- return SelectManyCheckboxComponent;
1880
- }());
1881
- SelectManyCheckboxComponent.nextId = 0;
1882
- SelectManyCheckboxComponent.decorators = [
1883
- { type: core.Component, args: [{
1884
- selector: 'mcl-select-many-checkbox',
1885
- 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",
1886
- providers: [
1887
- {
1888
- provide: formField.MatFormFieldControl,
1889
- useExisting: SelectManyCheckboxComponent
1890
- }
1891
- ],
1892
- 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}}"]
1893
- },] }
1894
- ];
1895
- SelectManyCheckboxComponent.ctorParameters = function () { return [
1896
- { type: core$1.ErrorStateMatcher },
1897
- { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
1898
- { type: forms.NgForm, decorators: [{ type: core.Optional }] },
1899
- { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] }
1900
- ]; };
1901
- SelectManyCheckboxComponent.propDecorators = {
1902
- layout: [{ type: core.Input }],
1903
- layoutColumns: [{ type: core.Input }],
1904
- input: [{ type: core.ViewChild, args: ['input',] }],
1905
- id: [{ type: core.HostBinding }],
1906
- describedBy: [{ type: core.HostBinding, args: ['attr.aria-describedby',] }],
1907
- opcoes: [{ type: core.ContentChildren, args: [SelectItemComponent,] }],
1908
- shouldLabelFloat: [{ type: core.HostBinding, args: ['class.floating',] }],
1909
- placeholder: [{ type: core.Input }],
1910
- required: [{ type: core.Input }],
1911
- disabled: [{ type: core.Input }]
1912
- };
1913
-
1914
- var SelectManyCheckboxModule = /** @class */ (function () {
1915
- function SelectManyCheckboxModule() {
1916
- }
1917
- return SelectManyCheckboxModule;
1918
- }());
1919
- SelectManyCheckboxModule.decorators = [
1920
- { type: core.NgModule, args: [{
1921
- declarations: [SelectManyCheckboxComponent],
1922
- exports: [SelectManyCheckboxComponent, SelectItemModule],
1923
- imports: [
1924
- common.CommonModule,
1925
- forms.FormsModule,
1926
- SelectItemModule,
1927
- checkbox.MatCheckboxModule
1928
- ],
1929
- },] }
1930
- ];
1931
-
1932
- var SelectRadioComponent = /** @class */ (function () {
1933
- function SelectRadioComponent(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1934
- this.errorStateMatcher = errorStateMatcher;
1935
- this.ngControl = ngControl;
1936
- this.parentForm = parentForm;
1937
- this.parentFormGroup = parentFormGroup;
1938
- this.onChange = function (val) {
1939
- };
1940
- this.onTouched = function () {
1941
- };
1942
- this.$disabled = false;
1943
- this.$required = false;
1944
- this.layout = 'vertical';
1945
- this.stateChanges = new rxjs.Subject();
1946
- this.id = "select-radio-" + SelectRadioComponent.nextId++;
1947
- this.describedBy = '';
1948
- if (this.ngControl != null) {
1949
- this.ngControl.valueAccessor = this;
1950
- }
1951
- }
1952
- Object.defineProperty(SelectRadioComponent.prototype, "value", {
1953
- get: function () {
1954
- return this.$value;
1955
- },
1956
- set: function (value) {
1957
- this.$value = value;
1958
- this.onChange(value);
1959
- this.stateChanges.next();
1960
- },
1961
- enumerable: false,
1962
- configurable: true
1963
- });
1964
- Object.defineProperty(SelectRadioComponent.prototype, "focused", {
1965
- get: function () {
1966
- return false;
1967
- },
1968
- enumerable: false,
1969
- configurable: true
1970
- });
1971
- Object.defineProperty(SelectRadioComponent.prototype, "empty", {
1972
- get: function () {
1973
- return !this.value;
1974
- },
1975
- enumerable: false,
1976
- configurable: true
1977
- });
1978
- SelectRadioComponent.prototype.onContainerClick = function (event) {
1979
- };
1980
- Object.defineProperty(SelectRadioComponent.prototype, "shouldLabelFloat", {
1981
- get: function () {
1982
- return true;
1983
- },
1984
- enumerable: false,
1985
- configurable: true
1986
- });
1987
- Object.defineProperty(SelectRadioComponent.prototype, "placeholder", {
1988
- get: function () {
1989
- return this.$placeholder;
1990
- },
1991
- set: function (plh) {
1992
- this.$placeholder = plh;
1993
- this.stateChanges.next();
1994
- },
1995
- enumerable: false,
1996
- configurable: true
1997
- });
1998
- Object.defineProperty(SelectRadioComponent.prototype, "required", {
1999
- get: function () {
2000
- return this.$required;
2001
- },
2002
- set: function (value) {
2003
- this.$required = coercion.coerceBooleanProperty(value);
2004
- this.stateChanges.next();
2005
- },
2006
- enumerable: false,
2007
- configurable: true
2008
- });
2009
- Object.defineProperty(SelectRadioComponent.prototype, "disabled", {
2010
- get: function () {
2011
- return this.$disabled;
2012
- },
2013
- set: function (value) {
2014
- this.$disabled = coercion.coerceBooleanProperty(value);
2015
- this.stateChanges.next();
2016
- },
2017
- enumerable: false,
2018
- configurable: true
2019
- });
2020
- Object.defineProperty(SelectRadioComponent.prototype, "errorState", {
2021
- get: function () {
2022
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
2023
- },
2024
- enumerable: false,
2025
- configurable: true
2026
- });
2027
- Object.defineProperty(SelectRadioComponent.prototype, "controlType", {
2028
- get: function () {
2029
- return 'select-chips';
2030
- },
2031
- enumerable: false,
2032
- configurable: true
2033
- });
2034
- SelectRadioComponent.prototype.setDescribedByIds = function (ids) {
2035
- this.describedBy = ids.join(' ');
2036
- };
2037
- SelectRadioComponent.prototype.ngOnDestroy = function () {
2038
- this.stateChanges.complete();
2039
- };
2040
- SelectRadioComponent.prototype.registerOnTouched = function (fn) {
2041
- this.onTouched = fn;
2042
- };
2043
- SelectRadioComponent.prototype.registerOnChange = function (fn) {
2044
- this.onChange = fn;
2045
- };
2046
- SelectRadioComponent.prototype.setDisabledState = function (isDisabled) {
2047
- this.disabled = isDisabled;
2048
- };
2049
- SelectRadioComponent.prototype.writeValue = function (value) {
2050
- this.value = value;
2051
- };
2052
- return SelectRadioComponent;
2053
- }());
2054
- SelectRadioComponent.nextId = 0;
2055
- SelectRadioComponent.decorators = [
2056
- { type: core.Component, args: [{
2057
- selector: 'mcl-select-radio',
2058
- 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",
2059
- providers: [
2060
- {
2061
- provide: formField.MatFormFieldControl,
2062
- useExisting: SelectRadioComponent
2063
- }
2064
- ],
2065
- 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}}"]
2066
- },] }
2067
- ];
2068
- SelectRadioComponent.ctorParameters = function () { return [
2069
- { type: core$1.ErrorStateMatcher },
2070
- { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
2071
- { type: forms.NgForm, decorators: [{ type: core.Optional }] },
2072
- { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] }
2073
- ]; };
2074
- SelectRadioComponent.propDecorators = {
2075
- layout: [{ type: core.Input }],
2076
- input: [{ type: core.ViewChild, args: ['input',] }],
2077
- id: [{ type: core.HostBinding }],
2078
- describedBy: [{ type: core.HostBinding, args: ['attr.aria-describedby',] }],
2079
- opcoes: [{ type: core.ContentChildren, args: [SelectItemComponent,] }],
2080
- shouldLabelFloat: [{ type: core.HostBinding, args: ['class.floating',] }],
2081
- placeholder: [{ type: core.Input }],
2082
- required: [{ type: core.Input }],
2083
- disabled: [{ type: core.Input }]
2084
- };
2085
-
2086
- var SelectRadioModule = /** @class */ (function () {
2087
- function SelectRadioModule() {
2088
- }
2089
- return SelectRadioModule;
2090
- }());
2091
- SelectRadioModule.decorators = [
2092
- { type: core.NgModule, args: [{
2093
- declarations: [SelectRadioComponent],
2094
- exports: [SelectRadioComponent, SelectItemModule],
2095
- imports: [
2096
- common.CommonModule,
2097
- forms.FormsModule,
2098
- SelectItemModule,
2099
- radio.MatRadioModule
2100
- ],
2101
- },] }
2102
- ];
2103
-
2104
- var InputTelefoneInternacionalComponent = /** @class */ (function (_super) {
2105
- __extends(InputTelefoneInternacionalComponent, _super);
2106
- function InputTelefoneInternacionalComponent(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
2107
- var _this = _super.call(this, errorStateMatcher, ngControl, parentForm, parentFormGroup) || this;
2108
- _this.preferredContries = ['br'];
2109
- _this.blur = new core.EventEmitter();
2110
- _this.alwaysShowCountry = false;
2111
- return _this;
2112
- }
2113
- Object.defineProperty(InputTelefoneInternacionalComponent.prototype, "value", {
2114
- get: function () {
2115
- return this.$innerValue;
2116
- },
2117
- set: function (value) {
2118
- this.$innerValue = value;
2119
- this.stateChanges.next();
2120
- this.onChange(value === null || value === void 0 ? void 0 : value.replace(/[^\d+]/g, ''));
2121
- },
2122
- enumerable: false,
2123
- configurable: true
2124
- });
2125
- Object.defineProperty(InputTelefoneInternacionalComponent.prototype, "shouldLabelFloat", {
2126
- get: function () {
2127
- return this.focused || !this.empty || this.alwaysShowCountry;
2128
- },
2129
- enumerable: false,
2130
- configurable: true
2131
- });
2132
- Object.defineProperty(InputTelefoneInternacionalComponent.prototype, "empty", {
2133
- get: function () {
2134
- return !this.value;
2135
- },
2136
- enumerable: false,
2137
- configurable: true
2138
- });
2139
- InputTelefoneInternacionalComponent.prototype.onFocus = function () {
2140
- this.focused = true;
2141
- this.stateChanges.next();
2142
- };
2143
- InputTelefoneInternacionalComponent.prototype.onBlur = function () {
2144
- this.focused = false;
2145
- this.stateChanges.next();
2146
- this.blur.emit();
2147
- };
2148
- InputTelefoneInternacionalComponent.prototype.writeValue = function (value) {
2149
- this.value = value;
2150
- };
2151
- return InputTelefoneInternacionalComponent;
2152
- }(AbstractMatFormFieldControl));
2153
- InputTelefoneInternacionalComponent.decorators = [
2154
- { type: core.Component, args: [{
2155
- selector: 'mcl-input-telefone-intl',
2156
- 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",
2157
- providers: [
2158
- {
2159
- provide: formField.MatFormFieldControl,
2160
- useExisting: InputTelefoneInternacionalComponent
2161
- },
2162
- ],
2163
- 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}"]
2164
- },] }
2165
- ];
2166
- InputTelefoneInternacionalComponent.ctorParameters = function () { return [
2167
- { type: core$1.ErrorStateMatcher },
2168
- { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
2169
- { type: forms.NgForm, decorators: [{ type: core.Optional }] },
2170
- { type: forms.FormGroupDirective, decorators: [{ type: core.Optional }] }
2171
- ]; };
2172
- InputTelefoneInternacionalComponent.propDecorators = {
2173
- preferredContries: [{ type: core.Input }],
2174
- readonly: [{ type: core.Input }],
2175
- blur: [{ type: core.Output }],
2176
- alwaysShowCountry: [{ type: core.Input }],
2177
- telInput: [{ type: core.ViewChild, args: ['input',] }]
2178
- };
2179
-
2180
- var InputTelefoneInternacionalValidatorDirective = /** @class */ (function () {
2181
- function InputTelefoneInternacionalValidatorDirective() {
2182
- }
2183
- InputTelefoneInternacionalValidatorDirective.prototype.validate = function (control) {
2184
- return lacMatTelInput.phoneNumberValidator(control);
2185
- };
2186
- return InputTelefoneInternacionalValidatorDirective;
2187
- }());
2188
- InputTelefoneInternacionalValidatorDirective.decorators = [
2189
- { type: core.Directive, args: [{
2190
- selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
2191
- providers: [{
2192
- provide: forms.NG_VALIDATORS,
2193
- useExisting: InputTelefoneInternacionalValidatorDirective,
2194
- multi: true,
2195
- }]
2196
- },] }
2197
- ];
2198
- InputTelefoneInternacionalValidatorDirective.ctorParameters = function () { return []; };
2199
-
2200
- var InputTelefoneInternacionalModule = /** @class */ (function () {
2201
- function InputTelefoneInternacionalModule() {
2202
- }
2203
- return InputTelefoneInternacionalModule;
2204
- }());
2205
- InputTelefoneInternacionalModule.decorators = [
2206
- { type: core.NgModule, args: [{
2207
- declarations: [InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective],
2208
- exports: [
2209
- InputTelefoneInternacionalComponent,
2210
- InputTelefoneInternacionalValidatorDirective
2211
- ],
2212
- imports: [
2213
- common.CommonModule,
2214
- forms.FormsModule,
2215
- lacMatTelInput.LacMatTelInputModule,
2216
- ]
2217
- },] }
2218
- ];
2219
-
2220
- /**
2221
- * Generated bundle index. Do not edit.
2222
- */
2223
-
2224
- exports.AbstractMatFormFieldControl = AbstractMatFormFieldControl;
2225
- exports.AllOptionCheckboxComponent = AllOptionCheckboxComponent;
2226
- exports.InputDatetimeComponent = InputDatetimeComponent;
2227
- exports.InputDatetimeModule = InputDatetimeModule;
2228
- exports.InputFileUploadComponent = InputFileUploadComponent;
2229
- exports.InputFileUploadValidatorDirective = InputFileUploadValidatorDirective;
2230
- exports.InputFileuploadModule = InputFileuploadModule;
2231
- exports.InputTelefoneInternacionalComponent = InputTelefoneInternacionalComponent;
2232
- exports.InputTelefoneInternacionalModule = InputTelefoneInternacionalModule;
2233
- exports.InputTelefoneInternacionalValidatorDirective = InputTelefoneInternacionalValidatorDirective;
2234
- exports.OptionCheckboxComponent = OptionCheckboxComponent;
2235
- exports.OptionCheckboxGroupComponent = OptionCheckboxGroupComponent;
2236
- exports.OptionCheckboxModule = OptionCheckboxModule;
2237
- exports.SelectChipsComponent = SelectChipsComponent;
2238
- exports.SelectChipsModule = SelectChipsModule;
2239
- exports.SelectItemComponent = SelectItemComponent;
2240
- exports.SelectItemModule = SelectItemModule;
2241
- exports.SelectManyCheckboxComponent = SelectManyCheckboxComponent;
2242
- exports.SelectManyCheckboxModule = SelectManyCheckboxModule;
2243
- exports.SelectRadioComponent = SelectRadioComponent;
2244
- exports.SelectRadioModule = SelectRadioModule;
2245
- exports.ɵ0 = ɵ0;
2246
- exports.ɵa = OptionCheckboxService;
2247
-
2248
- Object.defineProperty(exports, '__esModule', { value: true });
2249
-
2250
- })));
2251
- //# sourceMappingURL=main-class-componentes-input.umd.js.map