@main-class/componentes 1.18.8 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/arquivo/index.d.ts +6 -4
  2. package/arquivo/main-class-componentes-arquivo.d.ts +4 -0
  3. package/arquivo/main-class-componentes-arquivo.metadata.json +1 -0
  4. package/arquivo/package.json +11 -0
  5. package/arquivo/{download-arquivo.directive.d.ts → src/download-arquivo.directive.d.ts} +1 -1
  6. package/{core/imagem → arquivo/src}/imagem.directive.d.ts +1 -1
  7. package/arquivo/{preview-arquivo → src/preview-arquivo}/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +1 -1
  8. package/arquivo/{preview-arquivo → src/preview-arquivo}/preview-arquivo.component.d.ts +1 -1
  9. package/bundles/main-class-componentes-arquivo.umd.js +687 -0
  10. package/bundles/main-class-componentes-arquivo.umd.js.map +1 -0
  11. package/bundles/main-class-componentes-arquivo.umd.min.js +16 -0
  12. package/bundles/main-class-componentes-arquivo.umd.min.js.map +1 -0
  13. package/bundles/main-class-componentes-core.umd.js +252 -0
  14. package/bundles/main-class-componentes-core.umd.js.map +1 -0
  15. package/bundles/main-class-componentes-core.umd.min.js +2 -0
  16. package/bundles/main-class-componentes-core.umd.min.js.map +1 -0
  17. package/bundles/main-class-componentes-crud.umd.js +543 -0
  18. package/bundles/main-class-componentes-crud.umd.js.map +1 -0
  19. package/bundles/main-class-componentes-crud.umd.min.js +16 -0
  20. package/bundles/main-class-componentes-crud.umd.min.js.map +1 -0
  21. package/bundles/main-class-componentes-date.umd.js +185 -0
  22. package/bundles/main-class-componentes-date.umd.js.map +1 -0
  23. package/bundles/main-class-componentes-date.umd.min.js +2 -0
  24. package/bundles/main-class-componentes-date.umd.min.js.map +1 -0
  25. package/bundles/main-class-componentes-dialog.umd.js +206 -0
  26. package/bundles/main-class-componentes-dialog.umd.js.map +1 -0
  27. package/bundles/main-class-componentes-dialog.umd.min.js +2 -0
  28. package/bundles/main-class-componentes-dialog.umd.min.js.map +1 -0
  29. package/bundles/main-class-componentes-form.umd.js +211 -0
  30. package/bundles/main-class-componentes-form.umd.js.map +1 -0
  31. package/bundles/main-class-componentes-form.umd.min.js +2 -0
  32. package/bundles/main-class-componentes-form.umd.min.js.map +1 -0
  33. package/bundles/main-class-componentes-input.umd.js +2244 -0
  34. package/bundles/main-class-componentes-input.umd.js.map +1 -0
  35. package/bundles/main-class-componentes-input.umd.min.js +17 -0
  36. package/bundles/main-class-componentes-input.umd.min.js.map +1 -0
  37. package/bundles/main-class-componentes-loader.umd.js +233 -0
  38. package/bundles/main-class-componentes-loader.umd.js.map +1 -0
  39. package/bundles/main-class-componentes-loader.umd.min.js +2 -0
  40. package/bundles/main-class-componentes-loader.umd.min.js.map +1 -0
  41. package/bundles/main-class-componentes-misc.umd.js +1122 -0
  42. package/bundles/main-class-componentes-misc.umd.js.map +1 -0
  43. package/bundles/main-class-componentes-misc.umd.min.js +16 -0
  44. package/bundles/main-class-componentes-misc.umd.min.js.map +1 -0
  45. package/bundles/main-class-componentes-model.umd.js +196 -0
  46. package/bundles/main-class-componentes-model.umd.js.map +1 -0
  47. package/bundles/main-class-componentes-model.umd.min.js +2 -0
  48. package/bundles/main-class-componentes-model.umd.min.js.map +1 -0
  49. package/bundles/main-class-componentes-pipe.umd.js +55 -0
  50. package/bundles/main-class-componentes-pipe.umd.js.map +1 -0
  51. package/bundles/main-class-componentes-pipe.umd.min.js +2 -0
  52. package/bundles/main-class-componentes-pipe.umd.min.js.map +1 -0
  53. package/bundles/main-class-componentes-scroll.umd.js +106 -0
  54. package/bundles/main-class-componentes-scroll.umd.js.map +1 -0
  55. package/bundles/main-class-componentes-scroll.umd.min.js +2 -0
  56. package/bundles/main-class-componentes-scroll.umd.min.js.map +1 -0
  57. package/bundles/main-class-componentes-table.umd.js +787 -0
  58. package/bundles/main-class-componentes-table.umd.js.map +1 -0
  59. package/bundles/main-class-componentes-table.umd.min.js +17 -0
  60. package/bundles/main-class-componentes-table.umd.min.js.map +1 -0
  61. package/bundles/main-class-componentes-util.umd.js +31 -0
  62. package/bundles/main-class-componentes-util.umd.js.map +1 -0
  63. package/bundles/main-class-componentes-util.umd.min.js +2 -0
  64. package/bundles/main-class-componentes-util.umd.min.js.map +1 -0
  65. package/bundles/main-class-componentes.umd.js +13 -5511
  66. package/bundles/main-class-componentes.umd.js.map +1 -1
  67. package/bundles/main-class-componentes.umd.min.js +1 -1
  68. package/bundles/main-class-componentes.umd.min.js.map +1 -1
  69. package/core/index.d.ts +5 -14
  70. package/core/main-class-componentes-core.d.ts +4 -0
  71. package/core/main-class-componentes-core.metadata.json +1 -0
  72. package/core/package.json +11 -0
  73. package/core/src/core.module.d.ts +4 -0
  74. package/core/{mensageria → src/mensageria}/mensageria.service.d.ts +1 -2
  75. package/crud/index.d.ts +4 -5
  76. package/crud/main-class-componentes-crud.d.ts +4 -0
  77. package/crud/main-class-componentes-crud.metadata.json +1 -0
  78. package/crud/package.json +11 -0
  79. package/crud/{abstract-consulta-component.d.ts → src/abstract-consulta-component.d.ts} +3 -2
  80. package/crud/{abstract-consulta-paginada-component.d.ts → src/abstract-consulta-paginada-component.d.ts} +3 -2
  81. package/crud/{abstract-edicao-component.d.ts → src/abstract-edicao-component.d.ts} +2 -1
  82. package/crud/{abstract-edicao-modal-component.d.ts → src/abstract-edicao-modal-component.d.ts} +3 -1
  83. package/date/index.d.ts +3 -3
  84. package/date/main-class-componentes-date.d.ts +4 -0
  85. package/date/main-class-componentes-date.metadata.json +1 -0
  86. package/date/package.json +11 -0
  87. package/dialog/index.d.ts +4 -0
  88. package/dialog/main-class-componentes-dialog.d.ts +4 -0
  89. package/dialog/main-class-componentes-dialog.metadata.json +1 -0
  90. package/dialog/package.json +11 -0
  91. package/dialog/src/dialog.module.d.ts +2 -0
  92. package/esm2015/arquivo/index.js +7 -5
  93. package/esm2015/arquivo/main-class-componentes-arquivo.js +5 -0
  94. package/esm2015/arquivo/src/arquivo-manager.service.js +3 -0
  95. package/esm2015/arquivo/src/arquivo.module.js +30 -0
  96. package/esm2015/arquivo/src/download-arquivo.directive.js +44 -0
  97. package/esm2015/arquivo/src/imagem.directive.js +80 -0
  98. package/esm2015/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.js +56 -0
  99. package/esm2015/arquivo/src/preview-arquivo/preview-arquivo.component.js +136 -0
  100. package/esm2015/core/index.js +6 -15
  101. package/esm2015/core/main-class-componentes-core.js +5 -0
  102. package/esm2015/core/src/core.module.js +27 -0
  103. package/esm2015/core/src/criptografia/criptografia.service.js +13 -0
  104. package/esm2015/core/src/mensageria/mensageria.service.js +48 -0
  105. package/esm2015/core/src/mobile/mobile.service.js +45 -0
  106. package/esm2015/core/src/validator/valida-modulo11.service.js +92 -0
  107. package/esm2015/crud/index.js +5 -6
  108. package/esm2015/crud/main-class-componentes-crud.js +5 -0
  109. package/esm2015/crud/src/abstract-consulta-component.js +60 -0
  110. package/esm2015/crud/src/abstract-consulta-paginada-component.js +48 -0
  111. package/esm2015/crud/src/abstract-edicao-component.js +29 -0
  112. package/esm2015/crud/src/abstract-edicao-modal-component.js +24 -0
  113. package/esm2015/date/index.js +4 -4
  114. package/esm2015/date/main-class-componentes-date.js +5 -0
  115. package/esm2015/date/src/date.module.js +19 -0
  116. package/esm2015/date/src/validator/data-validator.directive.js +97 -0
  117. package/esm2015/date/src/validator/futuro.directive.js +26 -0
  118. package/esm2015/dialog/index.js +5 -0
  119. package/esm2015/dialog/main-class-componentes-dialog.js +5 -0
  120. package/esm2015/dialog/src/dialog-confirmacao/dialog-confirmacao.component.js +40 -0
  121. package/esm2015/dialog/src/dialog-iframe/dialog-iframe.component.js +59 -0
  122. package/esm2015/dialog/src/dialog.module.js +28 -0
  123. package/esm2015/dialog/src/dialog.service.js +55 -0
  124. package/esm2015/form/index.js +5 -5
  125. package/esm2015/form/main-class-componentes-form.js +5 -0
  126. package/esm2015/form/src/form.component.js +103 -0
  127. package/esm2015/form/src/form.module.js +25 -0
  128. package/esm2015/form/src/mensagens-erro/mensagens-erro.component.js +31 -0
  129. package/esm2015/form/src/single-click.directive.js +35 -0
  130. package/esm2015/input/index.js +22 -22
  131. package/esm2015/input/main-class-componentes-input.js +6 -0
  132. package/esm2015/input/src/abstract-mat-form-field-control.js +110 -0
  133. package/esm2015/input/src/input-datetime/input-datetime.component.js +114 -0
  134. package/esm2015/input/{input-datetime → src/input-datetime}/input-datetime.module.js +3 -3
  135. package/esm2015/input/src/input-fileupload/input-fileupload.component.js +324 -0
  136. package/esm2015/input/src/input-fileupload/input-fileupload.directive.js +34 -0
  137. package/esm2015/input/src/input-fileupload/input-fileupload.module.js +34 -0
  138. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.js +22 -0
  139. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional.component.js +66 -0
  140. package/esm2015/input/src/input-telefone-internacional/input-telefone-internacional.module.js +23 -0
  141. package/esm2015/input/src/option-checkbox/all-option-checkbox.component.js +36 -0
  142. package/esm2015/input/src/option-checkbox/node-pool.js +93 -0
  143. package/esm2015/input/src/option-checkbox/option-checkbox-group.component.js +71 -0
  144. package/esm2015/input/src/option-checkbox/option-checkbox.component.js +59 -0
  145. package/esm2015/input/src/option-checkbox/option-checkbox.module.js +23 -0
  146. package/esm2015/input/src/option-checkbox/option-checkbox.service.js +52 -0
  147. package/esm2015/input/src/option-checkbox/option-node.js +24 -0
  148. package/esm2015/input/src/select-chips/select-chips.component.js +177 -0
  149. package/esm2015/input/src/select-chips/select-chips.module.js +25 -0
  150. package/esm2015/input/src/select-item/select-item.component.js +20 -0
  151. package/esm2015/input/src/select-item/select-item.module.js +15 -0
  152. package/esm2015/input/src/select-many-checkbox/select-many-checkbox.component.js +150 -0
  153. package/esm2015/input/src/select-many-checkbox/select-many-checkbox.module.js +21 -0
  154. package/esm2015/input/src/select-radio/select-radio.component.js +124 -0
  155. package/esm2015/input/src/select-radio/select-radio.module.js +21 -0
  156. package/esm2015/loader/index.js +4 -0
  157. package/esm2015/loader/main-class-componentes-loader.js +5 -0
  158. package/esm2015/loader/src/loader.component.js +112 -0
  159. package/esm2015/loader/src/loader.module.js +21 -0
  160. package/esm2015/loader/src/loader.service.js +70 -0
  161. package/esm2015/misc/index.js +27 -27
  162. package/esm2015/misc/main-class-componentes-misc.js +5 -0
  163. package/esm2015/misc/src/cnpj/cnpj-model.directive.js +13 -0
  164. package/esm2015/misc/src/cnpj/cnpj.directive.js +31 -0
  165. package/esm2015/misc/src/cnpj/cnpj.module.js +19 -0
  166. package/esm2015/misc/src/cnpj/cnpjs.pipe.js +15 -0
  167. package/esm2015/misc/src/cpf/cpf-model.directive.js +13 -0
  168. package/esm2015/misc/src/cpf/cpf.directive.js +31 -0
  169. package/esm2015/misc/src/cpf/cpf.module.js +19 -0
  170. package/esm2015/misc/src/cpf/cpf.pipe.js +15 -0
  171. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj-model.directive.js +25 -0
  172. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.directive.js +32 -0
  173. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.module.js +19 -0
  174. package/esm2015/misc/src/cpf-cnpj/cpf-cnpj.pipe.js +18 -0
  175. package/esm2015/misc/{info → src/info}/info.component.js +1 -1
  176. package/esm2015/misc/src/info/info.module.js +17 -0
  177. package/esm2015/misc/src/monetario/monetario-mask.js +34 -0
  178. package/esm2015/misc/src/monetario/monetario-model.directive.js +124 -0
  179. package/esm2015/misc/src/monetario/monetario.module.js +16 -0
  180. package/esm2015/misc/src/monetario/monetario.pipe.js +13 -0
  181. package/esm2015/misc/src/porcentagem/porcentagem-mask.js +34 -0
  182. package/esm2015/misc/src/porcentagem/porcentagem-model.directive.js +99 -0
  183. package/esm2015/misc/src/porcentagem/porcentagem.module.js +16 -0
  184. package/esm2015/misc/src/porcentagem/porcentagem.pipe.js +13 -0
  185. package/esm2015/misc/src/telefone/telefone-model.directive.js +25 -0
  186. package/esm2015/misc/src/telefone/telefone.module.js +18 -0
  187. package/esm2015/misc/src/telefone/telefone.pipe.js +33 -0
  188. package/esm2015/misc/src/unsafe-inner-html/unsafe-inner-html.directive.js +23 -0
  189. package/esm2015/misc/src/unsafe-inner-html/unsafe-inner-html.module.js +15 -0
  190. package/esm2015/model/index.js +3 -0
  191. package/esm2015/model/main-class-componentes-model.js +5 -0
  192. package/esm2015/model/src/masked-model.directive.js +149 -0
  193. package/esm2015/model/src/model.module.js +19 -0
  194. package/esm2015/pipe/index.js +3 -0
  195. package/esm2015/pipe/main-class-componentes-pipe.js +5 -0
  196. package/esm2015/pipe/src/nome-resumido.pipe.js +16 -0
  197. package/esm2015/pipe/src/pipe.module.js +16 -0
  198. package/esm2015/public-api.js +2 -11
  199. package/esm2015/scroll/index.js +3 -3
  200. package/esm2015/scroll/main-class-componentes-scroll.js +5 -0
  201. package/esm2015/scroll/src/scroll-container/scroll-container.component.js +69 -0
  202. package/esm2015/scroll/src/scroll.module.js +17 -0
  203. package/esm2015/table/index.js +12 -12
  204. package/esm2015/table/main-class-componentes-table.js +6 -0
  205. package/esm2015/table/src/column/column-cell.directive.js +15 -0
  206. package/esm2015/table/src/column/column-footer.directive.js +15 -0
  207. package/esm2015/table/src/column/column-header.directive.js +15 -0
  208. package/esm2015/table/src/column/column.directive.js +28 -0
  209. package/esm2015/table/src/infinite-table/infinite-table.component.js +92 -0
  210. package/esm2015/table/src/paginated-table/paginated-table.component.js +43 -0
  211. package/esm2015/table/{paginator → src/paginator}/paginator.component.js +1 -1
  212. package/esm2015/table/src/paginator-i18n.js +23 -0
  213. package/esm2015/table/src/table/table.component.js +119 -0
  214. package/esm2015/table/src/table.module.js +74 -0
  215. package/esm2015/table/src/td/td.component.js +19 -0
  216. package/esm2015/table/src/th/th.component.js +19 -0
  217. package/esm2015/util/index.js +2 -2
  218. package/esm2015/util/main-class-componentes-util.js +5 -0
  219. package/esm2015/util/src/string.util.js +12 -0
  220. package/fesm2015/main-class-componentes-arquivo.js +338 -0
  221. package/fesm2015/main-class-componentes-arquivo.js.map +1 -0
  222. package/fesm2015/main-class-componentes-core.js +219 -0
  223. package/fesm2015/main-class-componentes-core.js.map +1 -0
  224. package/fesm2015/main-class-componentes-crud.js +162 -0
  225. package/fesm2015/main-class-componentes-crud.js.map +1 -0
  226. package/fesm2015/main-class-componentes-date.js +143 -0
  227. package/fesm2015/main-class-componentes-date.js.map +1 -0
  228. package/fesm2015/main-class-componentes-dialog.js +177 -0
  229. package/fesm2015/main-class-componentes-dialog.js.map +1 -0
  230. package/fesm2015/main-class-componentes-form.js +191 -0
  231. package/fesm2015/main-class-componentes-form.js.map +1 -0
  232. package/fesm2015/main-class-componentes-input.js +1604 -0
  233. package/fesm2015/main-class-componentes-input.js.map +1 -0
  234. package/fesm2015/main-class-componentes-loader.js +206 -0
  235. package/fesm2015/main-class-componentes-loader.js.map +1 -0
  236. package/fesm2015/main-class-componentes-misc.js +688 -0
  237. package/fesm2015/main-class-componentes-misc.js.map +1 -0
  238. package/fesm2015/main-class-componentes-model.js +173 -0
  239. package/fesm2015/main-class-componentes-model.js.map +1 -0
  240. package/fesm2015/main-class-componentes-pipe.js +37 -0
  241. package/fesm2015/main-class-componentes-pipe.js.map +1 -0
  242. package/fesm2015/main-class-componentes-scroll.js +91 -0
  243. package/fesm2015/main-class-componentes-scroll.js.map +1 -0
  244. package/fesm2015/main-class-componentes-table.js +446 -0
  245. package/fesm2015/main-class-componentes-table.js.map +1 -0
  246. package/fesm2015/main-class-componentes-util.js +18 -0
  247. package/fesm2015/main-class-componentes-util.js.map +1 -0
  248. package/fesm2015/main-class-componentes.js +1 -4308
  249. package/fesm2015/main-class-componentes.js.map +1 -1
  250. package/form/index.d.ts +4 -4
  251. package/form/main-class-componentes-form.d.ts +4 -0
  252. package/form/main-class-componentes-form.metadata.json +1 -0
  253. package/form/package.json +11 -0
  254. package/input/index.d.ts +21 -21
  255. package/input/main-class-componentes-input.d.ts +5 -0
  256. package/input/main-class-componentes-input.metadata.json +1 -0
  257. package/input/package.json +11 -0
  258. package/input/{input-fileupload → src/input-fileupload}/input-fileupload.component.d.ts +2 -2
  259. package/loader/index.d.ts +3 -0
  260. package/loader/main-class-componentes-loader.d.ts +4 -0
  261. package/loader/main-class-componentes-loader.metadata.json +1 -0
  262. package/loader/package.json +11 -0
  263. package/{core/loader → loader/src}/loader.component.d.ts +1 -1
  264. package/loader/src/loader.module.d.ts +2 -0
  265. package/main-class-componentes.metadata.json +1 -1
  266. package/misc/index.d.ts +26 -26
  267. package/misc/main-class-componentes-misc.d.ts +4 -0
  268. package/misc/main-class-componentes-misc.metadata.json +1 -0
  269. package/misc/package.json +11 -0
  270. package/misc/{cnpj → src/cnpj}/cnpj-model.directive.d.ts +1 -1
  271. package/misc/{cnpj → src/cnpj}/cnpj.directive.d.ts +1 -1
  272. package/misc/{cpf → src/cpf}/cpf-model.directive.d.ts +1 -1
  273. package/misc/{cpf → src/cpf}/cpf.directive.d.ts +1 -1
  274. package/misc/{cpf-cnpj → src/cpf-cnpj}/cpf-cnpj-model.directive.d.ts +1 -1
  275. package/misc/{cpf-cnpj → src/cpf-cnpj}/cpf-cnpj.directive.d.ts +1 -1
  276. package/misc/{telefone → src/telefone}/telefone-model.directive.d.ts +1 -1
  277. package/model/index.d.ts +2 -0
  278. package/model/main-class-componentes-model.d.ts +4 -0
  279. package/model/main-class-componentes-model.metadata.json +1 -0
  280. package/model/package.json +11 -0
  281. package/model/src/model.module.d.ts +2 -0
  282. package/package.json +1 -1
  283. package/pipe/index.d.ts +2 -0
  284. package/pipe/main-class-componentes-pipe.d.ts +4 -0
  285. package/pipe/main-class-componentes-pipe.metadata.json +1 -0
  286. package/pipe/package.json +11 -0
  287. package/pipe/src/pipe.module.d.ts +2 -0
  288. package/public-api.d.ts +2 -10
  289. package/scroll/index.d.ts +2 -2
  290. package/scroll/main-class-componentes-scroll.d.ts +4 -0
  291. package/scroll/main-class-componentes-scroll.metadata.json +1 -0
  292. package/scroll/package.json +11 -0
  293. package/table/index.d.ts +11 -11
  294. package/table/main-class-componentes-table.d.ts +5 -0
  295. package/table/main-class-componentes-table.metadata.json +1 -0
  296. package/table/package.json +11 -0
  297. package/table/{infinite-table → src/infinite-table}/infinite-table.component.d.ts +2 -1
  298. package/table/{paginated-table → src/paginated-table}/paginated-table.component.d.ts +2 -2
  299. package/table/{table → src/table}/table.component.d.ts +1 -1
  300. package/util/index.d.ts +1 -1
  301. package/util/main-class-componentes-util.d.ts +4 -0
  302. package/util/main-class-componentes-util.metadata.json +1 -0
  303. package/util/package.json +11 -0
  304. package/core/componentes.module.d.ts +0 -4
  305. package/crud/crud.module.d.ts +0 -2
  306. package/esm2015/arquivo/arquivo.module.js +0 -29
  307. package/esm2015/arquivo/download-arquivo.directive.js +0 -44
  308. package/esm2015/arquivo/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.js +0 -56
  309. package/esm2015/arquivo/preview-arquivo/preview-arquivo.component.js +0 -136
  310. package/esm2015/core/arquivo/arquivo-manager.service.js +0 -3
  311. package/esm2015/core/componentes.module.js +0 -65
  312. package/esm2015/core/criptografia/criptografia.service.js +0 -13
  313. package/esm2015/core/dialog/dialog-confirmacao/dialog-confirmacao.component.js +0 -40
  314. package/esm2015/core/dialog/dialog-iframe/dialog-iframe.component.js +0 -59
  315. package/esm2015/core/dialog/dialog.service.js +0 -56
  316. package/esm2015/core/form/model/masked-model.directive.js +0 -149
  317. package/esm2015/core/form/validator/valida-modulo11.service.js +0 -92
  318. package/esm2015/core/imagem/imagem.directive.js +0 -80
  319. package/esm2015/core/loader/loader.component.js +0 -112
  320. package/esm2015/core/loader/loader.service.js +0 -70
  321. package/esm2015/core/mensageria/mensageria.service.js +0 -49
  322. package/esm2015/core/mobile/mobile.service.js +0 -46
  323. package/esm2015/core/pipe/nome-resumido.pipe.js +0 -16
  324. package/esm2015/crud/abstract-consulta-component.js +0 -60
  325. package/esm2015/crud/abstract-consulta-paginada-component.js +0 -48
  326. package/esm2015/crud/abstract-edicao-component.js +0 -29
  327. package/esm2015/crud/abstract-edicao-modal-component.js +0 -24
  328. package/esm2015/crud/crud.module.js +0 -14
  329. package/esm2015/date/date.module.js +0 -19
  330. package/esm2015/date/validator/data-validator.directive.js +0 -96
  331. package/esm2015/date/validator/futuro.directive.js +0 -26
  332. package/esm2015/form/form.component.js +0 -103
  333. package/esm2015/form/form.module.js +0 -25
  334. package/esm2015/form/mensagens-erro/mensagens-erro.component.js +0 -31
  335. package/esm2015/form/single-click.directive.js +0 -35
  336. package/esm2015/input/abstract-mat-form-field-control.js +0 -110
  337. package/esm2015/input/input-datetime/input-datetime.component.js +0 -114
  338. package/esm2015/input/input-fileupload/input-fileupload.component.js +0 -324
  339. package/esm2015/input/input-fileupload/input-fileupload.directive.js +0 -34
  340. package/esm2015/input/input-fileupload/input-fileupload.module.js +0 -34
  341. package/esm2015/input/input-telefone-internacional/input-telefone-internacional-validator.directive.js +0 -22
  342. package/esm2015/input/input-telefone-internacional/input-telefone-internacional.component.js +0 -66
  343. package/esm2015/input/input-telefone-internacional/input-telefone-internacional.module.js +0 -23
  344. package/esm2015/input/option-checkbox/all-option-checkbox.component.js +0 -36
  345. package/esm2015/input/option-checkbox/node-pool.js +0 -93
  346. package/esm2015/input/option-checkbox/option-checkbox-group.component.js +0 -71
  347. package/esm2015/input/option-checkbox/option-checkbox.component.js +0 -59
  348. package/esm2015/input/option-checkbox/option-checkbox.module.js +0 -23
  349. package/esm2015/input/option-checkbox/option-checkbox.service.js +0 -52
  350. package/esm2015/input/option-checkbox/option-node.js +0 -24
  351. package/esm2015/input/select-chips/select-chips.component.js +0 -177
  352. package/esm2015/input/select-chips/select-chips.module.js +0 -25
  353. package/esm2015/input/select-item/select-item.component.js +0 -20
  354. package/esm2015/input/select-item/select-item.module.js +0 -15
  355. package/esm2015/input/select-many-checkbox/select-many-checkbox.component.js +0 -150
  356. package/esm2015/input/select-many-checkbox/select-many-checkbox.module.js +0 -21
  357. package/esm2015/input/select-radio/select-radio.component.js +0 -124
  358. package/esm2015/input/select-radio/select-radio.module.js +0 -21
  359. package/esm2015/misc/cnpj/cnpj-model.directive.js +0 -13
  360. package/esm2015/misc/cnpj/cnpj.directive.js +0 -31
  361. package/esm2015/misc/cnpj/cnpj.module.js +0 -19
  362. package/esm2015/misc/cnpj/cnpjs.pipe.js +0 -15
  363. package/esm2015/misc/cpf/cpf-model.directive.js +0 -13
  364. package/esm2015/misc/cpf/cpf.directive.js +0 -31
  365. package/esm2015/misc/cpf/cpf.module.js +0 -19
  366. package/esm2015/misc/cpf/cpf.pipe.js +0 -15
  367. package/esm2015/misc/cpf-cnpj/cpf-cnpj-model.directive.js +0 -25
  368. package/esm2015/misc/cpf-cnpj/cpf-cnpj.directive.js +0 -32
  369. package/esm2015/misc/cpf-cnpj/cpf-cnpj.module.js +0 -19
  370. package/esm2015/misc/cpf-cnpj/cpf-cnpj.pipe.js +0 -18
  371. package/esm2015/misc/info/info.module.js +0 -17
  372. package/esm2015/misc/monetario/monetario-mask.js +0 -34
  373. package/esm2015/misc/monetario/monetario-model.directive.js +0 -124
  374. package/esm2015/misc/monetario/monetario.module.js +0 -16
  375. package/esm2015/misc/monetario/monetario.pipe.js +0 -13
  376. package/esm2015/misc/porcentagem/porcentagem-mask.js +0 -34
  377. package/esm2015/misc/porcentagem/porcentagem-model.directive.js +0 -99
  378. package/esm2015/misc/porcentagem/porcentagem.module.js +0 -16
  379. package/esm2015/misc/porcentagem/porcentagem.pipe.js +0 -13
  380. package/esm2015/misc/telefone/telefone-model.directive.js +0 -25
  381. package/esm2015/misc/telefone/telefone.module.js +0 -18
  382. package/esm2015/misc/telefone/telefone.pipe.js +0 -33
  383. package/esm2015/misc/unsafe-inner-html/unsafe-inner-html.directive.js +0 -23
  384. package/esm2015/misc/unsafe-inner-html/unsafe-inner-html.module.js +0 -15
  385. package/esm2015/scroll/scroll-container/scroll-container.component.js +0 -69
  386. package/esm2015/scroll/scroll.module.js +0 -17
  387. package/esm2015/table/column/column-cell.directive.js +0 -15
  388. package/esm2015/table/column/column-footer.directive.js +0 -15
  389. package/esm2015/table/column/column-header.directive.js +0 -15
  390. package/esm2015/table/column/column.directive.js +0 -28
  391. package/esm2015/table/infinite-table/infinite-table.component.js +0 -91
  392. package/esm2015/table/paginated-table/paginated-table.component.js +0 -43
  393. package/esm2015/table/paginator-i18n.js +0 -23
  394. package/esm2015/table/table/table.component.js +0 -119
  395. package/esm2015/table/table.module.js +0 -74
  396. package/esm2015/table/td/td.component.js +0 -19
  397. package/esm2015/table/th/th.component.js +0 -19
  398. package/esm2015/util/string.util.js +0 -12
  399. /package/{core/arquivo → arquivo/src}/arquivo-manager.service.d.ts +0 -0
  400. /package/arquivo/{arquivo.module.d.ts → src/arquivo.module.d.ts} +0 -0
  401. /package/core/{criptografia → src/criptografia}/criptografia.service.d.ts +0 -0
  402. /package/core/{mobile → src/mobile}/mobile.service.d.ts +0 -0
  403. /package/core/{form → src}/validator/valida-modulo11.service.d.ts +0 -0
  404. /package/date/{date.module.d.ts → src/date.module.d.ts} +0 -0
  405. /package/date/{validator → src/validator}/data-validator.directive.d.ts +0 -0
  406. /package/date/{validator → src/validator}/futuro.directive.d.ts +0 -0
  407. /package/{core/dialog → dialog/src}/dialog-confirmacao/dialog-confirmacao.component.d.ts +0 -0
  408. /package/{core/dialog → dialog/src}/dialog-iframe/dialog-iframe.component.d.ts +0 -0
  409. /package/{core/dialog → dialog/src}/dialog.service.d.ts +0 -0
  410. /package/form/{form.component.d.ts → src/form.component.d.ts} +0 -0
  411. /package/form/{form.module.d.ts → src/form.module.d.ts} +0 -0
  412. /package/form/{mensagens-erro → src/mensagens-erro}/mensagens-erro.component.d.ts +0 -0
  413. /package/form/{single-click.directive.d.ts → src/single-click.directive.d.ts} +0 -0
  414. /package/input/{abstract-mat-form-field-control.d.ts → src/abstract-mat-form-field-control.d.ts} +0 -0
  415. /package/input/{input-datetime → src/input-datetime}/input-datetime.component.d.ts +0 -0
  416. /package/input/{input-datetime → src/input-datetime}/input-datetime.module.d.ts +0 -0
  417. /package/input/{input-fileupload → src/input-fileupload}/input-fileupload.directive.d.ts +0 -0
  418. /package/input/{input-fileupload → src/input-fileupload}/input-fileupload.module.d.ts +0 -0
  419. /package/input/{input-telefone-internacional → src/input-telefone-internacional}/input-telefone-internacional-validator.directive.d.ts +0 -0
  420. /package/input/{input-telefone-internacional → src/input-telefone-internacional}/input-telefone-internacional.component.d.ts +0 -0
  421. /package/input/{input-telefone-internacional → src/input-telefone-internacional}/input-telefone-internacional.module.d.ts +0 -0
  422. /package/input/{option-checkbox → src/option-checkbox}/all-option-checkbox.component.d.ts +0 -0
  423. /package/input/{option-checkbox → src/option-checkbox}/node-pool.d.ts +0 -0
  424. /package/input/{option-checkbox → src/option-checkbox}/option-checkbox-group.component.d.ts +0 -0
  425. /package/input/{option-checkbox → src/option-checkbox}/option-checkbox.component.d.ts +0 -0
  426. /package/input/{option-checkbox → src/option-checkbox}/option-checkbox.module.d.ts +0 -0
  427. /package/input/{option-checkbox → src/option-checkbox}/option-checkbox.service.d.ts +0 -0
  428. /package/input/{option-checkbox → src/option-checkbox}/option-node.d.ts +0 -0
  429. /package/input/{select-chips → src/select-chips}/select-chips.component.d.ts +0 -0
  430. /package/input/{select-chips → src/select-chips}/select-chips.module.d.ts +0 -0
  431. /package/input/{select-item → src/select-item}/select-item.component.d.ts +0 -0
  432. /package/input/{select-item → src/select-item}/select-item.module.d.ts +0 -0
  433. /package/input/{select-many-checkbox → src/select-many-checkbox}/select-many-checkbox.component.d.ts +0 -0
  434. /package/input/{select-many-checkbox → src/select-many-checkbox}/select-many-checkbox.module.d.ts +0 -0
  435. /package/input/{select-radio → src/select-radio}/select-radio.component.d.ts +0 -0
  436. /package/input/{select-radio → src/select-radio}/select-radio.module.d.ts +0 -0
  437. /package/{core/loader → loader/src}/loader.service.d.ts +0 -0
  438. /package/misc/{cnpj → src/cnpj}/cnpj.module.d.ts +0 -0
  439. /package/misc/{cnpj → src/cnpj}/cnpjs.pipe.d.ts +0 -0
  440. /package/misc/{cpf → src/cpf}/cpf.module.d.ts +0 -0
  441. /package/misc/{cpf → src/cpf}/cpf.pipe.d.ts +0 -0
  442. /package/misc/{cpf-cnpj → src/cpf-cnpj}/cpf-cnpj.module.d.ts +0 -0
  443. /package/misc/{cpf-cnpj → src/cpf-cnpj}/cpf-cnpj.pipe.d.ts +0 -0
  444. /package/misc/{info → src/info}/info.component.d.ts +0 -0
  445. /package/misc/{info → src/info}/info.module.d.ts +0 -0
  446. /package/misc/{monetario → src/monetario}/monetario-mask.d.ts +0 -0
  447. /package/misc/{monetario → src/monetario}/monetario-model.directive.d.ts +0 -0
  448. /package/misc/{monetario → src/monetario}/monetario.module.d.ts +0 -0
  449. /package/misc/{monetario → src/monetario}/monetario.pipe.d.ts +0 -0
  450. /package/misc/{porcentagem → src/porcentagem}/porcentagem-mask.d.ts +0 -0
  451. /package/misc/{porcentagem → src/porcentagem}/porcentagem-model.directive.d.ts +0 -0
  452. /package/misc/{porcentagem → src/porcentagem}/porcentagem.module.d.ts +0 -0
  453. /package/misc/{porcentagem → src/porcentagem}/porcentagem.pipe.d.ts +0 -0
  454. /package/misc/{telefone → src/telefone}/telefone.module.d.ts +0 -0
  455. /package/misc/{telefone → src/telefone}/telefone.pipe.d.ts +0 -0
  456. /package/misc/{unsafe-inner-html → src/unsafe-inner-html}/unsafe-inner-html.directive.d.ts +0 -0
  457. /package/misc/{unsafe-inner-html → src/unsafe-inner-html}/unsafe-inner-html.module.d.ts +0 -0
  458. /package/{core/form/model → model/src}/masked-model.directive.d.ts +0 -0
  459. /package/{core/pipe → pipe/src}/nome-resumido.pipe.d.ts +0 -0
  460. /package/scroll/{scroll-container → src/scroll-container}/scroll-container.component.d.ts +0 -0
  461. /package/scroll/{scroll.module.d.ts → src/scroll.module.d.ts} +0 -0
  462. /package/table/{column → src/column}/column-cell.directive.d.ts +0 -0
  463. /package/table/{column → src/column}/column-footer.directive.d.ts +0 -0
  464. /package/table/{column → src/column}/column-header.directive.d.ts +0 -0
  465. /package/table/{column → src/column}/column.directive.d.ts +0 -0
  466. /package/table/{paginator → src/paginator}/paginator.component.d.ts +0 -0
  467. /package/table/{paginator-i18n.d.ts → src/paginator-i18n.d.ts} +0 -0
  468. /package/table/{table.module.d.ts → src/table.module.d.ts} +0 -0
  469. /package/table/{td → src/td}/td.component.d.ts +0 -0
  470. /package/table/{th → src/th}/th.component.d.ts +0 -0
  471. /package/util/{string.util.d.ts → src/string.util.d.ts} +0 -0
