keevo-components 1.8.42 → 1.8.45

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 (401) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +3 -16
  3. package/src/assets/.gitkeep +0 -0
  4. package/src/assets/images/LogoEvo.png +0 -0
  5. package/src/assets/images/LogoPequenaEvo.png +0 -0
  6. package/src/assets/images/background.png +0 -0
  7. package/src/assets/images/keepass-logo.png +0 -0
  8. package/src/assets/images/keepass-logo.svg +74 -0
  9. package/src/assets/images/keevo-logo.png +0 -0
  10. package/src/assets/images/logokeevo_2.png +0 -0
  11. package/src/index.ts +1 -0
  12. package/src/lib/api/base-components/base-component-button.ts +27 -0
  13. package/src/lib/api/base-components/base-component-chart.ts +105 -0
  14. package/src/lib/api/base-components/base-component-crud-form.ts +361 -0
  15. package/src/lib/api/base-components/base-component-crud-list.ts +121 -0
  16. package/src/lib/api/base-components/base-component-crud.ts +70 -0
  17. package/src/lib/api/base-components/base-component-dropdown-external.ts +29 -0
  18. package/src/lib/api/base-components/base-component-dropdown-new.ts +112 -0
  19. package/src/lib/api/base-components/base-component-dropdown.ts +170 -0
  20. package/src/lib/api/base-components/base-component-input.ts +107 -0
  21. package/src/lib/api/base-components/base-component-multi-select.ts +136 -0
  22. package/src/lib/api/base-components/base-component.ts +47 -0
  23. package/src/lib/api/components/chart/chart.config.ts +12 -0
  24. package/src/lib/api/components/chart/chart.model.ts +9 -0
  25. package/src/lib/api/components/chart/orchart.config.ts +41 -0
  26. package/src/lib/api/components/chart/orchart.item.ts +33 -0
  27. package/src/lib/api/components/dropdown/filtro.combo.ts +4 -0
  28. package/src/lib/api/components/table/action-item.ts +11 -0
  29. package/src/lib/api/components/table/kv-menuitem.ts +11 -0
  30. package/src/lib/api/components/table/table-dropdown-control.ts +6 -0
  31. package/src/lib/api/components/table/table.config.column.ts +27 -0
  32. package/src/lib/api/components/table/table.config.ts +22 -0
  33. package/src/lib/api/components/table/table.paginate.ts +6 -0
  34. package/src/lib/api/components/table/tabledit.config.ts +10 -0
  35. package/src/lib/api/components/table/tableedit.config.column.ts +12 -0
  36. package/src/lib/api/directives/directives.module.ts +16 -0
  37. package/src/lib/api/directives/drag/drag.directive.ts +40 -0
  38. package/src/lib/api/directives/template/template.directive.ts +15 -0
  39. package/src/lib/api/helpers/component-providers.ts +16 -0
  40. package/src/lib/api/helpers/keevo-validators.ts +86 -0
  41. package/src/lib/api/helpers/translate-primeng.ts +25 -0
  42. package/src/lib/api/modules/primeng.module.ts +130 -0
  43. package/src/lib/api/pipes/cpfcnpj.pipe.ts +21 -0
  44. package/src/lib/api/pipes/mask.pipe.ts +24 -0
  45. package/src/lib/api/pipes/pipes.module.ts +23 -0
  46. package/src/lib/api/pipes/telefone.pipe.ts +38 -0
  47. package/src/lib/api/services/base.api.service.ts +115 -0
  48. package/src/lib/api/services/breadcrumbs.service.ts +58 -0
  49. package/src/lib/api/services/component.service.ts +32 -0
  50. package/src/lib/api/services/docs.service.ts +129 -0
  51. package/src/lib/api/services/form.service.ts +115 -0
  52. package/src/lib/api/services/imagens.service.ts +28 -0
  53. package/src/lib/api/services/notification.service.ts +85 -0
  54. package/src/lib/api/services/object.service.ts +33 -0
  55. package/src/lib/components/keevo-components-styles.scss +11 -0
  56. package/src/lib/components/keevo-components.module.ts +65 -0
  57. package/src/lib/components/kv-avatar/kv-avatar.component.html +12 -0
  58. package/src/lib/components/kv-avatar/kv-avatar.component.scss +45 -0
  59. package/src/lib/components/kv-avatar/kv-avatar.component.spec.ts +23 -0
  60. package/src/lib/components/kv-avatar/kv-avatar.component.ts +72 -0
  61. package/src/lib/components/kv-avatar/kv-avatar.module.ts +21 -0
  62. package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.html +15 -0
  63. package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.scss +3 -0
  64. package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.ts +34 -0
  65. package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.html +12 -0
  66. package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.scss +13 -0
  67. package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.ts +35 -0
  68. package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.html +12 -0
  69. package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.scss +14 -0
  70. package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.ts +14 -0
  71. package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.html +11 -0
  72. package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.scss +13 -0
  73. package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.ts +14 -0
  74. package/src/lib/components/kv-buttons/kv-button.module.ts +26 -0
  75. package/src/lib/components/kv-carousel/kv-carousel.component.html +31 -0
  76. package/src/lib/components/kv-carousel/kv-carousel.component.scss +24 -0
  77. package/src/lib/components/kv-carousel/kv-carousel.component.spec.ts +23 -0
  78. package/src/lib/components/kv-carousel/kv-carousel.component.ts +104 -0
  79. package/src/lib/components/kv-carousel/kv-carousel.module.ts +19 -0
  80. package/src/lib/components/kv-chart/kv-chart.component.html +38 -0
  81. package/src/lib/components/kv-chart/kv-chart.component.scss +0 -0
  82. package/src/lib/components/kv-chart/kv-chart.component.spec.ts +28 -0
  83. package/src/lib/components/kv-chart/kv-chart.component.ts +153 -0
  84. package/src/lib/components/kv-chart/kv-chart.module.ts +21 -0
  85. package/src/lib/components/kv-error/kv-error.component.html +3 -0
  86. package/src/lib/components/kv-error/kv-error.component.scss +5 -0
  87. package/src/lib/components/kv-error/kv-error.component.ts +27 -0
  88. package/src/lib/components/kv-error/kv-error.module.ts +26 -0
  89. package/src/lib/components/kv-inputs/kv-check/kv-check.component.html +11 -0
  90. package/src/lib/components/kv-inputs/kv-check/kv-check.component.scss +13 -0
  91. package/src/lib/components/kv-inputs/kv-check/kv-check.component.ts +32 -0
  92. package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.html +91 -0
  93. package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.scss +4 -0
  94. package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.ts +38 -0
  95. package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.html +97 -0
  96. package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.scss +4 -0
  97. package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.ts +99 -0
  98. package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.html +30 -0
  99. package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.scss +0 -0
  100. package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.ts +84 -0
  101. package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.html +22 -0
  102. package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.scss +0 -0
  103. package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.ts +35 -0
  104. package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.html +23 -0
  105. package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.scss +0 -0
  106. package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.ts +61 -0
  107. package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.html +23 -0
  108. package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.scss +0 -0
  109. package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.ts +26 -0
  110. package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.html +22 -0
  111. package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.scss +18 -0
  112. package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.ts +27 -0
  113. package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.html +35 -0
  114. package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.scss +0 -0
  115. package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.spec.ts +23 -0
  116. package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.ts +43 -0
  117. package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.html +22 -0
  118. package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.scss +0 -0
  119. package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.ts +40 -0
  120. package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.html +23 -0
  121. package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.scss +0 -0
  122. package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.ts +27 -0
  123. package/src/lib/components/kv-inputs/kv-inputs.module.ts +70 -0
  124. package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.html +45 -0
  125. package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.scss +8 -0
  126. package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.ts +44 -0
  127. package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.html +19 -0
  128. package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.scss +15 -0
  129. package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.ts +59 -0
  130. package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.html +13 -0
  131. package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.scss +3 -0
  132. package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.ts +41 -0
  133. package/src/lib/components/kv-label/kv-label.component.html +6 -0
  134. package/src/lib/components/kv-label/kv-label.component.scss +9 -0
  135. package/src/lib/components/kv-label/kv-label.component.spec.ts +23 -0
  136. package/src/lib/components/kv-label/kv-label.component.ts +14 -0
  137. package/src/lib/components/kv-label/kv-label.module.ts +17 -0
  138. package/src/lib/components/kv-loader/kv-loader.component.html +1 -0
  139. package/src/lib/components/kv-loader/kv-loader.component.ts +15 -0
  140. package/src/lib/components/kv-loader/kv-loader.module.ts +17 -0
  141. package/src/lib/components/kv-loader/kv-loader.service.ts +31 -0
  142. package/src/lib/components/kv-login/kv-login.component.html +108 -0
  143. package/src/lib/components/kv-login/kv-login.component.scss +48 -0
  144. package/src/lib/components/kv-login/kv-login.component.spec.ts +23 -0
  145. package/src/lib/components/kv-login/kv-login.component.ts +81 -0
  146. package/src/lib/components/kv-login/kv-login.module.ts +33 -0
  147. package/src/lib/components/kv-menu/kv-menu.component.html +259 -0
  148. package/src/lib/components/kv-menu/kv-menu.component.scss +210 -0
  149. package/src/lib/components/kv-menu/kv-menu.component.spec.ts +23 -0
  150. package/src/lib/components/kv-menu/kv-menu.component.ts +192 -0
  151. package/src/lib/components/kv-menu/kv-menu.module.ts +33 -0
  152. package/src/lib/components/kv-modal/kv-modal.component.html +19 -0
  153. package/src/lib/components/kv-modal/kv-modal.component.scss +13 -0
  154. package/src/lib/components/kv-modal/kv-modal.component.spec.ts +21 -0
  155. package/src/lib/components/kv-modal/kv-modal.component.ts +73 -0
  156. package/src/lib/components/kv-modal/kv-modal.module.ts +21 -0
  157. package/src/lib/components/kv-orgchart/kv-orgchart.component.html +58 -0
  158. package/src/lib/components/kv-orgchart/kv-orgchart.component.scss +21 -0
  159. package/src/lib/components/kv-orgchart/kv-orgchart.component.ts +110 -0
  160. package/src/lib/components/kv-orgchart/kv-orgchart.module.ts +14 -0
  161. package/src/lib/components/kv-page-form/kv-page-form.component.html +59 -0
  162. package/src/lib/components/kv-page-form/kv-page-form.component.scss +76 -0
  163. package/src/lib/components/kv-page-form/kv-page-form.component.spec.ts +28 -0
  164. package/src/lib/components/kv-page-form/kv-page-form.component.ts +134 -0
  165. package/src/lib/components/kv-page-form/kv-page-form.module.ts +31 -0
  166. package/src/lib/components/kv-pick-list/kv-pick-list.component.html +17 -0
  167. package/src/lib/components/kv-pick-list/kv-pick-list.component.scss +0 -0
  168. package/src/lib/components/kv-pick-list/kv-pick-list.component.spec.ts +26 -0
  169. package/src/lib/components/kv-pick-list/kv-pick-list.component.ts +34 -0
  170. package/src/lib/components/kv-pick-list/kv-pick-list.module.ts +21 -0
  171. package/src/lib/components/kv-progress-bar/kv-progress-bar.component.html +38 -0
  172. package/src/lib/components/kv-progress-bar/kv-progress-bar.component.scss +110 -0
  173. package/src/lib/components/kv-progress-bar/kv-progress-bar.component.spec.ts +21 -0
  174. package/src/lib/components/kv-progress-bar/kv-progress-bar.component.ts +79 -0
  175. package/src/lib/components/kv-progress-bar/kv-progress-bar.module.ts +19 -0
  176. package/src/lib/components/kv-table/kv-table.component.html +530 -0
  177. package/src/lib/components/kv-table/kv-table.component.scss +265 -0
  178. package/src/lib/components/kv-table/kv-table.component.spec.ts +28 -0
  179. package/src/lib/components/kv-table/kv-table.component.ts +599 -0
  180. package/src/lib/components/kv-table/kv-table.module.ts +23 -0
  181. package/src/lib/components/kv-table-edit/kv-table-edit.component.html +630 -0
  182. package/src/lib/components/kv-table-edit/kv-table-edit.component.scss +365 -0
  183. package/src/lib/components/kv-table-edit/kv-table-edit.component.ts +602 -0
  184. package/src/lib/components/kv-table-edit/kv-table-edit.module.ts +24 -0
  185. package/src/lib/components/kv-tree-table/kv-tree-table.component.html +316 -0
  186. package/src/lib/components/kv-tree-table/kv-tree-table.component.scss +130 -0
  187. package/src/lib/components/kv-tree-table/kv-tree-table.component.spec.ts +21 -0
  188. package/src/lib/components/kv-tree-table/kv-tree-table.component.ts +231 -0
  189. package/src/lib/components/kv-tree-table/kv-tree-table.module.ts +18 -0
  190. package/src/lib/components/kv-tree-view/kv-tree-view.component.html +9 -0
  191. package/src/lib/components/kv-tree-view/kv-tree-view.component.scss +0 -0
  192. package/src/lib/components/kv-tree-view/kv-tree-view.component.spec.ts +23 -0
  193. package/src/lib/components/kv-tree-view/kv-tree-view.component.ts +31 -0
  194. package/src/lib/components/kv-tree-view/kv-tree-view.module.ts +19 -0
  195. package/src/lib/components/kv-workspace/kv-workspace.component.html +57 -0
  196. package/src/lib/components/kv-workspace/kv-workspace.component.scss +117 -0
  197. package/src/lib/components/kv-workspace/kv-workspace.component.ts +196 -0
  198. package/src/lib/components/kv-workspace/kv-workspace.module.ts +35 -0
  199. package/{public-api.d.ts → src/public-api.ts} +41 -14
  200. package/tsconfig.lib.json +14 -0
  201. package/tsconfig.lib.prod.json +10 -0
  202. package/tsconfig.spec.json +14 -0
  203. package/esm2022/keevo-components.mjs +0 -5
  204. package/esm2022/lib/api/base-components/base-component-button.mjs +0 -36
  205. package/esm2022/lib/api/base-components/base-component-chart.mjs +0 -92
  206. package/esm2022/lib/api/base-components/base-component-crud-form.mjs +0 -298
  207. package/esm2022/lib/api/base-components/base-component-crud-list.mjs +0 -78
  208. package/esm2022/lib/api/base-components/base-component-crud.mjs +0 -65
  209. package/esm2022/lib/api/base-components/base-component-dropdown-external.mjs +0 -31
  210. package/esm2022/lib/api/base-components/base-component-dropdown.mjs +0 -169
  211. package/esm2022/lib/api/base-components/base-component-input.mjs +0 -94
  212. package/esm2022/lib/api/base-components/base-component-multi-select.mjs +0 -130
  213. package/esm2022/lib/api/base-components/base-component.mjs +0 -51
  214. package/esm2022/lib/api/components/chart/chart.config.mjs +0 -2
  215. package/esm2022/lib/api/components/chart/chart.model.mjs +0 -2
  216. package/esm2022/lib/api/components/chart/orchart.config.mjs +0 -2
  217. package/esm2022/lib/api/components/chart/orchart.item.mjs +0 -2
  218. package/esm2022/lib/api/components/dropdown/filtro.combo.mjs +0 -2
  219. package/esm2022/lib/api/components/table/action-item.mjs +0 -2
  220. package/esm2022/lib/api/components/table/kv-menuitem.mjs +0 -3
  221. package/esm2022/lib/api/components/table/table-dropdown-control.mjs +0 -2
  222. package/esm2022/lib/api/components/table/table.config.column.mjs +0 -2
  223. package/esm2022/lib/api/components/table/table.config.mjs +0 -2
  224. package/esm2022/lib/api/components/table/table.paginate.mjs +0 -9
  225. package/esm2022/lib/api/components/table/tabledit.config.mjs +0 -2
  226. package/esm2022/lib/api/components/table/tableedit.config.column.mjs +0 -2
  227. package/esm2022/lib/api/directives/template/template.directive.mjs +0 -24
  228. package/esm2022/lib/api/helpers/component-providers.mjs +0 -16
  229. package/esm2022/lib/api/helpers/keevo-validators.mjs +0 -72
  230. package/esm2022/lib/api/helpers/translate-primeng.mjs +0 -23
  231. package/esm2022/lib/api/modules/primeng.module.mjs +0 -255
  232. package/esm2022/lib/api/pipes/cpfcnpj.pipe.mjs +0 -25
  233. package/esm2022/lib/api/pipes/mask.pipe.mjs +0 -29
  234. package/esm2022/lib/api/pipes/pipes.module.mjs +0 -34
  235. package/esm2022/lib/api/pipes/telefone.pipe.mjs +0 -45
  236. package/esm2022/lib/api/services/base.api.service.mjs +0 -74
  237. package/esm2022/lib/api/services/breadcrumbs.service.mjs +0 -57
  238. package/esm2022/lib/api/services/component.service.mjs +0 -27
  239. package/esm2022/lib/api/services/form.service.mjs +0 -85
  240. package/esm2022/lib/api/services/imagens.service.mjs +0 -28
  241. package/esm2022/lib/api/services/notification.service.mjs +0 -67
  242. package/esm2022/lib/api/services/object.service.mjs +0 -39
  243. package/esm2022/lib/components/keevo-components.module.mjs +0 -137
  244. package/esm2022/lib/components/kv-avatar/kv-avatar.component.mjs +0 -78
  245. package/esm2022/lib/components/kv-avatar/kv-avatar.module.mjs +0 -32
  246. package/esm2022/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.mjs +0 -31
  247. package/esm2022/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.mjs +0 -31
  248. package/esm2022/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.mjs +0 -17
  249. package/esm2022/lib/components/kv-buttons/kv-button-success/kv-button-success.component.mjs +0 -17
  250. package/esm2022/lib/components/kv-buttons/kv-button.module.mjs +0 -39
  251. package/esm2022/lib/components/kv-carousel/kv-carousel.component.mjs +0 -92
  252. package/esm2022/lib/components/kv-carousel/kv-carousel.module.mjs +0 -28
  253. package/esm2022/lib/components/kv-chart/kv-chart.component.mjs +0 -145
  254. package/esm2022/lib/components/kv-chart/kv-chart.module.mjs +0 -32
  255. package/esm2022/lib/components/kv-error/kv-error.component.mjs +0 -26
  256. package/esm2022/lib/components/kv-error/kv-error.module.mjs +0 -35
  257. package/esm2022/lib/components/kv-inputs/kv-check/kv-check.component.mjs +0 -26
  258. package/esm2022/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.mjs +0 -37
  259. package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.component.mjs +0 -88
  260. package/esm2022/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.mjs +0 -89
  261. package/esm2022/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.mjs +0 -29
  262. package/esm2022/lib/components/kv-inputs/kv-input-number/kv-input-number.component.mjs +0 -59
  263. package/esm2022/lib/components/kv-inputs/kv-input-password/kv-input-password.component.mjs +0 -33
  264. package/esm2022/lib/components/kv-inputs/kv-input-text/kv-input-text.component.mjs +0 -21
  265. package/esm2022/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.mjs +0 -42
  266. package/esm2022/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.mjs +0 -43
  267. package/esm2022/lib/components/kv-inputs/kv-input-time/kv-input-time.component.mjs +0 -24
  268. package/esm2022/lib/components/kv-inputs/kv-inputs.module.mjs +0 -108
  269. package/esm2022/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.mjs +0 -44
  270. package/esm2022/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.mjs +0 -53
  271. package/esm2022/lib/components/kv-inputs/kv-switch/kv-switch.component.mjs +0 -34
  272. package/esm2022/lib/components/kv-label/kv-label.component.mjs +0 -15
  273. package/esm2022/lib/components/kv-label/kv-label.module.mjs +0 -24
  274. package/esm2022/lib/components/kv-loader/kv-loader.component.mjs +0 -17
  275. package/esm2022/lib/components/kv-loader/kv-loader.module.mjs +0 -28
  276. package/esm2022/lib/components/kv-loader/kv-loader.service.mjs +0 -29
  277. package/esm2022/lib/components/kv-login/kv-login.component.mjs +0 -52
  278. package/esm2022/lib/components/kv-login/kv-login.module.mjs +0 -47
  279. package/esm2022/lib/components/kv-menu/kv-menu.component.mjs +0 -188
  280. package/esm2022/lib/components/kv-menu/kv-menu.module.mjs +0 -47
  281. package/esm2022/lib/components/kv-modal/kv-modal.component.mjs +0 -67
  282. package/esm2022/lib/components/kv-modal/kv-modal.module.mjs +0 -31
  283. package/esm2022/lib/components/kv-orgchart/kv-orgchart.component.mjs +0 -100
  284. package/esm2022/lib/components/kv-orgchart/kv-orgchart.module.mjs +0 -24
  285. package/esm2022/lib/components/kv-page-form/kv-page-form.component.mjs +0 -147
  286. package/esm2022/lib/components/kv-page-form/kv-page-form.module.mjs +0 -38
  287. package/esm2022/lib/components/kv-pick-list/kv-pick-list.component.mjs +0 -48
  288. package/esm2022/lib/components/kv-pick-list/kv-pick-list.module.mjs +0 -32
  289. package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.component.mjs +0 -58
  290. package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.module.mjs +0 -28
  291. package/esm2022/lib/components/kv-table/kv-table.component.mjs +0 -550
  292. package/esm2022/lib/components/kv-table/kv-table.module.mjs +0 -36
  293. package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +0 -564
  294. package/esm2022/lib/components/kv-table-edit/kv-table-edit.module.mjs +0 -34
  295. package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +0 -215
  296. package/esm2022/lib/components/kv-tree-table/kv-tree-table.module.mjs +0 -28
  297. package/esm2022/lib/components/kv-tree-view/kv-tree-view.component.mjs +0 -30
  298. package/esm2022/lib/components/kv-tree-view/kv-tree-view.module.mjs +0 -28
  299. package/esm2022/lib/components/kv-workspace/kv-workspace.component.mjs +0 -178
  300. package/esm2022/lib/components/kv-workspace/kv-workspace.module.mjs +0 -51
  301. package/esm2022/public-api.mjs +0 -166
  302. package/fesm2022/keevo-components.mjs +0 -5667
  303. package/fesm2022/keevo-components.mjs.map +0 -1
  304. package/index.d.ts +0 -5
  305. package/lib/api/base-components/base-component-button.d.ts +0 -14
  306. package/lib/api/base-components/base-component-chart.d.ts +0 -40
  307. package/lib/api/base-components/base-component-crud-form.d.ts +0 -145
  308. package/lib/api/base-components/base-component-crud-list.d.ts +0 -63
  309. package/lib/api/base-components/base-component-crud.d.ts +0 -36
  310. package/lib/api/base-components/base-component-dropdown-external.d.ts +0 -15
  311. package/lib/api/base-components/base-component-dropdown.d.ts +0 -44
  312. package/lib/api/base-components/base-component-input.d.ts +0 -31
  313. package/lib/api/base-components/base-component-multi-select.d.ts +0 -35
  314. package/lib/api/base-components/base-component.d.ts +0 -22
  315. package/lib/api/components/chart/chart.config.d.ts +0 -11
  316. package/lib/api/components/chart/chart.model.d.ts +0 -9
  317. package/lib/api/components/chart/orchart.config.d.ts +0 -35
  318. package/lib/api/components/chart/orchart.item.d.ts +0 -26
  319. package/lib/api/components/dropdown/filtro.combo.d.ts +0 -4
  320. package/lib/api/components/table/action-item.d.ts +0 -11
  321. package/lib/api/components/table/kv-menuitem.d.ts +0 -10
  322. package/lib/api/components/table/table-dropdown-control.d.ts +0 -6
  323. package/lib/api/components/table/table.config.column.d.ts +0 -25
  324. package/lib/api/components/table/table.config.d.ts +0 -19
  325. package/lib/api/components/table/table.paginate.d.ts +0 -6
  326. package/lib/api/components/table/tabledit.config.d.ts +0 -8
  327. package/lib/api/components/table/tableedit.config.column.d.ts +0 -10
  328. package/lib/api/directives/template/template.directive.d.ts +0 -11
  329. package/lib/api/helpers/component-providers.d.ts +0 -2
  330. package/lib/api/helpers/keevo-validators.d.ts +0 -11
  331. package/lib/api/helpers/translate-primeng.d.ts +0 -4
  332. package/lib/api/modules/primeng.module.d.ts +0 -62
  333. package/lib/api/pipes/cpfcnpj.pipe.d.ts +0 -7
  334. package/lib/api/pipes/mask.pipe.d.ts +0 -7
  335. package/lib/api/pipes/pipes.module.d.ts +0 -10
  336. package/lib/api/pipes/telefone.pipe.d.ts +0 -7
  337. package/lib/api/services/base.api.service.d.ts +0 -25
  338. package/lib/api/services/breadcrumbs.service.d.ts +0 -15
  339. package/lib/api/services/component.service.d.ts +0 -11
  340. package/lib/api/services/form.service.d.ts +0 -28
  341. package/lib/api/services/imagens.service.d.ts +0 -10
  342. package/lib/api/services/notification.service.d.ts +0 -25
  343. package/lib/api/services/object.service.d.ts +0 -9
  344. package/lib/components/keevo-components.module.d.ts +0 -24
  345. package/lib/components/kv-avatar/kv-avatar.component.d.ts +0 -22
  346. package/lib/components/kv-avatar/kv-avatar.module.d.ts +0 -10
  347. package/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.d.ts +0 -13
  348. package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +0 -13
  349. package/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.d.ts +0 -7
  350. package/lib/components/kv-buttons/kv-button-success/kv-button-success.component.d.ts +0 -7
  351. package/lib/components/kv-buttons/kv-button.module.d.ts +0 -11
  352. package/lib/components/kv-carousel/kv-carousel.component.d.ts +0 -16
  353. package/lib/components/kv-carousel/kv-carousel.module.d.ts +0 -9
  354. package/lib/components/kv-chart/kv-chart.component.d.ts +0 -56
  355. package/lib/components/kv-chart/kv-chart.module.d.ts +0 -10
  356. package/lib/components/kv-error/kv-error.component.d.ts +0 -12
  357. package/lib/components/kv-error/kv-error.module.d.ts +0 -10
  358. package/lib/components/kv-inputs/kv-check/kv-check.component.d.ts +0 -11
  359. package/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.d.ts +0 -14
  360. package/lib/components/kv-inputs/kv-editor/kv-editor.component.d.ts +0 -36
  361. package/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.d.ts +0 -27
  362. package/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.d.ts +0 -12
  363. package/lib/components/kv-inputs/kv-input-number/kv-input-number.component.d.ts +0 -19
  364. package/lib/components/kv-inputs/kv-input-password/kv-input-password.component.d.ts +0 -13
  365. package/lib/components/kv-inputs/kv-input-text/kv-input-text.component.d.ts +0 -9
  366. package/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.d.ts +0 -16
  367. package/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.d.ts +0 -16
  368. package/lib/components/kv-inputs/kv-input-time/kv-input-time.component.d.ts +0 -10
  369. package/lib/components/kv-inputs/kv-inputs.module.d.ts +0 -25
  370. package/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.d.ts +0 -15
  371. package/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.d.ts +0 -18
  372. package/lib/components/kv-inputs/kv-switch/kv-switch.component.d.ts +0 -14
  373. package/lib/components/kv-label/kv-label.component.d.ts +0 -7
  374. package/lib/components/kv-label/kv-label.module.d.ts +0 -8
  375. package/lib/components/kv-loader/kv-loader.component.d.ts +0 -8
  376. package/lib/components/kv-loader/kv-loader.module.d.ts +0 -9
  377. package/lib/components/kv-loader/kv-loader.service.d.ts +0 -10
  378. package/lib/components/kv-login/kv-login.component.d.ts +0 -30
  379. package/lib/components/kv-login/kv-login.module.d.ts +0 -13
  380. package/lib/components/kv-menu/kv-menu.component.d.ts +0 -58
  381. package/lib/components/kv-menu/kv-menu.module.d.ts +0 -13
  382. package/lib/components/kv-modal/kv-modal.component.d.ts +0 -20
  383. package/lib/components/kv-modal/kv-modal.module.d.ts +0 -10
  384. package/lib/components/kv-orgchart/kv-orgchart.component.d.ts +0 -27
  385. package/lib/components/kv-orgchart/kv-orgchart.module.d.ts +0 -9
  386. package/lib/components/kv-page-form/kv-page-form.component.d.ts +0 -70
  387. package/lib/components/kv-page-form/kv-page-form.module.d.ts +0 -11
  388. package/lib/components/kv-pick-list/kv-pick-list.component.d.ts +0 -20
  389. package/lib/components/kv-pick-list/kv-pick-list.module.d.ts +0 -10
  390. package/lib/components/kv-progress-bar/kv-progress-bar.component.d.ts +0 -67
  391. package/lib/components/kv-progress-bar/kv-progress-bar.module.d.ts +0 -9
  392. package/lib/components/kv-table/kv-table.component.d.ts +0 -111
  393. package/lib/components/kv-table/kv-table.module.d.ts +0 -11
  394. package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +0 -115
  395. package/lib/components/kv-table-edit/kv-table-edit.module.d.ts +0 -12
  396. package/lib/components/kv-tree-table/kv-tree-table.component.d.ts +0 -42
  397. package/lib/components/kv-tree-table/kv-tree-table.module.d.ts +0 -9
  398. package/lib/components/kv-tree-view/kv-tree-view.component.d.ts +0 -14
  399. package/lib/components/kv-tree-view/kv-tree-view.module.d.ts +0 -9
  400. package/lib/components/kv-workspace/kv-workspace.component.d.ts +0 -46
  401. package/lib/components/kv-workspace/kv-workspace.module.d.ts +0 -14
