keevo-components 1.5.189 → 1.5.191
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.
- package/README.md +24 -24
- package/ng-package.json +7 -0
- package/package.json +3 -22
- package/src/assets/.gitkeep +0 -0
- package/src/assets/images/LogoEvo.png +0 -0
- package/src/assets/images/LogoPequenaEvo.png +0 -0
- package/src/assets/images/background.png +0 -0
- package/src/assets/images/keepass-logo.png +0 -0
- package/src/assets/images/keepass-logo.svg +74 -0
- package/src/assets/images/keevo-logo.png +0 -0
- package/src/assets/images/logokeevo_2.png +0 -0
- package/src/index.ts +1 -0
- package/src/lib/api/base-components/base-component-button.ts +27 -0
- package/src/lib/api/base-components/base-component-chart.ts +105 -0
- package/src/lib/api/base-components/base-component-crud-form.ts +328 -0
- package/src/lib/api/base-components/base-component-crud-list.ts +111 -0
- package/src/lib/api/base-components/base-component-crud.ts +70 -0
- package/src/lib/api/base-components/base-component-dropdown-new.ts +112 -0
- package/src/lib/api/base-components/base-component-dropdown.ts +164 -0
- package/src/lib/api/base-components/base-component-input.ts +107 -0
- package/src/lib/api/base-components/base-component-multi-select.ts +136 -0
- package/src/lib/api/base-components/base-component.ts +46 -0
- package/src/lib/api/components/chart/chart.config.ts +12 -0
- package/src/lib/api/components/chart/chart.model.ts +9 -0
- package/src/lib/api/components/chart/orchart.config.ts +41 -0
- package/src/lib/api/components/chart/orchart.item.ts +33 -0
- package/src/lib/api/components/dropdown/filtro.combo.ts +4 -0
- package/src/lib/api/components/error/error.component.html +3 -0
- package/src/lib/api/components/error/error.component.scss +5 -0
- package/src/lib/api/components/error/error.component.ts +22 -0
- package/src/lib/api/components/error/kverror.module.ts +23 -0
- package/src/lib/api/components/table/action-item.ts +5 -0
- package/src/lib/api/components/table/kv-menuitem.ts +10 -0
- package/src/lib/api/components/table/table.config.column.ts +21 -0
- package/src/lib/api/components/table/table.config.ts +20 -0
- package/src/lib/api/components/table/table.paginate.ts +6 -0
- package/src/lib/api/helpers/component-providers.ts +16 -0
- package/src/lib/api/helpers/keevo-validators.ts +77 -0
- package/src/lib/api/helpers/translate-primeng.ts +25 -0
- package/src/lib/api/models/menu/menu.model.ts +10 -0
- package/{lib/api/models/menu/menucompleto.model.d.ts → src/lib/api/models/menu/menucompleto.model.ts} +7 -6
- package/src/lib/api/models/menu/sistemamenu.model.ts +8 -0
- package/src/lib/api/modules/primeng.module.ts +125 -0
- package/src/lib/api/services/base.api.service.ts +115 -0
- package/src/lib/api/services/component.service.ts +22 -0
- package/src/lib/api/services/form.service.ts +105 -0
- package/src/lib/api/services/imagens.service.ts +20 -0
- package/src/lib/api/services/notification.service.ts +82 -0
- package/src/lib/api/services/object.service.ts +20 -0
- package/src/lib/buttons/button-personalize/button-personalize.component.html +11 -0
- package/src/lib/buttons/button-personalize/button-personalize.component.scss +3 -0
- package/src/lib/buttons/button-personalize/button-personalize.component.ts +13 -0
- package/src/lib/buttons/button-popup/button-popup.component.html +12 -0
- package/src/lib/buttons/button-popup/button-popup.component.scss +13 -0
- package/src/lib/buttons/button-popup/button-popup.component.ts +30 -0
- package/src/lib/buttons/button-secondary/button-secondary.component.html +12 -0
- package/src/lib/buttons/button-secondary/button-secondary.component.scss +14 -0
- package/src/lib/buttons/button-secondary/button-secondary.component.ts +13 -0
- package/src/lib/buttons/button-success/button-success.component.html +11 -0
- package/src/lib/buttons/button-success/button-success.component.scss +13 -0
- package/src/lib/buttons/button-success/button-success.component.ts +13 -0
- package/src/lib/buttons/kvbutton.module.ts +25 -0
- package/src/lib/chart/chart.component.html +38 -0
- package/src/lib/chart/chart.component.scss +0 -0
- package/src/lib/chart/chart.component.spec.ts +28 -0
- package/src/lib/chart/chart.component.ts +141 -0
- package/src/lib/chart/kvchart.module.ts +20 -0
- package/src/lib/directives/template.directive.ts +15 -0
- package/src/lib/inputs/check/check.component.html +11 -0
- package/src/lib/inputs/check/check.component.scss +13 -0
- package/src/lib/inputs/check/check.component.ts +24 -0
- package/src/lib/inputs/dropdown/dropdown.component.html +91 -0
- package/src/lib/inputs/dropdown/dropdown.component.scss +0 -0
- package/src/lib/inputs/dropdown/dropdown.component.ts +28 -0
- package/src/lib/inputs/editor/editor.component.html +90 -0
- package/src/lib/inputs/editor/editor.component.scss +4 -0
- package/src/lib/inputs/editor/editor.component.ts +80 -0
- package/src/lib/inputs/input-calendar/input-calendar.component.html +30 -0
- package/src/lib/inputs/input-calendar/input-calendar.component.scss +0 -0
- package/src/lib/inputs/input-calendar/input-calendar.component.ts +81 -0
- package/src/lib/inputs/input-mask/input-mask.component.html +20 -0
- package/src/lib/inputs/input-mask/input-mask.component.scss +0 -0
- package/src/lib/inputs/input-mask/input-mask.component.ts +20 -0
- package/src/lib/inputs/input-number/input-number.component.html +22 -0
- package/src/lib/inputs/input-number/input-number.component.scss +0 -0
- package/src/lib/inputs/input-number/input-number.component.ts +52 -0
- package/src/lib/inputs/input-password/input-password.component.html +23 -0
- package/src/lib/inputs/input-password/input-password.component.scss +0 -0
- package/src/lib/inputs/input-password/input-password.component.ts +23 -0
- package/src/lib/inputs/input-text/input-text.component.html +20 -0
- package/src/lib/inputs/input-text/input-text.component.scss +18 -0
- package/src/lib/inputs/input-text/input-text.component.ts +17 -0
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.html +32 -0
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.scss +0 -0
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.spec.ts +23 -0
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.ts +36 -0
- package/src/lib/inputs/input-textarea/input-textarea.component.html +22 -0
- package/src/lib/inputs/input-textarea/input-textarea.component.scss +0 -0
- package/src/lib/inputs/input-textarea/input-textarea.component.ts +33 -0
- package/src/lib/inputs/input-time/input-time.component.html +23 -0
- package/src/lib/inputs/input-time/input-time.component.scss +0 -0
- package/src/lib/inputs/input-time/input-time.component.ts +20 -0
- package/src/lib/inputs/kvinputs.module.ts +64 -0
- package/src/lib/inputs/multi-select/multi-select.component.html +28 -0
- package/src/lib/inputs/multi-select/multi-select.component.scss +8 -0
- package/src/lib/inputs/multi-select/multi-select.component.ts +31 -0
- package/src/lib/inputs/radio-group/radio-group.component.html +19 -0
- package/src/lib/inputs/radio-group/radio-group.component.scss +15 -0
- package/src/lib/inputs/radio-group/radio-group.component.ts +50 -0
- package/src/lib/inputs/switch/switch.component.html +12 -0
- package/src/lib/inputs/switch/switch.component.scss +3 -0
- package/src/lib/inputs/switch/switch.component.ts +30 -0
- package/src/lib/keevo-components.module.ts +50 -0
- package/src/lib/label/label.component.html +6 -0
- package/src/lib/label/label.component.scss +9 -0
- package/src/lib/label/label.component.spec.ts +23 -0
- package/src/lib/label/label.component.ts +13 -0
- package/src/lib/label/label.module.ts +18 -0
- package/src/lib/loader/kvloader.module.ts +17 -0
- package/src/lib/loader/loader.component.html +1 -0
- package/src/lib/loader/loader.component.ts +14 -0
- package/src/lib/loader/loader.service.ts +26 -0
- package/src/lib/login/kvlogin.module.ts +28 -0
- package/src/lib/login/login.component.html +108 -0
- package/src/lib/login/login.component.scss +48 -0
- package/src/lib/login/login.component.spec.ts +23 -0
- package/src/lib/login/login.component.ts +65 -0
- package/src/lib/menu/kvmenu.module.ts +27 -0
- package/src/lib/menu/menu.component.html +342 -0
- package/src/lib/menu/menu.component.scss +210 -0
- package/src/lib/menu/menu.component.spec.ts +23 -0
- package/src/lib/menu/menu.component.ts +246 -0
- package/src/lib/orgchart/orgchart.component.html +58 -0
- package/src/lib/orgchart/orgchart.component.scss +21 -0
- package/src/lib/orgchart/orgchart.component.ts +118 -0
- package/src/lib/orgchart/orgchart.module.ts +14 -0
- package/src/lib/page-form/kv-page-form.module.ts +22 -0
- package/src/lib/page-form/page-form.component.html +57 -0
- package/src/lib/page-form/page-form.component.scss +72 -0
- package/src/lib/page-form/page-form.component.spec.ts +28 -0
- package/src/lib/page-form/page-form.component.ts +121 -0
- package/src/lib/picklist/kvpicklist.module.ts +20 -0
- package/src/lib/picklist/picklist.component.html +17 -0
- package/src/lib/picklist/picklist.component.scss +0 -0
- package/src/lib/picklist/picklist.component.spec.ts +26 -0
- package/src/lib/picklist/picklist.component.ts +27 -0
- package/src/lib/pipes/codigofile.pipe.ts +15 -0
- package/src/lib/pipes/cpfcnpj.pipe.ts +21 -0
- package/src/lib/pipes/pipes.module.ts +22 -0
- package/src/lib/pipes/telefone.pipe.ts +38 -0
- package/src/lib/styles-components.scss +11 -0
- package/src/lib/table/kvtable.module.ts +22 -0
- package/src/lib/table/table.component.html +473 -0
- package/src/lib/table/table.component.scss +240 -0
- package/src/lib/table/table.component.spec.ts +28 -0
- package/src/lib/table/table.component.ts +546 -0
- package/src/lib/tree-table/kv-treetable.component.html +649 -0
- package/src/lib/tree-table/kv-treetable.component.scss +315 -0
- package/src/lib/tree-table/kv-treetable.component.ts +390 -0
- package/src/lib/tree-table/kv-treetable.module.ts +18 -0
- package/src/lib/tree-view/kvtree-view.module.ts +19 -0
- package/src/lib/tree-view/tree-view.component.html +9 -0
- package/src/lib/tree-view/tree-view.component.scss +0 -0
- package/src/lib/tree-view/tree-view.component.spec.ts +23 -0
- package/src/lib/tree-view/tree-view.component.ts +29 -0
- package/src/lib/workspace/kvworkspace.module.ts +29 -0
- package/src/lib/workspace/workspace.component.html +108 -0
- package/src/lib/workspace/workspace.component.scss +83 -0
- package/src/lib/workspace/workspace.component.ts +75 -0
- package/{public-api.d.ts → src/public-api.ts} +156 -133
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2020/keevo-components.mjs +0 -5
- package/esm2020/lib/api/base-components/base-component-button.mjs +0 -36
- package/esm2020/lib/api/base-components/base-component-chart.mjs +0 -92
- package/esm2020/lib/api/base-components/base-component-crud-form.mjs +0 -269
- package/esm2020/lib/api/base-components/base-component-crud-list.mjs +0 -67
- package/esm2020/lib/api/base-components/base-component-crud.mjs +0 -65
- package/esm2020/lib/api/base-components/base-component-dropdown-new.mjs +0 -211
- package/esm2020/lib/api/base-components/base-component-dropdown.mjs +0 -161
- package/esm2020/lib/api/base-components/base-component-input.mjs +0 -94
- package/esm2020/lib/api/base-components/base-component-multi-select.mjs +0 -128
- package/esm2020/lib/api/base-components/base-component.mjs +0 -49
- package/esm2020/lib/api/components/chart/chart.config.mjs +0 -2
- package/esm2020/lib/api/components/chart/chart.model.mjs +0 -2
- package/esm2020/lib/api/components/chart/orchart.config.mjs +0 -2
- package/esm2020/lib/api/components/chart/orchart.item.mjs +0 -2
- package/esm2020/lib/api/components/dropdown/filtro.combo.mjs +0 -2
- package/esm2020/lib/api/components/error/error.component.mjs +0 -26
- package/esm2020/lib/api/components/error/kverror.module.mjs +0 -35
- package/esm2020/lib/api/components/table/action-item.mjs +0 -2
- package/esm2020/lib/api/components/table/kv-menuitem.mjs +0 -3
- package/esm2020/lib/api/components/table/table.config.column.mjs +0 -2
- package/esm2020/lib/api/components/table/table.config.mjs +0 -2
- package/esm2020/lib/api/components/table/table.paginate.mjs +0 -9
- package/esm2020/lib/api/helpers/component-providers.mjs +0 -16
- package/esm2020/lib/api/helpers/keevo-validators.mjs +0 -64
- package/esm2020/lib/api/helpers/translate-primeng.mjs +0 -23
- package/esm2020/lib/api/models/menu/menu.model.mjs +0 -2
- package/esm2020/lib/api/models/menu/menucompleto.model.mjs +0 -2
- package/esm2020/lib/api/models/menu/sistemamenu.model.mjs +0 -2
- package/esm2020/lib/api/modules/primeng.module.mjs +0 -247
- package/esm2020/lib/api/services/base.api.service.mjs +0 -74
- package/esm2020/lib/api/services/component.service.mjs +0 -27
- package/esm2020/lib/api/services/form.service.mjs +0 -84
- package/esm2020/lib/api/services/imagens.service.mjs +0 -22
- package/esm2020/lib/api/services/notification.service.mjs +0 -67
- package/esm2020/lib/api/services/object.service.mjs +0 -26
- package/esm2020/lib/buttons/button-personalize/button-personalize.component.mjs +0 -17
- package/esm2020/lib/buttons/button-popup/button-popup.component.mjs +0 -31
- package/esm2020/lib/buttons/button-secondary/button-secondary.component.mjs +0 -17
- package/esm2020/lib/buttons/button-success/button-success.component.mjs +0 -17
- package/esm2020/lib/buttons/kvbutton.module.mjs +0 -39
- package/esm2020/lib/chart/chart.component.mjs +0 -145
- package/esm2020/lib/chart/kvchart.module.mjs +0 -32
- package/esm2020/lib/directives/template.directive.mjs +0 -24
- package/esm2020/lib/inputs/check/check.component.mjs +0 -26
- package/esm2020/lib/inputs/dropdown/dropdown.component.mjs +0 -37
- package/esm2020/lib/inputs/editor/editor.component.mjs +0 -70
- package/esm2020/lib/inputs/input-calendar/input-calendar.component.mjs +0 -89
- package/esm2020/lib/inputs/input-mask/input-mask.component.mjs +0 -23
- package/esm2020/lib/inputs/input-number/input-number.component.mjs +0 -59
- package/esm2020/lib/inputs/input-password/input-password.component.mjs +0 -33
- package/esm2020/lib/inputs/input-text/input-text.component.mjs +0 -21
- package/esm2020/lib/inputs/input-text-checkbox/input-text-checkbox.component.mjs +0 -38
- package/esm2020/lib/inputs/input-textarea/input-textarea.component.mjs +0 -43
- package/esm2020/lib/inputs/input-time/input-time.component.mjs +0 -24
- package/esm2020/lib/inputs/kvinputs.module.mjs +0 -108
- package/esm2020/lib/inputs/multi-select/multi-select.component.mjs +0 -38
- package/esm2020/lib/inputs/radio-group/radio-group.component.mjs +0 -53
- package/esm2020/lib/inputs/switch/switch.component.mjs +0 -32
- package/esm2020/lib/keevo-components.module.mjs +0 -105
- package/esm2020/lib/label/label.component.mjs +0 -15
- package/esm2020/lib/label/label.module.mjs +0 -24
- package/esm2020/lib/loader/loader.component.mjs +0 -18
- package/esm2020/lib/loader/loader.module.mjs +0 -28
- package/esm2020/lib/loader/loader.service.mjs +0 -29
- package/esm2020/lib/login/kvlogin.module.mjs +0 -47
- package/esm2020/lib/login/login.component.mjs +0 -52
- package/esm2020/lib/menu/kvmenu.module.mjs +0 -43
- package/esm2020/lib/menu/menu.component.mjs +0 -237
- package/esm2020/lib/orgchart/orgchart.component.mjs +0 -100
- package/esm2020/lib/orgchart/orgchart.module.mjs +0 -24
- package/esm2020/lib/page-form/kv-page-form.module.mjs +0 -38
- package/esm2020/lib/page-form/page-form.component.mjs +0 -144
- package/esm2020/lib/picklist/kvpicklist.module.mjs +0 -32
- package/esm2020/lib/picklist/picklist.component.mjs +0 -48
- package/esm2020/lib/pipes/codigofile.pipe.mjs +0 -19
- package/esm2020/lib/pipes/cpfcnpj.pipe.mjs +0 -25
- package/esm2020/lib/pipes/pipes.module.mjs +0 -34
- package/esm2020/lib/pipes/telefone.pipe.mjs +0 -45
- package/esm2020/lib/table/kvtable.module.mjs +0 -32
- package/esm2020/lib/table/table.component.mjs +0 -499
- package/esm2020/lib/tree-table/kv-treetable.component.mjs +0 -371
- package/esm2020/lib/tree-table/kv-treetable.module.mjs +0 -32
- package/esm2020/lib/tree-view/kvtree-view.module.mjs +0 -28
- package/esm2020/lib/tree-view/tree-view.component.mjs +0 -29
- package/esm2020/lib/workspace/kvworkspace.module.mjs +0 -47
- package/esm2020/lib/workspace/workspace.component.mjs +0 -77
- package/esm2020/public-api.mjs +0 -137
- package/fesm2015/keevo-components.mjs +0 -4706
- package/fesm2015/keevo-components.mjs.map +0 -1
- package/fesm2020/keevo-components.mjs +0 -4697
- package/fesm2020/keevo-components.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/api/base-components/base-component-button.d.ts +0 -14
- package/lib/api/base-components/base-component-chart.d.ts +0 -40
- package/lib/api/base-components/base-component-crud-form.d.ts +0 -137
- package/lib/api/base-components/base-component-crud-list.d.ts +0 -63
- package/lib/api/base-components/base-component-crud.d.ts +0 -36
- package/lib/api/base-components/base-component-dropdown-new.d.ts +0 -14
- package/lib/api/base-components/base-component-dropdown.d.ts +0 -42
- package/lib/api/base-components/base-component-input.d.ts +0 -31
- package/lib/api/base-components/base-component-multi-select.d.ts +0 -35
- package/lib/api/base-components/base-component.d.ts +0 -21
- package/lib/api/components/chart/chart.config.d.ts +0 -11
- package/lib/api/components/chart/chart.model.d.ts +0 -9
- package/lib/api/components/chart/orchart.config.d.ts +0 -35
- package/lib/api/components/chart/orchart.item.d.ts +0 -26
- package/lib/api/components/dropdown/filtro.combo.d.ts +0 -4
- package/lib/api/components/error/error.component.d.ts +0 -12
- package/lib/api/components/error/kverror.module.d.ts +0 -10
- package/lib/api/components/table/action-item.d.ts +0 -5
- package/lib/api/components/table/kv-menuitem.d.ts +0 -9
- package/lib/api/components/table/table.config.column.d.ts +0 -21
- package/lib/api/components/table/table.config.d.ts +0 -17
- package/lib/api/components/table/table.paginate.d.ts +0 -6
- package/lib/api/helpers/component-providers.d.ts +0 -2
- package/lib/api/helpers/keevo-validators.d.ts +0 -10
- package/lib/api/helpers/translate-primeng.d.ts +0 -4
- package/lib/api/models/menu/menu.model.d.ts +0 -10
- package/lib/api/models/menu/sistemamenu.model.d.ts +0 -8
- package/lib/api/modules/primeng.module.d.ts +0 -60
- package/lib/api/services/base.api.service.d.ts +0 -25
- package/lib/api/services/component.service.d.ts +0 -11
- package/lib/api/services/form.service.d.ts +0 -27
- package/lib/api/services/imagens.service.d.ts +0 -8
- package/lib/api/services/notification.service.d.ts +0 -25
- package/lib/api/services/object.service.d.ts +0 -8
- package/lib/buttons/button-personalize/button-personalize.component.d.ts +0 -7
- package/lib/buttons/button-popup/button-popup.component.d.ts +0 -13
- package/lib/buttons/button-secondary/button-secondary.component.d.ts +0 -7
- package/lib/buttons/button-success/button-success.component.d.ts +0 -7
- package/lib/buttons/kvbutton.module.d.ts +0 -11
- package/lib/chart/chart.component.d.ts +0 -56
- package/lib/chart/kvchart.module.d.ts +0 -10
- package/lib/directives/template.directive.d.ts +0 -11
- package/lib/inputs/check/check.component.d.ts +0 -11
- package/lib/inputs/dropdown/dropdown.component.d.ts +0 -14
- package/lib/inputs/editor/editor.component.d.ts +0 -39
- package/lib/inputs/input-calendar/input-calendar.component.d.ts +0 -27
- package/lib/inputs/input-mask/input-mask.component.d.ts +0 -10
- package/lib/inputs/input-number/input-number.component.d.ts +0 -19
- package/lib/inputs/input-password/input-password.component.d.ts +0 -13
- package/lib/inputs/input-text/input-text.component.d.ts +0 -9
- package/lib/inputs/input-text-checkbox/input-text-checkbox.component.d.ts +0 -15
- package/lib/inputs/input-textarea/input-textarea.component.d.ts +0 -16
- package/lib/inputs/input-time/input-time.component.d.ts +0 -10
- package/lib/inputs/kvinputs.module.d.ts +0 -25
- package/lib/inputs/multi-select/multi-select.component.d.ts +0 -12
- package/lib/inputs/radio-group/radio-group.component.d.ts +0 -18
- package/lib/inputs/switch/switch.component.d.ts +0 -13
- package/lib/keevo-components.module.d.ts +0 -19
- package/lib/label/label.component.d.ts +0 -7
- package/lib/label/label.module.d.ts +0 -8
- package/lib/loader/loader.component.d.ts +0 -10
- package/lib/loader/loader.module.d.ts +0 -9
- package/lib/loader/loader.service.d.ts +0 -10
- package/lib/login/kvlogin.module.d.ts +0 -13
- package/lib/login/login.component.d.ts +0 -30
- package/lib/menu/kvmenu.module.d.ts +0 -12
- package/lib/menu/menu.component.d.ts +0 -74
- package/lib/orgchart/orgchart.component.d.ts +0 -27
- package/lib/orgchart/orgchart.module.d.ts +0 -9
- package/lib/page-form/kv-page-form.module.d.ts +0 -11
- package/lib/page-form/page-form.component.d.ts +0 -69
- package/lib/picklist/kvpicklist.module.d.ts +0 -10
- package/lib/picklist/picklist.component.d.ts +0 -20
- package/lib/pipes/codigofile.pipe.d.ts +0 -7
- package/lib/pipes/cpfcnpj.pipe.d.ts +0 -7
- package/lib/pipes/pipes.module.d.ts +0 -10
- package/lib/pipes/telefone.pipe.d.ts +0 -7
- package/lib/table/kvtable.module.d.ts +0 -10
- package/lib/table/table.component.d.ts +0 -104
- package/lib/tree-table/kv-treetable.component.d.ts +0 -84
- package/lib/tree-table/kv-treetable.module.d.ts +0 -11
- package/lib/tree-view/kvtree-view.module.d.ts +0 -9
- package/lib/tree-view/tree-view.component.d.ts +0 -14
- package/lib/workspace/kvworkspace.module.d.ts +0 -13
- package/lib/workspace/workspace.component.d.ts +0 -28
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, Input } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
3
|
+
import { Subject } from "rxjs";
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
template: ''
|
|
7
|
+
})
|
|
8
|
+
export abstract class BaseComponent<T> implements ControlValueAccessor {
|
|
9
|
+
|
|
10
|
+
protected stateChanges: Subject<void> = new Subject();
|
|
11
|
+
protected onChange!: (value: T) => void;
|
|
12
|
+
protected onTouched!: () => void;
|
|
13
|
+
protected _value!: T;
|
|
14
|
+
|
|
15
|
+
@Input('required') isRequired: boolean = false;
|
|
16
|
+
|
|
17
|
+
public set value(value: T) {
|
|
18
|
+
this._value = value;
|
|
19
|
+
if (this.onChange) this.onChange(value);
|
|
20
|
+
this.stateChanges.next();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public get value(): T {
|
|
24
|
+
return this._value;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@Input() componentId!: string;
|
|
28
|
+
@Input() label!: string;
|
|
29
|
+
@Input() disabled: boolean = false;
|
|
30
|
+
|
|
31
|
+
registerOnChange(fn: any): void {
|
|
32
|
+
this.onChange = fn;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
registerOnTouched(fn: any): void {
|
|
36
|
+
this.onTouched = fn;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
setDisabledState?(isDisabled: boolean): void {
|
|
40
|
+
this.disabled = isDisabled;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
writeValue(value: T): void {
|
|
44
|
+
this.value = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ChartConfig {
|
|
2
|
+
labels: string[];
|
|
3
|
+
datasets: ChartDatasetConfig[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ChartDatasetConfig {
|
|
7
|
+
label?: string;
|
|
8
|
+
backgroundColor: string[];
|
|
9
|
+
hoverBackgroundColor: string[];
|
|
10
|
+
borderColor?: string[];
|
|
11
|
+
data: number[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default interface OrgChartConfig{
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {string}
|
|
6
|
+
* Esse item espera uma string html template
|
|
7
|
+
* (no formato angular com interpolação de variaveis via {{data.'PROPIEDADE DESEJADA'}})
|
|
8
|
+
* Todos os dados expostos na propiedade data de
|
|
9
|
+
* cada item estão acessiveis pelo objeto data;
|
|
10
|
+
* Para realizar interpolação, referencie data entre {{}} e a chave desejada;
|
|
11
|
+
** Exemplo: ` <h1> Nome: {{data.nome}} </h1> `
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
templateItem: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @type {number}
|
|
18
|
+
* Esse item espera receber a largura media do card, para calculo do icone de collapse
|
|
19
|
+
*/
|
|
20
|
+
cardWidht: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @type {number}
|
|
24
|
+
* Esse item espera receber a altura media do card, para calculo do icone de collapse
|
|
25
|
+
*/
|
|
26
|
+
cardHeight: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @type {string}
|
|
30
|
+
* Esse item espera receber a cor das connections
|
|
31
|
+
* * Default { #d6d6d6 }
|
|
32
|
+
*/
|
|
33
|
+
connectionColor?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @type {number}
|
|
37
|
+
* Esse item espera receber a cor das connections
|
|
38
|
+
* * Default { 2 }
|
|
39
|
+
*/
|
|
40
|
+
conectionWidth?: number;
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default interface OrgChartItem{
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type {number}
|
|
5
|
+
* Esse item espera receber o identificador do card
|
|
6
|
+
*/
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @type {number | null}
|
|
11
|
+
* Esse item espera receber o identificador do card pai desse card
|
|
12
|
+
* * Aceita null no caso de ser o nó root
|
|
13
|
+
*
|
|
14
|
+
* @warning Caso tenha mais de um objeto com {{ parentId: null }} havera um erro de multiplos roots
|
|
15
|
+
*/
|
|
16
|
+
parentId: number | null;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @type {object}
|
|
21
|
+
* Esse item espera receber os dados do card
|
|
22
|
+
* @warning Mantenha a consistencia de dados, caso tente acessar um dado que não exista em outro objeto havera um erro
|
|
23
|
+
*/
|
|
24
|
+
data: object;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @type {object | undefined}
|
|
29
|
+
* Esse item espera receber um template personalizado para este nó em especifico
|
|
30
|
+
*/
|
|
31
|
+
template?: string;
|
|
32
|
+
// [key: string]: any;
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'kv-error',
|
|
6
|
+
templateUrl: './error.component.html',
|
|
7
|
+
styleUrls: ['./error.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class ErrorComponent {
|
|
10
|
+
public hasError: boolean | undefined = false;
|
|
11
|
+
|
|
12
|
+
@Input() formControl!: FormControl;
|
|
13
|
+
|
|
14
|
+
@Input('hasError') set setHasError(value: boolean | undefined) {
|
|
15
|
+
this.hasError = value;
|
|
16
|
+
this.emitError.emit(value);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
emitError: EventEmitter<boolean> = new EventEmitter<boolean>();
|
|
20
|
+
|
|
21
|
+
constructor() { }
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
import { PrimeNgModule } from '../../modules/primeng.module';
|
|
6
|
+
|
|
7
|
+
import { ErrorComponent } from './error.component';
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
declarations: [
|
|
11
|
+
ErrorComponent,
|
|
12
|
+
],
|
|
13
|
+
imports: [
|
|
14
|
+
CommonModule,
|
|
15
|
+
FormsModule,
|
|
16
|
+
PrimeNgModule,
|
|
17
|
+
ReactiveFormsModule,
|
|
18
|
+
],
|
|
19
|
+
exports: [
|
|
20
|
+
ErrorComponent,
|
|
21
|
+
]
|
|
22
|
+
})
|
|
23
|
+
export class kvErrorModule { }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface TableConfigColumn {
|
|
2
|
+
position?: number;
|
|
3
|
+
field: string;
|
|
4
|
+
header: string;
|
|
5
|
+
headerTooltip?: string;
|
|
6
|
+
fieldType?: string;
|
|
7
|
+
width?: string;
|
|
8
|
+
pipe?: 'date' | 'decimal' | 'cpfcnpj' | 'telefone' | 'codigofipe' | 'money' | 'percentage';
|
|
9
|
+
sortable: boolean;
|
|
10
|
+
grouped?: boolean;
|
|
11
|
+
centralize?: boolean;
|
|
12
|
+
expiredDate?: boolean;
|
|
13
|
+
icon?: string;
|
|
14
|
+
iconField?: boolean;
|
|
15
|
+
indIconMaterial?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
hideColumn?: boolean;
|
|
18
|
+
fixedColumn?: boolean;
|
|
19
|
+
template?: any;
|
|
20
|
+
align?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import { TableConfigColumn } from './table.config.column';
|
|
3
|
+
import { KvMenuItem } from './kv-menuitem';
|
|
4
|
+
|
|
5
|
+
export interface TableConfig {
|
|
6
|
+
actions: KvMenuItem[];
|
|
7
|
+
actionsLote?: KvMenuItem[];
|
|
8
|
+
columns: TableConfigColumn[];
|
|
9
|
+
rows?: any;
|
|
10
|
+
title?: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
lazy: boolean;
|
|
13
|
+
fieldGroup?: string;
|
|
14
|
+
enableCation?: boolean;
|
|
15
|
+
enableFilter?: boolean;
|
|
16
|
+
enableSelect?: boolean;
|
|
17
|
+
enableToggleNodes?: boolean;
|
|
18
|
+
// visibleControlCheckboxFunction?: (rowData: any) => boolean; // A função que controla a edição
|
|
19
|
+
disableControlCheckboxFunction?: (rowData: any, rowNode?: any) => boolean; // A função que controla a edição
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Provider, forwardRef } from "@angular/core";
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
3
|
+
import { ComponentService } from '../services/component.service';
|
|
4
|
+
|
|
5
|
+
export function ComponentProviders(ref: any): Provider[] {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9
|
+
useExisting: forwardRef(() => ref),
|
|
10
|
+
multi: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
provide: ComponentService
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
|
2
|
+
|
|
3
|
+
export class KeevoValidators {
|
|
4
|
+
static required(erroMessage?: string): ValidatorFn {
|
|
5
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
6
|
+
if (Validators.required(control))
|
|
7
|
+
return { required: true, erroMessage: `${erroMessage ? erroMessage : 'Campo obrigatório'}` };
|
|
8
|
+
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static dateGreaterThan(startControlName: string, erroMessage?: string): ValidatorFn {
|
|
14
|
+
return (endControl: AbstractControl): ValidationErrors | null => {
|
|
15
|
+
const parent = endControl.parent as FormGroup;
|
|
16
|
+
|
|
17
|
+
if (!parent) return null;
|
|
18
|
+
|
|
19
|
+
const startControl: AbstractControl = parent.get(startControlName) as AbstractControl;
|
|
20
|
+
|
|
21
|
+
const startDate: Date = startControl.value;
|
|
22
|
+
const endDate: Date = endControl.value;
|
|
23
|
+
|
|
24
|
+
if (!startDate || !endDate) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
if (startDate > endDate) {
|
|
28
|
+
return { greaterThan: true, erroMessage: erroMessage };
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static min(min: number, erroMessage?: string): ValidatorFn {
|
|
35
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
36
|
+
if (Validators.min(min)(control))
|
|
37
|
+
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor maior ou igual à '}${min}` };
|
|
38
|
+
|
|
39
|
+
return null;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static max(min: number, erroMessage?: string): ValidatorFn {
|
|
44
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
45
|
+
if (Validators.max(min)(control))
|
|
46
|
+
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor menor ou igual à '}${min}` };
|
|
47
|
+
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static email(erroMessage?: string): ValidatorFn {
|
|
53
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
54
|
+
if (Validators.email(control)) {
|
|
55
|
+
return { email: true, erroMessage: `${erroMessage ? erroMessage : 'Endereço de e-mail inválido!'}` };
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static maxLengthArray(max: number): ValidatorFn {
|
|
62
|
+
return (c: AbstractControl): ValidationErrors | null => {
|
|
63
|
+
if (c.value.length < max)
|
|
64
|
+
return null;
|
|
65
|
+
|
|
66
|
+
return { maxLengthArray: true, erroMessage: 'Tamanho máximo excedido!' };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static maxLength(max: number, erroMessage?: string): ValidatorFn {
|
|
71
|
+
return (control: AbstractControl): ValidationErrors | null => {
|
|
72
|
+
if (Validators.maxLength(max)(control))
|
|
73
|
+
return { maxLength: true, erroMessage: `${erroMessage ? erroMessage : 'Limite máximo de ${max} caracteres atingido!'}` };
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PrimeNGConfig } from 'primeng/api';
|
|
2
|
+
|
|
3
|
+
export class TranslatePrimeng {
|
|
4
|
+
public config(config: PrimeNGConfig): void {
|
|
5
|
+
config.ripple = true;
|
|
6
|
+
|
|
7
|
+
config.setTranslation({
|
|
8
|
+
monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
|
|
9
|
+
monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
|
|
10
|
+
dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabádo'],
|
|
11
|
+
dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
|
|
12
|
+
dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
|
|
13
|
+
today: 'Hoje',
|
|
14
|
+
weekHeader: 'Semana',
|
|
15
|
+
emptyMessage: 'Nenhum resultado encontrado',
|
|
16
|
+
emptyFilterMessage: 'Nenhum registro encontrado com o filtro informado',
|
|
17
|
+
weak: 'Fraca',
|
|
18
|
+
medium: 'Média',
|
|
19
|
+
strong: 'Forte',
|
|
20
|
+
passwordPrompt: 'Informe a senha',
|
|
21
|
+
clear: 'Limpar',
|
|
22
|
+
apply: 'Aplicar'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { menuModel } from "./menu.model";
|
|
2
|
-
import { sistemaMenuModel } from "./sistemamenu.model";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { menuModel } from "./menu.model";
|
|
2
|
+
import { sistemaMenuModel } from "./sistemamenu.model";
|
|
3
|
+
|
|
4
|
+
export interface menuCompletoModel{
|
|
5
|
+
sistema: sistemaMenuModel;
|
|
6
|
+
menus: menuModel[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 { ButtonModule } from 'primeng/button';
|
|
7
|
+
import { CalendarModule } from 'primeng/calendar';
|
|
8
|
+
import { CardModule } from 'primeng/card';
|
|
9
|
+
import { CarouselModule } from 'primeng/carousel';
|
|
10
|
+
import { ChartModule } from 'primeng/chart';
|
|
11
|
+
import { CheckboxModule } from 'primeng/checkbox';
|
|
12
|
+
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
13
|
+
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
14
|
+
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
15
|
+
import { DataViewModule } from 'primeng/dataview';
|
|
16
|
+
import { DialogModule } from 'primeng/dialog';
|
|
17
|
+
import { DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
18
|
+
import { DividerModule } from 'primeng/divider';
|
|
19
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
20
|
+
import { DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
21
|
+
import { EditorModule } from 'primeng/editor';
|
|
22
|
+
import { FieldsetModule } from 'primeng/fieldset';
|
|
23
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
24
|
+
import { InputMaskModule } from 'primeng/inputmask';
|
|
25
|
+
import { InputNumberModule } from 'primeng/inputnumber';
|
|
26
|
+
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
27
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
28
|
+
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
29
|
+
import { KnobModule } from 'primeng/knob';
|
|
30
|
+
import { MenuModule } from 'primeng/menu';
|
|
31
|
+
import { MessageModule } from 'primeng/message';
|
|
32
|
+
import { MessagesModule } from 'primeng/messages';
|
|
33
|
+
import { MultiSelectModule } from 'primeng/multiselect';
|
|
34
|
+
import { OverlayPanelModule } from 'primeng/overlaypanel';
|
|
35
|
+
import { PanelModule } from 'primeng/panel';
|
|
36
|
+
import { PasswordModule } from 'primeng/password';
|
|
37
|
+
import { PickListModule } from 'primeng/picklist';
|
|
38
|
+
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
39
|
+
import { RatingModule } from 'primeng/rating';
|
|
40
|
+
import { RippleModule } from 'primeng/ripple';
|
|
41
|
+
import { SidebarModule } from 'primeng/sidebar';
|
|
42
|
+
import { SkeletonModule } from 'primeng/skeleton';
|
|
43
|
+
import { SpeedDialModule } from 'primeng/speeddial';
|
|
44
|
+
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
45
|
+
import { StepsModule } from 'primeng/steps'
|
|
46
|
+
import { TabViewModule } from 'primeng/tabview';
|
|
47
|
+
import { TableModule } from 'primeng/table';
|
|
48
|
+
import { ToastModule } from 'primeng/toast';
|
|
49
|
+
import { ToolbarModule } from 'primeng/toolbar';
|
|
50
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
51
|
+
import { OverlayModule } from 'primeng/overlay';
|
|
52
|
+
import { ChipModule } from 'primeng/chip';
|
|
53
|
+
import { TreeModule } from 'primeng/tree';
|
|
54
|
+
import { ProgressBarModule } from 'primeng/progressbar';
|
|
55
|
+
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
56
|
+
import { StyleClassModule } from 'primeng/styleclass';
|
|
57
|
+
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
58
|
+
import { TreeTableModule } from 'primeng/treetable';
|
|
59
|
+
@NgModule({
|
|
60
|
+
exports: [
|
|
61
|
+
AccordionModule,
|
|
62
|
+
AutoFocusModule,
|
|
63
|
+
BadgeModule,
|
|
64
|
+
ButtonModule,
|
|
65
|
+
CalendarModule,
|
|
66
|
+
CardModule,
|
|
67
|
+
CarouselModule,
|
|
68
|
+
ChartModule,
|
|
69
|
+
CheckboxModule,
|
|
70
|
+
ChipModule,
|
|
71
|
+
ConfirmDialogModule,
|
|
72
|
+
ContextMenuModule,
|
|
73
|
+
DataViewModule,
|
|
74
|
+
DialogModule,
|
|
75
|
+
DividerModule,
|
|
76
|
+
DropdownModule,
|
|
77
|
+
DynamicDialogModule,
|
|
78
|
+
EditorModule,
|
|
79
|
+
FieldsetModule,
|
|
80
|
+
FileUploadModule,
|
|
81
|
+
InputMaskModule,
|
|
82
|
+
InputNumberModule,
|
|
83
|
+
InputSwitchModule,
|
|
84
|
+
InputTextModule,
|
|
85
|
+
InputTextareaModule,
|
|
86
|
+
KnobModule,
|
|
87
|
+
MenuModule,
|
|
88
|
+
MessageModule,
|
|
89
|
+
MessagesModule,
|
|
90
|
+
MultiSelectModule,
|
|
91
|
+
OverlayModule,
|
|
92
|
+
OverlayPanelModule,
|
|
93
|
+
OverlayPanelModule,
|
|
94
|
+
PanelModule,
|
|
95
|
+
PanelMenuModule,
|
|
96
|
+
PasswordModule,
|
|
97
|
+
PickListModule,
|
|
98
|
+
ProgressBarModule,
|
|
99
|
+
RadioButtonModule,
|
|
100
|
+
RatingModule,
|
|
101
|
+
RippleModule,
|
|
102
|
+
SidebarModule,
|
|
103
|
+
SkeletonModule,
|
|
104
|
+
SpeedDialModule,
|
|
105
|
+
SplitButtonModule,
|
|
106
|
+
StepsModule,
|
|
107
|
+
TabViewModule,
|
|
108
|
+
TableModule,
|
|
109
|
+
ToastModule,
|
|
110
|
+
ToolbarModule,
|
|
111
|
+
TooltipModule,
|
|
112
|
+
TreeModule,
|
|
113
|
+
StyleClassModule,
|
|
114
|
+
BreadcrumbModule,
|
|
115
|
+
TreeTableModule
|
|
116
|
+
],
|
|
117
|
+
providers: [
|
|
118
|
+
ConfirmationService,
|
|
119
|
+
DialogService,
|
|
120
|
+
DynamicDialogRef,
|
|
121
|
+
DynamicDialogConfig,
|
|
122
|
+
MessageService,
|
|
123
|
+
]
|
|
124
|
+
})
|
|
125
|
+
export class PrimeNgModule { }
|
|
@@ -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
|
+
}
|