@@ -0,0 +1,1604 @@
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
+ }
983
+ OptionCheckboxModule.decorators = [
984
+ { type: NgModule, args: [{
985
+ declarations: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
986
+ exports: [OptionCheckboxComponent, AllOptionCheckboxComponent, OptionCheckboxGroupComponent],
987
+ providers: [OptionCheckboxService],
988
+ imports: [
989
+ CommonModule,
990
+ FormsModule,
991
+ MatCheckboxModule,
992
+ ]
993
+ },] }
994
+ ];
995
+
996
+ class SelectItemComponent {
997
+ constructor() {
998
+ }
999
+ ngOnInit() {
1000
+ }
1001
+ }
1002
+ SelectItemComponent.decorators = [
1003
+ { type: Component, args: [{
1004
+ selector: 'mcl-select-item',
1005
+ template: "",
1006
+ styles: [""]
1007
+ },] }
1008
+ ];
1009
+ SelectItemComponent.ctorParameters = () => [];
1010
+ SelectItemComponent.propDecorators = {
1011
+ label: [{ type: Input }],
1012
+ value: [{ type: Input }]
1013
+ };
1014
+
1015
+ class SelectChipsComponent {
1016
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1017
+ this.errorStateMatcher = errorStateMatcher;
1018
+ this.ngControl = ngControl;
1019
+ this.parentForm = parentForm;
1020
+ this.parentFormGroup = parentFormGroup;
1021
+ this.onChange = (val) => {
1022
+ };
1023
+ this.onTouched = () => {
1024
+ };
1025
+ this.$disabled = false;
1026
+ this.$required = false;
1027
+ this.focused = false;
1028
+ this.filterCtrl = new FormControl();
1029
+ this.stateChanges = new Subject();
1030
+ this.id = `select-chips-${SelectChipsComponent.nextId++}`;
1031
+ this.describedBy = '';
1032
+ if (this.ngControl != null) {
1033
+ this.ngControl.valueAccessor = this;
1034
+ }
1035
+ this.opcoesFiltradas = this.filterCtrl.valueChanges.pipe(startWith(null), map((filtro) => this._filter(filtro)));
1036
+ }
1037
+ get value() {
1038
+ return this.$value;
1039
+ }
1040
+ set value(value) {
1041
+ this.$value = value;
1042
+ this.stateChanges.next();
1043
+ }
1044
+ get empty() {
1045
+ return !this.value;
1046
+ }
1047
+ onContainerClick(event) {
1048
+ }
1049
+ get shouldLabelFloat() {
1050
+ return !this.empty || (this.input && this.input.nativeElement.value) || this.focused;
1051
+ }
1052
+ get placeholder() {
1053
+ return this.$placeholder;
1054
+ }
1055
+ set placeholder(plh) {
1056
+ this.$placeholder = plh;
1057
+ this.stateChanges.next();
1058
+ }
1059
+ get required() {
1060
+ return this.$required;
1061
+ }
1062
+ set required(value) {
1063
+ this.$required = coerceBooleanProperty(value);
1064
+ this.stateChanges.next();
1065
+ }
1066
+ get disabled() {
1067
+ return this.$disabled;
1068
+ }
1069
+ set disabled(value) {
1070
+ this.$disabled = coerceBooleanProperty(value);
1071
+ this.stateChanges.next();
1072
+ }
1073
+ get errorState() {
1074
+ return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1075
+ }
1076
+ get controlType() {
1077
+ return 'select-chips';
1078
+ }
1079
+ setDescribedByIds(ids) {
1080
+ this.describedBy = ids.join(' ');
1081
+ }
1082
+ ngOnDestroy() {
1083
+ this.stateChanges.complete();
1084
+ }
1085
+ registerOnTouched(fn) {
1086
+ this.onTouched = fn;
1087
+ }
1088
+ registerOnChange(fn) {
1089
+ this.onChange = fn;
1090
+ }
1091
+ setDisabledState(isDisabled) {
1092
+ this.disabled = isDisabled;
1093
+ }
1094
+ writeValue(value) {
1095
+ this.value = value;
1096
+ this.filterCtrl.setValue(this.filterCtrl.value);
1097
+ }
1098
+ add(event) {
1099
+ this.onTouched();
1100
+ const input = event.input;
1101
+ const value = event.value;
1102
+ const selected = StringUtil.normalize((value || ''));
1103
+ const opcao = this.opcoes.toArray().find(op => StringUtil.normalize(op.label) === selected);
1104
+ if (opcao) {
1105
+ if (!this.value || !this.value.find(v => v === opcao.value)) {
1106
+ this.value = [
1107
+ ...(this.value || []),
1108
+ opcao.value
1109
+ ];
1110
+ this.onChange(this.value);
1111
+ }
1112
+ if (input) {
1113
+ input.value = '';
1114
+ }
1115
+ this.filterCtrl.setValue(null);
1116
+ }
1117
+ }
1118
+ remove(item) {
1119
+ this.onTouched();
1120
+ if (this.value) {
1121
+ const index = this.value.indexOf(item);
1122
+ if (index >= 0) {
1123
+ this.value.splice(index, 1);
1124
+ }
1125
+ if (!this.value.length) {
1126
+ this.value = undefined;
1127
+ }
1128
+ this.onChange(this.value);
1129
+ }
1130
+ }
1131
+ selected(event) {
1132
+ this.onTouched();
1133
+ if (!this.value || !this.value.find(v => v === event.option.value)) {
1134
+ this.value = [
1135
+ ...(this.value || []),
1136
+ event.option.value
1137
+ ];
1138
+ this.onChange(this.value);
1139
+ }
1140
+ this.filterInput.nativeElement.value = '';
1141
+ this.filterCtrl.setValue(null);
1142
+ }
1143
+ _filter(filtro) {
1144
+ const filterValue = filtro && StringUtil.normalize(filtro);
1145
+ return this.opcoes.toArray()
1146
+ .filter(opcao => !this.value || this.value.indexOf(opcao.value) < 0)
1147
+ .filter(opcao => !filterValue || StringUtil.normalize(opcao.label).indexOf(filterValue) >= 0);
1148
+ }
1149
+ }
1150
+ SelectChipsComponent.nextId = 0;
1151
+ SelectChipsComponent.decorators = [
1152
+ { type: Component, args: [{
1153
+ selector: 'mcl-select-chips',
1154
+ 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",
1155
+ providers: [
1156
+ {
1157
+ provide: MatFormFieldControl,
1158
+ useExisting: SelectChipsComponent
1159
+ }
1160
+ ],
1161
+ styles: [""]
1162
+ },] }
1163
+ ];
1164
+ SelectChipsComponent.ctorParameters = () => [
1165
+ { type: ErrorStateMatcher },
1166
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1167
+ { type: NgForm, decorators: [{ type: Optional }] },
1168
+ { type: FormGroupDirective, decorators: [{ type: Optional }] }
1169
+ ];
1170
+ SelectChipsComponent.propDecorators = {
1171
+ input: [{ type: ViewChild, args: ['input',] }],
1172
+ id: [{ type: HostBinding }],
1173
+ describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1174
+ opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1175
+ filterInput: [{ type: ViewChild, args: ['filterInput',] }],
1176
+ filterAutocomplete: [{ type: ViewChild, args: ['filterAutocomplete',] }],
1177
+ shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1178
+ placeholder: [{ type: Input }],
1179
+ required: [{ type: Input }],
1180
+ disabled: [{ type: Input }]
1181
+ };
1182
+
1183
+ class SelectItemModule {
1184
+ }
1185
+ SelectItemModule.decorators = [
1186
+ { type: NgModule, args: [{
1187
+ declarations: [SelectItemComponent],
1188
+ exports: [SelectItemComponent],
1189
+ imports: [
1190
+ CommonModule,
1191
+ ],
1192
+ },] }
1193
+ ];
1194
+
1195
+ class SelectChipsModule {
1196
+ }
1197
+ SelectChipsModule.decorators = [
1198
+ { type: NgModule, args: [{
1199
+ declarations: [SelectChipsComponent],
1200
+ exports: [SelectChipsComponent, SelectItemModule],
1201
+ imports: [
1202
+ CommonModule,
1203
+ MatChipsModule,
1204
+ MatIconModule,
1205
+ ReactiveFormsModule,
1206
+ MatAutocompleteModule,
1207
+ SelectItemModule,
1208
+ ],
1209
+ },] }
1210
+ ];
1211
+
1212
+ class SelectManyCheckboxComponent {
1213
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1214
+ this.errorStateMatcher = errorStateMatcher;
1215
+ this.ngControl = ngControl;
1216
+ this.parentForm = parentForm;
1217
+ this.parentFormGroup = parentFormGroup;
1218
+ this.onChange = (val) => {
1219
+ };
1220
+ this.onTouched = () => {
1221
+ };
1222
+ this.$disabled = false;
1223
+ this.$required = false;
1224
+ this.layout = 'grid';
1225
+ this.layoutColumns = 3;
1226
+ this.stateChanges = new Subject();
1227
+ this.id = `select-radio-${SelectManyCheckboxComponent.nextId++}`;
1228
+ this.describedBy = '';
1229
+ if (this.ngControl != null) {
1230
+ this.ngControl.valueAccessor = this;
1231
+ }
1232
+ }
1233
+ ngAfterViewInit() {
1234
+ this.opcoes.changes.subscribe(() => {
1235
+ this.updateOpcoes();
1236
+ });
1237
+ }
1238
+ get value() {
1239
+ return this.$value;
1240
+ }
1241
+ set value(value) {
1242
+ this.$value = value;
1243
+ this.onChange(value);
1244
+ this.stateChanges.next();
1245
+ }
1246
+ get focused() {
1247
+ return false;
1248
+ }
1249
+ get empty() {
1250
+ return !this.value;
1251
+ }
1252
+ onContainerClick(event) {
1253
+ }
1254
+ get shouldLabelFloat() {
1255
+ return true;
1256
+ }
1257
+ get placeholder() {
1258
+ return this.$placeholder;
1259
+ }
1260
+ set placeholder(plh) {
1261
+ this.$placeholder = plh;
1262
+ this.stateChanges.next();
1263
+ }
1264
+ get required() {
1265
+ return this.$required;
1266
+ }
1267
+ set required(value) {
1268
+ this.$required = coerceBooleanProperty(value);
1269
+ this.stateChanges.next();
1270
+ }
1271
+ get disabled() {
1272
+ return this.$disabled;
1273
+ }
1274
+ set disabled(value) {
1275
+ this.$disabled = coerceBooleanProperty(value);
1276
+ this.stateChanges.next();
1277
+ }
1278
+ get errorState() {
1279
+ return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1280
+ }
1281
+ get controlType() {
1282
+ return 'select-chips';
1283
+ }
1284
+ setDescribedByIds(ids) {
1285
+ this.describedBy = ids.join(' ');
1286
+ }
1287
+ ngOnDestroy() {
1288
+ this.stateChanges.complete();
1289
+ }
1290
+ registerOnTouched(fn) {
1291
+ this.onTouched = fn;
1292
+ }
1293
+ registerOnChange(fn) {
1294
+ this.onChange = fn;
1295
+ }
1296
+ setDisabledState(isDisabled) {
1297
+ this.disabled = isDisabled;
1298
+ }
1299
+ writeValue(value) {
1300
+ this.updateOpcoes(value);
1301
+ this.$value = value;
1302
+ }
1303
+ change(opcao, selected) {
1304
+ opcao._selected = selected;
1305
+ this.value = this.opcoesToValue();
1306
+ }
1307
+ updateOpcoes(value = this.value) {
1308
+ for (const opcao of this.opcoes) {
1309
+ opcao._selected = value && value.indexOf(opcao.value) >= 0;
1310
+ }
1311
+ }
1312
+ opcoesToValue() {
1313
+ const val = [];
1314
+ for (const opcao of this.opcoes) {
1315
+ if (opcao._selected) {
1316
+ val.push(opcao.value);
1317
+ }
1318
+ }
1319
+ return val.length ? val : undefined;
1320
+ }
1321
+ }
1322
+ SelectManyCheckboxComponent.nextId = 0;
1323
+ SelectManyCheckboxComponent.decorators = [
1324
+ { type: Component, args: [{
1325
+ selector: 'mcl-select-many-checkbox',
1326
+ 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",
1327
+ providers: [
1328
+ {
1329
+ provide: MatFormFieldControl,
1330
+ useExisting: SelectManyCheckboxComponent
1331
+ }
1332
+ ],
1333
+ 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}}"]
1334
+ },] }
1335
+ ];
1336
+ SelectManyCheckboxComponent.ctorParameters = () => [
1337
+ { type: ErrorStateMatcher },
1338
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1339
+ { type: NgForm, decorators: [{ type: Optional }] },
1340
+ { type: FormGroupDirective, decorators: [{ type: Optional }] }
1341
+ ];
1342
+ SelectManyCheckboxComponent.propDecorators = {
1343
+ layout: [{ type: Input }],
1344
+ layoutColumns: [{ type: Input }],
1345
+ input: [{ type: ViewChild, args: ['input',] }],
1346
+ id: [{ type: HostBinding }],
1347
+ describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1348
+ opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1349
+ shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1350
+ placeholder: [{ type: Input }],
1351
+ required: [{ type: Input }],
1352
+ disabled: [{ type: Input }]
1353
+ };
1354
+
1355
+ class SelectManyCheckboxModule {
1356
+ }
1357
+ SelectManyCheckboxModule.decorators = [
1358
+ { type: NgModule, args: [{
1359
+ declarations: [SelectManyCheckboxComponent],
1360
+ exports: [SelectManyCheckboxComponent, SelectItemModule],
1361
+ imports: [
1362
+ CommonModule,
1363
+ FormsModule,
1364
+ SelectItemModule,
1365
+ MatCheckboxModule
1366
+ ],
1367
+ },] }
1368
+ ];
1369
+
1370
+ class SelectRadioComponent {
1371
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1372
+ this.errorStateMatcher = errorStateMatcher;
1373
+ this.ngControl = ngControl;
1374
+ this.parentForm = parentForm;
1375
+ this.parentFormGroup = parentFormGroup;
1376
+ this.onChange = (val) => {
1377
+ };
1378
+ this.onTouched = () => {
1379
+ };
1380
+ this.$disabled = false;
1381
+ this.$required = false;
1382
+ this.layout = 'vertical';
1383
+ this.stateChanges = new Subject();
1384
+ this.id = `select-radio-${SelectRadioComponent.nextId++}`;
1385
+ this.describedBy = '';
1386
+ if (this.ngControl != null) {
1387
+ this.ngControl.valueAccessor = this;
1388
+ }
1389
+ }
1390
+ get value() {
1391
+ return this.$value;
1392
+ }
1393
+ set value(value) {
1394
+ this.$value = value;
1395
+ this.onChange(value);
1396
+ this.stateChanges.next();
1397
+ }
1398
+ get focused() {
1399
+ return false;
1400
+ }
1401
+ get empty() {
1402
+ return !this.value;
1403
+ }
1404
+ onContainerClick(event) {
1405
+ }
1406
+ get shouldLabelFloat() {
1407
+ return true;
1408
+ }
1409
+ get placeholder() {
1410
+ return this.$placeholder;
1411
+ }
1412
+ set placeholder(plh) {
1413
+ this.$placeholder = plh;
1414
+ this.stateChanges.next();
1415
+ }
1416
+ get required() {
1417
+ return this.$required;
1418
+ }
1419
+ set required(value) {
1420
+ this.$required = coerceBooleanProperty(value);
1421
+ this.stateChanges.next();
1422
+ }
1423
+ get disabled() {
1424
+ return this.$disabled;
1425
+ }
1426
+ set disabled(value) {
1427
+ this.$disabled = coerceBooleanProperty(value);
1428
+ this.stateChanges.next();
1429
+ }
1430
+ get errorState() {
1431
+ return this.errorStateMatcher.isErrorState(this.ngControl.control, this.parentFormGroup || this.parentForm);
1432
+ }
1433
+ get controlType() {
1434
+ return 'select-chips';
1435
+ }
1436
+ setDescribedByIds(ids) {
1437
+ this.describedBy = ids.join(' ');
1438
+ }
1439
+ ngOnDestroy() {
1440
+ this.stateChanges.complete();
1441
+ }
1442
+ registerOnTouched(fn) {
1443
+ this.onTouched = fn;
1444
+ }
1445
+ registerOnChange(fn) {
1446
+ this.onChange = fn;
1447
+ }
1448
+ setDisabledState(isDisabled) {
1449
+ this.disabled = isDisabled;
1450
+ }
1451
+ writeValue(value) {
1452
+ this.value = value;
1453
+ }
1454
+ }
1455
+ SelectRadioComponent.nextId = 0;
1456
+ SelectRadioComponent.decorators = [
1457
+ { type: Component, args: [{
1458
+ selector: 'mcl-select-radio',
1459
+ 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",
1460
+ providers: [
1461
+ {
1462
+ provide: MatFormFieldControl,
1463
+ useExisting: SelectRadioComponent
1464
+ }
1465
+ ],
1466
+ 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}}"]
1467
+ },] }
1468
+ ];
1469
+ SelectRadioComponent.ctorParameters = () => [
1470
+ { type: ErrorStateMatcher },
1471
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1472
+ { type: NgForm, decorators: [{ type: Optional }] },
1473
+ { type: FormGroupDirective, decorators: [{ type: Optional }] }
1474
+ ];
1475
+ SelectRadioComponent.propDecorators = {
1476
+ layout: [{ type: Input }],
1477
+ input: [{ type: ViewChild, args: ['input',] }],
1478
+ id: [{ type: HostBinding }],
1479
+ describedBy: [{ type: HostBinding, args: ['attr.aria-describedby',] }],
1480
+ opcoes: [{ type: ContentChildren, args: [SelectItemComponent,] }],
1481
+ shouldLabelFloat: [{ type: HostBinding, args: ['class.floating',] }],
1482
+ placeholder: [{ type: Input }],
1483
+ required: [{ type: Input }],
1484
+ disabled: [{ type: Input }]
1485
+ };
1486
+
1487
+ class SelectRadioModule {
1488
+ }
1489
+ SelectRadioModule.decorators = [
1490
+ { type: NgModule, args: [{
1491
+ declarations: [SelectRadioComponent],
1492
+ exports: [SelectRadioComponent, SelectItemModule],
1493
+ imports: [
1494
+ CommonModule,
1495
+ FormsModule,
1496
+ SelectItemModule,
1497
+ MatRadioModule
1498
+ ],
1499
+ },] }
1500
+ ];
1501
+
1502
+ class InputTelefoneInternacionalComponent extends AbstractMatFormFieldControl {
1503
+ constructor(errorStateMatcher, ngControl, parentForm, parentFormGroup) {
1504
+ super(errorStateMatcher, ngControl, parentForm, parentFormGroup);
1505
+ this.preferredContries = ['br'];
1506
+ this.blur = new EventEmitter();
1507
+ this.alwaysShowCountry = false;
1508
+ }
1509
+ get value() {
1510
+ return this.$innerValue;
1511
+ }
1512
+ set value(value) {
1513
+ this.$innerValue = value;
1514
+ this.stateChanges.next();
1515
+ this.onChange(value === null || value === void 0 ? void 0 : value.replace(/[^\d+]/g, ''));
1516
+ }
1517
+ get shouldLabelFloat() {
1518
+ return this.focused || !this.empty || this.alwaysShowCountry;
1519
+ }
1520
+ get empty() {
1521
+ return !this.value;
1522
+ }
1523
+ onFocus() {
1524
+ this.focused = true;
1525
+ this.stateChanges.next();
1526
+ }
1527
+ onBlur() {
1528
+ this.focused = false;
1529
+ this.stateChanges.next();
1530
+ this.blur.emit();
1531
+ }
1532
+ writeValue(value) {
1533
+ this.value = value;
1534
+ }
1535
+ }
1536
+ InputTelefoneInternacionalComponent.decorators = [
1537
+ { type: Component, args: [{
1538
+ selector: 'mcl-input-telefone-intl',
1539
+ 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",
1540
+ providers: [
1541
+ {
1542
+ provide: MatFormFieldControl,
1543
+ useExisting: InputTelefoneInternacionalComponent
1544
+ },
1545
+ ],
1546
+ 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}"]
1547
+ },] }
1548
+ ];
1549
+ InputTelefoneInternacionalComponent.ctorParameters = () => [
1550
+ { type: ErrorStateMatcher },
1551
+ { type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
1552
+ { type: NgForm, decorators: [{ type: Optional }] },
1553
+ { type: FormGroupDirective, decorators: [{ type: Optional }] }
1554
+ ];
1555
+ InputTelefoneInternacionalComponent.propDecorators = {
1556
+ preferredContries: [{ type: Input }],
1557
+ readonly: [{ type: Input }],
1558
+ blur: [{ type: Output }],
1559
+ alwaysShowCountry: [{ type: Input }],
1560
+ telInput: [{ type: ViewChild, args: ['input',] }]
1561
+ };
1562
+
1563
+ class InputTelefoneInternacionalValidatorDirective {
1564
+ constructor() {
1565
+ }
1566
+ validate(control) {
1567
+ return phoneNumberValidator(control);
1568
+ }
1569
+ }
1570
+ InputTelefoneInternacionalValidatorDirective.decorators = [
1571
+ { type: Directive, args: [{
1572
+ selector: 'mcl-input-telefone-intl,[mclInputTelefoneIntl]',
1573
+ providers: [{
1574
+ provide: NG_VALIDATORS,
1575
+ useExisting: InputTelefoneInternacionalValidatorDirective,
1576
+ multi: true,
1577
+ }]
1578
+ },] }
1579
+ ];
1580
+ InputTelefoneInternacionalValidatorDirective.ctorParameters = () => [];
1581
+
1582
+ class InputTelefoneInternacionalModule {
1583
+ }
1584
+ InputTelefoneInternacionalModule.decorators = [
1585
+ { type: NgModule, args: [{
1586
+ declarations: [InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective],
1587
+ exports: [
1588
+ InputTelefoneInternacionalComponent,
1589
+ InputTelefoneInternacionalValidatorDirective
1590
+ ],
1591
+ imports: [
1592
+ CommonModule,
1593
+ FormsModule,
1594
+ LacMatTelInputModule,
1595
+ ]
1596
+ },] }
1597
+ ];
1598
+
1599
+ /**
1600
+ * Generated bundle index. Do not edit.
1601
+ */
1602
+
1603
+ 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 };
1604
+ //# sourceMappingURL=main-class-componentes-input.js.map