keevo-components 1.5.191 → 1.5.192
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/esm2020/keevo-components.mjs +5 -0
- package/esm2020/lib/api/base-components/base-component-button.mjs +36 -0
- package/esm2020/lib/api/base-components/base-component-chart.mjs +92 -0
- package/esm2020/lib/api/base-components/base-component-crud-form.mjs +270 -0
- package/esm2020/lib/api/base-components/base-component-crud-list.mjs +68 -0
- package/esm2020/lib/api/base-components/base-component-crud.mjs +65 -0
- package/esm2020/lib/api/base-components/base-component-dropdown-new.mjs +211 -0
- package/esm2020/lib/api/base-components/base-component-dropdown.mjs +161 -0
- package/esm2020/lib/api/base-components/base-component-input.mjs +94 -0
- package/esm2020/lib/api/base-components/base-component-multi-select.mjs +128 -0
- package/esm2020/lib/api/base-components/base-component.mjs +49 -0
- package/esm2020/lib/api/components/chart/chart.config.mjs +2 -0
- package/esm2020/lib/api/components/chart/chart.model.mjs +2 -0
- package/esm2020/lib/api/components/chart/orchart.config.mjs +2 -0
- package/esm2020/lib/api/components/chart/orchart.item.mjs +2 -0
- package/esm2020/lib/api/components/dropdown/filtro.combo.mjs +2 -0
- package/esm2020/lib/api/components/error/error.component.mjs +26 -0
- package/esm2020/lib/api/components/error/kverror.module.mjs +35 -0
- package/esm2020/lib/api/components/table/action-item.mjs +2 -0
- package/esm2020/lib/api/components/table/kv-menuitem.mjs +3 -0
- package/esm2020/lib/api/components/table/table.config.column.mjs +2 -0
- package/esm2020/lib/api/components/table/table.config.mjs +2 -0
- package/esm2020/lib/api/components/table/table.paginate.mjs +9 -0
- package/esm2020/lib/api/helpers/component-providers.mjs +16 -0
- package/esm2020/lib/api/helpers/keevo-validators.mjs +64 -0
- package/esm2020/lib/api/helpers/translate-primeng.mjs +23 -0
- package/esm2020/lib/api/models/menu/menu.model.mjs +2 -0
- package/esm2020/lib/api/models/menu/menucompleto.model.mjs +2 -0
- package/esm2020/lib/api/models/menu/sistemamenu.model.mjs +2 -0
- package/esm2020/lib/api/modules/primeng.module.mjs +247 -0
- package/esm2020/lib/api/services/base.api.service.mjs +74 -0
- package/esm2020/lib/api/services/component.service.mjs +27 -0
- package/esm2020/lib/api/services/form.service.mjs +84 -0
- package/esm2020/lib/api/services/imagens.service.mjs +22 -0
- package/esm2020/lib/api/services/notification.service.mjs +67 -0
- package/esm2020/lib/api/services/object.service.mjs +26 -0
- package/esm2020/lib/buttons/button-personalize/button-personalize.component.mjs +17 -0
- package/esm2020/lib/buttons/button-popup/button-popup.component.mjs +31 -0
- package/esm2020/lib/buttons/button-secondary/button-secondary.component.mjs +17 -0
- package/esm2020/lib/buttons/button-success/button-success.component.mjs +17 -0
- package/esm2020/lib/buttons/kvbutton.module.mjs +39 -0
- package/esm2020/lib/chart/chart.component.mjs +145 -0
- package/esm2020/lib/chart/kvchart.module.mjs +32 -0
- package/esm2020/lib/directives/template.directive.mjs +24 -0
- package/esm2020/lib/inputs/check/check.component.mjs +26 -0
- package/esm2020/lib/inputs/dropdown/dropdown.component.mjs +37 -0
- package/esm2020/lib/inputs/editor/editor.component.mjs +70 -0
- package/esm2020/lib/inputs/input-calendar/input-calendar.component.mjs +89 -0
- package/esm2020/lib/inputs/input-mask/input-mask.component.mjs +23 -0
- package/esm2020/lib/inputs/input-number/input-number.component.mjs +59 -0
- package/esm2020/lib/inputs/input-password/input-password.component.mjs +33 -0
- package/esm2020/lib/inputs/input-text/input-text.component.mjs +21 -0
- package/esm2020/lib/inputs/input-text-checkbox/input-text-checkbox.component.mjs +38 -0
- package/esm2020/lib/inputs/input-textarea/input-textarea.component.mjs +43 -0
- package/esm2020/lib/inputs/input-time/input-time.component.mjs +24 -0
- package/esm2020/lib/inputs/kvinputs.module.mjs +108 -0
- package/esm2020/lib/inputs/multi-select/multi-select.component.mjs +38 -0
- package/esm2020/lib/inputs/radio-group/radio-group.component.mjs +53 -0
- package/esm2020/lib/inputs/switch/switch.component.mjs +32 -0
- package/esm2020/lib/keevo-components.module.mjs +105 -0
- package/esm2020/lib/label/label.component.mjs +15 -0
- package/esm2020/lib/label/label.module.mjs +24 -0
- package/esm2020/lib/loader/kvloader.module.mjs +28 -0
- package/esm2020/lib/loader/loader.component.mjs +17 -0
- package/esm2020/lib/loader/loader.service.mjs +29 -0
- package/esm2020/lib/login/kvlogin.module.mjs +47 -0
- package/esm2020/lib/login/login.component.mjs +52 -0
- package/esm2020/lib/menu/kvmenu.module.mjs +43 -0
- package/esm2020/lib/menu/menu.component.mjs +237 -0
- package/esm2020/lib/orgchart/orgchart.component.mjs +100 -0
- package/esm2020/lib/orgchart/orgchart.module.mjs +24 -0
- package/esm2020/lib/page-form/kv-page-form.module.mjs +38 -0
- package/esm2020/lib/page-form/page-form.component.mjs +144 -0
- package/esm2020/lib/picklist/kvpicklist.module.mjs +32 -0
- package/esm2020/lib/picklist/picklist.component.mjs +48 -0
- package/esm2020/lib/pipes/codigofile.pipe.mjs +19 -0
- package/esm2020/lib/pipes/cpfcnpj.pipe.mjs +25 -0
- package/esm2020/lib/pipes/pipes.module.mjs +34 -0
- package/esm2020/lib/pipes/telefone.pipe.mjs +45 -0
- package/esm2020/lib/table/kvtable.module.mjs +32 -0
- package/esm2020/lib/table/table.component.mjs +499 -0
- package/esm2020/lib/tree-table/kv-treetable.component.mjs +371 -0
- package/esm2020/lib/tree-table/kv-treetable.module.mjs +32 -0
- package/esm2020/lib/tree-view/kvtree-view.module.mjs +28 -0
- package/esm2020/lib/tree-view/tree-view.component.mjs +29 -0
- package/esm2020/lib/workspace/kvworkspace.module.mjs +47 -0
- package/esm2020/lib/workspace/workspace.component.mjs +77 -0
- package/esm2020/public-api.mjs +138 -0
- package/fesm2015/keevo-components.mjs +4705 -0
- package/fesm2015/keevo-components.mjs.map +1 -0
- package/fesm2020/keevo-components.mjs +4696 -0
- package/fesm2020/keevo-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/api/base-components/base-component-button.d.ts +14 -0
- package/lib/api/base-components/base-component-chart.d.ts +40 -0
- package/lib/api/base-components/base-component-crud-form.d.ts +137 -0
- package/lib/api/base-components/base-component-crud-list.d.ts +63 -0
- package/lib/api/base-components/base-component-crud.d.ts +36 -0
- package/lib/api/base-components/base-component-dropdown-new.d.ts +14 -0
- package/lib/api/base-components/base-component-dropdown.d.ts +42 -0
- package/lib/api/base-components/base-component-input.d.ts +31 -0
- package/lib/api/base-components/base-component-multi-select.d.ts +35 -0
- package/lib/api/base-components/base-component.d.ts +21 -0
- package/lib/api/components/chart/chart.config.d.ts +11 -0
- package/lib/api/components/chart/chart.model.d.ts +9 -0
- package/lib/api/components/chart/orchart.config.d.ts +35 -0
- package/lib/api/components/chart/orchart.item.d.ts +26 -0
- package/lib/api/components/dropdown/filtro.combo.d.ts +4 -0
- package/lib/api/components/error/error.component.d.ts +12 -0
- package/lib/api/components/error/kverror.module.d.ts +10 -0
- package/lib/api/components/table/action-item.d.ts +5 -0
- package/lib/api/components/table/kv-menuitem.d.ts +9 -0
- package/lib/api/components/table/table.config.column.d.ts +21 -0
- package/lib/api/components/table/table.config.d.ts +17 -0
- package/lib/api/components/table/table.paginate.d.ts +6 -0
- package/lib/api/helpers/component-providers.d.ts +2 -0
- package/lib/api/helpers/keevo-validators.d.ts +10 -0
- package/lib/api/helpers/translate-primeng.d.ts +4 -0
- package/lib/api/models/menu/menu.model.d.ts +10 -0
- package/{src/lib/api/models/menu/menucompleto.model.ts → lib/api/models/menu/menucompleto.model.d.ts} +3 -4
- package/lib/api/models/menu/sistemamenu.model.d.ts +8 -0
- package/lib/api/modules/primeng.module.d.ts +60 -0
- package/lib/api/services/base.api.service.d.ts +25 -0
- package/lib/api/services/component.service.d.ts +11 -0
- package/lib/api/services/form.service.d.ts +27 -0
- package/lib/api/services/imagens.service.d.ts +8 -0
- package/lib/api/services/notification.service.d.ts +25 -0
- package/lib/api/services/object.service.d.ts +8 -0
- package/lib/buttons/button-personalize/button-personalize.component.d.ts +7 -0
- package/lib/buttons/button-popup/button-popup.component.d.ts +13 -0
- package/lib/buttons/button-secondary/button-secondary.component.d.ts +7 -0
- package/lib/buttons/button-success/button-success.component.d.ts +7 -0
- package/lib/buttons/kvbutton.module.d.ts +11 -0
- package/lib/chart/chart.component.d.ts +56 -0
- package/lib/chart/kvchart.module.d.ts +10 -0
- package/lib/directives/template.directive.d.ts +11 -0
- package/lib/inputs/check/check.component.d.ts +11 -0
- package/lib/inputs/dropdown/dropdown.component.d.ts +14 -0
- package/lib/inputs/editor/editor.component.d.ts +39 -0
- package/lib/inputs/input-calendar/input-calendar.component.d.ts +27 -0
- package/lib/inputs/input-mask/input-mask.component.d.ts +10 -0
- package/lib/inputs/input-number/input-number.component.d.ts +19 -0
- package/lib/inputs/input-password/input-password.component.d.ts +13 -0
- package/lib/inputs/input-text/input-text.component.d.ts +9 -0
- package/lib/inputs/input-text-checkbox/input-text-checkbox.component.d.ts +15 -0
- package/lib/inputs/input-textarea/input-textarea.component.d.ts +16 -0
- package/lib/inputs/input-time/input-time.component.d.ts +10 -0
- package/lib/inputs/kvinputs.module.d.ts +25 -0
- package/lib/inputs/multi-select/multi-select.component.d.ts +12 -0
- package/lib/inputs/radio-group/radio-group.component.d.ts +18 -0
- package/lib/inputs/switch/switch.component.d.ts +13 -0
- package/lib/keevo-components.module.d.ts +19 -0
- package/lib/label/label.component.d.ts +7 -0
- package/lib/label/label.module.d.ts +8 -0
- package/lib/loader/kvloader.module.d.ts +9 -0
- package/lib/loader/loader.component.d.ts +8 -0
- package/lib/loader/loader.service.d.ts +10 -0
- package/lib/login/kvlogin.module.d.ts +13 -0
- package/lib/login/login.component.d.ts +30 -0
- package/lib/menu/kvmenu.module.d.ts +12 -0
- package/lib/menu/menu.component.d.ts +74 -0
- package/lib/orgchart/orgchart.component.d.ts +27 -0
- package/lib/orgchart/orgchart.module.d.ts +9 -0
- package/lib/page-form/kv-page-form.module.d.ts +11 -0
- package/lib/page-form/page-form.component.d.ts +69 -0
- package/lib/picklist/kvpicklist.module.d.ts +10 -0
- package/lib/picklist/picklist.component.d.ts +20 -0
- package/lib/pipes/codigofile.pipe.d.ts +7 -0
- package/lib/pipes/cpfcnpj.pipe.d.ts +7 -0
- package/lib/pipes/pipes.module.d.ts +10 -0
- package/lib/pipes/telefone.pipe.d.ts +7 -0
- package/lib/table/kvtable.module.d.ts +10 -0
- package/lib/table/table.component.d.ts +104 -0
- package/lib/tree-table/kv-treetable.component.d.ts +84 -0
- package/lib/tree-table/kv-treetable.module.d.ts +11 -0
- package/lib/tree-view/kvtree-view.module.d.ts +9 -0
- package/lib/tree-view/tree-view.component.d.ts +14 -0
- package/lib/workspace/kvworkspace.module.d.ts +13 -0
- package/lib/workspace/workspace.component.d.ts +28 -0
- package/package.json +22 -3
- package/{src/public-api.ts → public-api.d.ts} +14 -36
- package/ng-package.json +0 -7
- 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 +0 -74
- package/src/assets/images/keevo-logo.png +0 -0
- package/src/assets/images/logokeevo_2.png +0 -0
- package/src/index.ts +0 -1
- package/src/lib/api/base-components/base-component-button.ts +0 -27
- package/src/lib/api/base-components/base-component-chart.ts +0 -105
- package/src/lib/api/base-components/base-component-crud-form.ts +0 -328
- package/src/lib/api/base-components/base-component-crud-list.ts +0 -111
- package/src/lib/api/base-components/base-component-crud.ts +0 -70
- package/src/lib/api/base-components/base-component-dropdown-new.ts +0 -112
- package/src/lib/api/base-components/base-component-dropdown.ts +0 -164
- package/src/lib/api/base-components/base-component-input.ts +0 -107
- package/src/lib/api/base-components/base-component-multi-select.ts +0 -136
- package/src/lib/api/base-components/base-component.ts +0 -46
- package/src/lib/api/components/chart/chart.config.ts +0 -12
- package/src/lib/api/components/chart/chart.model.ts +0 -9
- package/src/lib/api/components/chart/orchart.config.ts +0 -41
- package/src/lib/api/components/chart/orchart.item.ts +0 -33
- package/src/lib/api/components/dropdown/filtro.combo.ts +0 -4
- package/src/lib/api/components/error/error.component.html +0 -3
- package/src/lib/api/components/error/error.component.scss +0 -5
- package/src/lib/api/components/error/error.component.ts +0 -22
- package/src/lib/api/components/error/kverror.module.ts +0 -23
- package/src/lib/api/components/table/action-item.ts +0 -5
- package/src/lib/api/components/table/kv-menuitem.ts +0 -10
- package/src/lib/api/components/table/table.config.column.ts +0 -21
- package/src/lib/api/components/table/table.config.ts +0 -20
- package/src/lib/api/components/table/table.paginate.ts +0 -6
- package/src/lib/api/helpers/component-providers.ts +0 -16
- package/src/lib/api/helpers/keevo-validators.ts +0 -77
- package/src/lib/api/helpers/translate-primeng.ts +0 -25
- package/src/lib/api/models/menu/menu.model.ts +0 -10
- package/src/lib/api/models/menu/sistemamenu.model.ts +0 -8
- package/src/lib/api/modules/primeng.module.ts +0 -125
- package/src/lib/api/services/base.api.service.ts +0 -115
- package/src/lib/api/services/component.service.ts +0 -22
- package/src/lib/api/services/form.service.ts +0 -105
- package/src/lib/api/services/imagens.service.ts +0 -20
- package/src/lib/api/services/notification.service.ts +0 -82
- package/src/lib/api/services/object.service.ts +0 -20
- package/src/lib/buttons/button-personalize/button-personalize.component.html +0 -11
- package/src/lib/buttons/button-personalize/button-personalize.component.scss +0 -3
- package/src/lib/buttons/button-personalize/button-personalize.component.ts +0 -13
- package/src/lib/buttons/button-popup/button-popup.component.html +0 -12
- package/src/lib/buttons/button-popup/button-popup.component.scss +0 -13
- package/src/lib/buttons/button-popup/button-popup.component.ts +0 -30
- package/src/lib/buttons/button-secondary/button-secondary.component.html +0 -12
- package/src/lib/buttons/button-secondary/button-secondary.component.scss +0 -14
- package/src/lib/buttons/button-secondary/button-secondary.component.ts +0 -13
- package/src/lib/buttons/button-success/button-success.component.html +0 -11
- package/src/lib/buttons/button-success/button-success.component.scss +0 -13
- package/src/lib/buttons/button-success/button-success.component.ts +0 -13
- package/src/lib/buttons/kvbutton.module.ts +0 -25
- package/src/lib/chart/chart.component.html +0 -38
- package/src/lib/chart/chart.component.scss +0 -0
- package/src/lib/chart/chart.component.spec.ts +0 -28
- package/src/lib/chart/chart.component.ts +0 -141
- package/src/lib/chart/kvchart.module.ts +0 -20
- package/src/lib/directives/template.directive.ts +0 -15
- package/src/lib/inputs/check/check.component.html +0 -11
- package/src/lib/inputs/check/check.component.scss +0 -13
- package/src/lib/inputs/check/check.component.ts +0 -24
- package/src/lib/inputs/dropdown/dropdown.component.html +0 -91
- package/src/lib/inputs/dropdown/dropdown.component.scss +0 -0
- package/src/lib/inputs/dropdown/dropdown.component.ts +0 -28
- package/src/lib/inputs/editor/editor.component.html +0 -90
- package/src/lib/inputs/editor/editor.component.scss +0 -4
- package/src/lib/inputs/editor/editor.component.ts +0 -80
- package/src/lib/inputs/input-calendar/input-calendar.component.html +0 -30
- package/src/lib/inputs/input-calendar/input-calendar.component.scss +0 -0
- package/src/lib/inputs/input-calendar/input-calendar.component.ts +0 -81
- package/src/lib/inputs/input-mask/input-mask.component.html +0 -20
- package/src/lib/inputs/input-mask/input-mask.component.scss +0 -0
- package/src/lib/inputs/input-mask/input-mask.component.ts +0 -20
- package/src/lib/inputs/input-number/input-number.component.html +0 -22
- package/src/lib/inputs/input-number/input-number.component.scss +0 -0
- package/src/lib/inputs/input-number/input-number.component.ts +0 -52
- package/src/lib/inputs/input-password/input-password.component.html +0 -23
- package/src/lib/inputs/input-password/input-password.component.scss +0 -0
- package/src/lib/inputs/input-password/input-password.component.ts +0 -23
- package/src/lib/inputs/input-text/input-text.component.html +0 -20
- package/src/lib/inputs/input-text/input-text.component.scss +0 -18
- package/src/lib/inputs/input-text/input-text.component.ts +0 -17
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.html +0 -32
- 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 +0 -23
- package/src/lib/inputs/input-text-checkbox/input-text-checkbox.component.ts +0 -36
- package/src/lib/inputs/input-textarea/input-textarea.component.html +0 -22
- package/src/lib/inputs/input-textarea/input-textarea.component.scss +0 -0
- package/src/lib/inputs/input-textarea/input-textarea.component.ts +0 -33
- package/src/lib/inputs/input-time/input-time.component.html +0 -23
- package/src/lib/inputs/input-time/input-time.component.scss +0 -0
- package/src/lib/inputs/input-time/input-time.component.ts +0 -20
- package/src/lib/inputs/kvinputs.module.ts +0 -64
- package/src/lib/inputs/multi-select/multi-select.component.html +0 -28
- package/src/lib/inputs/multi-select/multi-select.component.scss +0 -8
- package/src/lib/inputs/multi-select/multi-select.component.ts +0 -31
- package/src/lib/inputs/radio-group/radio-group.component.html +0 -19
- package/src/lib/inputs/radio-group/radio-group.component.scss +0 -15
- package/src/lib/inputs/radio-group/radio-group.component.ts +0 -50
- package/src/lib/inputs/switch/switch.component.html +0 -12
- package/src/lib/inputs/switch/switch.component.scss +0 -3
- package/src/lib/inputs/switch/switch.component.ts +0 -30
- package/src/lib/keevo-components.module.ts +0 -50
- package/src/lib/label/label.component.html +0 -6
- package/src/lib/label/label.component.scss +0 -9
- package/src/lib/label/label.component.spec.ts +0 -23
- package/src/lib/label/label.component.ts +0 -13
- package/src/lib/label/label.module.ts +0 -18
- package/src/lib/loader/kvloader.module.ts +0 -17
- package/src/lib/loader/loader.component.html +0 -1
- package/src/lib/loader/loader.component.ts +0 -14
- package/src/lib/loader/loader.service.ts +0 -26
- package/src/lib/login/kvlogin.module.ts +0 -28
- package/src/lib/login/login.component.html +0 -108
- package/src/lib/login/login.component.scss +0 -48
- package/src/lib/login/login.component.spec.ts +0 -23
- package/src/lib/login/login.component.ts +0 -65
- package/src/lib/menu/kvmenu.module.ts +0 -27
- package/src/lib/menu/menu.component.html +0 -342
- package/src/lib/menu/menu.component.scss +0 -210
- package/src/lib/menu/menu.component.spec.ts +0 -23
- package/src/lib/menu/menu.component.ts +0 -246
- package/src/lib/orgchart/orgchart.component.html +0 -58
- package/src/lib/orgchart/orgchart.component.scss +0 -21
- package/src/lib/orgchart/orgchart.component.ts +0 -118
- package/src/lib/orgchart/orgchart.module.ts +0 -14
- package/src/lib/page-form/kv-page-form.module.ts +0 -22
- package/src/lib/page-form/page-form.component.html +0 -57
- package/src/lib/page-form/page-form.component.scss +0 -72
- package/src/lib/page-form/page-form.component.spec.ts +0 -28
- package/src/lib/page-form/page-form.component.ts +0 -121
- package/src/lib/picklist/kvpicklist.module.ts +0 -20
- package/src/lib/picklist/picklist.component.html +0 -17
- package/src/lib/picklist/picklist.component.scss +0 -0
- package/src/lib/picklist/picklist.component.spec.ts +0 -26
- package/src/lib/picklist/picklist.component.ts +0 -27
- package/src/lib/pipes/codigofile.pipe.ts +0 -15
- package/src/lib/pipes/cpfcnpj.pipe.ts +0 -21
- package/src/lib/pipes/pipes.module.ts +0 -22
- package/src/lib/pipes/telefone.pipe.ts +0 -38
- package/src/lib/styles-components.scss +0 -11
- package/src/lib/table/kvtable.module.ts +0 -22
- package/src/lib/table/table.component.html +0 -473
- package/src/lib/table/table.component.scss +0 -240
- package/src/lib/table/table.component.spec.ts +0 -28
- package/src/lib/table/table.component.ts +0 -546
- package/src/lib/tree-table/kv-treetable.component.html +0 -649
- package/src/lib/tree-table/kv-treetable.component.scss +0 -315
- package/src/lib/tree-table/kv-treetable.component.ts +0 -390
- package/src/lib/tree-table/kv-treetable.module.ts +0 -18
- package/src/lib/tree-view/kvtree-view.module.ts +0 -19
- package/src/lib/tree-view/tree-view.component.html +0 -9
- package/src/lib/tree-view/tree-view.component.scss +0 -0
- package/src/lib/tree-view/tree-view.component.spec.ts +0 -23
- package/src/lib/tree-view/tree-view.component.ts +0 -29
- package/src/lib/workspace/kvworkspace.module.ts +0 -29
- package/src/lib/workspace/workspace.component.html +0 -108
- package/src/lib/workspace/workspace.component.scss +0 -83
- package/src/lib/workspace/workspace.component.ts +0 -75
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Provider, forwardRef } from "@angular/core";
|
|
2
|
-
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
3
|
-
import { ComponentService } from '../services/component.service';
|
|
4
|
-
|
|
5
|
-
export function ComponentProviders(ref: any): Provider[] {
|
|
6
|
-
return [
|
|
7
|
-
{
|
|
8
|
-
provide: NG_VALUE_ACCESSOR,
|
|
9
|
-
useExisting: forwardRef(() => ref),
|
|
10
|
-
multi: true,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
provide: ComponentService
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
|
2
|
-
|
|
3
|
-
export class KeevoValidators {
|
|
4
|
-
static required(erroMessage?: string): ValidatorFn {
|
|
5
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
6
|
-
if (Validators.required(control))
|
|
7
|
-
return { required: true, erroMessage: `${erroMessage ? erroMessage : 'Campo obrigatório'}` };
|
|
8
|
-
|
|
9
|
-
return null;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
static dateGreaterThan(startControlName: string, erroMessage?: string): ValidatorFn {
|
|
14
|
-
return (endControl: AbstractControl): ValidationErrors | null => {
|
|
15
|
-
const parent = endControl.parent as FormGroup;
|
|
16
|
-
|
|
17
|
-
if (!parent) return null;
|
|
18
|
-
|
|
19
|
-
const startControl: AbstractControl = parent.get(startControlName) as AbstractControl;
|
|
20
|
-
|
|
21
|
-
const startDate: Date = startControl.value;
|
|
22
|
-
const endDate: Date = endControl.value;
|
|
23
|
-
|
|
24
|
-
if (!startDate || !endDate) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
if (startDate > endDate) {
|
|
28
|
-
return { greaterThan: true, erroMessage: erroMessage };
|
|
29
|
-
}
|
|
30
|
-
return null;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
static min(min: number, erroMessage?: string): ValidatorFn {
|
|
35
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
36
|
-
if (Validators.min(min)(control))
|
|
37
|
-
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor maior ou igual à '}${min}` };
|
|
38
|
-
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
static max(min: number, erroMessage?: string): ValidatorFn {
|
|
44
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
45
|
-
if (Validators.max(min)(control))
|
|
46
|
-
return { min: true, erroMessage: `${erroMessage ? erroMessage : 'Informe um valor menor ou igual à '}${min}` };
|
|
47
|
-
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
static email(erroMessage?: string): ValidatorFn {
|
|
53
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
54
|
-
if (Validators.email(control)) {
|
|
55
|
-
return { email: true, erroMessage: `${erroMessage ? erroMessage : 'Endereço de e-mail inválido!'}` };
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static maxLengthArray(max: number): ValidatorFn {
|
|
62
|
-
return (c: AbstractControl): ValidationErrors | null => {
|
|
63
|
-
if (c.value.length < max)
|
|
64
|
-
return null;
|
|
65
|
-
|
|
66
|
-
return { maxLengthArray: true, erroMessage: 'Tamanho máximo excedido!' };
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
static maxLength(max: number, erroMessage?: string): ValidatorFn {
|
|
71
|
-
return (control: AbstractControl): ValidationErrors | null => {
|
|
72
|
-
if (Validators.maxLength(max)(control))
|
|
73
|
-
return { maxLength: true, erroMessage: `${erroMessage ? erroMessage : 'Limite máximo de ${max} caracteres atingido!'}` };
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PrimeNGConfig } from 'primeng/api';
|
|
2
|
-
|
|
3
|
-
export class TranslatePrimeng {
|
|
4
|
-
public config(config: PrimeNGConfig): void {
|
|
5
|
-
config.ripple = true;
|
|
6
|
-
|
|
7
|
-
config.setTranslation({
|
|
8
|
-
monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
|
|
9
|
-
monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
|
|
10
|
-
dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabádo'],
|
|
11
|
-
dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
|
|
12
|
-
dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
|
|
13
|
-
today: 'Hoje',
|
|
14
|
-
weekHeader: 'Semana',
|
|
15
|
-
emptyMessage: 'Nenhum resultado encontrado',
|
|
16
|
-
emptyFilterMessage: 'Nenhum registro encontrado com o filtro informado',
|
|
17
|
-
weak: 'Fraca',
|
|
18
|
-
medium: 'Média',
|
|
19
|
-
strong: 'Forte',
|
|
20
|
-
passwordPrompt: 'Informe a senha',
|
|
21
|
-
clear: 'Limpar',
|
|
22
|
-
apply: 'Aplicar'
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import { AccordionModule } from 'primeng/accordion';
|
|
4
|
-
import { AutoFocusModule } from 'primeng/autofocus';
|
|
5
|
-
import { BadgeModule } from 'primeng/badge';
|
|
6
|
-
import { ButtonModule } from 'primeng/button';
|
|
7
|
-
import { CalendarModule } from 'primeng/calendar';
|
|
8
|
-
import { CardModule } from 'primeng/card';
|
|
9
|
-
import { CarouselModule } from 'primeng/carousel';
|
|
10
|
-
import { ChartModule } from 'primeng/chart';
|
|
11
|
-
import { CheckboxModule } from 'primeng/checkbox';
|
|
12
|
-
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
13
|
-
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
14
|
-
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
15
|
-
import { DataViewModule } from 'primeng/dataview';
|
|
16
|
-
import { DialogModule } from 'primeng/dialog';
|
|
17
|
-
import { DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
18
|
-
import { DividerModule } from 'primeng/divider';
|
|
19
|
-
import { DropdownModule } from 'primeng/dropdown';
|
|
20
|
-
import { DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
21
|
-
import { EditorModule } from 'primeng/editor';
|
|
22
|
-
import { FieldsetModule } from 'primeng/fieldset';
|
|
23
|
-
import { FileUploadModule } from 'primeng/fileupload';
|
|
24
|
-
import { InputMaskModule } from 'primeng/inputmask';
|
|
25
|
-
import { InputNumberModule } from 'primeng/inputnumber';
|
|
26
|
-
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
27
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
28
|
-
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
29
|
-
import { KnobModule } from 'primeng/knob';
|
|
30
|
-
import { MenuModule } from 'primeng/menu';
|
|
31
|
-
import { MessageModule } from 'primeng/message';
|
|
32
|
-
import { MessagesModule } from 'primeng/messages';
|
|
33
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
34
|
-
import { OverlayPanelModule } from 'primeng/overlaypanel';
|
|
35
|
-
import { PanelModule } from 'primeng/panel';
|
|
36
|
-
import { PasswordModule } from 'primeng/password';
|
|
37
|
-
import { PickListModule } from 'primeng/picklist';
|
|
38
|
-
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
39
|
-
import { RatingModule } from 'primeng/rating';
|
|
40
|
-
import { RippleModule } from 'primeng/ripple';
|
|
41
|
-
import { SidebarModule } from 'primeng/sidebar';
|
|
42
|
-
import { SkeletonModule } from 'primeng/skeleton';
|
|
43
|
-
import { SpeedDialModule } from 'primeng/speeddial';
|
|
44
|
-
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
45
|
-
import { StepsModule } from 'primeng/steps'
|
|
46
|
-
import { TabViewModule } from 'primeng/tabview';
|
|
47
|
-
import { TableModule } from 'primeng/table';
|
|
48
|
-
import { ToastModule } from 'primeng/toast';
|
|
49
|
-
import { ToolbarModule } from 'primeng/toolbar';
|
|
50
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
51
|
-
import { OverlayModule } from 'primeng/overlay';
|
|
52
|
-
import { ChipModule } from 'primeng/chip';
|
|
53
|
-
import { TreeModule } from 'primeng/tree';
|
|
54
|
-
import { ProgressBarModule } from 'primeng/progressbar';
|
|
55
|
-
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
56
|
-
import { StyleClassModule } from 'primeng/styleclass';
|
|
57
|
-
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
58
|
-
import { TreeTableModule } from 'primeng/treetable';
|
|
59
|
-
@NgModule({
|
|
60
|
-
exports: [
|
|
61
|
-
AccordionModule,
|
|
62
|
-
AutoFocusModule,
|
|
63
|
-
BadgeModule,
|
|
64
|
-
ButtonModule,
|
|
65
|
-
CalendarModule,
|
|
66
|
-
CardModule,
|
|
67
|
-
CarouselModule,
|
|
68
|
-
ChartModule,
|
|
69
|
-
CheckboxModule,
|
|
70
|
-
ChipModule,
|
|
71
|
-
ConfirmDialogModule,
|
|
72
|
-
ContextMenuModule,
|
|
73
|
-
DataViewModule,
|
|
74
|
-
DialogModule,
|
|
75
|
-
DividerModule,
|
|
76
|
-
DropdownModule,
|
|
77
|
-
DynamicDialogModule,
|
|
78
|
-
EditorModule,
|
|
79
|
-
FieldsetModule,
|
|
80
|
-
FileUploadModule,
|
|
81
|
-
InputMaskModule,
|
|
82
|
-
InputNumberModule,
|
|
83
|
-
InputSwitchModule,
|
|
84
|
-
InputTextModule,
|
|
85
|
-
InputTextareaModule,
|
|
86
|
-
KnobModule,
|
|
87
|
-
MenuModule,
|
|
88
|
-
MessageModule,
|
|
89
|
-
MessagesModule,
|
|
90
|
-
MultiSelectModule,
|
|
91
|
-
OverlayModule,
|
|
92
|
-
OverlayPanelModule,
|
|
93
|
-
OverlayPanelModule,
|
|
94
|
-
PanelModule,
|
|
95
|
-
PanelMenuModule,
|
|
96
|
-
PasswordModule,
|
|
97
|
-
PickListModule,
|
|
98
|
-
ProgressBarModule,
|
|
99
|
-
RadioButtonModule,
|
|
100
|
-
RatingModule,
|
|
101
|
-
RippleModule,
|
|
102
|
-
SidebarModule,
|
|
103
|
-
SkeletonModule,
|
|
104
|
-
SpeedDialModule,
|
|
105
|
-
SplitButtonModule,
|
|
106
|
-
StepsModule,
|
|
107
|
-
TabViewModule,
|
|
108
|
-
TableModule,
|
|
109
|
-
ToastModule,
|
|
110
|
-
ToolbarModule,
|
|
111
|
-
TooltipModule,
|
|
112
|
-
TreeModule,
|
|
113
|
-
StyleClassModule,
|
|
114
|
-
BreadcrumbModule,
|
|
115
|
-
TreeTableModule
|
|
116
|
-
],
|
|
117
|
-
providers: [
|
|
118
|
-
ConfirmationService,
|
|
119
|
-
DialogService,
|
|
120
|
-
DynamicDialogRef,
|
|
121
|
-
DynamicDialogConfig,
|
|
122
|
-
MessageService,
|
|
123
|
-
]
|
|
124
|
-
})
|
|
125
|
-
export class PrimeNgModule { }
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
const httpOptions = {
|
|
6
|
-
headers: new HttpHeaders({
|
|
7
|
-
'Content-Type': 'application/json',
|
|
8
|
-
Accept: 'application/json',
|
|
9
|
-
'Access-Control-Allow-Headers': 'Content-Type',
|
|
10
|
-
}),
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
@Injectable({
|
|
14
|
-
providedIn: 'root',
|
|
15
|
-
})
|
|
16
|
-
export class BaseApiService {
|
|
17
|
-
constructor(private http: HttpClient) { }
|
|
18
|
-
|
|
19
|
-
delete(
|
|
20
|
-
baseUrl: string,
|
|
21
|
-
rota: string) {
|
|
22
|
-
return this.http.delete(`${baseUrl}${rota}`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
deleteAllBody<T>(
|
|
26
|
-
baseUrl: string,
|
|
27
|
-
rota: string,
|
|
28
|
-
body: T): Observable<T[]> {
|
|
29
|
-
return this.http.delete(`${baseUrl}${rota}`, {
|
|
30
|
-
headers: new HttpHeaders({
|
|
31
|
-
'Content-Type': 'application/json',
|
|
32
|
-
}),
|
|
33
|
-
body: body
|
|
34
|
-
}) as Observable<T[]>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
deleteAllHeaders<T>(
|
|
38
|
-
baseUrl: string,
|
|
39
|
-
rota: string,
|
|
40
|
-
headers: HttpHeaders): Observable<T> {
|
|
41
|
-
return this.http.delete(`${baseUrl}${rota}`, {
|
|
42
|
-
headers: headers,
|
|
43
|
-
}) as Observable<T>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
get<T>(
|
|
47
|
-
baseUrl: string,
|
|
48
|
-
rota: string): Observable<T> {
|
|
49
|
-
return this.http.get(`${baseUrl}${rota}`) as Observable<T>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
getHeaders<T>(
|
|
53
|
-
baseUrl: string,
|
|
54
|
-
rota: string,
|
|
55
|
-
headers: HttpHeaders): Observable<T> {
|
|
56
|
-
return this.http.get(`${baseUrl}${rota}`, {
|
|
57
|
-
headers: headers,
|
|
58
|
-
}) as Observable<T>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
getAll<T>(
|
|
62
|
-
baseUrl: string,
|
|
63
|
-
rota: string): Observable<T[]> {
|
|
64
|
-
return this.http.get(`${baseUrl}${rota}`) as Observable<T[]>;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
getAllHeaders<T>(
|
|
68
|
-
baseUrl: string,
|
|
69
|
-
rota: string,
|
|
70
|
-
headers: HttpHeaders): Observable<T[]> {
|
|
71
|
-
return this.http.get(`${baseUrl}${rota}`, {
|
|
72
|
-
headers: headers,
|
|
73
|
-
}) as Observable<T[]>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
getAllParams<T>(
|
|
77
|
-
baseUrl: string,
|
|
78
|
-
rota: string,
|
|
79
|
-
params?: HttpParams): Observable<T[]> {
|
|
80
|
-
return this.http.get(`${baseUrl}${rota}`, {
|
|
81
|
-
params: params,
|
|
82
|
-
}) as Observable<T[]>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
getArquivo(
|
|
86
|
-
baseUrl: string,
|
|
87
|
-
rota: string,
|
|
88
|
-
id?: string,
|
|
89
|
-
paramCabecalho?: { headers: HttpHeaders }
|
|
90
|
-
): Observable<any> {
|
|
91
|
-
return this.http.get<any>(`${baseUrl}${rota}/${id}`, paramCabecalho);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
getArquivos(
|
|
95
|
-
baseUrl: string,
|
|
96
|
-
rota: string,
|
|
97
|
-
paramCabecalho?: { headers: HttpHeaders }
|
|
98
|
-
): Observable<any> {
|
|
99
|
-
return this.http.get<any>(`${baseUrl}${rota}`, paramCabecalho) as Observable<any>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
post<T>(
|
|
103
|
-
baseUrl: string,
|
|
104
|
-
rota: string,
|
|
105
|
-
data?: T): Observable<T> {
|
|
106
|
-
return this.http.post(`${baseUrl}${rota}`, data) as Observable<T>;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
put<T>(
|
|
110
|
-
baseUrl: string,
|
|
111
|
-
rota: string,
|
|
112
|
-
data: T): Observable<T> {
|
|
113
|
-
return this.http.put(`${baseUrl}${rota}`, data) as Observable<T>;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Injectable, Injector } from '@angular/core';
|
|
2
|
-
import { FormControl, FormControlName, FormGroupDirective, NgControl } from '@angular/forms';
|
|
3
|
-
|
|
4
|
-
@Injectable()
|
|
5
|
-
export class ComponentService {
|
|
6
|
-
|
|
7
|
-
constructor(public readonly injector: Injector, public changeDetectorRef: ChangeDetectorRef) { }
|
|
8
|
-
|
|
9
|
-
getFormControl(): FormControl<any> | undefined {
|
|
10
|
-
try {
|
|
11
|
-
const control = this.injector.get(NgControl);
|
|
12
|
-
if (control.constructor === FormControlName) {
|
|
13
|
-
return this.injector.get(FormGroupDirective).getControl(control as FormControlName);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
catch(ex){
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Injectable, Type } from '@angular/core';
|
|
2
|
-
import { FormGroup, ValidatorFn } from '@angular/forms';
|
|
3
|
-
import { ObjectService } from './object.service';
|
|
4
|
-
import { DialogService } from 'primeng/dynamicdialog';
|
|
5
|
-
|
|
6
|
-
export interface paramsDialog {
|
|
7
|
-
id?: any;
|
|
8
|
-
closable?: boolean;
|
|
9
|
-
maximizable?: boolean;
|
|
10
|
-
popup?: boolean;
|
|
11
|
-
height?: string;
|
|
12
|
-
width?: string;
|
|
13
|
-
styleClass?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Injectable({
|
|
17
|
-
providedIn: 'root'
|
|
18
|
-
})
|
|
19
|
-
export class FormService {
|
|
20
|
-
|
|
21
|
-
static disableControl(formGroup: FormGroup, controName: string) {
|
|
22
|
-
formGroup?.controls[controName]?.disable();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static disableAndClearControl(formGroup: FormGroup, controName: string, value?: any) {
|
|
26
|
-
this.disableControl(formGroup, controName);
|
|
27
|
-
this.setControlValue(formGroup, controName, null || value);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static enableControl(formGroup: FormGroup, controName: string) {
|
|
31
|
-
formGroup?.controls[controName]?.enable();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
static getFormValue<T>(formGroup: FormGroup, controName: string): T {
|
|
35
|
-
return <T>formGroup?.controls[controName]?.value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static hasControlError(formGroup: FormGroup, control: string, errorCode?: string): boolean {
|
|
39
|
-
const formControl = formGroup.get(control);
|
|
40
|
-
let hasError: boolean = false;
|
|
41
|
-
|
|
42
|
-
if (!formControl) return false;
|
|
43
|
-
if (errorCode) hasError = formControl.hasError(errorCode);
|
|
44
|
-
else hasError = formControl.errors ? true : false;
|
|
45
|
-
|
|
46
|
-
return hasError && formControl.touched;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
static invalidForm(formGroup: FormGroup, notification?: any) {
|
|
50
|
-
const keys = Object.keys(formGroup.getRawValue());
|
|
51
|
-
|
|
52
|
-
keys.forEach(k => {
|
|
53
|
-
const control = formGroup.controls[k];
|
|
54
|
-
|
|
55
|
-
if (notification) {
|
|
56
|
-
if (notification?.item2) {
|
|
57
|
-
const item = ObjectService.findObject(notification.item2, 'property', k);
|
|
58
|
-
if (item) control.setErrors({ backendError: true, erroMessage: item.message });
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
const item = ObjectService.findObject(notification, 'key', k);
|
|
62
|
-
if (item) control.setErrors({ backendError: true, erroMessage: item.message });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (!control.valid) {
|
|
67
|
-
control.markAsTouched();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
static openDialog(
|
|
73
|
-
dialogService: DialogService,
|
|
74
|
-
componentType: Type<any>,
|
|
75
|
-
callBackFunction: Function,
|
|
76
|
-
paramsDialog?: paramsDialog
|
|
77
|
-
) {
|
|
78
|
-
const ref = dialogService.open(componentType, {
|
|
79
|
-
closable: paramsDialog?.closable || false,
|
|
80
|
-
maximizable: paramsDialog?.maximizable || false,
|
|
81
|
-
height: paramsDialog?.height || 'auto',
|
|
82
|
-
width: paramsDialog?.width,
|
|
83
|
-
styleClass: paramsDialog?.styleClass,
|
|
84
|
-
showHeader: true,
|
|
85
|
-
data: { id: paramsDialog?.id, popup: paramsDialog?.popup && true }
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
ref.onClose.subscribe((data: any) => {
|
|
89
|
-
if (data) callBackFunction(data);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
static setControlValue(formGroup: FormGroup, controName: string, value: any) {
|
|
94
|
-
formGroup?.controls[controName]?.setValue(value);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static setValidators(formGroup: FormGroup, controName: string, validators: ValidatorFn | ValidatorFn[] | null) {
|
|
98
|
-
formGroup?.controls[controName]?.setValidators(validators);
|
|
99
|
-
formGroup?.controls[controName]?.updateValueAndValidity();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
static clearValidators(formGroup: FormGroup, controName: string) {
|
|
103
|
-
formGroup?.controls[controName]?.updateValueAndValidity();
|
|
104
|
-
}
|
|
105
|
-
}
|