keevo-components 1.5.191 → 1.5.193

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 (351) hide show
  1. package/README.md +24 -24
  2. package/esm2020/keevo-components.mjs +5 -0
  3. package/esm2020/lib/api/base-components/base-component-button.mjs +36 -0
  4. package/esm2020/lib/api/base-components/base-component-chart.mjs +92 -0
  5. package/esm2020/lib/api/base-components/base-component-crud-form.mjs +270 -0
  6. package/esm2020/lib/api/base-components/base-component-crud-list.mjs +68 -0
  7. package/esm2020/lib/api/base-components/base-component-crud.mjs +65 -0
  8. package/esm2020/lib/api/base-components/base-component-dropdown-new.mjs +211 -0
  9. package/esm2020/lib/api/base-components/base-component-dropdown.mjs +161 -0
  10. package/esm2020/lib/api/base-components/base-component-input.mjs +94 -0
  11. package/esm2020/lib/api/base-components/base-component-multi-select.mjs +128 -0
  12. package/esm2020/lib/api/base-components/base-component.mjs +49 -0
  13. package/esm2020/lib/api/components/chart/chart.config.mjs +2 -0
  14. package/esm2020/lib/api/components/chart/chart.model.mjs +2 -0
  15. package/esm2020/lib/api/components/chart/orchart.config.mjs +2 -0
  16. package/esm2020/lib/api/components/chart/orchart.item.mjs +2 -0
  17. package/esm2020/lib/api/components/dropdown/filtro.combo.mjs +2 -0
  18. package/esm2020/lib/api/components/error/error.component.mjs +26 -0
  19. package/esm2020/lib/api/components/error/kverror.module.mjs +35 -0
  20. package/esm2020/lib/api/components/table/action-item.mjs +2 -0
  21. package/esm2020/lib/api/components/table/kv-menuitem.mjs +3 -0
  22. package/esm2020/lib/api/components/table/table.config.column.mjs +2 -0
  23. package/esm2020/lib/api/components/table/table.config.mjs +2 -0
  24. package/esm2020/lib/api/components/table/table.paginate.mjs +9 -0
  25. package/esm2020/lib/api/helpers/component-providers.mjs +16 -0
  26. package/esm2020/lib/api/helpers/keevo-validators.mjs +64 -0
  27. package/esm2020/lib/api/helpers/translate-primeng.mjs +23 -0
  28. package/esm2020/lib/api/models/menu/menu.model.mjs +2 -0
  29. package/esm2020/lib/api/models/menu/menucompleto.model.mjs +2 -0
  30. package/esm2020/lib/api/models/menu/sistemamenu.model.mjs +2 -0
  31. package/esm2020/lib/api/modules/primeng.module.mjs +247 -0
  32. package/esm2020/lib/api/services/base.api.service.mjs +74 -0
  33. package/esm2020/lib/api/services/component.service.mjs +27 -0
  34. package/esm2020/lib/api/services/form.service.mjs +84 -0
  35. package/esm2020/lib/api/services/imagens.service.mjs +22 -0
  36. package/esm2020/lib/api/services/notification.service.mjs +67 -0
  37. package/esm2020/lib/api/services/object.service.mjs +26 -0
  38. package/esm2020/lib/buttons/button-personalize/button-personalize.component.mjs +17 -0
  39. package/esm2020/lib/buttons/button-popup/button-popup.component.mjs +31 -0
  40. package/esm2020/lib/buttons/button-secondary/button-secondary.component.mjs +17 -0
  41. package/esm2020/lib/buttons/button-success/button-success.component.mjs +17 -0
  42. package/esm2020/lib/buttons/kvbutton.module.mjs +39 -0
  43. package/esm2020/lib/chart/chart.component.mjs +145 -0
  44. package/esm2020/lib/chart/kvchart.module.mjs +32 -0
  45. package/esm2020/lib/directives/template.directive.mjs +24 -0
  46. package/esm2020/lib/inputs/check/check.component.mjs +26 -0
  47. package/esm2020/lib/inputs/dropdown/dropdown.component.mjs +37 -0
  48. package/esm2020/lib/inputs/editor/editor.component.mjs +70 -0
  49. package/esm2020/lib/inputs/input-calendar/input-calendar.component.mjs +89 -0
  50. package/esm2020/lib/inputs/input-mask/input-mask.component.mjs +23 -0
  51. package/esm2020/lib/inputs/input-number/input-number.component.mjs +59 -0
  52. package/esm2020/lib/inputs/input-password/input-password.component.mjs +33 -0
  53. package/esm2020/lib/inputs/input-text/input-text.component.mjs +21 -0
  54. package/esm2020/lib/inputs/input-text-checkbox/input-text-checkbox.component.mjs +38 -0
  55. package/esm2020/lib/inputs/input-textarea/input-textarea.component.mjs +43 -0
  56. package/esm2020/lib/inputs/input-time/input-time.component.mjs +24 -0
  57. package/esm2020/lib/inputs/kvinputs.module.mjs +108 -0
  58. package/esm2020/lib/inputs/multi-select/multi-select.component.mjs +38 -0
  59. package/esm2020/lib/inputs/radio-group/radio-group.component.mjs +53 -0
  60. package/esm2020/lib/inputs/switch/switch.component.mjs +32 -0
  61. package/esm2020/lib/keevo-components.module.mjs +105 -0
  62. package/esm2020/lib/label/label.component.mjs +15 -0
  63. package/esm2020/lib/label/label.module.mjs +24 -0
  64. package/esm2020/lib/loader/kvloader.module.mjs +28 -0
  65. package/esm2020/lib/loader/loader.component.mjs +17 -0
  66. package/esm2020/lib/loader/loader.service.mjs +29 -0
  67. package/esm2020/lib/login/kvlogin.module.mjs +47 -0
  68. package/esm2020/lib/login/login.component.mjs +52 -0
  69. package/esm2020/lib/menu/kvmenu.module.mjs +43 -0
  70. package/esm2020/lib/menu/menu.component.mjs +237 -0
  71. package/esm2020/lib/orgchart/orgchart.component.mjs +100 -0
  72. package/esm2020/lib/orgchart/orgchart.module.mjs +24 -0
  73. package/esm2020/lib/page-form/kv-page-form.module.mjs +38 -0
  74. package/esm2020/lib/page-form/page-form.component.mjs +144 -0
  75. package/esm2020/lib/picklist/kvpicklist.module.mjs +32 -0
  76. package/esm2020/lib/picklist/picklist.component.mjs +48 -0
  77. package/esm2020/lib/pipes/codigofile.pipe.mjs +19 -0
  78. package/esm2020/lib/pipes/cpfcnpj.pipe.mjs +25 -0
  79. package/esm2020/lib/pipes/pipes.module.mjs +34 -0
  80. package/esm2020/lib/pipes/telefone.pipe.mjs +45 -0
  81. package/esm2020/lib/table/kvtable.module.mjs +32 -0
  82. package/esm2020/lib/table/table.component.mjs +500 -0
  83. package/esm2020/lib/tree-table/kv-treetable.component.mjs +371 -0
  84. package/esm2020/lib/tree-table/kv-treetable.module.mjs +32 -0
  85. package/esm2020/lib/tree-view/kvtree-view.module.mjs +28 -0
  86. package/esm2020/lib/tree-view/tree-view.component.mjs +29 -0
  87. package/esm2020/lib/workspace/kvworkspace.module.mjs +47 -0
  88. package/esm2020/lib/workspace/workspace.component.mjs +77 -0
  89. package/esm2020/public-api.mjs +138 -0
  90. package/fesm2015/keevo-components.mjs +4706 -0
  91. package/fesm2015/keevo-components.mjs.map +1 -0
  92. package/fesm2020/keevo-components.mjs +4697 -0
  93. package/fesm2020/keevo-components.mjs.map +1 -0
  94. package/index.d.ts +5 -0
  95. package/lib/api/base-components/base-component-button.d.ts +14 -0
  96. package/lib/api/base-components/base-component-chart.d.ts +40 -0
  97. package/lib/api/base-components/base-component-crud-form.d.ts +137 -0
  98. package/lib/api/base-components/base-component-crud-list.d.ts +63 -0
  99. package/lib/api/base-components/base-component-crud.d.ts +36 -0
  100. package/lib/api/base-components/base-component-dropdown-new.d.ts +14 -0
  101. package/lib/api/base-components/base-component-dropdown.d.ts +42 -0
  102. package/lib/api/base-components/base-component-input.d.ts +31 -0
  103. package/lib/api/base-components/base-component-multi-select.d.ts +35 -0
  104. package/lib/api/base-components/base-component.d.ts +21 -0
  105. package/lib/api/components/chart/chart.config.d.ts +11 -0
  106. package/lib/api/components/chart/chart.model.d.ts +9 -0
  107. package/lib/api/components/chart/orchart.config.d.ts +35 -0
  108. package/lib/api/components/chart/orchart.item.d.ts +26 -0
  109. package/lib/api/components/dropdown/filtro.combo.d.ts +4 -0
  110. package/lib/api/components/error/error.component.d.ts +12 -0
  111. package/lib/api/components/error/kverror.module.d.ts +10 -0
  112. package/lib/api/components/table/action-item.d.ts +5 -0
  113. package/lib/api/components/table/kv-menuitem.d.ts +9 -0
  114. package/lib/api/components/table/table.config.column.d.ts +21 -0
  115. package/lib/api/components/table/table.config.d.ts +17 -0
  116. package/lib/api/components/table/table.paginate.d.ts +6 -0
  117. package/lib/api/helpers/component-providers.d.ts +2 -0
  118. package/lib/api/helpers/keevo-validators.d.ts +10 -0
  119. package/lib/api/helpers/translate-primeng.d.ts +4 -0
  120. package/lib/api/models/menu/menu.model.d.ts +10 -0
  121. package/{src/lib/api/models/menu/menucompleto.model.ts → lib/api/models/menu/menucompleto.model.d.ts} +6 -7
  122. package/lib/api/models/menu/sistemamenu.model.d.ts +8 -0
  123. package/lib/api/modules/primeng.module.d.ts +60 -0
  124. package/lib/api/services/base.api.service.d.ts +25 -0
  125. package/lib/api/services/component.service.d.ts +11 -0
  126. package/lib/api/services/form.service.d.ts +27 -0
  127. package/lib/api/services/imagens.service.d.ts +8 -0
  128. package/lib/api/services/notification.service.d.ts +25 -0
  129. package/lib/api/services/object.service.d.ts +8 -0
  130. package/lib/buttons/button-personalize/button-personalize.component.d.ts +7 -0
  131. package/lib/buttons/button-popup/button-popup.component.d.ts +13 -0
  132. package/lib/buttons/button-secondary/button-secondary.component.d.ts +7 -0
  133. package/lib/buttons/button-success/button-success.component.d.ts +7 -0
  134. package/lib/buttons/kvbutton.module.d.ts +11 -0
  135. package/lib/chart/chart.component.d.ts +56 -0
  136. package/lib/chart/kvchart.module.d.ts +10 -0
  137. package/lib/directives/template.directive.d.ts +11 -0
  138. package/lib/inputs/check/check.component.d.ts +11 -0
  139. package/lib/inputs/dropdown/dropdown.component.d.ts +14 -0
  140. package/lib/inputs/editor/editor.component.d.ts +39 -0
  141. package/lib/inputs/input-calendar/input-calendar.component.d.ts +27 -0
  142. package/lib/inputs/input-mask/input-mask.component.d.ts +10 -0
  143. package/lib/inputs/input-number/input-number.component.d.ts +19 -0
  144. package/lib/inputs/input-password/input-password.component.d.ts +13 -0
  145. package/lib/inputs/input-text/input-text.component.d.ts +9 -0
  146. package/lib/inputs/input-text-checkbox/input-text-checkbox.component.d.ts +15 -0
  147. package/lib/inputs/input-textarea/input-textarea.component.d.ts +16 -0
  148. package/lib/inputs/input-time/input-time.component.d.ts +10 -0
  149. package/lib/inputs/kvinputs.module.d.ts +25 -0
  150. package/lib/inputs/multi-select/multi-select.component.d.ts +12 -0
  151. package/lib/inputs/radio-group/radio-group.component.d.ts +18 -0
  152. package/lib/inputs/switch/switch.component.d.ts +13 -0
  153. package/lib/keevo-components.module.d.ts +19 -0
  154. package/lib/label/label.component.d.ts +7 -0
  155. package/lib/label/label.module.d.ts +8 -0
  156. package/lib/loader/kvloader.module.d.ts +9 -0
  157. package/lib/loader/loader.component.d.ts +8 -0
  158. package/lib/loader/loader.service.d.ts +10 -0
  159. package/lib/login/kvlogin.module.d.ts +13 -0
  160. package/lib/login/login.component.d.ts +30 -0
  161. package/lib/menu/kvmenu.module.d.ts +12 -0
  162. package/lib/menu/menu.component.d.ts +74 -0
  163. package/lib/orgchart/orgchart.component.d.ts +27 -0
  164. package/lib/orgchart/orgchart.module.d.ts +9 -0
  165. package/lib/page-form/kv-page-form.module.d.ts +11 -0
  166. package/lib/page-form/page-form.component.d.ts +69 -0
  167. package/lib/picklist/kvpicklist.module.d.ts +10 -0
  168. package/lib/picklist/picklist.component.d.ts +20 -0
  169. package/lib/pipes/codigofile.pipe.d.ts +7 -0
  170. package/lib/pipes/cpfcnpj.pipe.d.ts +7 -0
  171. package/lib/pipes/pipes.module.d.ts +10 -0
  172. package/lib/pipes/telefone.pipe.d.ts +7 -0
  173. package/lib/table/kvtable.module.d.ts +10 -0
  174. package/lib/table/table.component.d.ts +105 -0
  175. package/lib/tree-table/kv-treetable.component.d.ts +84 -0
  176. package/lib/tree-table/kv-treetable.module.d.ts +11 -0
  177. package/lib/tree-view/kvtree-view.module.d.ts +9 -0
  178. package/lib/tree-view/tree-view.component.d.ts +14 -0
  179. package/lib/workspace/kvworkspace.module.d.ts +13 -0
  180. package/lib/workspace/workspace.component.d.ts +28 -0
  181. package/package.json +22 -3
  182. package/{src/public-api.ts → public-api.d.ts} +134 -156
  183. package/ng-package.json +0 -7
  184. package/src/assets/.gitkeep +0 -0
  185. package/src/assets/images/LogoEvo.png +0 -0
  186. package/src/assets/images/LogoPequenaEvo.png +0 -0
  187. package/src/assets/images/background.png +0 -0
  188. package/src/assets/images/keepass-logo.png +0 -0
  189. package/src/assets/images/keepass-logo.svg +0 -74
  190. package/src/assets/images/keevo-logo.png +0 -0
  191. package/src/assets/images/logokeevo_2.png +0 -0
  192. package/src/index.ts +0 -1
  193. package/src/lib/api/base-components/base-component-button.ts +0 -27
  194. package/src/lib/api/base-components/base-component-chart.ts +0 -105
  195. package/src/lib/api/base-components/base-component-crud-form.ts +0 -328
  196. package/src/lib/api/base-components/base-component-crud-list.ts +0 -111
  197. package/src/lib/api/base-components/base-component-crud.ts +0 -70
  198. package/src/lib/api/base-components/base-component-dropdown-new.ts +0 -112
  199. package/src/lib/api/base-components/base-component-dropdown.ts +0 -164
  200. package/src/lib/api/base-components/base-component-input.ts +0 -107
  201. package/src/lib/api/base-components/base-component-multi-select.ts +0 -136
  202. package/src/lib/api/base-components/base-component.ts +0 -46
  203. package/src/lib/api/components/chart/chart.config.ts +0 -12
  204. package/src/lib/api/components/chart/chart.model.ts +0 -9
  205. package/src/lib/api/components/chart/orchart.config.ts +0 -41
  206. package/src/lib/api/components/chart/orchart.item.ts +0 -33
  207. package/src/lib/api/components/dropdown/filtro.combo.ts +0 -4
  208. package/src/lib/api/components/error/error.component.html +0 -3
  209. package/src/lib/api/components/error/error.component.scss +0 -5
  210. package/src/lib/api/components/error/error.component.ts +0 -22
  211. package/src/lib/api/components/error/kverror.module.ts +0 -23
  212. package/src/lib/api/components/table/action-item.ts +0 -5
  213. package/src/lib/api/components/table/kv-menuitem.ts +0 -10
  214. package/src/lib/api/components/table/table.config.column.ts +0 -21
  215. package/src/lib/api/components/table/table.config.ts +0 -20
  216. package/src/lib/api/components/table/table.paginate.ts +0 -6
  217. package/src/lib/api/helpers/component-providers.ts +0 -16
  218. package/src/lib/api/helpers/keevo-validators.ts +0 -77
  219. package/src/lib/api/helpers/translate-primeng.ts +0 -25
  220. package/src/lib/api/models/menu/menu.model.ts +0 -10
  221. package/src/lib/api/models/menu/sistemamenu.model.ts +0 -8
  222. package/src/lib/api/modules/primeng.module.ts +0 -125
  223. package/src/lib/api/services/base.api.service.ts +0 -115
  224. package/src/lib/api/services/component.service.ts +0 -22
  225. package/src/lib/api/services/form.service.ts +0 -105
  226. package/src/lib/api/services/imagens.service.ts +0 -20
  227. package/src/lib/api/services/notification.service.ts +0 -82
  228. package/src/lib/api/services/object.service.ts +0 -20
  229. package/src/lib/buttons/button-personalize/button-personalize.component.html +0 -11
  230. package/src/lib/buttons/button-personalize/button-personalize.component.scss +0 -3
  231. package/src/lib/buttons/button-personalize/button-personalize.component.ts +0 -13
  232. package/src/lib/buttons/button-popup/button-popup.component.html +0 -12
  233. package/src/lib/buttons/button-popup/button-popup.component.scss +0 -13
  234. package/src/lib/buttons/button-popup/button-popup.component.ts +0 -30
  235. package/src/lib/buttons/button-secondary/button-secondary.component.html +0 -12
  236. package/src/lib/buttons/button-secondary/button-secondary.component.scss +0 -14
  237. package/src/lib/buttons/button-secondary/button-secondary.component.ts +0 -13
  238. package/src/lib/buttons/button-success/button-success.component.html +0 -11
  239. package/src/lib/buttons/button-success/button-success.component.scss +0 -13
  240. package/src/lib/buttons/button-success/button-success.component.ts +0 -13
  241. package/src/lib/buttons/kvbutton.module.ts +0 -25
  242. package/src/lib/chart/chart.component.html +0 -38
  243. package/src/lib/chart/chart.component.scss +0 -0
  244. package/src/lib/chart/chart.component.spec.ts +0 -28
  245. package/src/lib/chart/chart.component.ts +0 -141
  246. package/src/lib/chart/kvchart.module.ts +0 -20
  247. package/src/lib/directives/template.directive.ts +0 -15
  248. package/src/lib/inputs/check/check.component.html +0 -11
  249. package/src/lib/inputs/check/check.component.scss +0 -13
  250. package/src/lib/inputs/check/check.component.ts +0 -24
  251. package/src/lib/inputs/dropdown/dropdown.component.html +0 -91
  252. package/src/lib/inputs/dropdown/dropdown.component.scss +0 -0
  253. package/src/lib/inputs/dropdown/dropdown.component.ts +0 -28
  254. package/src/lib/inputs/editor/editor.component.html +0 -90
  255. package/src/lib/inputs/editor/editor.component.scss +0 -4
  256. package/src/lib/inputs/editor/editor.component.ts +0 -80
  257. package/src/lib/inputs/input-calendar/input-calendar.component.html +0 -30
  258. package/src/lib/inputs/input-calendar/input-calendar.component.scss +0 -0
  259. package/src/lib/inputs/input-calendar/input-calendar.component.ts +0 -81
  260. package/src/lib/inputs/input-mask/input-mask.component.html +0 -20
  261. package/src/lib/inputs/input-mask/input-mask.component.scss +0 -0
  262. package/src/lib/inputs/input-mask/input-mask.component.ts +0 -20
  263. package/src/lib/inputs/input-number/input-number.component.html +0 -22
  264. package/src/lib/inputs/input-number/input-number.component.scss +0 -0
  265. package/src/lib/inputs/input-number/input-number.component.ts +0 -52
  266. package/src/lib/inputs/input-password/input-password.component.html +0 -23
  267. package/src/lib/inputs/input-password/input-password.component.scss +0 -0
  268. package/src/lib/inputs/input-password/input-password.component.ts +0 -23
  269. package/src/lib/inputs/input-text/input-text.component.html +0 -20
  270. package/src/lib/inputs/input-text/input-text.component.scss +0 -18
  271. package/src/lib/inputs/input-text/input-text.component.ts +0 -17
  272. package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.html +0 -32
  273. package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.scss +0 -0
  274. package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.spec.ts +0 -23
  275. package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.ts +0 -36
  276. package/src/lib/inputs/input-textarea/input-textarea.component.html +0 -22
  277. package/src/lib/inputs/input-textarea/input-textarea.component.scss +0 -0
  278. package/src/lib/inputs/input-textarea/input-textarea.component.ts +0 -33
  279. package/src/lib/inputs/input-time/input-time.component.html +0 -23
  280. package/src/lib/inputs/input-time/input-time.component.scss +0 -0
  281. package/src/lib/inputs/input-time/input-time.component.ts +0 -20
  282. package/src/lib/inputs/kvinputs.module.ts +0 -64
  283. package/src/lib/inputs/multi-select/multi-select.component.html +0 -28
  284. package/src/lib/inputs/multi-select/multi-select.component.scss +0 -8
  285. package/src/lib/inputs/multi-select/multi-select.component.ts +0 -31
  286. package/src/lib/inputs/radio-group/radio-group.component.html +0 -19
  287. package/src/lib/inputs/radio-group/radio-group.component.scss +0 -15
  288. package/src/lib/inputs/radio-group/radio-group.component.ts +0 -50
  289. package/src/lib/inputs/switch/switch.component.html +0 -12
  290. package/src/lib/inputs/switch/switch.component.scss +0 -3
  291. package/src/lib/inputs/switch/switch.component.ts +0 -30
  292. package/src/lib/keevo-components.module.ts +0 -50
  293. package/src/lib/label/label.component.html +0 -6
  294. package/src/lib/label/label.component.scss +0 -9
  295. package/src/lib/label/label.component.spec.ts +0 -23
  296. package/src/lib/label/label.component.ts +0 -13
  297. package/src/lib/label/label.module.ts +0 -18
  298. package/src/lib/loader/kvloader.module.ts +0 -17
  299. package/src/lib/loader/loader.component.html +0 -1
  300. package/src/lib/loader/loader.component.ts +0 -14
  301. package/src/lib/loader/loader.service.ts +0 -26
  302. package/src/lib/login/kvlogin.module.ts +0 -28
  303. package/src/lib/login/login.component.html +0 -108
  304. package/src/lib/login/login.component.scss +0 -48
  305. package/src/lib/login/login.component.spec.ts +0 -23
  306. package/src/lib/login/login.component.ts +0 -65
  307. package/src/lib/menu/kvmenu.module.ts +0 -27
  308. package/src/lib/menu/menu.component.html +0 -342
  309. package/src/lib/menu/menu.component.scss +0 -210
  310. package/src/lib/menu/menu.component.spec.ts +0 -23
  311. package/src/lib/menu/menu.component.ts +0 -246
  312. package/src/lib/orgchart/orgchart.component.html +0 -58
  313. package/src/lib/orgchart/orgchart.component.scss +0 -21
  314. package/src/lib/orgchart/orgchart.component.ts +0 -118
  315. package/src/lib/orgchart/orgchart.module.ts +0 -14
  316. package/src/lib/page-form/kv-page-form.module.ts +0 -22
  317. package/src/lib/page-form/page-form.component.html +0 -57
  318. package/src/lib/page-form/page-form.component.scss +0 -72
  319. package/src/lib/page-form/page-form.component.spec.ts +0 -28
  320. package/src/lib/page-form/page-form.component.ts +0 -121
  321. package/src/lib/picklist/kvpicklist.module.ts +0 -20
  322. package/src/lib/picklist/picklist.component.html +0 -17
  323. package/src/lib/picklist/picklist.component.scss +0 -0
  324. package/src/lib/picklist/picklist.component.spec.ts +0 -26
  325. package/src/lib/picklist/picklist.component.ts +0 -27
  326. package/src/lib/pipes/codigofile.pipe.ts +0 -15
  327. package/src/lib/pipes/cpfcnpj.pipe.ts +0 -21
  328. package/src/lib/pipes/pipes.module.ts +0 -22
  329. package/src/lib/pipes/telefone.pipe.ts +0 -38
  330. package/src/lib/styles-components.scss +0 -11
  331. package/src/lib/table/kvtable.module.ts +0 -22
  332. package/src/lib/table/table.component.html +0 -473
  333. package/src/lib/table/table.component.scss +0 -240
  334. package/src/lib/table/table.component.spec.ts +0 -28
  335. package/src/lib/table/table.component.ts +0 -546
  336. package/src/lib/tree-table/kv-treetable.component.html +0 -649
  337. package/src/lib/tree-table/kv-treetable.component.scss +0 -315
  338. package/src/lib/tree-table/kv-treetable.component.ts +0 -390
  339. package/src/lib/tree-table/kv-treetable.module.ts +0 -18
  340. package/src/lib/tree-view/kvtree-view.module.ts +0 -19
  341. package/src/lib/tree-view/tree-view.component.html +0 -9
  342. package/src/lib/tree-view/tree-view.component.scss +0 -0
  343. package/src/lib/tree-view/tree-view.component.spec.ts +0 -23
  344. package/src/lib/tree-view/tree-view.component.ts +0 -29
  345. package/src/lib/workspace/kvworkspace.module.ts +0 -29
  346. package/src/lib/workspace/workspace.component.html +0 -108
  347. package/src/lib/workspace/workspace.component.scss +0 -83
  348. package/src/lib/workspace/workspace.component.ts +0 -75
  349. package/tsconfig.lib.json +0 -14
  350. package/tsconfig.lib.prod.json +0 -10
  351. package/tsconfig.spec.json +0 -14
