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,210 @@
|
|
|
1
|
+
.material-icons {
|
|
2
|
+
font-family: 'Material Icons';
|
|
3
|
+
font-weight: normal;
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-size: 1em;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: 1em;
|
|
8
|
+
height: 1em;
|
|
9
|
+
line-height: 1;
|
|
10
|
+
text-transform: none;
|
|
11
|
+
letter-spacing: normal;
|
|
12
|
+
word-wrap: normal;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
direction: ltr;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
-moz-osx-font-smoothing: grayscale;
|
|
18
|
+
font-feature-settings: 'liga';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
::ng-deep .p-button:focus {
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
-webkit-box-shadow: none;
|
|
24
|
+
-moz-box-shadow: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::ng-deep .p-overlaypanel .p-overlaypanel-content {
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
::ng-deep.hover-btn-cor-padrao.p-button:enabled:hover {
|
|
32
|
+
background: #0c3e66;
|
|
33
|
+
border-color: #002542;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.p-button.p-button-icon-only.p-button-rounded {
|
|
37
|
+
background: #0c3e66;
|
|
38
|
+
border-color: #002542;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::ng-deep.remove-focus:focus {
|
|
42
|
+
border: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
::ng-deep.p-sidebar .p-sidebar-content {
|
|
47
|
+
padding: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
::ng-deep.sidebar-header-sistema.p-sidebar .p-sidebar-header {
|
|
51
|
+
padding-top: 0.5rem;
|
|
52
|
+
padding-right: 0;
|
|
53
|
+
padding-bottom: 0;
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.btn-sistema {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
background-color: #0c3e66;
|
|
63
|
+
font-size: 20px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
::ng-deep .p-sidebar .p-sidebar-header {
|
|
67
|
+
padding: 0rem !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
::ng-deep body {
|
|
71
|
+
// display: initial;
|
|
72
|
+
margin: 0px !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
::ng-deep .p-breadcrumb ul li.p-breadcrumb-chevron {
|
|
76
|
+
position: relative;
|
|
77
|
+
top: 3px;
|
|
78
|
+
color: #0c3e66 !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// .page-content {
|
|
82
|
+
// background: linear-gradient(to bottom, #d4d3d3 20%, #ffffff 30%);
|
|
83
|
+
// }
|
|
84
|
+
|
|
85
|
+
.page-content {
|
|
86
|
+
background: linear-gradient(to bottom, #d4d3d3 16%, #ffffff 19%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
* {
|
|
90
|
+
margin: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
p .item-menu {
|
|
94
|
+
color: #0c3e66;
|
|
95
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
::ng-deep .p-breadcrumb ul li:last-child .p-menuitem-text {
|
|
100
|
+
color: #0c3e66 !important;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
font-size: 0.8rem !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
::ng-deep .p-breadcrumb ul li .p-menuitem-link .p-menuitem-text {
|
|
106
|
+
|
|
107
|
+
color: #0c3e66 !important;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
font-size: 0.8rem !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
span,
|
|
113
|
+
.breadcrumb-title {
|
|
114
|
+
font-size: 14px !important;
|
|
115
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
::ng-deep .card-container {
|
|
119
|
+
|
|
120
|
+
&::-webkit-scrollbar {
|
|
121
|
+
width: 6px;
|
|
122
|
+
|
|
123
|
+
&:hover {
|
|
124
|
+
background-color: rgba(222, 222, 222, 0.75);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&::-webkit-scrollbar-thumb {
|
|
129
|
+
border-radius: 4px;
|
|
130
|
+
background-color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:hover::-webkit-scrollbar-thumb {
|
|
134
|
+
border-left: 2px solid white;
|
|
135
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&::-webkit-scrollbar-track {
|
|
139
|
+
border-left: 2px solid white;
|
|
140
|
+
background-color: rgba(222, 222, 222, 0.75);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
overflow-x: hidden;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.title-style {
|
|
147
|
+
position: relative;
|
|
148
|
+
top: 10px;
|
|
149
|
+
margin-left: 20px;
|
|
150
|
+
font-size: 25px;
|
|
151
|
+
color: #002542;
|
|
152
|
+
border-bottom: 2px solid green;
|
|
153
|
+
font-weight: 600;
|
|
154
|
+
display: inline;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
::ng-deep p-sidebar .p-sidebar-content {
|
|
158
|
+
overflow-y: hidden;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
::ng-deep p-dialog .p-dialog-content {
|
|
162
|
+
overflow-y: unset;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.icon-menu {
|
|
166
|
+
color: #002542;
|
|
167
|
+
display: flex;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
align-items: center;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
::ng-deep .padding-style {
|
|
173
|
+
padding: 15px !important;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
::ng-deep .menu-option {
|
|
177
|
+
padding: 15px 5px 15px 5px !important;
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
::ng-deep .p-breadcrumb ul li .p-menuitem-link .p-menuitem-text {
|
|
182
|
+
color: #183462 !important;
|
|
183
|
+
opacity: 0.95;
|
|
184
|
+
font-weight: 500;
|
|
185
|
+
font-size: 0.8rem !important;
|
|
186
|
+
|
|
187
|
+
&:hover {
|
|
188
|
+
opacity: 0.7;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.pl-3 {
|
|
193
|
+
padding-left: 0rem !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
::ng-deep svg.p-icon {
|
|
197
|
+
width: 0.7rem;
|
|
198
|
+
height: 1rem;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.hover-color .text-base {
|
|
202
|
+
color: rgb(255, 255, 255) !important;
|
|
203
|
+
/* Escolha a cor desejada aqui */
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
.hover-color .icon-hover-color {
|
|
208
|
+
color: rgb(255, 255, 255) !important;
|
|
209
|
+
/* Escolha a cor desejada aqui */
|
|
210
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { MenuComponent } from './menu.component';
|
|
4
|
+
|
|
5
|
+
describe('MenuComponent', () => {
|
|
6
|
+
let component: MenuComponent;
|
|
7
|
+
let fixture: ComponentFixture<MenuComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ MenuComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(MenuComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
|
2
|
+
import { ChangeDetectorRef, Component, EventEmitter, HostListener, Input, OnInit, Output, ViewChild } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
import { Sidebar } from 'primeng/sidebar';
|
|
5
|
+
import { OverlayPanel } from 'primeng/overlaypanel';
|
|
6
|
+
|
|
7
|
+
import { MasterComboModel } from 'keevo-api-services-keevocenter';
|
|
8
|
+
import { menuCompletoModel } from '../api/models/menu/menucompleto.model';
|
|
9
|
+
import { menuModel } from '../api/models/menu/menu.model';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'kv-menu',
|
|
13
|
+
templateUrl: './menu.component.html',
|
|
14
|
+
styleUrls: ['./menu.component.scss'],
|
|
15
|
+
})
|
|
16
|
+
export class MenuComponent implements OnInit {
|
|
17
|
+
|
|
18
|
+
@Input() menuCompleto: menuCompletoModel[] = [];
|
|
19
|
+
@Input() licencas: MasterComboModel[] = []
|
|
20
|
+
@Input() licencaSelecionada!: MasterComboModel;
|
|
21
|
+
@Input() logoImage!: any;
|
|
22
|
+
@Input() nomeUsuario!: string;
|
|
23
|
+
@Input() breadCrumbs: boolean = false;
|
|
24
|
+
|
|
25
|
+
@Output() licencaChange: EventEmitter<any> = new EventEmitter();
|
|
26
|
+
@Output() gerenciarKeePassEvent: EventEmitter<any> = new EventEmitter();
|
|
27
|
+
@Output() sairEvent: EventEmitter<any> = new EventEmitter();
|
|
28
|
+
@Output() expandMenuEmit: EventEmitter<boolean> = new EventEmitter();
|
|
29
|
+
@Output() trocarLicencaEmit: EventEmitter<boolean> = new EventEmitter();
|
|
30
|
+
|
|
31
|
+
@ViewChild('sidebarRef') sidebarRef!: Sidebar;
|
|
32
|
+
@ViewChild('sistemasPanel') sistemasPanel!: OverlayPanel;
|
|
33
|
+
@ViewChild('meusDadosPanel') meusDadosPanel!: OverlayPanel;
|
|
34
|
+
|
|
35
|
+
licencasOptions: { id: number, descricao: string, cpfcnpj: string }[] = []
|
|
36
|
+
licencaSelected!: { id: number, descricao: string, cpfcnpj: string };
|
|
37
|
+
|
|
38
|
+
menusFiltrados: menuCompletoModel[] = [];
|
|
39
|
+
menus: menuModel[] = [];
|
|
40
|
+
|
|
41
|
+
breadCrumbItems: { label: string, routerLink: string }[] = [];
|
|
42
|
+
|
|
43
|
+
heigthCard!: number;
|
|
44
|
+
widthCard!: number;
|
|
45
|
+
expandMenu: boolean = true;
|
|
46
|
+
|
|
47
|
+
visibleDialogLicenca: boolean = false;
|
|
48
|
+
|
|
49
|
+
mouseOverIndex: any;
|
|
50
|
+
mouseOverFilhoIndex: any;
|
|
51
|
+
|
|
52
|
+
@HostListener('window:resize', ['$event'])
|
|
53
|
+
onWindowResize() {
|
|
54
|
+
this.heigthCard = Number(document.getElementById('page-content')?.offsetHeight);
|
|
55
|
+
this.widthCard = Number(window.innerWidth) - (this.expandMenu ? 333 : 93);
|
|
56
|
+
this.cdr.detectChanges();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
constructor(private cdr: ChangeDetectorRef, protected router: Router, private route: ActivatedRoute) { }
|
|
60
|
+
|
|
61
|
+
ngOnInit(): void {
|
|
62
|
+
this.configurarLicencas();
|
|
63
|
+
|
|
64
|
+
this.router.events.subscribe((event) => {
|
|
65
|
+
if (event instanceof NavigationEnd) {
|
|
66
|
+
// console.log('Evento de navegação:', event);
|
|
67
|
+
this.breadCrumbItems = this.getBreadcrumbs(event.url);
|
|
68
|
+
// console.log("breadCrumbItems ->", this.breadCrumbItems);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
this.heigthCard = Number(document.getElementById('page-content')?.offsetHeight);
|
|
73
|
+
this.widthCard = Number(window.innerWidth) - (this.expandMenu ? 333 : 93);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
configurarLicencas() {
|
|
77
|
+
setTimeout(() => this.setLicenca(), 1500)
|
|
78
|
+
|
|
79
|
+
this.licencas.forEach((x, i) => {
|
|
80
|
+
this.licencasOptions.push({
|
|
81
|
+
id: i,
|
|
82
|
+
descricao: x.nome,
|
|
83
|
+
cpfcnpj: x.cpfcnpj
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
var licenca = this.licencasOptions.find((x) => x.cpfcnpj == this.licencaSelecionada.cpfcnpj);
|
|
88
|
+
|
|
89
|
+
if (licenca != undefined)
|
|
90
|
+
this.licencaSelected = licenca;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private getBreadcrumbs(url: string = '', breadcrumbs: { label: string, routerLink: string }[] = []): { label: string, routerLink: string }[] {
|
|
94
|
+
|
|
95
|
+
if (!url || url === '/') {
|
|
96
|
+
return breadcrumbs.length > 0 ? breadcrumbs : [{ label: 'Home', routerLink: '/' }];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const segments = url.split('/').filter(segment => segment !== '');
|
|
100
|
+
|
|
101
|
+
let currentUrl = '';
|
|
102
|
+
for (const segment of segments) {
|
|
103
|
+
currentUrl += `/${segment}`;
|
|
104
|
+
breadcrumbs.push({ label: segment, routerLink: currentUrl });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (breadcrumbs.length > 0) {
|
|
108
|
+
breadcrumbs.forEach(item => {
|
|
109
|
+
let labelSegments = item.label.split('-');
|
|
110
|
+
labelSegments = labelSegments.map((segment, index) => {
|
|
111
|
+
return index === 0 ? segment.charAt(0).toUpperCase() + segment.slice(1).toLowerCase() : segment;
|
|
112
|
+
});
|
|
113
|
+
item.label = labelSegments.join(' ');
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return breadcrumbs;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
closeCallback(e: Event): void {
|
|
120
|
+
this.sidebarRef.close(e);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
MascaraNomeLicenca(nomeLicenca: any): string {
|
|
124
|
+
if (nomeLicenca) {
|
|
125
|
+
if (nomeLicenca.length > 24)
|
|
126
|
+
return nomeLicenca.substring(0, 24) + '...';
|
|
127
|
+
else return nomeLicenca;
|
|
128
|
+
} else return '';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
MascaraCnpj(cpfcnpj: string): string {
|
|
132
|
+
const cpfcnpjLimpo = cpfcnpj.replace(/\D/g, '');
|
|
133
|
+
|
|
134
|
+
return cpfcnpjLimpo.replace(
|
|
135
|
+
/^(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/,
|
|
136
|
+
'$1.$2.$3/$4-$5'
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
definirMenusPorSistema(idsistema: number) {
|
|
141
|
+
this.menus =
|
|
142
|
+
this.menuCompleto.find((x) => x.sistema.idsistema == idsistema)?.menus ||
|
|
143
|
+
[];
|
|
144
|
+
|
|
145
|
+
// console.log(this.menus, 'menus')
|
|
146
|
+
// console.log(this.menuCompleto, 'menuCompleto')
|
|
147
|
+
// console.log(this.menus[0].menupai, 'menupai')
|
|
148
|
+
|
|
149
|
+
if (this.menus[0].menupai) {
|
|
150
|
+
var filhos = this.retornarMenuFilhos(this.menus[0].idsistema, this.menus[0].idmenu);
|
|
151
|
+
if (filhos != undefined)
|
|
152
|
+
this.callRoute(filhos[0].link, true)
|
|
153
|
+
} else this.callRoute(this.menus[0].link, true)
|
|
154
|
+
|
|
155
|
+
this.sistemasPanel.hide();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
retornarMenuFilhos(idsistema: number, idmenu: number) {
|
|
159
|
+
return this.menuCompleto
|
|
160
|
+
.find((x) => x.sistema.idsistema == idsistema)
|
|
161
|
+
?.menus.filter((x) => x.idmenupai == idmenu);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
callRoute(e: any, expand?: boolean) {
|
|
165
|
+
if (!expand)
|
|
166
|
+
!this.expandMenu ? this.expandMenu = !this.expandMenu : ''
|
|
167
|
+
this.router.navigateByUrl(e)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
toggleMenu() {
|
|
171
|
+
this.expandMenu = !this.expandMenu;
|
|
172
|
+
this.expandMenuEvent()
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
trocarLicenca() {
|
|
176
|
+
this.trocarLicencaEmit.emit();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
setLicenca() {
|
|
180
|
+
var licenca = this.licencas.find((licenca) => licenca.idmaster == this.licencaSelected.id);
|
|
181
|
+
if (licenca) this.licencaSelecionada = licenca;
|
|
182
|
+
|
|
183
|
+
this.visibleDialogLicenca = false
|
|
184
|
+
|
|
185
|
+
this.licencaChange.emit(this.licencaSelecionada);
|
|
186
|
+
|
|
187
|
+
this.definirMenusPorSistema(this.menuCompleto[0]?.sistema.idsistema)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
gerenciarKeePass(event: any) {
|
|
191
|
+
this.sistemasPanel.hide();
|
|
192
|
+
this.gerenciarKeePassEvent.emit(event)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
sair(event: any) {
|
|
196
|
+
this.sistemasPanel.hide();
|
|
197
|
+
this.sairEvent.emit(event)
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
expandMenuEvent() {
|
|
201
|
+
this.expandMenuEmit.emit(this.expandMenu);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
ajustarHeigthCard(): number {
|
|
205
|
+
if (this.widthCard > 400) {
|
|
206
|
+
if (this.breadCrumbs) return 105
|
|
207
|
+
else return 85
|
|
208
|
+
} else return 83
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
verificarPaginaSelecionada(link: any): boolean {
|
|
212
|
+
return this.router.url.includes(link);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// retornarTituloBreadCrumbs(label: any): string {
|
|
216
|
+
// if (label)
|
|
217
|
+
// return this.breadCrumbItems[this.breadCrumbItems.length - 1]?.label
|
|
218
|
+
// else return '';
|
|
219
|
+
// }
|
|
220
|
+
|
|
221
|
+
retornarTituloBreadCrumbs(str: string) {
|
|
222
|
+
|
|
223
|
+
if (str.includes('-')) {
|
|
224
|
+
str = str.replace('-', ' ');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
var primeiraLetra = str.charAt(0).toUpperCase() + str.slice(1);
|
|
228
|
+
|
|
229
|
+
str.slice(1);
|
|
230
|
+
|
|
231
|
+
return primeiraLetra;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
onMouseEnter(index: number) {
|
|
235
|
+
this.mouseOverIndex = index;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
onMouseFilhoEnter(index: number) {
|
|
239
|
+
this.mouseOverFilhoIndex = index;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
onMouseLeave() {
|
|
243
|
+
this.mouseOverIndex = null;
|
|
244
|
+
this.mouseOverFilhoIndex = null;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<div #chartContainer id="chartContainer" [ngClass]="{'backGround': true}">
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<div class="div-botoes w-full flex gap-1" >
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
<span *ngIf="!mostraMenu" class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
8
|
+
(click)="mostraMenu = !mostraMenu" pTooltip="Expandir menu">menu</span>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<span *ngIf="mostraMenu" class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
13
|
+
(click)="mostraMenu = !mostraMenu" pTooltip="Recolher menu">menu_open</span>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="mostraMenu">
|
|
16
|
+
<span class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
17
|
+
(click)="chart.zoomIn()" pTooltip="Zoom +">zoom_in</span>
|
|
18
|
+
<span class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
19
|
+
(click)="chart.zoomOut()" pTooltip="Zoom -">zoom_out</span>
|
|
20
|
+
|
|
21
|
+
<span class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
22
|
+
(click)="chart.collapseAll()" pTooltip="Expandir">expand_less</span>
|
|
23
|
+
|
|
24
|
+
<span class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
25
|
+
(click)="chart.expandAll()" pTooltip="Recolher">expand_more</span>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<!-- <span class="surface-300 shadow-4 p-1 m-2 border-circle material-icons cursor-pointer"
|
|
29
|
+
(click)="compactSwap()" pTooltip="Compactar">cached</span> -->
|
|
30
|
+
|
|
31
|
+
<span class="material-icons surface-300 shadow-4 p-1 m-2 border-circle cursor-pointer"
|
|
32
|
+
(click)="chart.fit().render()" pTooltip="Centralizar">
|
|
33
|
+
filter_center_focus
|
|
34
|
+
</span>
|
|
35
|
+
|
|
36
|
+
<span class="material-icons surface-300 shadow-4 p-1 m-2 border-circle cursor-pointer"
|
|
37
|
+
(click)="chart.fullscreen('#chartContainer')" pTooltip="Tela cheia" >
|
|
38
|
+
fullscreen
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<link
|
|
51
|
+
rel="stylesheet"
|
|
52
|
+
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<link
|
|
56
|
+
rel="stylesheet"
|
|
57
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"
|
|
58
|
+
/>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#chartContainer{
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
:host ::ng-deep #chartContainer svg.svg-chart-container {
|
|
7
|
+
height: 100% !important;
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 100%;
|
|
10
|
+
top: -56px;
|
|
11
|
+
z-index: 0;
|
|
12
|
+
background-color: #fff;
|
|
13
|
+
}
|
|
14
|
+
.div-botoes{
|
|
15
|
+
z-index: 1;
|
|
16
|
+
width: 100%;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
ElementRef,
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Input,
|
|
6
|
+
OnInit,
|
|
7
|
+
Output,
|
|
8
|
+
Renderer2,
|
|
9
|
+
RendererFactory2,
|
|
10
|
+
TemplateRef,
|
|
11
|
+
ViewChild,
|
|
12
|
+
ViewContainerRef,
|
|
13
|
+
} from '@angular/core';
|
|
14
|
+
import { OrgChart } from 'd3-org-chart';
|
|
15
|
+
import * as d3 from 'd3';
|
|
16
|
+
import OrgChartItem from '../api/components/chart/orchart.item';
|
|
17
|
+
import OrgChartConfig from '../api/components/chart/orchart.config';
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'kv-orgchart',
|
|
21
|
+
templateUrl: './orgchart.component.html',
|
|
22
|
+
styleUrls: ['./orgchart.component.scss',],
|
|
23
|
+
})
|
|
24
|
+
export class OrgchartComponent implements OnInit {
|
|
25
|
+
@ViewChild('chartContainer') chartContainer!: ElementRef;
|
|
26
|
+
chart!: any;
|
|
27
|
+
|
|
28
|
+
@Input() dataSource!: OrgChartItem[];
|
|
29
|
+
@Input() config!: OrgChartConfig;
|
|
30
|
+
@Input() template!: string;
|
|
31
|
+
@Input() nodeTemplate!: TemplateRef<any>;
|
|
32
|
+
|
|
33
|
+
@Input() generateTemplate: Function = (data: any, node: any, nodes: any[], index: number):string => '';
|
|
34
|
+
@Input() templateFuncion: boolean = false;
|
|
35
|
+
|
|
36
|
+
@Input() corDeFundo: string = 'red';
|
|
37
|
+
|
|
38
|
+
compact: boolean = true;
|
|
39
|
+
mostraMenu: boolean = false;
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
constructor(private renderer: Renderer2) {}
|
|
43
|
+
|
|
44
|
+
ngOnInit() {
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
ngAfterViewInit() {
|
|
49
|
+
if (!this.chart) {
|
|
50
|
+
this.chart = new OrgChart();
|
|
51
|
+
}
|
|
52
|
+
this.updateChart();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ngOnChanges() {
|
|
56
|
+
this.updateChart();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
updateChart() {
|
|
60
|
+
if (!this.dataSource) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!this.chart) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
const chartContainer = this.chartContainer.nativeElement;
|
|
70
|
+
this.chart
|
|
71
|
+
.container(chartContainer)
|
|
72
|
+
.data(this.dataSource)
|
|
73
|
+
.nodeWidth(() => this.config.cardWidht)
|
|
74
|
+
.nodeHeight(() => this.config.cardHeight)
|
|
75
|
+
.nodeUpdate(function (d:any) {
|
|
76
|
+
})
|
|
77
|
+
.linkUpdate((node:any, index:any, nodes:any)=> {
|
|
78
|
+
d3.select(nodes[index])
|
|
79
|
+
.attr('stroke-width', this.config.conectionWidth || '2px')
|
|
80
|
+
.style('stroke', this.config.connectionColor || '#d6d6d6').style('backgroundColor', 'red')
|
|
81
|
+
})
|
|
82
|
+
.nodeContent((d: any) => {
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
if(!this.templateFuncion){
|
|
86
|
+
if(d.data.template){
|
|
87
|
+
const jsTemplate = this.stringToTemplateLiteral(d.data.template);
|
|
88
|
+
var templateConverter = new Function('data', 'return' + jsTemplate);
|
|
89
|
+
var x = templateConverter(d.data.data);
|
|
90
|
+
}else{
|
|
91
|
+
const jsTemplate = this.stringToTemplateLiteral(this.config.templateItem);
|
|
92
|
+
var templateConverter = new Function('data', 'return' + jsTemplate);
|
|
93
|
+
var x = templateConverter(d.data.data);
|
|
94
|
+
}
|
|
95
|
+
}else{
|
|
96
|
+
var x = this.generateTemplate(d)
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
return x;
|
|
100
|
+
})
|
|
101
|
+
.defaultFont('Roboto')
|
|
102
|
+
.render()
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
stringToTemplateLiteral(string: string): string {
|
|
107
|
+
const convertedTemplate = string.replace(
|
|
108
|
+
/\{\{([^}]*)\}\}/g,
|
|
109
|
+
'${$1}'
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
return '`' + convertedTemplate + '`';
|
|
113
|
+
}
|
|
114
|
+
compactSwap() {
|
|
115
|
+
this.compact = !this.compact;
|
|
116
|
+
this.chart.compact(this.compact).render();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { OrgchartComponent } from './orgchart.component';
|
|
4
|
+
import { PrimeNgModule } from '../../public-api';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
imports: [
|
|
8
|
+
CommonModule,
|
|
9
|
+
PrimeNgModule
|
|
10
|
+
],
|
|
11
|
+
declarations: [OrgchartComponent],
|
|
12
|
+
exports: [OrgchartComponent]
|
|
13
|
+
})
|
|
14
|
+
export class OrgchartModule { }
|