@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,1611 +0,0 @@
1
- import { NgControl, NgForm, FormGroupDirective, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
2
- import { Subject, Observable, BehaviorSubject, combineLatest } from 'rxjs';
3
- import { Component, ViewChild, HostBinding, Input, Optional, Self, Inject, NgModule, LOCALE_ID, EventEmitter, ChangeDetectorRef, Output, Directive, Injectable, ContentChildren } from '@angular/core';
4
- import { ErrorStateMatcher, MAT_DATE_LOCALE } from '@angular/material/core';
5
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
6
- import { CommonModule } from '@angular/common';
7
- import { MatInputModule } from '@angular/material/input';
8
- import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepickerModule } from '@mat-datetimepicker/core';
9
- import { MomentDatetimeModule, MomentDatetimeAdapter } from '@mat-datetimepicker/moment';
10
- import { MatFormFieldControl } from '@angular/material/form-field';
11
- import * as moment from 'moment';
12
- import { MatDatepickerModule } from '@angular/material/datepicker';
13
- import { ModelModule } from '@main-class/componentes/model';
14
- import { __awaiter } from 'tslib';
15
- import { ARQUIVO_MANAGER_SERVICE, ArquivoModule } from '@main-class/componentes/arquivo';
16
- import { MatChipsModule } from '@angular/material/chips';
17
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
18
- import { MatIconModule } from '@angular/material/icon';
19
- import { FlexLayoutModule } from '@angular/flex-layout';
20
- import { MatButtonModule } from '@angular/material/button';
21
- import { MatTooltipModule } from '@angular/material/tooltip';
22
- import { switchMap, map, startWith } from 'rxjs/operators';
23
- import { MatCheckboxModule } from '@angular/material/checkbox';
24
- import { StringUtil } from '@main-class/componentes/util';
25
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
26
- import { MatRadioModule } from '@angular/material/radio';
27
- import { phoneNumberValidator, LacMatTelInputModule } from 'lac-mat-tel-input';
28
-
29
- // tslint:disable-next-line:component-class-suffix
30
- class AbstractMatFormFieldControl {
31
- constructor(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 Subject();
40
- this.id = `custom-input-${AbstractMatFormFieldControl.nextId++}`;
41
- this.describedBy = '';
42
- this.onChange = (val) => {
43
- };
44
- this.onTouched = () => {
45
- };
46
- if (this.ngControl != null) {
47
- this.ngControl.valueAccessor = this;
48
- }
49
- }
50
- get value() {
51
- return this.$value;
52
- }
53
- set value(value) {
54
- this.$value = value;
55
- this.onChange(value);
56
- this.stateChanges.next();
57
- }
58
- get empty() {
59
- return !this.value;
60
- }
61
- onContainerClick(event) {
62
- }
63
- get shouldLabelFloat() {
64
- return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
65
- }
66
- get placeholder() {
67
- return this.$placeholder;
68
- }
69
- set placeholder(plh) {
70
- this.$placeholder = plh;
71
- this.stateChanges.next();
72
- }
73
- get required() {
74
- return this.$required;
75
- }
76
- set required(value) {
77
- this.$required = coerceBooleanProperty(value);
78
- this.stateChanges.next();
79
- }
80
- get disabled() {
81
- return this.$disabled;
82
- }
83
- set disabled(value) {
84
- this.$disabled = coerceBooleanProperty(value);
85
- this.stateChanges.next();
86
- }
87
- get errorState() {
88
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
89
- }
90
- get controlType() {
91
- return 'custom-input';
92
- }
93
- setDescribedByIds(ids) {
94
- this.describedBy = ids.join(' ');
95
- }
96
- ngOnDestroy() {
97
- this.stateChanges.complete();
98
- }
99
- registerOnTouched(fn) {
100
- this.onTouched = fn;
101
- }
102
- registerOnChange(fn) {
103
- this.onChange = fn;
104
- }
105
- setDisabledState(isDisabled) {
106
- this.disabled = isDisabled;
107
- }
108
- writeValue(value) {
109
- this.$value = value;
110
- }
111
- }
112
- AbstractMatFormFieldControl.nextId = 0;
113
- AbstractMatFormFieldControl.decorators = [
114
- { type: Component, args: [{
115
- template: ''
116
- },] }
117
- ];
118
- AbstractMatFormFieldControl.ctorParameters = () => [
119
- { type: ErrorStateMatcher },
120
- { type: NgControl },
121
- { type: NgForm },
122
- { type: FormGroupDirective }
123
- ];
124
- AbstractMatFormFieldControl.propDecorators = {
125
- input: [{ type: ViewChild, args: ['input',] }],
126
- id: [{ type: HostBinding }],
127
- describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
128
- shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
129
- placeholder: [{ type: Input }],
130
- required: [{ type: Input }],
131
- disabled: [{ type: Input }]
132
- };
133
-
134
- class InputDatetimeComponent extends AbstractMatFormFieldControl {
135
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup, adapter, formats) {
136
- super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
137
- this.adapter = adapter;
138
- this.formats = formats;
139
- this.type = 'date';
140
- }
141
- get empty() {
142
- return !this.$maskedValue;
143
- }
144
- get maskedValue() {
145
- return this.$maskedValue;
146
- }
147
- set maskedValue(maskedValue) {
148
- if (this.$maskedValue !== maskedValue) {
149
- this.onTouched();
150
- this.$maskedValue = maskedValue;
151
- if (maskedValue) {
152
- if (maskedValue.match(new RegExp(`^${this.mask.replace(/#/g, '\\d')}$`))) {
153
- this.innerValue = this.adapter.parse(maskedValue, this.format).toDate();
154
- }
155
- else {
156
- this.innerValue = undefined;
157
- }
158
- }
159
- else {
160
- this.innerValue = undefined;
161
- }
162
- this.onChange(this.innerValue);
163
- this.stateChanges.next();
164
- }
165
- }
166
- get mask() {
167
- switch (this.type) {
168
- case 'date':
169
- return '##/##/####';
170
- case 'time':
171
- return '##:##';
172
- }
173
- return '##/##/#### ##:##';
174
- }
175
- get format() {
176
- switch (this.type) {
177
- case 'date':
178
- return this.formats.display.dateInput;
179
- case 'time':
180
- return this.formats.display.timeInput;
181
- }
182
- return this.formats.display.datetimeInput;
183
- }
184
- get value() {
185
- return this.innerValue;
186
- }
187
- set value(value) {
188
- if (this.innerValue !== value) {
189
- this.onTouched();
190
- if (value) {
191
- this.innerValue = value instanceof Date ? value : value.toDate();
192
- this.$maskedValue = this.adapter.format(moment(this.innerValue), this.format);
193
- }
194
- else {
195
- this.innerValue = undefined;
196
- this.$maskedValue = '';
197
- }
198
- this.onChange(this.innerValue);
199
- this.stateChanges.next();
200
- }
201
- }
202
- writeValue(value) {
203
- this.innerValue = value;
204
- if (value) {
205
- this.$maskedValue = this.adapter.format(moment(value), this.format);
206
- }
207
- else {
208
- this.$maskedValue = '';
209
- }
210
- this.stateChanges.next();
211
- }
212
- }
213
- InputDatetimeComponent.decorators = [
214
- { type: Component, args: [{
215
- selector: 'mcl-input-datetime',
216
- 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",
217
- providers: [
218
- {
219
- provide: MatFormFieldControl,
220
- useExisting: InputDatetimeComponent
221
- }
222
- ],
223
- styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]
224
- },] }
225
- ];
226
- InputDatetimeComponent.ctorParameters = () => [
227
- { type: ErrorStateMatcher },
228
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
229
- { type: NgForm, decorators: [{ type: Optional }] },
230
- { type: FormGroupDirective, decorators: [{ type: Optional }] },
231
- { type: DatetimeAdapter, decorators: [{ type: Inject, args: [DatetimeAdapter,] }] },
232
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DATETIME_FORMATS,] }] }
233
- ];
234
- InputDatetimeComponent.propDecorators = {
235
- type: [{ type: Input }],
236
- readonly: [{ type: Input }],
237
- name: [{ type: Input }],
238
- picker: [{ type: ViewChild, args: ['pickerData',] }]
239
- };
240
-
241
- const ɵ0 = {
242
- parse: {
243
- dateInput: 'L',
244
- monthInput: 'MMMM',
245
- timeInput: 'LT',
246
- datetimeInput: 'L LT'
247
- },
248
- display: {
249
- dateInput: 'L',
250
- monthInput: 'MMMM',
251
- datetimeInput: 'L LT',
252
- timeInput: 'LT',
253
- monthYearLabel: 'MMM YYYY',
254
- dateA11yLabel: 'LL',
255
- monthYearA11yLabel: 'MMMM YYYY',
256
- popupHeaderDateLabel: 'ddd, DD MMM'
257
- }
258
- };
259
- class InputDatetimeModule {
260
- }
261
- InputDatetimeModule.decorators = [
262
- { type: NgModule, args: [{
263
- declarations: [InputDatetimeComponent],
264
- imports: [
265
- CommonModule,
266
- MatInputModule,
267
- FormsModule,
268
- MatDatepickerModule,
269
- MatDatetimepickerModule,
270
- MomentDatetimeModule,
271
- ModelModule
272
- ],
273
- exports: [
274
- InputDatetimeComponent
275
- ],
276
- providers: [
277
- { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
278
- {
279
- provide: DatetimeAdapter,
280
- useClass: MomentDatetimeAdapter
281
- },
282
- {
283
- provide: MAT_DATETIME_FORMATS,
284
- useValue: ɵ0
285
- }
286
- ]
287
- },] }
288
- ];
289
-
290
- class InputFileUploadComponent {
291
- constructor(errorStateMatcher, ngControl, parentForm, changeDetectorRef, parentFormGroup, arquivoService) {
292
- this.errorStateMatcher = errorStateMatcher;
293
- this.ngControl = ngControl;
294
- this.parentForm = parentForm;
295
- this.changeDetectorRef = changeDetectorRef;
296
- this.parentFormGroup = parentFormGroup;
297
- this.arquivoService = arquivoService;
298
- this.$disabled = false;
299
- this.$required = false;
300
- this.template = 'preview';
301
- this.selectCancel = new EventEmitter();
302
- this.stateChanges = new Subject();
303
- this.change = new EventEmitter();
304
- this.id = `input-fileupload-${InputFileUploadComponent.nextId++}`;
305
- this.describedBy = '';
306
- this.onChange = (val) => {
307
- };
308
- this.onTouched = () => {
309
- };
310
- if (this.ngControl != null) {
311
- this.ngControl.valueAccessor = this;
312
- }
313
- }
314
- get focused() {
315
- return this.value && (this.multiple ? this.value.find(a => a.loading) : this.value.loading);
316
- }
317
- get empty() {
318
- return !this.value;
319
- }
320
- onContainerClick(event) {
321
- // Não necessário
322
- }
323
- get shouldLabelFloat() {
324
- return true;
325
- }
326
- get placeholder() {
327
- return this.$placeholder;
328
- }
329
- set placeholder(plh) {
330
- this.$placeholder = plh;
331
- this.stateChanges.next();
332
- }
333
- get required() {
334
- return this.$required;
335
- }
336
- set required(value) {
337
- this.$required = coerceBooleanProperty(value);
338
- this.stateChanges.next();
339
- }
340
- get disabled() {
341
- return this.$disabled;
342
- }
343
- set disabled(value) {
344
- this.$disabled = coerceBooleanProperty(value);
345
- this.stateChanges.next();
346
- }
347
- get errorState() {
348
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
349
- }
350
- get controlType() {
351
- return 'input-fileupload';
352
- }
353
- setDescribedByIds(ids) {
354
- this.describedBy = ids.join(' ');
355
- }
356
- ngOnDestroy() {
357
- this.stateChanges.complete();
358
- }
359
- upload(arquivo) {
360
- return new Observable(observer => {
361
- if (!this.validaFormato(arquivo.nome)) {
362
- arquivo.error = { fileFormat: true };
363
- observer.error('Formato inválido');
364
- this.onChange(this.value);
365
- this.change.emit(this.value);
366
- this.stateChanges.next();
367
- return;
368
- }
369
- if (this.limite) {
370
- const total = this.parseLimite();
371
- if (arquivo.length > total) {
372
- arquivo.error = {
373
- fileSize: {
374
- limite: this.limite,
375
- }
376
- };
377
- observer.error('Tamanho inválido');
378
- this.onChange(this.value);
379
- this.change.emit(this.value);
380
- this.stateChanges.next();
381
- return;
382
- }
383
- }
384
- this.arquivoService.upload(arquivo.file)
385
- .subscribe(event => {
386
- if (event.type === 'conclusao') {
387
- arquivo.progresso = undefined;
388
- if (this.multiple) {
389
- this.value = [
390
- ...(this.value || []).map(a => a === arquivo ? event.attachment : a)
391
- ];
392
- this.onChange(this.value);
393
- this.change.emit(this.value);
394
- this.stateChanges.next();
395
- }
396
- else {
397
- this.value = event.attachment;
398
- this.onChange(event.attachment);
399
- this.change.emit(event.attachment);
400
- this.stateChanges.next();
401
- }
402
- observer.next();
403
- observer.complete();
404
- }
405
- else if (event.type === 'progresso') {
406
- arquivo.progresso = event.progresso;
407
- this.stateChanges.next();
408
- }
409
- }, err => {
410
- arquivo.error = { fileError: true };
411
- this.onChange(this.value);
412
- this.change.emit(this.value);
413
- this.stateChanges.next();
414
- observer.error(err);
415
- });
416
- });
417
- }
418
- parseLimite() {
419
- let total = Number(this.limite.replace(/\D+/g, ''));
420
- if (this.limite.toUpperCase().indexOf('GB') >= 0) {
421
- total = total * 1024 * 1024 * 1024;
422
- }
423
- if (this.limite.toUpperCase().indexOf('MB') >= 0) {
424
- total = total * 1024 * 1024;
425
- }
426
- if (this.limite.toUpperCase().indexOf('KB') >= 0) {
427
- total = total * 1024;
428
- }
429
- return total;
430
- }
431
- validaFormato(filename) {
432
- if (this.accept) {
433
- let formats = [];
434
- if (typeof this.accept === 'string') {
435
- formats = [this.accept];
436
- }
437
- else {
438
- formats = this.accept;
439
- }
440
- for (const format of formats) {
441
- if (filename.toLowerCase().indexOf(format.toLowerCase()) === filename.length - format.length) {
442
- return true;
443
- }
444
- }
445
- return false;
446
- }
447
- return true;
448
- }
449
- uploadNext() {
450
- if (this.multiple) {
451
- if (this.value) {
452
- for (const item of this.value) {
453
- if (item.loading && !item.error) {
454
- this.upload(item).subscribe(() => this.uploadNext(), err => this.uploadNext());
455
- break;
456
- }
457
- }
458
- }
459
- }
460
- else if (this.value && this.value.loading && !this.value.error) {
461
- this.upload(this.value).subscribe(() => this.uploadNext(), err => this.uploadNext());
462
- }
463
- }
464
- onFileChange(event) {
465
- this.onTouched();
466
- if (event.target.files && event.target.files.length) {
467
- if (this.multiple) {
468
- const arqs = [];
469
- for (const file of event.target.files) {
470
- arqs.push({
471
- file,
472
- loading: true,
473
- nome: file.name,
474
- length: file.size,
475
- });
476
- }
477
- this.value = [
478
- ...(this.value || []),
479
- ...arqs
480
- ];
481
- this.onChange(this.value);
482
- this.change.emit(this.value);
483
- this.stateChanges.next();
484
- }
485
- else {
486
- this.value = {
487
- file: event.target.files[0],
488
- length: event.target.files[0].size,
489
- loading: true,
490
- nome: event.target.files[0].name
491
- };
492
- this.onChange(this.value);
493
- this.change.emit(this.value);
494
- this.stateChanges.next();
495
- }
496
- this.uploadNext();
497
- }
498
- else {
499
- this.selectCancel.emit();
500
- }
501
- event.target.value = '';
502
- }
503
- openFileChooser() {
504
- if (!this.disabled) {
505
- this.input.nativeElement.click();
506
- }
507
- }
508
- remover(arquivo) {
509
- return __awaiter(this, void 0, void 0, function* () {
510
- if (this.value) {
511
- if (this.multiple) {
512
- if (Array.isArray(this.value)) {
513
- this.value.splice(this.value.indexOf(arquivo), 1);
514
- if (this.value.length) {
515
- this.value = [...this.value];
516
- this.onChange(this.value);
517
- this.change.emit(this.value);
518
- this.stateChanges.next();
519
- }
520
- else {
521
- this.value = undefined;
522
- this.onChange(undefined);
523
- this.change.emit(undefined);
524
- this.stateChanges.next();
525
- }
526
- }
527
- }
528
- else {
529
- this.value = undefined;
530
- this.onChange(undefined);
531
- this.change.emit(undefined);
532
- this.stateChanges.next();
533
- }
534
- }
535
- });
536
- }
537
- registerOnTouched(fn) {
538
- this.onTouched = fn;
539
- }
540
- registerOnChange(fn) {
541
- this.onChange = fn;
542
- }
543
- setDisabledState(isDisabled) {
544
- this.disabled = isDisabled;
545
- }
546
- writeValue(obj) {
547
- if (obj) {
548
- if (this.multiple) {
549
- this.value = obj.map(a => typeof a === 'string' ? { url: a } : a);
550
- this.stateChanges.next();
551
- }
552
- else if (typeof obj === 'string') {
553
- this.value = { url: obj };
554
- this.stateChanges.next();
555
- }
556
- else {
557
- this.value = obj;
558
- this.stateChanges.next();
559
- }
560
- }
561
- else {
562
- this.value = obj;
563
- this.stateChanges.next();
564
- }
565
- }
566
- }
567
- InputFileUploadComponent.nextId = 0;
568
- InputFileUploadComponent.decorators = [
569
- { type: Component, args: [{
570
- selector: 'mcl-input-fileupload',
571
- 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",
572
- providers: [
573
- {
574
- provide: MatFormFieldControl,
575
- useExisting: InputFileUploadComponent
576
- }
577
- ],
578
- 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}"]
579
- },] }
580
- ];
581
- InputFileUploadComponent.ctorParameters = () => [
582
- { type: ErrorStateMatcher },
583
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
584
- { type: NgForm, decorators: [{ type: Optional }] },
585
- { type: ChangeDetectorRef },
586
- { type: FormGroupDirective, decorators: [{ type: Optional }] },
587
- { type: undefined, decorators: [{ type: Inject, args: [ARQUIVO_MANAGER_SERVICE,] }] }
588
- ];
589
- InputFileUploadComponent.propDecorators = {
590
- multiple: [{ type: Input }],
591
- limite: [{ type: Input }],
592
- accept: [{ type: Input }],
593
- template: [{ type: Input }],
594
- input: [{ type: ViewChild, args: ['input',] }],
595
- selectCancel: [{ type: Output }],
596
- stateChanges: [{ type: Output, args: ['change',] }],
597
- change: [{ type: Output }],
598
- id: [{ type: HostBinding }],
599
- describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
600
- shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
601
- placeholder: [{ type: Input }],
602
- required: [{ type: Input }],
603
- disabled: [{ type: Input }]
604
- };
605
-
606
- class InputFileUploadValidatorDirective {
607
- validate(control) {
608
- if (control.value) {
609
- if (this.multiple && Array.isArray(control.value)) {
610
- const error = control.value.find(a => a.loading && a.error);
611
- if (error) {
612
- return error.error;
613
- }
614
- if (control.value.find(a => a.loading)) {
615
- return { fileUploading: true };
616
- }
617
- }
618
- else if (control.value.loading && control.value.error) {
619
- return control.value.error;
620
- }
621
- else if (control.value.loading) {
622
- return { fileUploading: true };
623
- }
624
- }
625
- return undefined;
626
- }
627
- }
628
- InputFileUploadValidatorDirective.decorators = [
629
- { type: Directive, args: [{
630
- selector: 'mcl-input-fileupload,[mclFileupload]',
631
- providers: [{ provide: NG_VALIDATORS, useExisting: InputFileUploadValidatorDirective, multi: true }]
632
- },] }
633
- ];
634
- InputFileUploadValidatorDirective.propDecorators = {
635
- multiple: [{ type: Input }]
636
- };
637
-
638
- class InputFileuploadModule {
639
- }
640
- InputFileuploadModule.decorators = [
641
- { type: NgModule, args: [{
642
- declarations: [InputFileUploadComponent, InputFileUploadValidatorDirective],
643
- exports: [InputFileUploadComponent, InputFileUploadValidatorDirective],
644
- imports: [
645
- CommonModule,
646
- FormsModule,
647
- MatChipsModule,
648
- MatProgressSpinnerModule,
649
- MatIconModule,
650
- FlexLayoutModule,
651
- ArquivoModule,
652
- MatButtonModule,
653
- MatInputModule,
654
- MatTooltipModule,
655
- ]
656
- },] }
657
- ];
658
-
659
- class OptionNode {
660
- constructor(pool, value, selected = false) {
661
- this.pool = pool;
662
- this.value = value;
663
- this.subject = new BehaviorSubject(selected);
664
- }
665
- get model() {
666
- return this.pool.model();
667
- }
668
- get observable() {
669
- return this.subject;
670
- }
671
- setSelected(selected) {
672
- this.subject.next(selected);
673
- }
674
- dispose() {
675
- this.subject.complete();
676
- }
677
- touched() {
678
- this.pool.touched();
679
- }
680
- }
681
-
682
- class NodePool {
683
- constructor(name) {
684
- this.name = name;
685
- this._nodes = new BehaviorSubject([]);
686
- this._touch = new Subject();
687
- this._groups = [];
688
- this.lastValues = [];
689
- }
690
- model() {
691
- return this._nodes
692
- .pipe(switchMap(ns => combineLatest(ns
693
- .map(n => n.observable
694
- .pipe(map(selected => ({
695
- selected,
696
- value: n.value
697
- })))))))
698
- .pipe(map(ops => {
699
- const model = ops.filter(o => o.selected).map(o => o.value);
700
- return model.length ? model : undefined;
701
- }));
702
- }
703
- touch() {
704
- return this._touch;
705
- }
706
- all() {
707
- return this._nodes
708
- .pipe(switchMap(ns => combineLatest(ns
709
- .map(n => n.observable))))
710
- .pipe(map(ops => {
711
- if (ops.length) {
712
- const first = ops[0];
713
- for (const o of ops) {
714
- if (o !== first) {
715
- return undefined;
716
- }
717
- }
718
- return first;
719
- }
720
- return false;
721
- }));
722
- }
723
- get empty() {
724
- return !this._nodes.value.length && !this._groups.length;
725
- }
726
- dispose() {
727
- this._nodes.complete();
728
- this._touch.complete();
729
- }
730
- touched() {
731
- this._touch.next(undefined);
732
- }
733
- register(value) {
734
- const selected = !!this.lastValues && this.lastValues.indexOf(value) >= 0;
735
- const node = new OptionNode(this, value, selected);
736
- this._nodes.next([
737
- ...this._nodes.value,
738
- node
739
- ]);
740
- return node;
741
- }
742
- unregister(node) {
743
- this._nodes.next(this._nodes.value.filter(n => n !== node));
744
- node.dispose();
745
- }
746
- registerGroup(group) {
747
- this._groups.push(group);
748
- }
749
- unregisterGroup(group) {
750
- this._groups.splice(this._groups.indexOf(group), 1);
751
- }
752
- writeValue(values) {
753
- if (values !== this.lastValues) {
754
- this.lastValues = values || [];
755
- if (values) {
756
- this._nodes.value.forEach(n => {
757
- n.setSelected(values.indexOf(n.value) >= 0);
758
- });
759
- }
760
- else {
761
- this._nodes.value.forEach(n => {
762
- n.setSelected(false);
763
- });
764
- }
765
- }
766
- }
767
- setAll(selected) {
768
- this._nodes.value.forEach(m => m.setSelected(selected));
769
- }
770
- }
771
-
772
- class OptionCheckboxService {
773
- constructor() {
774
- this.nodes = {};
775
- }
776
- getPool(name) {
777
- if (!this.nodes[name]) {
778
- this.nodes[name] = new NodePool(name);
779
- }
780
- return this.nodes[name];
781
- }
782
- registerGroup(name, group) {
783
- const pool = this.getPool(name);
784
- pool.registerGroup(group);
785
- return pool;
786
- }
787
- unregisterGroup(name, group) {
788
- if (this.nodes[name]) {
789
- this.nodes[name].unregisterGroup(group);
790
- if (this.nodes[name].empty) {
791
- this.nodes[name].dispose();
792
- this.nodes[name] = undefined;
793
- }
794
- }
795
- }
796
- unregister(name, node) {
797
- if (this.nodes[name]) {
798
- this.nodes[name].unregister(node);
799
- if (this.nodes[name].empty) {
800
- this.nodes[name].dispose();
801
- this.nodes[name] = undefined;
802
- }
803
- }
804
- }
805
- register(name, value) {
806
- return this.getPool(name).register(value);
807
- }
808
- setAll(name, selected) {
809
- if (this.nodes[name]) {
810
- this.nodes[name].setAll(selected);
811
- }
812
- }
813
- writeValue(name, model) {
814
- var _a;
815
- (_a = this.getPool(name)) === null || _a === void 0 ? void 0 : _a.writeValue(model);
816
- }
817
- }
818
- OptionCheckboxService.decorators = [
819
- { type: Injectable }
820
- ];
821
-
822
- class AllOptionCheckboxComponent {
823
- constructor(fotonOptionCheckboxService) {
824
- this.fotonOptionCheckboxService = fotonOptionCheckboxService;
825
- this.change = new EventEmitter();
826
- }
827
- get name() {
828
- return this._name;
829
- }
830
- set name(name) {
831
- this._name = name;
832
- this.pool = this.fotonOptionCheckboxService.getPool(name);
833
- this.selected = this.pool.all();
834
- }
835
- setSelected(selected) {
836
- this.pool.touched();
837
- this.fotonOptionCheckboxService.setAll(this.name, selected);
838
- this.change.emit();
839
- }
840
- }
841
- AllOptionCheckboxComponent.decorators = [
842
- { type: Component, args: [{
843
- selector: 'mcl-option-checkbox[select-all-option]',
844
- 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"
845
- },] }
846
- ];
847
- AllOptionCheckboxComponent.ctorParameters = () => [
848
- { type: OptionCheckboxService }
849
- ];
850
- AllOptionCheckboxComponent.propDecorators = {
851
- disabled: [{ type: Input }],
852
- change: [{ type: Output }],
853
- name: [{ type: Input }]
854
- };
855
-
856
- class OptionCheckboxComponent {
857
- constructor(fotonOptionCheckboxService) {
858
- this.fotonOptionCheckboxService = fotonOptionCheckboxService;
859
- this.change = new EventEmitter();
860
- }
861
- setSelected(selected) {
862
- if (this.node) {
863
- this.node.touched();
864
- this.node.setSelected(selected);
865
- this.change.emit();
866
- }
867
- }
868
- get value() {
869
- return this.node ? this.node.value : undefined;
870
- }
871
- set value(v) {
872
- if (v != this.value) {
873
- if (this.node) {
874
- this.node.value = v;
875
- }
876
- else {
877
- this._value = v;
878
- }
879
- }
880
- }
881
- get name() {
882
- return this._name;
883
- }
884
- set name(n) {
885
- if (n !== this.name && !this.node) {
886
- this.node = this.fotonOptionCheckboxService.register(n, this._value);
887
- this.selected = this.node.observable;
888
- this._name = n;
889
- }
890
- }
891
- onBlur() {
892
- }
893
- ngOnDestroy() {
894
- this.fotonOptionCheckboxService.unregister(this.name, this.node);
895
- }
896
- }
897
- OptionCheckboxComponent.decorators = [
898
- { type: Component, args: [{
899
- selector: 'mcl-option-checkbox:not([select-all-option])',
900
- 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"
901
- },] }
902
- ];
903
- OptionCheckboxComponent.ctorParameters = () => [
904
- { type: OptionCheckboxService }
905
- ];
906
- OptionCheckboxComponent.propDecorators = {
907
- disabled: [{ type: Input }],
908
- change: [{ type: Output }],
909
- value: [{ type: Input }],
910
- name: [{ type: Input }]
911
- };
912
-
913
- class OptionCheckboxGroupComponent {
914
- constructor(optionCheckboxService) {
915
- this.optionCheckboxService = optionCheckboxService;
916
- this.change = new EventEmitter();
917
- this.touched = new EventEmitter();
918
- this.onTouchedCallback = () => {
919
- };
920
- this.onChangeCallback = () => {
921
- };
922
- }
923
- get name() {
924
- return this._name;
925
- }
926
- set name(n) {
927
- if (n !== this.name && !this.pool) {
928
- this.pool = this.optionCheckboxService.registerGroup(n, this);
929
- this.pool.touch().subscribe(() => {
930
- this.onTouchedCallback();
931
- this.touched.emit();
932
- });
933
- this.pool.model().subscribe(model => {
934
- clearTimeout(this.callbackTimeout);
935
- this.callbackTimeout = setTimeout(() => {
936
- this.onChangeCallback(model);
937
- this.change.emit(model);
938
- });
939
- });
940
- this._name = n;
941
- }
942
- }
943
- onBlur() {
944
- }
945
- ngOnDestroy() {
946
- this.optionCheckboxService.unregisterGroup(this.name, this);
947
- }
948
- writeValue(value) {
949
- this.optionCheckboxService.writeValue(this.name, value);
950
- }
951
- registerOnChange(fn) {
952
- this.onChangeCallback = fn;
953
- }
954
- registerOnTouched(fn) {
955
- this.onTouchedCallback = fn;
956
- }
957
- }
958
- OptionCheckboxGroupComponent.decorators = [
959
- { type: Component, args: [{
960
- selector: 'mcl-option-checkbox-group',
961
- template: '',
962
- providers: [
963
- {
964
- provide: NG_VALUE_ACCESSOR,
965
- useExisting: OptionCheckboxGroupComponent,
966
- multi: true
967
- }
968
- ]
969
- },] }
970
- ];
971
- OptionCheckboxGroupComponent.ctorParameters = () => [
972
- { type: OptionCheckboxService }
973
- ];
974
- OptionCheckboxGroupComponent.propDecorators = {
975
- disabled: [{ type: Input }],
976
- change: [{ type: Output }],
977
- touched: [{ type: Output }],
978
- name: [{ type: Input }]
979
- };
980
-
981
- class OptionCheckboxModule {
982
- static forRoot() {
983
- return {
984
- ngModule: OptionCheckboxModule,
985
- providers: [
986
- OptionCheckboxService
987
- ]
988
- };
989
- }
990
- }
991
- OptionCheckboxModule.decorators = [
992
- { type: NgModule, args: [{
993
- declarations: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
994
- exports: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
995
- imports: [
996
- CommonModule,
997
- FormsModule,
998
- MatCheckboxModule,
999
- ]
1000
- },] }
1001
- ];
1002
-
1003
- class SelectItemComponent {
1004
- constructor() {
1005
- }
1006
- ngOnInit() {
1007
- }
1008
- }
1009
- SelectItemComponent.decorators = [
1010
- { type: Component, args: [{
1011
- selector: 'mcl-select-item',
1012
- template: "",
1013
- styles: [""]
1014
- },] }
1015
- ];
1016
- SelectItemComponent.ctorParameters = () => [];
1017
- SelectItemComponent.propDecorators = {
1018
- label: [{ type: Input }],
1019
- value: [{ type: Input }]
1020
- };
1021
-
1022
- class SelectChipsComponent {
1023
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1024
- this.errorStateMatcher = errorStateMatcher;
1025
- this.ngControl = ngControl;
1026
- this.parentForm = parentForm;
1027
- this.parentFormGroup = parentFormGroup;
1028
- this.onChange = (val) => {
1029
- };
1030
- this.onTouched = () => {
1031
- };
1032
- this.$disabled = false;
1033
- this.$required = false;
1034
- this.focused = false;
1035
- this.filterCtrl = new FormControl();
1036
- this.stateChanges = new Subject();
1037
- this.id = `select-chips-${SelectChipsComponent.nextId++}`;
1038
- this.describedBy = '';
1039
- if (this.ngControl != null) {
1040
- this.ngControl.valueAccessor = this;
1041
- }
1042
- this.opcoesFiltradas = this.filterCtrl.valueChanges.pipe(startWith(null), map((filtro) => this._filter(filtro)));
1043
- }
1044
- get value() {
1045
- return this.$value;
1046
- }
1047
- set value(value) {
1048
- this.$value = value;
1049
- this.stateChanges.next();
1050
- }
1051
- get empty() {
1052
- return !this.value;
1053
- }
1054
- onContainerClick(event) {
1055
- }
1056
- get shouldLabelFloat() {
1057
- return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
1058
- }
1059
- get placeholder() {
1060
- return this.$placeholder;
1061
- }
1062
- set placeholder(plh) {
1063
- this.$placeholder = plh;
1064
- this.stateChanges.next();
1065
- }
1066
- get required() {
1067
- return this.$required;
1068
- }
1069
- set required(value) {
1070
- this.$required = coerceBooleanProperty(value);
1071
- this.stateChanges.next();
1072
- }
1073
- get disabled() {
1074
- return this.$disabled;
1075
- }
1076
- set disabled(value) {
1077
- this.$disabled = coerceBooleanProperty(value);
1078
- this.stateChanges.next();
1079
- }
1080
- get errorState() {
1081
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1082
- }
1083
- get controlType() {
1084
- return 'select-chips';
1085
- }
1086
- setDescribedByIds(ids) {
1087
- this.describedBy = ids.join(' ');
1088
- }
1089
- ngOnDestroy() {
1090
- this.stateChanges.complete();
1091
- }
1092
- registerOnTouched(fn) {
1093
- this.onTouched = fn;
1094
- }
1095
- registerOnChange(fn) {
1096
- this.onChange = fn;
1097
- }
1098
- setDisabledState(isDisabled) {
1099
- this.disabled = isDisabled;
1100
- }
1101
- writeValue(value) {
1102
- this.value = value;
1103
- this.filterCtrl.setValue(this.filterCtrl.value);
1104
- }
1105
- add(event) {
1106
- this.onTouched();
1107
- const input = event.input;
1108
- const value = event.value;
1109
- const selected = StringUtil.normalize((value || ''));
1110
- const opcao = this.opcoes.toArray().find(op => StringUtil.normalize(op.label) === selected);
1111
- if (opcao) {
1112
- if (!this.value || !this.value.find(v => v === opcao.value)) {
1113
- this.value = [
1114
- ...(this.value || []),
1115
- opcao.value
1116
- ];
1117
- this.onChange(this.value);
1118
- }
1119
- if (input) {
1120
- input.value = '';
1121
- }
1122
- this.filterCtrl.setValue(null);
1123
- }
1124
- }
1125
- remove(item) {
1126
- this.onTouched();
1127
- if (this.value) {
1128
- const index = this.value.indexOf(item);
1129
- if (index >= 0) {
1130
- this.value.splice(index, 1);
1131
- }
1132
- if (!this.value.length) {
1133
- this.value = undefined;
1134
- }
1135
- this.onChange(this.value);
1136
- }
1137
- }
1138
- selected(event) {
1139
- this.onTouched();
1140
- if (!this.value || !this.value.find(v => v === event.option.value)) {
1141
- this.value = [
1142
- ...(this.value || []),
1143
- event.option.value
1144
- ];
1145
- this.onChange(this.value);
1146
- }
1147
- this.filterInput.nativeElement.value = '';
1148
- this.filterCtrl.setValue(null);
1149
- }
1150
- _filter(filtro) {
1151
- const filterValue = filtro && StringUtil.normalize(filtro);
1152
- return this.opcoes.toArray()
1153
- .filter(opcao => !this.value || this.value.indexOf(opcao.value) < 0)
1154
- .filter(opcao => !filterValue || StringUtil.normalize(opcao.label).indexOf(filterValue) >= 0);
1155
- }
1156
- }
1157
- SelectChipsComponent.nextId = 0;
1158
- SelectChipsComponent.decorators = [
1159
- { type: Component, args: [{
1160
- selector: 'mcl-select-chips',
1161
- 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",
1162
- providers: [
1163
- {
1164
- provide: MatFormFieldControl,
1165
- useExisting: SelectChipsComponent
1166
- }
1167
- ],
1168
- styles: [""]
1169
- },] }
1170
- ];
1171
- SelectChipsComponent.ctorParameters = () => [
1172
- { type: ErrorStateMatcher },
1173
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1174
- { type: NgForm, decorators: [{ type: Optional }] },
1175
- { type: FormGroupDirective, decorators: [{ type: Optional }] }
1176
- ];
1177
- SelectChipsComponent.propDecorators = {
1178
- input: [{ type: ViewChild, args: ['input',] }],
1179
- id: [{ type: HostBinding }],
1180
- describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1181
- opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1182
- filterInput: [{ type: ViewChild, args: ['filterInput',] }],
1183
- filterAutocomplete: [{ type: ViewChild, args: ['filterAutocomplete',] }],
1184
- shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1185
- placeholder: [{ type: Input }],
1186
- required: [{ type: Input }],
1187
- disabled: [{ type: Input }]
1188
- };
1189
-
1190
- class SelectItemModule {
1191
- }
1192
- SelectItemModule.decorators = [
1193
- { type: NgModule, args: [{
1194
- declarations: [SelectItemComponent],
1195
- exports: [SelectItemComponent],
1196
- imports: [
1197
- CommonModule,
1198
- ],
1199
- },] }
1200
- ];
1201
-
1202
- class SelectChipsModule {
1203
- }
1204
- SelectChipsModule.decorators = [
1205
- { type: NgModule, args: [{
1206
- declarations: [SelectChipsComponent],
1207
- exports: [SelectChipsComponent, SelectItemModule],
1208
- imports: [
1209
- CommonModule,
1210
- MatChipsModule,
1211
- MatIconModule,
1212
- ReactiveFormsModule,
1213
- MatAutocompleteModule,
1214
- SelectItemModule,
1215
- ],
1216
- },] }
1217
- ];
1218
-
1219
- class SelectManyCheckboxComponent {
1220
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1221
- this.errorStateMatcher = errorStateMatcher;
1222
- this.ngControl = ngControl;
1223
- this.parentForm = parentForm;
1224
- this.parentFormGroup = parentFormGroup;
1225
- this.onChange = (val) => {
1226
- };
1227
- this.onTouched = () => {
1228
- };
1229
- this.$disabled = false;
1230
- this.$required = false;
1231
- this.layout = 'grid';
1232
- this.layoutColumns = 3;
1233
- this.stateChanges = new Subject();
1234
- this.id = `select-radio-${SelectManyCheckboxComponent.nextId++}`;
1235
- this.describedBy = '';
1236
- if (this.ngControl != null) {
1237
- this.ngControl.valueAccessor = this;
1238
- }
1239
- }
1240
- ngAfterViewInit() {
1241
- this.opcoes.changes.subscribe(() => {
1242
- this.updateOpcoes();
1243
- });
1244
- }
1245
- get value() {
1246
- return this.$value;
1247
- }
1248
- set value(value) {
1249
- this.$value = value;
1250
- this.onChange(value);
1251
- this.stateChanges.next();
1252
- }
1253
- get focused() {
1254
- return false;
1255
- }
1256
- get empty() {
1257
- return !this.value;
1258
- }
1259
- onContainerClick(event) {
1260
- }
1261
- get shouldLabelFloat() {
1262
- return true;
1263
- }
1264
- get placeholder() {
1265
- return this.$placeholder;
1266
- }
1267
- set placeholder(plh) {
1268
- this.$placeholder = plh;
1269
- this.stateChanges.next();
1270
- }
1271
- get required() {
1272
- return this.$required;
1273
- }
1274
- set required(value) {
1275
- this.$required = coerceBooleanProperty(value);
1276
- this.stateChanges.next();
1277
- }
1278
- get disabled() {
1279
- return this.$disabled;
1280
- }
1281
- set disabled(value) {
1282
- this.$disabled = coerceBooleanProperty(value);
1283
- this.stateChanges.next();
1284
- }
1285
- get errorState() {
1286
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1287
- }
1288
- get controlType() {
1289
- return 'select-chips';
1290
- }
1291
- setDescribedByIds(ids) {
1292
- this.describedBy = ids.join(' ');
1293
- }
1294
- ngOnDestroy() {
1295
- this.stateChanges.complete();
1296
- }
1297
- registerOnTouched(fn) {
1298
- this.onTouched = fn;
1299
- }
1300
- registerOnChange(fn) {
1301
- this.onChange = fn;
1302
- }
1303
- setDisabledState(isDisabled) {
1304
- this.disabled = isDisabled;
1305
- }
1306
- writeValue(value) {
1307
- this.updateOpcoes(value);
1308
- this.$value = value;
1309
- }
1310
- change(opcao, selected) {
1311
- opcao._selected = selected;
1312
- this.value = this.opcoesToValue();
1313
- }
1314
- updateOpcoes(value = this.value) {
1315
- for (const opcao of this.opcoes) {
1316
- opcao._selected = value && value.indexOf(opcao.value) >= 0;
1317
- }
1318
- }
1319
- opcoesToValue() {
1320
- const val = [];
1321
- for (const opcao of this.opcoes) {
1322
- if (opcao._selected) {
1323
- val.push(opcao.value);
1324
- }
1325
- }
1326
- return val.length ? val : undefined;
1327
- }
1328
- }
1329
- SelectManyCheckboxComponent.nextId = 0;
1330
- SelectManyCheckboxComponent.decorators = [
1331
- { type: Component, args: [{
1332
- selector: 'mcl-select-many-checkbox',
1333
- 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",
1334
- providers: [
1335
- {
1336
- provide: MatFormFieldControl,
1337
- useExisting: SelectManyCheckboxComponent
1338
- }
1339
- ],
1340
- 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}}"]
1341
- },] }
1342
- ];
1343
- SelectManyCheckboxComponent.ctorParameters = () => [
1344
- { type: ErrorStateMatcher },
1345
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1346
- { type: NgForm, decorators: [{ type: Optional }] },
1347
- { type: FormGroupDirective, decorators: [{ type: Optional }] }
1348
- ];
1349
- SelectManyCheckboxComponent.propDecorators = {
1350
- layout: [{ type: Input }],
1351
- layoutColumns: [{ type: Input }],
1352
- input: [{ type: ViewChild, args: ['input',] }],
1353
- id: [{ type: HostBinding }],
1354
- describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1355
- opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1356
- shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1357
- placeholder: [{ type: Input }],
1358
- required: [{ type: Input }],
1359
- disabled: [{ type: Input }]
1360
- };
1361
-
1362
- class SelectManyCheckboxModule {
1363
- }
1364
- SelectManyCheckboxModule.decorators = [
1365
- { type: NgModule, args: [{
1366
- declarations: [SelectManyCheckboxComponent],
1367
- exports: [SelectManyCheckboxComponent, SelectItemModule],
1368
- imports: [
1369
- CommonModule,
1370
- FormsModule,
1371
- SelectItemModule,
1372
- MatCheckboxModule
1373
- ],
1374
- },] }
1375
- ];
1376
-
1377
- class SelectRadioComponent {
1378
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1379
- this.errorStateMatcher = errorStateMatcher;
1380
- this.ngControl = ngControl;
1381
- this.parentForm = parentForm;
1382
- this.parentFormGroup = parentFormGroup;
1383
- this.onChange = (val) => {
1384
- };
1385
- this.onTouched = () => {
1386
- };
1387
- this.$disabled = false;
1388
- this.$required = false;
1389
- this.layout = 'vertical';
1390
- this.stateChanges = new Subject();
1391
- this.id = `select-radio-${SelectRadioComponent.nextId++}`;
1392
- this.describedBy = '';
1393
- if (this.ngControl != null) {
1394
- this.ngControl.valueAccessor = this;
1395
- }
1396
- }
1397
- get value() {
1398
- return this.$value;
1399
- }
1400
- set value(value) {
1401
- this.$value = value;
1402
- this.onChange(value);
1403
- this.stateChanges.next();
1404
- }
1405
- get focused() {
1406
- return false;
1407
- }
1408
- get empty() {
1409
- return !this.value;
1410
- }
1411
- onContainerClick(event) {
1412
- }
1413
- get shouldLabelFloat() {
1414
- return true;
1415
- }
1416
- get placeholder() {
1417
- return this.$placeholder;
1418
- }
1419
- set placeholder(plh) {
1420
- this.$placeholder = plh;
1421
- this.stateChanges.next();
1422
- }
1423
- get required() {
1424
- return this.$required;
1425
- }
1426
- set required(value) {
1427
- this.$required = coerceBooleanProperty(value);
1428
- this.stateChanges.next();
1429
- }
1430
- get disabled() {
1431
- return this.$disabled;
1432
- }
1433
- set disabled(value) {
1434
- this.$disabled = coerceBooleanProperty(value);
1435
- this.stateChanges.next();
1436
- }
1437
- get errorState() {
1438
- return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1439
- }
1440
- get controlType() {
1441
- return 'select-chips';
1442
- }
1443
- setDescribedByIds(ids) {
1444
- this.describedBy = ids.join(' ');
1445
- }
1446
- ngOnDestroy() {
1447
- this.stateChanges.complete();
1448
- }
1449
- registerOnTouched(fn) {
1450
- this.onTouched = fn;
1451
- }
1452
- registerOnChange(fn) {
1453
- this.onChange = fn;
1454
- }
1455
- setDisabledState(isDisabled) {
1456
- this.disabled = isDisabled;
1457
- }
1458
- writeValue(value) {
1459
- this.value = value;
1460
- }
1461
- }
1462
- SelectRadioComponent.nextId = 0;
1463
- SelectRadioComponent.decorators = [
1464
- { type: Component, args: [{
1465
- selector: 'mcl-select-radio',
1466
- 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",
1467
- providers: [
1468
- {
1469
- provide: MatFormFieldControl,
1470
- useExisting: SelectRadioComponent
1471
- }
1472
- ],
1473
- 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}}"]
1474
- },] }
1475
- ];
1476
- SelectRadioComponent.ctorParameters = () => [
1477
- { type: ErrorStateMatcher },
1478
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1479
- { type: NgForm, decorators: [{ type: Optional }] },
1480
- { type: FormGroupDirective, decorators: [{ type: Optional }] }
1481
- ];
1482
- SelectRadioComponent.propDecorators = {
1483
- layout: [{ type: Input }],
1484
- input: [{ type: ViewChild, args: ['input',] }],
1485
- id: [{ type: HostBinding }],
1486
- describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1487
- opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1488
- shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1489
- placeholder: [{ type: Input }],
1490
- required: [{ type: Input }],
1491
- disabled: [{ type: Input }]
1492
- };
1493
-
1494
- class SelectRadioModule {
1495
- }
1496
- SelectRadioModule.decorators = [
1497
- { type: NgModule, args: [{
1498
- declarations: [SelectRadioComponent],
1499
- exports: [SelectRadioComponent, SelectItemModule],
1500
- imports: [
1501
- CommonModule,
1502
- FormsModule,
1503
- SelectItemModule,
1504
- MatRadioModule
1505
- ],
1506
- },] }
1507
- ];
1508
-
1509
- class InputTelefoneInternacionalComponent extends AbstractMatFormFieldControl {
1510
- constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1511
- super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1512
- this.preferredContries = ['br'];
1513
- this.blur = new EventEmitter();
1514
- this.alwaysShowCountry = false;
1515
- }
1516
- get value() {
1517
- return this.$innerValue;
1518
- }
1519
- set value(value) {
1520
- this.$innerValue = value;
1521
- this.stateChanges.next();
1522
- this.onChange(value === null || value === void 0 ? void 0 : value.replace(/[^\d+]/g, ''));
1523
- }
1524
- get shouldLabelFloat() {
1525
- return this.focused || !this.empty || this.alwaysShowCountry;
1526
- }
1527
- get empty() {
1528
- return !this.value;
1529
- }
1530
- onFocus() {
1531
- this.focused = true;
1532
- this.stateChanges.next();
1533
- }
1534
- onBlur() {
1535
- this.focused = false;
1536
- this.stateChanges.next();
1537
- this.blur.emit();
1538
- }
1539
- writeValue(value) {
1540
- this.value = value;
1541
- }
1542
- }
1543
- InputTelefoneInternacionalComponent.decorators = [
1544
- { type: Component, args: [{
1545
- selector: 'mcl-input-telefone-intl',
1546
- 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",
1547
- providers: [
1548
- {
1549
- provide: MatFormFieldControl,
1550
- useExisting: InputTelefoneInternacionalComponent
1551
- },
1552
- ],
1553
- 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}"]
1554
- },] }
1555
- ];
1556
- InputTelefoneInternacionalComponent.ctorParameters = () => [
1557
- { type: ErrorStateMatcher },
1558
- { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1559
- { type: NgForm, decorators: [{ type: Optional }] },
1560
- { type: FormGroupDirective, decorators: [{ type: Optional }] }
1561
- ];
1562
- InputTelefoneInternacionalComponent.propDecorators = {
1563
- preferredContries: [{ type: Input }],
1564
- readonly: [{ type: Input }],
1565
- blur: [{ type: Output }],
1566
- alwaysShowCountry: [{ type: Input }],
1567
- telInput: [{ type: ViewChild, args: ['input',] }]
1568
- };
1569
-
1570
- class InputTelefoneInternacionalValidatorDirective {
1571
- constructor() {
1572
- }
1573
- validate(control) {
1574
- return phoneNumberValidator(control);
1575
- }
1576
- }
1577
- InputTelefoneInternacionalValidatorDirective.decorators = [
1578
- { type: Directive, args: [{
1579
- selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
1580
- providers: [{
1581
- provide: NG_VALIDATORS,
1582
- useExisting: InputTelefoneInternacionalValidatorDirective,
1583
- multi: true,
1584
- }]
1585
- },] }
1586
- ];
1587
- InputTelefoneInternacionalValidatorDirective.ctorParameters = () => [];
1588
-
1589
- class InputTelefoneInternacionalModule {
1590
- }
1591
- InputTelefoneInternacionalModule.decorators = [
1592
- { type: NgModule, args: [{
1593
- declarations: [InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective],
1594
- exports: [
1595
- InputTelefoneInternacionalComponent,
1596
- InputTelefoneInternacionalValidatorDirective
1597
- ],
1598
- imports: [
1599
- CommonModule,
1600
- FormsModule,
1601
- LacMatTelInputModule,
1602
- ]
1603
- },] }
1604
- ];
1605
-
1606
- /**
1607
- * Generated bundle index. Do not edit.
1608
- */
1609
-
1610
- export { AbstractMatFormFieldControl, AllOptionCheckboxComponent, InputDatetimeComponent, InputDatetimeModule, InputFileUploadComponent, InputFileUploadValidatorDirective, InputFileuploadModule, InputTelefoneInternacionalComponent, InputTelefoneInternacionalModule, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, OptionCheckboxModule, SelectChipsComponent, SelectChipsModule, SelectItemComponent, SelectItemModule, SelectManyCheckboxComponent, SelectManyCheckboxModule, SelectRadioComponent, SelectRadioModule, ɵ0, OptionCheckboxService as ɵa };
1611
- //# sourceMappingURL=main-class-componentes-input.js.map