@@ -0,0 +1,130 @@
1
+ import { NgModule } from '@angular/core';
2
+
3
+ import { AccordionModule } from 'primeng/accordion';
4
+ import { AutoFocusModule } from 'primeng/autofocus';
5
+ import { BadgeModule } from 'primeng/badge';
6
+ import { BreadcrumbModule } from 'primeng/breadcrumb';
7
+ import { ButtonModule } from 'primeng/button';
8
+ import { CalendarModule } from 'primeng/calendar';
9
+ import { CardModule } from 'primeng/card';
10
+ import { CarouselModule } from 'primeng/carousel';
11
+ import { ChartModule } from 'primeng/chart';
12
+ import { CheckboxModule } from 'primeng/checkbox';
13
+ import { ChipModule } from 'primeng/chip';
14
+ import { ConfirmationService, MessageService } from 'primeng/api';
15
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
16
+ import { ContextMenuModule } from 'primeng/contextmenu';
17
+ import { DataViewModule } from 'primeng/dataview';
18
+ import { DialogModule } from 'primeng/dialog';
19
+ import { DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
20
+ import { DividerModule } from 'primeng/divider';
21
+ import { DropdownModule } from 'primeng/dropdown';
22
+ import { DynamicDialogModule } from 'primeng/dynamicdialog';
23
+ import { EditorModule } from 'primeng/editor';
24
+ import { FieldsetModule } from 'primeng/fieldset';
25
+ import { FileUploadModule } from 'primeng/fileupload';
26
+ import { ImageModule } from 'primeng/image';
27
+ import { InputMaskModule } from 'primeng/inputmask';
28
+ import { InputNumberModule } from 'primeng/inputnumber';
29
+ import { InputSwitchModule } from 'primeng/inputswitch';
30
+ import { InputTextareaModule } from 'primeng/inputtextarea';
31
+ import { InputTextModule } from 'primeng/inputtext';
32
+ import { KnobModule } from 'primeng/knob';
33
+ import { MenuModule } from 'primeng/menu';
34
+ import { MessageModule } from 'primeng/message';
35
+ import { MessagesModule } from 'primeng/messages';
36
+ import { MultiSelectModule } from 'primeng/multiselect';
37
+ import { OverlayModule } from 'primeng/overlay';
38
+ import { OverlayPanelModule } from 'primeng/overlaypanel';
39
+ import { PanelMenuModule } from 'primeng/panelmenu';
40
+ import { PanelModule } from 'primeng/panel';
41
+ import { PasswordModule } from 'primeng/password';
42
+ import { PickListModule } from 'primeng/picklist';
43
+ import { ProgressBarModule } from 'primeng/progressbar';
44
+ import { RadioButtonModule } from 'primeng/radiobutton';
45
+ import { RatingModule } from 'primeng/rating';
46
+ import { RippleModule } from 'primeng/ripple';
47
+ import { SidebarModule } from 'primeng/sidebar';
48
+ import { SkeletonModule } from 'primeng/skeleton';
49
+ import { SpeedDialModule } from 'primeng/speeddial';
50
+ import { SplitButtonModule } from 'primeng/splitbutton';
51
+ import { StepsModule } from 'primeng/steps'
52
+ import { StyleClassModule } from 'primeng/styleclass';
53
+ import { TableModule } from 'primeng/table';
54
+ import { TabViewModule } from 'primeng/tabview';
55
+ import { TagModule } from 'primeng/tag';
56
+ import { ToastModule } from 'primeng/toast';
57
+ import { ToolbarModule } from 'primeng/toolbar';
58
+ import { TooltipModule } from 'primeng/tooltip';
59
+ import { TreeModule } from 'primeng/tree';
60
+ import { TreeTableModule } from 'primeng/treetable';
61
+
62
+ @NgModule({
63
+ exports: [
64
+ AccordionModule,
65
+ AutoFocusModule,
66
+ BadgeModule,
67
+ BreadcrumbModule,
68
+ ButtonModule,
69
+ CalendarModule,
70
+ CardModule,
71
+ CarouselModule,
72
+ ChartModule,
73
+ CheckboxModule,
74
+ ChipModule,
75
+ ConfirmDialogModule,
76
+ ContextMenuModule,
77
+ DataViewModule,
78
+ DialogModule,
79
+ DividerModule,
80
+ DropdownModule,
81
+ DynamicDialogModule,
82
+ EditorModule,
83
+ FieldsetModule,
84
+ FileUploadModule,
85
+ ImageModule,
86
+ InputMaskModule,
87
+ InputNumberModule,
88
+ InputSwitchModule,
89
+ InputTextareaModule,
90
+ InputTextModule,
91
+ KnobModule,
92
+ MenuModule,
93
+ MessageModule,
94
+ MessagesModule,
95
+ MultiSelectModule,
96
+ OverlayModule,
97
+ OverlayPanelModule,
98
+ OverlayPanelModule,
99
+ PanelMenuModule,
100
+ PanelModule,
101
+ PasswordModule,
102
+ PickListModule,
103
+ ProgressBarModule,
104
+ RadioButtonModule,
105
+ RatingModule,
106
+ RippleModule,
107
+ SidebarModule,
108
+ SkeletonModule,
109
+ SpeedDialModule,
110
+ SplitButtonModule,
111
+ StepsModule,
112
+ StyleClassModule,
113
+ TableModule,
114
+ TabViewModule,
115
+ TagModule,
116
+ ToastModule,
117
+ ToolbarModule,
118
+ TooltipModule,
119
+ TreeModule,
120
+ TreeTableModule,
121
+ ],
122
+ providers: [
123
+ ConfirmationService,
124
+ DialogService,
125
+ DynamicDialogRef,
126
+ DynamicDialogConfig,
127
+ MessageService,
128
+ ]
129
+ })
130
+ export class PrimeNgModule { }
@@ -0,0 +1,21 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({ name: 'cpfCnpj' })
4
+ export class CpfCnpjPipe implements PipeTransform {
5
+
6
+ transform(value: string) {
7
+ if (value) {
8
+
9
+ const identificacao = value.replace(/[^0-9]/g, '');
10
+
11
+ if (identificacao.length === 11) {
12
+ return identificacao.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/g, "\$1.\$2.\$3\-\$4");
13
+ } else if (identificacao.length === 14) {
14
+ return identificacao.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g, "\$1.\$2.\$3\/\$4\-\$5");
15
+ }
16
+
17
+ return value;
18
+ }
19
+ else return null;
20
+ }
21
+ }
@@ -0,0 +1,24 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({
4
+ name: 'mask'
5
+ })
6
+ export class MaskPipe implements PipeTransform {
7
+ transform(value: string, mask: string): any {
8
+ if (!value) return '';
9
+
10
+ let i = 0;
11
+ let maskedValue = '';
12
+ for (let m of mask) {
13
+ if (m !== '9' && m !== 'X') {
14
+ maskedValue += m;
15
+ continue;
16
+ }
17
+
18
+ if (i >= value.length) break;
19
+
20
+ maskedValue += value[i++];
21
+ }
22
+ return maskedValue;
23
+ }
24
+ }
@@ -0,0 +1,23 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
+
4
+ import { CpfCnpjPipe } from './cpfcnpj.pipe';
5
+ import { MaskPipe } from './mask.pipe';
6
+ import { TelefonePipe } from './telefone.pipe';
7
+
8
+ @NgModule({
9
+ imports: [
10
+ CommonModule
11
+ ],
12
+ declarations: [
13
+ CpfCnpjPipe,
14
+ MaskPipe,
15
+ TelefonePipe,
16
+ ],
17
+ exports: [
18
+ CpfCnpjPipe,
19
+ MaskPipe,
20
+ TelefonePipe,
21
+ ]
22
+ })
23
+ export class PipesModule { }
@@ -0,0 +1,38 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({
4
+ name: 'Telefone'
5
+ })
6
+ export class TelefonePipe implements PipeTransform {
7
+
8
+ transform(tel: string) {
9
+ if (tel) {
10
+ const value = tel.toString().replace(/\D/g, '');
11
+
12
+ let foneFormatado = '';
13
+
14
+ if (value.length > 12) {
15
+ foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{5})?(\d{4})/, '+$1 ($2) $3-$4');
16
+
17
+ } else if (value.length > 11) {
18
+ foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{4})?(\d{4})/, '+$1 ($2) $3-$4');
19
+
20
+ } else if (value.length > 10) {
21
+ foneFormatado = value.replace(/(\d{2})?(\d{5})?(\d{4})/, '($1) $2-$3');
22
+
23
+ } else if (value.length > 9) {
24
+ foneFormatado = value.replace(/(\d{2})?(\d{4})?(\d{4})/, '($1) $2-$3');
25
+
26
+ } else if (value.length > 5) {
27
+ foneFormatado = value.replace(/^(\d{2})?(\d{4})?(\d{0,4})/, '($1) $2-$3');
28
+
29
+ } else if (value.length > 1) {
30
+ foneFormatado = value.replace(/^(\d{2})?(\d{0,5})/, '($1) $2');
31
+ } else {
32
+ if (tel !== '') { foneFormatado = value.replace(/^(\d*)/, '($1'); }
33
+ }
34
+ return foneFormatado;
35
+ }
36
+ else return null;
37
+ }
38
+ }
@@ -0,0 +1,115 @@
1
+ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
2
+ import { Injectable } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+
5
+ const httpOptions = {
6
+ headers: new HttpHeaders({
7
+ 'Content-Type': 'application/json',
8
+ Accept: 'application/json',
9
+ 'Access-Control-Allow-Headers': 'Content-Type',
10
+ }),
11
+ };
12
+
13
+ @Injectable({
14
+ providedIn: 'root',
15
+ })
16
+ export class BaseApiService {
17
+ constructor(private http: HttpClient) { }
18
+
19
+ delete(
20
+ baseUrl: string,
21
+ rota: string) {
22
+ return this.http.delete(`${baseUrl}${rota}`);
23
+ }
24
+
25
+ deleteAllBody<T>(
26
+ baseUrl: string,
27
+ rota: string,
28
+ body: T): Observable<T[]> {
29
+ return this.http.delete(`${baseUrl}${rota}`, {
30
+ headers: new HttpHeaders({
31
+ 'Content-Type': 'application/json',
32
+ }),
33
+ body: body
34
+ }) as Observable<T[]>;
35
+ }
36
+
37
+ deleteAllHeaders<T>(
38
+ baseUrl: string,
39
+ rota: string,
40
+ headers: HttpHeaders): Observable<T> {
41
+ return this.http.delete(`${baseUrl}${rota}`, {
42
+ headers: headers,
43
+ }) as Observable<T>;
44
+ }
45
+
46
+ get<T>(
47
+ baseUrl: string,
48
+ rota: string): Observable<T> {
49
+ return this.http.get(`${baseUrl}${rota}`) as Observable<T>;
50
+ }
51
+
52
+ getHeaders<T>(
53
+ baseUrl: string,
54
+ rota: string,
55
+ headers: HttpHeaders): Observable<T> {
56
+ return this.http.get(`${baseUrl}${rota}`, {
57
+ headers: headers,
58
+ }) as Observable<T>;
59
+ }
60
+
61
+ getAll<T>(
62
+ baseUrl: string,
63
+ rota: string): Observable<T[]> {
64
+ return this.http.get(`${baseUrl}${rota}`) as Observable<T[]>;
65
+ }
66
+
67
+ getAllHeaders<T>(
68
+ baseUrl: string,
69
+ rota: string,
70
+ headers: HttpHeaders): Observable<T[]> {
71
+ return this.http.get(`${baseUrl}${rota}`, {
72
+ headers: headers,
73
+ }) as Observable<T[]>;
74
+ }
75
+
76
+ getAllParams<T>(
77
+ baseUrl: string,
78
+ rota: string,
79
+ params?: HttpParams): Observable<T[]> {
80
+ return this.http.get(`${baseUrl}${rota}`, {
81
+ params: params,
82
+ }) as Observable<T[]>;
83
+ }
84
+
85
+ getArquivo(
86
+ baseUrl: string,
87
+ rota: string,
88
+ id?: string,
89
+ paramCabecalho?: { headers: HttpHeaders }
90
+ ): Observable<any> {
91
+ return this.http.get<any>(`${baseUrl}${rota}/${id}`, paramCabecalho);
92
+ }
93
+
94
+ getArquivos(
95
+ baseUrl: string,
96
+ rota: string,
97
+ paramCabecalho?: { headers: HttpHeaders }
98
+ ): Observable<any> {
99
+ return this.http.get<any>(`${baseUrl}${rota}`, paramCabecalho) as Observable<any>;
100
+ }
101
+
102
+ post<T>(
103
+ baseUrl: string,
104
+ rota: string,
105
+ data?: T): Observable<T> {
106
+ return this.http.post(`${baseUrl}${rota}`, data) as Observable<T>;
107
+ }
108
+
109
+ put<T>(
110
+ baseUrl: string,
111
+ rota: string,
112
+ data: T): Observable<T> {
113
+ return this.http.put(`${baseUrl}${rota}`, data) as Observable<T>;
114
+ }
115
+ }
@@ -0,0 +1,58 @@
1
+ import { Injectable } from '@angular/core';
2
+
3
+ import {
4
+ ActivatedRoute,
5
+ NavigationEnd,
6
+ Router
7
+ } from '@angular/router';
8
+
9
+ import { filter } from 'rxjs/operators';
10
+ import { BehaviorSubject } from 'rxjs';
11
+
12
+ @Injectable({
13
+ providedIn: 'root',
14
+ })
15
+ export class BreadcrumbsService {
16
+ private breadcrumbsSubject = new BehaviorSubject<{ label: string; routerLink: string }[]>([]);
17
+ breadcrumbs$ = this.breadcrumbsSubject.asObservable();
18
+
19
+ constructor(private router: Router, private activatedRoute: ActivatedRoute) {
20
+ this.router.events
21
+ .pipe(filter((event) => event instanceof NavigationEnd))
22
+ .subscribe(() => {
23
+ const breadcrumbs = this.parseRoute(this.router.routerState.root);
24
+ this.breadcrumbsSubject.next(breadcrumbs);
25
+ });
26
+ }
27
+
28
+ private parseRoute(route: ActivatedRoute, url: string = '', breadcrumbs: { label: string; routerLink: string }[] = []): { label: string; routerLink: string }[] {
29
+ const path = route.routeConfig && route.routeConfig.path ? route.routeConfig.path : '';
30
+ const label = route.routeConfig && route.routeConfig.data ? route.routeConfig.data['breadcrumb'] : '';
31
+
32
+ if (path && label) {
33
+ if (url === '') {
34
+ breadcrumbs.push({
35
+ label: label,
36
+ routerLink: `/${path}`,
37
+ });
38
+ } else {
39
+ breadcrumbs.push({
40
+ label: label,
41
+ routerLink: `${url}/${path}`,
42
+ });
43
+ }
44
+ }
45
+
46
+ const nextRoute = route.firstChild;
47
+ if (nextRoute) {
48
+ if (url === '') {
49
+ return this.parseRoute(nextRoute, path, breadcrumbs);
50
+ } else {
51
+ return this.parseRoute(nextRoute, `${url}/${path}`, breadcrumbs);
52
+ }
53
+ }
54
+
55
+ return breadcrumbs;
56
+ }
57
+
58
+ }
@@ -0,0 +1,32 @@
1
+ import {
2
+ ChangeDetectorRef,
3
+ Injectable,
4
+ Injector
5
+ } from '@angular/core';
6
+
7
+ import {
8
+ FormControl,
9
+ FormControlName,
10
+ FormGroupDirective,
11
+ NgControl
12
+ } from '@angular/forms';
13
+
14
+ @Injectable()
15
+ export class ComponentService {
16
+
17
+ constructor(public readonly injector: Injector, public changeDetectorRef: ChangeDetectorRef) { }
18
+
19
+ getFormControl(): FormControl<any> | undefined {
20
+ try {
21
+ const control = this.injector.get(NgControl);
22
+ if (control.constructor === FormControlName) {
23
+ return this.injector.get(FormGroupDirective).getControl(control as FormControlName);
24
+ }
25
+
26
+ return undefined;
27
+ }
28
+ catch (ex) {
29
+ return undefined;
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,129 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+
4
+ @Injectable({
5
+ providedIn: 'root'
6
+ })
7
+ export class DocsService {
8
+
9
+ public static validaCpfCnpj(cpfcnpj: string): boolean {
10
+ cpfcnpj = cpfcnpj.replace(/\D/g, '');
11
+
12
+ if (cpfcnpj.length === 11) {
13
+ return DocsService.validaCpf(cpfcnpj);
14
+ } else if (cpfcnpj.length === 14) {
15
+ return DocsService.validaCnpj(cpfcnpj);
16
+ } else {
17
+ return false;
18
+ }
19
+ }
20
+
21
+ public static validaCpf(cpf: string) {
22
+ cpf = cpf.replace(/\D+/g, '');
23
+ if (
24
+ !cpf ||
25
+ cpf.length !== 11 ||
26
+ cpf === '0'.repeat(11) ||
27
+ cpf === '1'.repeat(11) ||
28
+ cpf === '2'.repeat(11) ||
29
+ cpf === '3'.repeat(11) ||
30
+ cpf === '4'.repeat(11) ||
31
+ cpf === '5'.repeat(11) ||
32
+ cpf === '6'.repeat(11) ||
33
+ cpf === '7'.repeat(11) ||
34
+ cpf === '8'.repeat(11) ||
35
+ cpf === '9'.repeat(11)
36
+ ) {
37
+ return false;
38
+ }
39
+ let soma = 0;
40
+ let resto;
41
+ for (let i = 1; i <= 9; i++) {
42
+ soma = soma + parseInt(cpf.substring(i - 1, i)) * (11 - i);
43
+ }
44
+ resto = (soma * 10) % 11;
45
+ if (resto === 10 || resto === 11) {
46
+ resto = 0;
47
+ }
48
+ if (resto !== parseInt(cpf.substring(9, 10))) {
49
+ return false;
50
+ }
51
+ soma = 0;
52
+ for (let i = 1; i <= 10; i++) {
53
+ soma = soma + parseInt(cpf.substring(i - 1, i)) * (12 - i);
54
+ }
55
+ resto = (soma * 10) % 11;
56
+ if (resto === 10 || resto === 11) {
57
+ resto = 0;
58
+ }
59
+ if (resto !== parseInt(cpf.substring(10, 11))) {
60
+ return false;
61
+ }
62
+ return true;
63
+ }
64
+
65
+ public static validaCnpj(cnpj: string) {
66
+ cnpj = cnpj.replace(/\D+/g, '');
67
+ if (
68
+ !cnpj ||
69
+ cnpj.length !== 14 ||
70
+ cnpj === '0'.repeat(14) ||
71
+ cnpj === '1'.repeat(14) ||
72
+ cnpj === '2'.repeat(14) ||
73
+ cnpj === '3'.repeat(14) ||
74
+ cnpj === '4'.repeat(14) ||
75
+ cnpj === '5'.repeat(14) ||
76
+ cnpj === '6'.repeat(14) ||
77
+ cnpj === '7'.repeat(14) ||
78
+ cnpj === '8'.repeat(14) ||
79
+ cnpj === '9'.repeat(14)
80
+ ) {
81
+ return false;
82
+ }
83
+ let tamanho = cnpj.length - 2;
84
+ let numeros: any = cnpj.substring(0, tamanho);
85
+ const digitos = cnpj.substring(tamanho);
86
+ let soma = 0;
87
+ let pos: number = tamanho - 7;
88
+ for (let i = tamanho; i >= 1; i--) {
89
+ soma += numeros.charAt(tamanho - i) * pos--;
90
+ if (pos < 2) {
91
+ pos = 9;
92
+ }
93
+ }
94
+ let resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);
95
+ if (resultado !== (+digitos.charAt(0))) {
96
+ return false;
97
+ }
98
+ tamanho = tamanho + 1;
99
+ numeros = cnpj.substring(0, tamanho);
100
+ soma = 0;
101
+ pos = tamanho - 7;
102
+ for (let i = tamanho; i >= 1; i--) {
103
+ soma += numeros.charAt(tamanho - i) * pos--;
104
+ if (pos < 2) {
105
+ pos = 9;
106
+ }
107
+ }
108
+ resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);
109
+ if (resultado !== (+digitos.charAt(1))) {
110
+ return false;
111
+ }
112
+ return true;
113
+ }
114
+
115
+ public static validatorCpfCnpj(fc: FormControl) {
116
+
117
+ if (!fc.value) return false;
118
+
119
+ if (fc.value.replace(/\D+/g, '') === '00000000000' || fc.value.replace(/\D+/g, '') === '000000000000000') {
120
+ return false;
121
+ } else if (fc.value.replace(/\D+/g, '').length === 11) {
122
+ return DocsService.validaCpf(fc.value) ? false : { cpfCnpj: true };
123
+ } else if (fc.value.replace(/\D+/g, '').length === 14) {
124
+ return DocsService.validaCnpj(fc.value) ? false : { cpfCnpj: true };
125
+ } else {
126
+ return { cpfCnpj: true };
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,115 @@
1
+ import {
2
+ Injectable,
3
+ Type
4
+ } from '@angular/core';
5
+
6
+ import {
7
+ FormGroup,
8
+ ValidatorFn
9
+ } from '@angular/forms';
10
+
11
+ import { ObjectService } from './object.service';
12
+ import { DialogService } from 'primeng/dynamicdialog';
13
+
14
+ export interface paramsDialog {
15
+ id?: any;
16
+ closable?: boolean;
17
+ maximizable?: boolean;
18
+ popup?: boolean;
19
+ height?: string;
20
+ width?: string;
21
+ styleClass?: string;
22
+ header?: string;
23
+ }
24
+
25
+ @Injectable({
26
+ providedIn: 'root'
27
+ })
28
+ export class FormService {
29
+
30
+ static disableControl(formGroup: FormGroup, controName: string) {
31
+ formGroup?.controls[controName]?.disable();
32
+ }
33
+
34
+ static disableAndClearControl(formGroup: FormGroup, controName: string, value?: any) {
35
+ this.disableControl(formGroup, controName);
36
+ this.setControlValue(formGroup, controName, null || value);
37
+ }
38
+
39
+ static enableControl(formGroup: FormGroup, controName: string) {
40
+ formGroup?.controls[controName]?.enable();
41
+ }
42
+
43
+ static getFormValue<T>(formGroup: FormGroup, controName: string): T {
44
+ return <T>formGroup?.controls[controName]?.value;
45
+ }
46
+
47
+ static hasControlError(formGroup: FormGroup, control: string, errorCode?: string): boolean {
48
+ const formControl = formGroup.get(control);
49
+ let hasError: boolean = false;
50
+
51
+ if (!formControl) return false;
52
+ if (errorCode) hasError = formControl.hasError(errorCode);
53
+ else hasError = formControl.errors ? true : false;
54
+
55
+ return hasError && formControl.touched;
56
+ }
57
+
58
+ static invalidForm(formGroup: FormGroup, notification?: any) {
59
+ const keys = Object.keys(formGroup.getRawValue());
60
+
61
+ keys.forEach(k => {
62
+ const control = formGroup.controls[k];
63
+
64
+ if (notification) {
65
+ if (notification?.item2) {
66
+ const item = ObjectService.findObject(notification.item2, 'property', k);
67
+ if (item) control.setErrors({ backendError: true, erroMessage: item.message });
68
+ }
69
+ else {
70
+ const item = ObjectService.findObject(notification, 'key', k);
71
+ if (item) control.setErrors({ backendError: true, erroMessage: item.message });
72
+ }
73
+ }
74
+
75
+ if (!control.valid) {
76
+ control.markAsTouched();
77
+ }
78
+ });
79
+ }
80
+
81
+ static openDialog(
82
+ dialogService: DialogService,
83
+ componentType: Type<any>,
84
+ callBackFunction: Function,
85
+ paramsDialog?: paramsDialog
86
+ ) {
87
+ const ref = dialogService.open(componentType, {
88
+ closable: paramsDialog?.closable || false,
89
+ maximizable: paramsDialog?.maximizable || false,
90
+ height: paramsDialog?.height || 'auto',
91
+ width: paramsDialog?.width,
92
+ styleClass: paramsDialog?.styleClass,
93
+ showHeader: true,
94
+ header: paramsDialog?.header,
95
+ data: { id: paramsDialog?.id, popup: paramsDialog?.popup && true }
96
+ });
97
+
98
+ ref.onClose.subscribe((data: any) => {
99
+ if (data) callBackFunction(data);
100
+ });
101
+ }
102
+
103
+ static setControlValue(formGroup: FormGroup, controName: string, value: any) {
104
+ formGroup?.controls[controName]?.setValue(value);
105
+ }
106
+
107
+ static setValidators(formGroup: FormGroup, controName: string, validators: ValidatorFn | ValidatorFn[] | null) {
108
+ formGroup?.controls[controName]?.setValidators(validators);
109
+ formGroup?.controls[controName]?.updateValueAndValidity();
110
+ }
111
+
112
+ static clearValidators(formGroup: FormGroup, controName: string) {
113
+ formGroup?.controls[controName]?.updateValueAndValidity();
114
+ }
115
+ }