keevo-components 1.5.190 → 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/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} +4 -3
- 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} +36 -14
- 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/kvloader.module.mjs +0 -28
- package/esm2020/lib/loader/loader.component.mjs +0 -17
- 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 -138
- package/fesm2015/keevo-components.mjs +0 -4705
- package/fesm2015/keevo-components.mjs.map +0 -1
- package/fesm2020/keevo-components.mjs +0 -4696
- 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/kvloader.module.d.ts +0 -9
- package/lib/loader/loader.component.d.ts +0 -8
- 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,315 @@
|
|
|
1
|
+
.error-show {
|
|
2
|
+
background-color: red;
|
|
3
|
+
width: 5px;
|
|
4
|
+
height: 10px
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.input-search {
|
|
8
|
+
position: relative;
|
|
9
|
+
right: 8px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.btns-options {
|
|
13
|
+
position: relative;
|
|
14
|
+
left: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.chip-style {
|
|
18
|
+
border: solid 1px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host::ng-deep .p-card .p-card-content {
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
.material-symbols-outlined.md-19 {
|
|
27
|
+
font-size: 19px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.material-symbols-outlined.md-22 {
|
|
31
|
+
font-size: 22px;
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.checkbox-container {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
|
|
39
|
+
gap: 2px;
|
|
40
|
+
margin-top: 5px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#botaoFiltro:hover {
|
|
44
|
+
color: darkgray;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
.actionLoteBtns {
|
|
50
|
+
align-items: center;
|
|
51
|
+
background-color: transparent;
|
|
52
|
+
color: darkgray;
|
|
53
|
+
display: flex;
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
width: 2rem;
|
|
56
|
+
height: 2rem;
|
|
57
|
+
top: 2px;
|
|
58
|
+
margin-left: 0.5rem;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
text-align: justify;
|
|
62
|
+
padding: 12px 12px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.recolherExpandirBtn {
|
|
66
|
+
align-items: center;
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
color: darkgray;
|
|
69
|
+
display: flex;
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
width: 2rem;
|
|
72
|
+
height: 2rem;
|
|
73
|
+
top: 2px;
|
|
74
|
+
margin-left: 0.5rem;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
text-align: justify;
|
|
78
|
+
padding: 12px 12px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#actionLoteBtns:hover {
|
|
82
|
+
color: darkgray;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#recolherExpandirBtn:hover {
|
|
86
|
+
color: darkgray;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.actionBtns {
|
|
90
|
+
align-items: center;
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
color: darkgray;
|
|
93
|
+
display: flex;
|
|
94
|
+
width: .8rem;
|
|
95
|
+
height: .8rem;
|
|
96
|
+
margin-left: 0.22rem;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
text-align: justify;
|
|
100
|
+
padding: 11px 11px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host::ng-deep .material-symbols-outlined {
|
|
104
|
+
font-family: 'Material Symbols Outlined';
|
|
105
|
+
font-weight: normal;
|
|
106
|
+
font-style: normal;
|
|
107
|
+
font-size: 17px;
|
|
108
|
+
line-height: 1;
|
|
109
|
+
letter-spacing: normal;
|
|
110
|
+
text-transform: none;
|
|
111
|
+
display: inline-block;
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
word-wrap: normal;
|
|
114
|
+
direction: ltr;
|
|
115
|
+
// -webkit-font-feature-settings: 'liga';
|
|
116
|
+
-webkit-font-smoothing: antialiased;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
#actionBtns:hover {
|
|
120
|
+
color: darkgray;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#moreVertBtn:hover {
|
|
124
|
+
color: darkgray;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.icon-search {
|
|
128
|
+
top: 20px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.image {
|
|
132
|
+
border-style: solid;
|
|
133
|
+
border-width: 3.5px;
|
|
134
|
+
border-color: rgb(82, 137, 180);
|
|
135
|
+
border-radius: 100%;
|
|
136
|
+
height: 55px;
|
|
137
|
+
width: 55px;
|
|
138
|
+
padding: 0;
|
|
139
|
+
margin: 0;
|
|
140
|
+
vertical-align: middle;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media only screen and (min-width: 768px) {
|
|
144
|
+
.actionLoteBtns {
|
|
145
|
+
top: -1px;
|
|
146
|
+
}
|
|
147
|
+
.recolherExpandirBtn {
|
|
148
|
+
top: -1px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@media only screen and (max-width: 960px) {
|
|
154
|
+
.rowTable {
|
|
155
|
+
text-align: right !important;
|
|
156
|
+
}
|
|
157
|
+
:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {
|
|
158
|
+
background-color: red;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host ::ng-deep .hiddenVisible span {
|
|
164
|
+
visibility: hidden !important;
|
|
165
|
+
cursor: hidden;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.margem-filho {
|
|
169
|
+
position: sticky;
|
|
170
|
+
left: 30px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/* Início: Estilização padrão da tabela */
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
:host ::ng-deep .p-treetable table {
|
|
180
|
+
border-spacing: 0 3px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
#botaoFiltro:hover {
|
|
185
|
+
color: darkgray;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
:host ::ng-deep .p-treetable .p-treetable-header {
|
|
190
|
+
// background-color: #f2f2f2;
|
|
191
|
+
background-color: #eaeaea;
|
|
192
|
+
padding: 2px 13px 0 13px !important;
|
|
193
|
+
border-radius: 5px !important;
|
|
194
|
+
margin-bottom: 2px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
:host ::ng-deep .p-treetable .p-treetable-thead>tr>th {
|
|
199
|
+
// background-color: #f2f2f2;
|
|
200
|
+
background-color: #eaeaea;
|
|
201
|
+
|
|
202
|
+
padding: 0.5rem 0.5rem !important;
|
|
203
|
+
margin-bottom: -5px !important;
|
|
204
|
+
}
|
|
205
|
+
:host ::ng-deep .p-treetable .p-treetable-tbody > tr > td{
|
|
206
|
+
padding: 0.5rem 0.5rem !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:host ::ng-deep .p-treetable .p-treetable-thead {
|
|
210
|
+
border-spacing: 0 1px !important;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//frist
|
|
214
|
+
:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:first-of-type {
|
|
215
|
+
// background-color: #f2f2f2;
|
|
216
|
+
background-color: #eaeaea;
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
padding: 0.5rem 0.5rem !important;
|
|
220
|
+
border-radius: 5px !important;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
//last
|
|
224
|
+
|
|
225
|
+
:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:last-child {
|
|
226
|
+
background-color: #eaeaea;
|
|
227
|
+
// background-color: #f2f2f2;
|
|
228
|
+
padding: 0.5rem 0.5rem !important;
|
|
229
|
+
border-radius: 0 5px 5px 0 !important;
|
|
230
|
+
-webkit-border-radius: 0 5px 5px 0 !important;
|
|
231
|
+
-moz-border-radius: 0 5px 5px 0 !important;
|
|
232
|
+
-ms-border-radius: 0 5px 5px 0 !important;
|
|
233
|
+
-o-border-radius: 0 5px 5px 0 !important;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
:host ::ng-deep .p-treetable-scrollable-header-box {
|
|
239
|
+
padding: 0 !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th {
|
|
244
|
+
background-color: #f2f2f2;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:first-of-type {
|
|
248
|
+
border-radius: 5px 0 0px 5px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:last-child {
|
|
252
|
+
border-radius: 0 5px 5px 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td {
|
|
256
|
+
border-bottom: 1px solid #ddd !important;
|
|
257
|
+
border-top: 1px solid #ddd !important;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
:host ::ng-deep #tr-style {
|
|
261
|
+
border-left: solid 4px #5289B4 !important;
|
|
262
|
+
border-radius: 10px !important;
|
|
263
|
+
display: block;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:first-of-type {
|
|
267
|
+
border-left: solid 4px #5289B4 !important;
|
|
268
|
+
border-radius: 10px 0 0 10px !important;
|
|
269
|
+
-webkit-border-radius: 10px 0 0 10px !important;
|
|
270
|
+
-moz-border-radius: 10px 0 0 10px !important;
|
|
271
|
+
-ms-border-radius: 10px 0 0 10px !important;
|
|
272
|
+
-o-border-radius: 10px 0 0 10px !important;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:last-child {
|
|
276
|
+
border-radius: 0 10px 10px 0 !important;
|
|
277
|
+
border-right: 1px solid #ddd !important;
|
|
278
|
+
-webkit-border-radius: 0 10px 10px 0 !important;
|
|
279
|
+
-moz-border-radius: 0 10px 10px 0 !important;
|
|
280
|
+
-ms-border-radius: 0 10px 10px 0 !important;
|
|
281
|
+
-o-border-radius: 0 10px 10px 0 !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
:host ::ng-deep .actionBtns,
|
|
285
|
+
:host ::ng-deep .actionLoteBtns {
|
|
286
|
+
border-radius: 50%;
|
|
287
|
+
width: 2.5rem !important;
|
|
288
|
+
height: 2.5rem !important;
|
|
289
|
+
box-shadow: rgba(0, 0, 0, 0.24) 0 3px 8px;
|
|
290
|
+
}
|
|
291
|
+
:host ::ng-deep .recolherExpandirBtn {
|
|
292
|
+
border-radius: 50%;
|
|
293
|
+
width: 2.5rem !important;
|
|
294
|
+
height: 2.5rem !important;
|
|
295
|
+
box-shadow: rgba(0, 0, 0, 0.24) 0 3px 8px;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
:host ::ng-deep .p-treetable table {
|
|
300
|
+
border-collapse: separate !important;
|
|
301
|
+
table-layout: auto !important;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* Final: Estilização padrão da tabela */
|
|
305
|
+
|
|
306
|
+
@media only screen and (min-width: 768px) {
|
|
307
|
+
.actionLoteBtns {
|
|
308
|
+
top: -1px;
|
|
309
|
+
}
|
|
310
|
+
.recolherExpandirBtn {
|
|
311
|
+
top: -1px;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
ContentChildren,
|
|
4
|
+
ElementRef,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
HostListener,
|
|
7
|
+
Input,
|
|
8
|
+
OnInit,
|
|
9
|
+
Output,
|
|
10
|
+
QueryList,
|
|
11
|
+
Renderer2,
|
|
12
|
+
TemplateRef,
|
|
13
|
+
ViewChild,
|
|
14
|
+
} from '@angular/core';
|
|
15
|
+
import { TreeNode } from 'primeng/api';
|
|
16
|
+
import {
|
|
17
|
+
CodigoFipePipe,
|
|
18
|
+
CpfCnpjPipe,
|
|
19
|
+
KvMenuItem,
|
|
20
|
+
TableConfig,
|
|
21
|
+
TableConfigColumn,
|
|
22
|
+
TablePaginate,
|
|
23
|
+
TelefonePipe,
|
|
24
|
+
} from '../../public-api';
|
|
25
|
+
import { Table } from 'primeng/table';
|
|
26
|
+
import { TreeTable } from 'primeng/treetable';
|
|
27
|
+
import { DatePipe, DecimalPipe } from '@angular/common';
|
|
28
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
29
|
+
import { TemplateDirective } from '../directives/template.directive';
|
|
30
|
+
|
|
31
|
+
interface Column {
|
|
32
|
+
field: string;
|
|
33
|
+
header: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@Component({
|
|
37
|
+
selector: 'kv-treetable',
|
|
38
|
+
templateUrl: './kv-treetable.component.html',
|
|
39
|
+
styleUrls: ['./kv-treetable.component.scss'],
|
|
40
|
+
})
|
|
41
|
+
export class TreeTableComponent implements OnInit {
|
|
42
|
+
@Input() config!: TableConfig;
|
|
43
|
+
@Input() dataSource!: TreeNode[];
|
|
44
|
+
@Input() selectedItems: any[] = [];
|
|
45
|
+
|
|
46
|
+
@Input() acoesLinhaTabela: boolean = true;
|
|
47
|
+
|
|
48
|
+
@Input() espacamentoPai: string = '2px';
|
|
49
|
+
@Input() espacamentoLateral: boolean = true;
|
|
50
|
+
|
|
51
|
+
@Input() tamanhoTotalTree!: number;
|
|
52
|
+
@Input() rowsPerPageOptions!: number[];
|
|
53
|
+
@Input() rows: number = 5;
|
|
54
|
+
@Input() tableSize!: number;
|
|
55
|
+
@Input() paginator: boolean = true;
|
|
56
|
+
@Input() showFirstLastIcon: boolean = false;
|
|
57
|
+
@Input() rightCollapse: boolean = false;
|
|
58
|
+
@Input() applyStyle: Function = (rowData: any, col: TableConfigColumn) => '';
|
|
59
|
+
|
|
60
|
+
@Input('templates') _templates!: any;
|
|
61
|
+
|
|
62
|
+
@Input() colorButtonToggleNodes: string = 'surface-600';
|
|
63
|
+
|
|
64
|
+
@ContentChildren(TemplateDirective) templates!: QueryList<any>;
|
|
65
|
+
@ViewChild('table', { static: false }) table!: Table;
|
|
66
|
+
|
|
67
|
+
@Output() onFilter: EventEmitter<any> = new EventEmitter();
|
|
68
|
+
@Output() onPaginate: EventEmitter<any> = new EventEmitter();
|
|
69
|
+
@Output() onActiveItem: EventEmitter<any> = new EventEmitter();
|
|
70
|
+
@Output() onActiveItemLote: EventEmitter<any> = new EventEmitter();
|
|
71
|
+
@Output() doubleClickEvent: EventEmitter<any> = new EventEmitter();
|
|
72
|
+
tamanhoTela!: number;
|
|
73
|
+
selectedSize: string = '';
|
|
74
|
+
nodeContext = { $implicit: 'rowData', rowNode: 'rowNode' };
|
|
75
|
+
|
|
76
|
+
selectedNodes!: TreeNode[];
|
|
77
|
+
menuItems: KvMenuItem[] = [];
|
|
78
|
+
imgDefault: string =
|
|
79
|
+
'/9j/4AAQSkZJRgABAQIAdgB2AAD/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAMAAAITAAMAAAABAAEAAAAAAAAAAAB2AAAAAQAAAHYAAAAB/9sAQwADAgICAgIDAgICAwMDAwQGBAQEBAQIBgYFBgkICgoJCAkJCgwPDAoLDgsJCQ0RDQ4PEBAREAoMEhMSEBMPEBAQ/9sAQwEDAwMEAwQIBAQIEAsJCxAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ/8AAEQgAkACQAwERAAIRAQMRAf/EAB0AAQABBAMBAAAAAAAAAAAAAAAGAQIHCAMECQX/xABBEAACAQQABQICCA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TuW3Ge/QepiToaOzsb0RuUtbMpnbOHT8aFfVbOl1F4oLQxN3btnkscr4KyfCy4YGbcBxZgOJog2IyMcsgQO8Dfhlj7KTtT3IBYAsNrvwTXRSamVUK8t+3Hr4Ofm086T+5DbF/flfPNXxtmk8D69ZzCVDGpIsV6hQWGx86EWGx86Cw6hQmxQsaCxSoJPkZ/i3h/hmMtl8jHFIULpAv4pZOzEaUdxsqQGOl35IrBPqZVOrzH7cevgzSqebP8A24b4pcMOdss3xtkm8DCPGPMDL8XS+mS1nYBQBaRykqx2Dtz26zsDWxoaGhvZPO1VbMqnZ4LT86nRUtBLpknFaKLW3rlnbB2evwRetM3hQCgFAKAUAoC6GaW3lSeCV45Y2Do6MQysDsEEeCDUpuF3RDSiVnkTzh7nFn8VELbLQJlYlXSM7+nKOwA24B6h2PkFiTsmrKTtSbLVo1vL56+fMq5+ypcx3lvd14rjy+rK1if4zmxwXkelZL6WykeT01S6hK78aYsvUqjv5LDWjvQ71Zy9pU8x2vb16ZWzNnVEtXtf06T+CS2GWxWVEhxeStbwRa9T0Jlk6N71vpJ1vR/sa3IJkEzwNP0dzTjlxy7KNNX1O3WQ8CgOpf5fE4ro+08naWfq7KevMsfVrzrqI35H96xxzIJfjaXqzJBLjmeBN+iI1k+a/BeN6lS/lvZElMbJaxFvG9sGbpRl7eQx3sa2O9aczaVPLdr39Ol8G1L2dUTFe1vXptciAcQc4s/lYjbYmBMVEy6dkf1JTsEHTkAKO48DqBGw1Vk/ak2ZhB+lfPMtJGypct70x72nBcOfHyxy4kDmmmuJnuLiV5ZZWLu7sWZmJ2SSe5JPvVa24ndlmkoVZZFtQSKAUAoD/9k=';
|
|
80
|
+
|
|
81
|
+
isExpanded: boolean = false;
|
|
82
|
+
|
|
83
|
+
constructor(
|
|
84
|
+
private readonly datePipe: DatePipe,
|
|
85
|
+
private readonly decimalPipe: DecimalPipe,
|
|
86
|
+
private readonly codigoFipePipe: CodigoFipePipe,
|
|
87
|
+
private readonly cpfCnpjPipe: CpfCnpjPipe,
|
|
88
|
+
private readonly telefonePipe: TelefonePipe
|
|
89
|
+
) {}
|
|
90
|
+
|
|
91
|
+
ngOnInit() {
|
|
92
|
+
this.tamanhoTela = window.innerWidth;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public onGlobalFilter(table: TreeTable, event: Event) {
|
|
96
|
+
this.onFilter.emit((event.target as HTMLInputElement).value);
|
|
97
|
+
table.filterGlobal((event.target as HTMLInputElement).value, 'contains');
|
|
98
|
+
}
|
|
99
|
+
@HostListener('window:resize', ['$event'])
|
|
100
|
+
onWindowResize() {
|
|
101
|
+
this.adjustTableSize();
|
|
102
|
+
this.tamanhoTela = window.innerWidth;
|
|
103
|
+
}
|
|
104
|
+
adjustTableSize() {
|
|
105
|
+
if (this.tableSize < 800) {
|
|
106
|
+
this.selectedSize = 'p-datatable-sm';
|
|
107
|
+
} else {
|
|
108
|
+
this.selectedSize = '';
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
public paginate($event: any) {
|
|
112
|
+
if ($event) {
|
|
113
|
+
let paginaInicial =
|
|
114
|
+
($event?.first > 0 ? $event.first / $event.rows : $event.first) + 1;
|
|
115
|
+
let termoPesquisa = '';
|
|
116
|
+
let ordenacao = '';
|
|
117
|
+
|
|
118
|
+
if ($event.globalFilter) termoPesquisa = $event.globalFilter;
|
|
119
|
+
|
|
120
|
+
if ($event.sortField)
|
|
121
|
+
ordenacao = `${$event.sortField} ${
|
|
122
|
+
$event.sortOrder === 1 ? 'ASC' : 'DESC'
|
|
123
|
+
}`;
|
|
124
|
+
|
|
125
|
+
const objeto: TablePaginate = {
|
|
126
|
+
paginaInicial: paginaInicial,
|
|
127
|
+
tamanhoPagina: $event.rows,
|
|
128
|
+
termoPesquisa: termoPesquisa,
|
|
129
|
+
ordenacao: ordenacao,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
this.onPaginate.emit(objeto);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
isBooleanField(rowData: any, col: TableConfigColumn): boolean {
|
|
137
|
+
return col.fieldType == 'boolean';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
isChipField(col: TableConfigColumn): boolean {
|
|
141
|
+
return col.fieldType == 'chip';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
isImageField(col: TableConfigColumn): boolean {
|
|
145
|
+
let retorno = col.fieldType && col.fieldType === 'image' ? true : false;
|
|
146
|
+
return retorno;
|
|
147
|
+
}
|
|
148
|
+
returnRowClass(rowData: any, col: TableConfigColumn) {
|
|
149
|
+
let value = rowData[col.field];
|
|
150
|
+
let rowClass: string;
|
|
151
|
+
|
|
152
|
+
this.tableSize > 800 ? (rowClass = 'text-base') : (rowClass = 'text-sm');
|
|
153
|
+
|
|
154
|
+
if (col.expiredDate == true) {
|
|
155
|
+
new Date(value) < new Date()
|
|
156
|
+
? (rowClass = rowClass + ' text-red-400 font-semibold')
|
|
157
|
+
: '';
|
|
158
|
+
}
|
|
159
|
+
return rowClass;
|
|
160
|
+
}
|
|
161
|
+
transformValue(rowData: any, col: TableConfigColumn) {
|
|
162
|
+
let value = rowData[col.field];
|
|
163
|
+
|
|
164
|
+
if (value != null) {
|
|
165
|
+
if (!col.pipe) {
|
|
166
|
+
return value;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
switch (col.pipe) {
|
|
170
|
+
case 'date':
|
|
171
|
+
return this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
172
|
+
case 'decimal':
|
|
173
|
+
return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
|
|
174
|
+
case 'cpfcnpj':
|
|
175
|
+
return this.cpfCnpjPipe.transform(value);
|
|
176
|
+
case 'telefone':
|
|
177
|
+
return this.telefonePipe.transform(value);
|
|
178
|
+
case 'codigofipe':
|
|
179
|
+
return this.codigoFipePipe.transform(value);
|
|
180
|
+
case 'money':
|
|
181
|
+
return this.formatarValor(value);
|
|
182
|
+
case 'percentage':
|
|
183
|
+
return `${value} %`;
|
|
184
|
+
|
|
185
|
+
default:
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
alignColunasHeader(col: any): string {
|
|
191
|
+
if (col.align) {
|
|
192
|
+
if (col.align == 'right') return 'justify-content: end';
|
|
193
|
+
else return '';
|
|
194
|
+
} else return '';
|
|
195
|
+
}
|
|
196
|
+
centralizarColunas(col: any): string {
|
|
197
|
+
if (col.centralize) {
|
|
198
|
+
return 'text-align: center; ';
|
|
199
|
+
} else return '';
|
|
200
|
+
}
|
|
201
|
+
alignColunas(col: any): string {
|
|
202
|
+
if (col.align) {
|
|
203
|
+
return `text-align: ${col.align}`;
|
|
204
|
+
} else return '';
|
|
205
|
+
}
|
|
206
|
+
returnClassIcon(rowData: any, col: any): string {
|
|
207
|
+
return this.retornarRow(rowData, col, 'iconrow');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
returnTooltipIcon(rowData: any, col: any): string {
|
|
211
|
+
return this.retornarRow(rowData, col, 'tooltipiconrow');
|
|
212
|
+
}
|
|
213
|
+
returnClassChip(rowData: any, col: any): string {
|
|
214
|
+
return `chip-style w-auto border-round-2xl p-2 text-${this.retornarRow(
|
|
215
|
+
rowData,
|
|
216
|
+
col,
|
|
217
|
+
'stylechip'
|
|
218
|
+
)} border-${this.retornarRow(rowData, col, 'stylechip')}`;
|
|
219
|
+
}
|
|
220
|
+
retornarRow(rowData: any, col: any, field: string): string {
|
|
221
|
+
const _rowaction = this.config.rows ? this.config.rows[col.field] : null;
|
|
222
|
+
const _field: string =
|
|
223
|
+
_rowaction && _rowaction[field]
|
|
224
|
+
? _rowaction[field].constructor === Function
|
|
225
|
+
? _rowaction[field].apply(this, [rowData])
|
|
226
|
+
: _rowaction[field]
|
|
227
|
+
: null;
|
|
228
|
+
return _field;
|
|
229
|
+
}
|
|
230
|
+
formatarValor(valor: number): string {
|
|
231
|
+
const formatter = new Intl.NumberFormat('pt-BR', {
|
|
232
|
+
style: 'currency',
|
|
233
|
+
currency: 'BRL',
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
return formatter.format(valor);
|
|
237
|
+
}
|
|
238
|
+
loadImage(rowData: any, col: TableConfigColumn): string {
|
|
239
|
+
/*
|
|
240
|
+
Nossa coluna de imagem trabalha com strings do tipo: base64 ou url
|
|
241
|
+
*/
|
|
242
|
+
let retorno = `data:image/jpg;base64, ${this.imgDefault}`;
|
|
243
|
+
if (rowData && col && rowData[col.field] && rowData[col.field] !== '') {
|
|
244
|
+
if (rowData[col.field].includes('http')) retorno = rowData[col.field];
|
|
245
|
+
else retorno = `data:image/jpg;base64, ${rowData[col.field]}`;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return retorno;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
getCustomTemplate(templatename: string): TemplateRef<any> {
|
|
252
|
+
return this._templates[templatename];
|
|
253
|
+
}
|
|
254
|
+
exibirCampo(field: any, rowData: any) {
|
|
255
|
+
let visible = field.visible ? field.visible(rowData) : true;
|
|
256
|
+
return visible;
|
|
257
|
+
}
|
|
258
|
+
public activeItem(rowData: any, rowNode: any) {
|
|
259
|
+
console.log(rowNode);
|
|
260
|
+
this.onActiveItem.emit({ rowData: rowData, rowNode: rowNode });
|
|
261
|
+
}
|
|
262
|
+
public activeItemLote(rowData: any) {
|
|
263
|
+
this.onActiveItemLote.emit(rowData);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
retornarCampo(action: KvMenuItem, rowData: any, field: string): string {
|
|
267
|
+
const _function = action.dynamicfields
|
|
268
|
+
? (action.dynamicfields[field] as Function)
|
|
269
|
+
: null;
|
|
270
|
+
const _field: string = _function
|
|
271
|
+
? _function.apply(action, [rowData])
|
|
272
|
+
: action[field];
|
|
273
|
+
return _field;
|
|
274
|
+
}
|
|
275
|
+
callDisabled(action: KvMenuItem, data: any): boolean {
|
|
276
|
+
if (action?.disabled) {
|
|
277
|
+
return action.disabled(data);
|
|
278
|
+
}
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
criarMenusModal(data: any, rowNode: any) {
|
|
282
|
+
if (this.config.actions && data) {
|
|
283
|
+
const items = this.config.actions.map((action) => {
|
|
284
|
+
const icon = this.retornarCampo(action, data, 'icon');
|
|
285
|
+
const tooltip = this.retornarCampo(action, data, 'tooltip');
|
|
286
|
+
const label = this.retornarCampo(action, data, 'label');
|
|
287
|
+
const command: any = this.retornarCampo(action, data, 'command');
|
|
288
|
+
const visible: boolean = action.visible
|
|
289
|
+
? action.visible(data, rowNode)
|
|
290
|
+
: true;
|
|
291
|
+
const disabled: boolean = action.disabled
|
|
292
|
+
? action.disabled(data)
|
|
293
|
+
: false;
|
|
294
|
+
|
|
295
|
+
const menuInsert: KvMenuItem = {
|
|
296
|
+
label,
|
|
297
|
+
icon,
|
|
298
|
+
tooltip,
|
|
299
|
+
command,
|
|
300
|
+
disabled,
|
|
301
|
+
visible,
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
let item = this.menuItems.filter(
|
|
305
|
+
(x) => x.command == menuInsert.command
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
if (item.length == 0) this.menuItems.push(menuInsert);
|
|
309
|
+
else {
|
|
310
|
+
if (menuInsert.label != item[0].label) {
|
|
311
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
312
|
+
this.menuItems.splice(index, 1);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (menuInsert.visible != item[0].visible) {
|
|
316
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
317
|
+
this.menuItems.splice(index, 1);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (menuInsert.disabled != item[0].disabled) {
|
|
321
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
322
|
+
this.menuItems.splice(index, 1);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
recuperarRowNode(rowNode: any) {
|
|
330
|
+
return rowNode;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
validaLinhaAcaoVazia(rowData: any, rowNode: any) {
|
|
334
|
+
var algumItemVisivel = this.config.actions.some((a) => {
|
|
335
|
+
if (typeof a.visible === 'function') {
|
|
336
|
+
return a.visible(rowData, rowNode) === true;
|
|
337
|
+
} else {
|
|
338
|
+
return true; // Retorna true se a.visible(rowData) não existir
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
return !algumItemVisivel;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
toggleNodes() {
|
|
346
|
+
if (this.isExpanded) {
|
|
347
|
+
this.collapseAll();
|
|
348
|
+
} else {
|
|
349
|
+
this.expandAll();
|
|
350
|
+
}
|
|
351
|
+
this.isExpanded = !this.isExpanded;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
expandAll(): void {
|
|
355
|
+
this.dataSource.forEach((node) => {
|
|
356
|
+
this.expandCollapseRecursive(node, true);
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
collapseAll(): void {
|
|
361
|
+
this.dataSource.forEach((node) => {
|
|
362
|
+
this.expandCollapseRecursive(node, false);
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
private expandCollapseRecursive(node: TreeNode, isExpand: boolean): void {
|
|
367
|
+
node.expanded = isExpand;
|
|
368
|
+
if (node.children) {
|
|
369
|
+
node.children.forEach((childNode) => {
|
|
370
|
+
this.expandCollapseRecursive(childNode, isExpand);
|
|
371
|
+
});
|
|
372
|
+
this.dataSource = [...this.dataSource];
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
doubleClick(e: any, rowData: any, rowNode: any) {
|
|
377
|
+
let eventDoubleClick = { event: e, rowData: rowData, rowNode: rowNode };
|
|
378
|
+
|
|
379
|
+
let array: string[] = [];
|
|
380
|
+
e.target.classList.forEach((x: any) => array.push(x));
|
|
381
|
+
|
|
382
|
+
if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
|
|
383
|
+
this.doubleClickEvent.emit(eventDoubleClick);
|
|
384
|
+
}
|
|
385
|
+
isDisabledCheckbox(rowData: any, rowNode: any): boolean {
|
|
386
|
+
return this.config.disableControlCheckboxFunction
|
|
387
|
+
? this.config.disableControlCheckboxFunction(rowData, rowNode)
|
|
388
|
+
: false;
|
|
389
|
+
}
|
|
390
|
+
}
|