@@ -1,28 +0,0 @@
1
- /* tslint:disable:no-unused-variable */
2
- import { async, ComponentFixture, TestBed } from '@angular/core/testing';
3
- import { By } from '@angular/platform-browser';
4
- import { DebugElement } from '@angular/core';
5
-
6
- import { TableComponent } from './table.component';
7
-
8
- describe('TableComponent', () => {
9
- let component: TableComponent;
10
- let fixture: ComponentFixture<TableComponent>;
11
-
12
- beforeEach(async(() => {
13
- TestBed.configureTestingModule({
14
- declarations: [ TableComponent ]
15
- })
16
- .compileComponents();
17
- }));
18
-
19
- beforeEach(() => {
20
- fixture = TestBed.createComponent(TableComponent);
21
- component = fixture.componentInstance;
22
- fixture.detectChanges();
23
- });
24
-
25
- it('should create', () => {
26
- expect(component).toBeTruthy();
27
- });
28
- });
@@ -1,546 +0,0 @@
1
- import { DatePipe, DecimalPipe } from '@angular/common';
2
- import {
3
- Component,
4
- ContentChildren,
5
- ElementRef,
6
- EventEmitter,
7
- HostListener,
8
- Input,
9
- OnInit,
10
- Output,
11
- QueryList,
12
- Renderer2,
13
- TemplateRef,
14
- ViewChild,
15
- } from '@angular/core';
16
- import { Table } from 'primeng/table';
17
- import { TableConfig } from '../api/components/table/table.config';
18
- import { TableConfigColumn } from '../api/components/table/table.config.column';
19
- import { TablePaginate } from '../api/components/table/table.paginate';
20
- import { TemplateDirective } from '../directives/template.directive';
21
- import { CodigoFipePipe } from '../pipes/codigofile.pipe';
22
- import { CpfCnpjPipe } from '../pipes/cpfcnpj.pipe';
23
- import { TelefonePipe } from '../pipes/telefone.pipe';
24
- import { KvMenuItem } from '../api/components/table/kv-menuitem';
25
- import { DomSanitizer } from '@angular/platform-browser';
26
-
27
- const imgDefault = '/9j/4AAQSkZJRgABAQIAdgB2AAD/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAMAAAITAAMAAAABAAEAAAAAAAAAAAB2AAAAAQAAAHYAAAAB/9sAQwADAgICAgIDAgICAwMDAwQGBAQEBAQIBgYFBgkICgoJCAkJCgwPDAoLDgsJCQ0RDQ4PEBAREAoMEhMSEBMPEBAQ/9sAQwEDAwMEAwQIBAQIEAsJCxAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ/8AAEQgAkACQAwERAAIRAQMRAf/EAB0AAQABBAMBAAAAAAAAAAAAAAAGAQIHCAMECQX/xABBEAACAQQABQICCAQDBAsAAAABAgMABAURBgcSITETQQhRCRQVGSJVldEyYYGRQlJiFiM3OFNjcXN1dpKTsbO0/8QAGgEBAAIDAQAAAAAAAAAAAAAAAAE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AsNrvwTXRSamVUK8t+3Hr4Ofm086T+5DbF/flfPNXxtmk8D69ZzCVDGpIsV6hQWGx86EWGx86Cw6hQmxQsaCxSoJPkZ/i3h/hmMtl8jHFIULpAv4pZOzEaUdxsqQGOl35IrBPqZVOrzH7cevgzSqebP8A24b4pcMOdss3xtkm8DCPGPMDL8XS+mS1nYBQBaRykqx2Dtz26zsDWxoaGhvZPO1VbMqnZ4LT86nRUtBLpknFaKLW3rlnbB2evwRetM3hQCgFAKAUAoC6GaW3lSeCV45Y2Do6MQysDsEEeCDUpuF3RDSiVnkTzh7nFn8VELbLQJlYlXSM7+nKOwA24B6h2PkFiTsmrKTtSbLVo1vL56+fMq5+ypcx3lvd14rjy+rK1if4zmxwXkelZL6WykeT01S6hK78aYsvUqjv5LDWjvQ71Zy9pU8x2vb16ZWzNnVEtXtf06T+CS2GWxWVEhxeStbwRa9T0Jlk6N71vpJ1vR/sa3IJkEzwNP0dzTjlxy7KNNX1O3WQ8CgOpf5fE4ro+08naWfq7KevMsfVrzrqI35H96xxzIJfjaXqzJBLjmeBN+iI1k+a/BeN6lS/lvZElMbJaxFvG9sGbpRl7eQx3sa2O9aczaVPLdr39Ol8G1L2dUTFe1vXptciAcQc4s/lYjbYmBMVEy6dkf1JTsEHTkAKO48DqBGw1Vk/ak2ZhB+lfPMtJGypct70x72nBcOfHyxy4kDmmmuJnuLiV5ZZWLu7sWZmJ2SSe5JPvVa24ndlmkoVZZFtQSKAUAoD/9k=';
28
-
29
- @Component({
30
- selector: 'kv-table',
31
- templateUrl: './table.component.html',
32
- styleUrls: ['./table.component.scss'],
33
- })
34
- export class TableComponent implements OnInit {
35
- config!: TableConfig;
36
- pesquisaValue!: string;
37
- globalFilterFields: string[] = [];
38
- actionsTemplate!: TemplateRef<any>;
39
-
40
- selectedSize: string = '';
41
-
42
- tamanhoTela!: number;
43
-
44
- menuItems: KvMenuItem[] = [];
45
- menuColumns: KvMenuItem[] = [];
46
-
47
- checked: boolean = true;
48
-
49
- columns: TableConfigColumn[] = [];
50
- deletedColuns: TableConfigColumn[] = [];
51
-
52
- menuFiltro: boolean = false;
53
- checkboxClicked: boolean = false;
54
-
55
- showFiltrosAvancados: boolean = false;
56
-
57
- @ContentChildren(TemplateDirective) templates!: QueryList<any>;
58
- @Input('templates') _templates!: any;
59
-
60
- @ViewChild('table', { static: false }) table!: Table;
61
- deletedColumnsIndex!: any[];
62
-
63
- @Input('config') set setConfig(value: TableConfig) {
64
- this.config = {
65
- enableCation: value.enableCation || true,
66
- enableSelect: value.enableSelect || false,
67
- enableFilter: value.enableFilter || true,
68
- ...value,
69
- };
70
-
71
- if (this.config.enableFilter) {
72
- this.config.columns.forEach((col) => {
73
- this.globalFilterFields.push(col.field);
74
- });
75
- }
76
- }
77
-
78
- @Input() dataSource: any;
79
- @Input() selectedItems: any[] = [];
80
- @Input() totalRecords!: number;
81
- @Input() paginator: boolean = true;
82
- @Input() rowsPerPageOptions!: number[];
83
- @Input() rows: number = 5;
84
- @Input() pageLinksOptions: number = 1;
85
- @Input() showFirstLastIcon: boolean = false;
86
- @Input() tableSize!: number;
87
- @Input() applyStyle: Function = (rowData: any, col: TableConfigColumn) => '';
88
- @Input() acoesLinhaTabela: boolean = true;
89
- @Input() filterColumnsBtn: boolean = false;
90
- @Input() filtrosAvancados: boolean = false;
91
-
92
- @Output() onActiveItem: EventEmitter<any> = new EventEmitter();
93
- @Output() onActiveItemLote: EventEmitter<any> = new EventEmitter();
94
- @Output() onPaginate: EventEmitter<any> = new EventEmitter();
95
- @Output() onSelectionChange: EventEmitter<any> = new EventEmitter();
96
- @Output() doubleClickEvent: EventEmitter<any> = new EventEmitter();
97
- @Output() filterField: EventEmitter<any> = new EventEmitter();
98
- @Output() filtrosAvancadosEmit: EventEmitter<boolean> = new EventEmitter();
99
-
100
-
101
-
102
- @ViewChild('menuFiltroDiv') menuFiltroDiv!: ElementRef;
103
- @ViewChild('botaoFiltro') botaoFiltro!: ElementRef;
104
-
105
- constructor(
106
- private readonly datePipe: DatePipe,
107
- private readonly decimalPipe: DecimalPipe,
108
- private readonly codigoFipePipe: CodigoFipePipe,
109
- private readonly cpfCnpjPipe: CpfCnpjPipe,
110
- private readonly telefonePipe: TelefonePipe,
111
- private renderer: Renderer2,
112
- private elementRef: ElementRef,
113
- private sanitizer: DomSanitizer
114
- ) {
115
- this.isRowSelectable = this.isRowSelectable.bind(this);
116
- }
117
-
118
- ngOnInit() {
119
- this.adjustTableSize();
120
- this.tamanhoTela = window.innerWidth;
121
- // this.criarMenuColumns();
122
- this.config.columns.forEach((col: any) => {
123
- this.columns.push(col);
124
- });
125
- this.checkHideColumns();
126
- }
127
-
128
- @HostListener('window:resize', ['$event'])
129
- onWindowResize() {
130
- this.adjustTableSize();
131
- this.tamanhoTela = window.innerWidth;
132
- }
133
-
134
- public activeItem(rowData: any) {
135
- this.onActiveItem.emit(rowData);
136
- }
137
-
138
- public activeItemLote(rowData: any) {
139
- this.onActiveItemLote.emit(rowData);
140
- }
141
-
142
- isBooleanField(rowData: any, col: TableConfigColumn): boolean {
143
- return typeof rowData[col.field] == 'boolean';
144
- }
145
-
146
- isChipField(col: TableConfigColumn): boolean {
147
- return col.fieldType == 'chip';
148
- }
149
-
150
- isImageField(col: TableConfigColumn): boolean {
151
- let retorno = col.fieldType && col.fieldType === 'image' ? true : false;
152
- return retorno;
153
- }
154
-
155
- // isVisibleCheckbox(rowData: any): boolean {
156
- // return this.config.visibleControlCheckboxFunction? this.config.visibleControlCheckboxFunction(rowData): true;
157
- // }
158
-
159
- isRowSelectable(event: any) {
160
- return !this.isDisabledCheckbox(event.data);;
161
- }
162
- isDisabledCheckbox(rowData: any): boolean {
163
- return this.config.disableControlCheckboxFunction ? this.config.disableControlCheckboxFunction(rowData) : false;
164
- }
165
-
166
- loadImage(rowData: any, col: TableConfigColumn): string {
167
- /*
168
- Nossa coluna de imagem trabalha com strings do tipo: base64 ou url
169
- */
170
- let retorno = `data:image/jpg;base64, ${imgDefault}`;
171
- if (rowData && col && rowData[col.field] && rowData[col.field] !== '') {
172
- if (rowData[col.field].includes('http'))
173
- retorno = rowData[col.field];
174
- else
175
- retorno = `data:image/jpg;base64, ${rowData[col.field]}`;
176
- }
177
-
178
- return retorno;
179
- }
180
-
181
- public onGlobalFilter(table: Table, event: Event) {
182
- this.filterField.emit((event.target as HTMLInputElement).value);
183
- table.filterGlobal((event.target as HTMLInputElement).value, 'contains');
184
- }
185
-
186
- public paginate(event: any) {
187
- if (event) {
188
- let paginaInicial =
189
- (event?.first > 0 ? event.first / event.rows : event.first) + 1;
190
- let termoPesquisa = '';
191
- let ordenacao = '';
192
-
193
- if (event.globalFilter) termoPesquisa = event.globalFilter;
194
-
195
- if (event.sortField)
196
- ordenacao = `${event.sortField} ${event.sortOrder === 1 ? 'ASC' : 'DESC'
197
- }`;
198
-
199
- const objeto: TablePaginate = {
200
- paginaInicial: paginaInicial,
201
- tamanhoPagina: event.rows,
202
- termoPesquisa: termoPesquisa,
203
- ordenacao: ordenacao,
204
- };
205
-
206
- this.onPaginate.emit(objeto);
207
- }
208
- }
209
-
210
- selectionChange(value = []) {
211
- this.onSelectionChange.emit(value);
212
- }
213
-
214
- returnRowClass(rowData: any, col: TableConfigColumn) {
215
- let value = rowData[col.field];
216
- let rowClass: string;
217
-
218
- this.tableSize > 800 ? (rowClass = 'text-base') : (rowClass = 'text-sm');
219
-
220
- if (col.expiredDate == true) {
221
- new Date(value) < new Date()
222
- ? (rowClass = rowClass + ' text-red-400 font-semibold')
223
- : '';
224
- }
225
- return rowClass;
226
- }
227
-
228
- expiredFile(rowData: any, col: TableConfigColumn): boolean {
229
- let value = rowData['datavencimento'];
230
- return new Date(value) < new Date() && col.field == 'area';
231
- }
232
-
233
- transformValue(rowData: any, col: TableConfigColumn) {
234
- let value = rowData[col.field];
235
-
236
- if (value != null) {
237
- if (!col.pipe) {
238
- return value;
239
- }
240
-
241
- switch (col.pipe) {
242
- case 'date':
243
- return this.datePipe.transform(value, 'dd/MM/yyyy');
244
- case 'decimal':
245
- return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
246
- case 'cpfcnpj':
247
- return this.cpfCnpjPipe.transform(value);
248
- case 'telefone':
249
- return this.telefonePipe.transform(value);
250
- case 'codigofipe':
251
- return this.codigoFipePipe.transform(value);
252
- case 'money':
253
- return this.formatarValor(value);
254
- case 'percentage':
255
- return `${value} %`;
256
-
257
- default:
258
- break;
259
- }
260
- }
261
- }
262
-
263
- formatarValor(valor: number): string {
264
- const formatter = new Intl.NumberFormat('pt-BR', {
265
- style: 'currency',
266
- currency: 'BRL',
267
- });
268
-
269
- return formatter.format(valor);
270
- }
271
-
272
- adjustTableSize() {
273
- if (this.tableSize < 800) {
274
- this.selectedSize = 'p-datatable-sm';
275
- } else {
276
- this.selectedSize = '';
277
- }
278
- }
279
-
280
- doubleClick(e: any, rowData: any) {
281
- let eventDoubleClick = { event: e, rowData: rowData };
282
-
283
- let array: string[] = [];
284
- e.target.classList.forEach((x: any) => array.push(x));
285
-
286
- if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
287
- this.doubleClickEvent.emit(eventDoubleClick);
288
- }
289
-
290
- centralizarColunas(col: any): string {
291
- if (col.centralize) {
292
- return 'text-align: center';
293
- } else return '';
294
- }
295
-
296
- alignColunas(col: any): string {
297
- if (col.align) {
298
- return `text-align: ${col.align}`;
299
- } else return '';
300
- }
301
-
302
- alignColunasHeader(col: any): string {
303
- if (col.align) {
304
- if (col.align == 'right') return 'justify-content: end';
305
- else return '';
306
- } else return '';
307
- }
308
-
309
- retornarCampo(action: KvMenuItem, rowData: any, field: string): string {
310
- const _function = action.dynamicfields
311
- ? (action.dynamicfields[field] as Function)
312
- : null;
313
- const _field: string = _function
314
- ? _function.apply(action, [rowData])
315
- : action[field];
316
- return _field;
317
- }
318
-
319
- retornarRow(rowData: any, col: any, field: string): string {
320
- const _rowaction = this.config.rows ? this.config.rows[col.field] : null;
321
- const _field: string =
322
- _rowaction && _rowaction[field]
323
- ? _rowaction[field].constructor === Function
324
- ? _rowaction[field].apply(this, [rowData])
325
- : _rowaction[field]
326
- : null;
327
- return _field;
328
- }
329
-
330
- exibirCampo(field: any, rowData: any) {
331
- let visible = field.visible ? field.visible(rowData) : true;
332
-
333
- // if (field != undefined && field != null && field != '') {
334
- // const value = rowData[field];
335
- // return value;
336
- // }
337
- return visible;
338
- }
339
-
340
- criarMenusModal(data: any) {
341
- if (this.config.actions && data) {
342
- const items = this.config.actions.map((action) => {
343
- const icon = this.retornarCampo(action, data, 'icon');
344
- const tooltip = this.retornarCampo(action, data, 'tooltip');
345
- const tooltipPosition = this.retornarCampo(action, data, 'tooltipPosition');
346
- const label = this.retornarCampo(action, data, 'label');
347
- const command: any = this.retornarCampo(action, data, 'command');
348
- const visible: boolean = action.visible ? action.visible(data) : true;
349
- const disabled: boolean = action.disabled
350
- ? action.disabled(data)
351
- : false;
352
-
353
- const menuInsert: KvMenuItem = {
354
- label,
355
- icon,
356
- tooltip,
357
- tooltipPosition,
358
- command,
359
- disabled,
360
- visible,
361
- };
362
-
363
- let item = this.menuItems.filter(
364
- (x) => x.command == menuInsert.command
365
- );
366
-
367
- if (item.length == 0) this.menuItems.push(menuInsert);
368
- else {
369
- if (menuInsert.label != item[0].label) {
370
- let index = this.menuItems.indexOf(item[0]);
371
- this.menuItems.splice(index, 1);
372
- }
373
-
374
- if (menuInsert.visible != item[0].visible) {
375
- let index = this.menuItems.indexOf(item[0]);
376
- this.menuItems.splice(index, 1);
377
- }
378
-
379
- if (menuInsert.disabled != item[0].disabled) {
380
- let index = this.menuItems.indexOf(item[0]);
381
- this.menuItems.splice(index, 1);
382
- }
383
- }
384
- });
385
- }
386
- }
387
-
388
- returnClassChip(rowData: any, col: any): string {
389
- return `chip-style w-auto border-round-2xl p-2 text-${this.retornarRow(
390
- rowData,
391
- col,
392
- 'stylechip'
393
- )} border-${this.retornarRow(rowData, col, 'stylechip')}`;
394
- }
395
-
396
- returnClassIcon(rowData: any, col: any): string {
397
- return this.retornarRow(rowData, col, 'iconrow');
398
- }
399
-
400
- returnTooltipIcon(rowData: any, col: any): string {
401
- return this.retornarRow(rowData, col, 'tooltipiconrow');
402
- }
403
-
404
- deleteColumn(field: string) {
405
- let index: number;
406
-
407
- let column: TableConfigColumn | undefined = this.config.columns.find(
408
- (x: TableConfigColumn) => x.field == field
409
- );
410
- if (column) {
411
- index = this.config.columns.indexOf(column);
412
- this.config.columns.splice(index, 1);
413
- this.deletedColuns.push(column);
414
- }
415
- }
416
-
417
- addColumn(field: string) {
418
- let index: number;
419
-
420
- let column: TableConfigColumn | undefined = this.config.columns.find(
421
- (x: TableConfigColumn) => x.field == field
422
- );
423
-
424
- if (!column) {
425
- let deletedColumn: TableConfigColumn | undefined =
426
- this.deletedColuns.find((x: TableConfigColumn) => x.field == field);
427
-
428
- if (deletedColumn != undefined) {
429
- index = this.deletedColuns.indexOf(deletedColumn);
430
- this.deletedColuns.slice(index, 1);
431
- this.config.columns.push(deletedColumn);
432
- }
433
- }
434
- }
435
-
436
- dinamicColumnSet(e: any, col: any) {
437
- col.checked = e.checked;
438
- if (e.checked) this.addColumn(col.field);
439
- else this.deleteColumn(col.field);
440
-
441
- if (col.position) this.config.columns.sort(this.sortByPosition());
442
- }
443
-
444
- // abrirMenuFiltro(e: any) {
445
- // this.menuFiltro = !this.menuFiltro;
446
- // this.checkboxClicked = false;
447
-
448
- // if (this.tamanhoTela < 700)
449
- // this.styleSetter('left', (this.botaoFiltro.nativeElement.offsetLeft - 288) + 'px')
450
- // else
451
- // this.styleSetter('left', (this.botaoFiltro.nativeElement.offsetLeft + 40) + 'px')
452
-
453
- // this.styleSetter('top', this.botaoFiltro.nativeElement.offsetTop + 'px')
454
- // this.styleSetter('visibility', this.menuFiltro ? 'visible' : 'hidden')
455
- // }
456
-
457
- // fecharMenuFiltro() {
458
- // this.menuFiltro = false;
459
- // this.checkboxClicked = false;
460
-
461
- // this.styleSetter('visibility', 'hidden')
462
- // }
463
-
464
- // @HostListener('document:keydown.escape', ['$event'])
465
- // onEscapeKey(event: KeyboardEvent) {
466
- // if (this.filterColumnsBtn == true && this.menuFiltro == true) {
467
- // this.fecharMenuFiltro();
468
- // }
469
- // }
470
-
471
- // @HostListener('document:click', ['$event'])
472
- // onClickEvent(event: any) {
473
- // if (this.filterColumnsBtn == true && this.menuFiltro == true) {
474
- // const clickedElement = event.target as HTMLElement;
475
- // const menuFiltroDiv =
476
- // this.elementRef.nativeElement.querySelector('#menuFiltroDiv');
477
- // const botaoFiltro =
478
- // this.elementRef.nativeElement.querySelector('#botaoFiltro');
479
- // const isCheckboxClicked =
480
- // clickedElement.classList.toString().includes('p-checkbox') ||
481
- // event.target.classList.toString() == '';
482
- // const isInsideMenu =
483
- // menuFiltroDiv?.contains(clickedElement) ||
484
- // botaoFiltro?.contains(clickedElement) ||
485
- // isCheckboxClicked;
486
-
487
- // if (!isInsideMenu) this.fecharMenuFiltro();
488
- // }
489
- // }
490
-
491
- checkMenuFiltro(col: any) {
492
- let deletedColumn: TableConfigColumn | undefined = this.deletedColuns.find(
493
- (x: TableConfigColumn) => x.field == col.field
494
- );
495
- if (deletedColumn) col.checked = false;
496
- else col.checked = true;
497
- }
498
-
499
- sortByPosition() {
500
- return function (elem1: any, elem2: any) {
501
- if (elem1.position < elem2.position) {
502
- return -1;
503
- } else if (elem1.position > elem2.position) {
504
- return 1;
505
- } else {
506
- return 0;
507
- }
508
- };
509
- }
510
-
511
- callDisabled(action: KvMenuItem, data: any): boolean {
512
- if (action?.disabled) {
513
- return action.disabled(data);
514
- }
515
- return false;
516
- }
517
-
518
- dinamicDisableColumn(col: TableConfigColumn): boolean {
519
- if (col.fixedColumn) return col.fixedColumn;
520
- else return false;
521
- }
522
-
523
- checkHideColumns() {
524
- let hideColumnsConfig = this.columns.filter(
525
- (col) => col.hideColumn == true
526
- );
527
- hideColumnsConfig.forEach((col) => this.deleteColumn(col.field));
528
- }
529
-
530
- getCustomTemplate(templatename: string): TemplateRef<any> {
531
- return this._templates[templatename];
532
- }
533
-
534
- // styleSetter(style: string, data: string) {
535
- // this.renderer?.setStyle(
536
- // this.menuFiltroDiv.nativeElement,
537
- // style,
538
- // data
539
- // );
540
- // }
541
-
542
- filtrosAvancadosEvent(e: any) {
543
- this.showFiltrosAvancados = !this.showFiltrosAvancados;
544
- this.filtrosAvancadosEmit.emit(this.showFiltrosAvancados)
545
- }
546
- }