keevo-components 1.8.189 → 1.8.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/ng-package.json +7 -0
- package/package.json +32 -45
- 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 +29 -0
- package/src/lib/api/base-components/base-component-chart.ts +105 -0
- package/src/lib/api/base-components/base-component-crud-form.ts +361 -0
- package/src/lib/api/base-components/base-component-crud-list.ts +122 -0
- package/src/lib/api/base-components/base-component-crud.ts +70 -0
- package/src/lib/api/base-components/base-component-dropdown-external.ts +29 -0
- package/src/lib/api/base-components/base-component-dropdown-new.ts +112 -0
- package/src/lib/api/base-components/base-component-dropdown.ts +192 -0
- package/src/lib/api/base-components/base-component-input.ts +119 -0
- package/src/lib/api/base-components/base-component-multi-select.ts +136 -0
- package/src/lib/api/base-components/base-component-table.ts +326 -0
- package/src/lib/api/base-components/base-component.ts +47 -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/stepper/kv-stepperpanel.ts +10 -0
- package/src/lib/api/components/table/action-item.ts +11 -0
- package/src/lib/api/components/table/kv-menuitem.ts +198 -0
- package/src/lib/api/components/table/table-dropdown-control.ts +6 -0
- package/src/lib/api/components/table/table.config.column.ts +31 -0
- package/src/lib/api/components/table/table.config.ts +35 -0
- package/src/lib/api/components/table/table.paginate.ts +6 -0
- package/src/lib/api/components/table/tabledit.config.ts +10 -0
- package/src/lib/api/components/table/tableedit.config.column.ts +12 -0
- package/src/lib/api/components/tree-table/tree-table.config.ts +30 -0
- package/src/lib/api/directives/directives.module.ts +19 -0
- package/src/lib/api/directives/drag/drag.directive.ts +40 -0
- package/src/lib/api/directives/stepper/dynamicinput.directive.ts +23 -0
- package/src/lib/api/directives/template/template.directive.ts +15 -0
- package/src/lib/api/helpers/component-providers.ts +16 -0
- package/src/lib/api/helpers/keevo-validators.ts +97 -0
- package/src/lib/api/helpers/severity-color.ts +77 -0
- package/src/lib/api/helpers/translate-primeng.ts +25 -0
- package/src/lib/api/modules/primeng.module.ts +138 -0
- package/src/lib/api/pipes/capitalize.pipe.ts +23 -0
- package/src/lib/api/pipes/cpfcnpj.pipe.ts +21 -0
- package/src/lib/api/pipes/mask.pipe.ts +24 -0
- package/src/lib/api/pipes/pipes.module.ts +26 -0
- package/src/lib/api/pipes/telefone.pipe.ts +38 -0
- package/src/lib/api/services/base.api.service.ts +115 -0
- package/src/lib/api/services/breadcrumbs.service.ts +58 -0
- package/src/lib/api/services/component.service.ts +32 -0
- package/src/lib/api/services/docs.service.ts +129 -0
- package/src/lib/api/services/form.service.ts +136 -0
- package/src/lib/api/services/imagens.service.ts +28 -0
- package/src/lib/api/services/notification.service.ts +85 -0
- package/src/lib/api/services/object.service.ts +33 -0
- package/{lib/api/types/severity.d.ts → src/lib/api/types/severity.ts} +3 -2
- package/src/lib/api/types/stimulsoft.reports.d.ts +67463 -0
- package/src/lib/components/keevo-components-styles.scss +11 -0
- package/src/lib/components/keevo-components.module.ts +88 -0
- package/src/lib/components/kv-avatar/kv-avatar.component.html +12 -0
- package/src/lib/components/kv-avatar/kv-avatar.component.scss +45 -0
- package/src/lib/components/kv-avatar/kv-avatar.component.spec.ts +23 -0
- package/src/lib/components/kv-avatar/kv-avatar.component.ts +72 -0
- package/src/lib/components/kv-avatar/kv-avatar.module.ts +21 -0
- package/src/lib/components/kv-button/kv-button.component.css +0 -0
- package/src/lib/components/kv-button/kv-button.component.html +8 -0
- package/src/lib/components/kv-button/kv-button.component.scss +102 -0
- package/src/lib/components/kv-button/kv-button.component.spec.ts +23 -0
- package/src/lib/components/kv-button/kv-button.component.ts +22 -0
- package/src/lib/components/kv-button/kv-button.module.ts +20 -0
- package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.html +14 -0
- package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.scss +3 -0
- package/src/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.ts +25 -0
- package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.html +12 -0
- package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.scss +31 -0
- package/src/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.ts +36 -0
- package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.html +12 -0
- package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.scss +14 -0
- package/src/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.ts +14 -0
- package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.html +11 -0
- package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.scss +13 -0
- package/src/lib/components/kv-buttons/kv-button-success/kv-button-success.component.ts +14 -0
- package/src/lib/components/kv-buttons/kv-button.module.ts +26 -0
- package/src/lib/components/kv-carousel/kv-carousel.component.html +8 -0
- package/src/lib/components/kv-carousel/kv-carousel.component.scss +32 -0
- package/src/lib/components/kv-carousel/kv-carousel.component.spec.ts +23 -0
- package/src/lib/components/kv-carousel/kv-carousel.component.ts +31 -0
- package/src/lib/components/kv-carousel/kv-carousel.module.ts +19 -0
- package/src/lib/components/kv-chart/kv-chart.component.html +38 -0
- package/src/lib/components/kv-chart/kv-chart.component.scss +0 -0
- package/src/lib/components/kv-chart/kv-chart.component.spec.ts +28 -0
- package/src/lib/components/kv-chart/kv-chart.component.ts +153 -0
- package/src/lib/components/kv-chart/kv-chart.module.ts +21 -0
- package/src/lib/components/kv-error/kv-error.component.html +3 -0
- package/src/lib/components/kv-error/kv-error.component.scss +5 -0
- package/src/lib/components/kv-error/kv-error.component.ts +27 -0
- package/src/lib/components/kv-error/kv-error.module.ts +26 -0
- package/src/lib/components/kv-file-viewer/kv-file-viewer.component.html +16 -0
- package/src/lib/components/kv-file-viewer/kv-file-viewer.component.scss +18 -0
- package/src/lib/components/kv-file-viewer/kv-file-viewer.component.ts +33 -0
- package/src/lib/components/kv-file-viewer/kv-file-viewer.module.ts +14 -0
- package/src/lib/components/kv-filter-card/kv-filter-card.component.html +13 -0
- package/src/lib/components/kv-filter-card/kv-filter-card.component.scss +74 -0
- package/src/lib/components/kv-filter-card/kv-filter-card.component.spec.ts +23 -0
- package/src/lib/components/kv-filter-card/kv-filter-card.component.ts +17 -0
- package/src/lib/components/kv-filter-card/kv-filter-card.module.ts +23 -0
- package/src/lib/components/kv-g-icon/kv-g-icon.component.html +1 -0
- package/src/lib/components/kv-g-icon/kv-g-icon.component.scss +0 -0
- package/src/lib/components/kv-g-icon/kv-g-icon.component.spec.ts +23 -0
- package/src/lib/components/kv-g-icon/kv-g-icon.component.ts +10 -0
- package/src/lib/components/kv-g-icon/kv-g-icon.module.ts +11 -0
- package/src/lib/components/kv-image-upload/kv-image-upload.component.html +62 -0
- package/src/lib/components/kv-image-upload/kv-image-upload.component.scss +0 -0
- package/src/lib/components/kv-image-upload/kv-image-upload.component.ts +82 -0
- package/src/lib/components/kv-image-upload/kv-image-upload.module.ts +10 -0
- package/src/lib/components/kv-inputs/kv-check/kv-check.component.html +12 -0
- package/src/lib/components/kv-inputs/kv-check/kv-check.component.scss +13 -0
- package/src/lib/components/kv-inputs/kv-check/kv-check.component.ts +33 -0
- package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.html +89 -0
- package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.scss +21 -0
- package/src/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.ts +38 -0
- package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.html +101 -0
- package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.scss +21 -0
- package/src/lib/components/kv-inputs/kv-editor/kv-editor.component.ts +113 -0
- package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.html +31 -0
- package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.scss +19 -0
- package/src/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.ts +84 -0
- package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.html +22 -0
- package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.ts +35 -0
- package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.html +23 -0
- package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-number/kv-input-number.component.ts +61 -0
- package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.html +23 -0
- package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-password/kv-input-password.component.ts +26 -0
- package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.html +22 -0
- package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.scss +18 -0
- package/src/lib/components/kv-inputs/kv-input-text/kv-input-text.component.ts +27 -0
- package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.html +35 -0
- package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.spec.ts +23 -0
- package/src/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.ts +43 -0
- package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.html +23 -0
- package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.ts +40 -0
- package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.html +24 -0
- package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.scss +0 -0
- package/src/lib/components/kv-inputs/kv-input-time/kv-input-time.component.ts +27 -0
- package/src/lib/components/kv-inputs/kv-inputs.module.ts +78 -0
- package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.html +45 -0
- package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.scss +13 -0
- package/src/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.ts +44 -0
- package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.html +19 -0
- package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.scss +15 -0
- package/src/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.ts +60 -0
- package/src/lib/components/kv-inputs/kv-select-button/kv-select-button.component.html +26 -0
- package/src/lib/components/kv-inputs/kv-select-button/kv-select-button.component.scss +5 -0
- package/src/lib/components/kv-inputs/kv-select-button/kv-select-button.component.spec.ts +21 -0
- package/src/lib/components/kv-inputs/kv-select-button/kv-select-button.component.ts +30 -0
- package/src/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.html +17 -0
- package/src/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.scss +26 -0
- package/src/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.spec.ts +23 -0
- package/src/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.ts +29 -0
- package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.html +20 -0
- package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.scss +5 -0
- package/src/lib/components/kv-inputs/kv-switch/kv-switch.component.ts +54 -0
- package/src/lib/components/kv-label/kv-label.component.html +6 -0
- package/src/lib/components/kv-label/kv-label.component.scss +9 -0
- package/src/lib/components/kv-label/kv-label.component.spec.ts +23 -0
- package/src/lib/components/kv-label/kv-label.component.ts +14 -0
- package/src/lib/components/kv-label/kv-label.module.ts +17 -0
- package/src/lib/components/kv-loader/kv-loader.component.html +1 -0
- package/src/lib/components/kv-loader/kv-loader.component.ts +15 -0
- package/src/lib/components/kv-loader/kv-loader.module.ts +17 -0
- package/src/lib/components/kv-loader/kv-loader.service.ts +31 -0
- package/src/lib/components/kv-login/kv-login.component.html +108 -0
- package/src/lib/components/kv-login/kv-login.component.scss +76 -0
- package/src/lib/components/kv-login/kv-login.component.spec.ts +23 -0
- package/src/lib/components/kv-login/kv-login.component.ts +81 -0
- package/src/lib/components/kv-login/kv-login.module.ts +33 -0
- package/src/lib/components/kv-menu/kv-menu.component.html +292 -0
- package/src/lib/components/kv-menu/kv-menu.component.scss +214 -0
- package/src/lib/components/kv-menu/kv-menu.component.spec.ts +23 -0
- package/src/lib/components/kv-menu/kv-menu.component.ts +195 -0
- package/src/lib/components/kv-menu/kv-menu.module.ts +33 -0
- package/src/lib/components/kv-modal/kv-modal.component.html +20 -0
- package/src/lib/components/kv-modal/kv-modal.component.scss +84 -0
- package/src/lib/components/kv-modal/kv-modal.component.spec.ts +21 -0
- package/src/lib/components/kv-modal/kv-modal.component.ts +114 -0
- package/src/lib/components/kv-modal/kv-modal.module.ts +21 -0
- package/src/lib/components/kv-orgchart/kv-orgchart.component.html +58 -0
- package/src/lib/components/kv-orgchart/kv-orgchart.component.scss +21 -0
- package/src/lib/components/kv-orgchart/kv-orgchart.component.ts +110 -0
- package/src/lib/components/kv-orgchart/kv-orgchart.module.ts +14 -0
- package/src/lib/components/kv-page-form/kv-page-form.component.html +99 -0
- package/src/lib/components/kv-page-form/kv-page-form.component.scss +76 -0
- package/src/lib/components/kv-page-form/kv-page-form.component.spec.ts +28 -0
- package/src/lib/components/kv-page-form/kv-page-form.component.ts +163 -0
- package/src/lib/components/kv-page-form/kv-page-form.module.ts +31 -0
- package/src/lib/components/kv-page-stepper/kv-page-stepper.component.html +251 -0
- package/src/lib/components/kv-page-stepper/kv-page-stepper.component.scss +129 -0
- package/src/lib/components/kv-page-stepper/kv-page-stepper.component.spec.ts +23 -0
- package/src/lib/components/kv-page-stepper/kv-page-stepper.component.ts +223 -0
- package/src/lib/components/kv-page-stepper/kv-page-stepper.module.ts +34 -0
- package/src/lib/components/kv-pick-list/kv-pick-list.component.html +23 -0
- package/src/lib/components/kv-pick-list/kv-pick-list.component.scss +5 -0
- package/src/lib/components/kv-pick-list/kv-pick-list.component.spec.ts +26 -0
- package/src/lib/components/kv-pick-list/kv-pick-list.component.ts +60 -0
- package/src/lib/components/kv-pick-list/kv-pick-list.module.ts +21 -0
- package/src/lib/components/kv-progress-bar/kv-progress-bar.component.html +38 -0
- package/src/lib/components/kv-progress-bar/kv-progress-bar.component.scss +110 -0
- package/src/lib/components/kv-progress-bar/kv-progress-bar.component.spec.ts +21 -0
- package/src/lib/components/kv-progress-bar/kv-progress-bar.component.ts +75 -0
- package/src/lib/components/kv-progress-bar/kv-progress-bar.module.ts +19 -0
- package/src/lib/components/kv-report/kv-report.component.html +12 -0
- package/src/lib/components/kv-report/kv-report.component.scss +21 -0
- package/src/lib/components/kv-report/kv-report.component.spec.ts +28 -0
- package/src/lib/components/kv-report/kv-report.component.ts +50 -0
- package/src/lib/components/kv-report/kv-report.module.ts +18 -0
- package/src/lib/components/kv-stepper/kv-stepper.component.html +66 -0
- package/src/lib/components/kv-stepper/kv-stepper.component.scss +41 -0
- package/src/lib/components/kv-stepper/kv-stepper.component.spec.ts +23 -0
- package/src/lib/components/kv-stepper/kv-stepper.component.ts +48 -0
- package/src/lib/components/kv-stepper/kv-stepper.module.ts +20 -0
- package/src/lib/components/kv-table/kv-table.component.html +504 -0
- package/src/lib/components/kv-table/kv-table.component.scss +311 -0
- package/src/lib/components/kv-table/kv-table.component.spec.ts +28 -0
- package/src/lib/components/kv-table/kv-table.component.ts +589 -0
- package/src/lib/components/kv-table/kv-table.module.ts +23 -0
- package/src/lib/components/kv-table-edit/kv-table-edit.component.html +823 -0
- package/src/lib/components/kv-table-edit/kv-table-edit.component.scss +711 -0
- package/src/lib/components/kv-table-edit/kv-table-edit.component.ts +352 -0
- package/src/lib/components/kv-table-edit/kv-table-edit.module.ts +28 -0
- package/src/lib/components/kv-table-expandable/kv-table-expandable.component.html +440 -0
- package/src/lib/components/kv-table-expandable/kv-table-expandable.component.scss +356 -0
- package/src/lib/components/kv-table-expandable/kv-table-expandable.component.ts +517 -0
- package/src/lib/components/kv-table-expandable/kv-table-expandable.module.ts +22 -0
- package/src/lib/components/kv-tree-table/kv-tree-table.component.html +610 -0
- package/src/lib/components/kv-tree-table/kv-tree-table.component.scss +77 -0
- package/src/lib/components/kv-tree-table/kv-tree-table.component.spec.ts +21 -0
- package/src/lib/components/kv-tree-table/kv-tree-table.component.ts +305 -0
- package/src/lib/components/kv-tree-table/kv-tree-table.module.ts +18 -0
- package/src/lib/components/kv-tree-view/kv-tree-view.component.html +9 -0
- package/src/lib/components/kv-tree-view/kv-tree-view.component.scss +0 -0
- package/src/lib/components/kv-tree-view/kv-tree-view.component.spec.ts +23 -0
- package/src/lib/components/kv-tree-view/kv-tree-view.component.ts +31 -0
- package/src/lib/components/kv-tree-view/kv-tree-view.module.ts +19 -0
- package/src/lib/components/kv-workspace/kv-workspace.component.html +53 -0
- package/src/lib/components/kv-workspace/kv-workspace.component.scss +117 -0
- package/src/lib/components/kv-workspace/kv-workspace.component.ts +201 -0
- package/src/lib/components/kv-workspace/kv-workspace.module.ts +35 -0
- package/{public-api.d.ts → src/public-api.ts} +254 -214
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/keevo-components.mjs +0 -5
- package/esm2022/lib/api/base-components/base-component-button.mjs +0 -39
- package/esm2022/lib/api/base-components/base-component-chart.mjs +0 -92
- package/esm2022/lib/api/base-components/base-component-crud-form.mjs +0 -298
- package/esm2022/lib/api/base-components/base-component-crud-list.mjs +0 -79
- package/esm2022/lib/api/base-components/base-component-crud.mjs +0 -65
- package/esm2022/lib/api/base-components/base-component-dropdown-external.mjs +0 -31
- package/esm2022/lib/api/base-components/base-component-dropdown.mjs +0 -187
- package/esm2022/lib/api/base-components/base-component-input.mjs +0 -98
- package/esm2022/lib/api/base-components/base-component-multi-select.mjs +0 -130
- package/esm2022/lib/api/base-components/base-component-table.mjs +0 -320
- package/esm2022/lib/api/base-components/base-component.mjs +0 -51
- package/esm2022/lib/api/components/chart/chart.config.mjs +0 -2
- package/esm2022/lib/api/components/chart/chart.model.mjs +0 -2
- package/esm2022/lib/api/components/chart/orchart.config.mjs +0 -2
- package/esm2022/lib/api/components/chart/orchart.item.mjs +0 -2
- package/esm2022/lib/api/components/dropdown/filtro.combo.mjs +0 -2
- package/esm2022/lib/api/components/stepper/kv-stepperpanel.mjs +0 -2
- package/esm2022/lib/api/components/table/action-item.mjs +0 -2
- package/esm2022/lib/api/components/table/kv-menuitem.mjs +0 -46
- package/esm2022/lib/api/components/table/table-dropdown-control.mjs +0 -2
- package/esm2022/lib/api/components/table/table.config.column.mjs +0 -2
- package/esm2022/lib/api/components/table/table.config.mjs +0 -2
- package/esm2022/lib/api/components/table/table.paginate.mjs +0 -9
- package/esm2022/lib/api/components/table/tabledit.config.mjs +0 -2
- package/esm2022/lib/api/components/table/tableedit.config.column.mjs +0 -2
- package/esm2022/lib/api/components/tree-table/tree-table.config.mjs +0 -3
- package/esm2022/lib/api/directives/directives.module.mjs +0 -30
- package/esm2022/lib/api/directives/drag/drag.directive.mjs +0 -52
- package/esm2022/lib/api/directives/stepper/dynamicinput.directive.mjs +0 -31
- package/esm2022/lib/api/directives/template/template.directive.mjs +0 -24
- package/esm2022/lib/api/helpers/component-providers.mjs +0 -16
- package/esm2022/lib/api/helpers/keevo-validators.mjs +0 -82
- package/esm2022/lib/api/helpers/translate-primeng.mjs +0 -23
- package/esm2022/lib/api/modules/primeng.module.mjs +0 -271
- package/esm2022/lib/api/pipes/capitalize.pipe.mjs +0 -28
- package/esm2022/lib/api/pipes/cpfcnpj.pipe.mjs +0 -25
- package/esm2022/lib/api/pipes/mask.pipe.mjs +0 -29
- package/esm2022/lib/api/pipes/pipes.module.mjs +0 -39
- package/esm2022/lib/api/pipes/telefone.pipe.mjs +0 -45
- package/esm2022/lib/api/services/base.api.service.mjs +0 -74
- package/esm2022/lib/api/services/breadcrumbs.service.mjs +0 -57
- package/esm2022/lib/api/services/component.service.mjs +0 -27
- package/esm2022/lib/api/services/docs.service.mjs +0 -129
- package/esm2022/lib/api/services/form.service.mjs +0 -92
- package/esm2022/lib/api/services/imagens.service.mjs +0 -28
- package/esm2022/lib/api/services/notification.service.mjs +0 -67
- package/esm2022/lib/api/services/object.service.mjs +0 -39
- package/esm2022/lib/api/types/severity.mjs +0 -2
- package/esm2022/lib/components/keevo-components.module.mjs +0 -179
- package/esm2022/lib/components/kv-avatar/kv-avatar.component.mjs +0 -78
- package/esm2022/lib/components/kv-avatar/kv-avatar.module.mjs +0 -32
- package/esm2022/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.mjs +0 -25
- package/esm2022/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.mjs +0 -34
- package/esm2022/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.mjs +0 -17
- package/esm2022/lib/components/kv-buttons/kv-button-success/kv-button-success.component.mjs +0 -17
- package/esm2022/lib/components/kv-buttons/kv-button.module.mjs +0 -39
- package/esm2022/lib/components/kv-carousel/kv-carousel.component.mjs +0 -32
- package/esm2022/lib/components/kv-carousel/kv-carousel.module.mjs +0 -28
- package/esm2022/lib/components/kv-chart/kv-chart.component.mjs +0 -145
- package/esm2022/lib/components/kv-chart/kv-chart.module.mjs +0 -32
- package/esm2022/lib/components/kv-error/kv-error.component.mjs +0 -26
- package/esm2022/lib/components/kv-error/kv-error.module.mjs +0 -35
- package/esm2022/lib/components/kv-file-viewer/kv-file-viewer.component.mjs +0 -34
- package/esm2022/lib/components/kv-file-viewer/kv-file-viewer.module.mjs +0 -20
- package/esm2022/lib/components/kv-filter-card/kv-filter-card.component.mjs +0 -26
- package/esm2022/lib/components/kv-filter-card/kv-filter-card.module.mjs +0 -34
- package/esm2022/lib/components/kv-g-icon/kv-g-icon.component.mjs +0 -11
- package/esm2022/lib/components/kv-g-icon/kv-g-icon.module.mjs +0 -19
- package/esm2022/lib/components/kv-image-upload/kv-image-upload.component.mjs +0 -83
- package/esm2022/lib/components/kv-image-upload/kv-image-upload.module.mjs +0 -18
- package/esm2022/lib/components/kv-inputs/kv-check/kv-check.component.mjs +0 -29
- package/esm2022/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.mjs +0 -38
- package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.component.mjs +0 -92
- package/esm2022/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.mjs +0 -89
- package/esm2022/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.mjs +0 -29
- package/esm2022/lib/components/kv-inputs/kv-input-number/kv-input-number.component.mjs +0 -59
- package/esm2022/lib/components/kv-inputs/kv-input-password/kv-input-password.component.mjs +0 -33
- package/esm2022/lib/components/kv-inputs/kv-input-text/kv-input-text.component.mjs +0 -25
- package/esm2022/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.mjs +0 -42
- package/esm2022/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.mjs +0 -43
- package/esm2022/lib/components/kv-inputs/kv-input-time/kv-input-time.component.mjs +0 -24
- package/esm2022/lib/components/kv-inputs/kv-inputs.module.mjs +0 -122
- package/esm2022/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.mjs +0 -44
- package/esm2022/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.mjs +0 -54
- package/esm2022/lib/components/kv-inputs/kv-select-button/kv-select-button.component.mjs +0 -46
- package/esm2022/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.mjs +0 -31
- package/esm2022/lib/components/kv-inputs/kv-switch/kv-switch.component.mjs +0 -41
- package/esm2022/lib/components/kv-label/kv-label.component.mjs +0 -15
- package/esm2022/lib/components/kv-label/kv-label.module.mjs +0 -24
- package/esm2022/lib/components/kv-loader/kv-loader.component.mjs +0 -17
- package/esm2022/lib/components/kv-loader/kv-loader.module.mjs +0 -28
- package/esm2022/lib/components/kv-loader/kv-loader.service.mjs +0 -29
- package/esm2022/lib/components/kv-login/kv-login.component.mjs +0 -52
- package/esm2022/lib/components/kv-login/kv-login.module.mjs +0 -47
- package/esm2022/lib/components/kv-menu/kv-menu.component.mjs +0 -198
- package/esm2022/lib/components/kv-menu/kv-menu.module.mjs +0 -47
- package/esm2022/lib/components/kv-modal/kv-modal.component.mjs +0 -98
- package/esm2022/lib/components/kv-modal/kv-modal.module.mjs +0 -31
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.component.mjs +0 -100
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.module.mjs +0 -24
- package/esm2022/lib/components/kv-page-form/kv-page-form.component.mjs +0 -191
- package/esm2022/lib/components/kv-page-form/kv-page-form.module.mjs +0 -38
- package/esm2022/lib/components/kv-page-stepper/kv-page-stepper.component.mjs +0 -207
- package/esm2022/lib/components/kv-page-stepper/kv-page-stepper.module.mjs +0 -47
- package/esm2022/lib/components/kv-pick-list/kv-pick-list.component.mjs +0 -78
- package/esm2022/lib/components/kv-pick-list/kv-pick-list.module.mjs +0 -32
- package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.component.mjs +0 -58
- package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.module.mjs +0 -28
- package/esm2022/lib/components/kv-report/kv-report.component.mjs +0 -53
- package/esm2022/lib/components/kv-report/kv-report.module.mjs +0 -24
- package/esm2022/lib/components/kv-stepper/kv-stepper.component.mjs +0 -55
- package/esm2022/lib/components/kv-stepper/kv-stepper.module.mjs +0 -32
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +0 -496
- package/esm2022/lib/components/kv-table/kv-table.module.mjs +0 -36
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +0 -288
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.module.mjs +0 -41
- package/esm2022/lib/components/kv-table-expandable/kv-table-expandable.component.mjs +0 -483
- package/esm2022/lib/components/kv-table-expandable/kv-table-expandable.module.mjs +0 -36
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +0 -296
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.module.mjs +0 -28
- package/esm2022/lib/components/kv-tree-view/kv-tree-view.component.mjs +0 -30
- package/esm2022/lib/components/kv-tree-view/kv-tree-view.module.mjs +0 -28
- package/esm2022/lib/components/kv-workspace/kv-workspace.component.mjs +0 -167
- package/esm2022/lib/components/kv-workspace/kv-workspace.module.mjs +0 -51
- package/esm2022/public-api.mjs +0 -218
- package/fesm2022/keevo-components.mjs +0 -7357
- package/fesm2022/keevo-components.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/api/base-components/base-component-button.d.ts +0 -15
- package/lib/api/base-components/base-component-chart.d.ts +0 -40
- package/lib/api/base-components/base-component-crud-form.d.ts +0 -145
- package/lib/api/base-components/base-component-crud-list.d.ts +0 -64
- package/lib/api/base-components/base-component-crud.d.ts +0 -36
- package/lib/api/base-components/base-component-dropdown-external.d.ts +0 -15
- package/lib/api/base-components/base-component-dropdown.d.ts +0 -47
- package/lib/api/base-components/base-component-input.d.ts +0 -32
- package/lib/api/base-components/base-component-multi-select.d.ts +0 -35
- package/lib/api/base-components/base-component-table.d.ts +0 -85
- package/lib/api/base-components/base-component.d.ts +0 -22
- 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/stepper/kv-stepperpanel.d.ts +0 -9
- package/lib/api/components/table/action-item.d.ts +0 -11
- package/lib/api/components/table/kv-menuitem.d.ts +0 -152
- package/lib/api/components/table/table-dropdown-control.d.ts +0 -6
- package/lib/api/components/table/table.config.column.d.ts +0 -28
- package/lib/api/components/table/table.config.d.ts +0 -32
- package/lib/api/components/table/table.paginate.d.ts +0 -6
- package/lib/api/components/table/tabledit.config.d.ts +0 -8
- package/lib/api/components/table/tableedit.config.column.d.ts +0 -10
- package/lib/api/components/tree-table/tree-table.config.d.ts +0 -28
- package/lib/api/directives/directives.module.d.ts +0 -9
- package/lib/api/directives/drag/drag.directive.d.ts +0 -11
- package/lib/api/directives/stepper/dynamicinput.directive.d.ts +0 -15
- package/lib/api/directives/template/template.directive.d.ts +0 -11
- package/lib/api/helpers/component-providers.d.ts +0 -2
- package/lib/api/helpers/keevo-validators.d.ts +0 -12
- package/lib/api/helpers/translate-primeng.d.ts +0 -4
- package/lib/api/modules/primeng.module.d.ts +0 -66
- package/lib/api/pipes/capitalize.pipe.d.ts +0 -8
- package/lib/api/pipes/cpfcnpj.pipe.d.ts +0 -7
- package/lib/api/pipes/mask.pipe.d.ts +0 -7
- package/lib/api/pipes/pipes.module.d.ts +0 -11
- package/lib/api/pipes/telefone.pipe.d.ts +0 -7
- package/lib/api/services/base.api.service.d.ts +0 -25
- package/lib/api/services/breadcrumbs.service.d.ts +0 -15
- package/lib/api/services/component.service.d.ts +0 -11
- package/lib/api/services/docs.service.d.ts +0 -12
- package/lib/api/services/form.service.d.ts +0 -31
- package/lib/api/services/imagens.service.d.ts +0 -10
- package/lib/api/services/notification.service.d.ts +0 -25
- package/lib/api/services/object.service.d.ts +0 -9
- package/lib/components/keevo-components.module.d.ts +0 -30
- package/lib/components/kv-avatar/kv-avatar.component.d.ts +0 -22
- package/lib/components/kv-avatar/kv-avatar.module.d.ts +0 -10
- package/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.d.ts +0 -11
- package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +0 -14
- package/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.d.ts +0 -7
- package/lib/components/kv-buttons/kv-button-success/kv-button-success.component.d.ts +0 -7
- package/lib/components/kv-buttons/kv-button.module.d.ts +0 -11
- package/lib/components/kv-carousel/kv-carousel.component.d.ts +0 -14
- package/lib/components/kv-carousel/kv-carousel.module.d.ts +0 -9
- package/lib/components/kv-chart/kv-chart.component.d.ts +0 -56
- package/lib/components/kv-chart/kv-chart.module.d.ts +0 -10
- package/lib/components/kv-error/kv-error.component.d.ts +0 -12
- package/lib/components/kv-error/kv-error.module.d.ts +0 -10
- package/lib/components/kv-file-viewer/kv-file-viewer.component.d.ts +0 -17
- package/lib/components/kv-file-viewer/kv-file-viewer.module.d.ts +0 -8
- package/lib/components/kv-filter-card/kv-filter-card.component.d.ts +0 -12
- package/lib/components/kv-filter-card/kv-filter-card.module.d.ts +0 -10
- package/lib/components/kv-g-icon/kv-g-icon.component.d.ts +0 -5
- package/lib/components/kv-g-icon/kv-g-icon.module.d.ts +0 -9
- package/lib/components/kv-image-upload/kv-image-upload.component.d.ts +0 -24
- package/lib/components/kv-image-upload/kv-image-upload.module.d.ts +0 -8
- package/lib/components/kv-inputs/kv-check/kv-check.component.d.ts +0 -12
- package/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.d.ts +0 -14
- package/lib/components/kv-inputs/kv-editor/kv-editor.component.d.ts +0 -21
- package/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.d.ts +0 -27
- package/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.d.ts +0 -12
- package/lib/components/kv-inputs/kv-input-number/kv-input-number.component.d.ts +0 -19
- package/lib/components/kv-inputs/kv-input-password/kv-input-password.component.d.ts +0 -13
- package/lib/components/kv-inputs/kv-input-text/kv-input-text.component.d.ts +0 -10
- package/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.d.ts +0 -16
- package/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.d.ts +0 -16
- package/lib/components/kv-inputs/kv-input-time/kv-input-time.component.d.ts +0 -10
- package/lib/components/kv-inputs/kv-inputs.module.d.ts +0 -28
- package/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.d.ts +0 -15
- package/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.d.ts +0 -18
- package/lib/components/kv-inputs/kv-select-button/kv-select-button.component.d.ts +0 -19
- package/lib/components/kv-inputs/kv-select-buttons/kv-select-buttons.component.d.ts +0 -16
- package/lib/components/kv-inputs/kv-switch/kv-switch.component.d.ts +0 -16
- package/lib/components/kv-label/kv-label.component.d.ts +0 -7
- package/lib/components/kv-label/kv-label.module.d.ts +0 -8
- package/lib/components/kv-loader/kv-loader.component.d.ts +0 -8
- package/lib/components/kv-loader/kv-loader.module.d.ts +0 -9
- package/lib/components/kv-loader/kv-loader.service.d.ts +0 -10
- package/lib/components/kv-login/kv-login.component.d.ts +0 -30
- package/lib/components/kv-login/kv-login.module.d.ts +0 -13
- package/lib/components/kv-menu/kv-menu.component.d.ts +0 -59
- package/lib/components/kv-menu/kv-menu.module.d.ts +0 -13
- package/lib/components/kv-modal/kv-modal.component.d.ts +0 -28
- package/lib/components/kv-modal/kv-modal.module.d.ts +0 -10
- package/lib/components/kv-orgchart/kv-orgchart.component.d.ts +0 -27
- package/lib/components/kv-orgchart/kv-orgchart.module.d.ts +0 -9
- package/lib/components/kv-page-form/kv-page-form.component.d.ts +0 -97
- package/lib/components/kv-page-form/kv-page-form.module.d.ts +0 -11
- package/lib/components/kv-page-stepper/kv-page-stepper.component.d.ts +0 -84
- package/lib/components/kv-page-stepper/kv-page-stepper.module.d.ts +0 -13
- package/lib/components/kv-pick-list/kv-pick-list.component.d.ts +0 -30
- package/lib/components/kv-pick-list/kv-pick-list.module.d.ts +0 -10
- package/lib/components/kv-progress-bar/kv-progress-bar.component.d.ts +0 -67
- package/lib/components/kv-progress-bar/kv-progress-bar.module.d.ts +0 -9
- package/lib/components/kv-report/kv-report.component.d.ts +0 -20
- package/lib/components/kv-report/kv-report.module.d.ts +0 -8
- package/lib/components/kv-stepper/kv-stepper.component.d.ts +0 -25
- package/lib/components/kv-stepper/kv-stepper.module.d.ts +0 -10
- package/lib/components/kv-table/kv-table.component.d.ts +0 -119
- package/lib/components/kv-table/kv-table.module.d.ts +0 -11
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +0 -58
- package/lib/components/kv-table-edit/kv-table-edit.module.d.ts +0 -14
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +0 -110
- package/lib/components/kv-table-expandable/kv-table-expandable.module.d.ts +0 -12
- package/lib/components/kv-tree-table/kv-tree-table.component.d.ts +0 -71
- package/lib/components/kv-tree-table/kv-tree-table.module.d.ts +0 -9
- package/lib/components/kv-tree-view/kv-tree-view.component.d.ts +0 -14
- package/lib/components/kv-tree-view/kv-tree-view.module.d.ts +0 -9
- package/lib/components/kv-workspace/kv-workspace.component.d.ts +0 -65
- package/lib/components/kv-workspace/kv-workspace.module.d.ts +0 -14
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
ActivatedRoute,
|
|
4
|
+
Router
|
|
5
|
+
} from '@angular/router';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
ChangeDetectorRef,
|
|
9
|
+
Component,
|
|
10
|
+
EventEmitter,
|
|
11
|
+
HostListener,
|
|
12
|
+
Input,
|
|
13
|
+
OnInit,
|
|
14
|
+
Output,
|
|
15
|
+
ViewChild
|
|
16
|
+
} from '@angular/core';
|
|
17
|
+
|
|
18
|
+
import { OverlayPanel } from 'primeng/overlaypanel';
|
|
19
|
+
import { Sidebar } from 'primeng/sidebar';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'kv-menu',
|
|
23
|
+
templateUrl: './kv-menu.component.html',
|
|
24
|
+
styleUrls: ['./kv-menu.component.scss'],
|
|
25
|
+
})
|
|
26
|
+
export class KvMenuComponent implements OnInit {
|
|
27
|
+
|
|
28
|
+
@Input() aplicativos: any[] = [];
|
|
29
|
+
@Input() ultimoAplicativoSelecionado!: number;
|
|
30
|
+
|
|
31
|
+
@Input() breadCrumbItems: { label: string, routerLink: string }[] = [];
|
|
32
|
+
@Input() licencas: any[] = [];
|
|
33
|
+
@Input() licencaSelecionada!: any;
|
|
34
|
+
@Input() logoImage!: any;
|
|
35
|
+
@Input() nomeUsuario!: string;
|
|
36
|
+
|
|
37
|
+
@Output() expandMenuEmit: EventEmitter<boolean> = new EventEmitter();
|
|
38
|
+
@Output() gerenciarKeePassEvent: EventEmitter<any> = new EventEmitter();
|
|
39
|
+
@Output() licencaChange: EventEmitter<any> = new EventEmitter();
|
|
40
|
+
@Output() sairEvent: EventEmitter<any> = new EventEmitter();
|
|
41
|
+
@Output() selecionarAplicativoEmit: EventEmitter<number> = new EventEmitter();
|
|
42
|
+
@Output() trocarLicencaEmit: EventEmitter<boolean> = new EventEmitter();
|
|
43
|
+
|
|
44
|
+
@ViewChild('meusDadosPanel') meusDadosPanel!: OverlayPanel;
|
|
45
|
+
@ViewChild('sidebarRef') sidebarRef!: Sidebar;
|
|
46
|
+
@ViewChild('sistemasPanel') sistemasPanel!: OverlayPanel;
|
|
47
|
+
|
|
48
|
+
menus: any[] = [];
|
|
49
|
+
|
|
50
|
+
expandMenu: boolean = true;
|
|
51
|
+
heigthCard!: number;
|
|
52
|
+
mouseOverFilhoIndex: any;
|
|
53
|
+
mouseOverIndex: any;
|
|
54
|
+
visibleDialogLicenca: boolean = false;
|
|
55
|
+
widthCard!: number;
|
|
56
|
+
|
|
57
|
+
constructor(
|
|
58
|
+
private cdr: ChangeDetectorRef,
|
|
59
|
+
protected router: Router,
|
|
60
|
+
private route: ActivatedRoute) { }
|
|
61
|
+
|
|
62
|
+
public ajustarHeigthCard(): number {
|
|
63
|
+
if (this.widthCard > 400) {
|
|
64
|
+
if (this.breadCrumbItems.length > 0) return 105
|
|
65
|
+
else return 85
|
|
66
|
+
} else return 83
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public callRoute(e: any, expand?: boolean) {
|
|
70
|
+
if (!expand)
|
|
71
|
+
!this.expandMenu ? this.expandMenu = !this.expandMenu : '';
|
|
72
|
+
|
|
73
|
+
this.router.navigateByUrl(e)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private configurarLicencas() {
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
this.definirMenusPorSistema(this.ultimoAplicativoSelecionado || this.aplicativos[0]?.idaplicativo);
|
|
79
|
+
}, 1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private definirMenusPorSistema(idaplicativo: number) {
|
|
83
|
+
this.menus = this.aplicativos.find((x) => x.idaplicativo == idaplicativo)?.menus || [];
|
|
84
|
+
|
|
85
|
+
if (this.router.url && this.menus && this.menus.length > 0) {
|
|
86
|
+
if (this.router.url === '/') {
|
|
87
|
+
this.navigateToFirstMenu()
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const menuSelecionado = this.menus.find((menu: any) => menu.link && menu.link.includes(this.router.url.slice(1)));
|
|
91
|
+
if (menuSelecionado) {
|
|
92
|
+
this.navigateToMenu(menuSelecionado);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.sistemasPanel.hide();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private expandMenuEvent() {
|
|
101
|
+
this.expandMenuEmit.emit(this.expandMenu);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public gerenciarKeePass(event: any) {
|
|
105
|
+
this.sistemasPanel.hide();
|
|
106
|
+
this.gerenciarKeePassEvent.emit(event)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
public mascaraNomeLicenca(nomeLicenca: any): string {
|
|
110
|
+
if (nomeLicenca) {
|
|
111
|
+
if (nomeLicenca.length > 23)
|
|
112
|
+
return nomeLicenca.substring(0, 23) + '...';
|
|
113
|
+
else return nomeLicenca;
|
|
114
|
+
} else return '';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private navigateToFirstMenu(): void {
|
|
118
|
+
const firstMenu = this.menus[0];
|
|
119
|
+
if (firstMenu.indmenupai) {
|
|
120
|
+
const filhos = this.retornarMenuFilhos(firstMenu.idaplicativo, firstMenu.idmenu);
|
|
121
|
+
if (filhos) {
|
|
122
|
+
this.callRoute(filhos[0].link, true);
|
|
123
|
+
}
|
|
124
|
+
} else {
|
|
125
|
+
this.callRoute(firstMenu.link, true);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
private navigateToMenu(menu: any): void {
|
|
130
|
+
if (menu.menupai) {
|
|
131
|
+
const filhos = this.retornarMenuFilhos(menu.idsistema, menu.idmenu);
|
|
132
|
+
if (filhos) {
|
|
133
|
+
this.callRoute(filhos[0].link, true);
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
this.callRoute(menu.link, true);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public ngOnInit(): void {
|
|
141
|
+
this.configurarLicencas();
|
|
142
|
+
this.heigthCard = Number(document.getElementById('page-content')?.offsetHeight);
|
|
143
|
+
this.widthCard = Number(window.innerWidth) - (this.expandMenu ? 333 : 93);
|
|
144
|
+
this.expandMenuEvent()
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public onMouseEnter(index: number) {
|
|
148
|
+
this.mouseOverIndex = index;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
public onMouseFilhoEnter(index: number) {
|
|
152
|
+
this.mouseOverFilhoIndex = index;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public onMouseLeave() {
|
|
156
|
+
this.mouseOverIndex = null;
|
|
157
|
+
this.mouseOverFilhoIndex = null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@HostListener('window:resize', ['$event'])
|
|
161
|
+
public onWindowResize() {
|
|
162
|
+
this.heigthCard = Number(document.getElementById('page-content')?.offsetHeight);
|
|
163
|
+
this.widthCard = Number(window.innerWidth) - (this.expandMenu ? 333 : 93);
|
|
164
|
+
this.cdr.detectChanges();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public retornarMenuFilhos(idaplicativo: number, idmenu: number) {
|
|
168
|
+
return this.aplicativos
|
|
169
|
+
.find((x) => x.idaplicativo == idaplicativo)?.menus
|
|
170
|
+
.filter((x: any) => x.idmenupai == idmenu);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
public sair(event: any) {
|
|
174
|
+
this.sistemasPanel.hide();
|
|
175
|
+
this.sairEvent.emit(event)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
public selecionarAplicativo(idaplicativo: number) {
|
|
179
|
+
this.selecionarAplicativoEmit.emit(idaplicativo);
|
|
180
|
+
this.definirMenusPorSistema(idaplicativo);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
public toggleMenu() {
|
|
184
|
+
this.expandMenu = !this.expandMenu;
|
|
185
|
+
this.expandMenuEvent()
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public trocarLicenca() {
|
|
189
|
+
this.trocarLicencaEmit.emit();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
public verificarPaginaSelecionada(link: any): boolean {
|
|
193
|
+
return this.router.url.includes(link);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
FormsModule,
|
|
5
|
+
ReactiveFormsModule
|
|
6
|
+
} from '@angular/forms';
|
|
7
|
+
|
|
8
|
+
import { NgModule } from '@angular/core';
|
|
9
|
+
|
|
10
|
+
import { KvButtonsModule } from '../kv-buttons/kv-button.module';
|
|
11
|
+
import { KvInputsModule } from '../kv-inputs/kv-inputs.module';
|
|
12
|
+
import { KvMenuComponent } from './kv-menu.component';
|
|
13
|
+
import { PipesModule } from "../../api/pipes/pipes.module";
|
|
14
|
+
import { PrimeNgModule } from '../../api/modules/primeng.module';
|
|
15
|
+
|
|
16
|
+
@NgModule({
|
|
17
|
+
declarations: [
|
|
18
|
+
KvMenuComponent
|
|
19
|
+
],
|
|
20
|
+
exports: [
|
|
21
|
+
KvMenuComponent
|
|
22
|
+
],
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
FormsModule,
|
|
26
|
+
KvButtonsModule,
|
|
27
|
+
KvInputsModule,
|
|
28
|
+
PipesModule,
|
|
29
|
+
PrimeNgModule,
|
|
30
|
+
ReactiveFormsModule,
|
|
31
|
+
]
|
|
32
|
+
})
|
|
33
|
+
export class KvMenuModule { }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- RENDERIZAÇÃO DO MODAL -->
|
|
2
|
+
<div class="col-12 mb-4" id="content-modal">
|
|
3
|
+
<ng-content></ng-content>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<!-- RENDERIZAÇÃO DOS BOTÕES -->
|
|
7
|
+
|
|
8
|
+
<div class="bg-white flex flex-row flex-wrap gap-2 p-2 modal-barra-acoes {{justify_content}}" *ngIf="actions" id="actions-field">
|
|
9
|
+
<kv-button-personalize
|
|
10
|
+
*ngFor=" let action of actions"
|
|
11
|
+
[ngClass]="action.visible==false?'hidden':''"
|
|
12
|
+
color="{{action.color}}"
|
|
13
|
+
colorHover="{{action.colorHover}}"
|
|
14
|
+
textColor="{{action.textColor}}"
|
|
15
|
+
icon="{{action.icon}}"
|
|
16
|
+
label="{{action.label}}"
|
|
17
|
+
[disabled]="action.disabled || false"
|
|
18
|
+
(onClick)="clickExecute(action)"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
::ng-deep .p-dialog .p-dialog-header {
|
|
2
|
+
color: white !important;
|
|
3
|
+
background: #002542 !important;
|
|
4
|
+
display: flex !important;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
::ng-deep .p-dialog .p-dialog-content {
|
|
9
|
+
padding-top: 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
::ng-deep .p-dialog {
|
|
13
|
+
min-width: 320px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sub-title {
|
|
17
|
+
// color: white !important;
|
|
18
|
+
color: yellow;
|
|
19
|
+
position: relative;
|
|
20
|
+
bottom: 25px;
|
|
21
|
+
z-index: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
::ng-deep .p-dialog-content {
|
|
25
|
+
|
|
26
|
+
&::-webkit-scrollbar {
|
|
27
|
+
width: 8px;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: rgba(222, 222, 222, 0.75);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::-webkit-scrollbar-thumb {
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:hover::-webkit-scrollbar-thumb {
|
|
40
|
+
border-left: 2px solid white;
|
|
41
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&::-webkit-scrollbar-track {
|
|
45
|
+
border-left: 2px solid white;
|
|
46
|
+
background-color: rgba(222, 222, 222, 0.75);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
overflow-x: hidden;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
* {
|
|
53
|
+
padding-bottom: 0rem;
|
|
54
|
+
padding-top: 0rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.barra-acoes {
|
|
58
|
+
position: fixed;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
background-color: rgb(255, 255, 255);
|
|
63
|
+
padding: 10px;
|
|
64
|
+
z-index: 999;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
#page-form-container {
|
|
69
|
+
padding-bottom: 40px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media screen and (max-width: 991px) {
|
|
73
|
+
#page-form-container {
|
|
74
|
+
padding-bottom: 100px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
.modal-barra-acoes {
|
|
78
|
+
position: fixed;
|
|
79
|
+
bottom: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
right: 0;
|
|
82
|
+
z-index: 999;
|
|
83
|
+
margin-right: 1.5rem;
|
|
84
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { KvModalComponent } from './kv-modal.component';
|
|
4
|
+
|
|
5
|
+
describe('ModalComponent', () => {
|
|
6
|
+
let component: KvModalComponent;
|
|
7
|
+
let fixture: ComponentFixture<KvModalComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [KvModalComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(KvModalComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
ElementRef,
|
|
4
|
+
HostListener,
|
|
5
|
+
Input
|
|
6
|
+
} from '@angular/core';
|
|
7
|
+
|
|
8
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
9
|
+
|
|
10
|
+
import { ActionItem } from '../../../public-api';
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'kv-modal',
|
|
14
|
+
templateUrl: './kv-modal.component.html',
|
|
15
|
+
styleUrls: ['./kv-modal.component.scss']
|
|
16
|
+
})
|
|
17
|
+
export class KvModalComponent {
|
|
18
|
+
|
|
19
|
+
constructor(protected dynamicDialogRef: DynamicDialogRef,
|
|
20
|
+
private dynamicDialogConfig: DynamicDialogConfig,
|
|
21
|
+
|
|
22
|
+
) { }
|
|
23
|
+
|
|
24
|
+
@Input() subHeader!: ElementRef;
|
|
25
|
+
@Input() subtitle!: string;
|
|
26
|
+
|
|
27
|
+
ngOnInit(): void {
|
|
28
|
+
this.addSubTitle();
|
|
29
|
+
this.setMarginBottom();
|
|
30
|
+
this.defPositionButtons();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@HostListener('window:resize', ['$event'])
|
|
34
|
+
onWindowResize() {
|
|
35
|
+
this.setMarginBottom()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Adiciona sub-título à tela
|
|
40
|
+
*/
|
|
41
|
+
addSubTitle() {
|
|
42
|
+
|
|
43
|
+
if (this.subtitle) {
|
|
44
|
+
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
45
|
+
if (headerElement) {
|
|
46
|
+
const subtitleElement = document.createElement('span');
|
|
47
|
+
subtitleElement.textContent = this.subtitle;
|
|
48
|
+
subtitleElement.style.fontSize = '0.75rem'
|
|
49
|
+
subtitleElement.style.width = '100%'
|
|
50
|
+
subtitleElement.style.marginLeft = '2px'
|
|
51
|
+
|
|
52
|
+
headerElement.appendChild(subtitleElement);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (this.subHeader) {
|
|
57
|
+
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
58
|
+
const subHeader = this.subHeader.nativeElement;
|
|
59
|
+
if (headerElement && this.subHeader) {
|
|
60
|
+
subHeader.style.width = '100%'
|
|
61
|
+
subHeader.style.marginLeft = '2px'
|
|
62
|
+
|
|
63
|
+
headerElement.appendChild(this.subHeader.nativeElement);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Ações do Dialog
|
|
72
|
+
*/
|
|
73
|
+
@Input() actions: ActionItem[] = [];
|
|
74
|
+
@Input() actionsPosition: string = 'right';
|
|
75
|
+
|
|
76
|
+
justify_content: string = 'justify-content-start';
|
|
77
|
+
|
|
78
|
+
defPositionButtons() {
|
|
79
|
+
if (this.actionsPosition === 'right') {
|
|
80
|
+
this.justify_content = 'justify-content-end'
|
|
81
|
+
}
|
|
82
|
+
if (this.actionsPosition === 'center') {
|
|
83
|
+
this.justify_content = 'justify-content-center'
|
|
84
|
+
}
|
|
85
|
+
if (this.actionsPosition === 'left') {
|
|
86
|
+
this.justify_content = 'justify-content-start'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
setMarginBottom() {
|
|
91
|
+
let actionsFieldHeight = document.getElementById('actions-field')?.offsetHeight;
|
|
92
|
+
|
|
93
|
+
let divBox = document.getElementById('content-modal');
|
|
94
|
+
|
|
95
|
+
if (divBox) {
|
|
96
|
+
|
|
97
|
+
if (actionsFieldHeight) {
|
|
98
|
+
divBox.style.marginBottom = `${actionsFieldHeight + 30}px`;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
divBox.style.marginBottom = `50px`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
clickExecute(action: ActionItem) {
|
|
107
|
+
if (action.command) {
|
|
108
|
+
|
|
109
|
+
action.command();
|
|
110
|
+
|
|
111
|
+
if (action.closeAfterClick != false) this.dynamicDialogRef.close();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { KvModalComponent } from './kv-modal.component';
|
|
4
|
+
import { KvButtonsModule, PrimeNgModule } from '../../../public-api';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@NgModule({
|
|
9
|
+
declarations: [
|
|
10
|
+
KvModalComponent
|
|
11
|
+
],
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
PrimeNgModule,
|
|
15
|
+
KvButtonsModule,
|
|
16
|
+
],
|
|
17
|
+
exports: [
|
|
18
|
+
KvModalComponent
|
|
19
|
+
]
|
|
20
|
+
})
|
|
21
|
+
export class KvModalModule { }
|
|
@@ -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,110 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
ElementRef,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
Renderer2,
|
|
7
|
+
TemplateRef,
|
|
8
|
+
ViewChild,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
|
|
11
|
+
import { OrgChart } from 'd3-org-chart';
|
|
12
|
+
import * as d3 from 'd3';
|
|
13
|
+
|
|
14
|
+
import OrgChartConfig from '../../api/components/chart/orchart.config';
|
|
15
|
+
import OrgChartItem from '../../api/components/chart/orchart.item';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'kv-orgchart',
|
|
19
|
+
templateUrl: './kv-orgchart.component.html',
|
|
20
|
+
styleUrls: ['./kv-orgchart.component.scss',],
|
|
21
|
+
})
|
|
22
|
+
export class KvOrgchartComponent implements OnInit {
|
|
23
|
+
@ViewChild('chartContainer') chartContainer!: ElementRef;
|
|
24
|
+
chart!: any;
|
|
25
|
+
|
|
26
|
+
@Input() dataSource!: OrgChartItem[];
|
|
27
|
+
@Input() config!: OrgChartConfig;
|
|
28
|
+
@Input() template!: string;
|
|
29
|
+
@Input() nodeTemplate!: TemplateRef<any>;
|
|
30
|
+
|
|
31
|
+
@Input() generateTemplate: Function = (data: any, node: any, nodes: any[], index: number): string => '';
|
|
32
|
+
@Input() templateFuncion: boolean = false;
|
|
33
|
+
|
|
34
|
+
@Input() corDeFundo: string = 'red';
|
|
35
|
+
|
|
36
|
+
compact: boolean = true;
|
|
37
|
+
mostraMenu: boolean = false;
|
|
38
|
+
|
|
39
|
+
constructor(private renderer: Renderer2) { }
|
|
40
|
+
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ngAfterViewInit() {
|
|
45
|
+
if (!this.chart) {
|
|
46
|
+
this.chart = new OrgChart();
|
|
47
|
+
}
|
|
48
|
+
this.updateChart();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ngOnChanges() {
|
|
52
|
+
this.updateChart();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
updateChart() {
|
|
56
|
+
if (!this.dataSource) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!this.chart) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const chartContainer = this.chartContainer.nativeElement;
|
|
64
|
+
this.chart
|
|
65
|
+
.container(chartContainer)
|
|
66
|
+
.data(this.dataSource)
|
|
67
|
+
.nodeWidth(() => this.config.cardWidht)
|
|
68
|
+
.nodeHeight(() => this.config.cardHeight)
|
|
69
|
+
.nodeUpdate(function (d: any) {
|
|
70
|
+
})
|
|
71
|
+
.linkUpdate((node: any, index: any, nodes: any) => {
|
|
72
|
+
d3.select(nodes[index])
|
|
73
|
+
.attr('stroke-width', this.config.conectionWidth || '2px')
|
|
74
|
+
.style('stroke', this.config.connectionColor || '#d6d6d6').style('backgroundColor', 'red')
|
|
75
|
+
})
|
|
76
|
+
.nodeContent((d: any) => {
|
|
77
|
+
if (!this.templateFuncion) {
|
|
78
|
+
if (d.data.template) {
|
|
79
|
+
const jsTemplate = this.stringToTemplateLiteral(d.data.template);
|
|
80
|
+
var templateConverter = new Function('data', 'return' + jsTemplate);
|
|
81
|
+
var x = templateConverter(d.data.data);
|
|
82
|
+
} else {
|
|
83
|
+
const jsTemplate = this.stringToTemplateLiteral(this.config.templateItem);
|
|
84
|
+
var templateConverter = new Function('data', 'return' + jsTemplate);
|
|
85
|
+
var x = templateConverter(d.data.data);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
var x = this.generateTemplate(d)
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
return x;
|
|
92
|
+
})
|
|
93
|
+
.defaultFont('Roboto')
|
|
94
|
+
.render()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
stringToTemplateLiteral(string: string): string {
|
|
98
|
+
const convertedTemplate = string.replace(
|
|
99
|
+
/\{\{([^}]*)\}\}/g,
|
|
100
|
+
'${$1}'
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
return '`' + convertedTemplate + '`';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
compactSwap() {
|
|
107
|
+
this.compact = !this.compact;
|
|
108
|
+
this.chart.compact(this.compact).render();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { KvOrgchartComponent } from './kv-orgchart.component';
|
|
4
|
+
import { PrimeNgModule } from '../../../public-api';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
imports: [
|
|
8
|
+
CommonModule,
|
|
9
|
+
PrimeNgModule
|
|
10
|
+
],
|
|
11
|
+
declarations: [KvOrgchartComponent],
|
|
12
|
+
exports: [KvOrgchartComponent]
|
|
13
|
+
})
|
|
14
|
+
export class KvOrgchartModule { }
|