keevo-components 1.6.7 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/esm2022/keevo-components.mjs +4 -4
- package/esm2022/lib/api/base-components/base-component-button.mjs +36 -36
- package/esm2022/lib/api/base-components/base-component-chart.mjs +92 -92
- package/esm2022/lib/api/base-components/base-component-crud-form.mjs +279 -279
- package/esm2022/lib/api/base-components/base-component-crud-list.mjs +68 -68
- package/esm2022/lib/api/base-components/base-component-crud.mjs +65 -65
- package/esm2022/lib/api/base-components/base-component-dropdown-external.mjs +31 -0
- package/esm2022/lib/api/base-components/base-component-dropdown.mjs +161 -161
- package/esm2022/lib/api/base-components/base-component-input.mjs +94 -94
- package/esm2022/lib/api/base-components/base-component-multi-select.mjs +130 -130
- package/esm2022/lib/api/base-components/base-component.mjs +49 -49
- package/esm2022/lib/api/components/chart/chart.config.mjs +2 -2
- package/esm2022/lib/api/components/chart/chart.model.mjs +2 -2
- package/esm2022/lib/api/components/chart/orchart.config.mjs +2 -2
- package/esm2022/lib/api/components/chart/orchart.item.mjs +2 -2
- package/esm2022/lib/api/components/dropdown/filtro.combo.mjs +2 -2
- package/esm2022/lib/api/components/error/error.component.mjs +26 -26
- package/esm2022/lib/api/components/error/kverror.module.mjs +35 -35
- package/esm2022/lib/api/components/table/action-item.mjs +2 -2
- package/esm2022/lib/api/components/table/kv-menuitem.mjs +3 -3
- package/esm2022/lib/api/components/table/table.config.column.mjs +2 -2
- package/esm2022/lib/api/components/table/table.config.mjs +2 -2
- package/esm2022/lib/api/components/table/table.paginate.mjs +9 -9
- package/esm2022/lib/api/helpers/component-providers.mjs +16 -16
- package/esm2022/lib/api/helpers/keevo-validators.mjs +64 -64
- package/esm2022/lib/api/helpers/translate-primeng.mjs +23 -23
- package/esm2022/lib/api/models/menu/menu.model.mjs +2 -2
- package/esm2022/lib/api/models/menu/menucompleto.model.mjs +2 -2
- package/esm2022/lib/api/models/menu/sistemamenu.model.mjs +2 -2
- package/esm2022/lib/api/modules/primeng.module.mjs +251 -251
- package/esm2022/lib/api/services/base.api.service.mjs +74 -74
- package/esm2022/lib/api/services/breadcrumbs.service.mjs +57 -57
- package/esm2022/lib/api/services/component.service.mjs +27 -27
- package/esm2022/lib/api/services/form.service.mjs +84 -84
- package/esm2022/lib/api/services/imagens.service.mjs +25 -25
- package/esm2022/lib/api/services/notification.service.mjs +67 -67
- package/esm2022/lib/api/services/object.service.mjs +26 -26
- package/esm2022/lib/avatar/avatar.component.mjs +64 -40
- package/esm2022/lib/avatar/kv-avatar.module.mjs +24 -20
- package/esm2022/lib/buttons/button-personalize/button-personalize.component.mjs +17 -17
- package/esm2022/lib/buttons/button-popup/button-popup.component.mjs +31 -31
- package/esm2022/lib/buttons/button-secondary/button-secondary.component.mjs +17 -17
- package/esm2022/lib/buttons/button-success/button-success.component.mjs +17 -17
- package/esm2022/lib/buttons/kvbutton.module.mjs +39 -39
- package/esm2022/lib/chart/chart.component.mjs +145 -145
- package/esm2022/lib/chart/kvchart.module.mjs +32 -32
- package/esm2022/lib/directives/template.directive.mjs +24 -24
- package/esm2022/lib/inputs/check/check.component.mjs +26 -26
- package/esm2022/lib/inputs/dropdown/dropdown.component.mjs +37 -37
- package/esm2022/lib/inputs/editor/editor.component.mjs +88 -88
- package/esm2022/lib/inputs/input-calendar/input-calendar.component.mjs +89 -89
- package/esm2022/lib/inputs/input-mask/input-mask.component.mjs +23 -23
- package/esm2022/lib/inputs/input-number/input-number.component.mjs +59 -59
- package/esm2022/lib/inputs/input-password/input-password.component.mjs +33 -33
- package/esm2022/lib/inputs/input-text/input-text.component.mjs +21 -21
- package/esm2022/lib/inputs/input-text-checkbox/input-text-checkbox.component.mjs +42 -42
- package/esm2022/lib/inputs/input-textarea/input-textarea.component.mjs +43 -43
- package/esm2022/lib/inputs/input-time/input-time.component.mjs +24 -24
- package/esm2022/lib/inputs/kvinputs.module.mjs +108 -108
- package/esm2022/lib/inputs/multi-select/multi-select.component.mjs +41 -41
- package/esm2022/lib/inputs/radio-group/radio-group.component.mjs +53 -53
- package/esm2022/lib/inputs/switch/switch.component.mjs +32 -32
- package/esm2022/lib/keevo-components.module.mjs +112 -112
- package/esm2022/lib/label/label.component.mjs +15 -15
- package/esm2022/lib/label/label.module.mjs +24 -24
- package/esm2022/lib/loader/kvloader.module.mjs +28 -28
- package/esm2022/lib/loader/loader.component.mjs +17 -17
- package/esm2022/lib/loader/loader.service.mjs +29 -29
- package/esm2022/lib/login/kvlogin.module.mjs +47 -47
- package/esm2022/lib/login/login.component.mjs +52 -52
- package/esm2022/lib/menu/kvmenu.module.mjs +43 -43
- package/esm2022/lib/menu/menu.component.mjs +215 -215
- package/esm2022/lib/orgchart/orgchart.component.mjs +100 -100
- package/esm2022/lib/orgchart/orgchart.module.mjs +24 -24
- package/esm2022/lib/page-form/kv-page-form.module.mjs +38 -38
- package/esm2022/lib/page-form/page-form.component.mjs +147 -147
- package/esm2022/lib/picklist/kvpicklist.module.mjs +32 -32
- package/esm2022/lib/picklist/picklist.component.mjs +48 -48
- package/esm2022/lib/pipes/codigofile.pipe.mjs +19 -19
- package/esm2022/lib/pipes/cpfcnpj.pipe.mjs +25 -25
- package/esm2022/lib/pipes/pipes.module.mjs +34 -34
- package/esm2022/lib/pipes/telefone.pipe.mjs +45 -45
- package/esm2022/lib/table/kvtable.module.mjs +32 -32
- package/esm2022/lib/table/table.component.mjs +499 -499
- package/esm2022/lib/tree-table/kv-treetable.component.mjs +371 -371
- package/esm2022/lib/tree-table/kv-treetable.module.mjs +32 -32
- package/esm2022/lib/tree-view/kvtree-view.module.mjs +28 -28
- package/esm2022/lib/tree-view/tree-view.component.mjs +30 -30
- package/esm2022/lib/workspace/kvworkspace.module.mjs +47 -47
- package/esm2022/lib/workspace/workspace.component.mjs +77 -77
- package/esm2022/public-api.mjs +144 -144
- package/fesm2022/keevo-components.mjs +4458 -4601
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/api/base-components/base-component-button.d.ts +14 -14
- package/lib/api/base-components/base-component-chart.d.ts +40 -40
- package/lib/api/base-components/base-component-crud-form.d.ts +138 -138
- package/lib/api/base-components/base-component-crud-list.d.ts +63 -63
- package/lib/api/base-components/base-component-crud.d.ts +36 -36
- package/lib/api/base-components/base-component-dropdown-external.d.ts +15 -0
- package/lib/api/base-components/base-component-dropdown.d.ts +42 -42
- package/lib/api/base-components/base-component-input.d.ts +31 -31
- package/lib/api/base-components/base-component-multi-select.d.ts +35 -35
- package/lib/api/base-components/base-component.d.ts +21 -21
- package/lib/api/components/chart/chart.config.d.ts +11 -11
- package/lib/api/components/chart/chart.model.d.ts +9 -9
- package/lib/api/components/chart/orchart.config.d.ts +35 -35
- package/lib/api/components/chart/orchart.item.d.ts +26 -26
- package/lib/api/components/dropdown/filtro.combo.d.ts +4 -4
- package/lib/api/components/error/error.component.d.ts +12 -12
- package/lib/api/components/error/kverror.module.d.ts +10 -10
- package/lib/api/components/table/action-item.d.ts +5 -5
- package/lib/api/components/table/kv-menuitem.d.ts +9 -9
- package/lib/api/components/table/table.config.column.d.ts +21 -21
- package/lib/api/components/table/table.config.d.ts +17 -17
- package/lib/api/components/table/table.paginate.d.ts +6 -6
- package/lib/api/helpers/component-providers.d.ts +2 -2
- package/lib/api/helpers/keevo-validators.d.ts +10 -10
- package/lib/api/helpers/translate-primeng.d.ts +4 -4
- package/lib/api/models/menu/menu.model.d.ts +10 -10
- package/lib/api/models/menu/menucompleto.model.d.ts +6 -6
- package/lib/api/models/menu/sistemamenu.model.d.ts +8 -8
- package/lib/api/modules/primeng.module.d.ts +61 -61
- package/lib/api/services/base.api.service.d.ts +25 -25
- package/lib/api/services/breadcrumbs.service.d.ts +16 -16
- package/lib/api/services/component.service.d.ts +11 -11
- package/lib/api/services/form.service.d.ts +27 -27
- package/lib/api/services/imagens.service.d.ts +9 -9
- package/lib/api/services/notification.service.d.ts +25 -25
- package/lib/api/services/object.service.d.ts +8 -8
- package/lib/avatar/avatar.component.d.ts +19 -14
- package/lib/avatar/kv-avatar.module.d.ts +8 -7
- package/lib/buttons/button-personalize/button-personalize.component.d.ts +7 -7
- package/lib/buttons/button-popup/button-popup.component.d.ts +13 -13
- package/lib/buttons/button-secondary/button-secondary.component.d.ts +7 -7
- package/lib/buttons/button-success/button-success.component.d.ts +7 -7
- package/lib/buttons/kvbutton.module.d.ts +11 -11
- package/lib/chart/chart.component.d.ts +56 -56
- package/lib/chart/kvchart.module.d.ts +10 -10
- package/lib/directives/template.directive.d.ts +11 -11
- package/lib/inputs/check/check.component.d.ts +11 -11
- package/lib/inputs/dropdown/dropdown.component.d.ts +14 -14
- package/lib/inputs/editor/editor.component.d.ts +36 -36
- package/lib/inputs/input-calendar/input-calendar.component.d.ts +27 -27
- package/lib/inputs/input-mask/input-mask.component.d.ts +10 -10
- package/lib/inputs/input-number/input-number.component.d.ts +19 -19
- package/lib/inputs/input-password/input-password.component.d.ts +13 -13
- package/lib/inputs/input-text/input-text.component.d.ts +9 -9
- package/lib/inputs/input-text-checkbox/input-text-checkbox.component.d.ts +16 -16
- package/lib/inputs/input-textarea/input-textarea.component.d.ts +16 -16
- package/lib/inputs/input-time/input-time.component.d.ts +10 -10
- package/lib/inputs/kvinputs.module.d.ts +25 -25
- package/lib/inputs/multi-select/multi-select.component.d.ts +14 -14
- package/lib/inputs/radio-group/radio-group.component.d.ts +18 -18
- package/lib/inputs/switch/switch.component.d.ts +13 -13
- package/lib/keevo-components.module.d.ts +20 -20
- package/lib/label/label.component.d.ts +7 -7
- package/lib/label/label.module.d.ts +8 -8
- package/lib/loader/kvloader.module.d.ts +9 -9
- package/lib/loader/loader.component.d.ts +8 -8
- package/lib/loader/loader.service.d.ts +10 -10
- package/lib/login/kvlogin.module.d.ts +13 -13
- package/lib/login/login.component.d.ts +30 -30
- package/lib/menu/kvmenu.module.d.ts +12 -12
- package/lib/menu/menu.component.d.ts +73 -73
- package/lib/orgchart/orgchart.component.d.ts +27 -27
- package/lib/orgchart/orgchart.module.d.ts +9 -9
- package/lib/page-form/kv-page-form.module.d.ts +11 -11
- package/lib/page-form/page-form.component.d.ts +70 -70
- package/lib/picklist/kvpicklist.module.d.ts +10 -10
- package/lib/picklist/picklist.component.d.ts +20 -20
- package/lib/pipes/codigofile.pipe.d.ts +7 -7
- package/lib/pipes/cpfcnpj.pipe.d.ts +7 -7
- package/lib/pipes/pipes.module.d.ts +10 -10
- package/lib/pipes/telefone.pipe.d.ts +7 -7
- package/lib/table/kvtable.module.d.ts +10 -10
- package/lib/table/table.component.d.ts +104 -104
- package/lib/tree-table/kv-treetable.component.d.ts +85 -85
- package/lib/tree-table/kv-treetable.module.d.ts +11 -11
- package/lib/tree-view/kvtree-view.module.d.ts +9 -9
- package/lib/tree-view/tree-view.component.d.ts +14 -14
- package/lib/workspace/kvworkspace.module.d.ts +13 -13
- package/lib/workspace/workspace.component.d.ts +28 -28
- package/package.json +1 -1
- package/public-api.d.ts +140 -140
- package/esm2022/lib/api/base-components/base-component-dropdown-new.mjs +0 -211
- package/lib/api/base-components/base-component-dropdown-new.d.ts +0 -14
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { CheckComponent } from './check/check.component';
|
|
5
|
-
import { DropdownComponent } from './dropdown/dropdown.component';
|
|
6
|
-
import { InputCalendarComponent } from './input-calendar/input-calendar.component';
|
|
7
|
-
import { InputMaskComponent } from './input-mask/input-mask.component';
|
|
8
|
-
import { InputNumberComponent } from './input-number/input-number.component';
|
|
9
|
-
import { InputPasswordComponent } from './input-password/input-password.component';
|
|
10
|
-
import { InputTextComponent } from './input-text/input-text.component';
|
|
11
|
-
import { InputTextareaComponent } from './input-textarea/input-textarea.component';
|
|
12
|
-
import { InputTimeComponent } from './input-time/input-time.component';
|
|
13
|
-
import { MultiSelectComponent } from './multi-select/multi-select.component';
|
|
14
|
-
import { SwitchComponent } from './switch/switch.component';
|
|
15
|
-
import { kvErrorModule } from '../api/components/error/kverror.module';
|
|
16
|
-
import { PrimeNgModule } from '../api/modules/primeng.module';
|
|
17
|
-
import { RadioGroupComponent } from './radio-group/radio-group.component';
|
|
18
|
-
import { InputTextCheckboxComponent } from './input-text-checkbox/input-text-checkbox.component';
|
|
19
|
-
import { LabelModule } from '../label/label.module';
|
|
20
|
-
import { EditorComponent } from './editor/editor.component';
|
|
21
|
-
import * as i0 from "@angular/core";
|
|
22
|
-
export class KvInputsModule {
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
24
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, declarations: [CheckComponent,
|
|
25
|
-
DropdownComponent,
|
|
26
|
-
InputCalendarComponent,
|
|
27
|
-
InputMaskComponent,
|
|
28
|
-
InputNumberComponent,
|
|
29
|
-
InputPasswordComponent,
|
|
30
|
-
InputTextComponent,
|
|
31
|
-
InputTextareaComponent,
|
|
32
|
-
InputTimeComponent,
|
|
33
|
-
MultiSelectComponent,
|
|
34
|
-
SwitchComponent,
|
|
35
|
-
RadioGroupComponent,
|
|
36
|
-
InputTextCheckboxComponent,
|
|
37
|
-
EditorComponent], imports: [CommonModule,
|
|
38
|
-
FormsModule,
|
|
39
|
-
kvErrorModule,
|
|
40
|
-
PrimeNgModule,
|
|
41
|
-
ReactiveFormsModule,
|
|
42
|
-
LabelModule], exports: [CheckComponent,
|
|
43
|
-
DropdownComponent,
|
|
44
|
-
InputCalendarComponent,
|
|
45
|
-
InputMaskComponent,
|
|
46
|
-
InputNumberComponent,
|
|
47
|
-
InputPasswordComponent,
|
|
48
|
-
InputTextComponent,
|
|
49
|
-
InputTextareaComponent,
|
|
50
|
-
InputTimeComponent,
|
|
51
|
-
MultiSelectComponent,
|
|
52
|
-
SwitchComponent,
|
|
53
|
-
RadioGroupComponent,
|
|
54
|
-
InputTextCheckboxComponent,
|
|
55
|
-
EditorComponent] }); }
|
|
56
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, imports: [CommonModule,
|
|
57
|
-
FormsModule,
|
|
58
|
-
kvErrorModule,
|
|
59
|
-
PrimeNgModule,
|
|
60
|
-
ReactiveFormsModule,
|
|
61
|
-
LabelModule] }); }
|
|
62
|
-
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, decorators: [{
|
|
64
|
-
type: NgModule,
|
|
65
|
-
args: [{
|
|
66
|
-
declarations: [
|
|
67
|
-
CheckComponent,
|
|
68
|
-
DropdownComponent,
|
|
69
|
-
InputCalendarComponent,
|
|
70
|
-
InputMaskComponent,
|
|
71
|
-
InputNumberComponent,
|
|
72
|
-
InputPasswordComponent,
|
|
73
|
-
InputTextComponent,
|
|
74
|
-
InputTextareaComponent,
|
|
75
|
-
InputTimeComponent,
|
|
76
|
-
MultiSelectComponent,
|
|
77
|
-
SwitchComponent,
|
|
78
|
-
RadioGroupComponent,
|
|
79
|
-
InputTextCheckboxComponent,
|
|
80
|
-
EditorComponent
|
|
81
|
-
],
|
|
82
|
-
imports: [
|
|
83
|
-
CommonModule,
|
|
84
|
-
FormsModule,
|
|
85
|
-
kvErrorModule,
|
|
86
|
-
PrimeNgModule,
|
|
87
|
-
ReactiveFormsModule,
|
|
88
|
-
LabelModule
|
|
89
|
-
],
|
|
90
|
-
exports: [
|
|
91
|
-
CheckComponent,
|
|
92
|
-
DropdownComponent,
|
|
93
|
-
InputCalendarComponent,
|
|
94
|
-
InputMaskComponent,
|
|
95
|
-
InputNumberComponent,
|
|
96
|
-
InputPasswordComponent,
|
|
97
|
-
InputTextComponent,
|
|
98
|
-
InputTextareaComponent,
|
|
99
|
-
InputTimeComponent,
|
|
100
|
-
MultiSelectComponent,
|
|
101
|
-
SwitchComponent,
|
|
102
|
-
RadioGroupComponent,
|
|
103
|
-
InputTextCheckboxComponent,
|
|
104
|
-
EditorComponent
|
|
105
|
-
]
|
|
106
|
-
}]
|
|
107
|
-
}] });
|
|
108
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { CheckComponent } from './check/check.component';
|
|
5
|
+
import { DropdownComponent } from './dropdown/dropdown.component';
|
|
6
|
+
import { InputCalendarComponent } from './input-calendar/input-calendar.component';
|
|
7
|
+
import { InputMaskComponent } from './input-mask/input-mask.component';
|
|
8
|
+
import { InputNumberComponent } from './input-number/input-number.component';
|
|
9
|
+
import { InputPasswordComponent } from './input-password/input-password.component';
|
|
10
|
+
import { InputTextComponent } from './input-text/input-text.component';
|
|
11
|
+
import { InputTextareaComponent } from './input-textarea/input-textarea.component';
|
|
12
|
+
import { InputTimeComponent } from './input-time/input-time.component';
|
|
13
|
+
import { MultiSelectComponent } from './multi-select/multi-select.component';
|
|
14
|
+
import { SwitchComponent } from './switch/switch.component';
|
|
15
|
+
import { kvErrorModule } from '../api/components/error/kverror.module';
|
|
16
|
+
import { PrimeNgModule } from '../api/modules/primeng.module';
|
|
17
|
+
import { RadioGroupComponent } from './radio-group/radio-group.component';
|
|
18
|
+
import { InputTextCheckboxComponent } from './input-text-checkbox/input-text-checkbox.component';
|
|
19
|
+
import { LabelModule } from '../label/label.module';
|
|
20
|
+
import { EditorComponent } from './editor/editor.component';
|
|
21
|
+
import * as i0 from "@angular/core";
|
|
22
|
+
export class KvInputsModule {
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
24
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, declarations: [CheckComponent,
|
|
25
|
+
DropdownComponent,
|
|
26
|
+
InputCalendarComponent,
|
|
27
|
+
InputMaskComponent,
|
|
28
|
+
InputNumberComponent,
|
|
29
|
+
InputPasswordComponent,
|
|
30
|
+
InputTextComponent,
|
|
31
|
+
InputTextareaComponent,
|
|
32
|
+
InputTimeComponent,
|
|
33
|
+
MultiSelectComponent,
|
|
34
|
+
SwitchComponent,
|
|
35
|
+
RadioGroupComponent,
|
|
36
|
+
InputTextCheckboxComponent,
|
|
37
|
+
EditorComponent], imports: [CommonModule,
|
|
38
|
+
FormsModule,
|
|
39
|
+
kvErrorModule,
|
|
40
|
+
PrimeNgModule,
|
|
41
|
+
ReactiveFormsModule,
|
|
42
|
+
LabelModule], exports: [CheckComponent,
|
|
43
|
+
DropdownComponent,
|
|
44
|
+
InputCalendarComponent,
|
|
45
|
+
InputMaskComponent,
|
|
46
|
+
InputNumberComponent,
|
|
47
|
+
InputPasswordComponent,
|
|
48
|
+
InputTextComponent,
|
|
49
|
+
InputTextareaComponent,
|
|
50
|
+
InputTimeComponent,
|
|
51
|
+
MultiSelectComponent,
|
|
52
|
+
SwitchComponent,
|
|
53
|
+
RadioGroupComponent,
|
|
54
|
+
InputTextCheckboxComponent,
|
|
55
|
+
EditorComponent] }); }
|
|
56
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, imports: [CommonModule,
|
|
57
|
+
FormsModule,
|
|
58
|
+
kvErrorModule,
|
|
59
|
+
PrimeNgModule,
|
|
60
|
+
ReactiveFormsModule,
|
|
61
|
+
LabelModule] }); }
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputsModule, decorators: [{
|
|
64
|
+
type: NgModule,
|
|
65
|
+
args: [{
|
|
66
|
+
declarations: [
|
|
67
|
+
CheckComponent,
|
|
68
|
+
DropdownComponent,
|
|
69
|
+
InputCalendarComponent,
|
|
70
|
+
InputMaskComponent,
|
|
71
|
+
InputNumberComponent,
|
|
72
|
+
InputPasswordComponent,
|
|
73
|
+
InputTextComponent,
|
|
74
|
+
InputTextareaComponent,
|
|
75
|
+
InputTimeComponent,
|
|
76
|
+
MultiSelectComponent,
|
|
77
|
+
SwitchComponent,
|
|
78
|
+
RadioGroupComponent,
|
|
79
|
+
InputTextCheckboxComponent,
|
|
80
|
+
EditorComponent
|
|
81
|
+
],
|
|
82
|
+
imports: [
|
|
83
|
+
CommonModule,
|
|
84
|
+
FormsModule,
|
|
85
|
+
kvErrorModule,
|
|
86
|
+
PrimeNgModule,
|
|
87
|
+
ReactiveFormsModule,
|
|
88
|
+
LabelModule
|
|
89
|
+
],
|
|
90
|
+
exports: [
|
|
91
|
+
CheckComponent,
|
|
92
|
+
DropdownComponent,
|
|
93
|
+
InputCalendarComponent,
|
|
94
|
+
InputMaskComponent,
|
|
95
|
+
InputNumberComponent,
|
|
96
|
+
InputPasswordComponent,
|
|
97
|
+
InputTextComponent,
|
|
98
|
+
InputTextareaComponent,
|
|
99
|
+
InputTimeComponent,
|
|
100
|
+
MultiSelectComponent,
|
|
101
|
+
SwitchComponent,
|
|
102
|
+
RadioGroupComponent,
|
|
103
|
+
InputTextCheckboxComponent,
|
|
104
|
+
EditorComponent
|
|
105
|
+
]
|
|
106
|
+
}]
|
|
107
|
+
}] });
|
|
108
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3ZpbnB1dHMubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2lucH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tc01vZHVsZSxcclxuICAgIGt2RXJyb3JNb2R1bGUsXHJcbiAgICBQcmltZU5nTW9kdWxlLFxyXG4gICAgUmVhY3RpdmVGb3Jtc01vZHVsZSxcclxuICAgIExhYmVsTW9kdWxlXHJcbiAgXSxcclxuICBleHBvcnRzOiBbXHJcbiAgICBDaGVja0NvbXBvbmVudCxcclxuICAgIERyb3Bkb3duQ29tcG9uZW50LFxyXG4gICAgSW5wdXRDYWxlbmRhckNvbXBvbmVudCxcclxuICAgIElucHV0TWFza0NvbXBvbmVudCxcclxuICAgIElucHV0TnVtYmVyQ29tcG9uZW50LFxyXG4gICAgSW5wdXRQYXNzd29yZENvbXBvbmVudCxcclxuICAgIElucHV0VGV4dENvbXBvbmVudCxcclxuICAgIElucHV0VGV4dGFyZWFDb21wb25lbnQsXHJcbiAgICBJbnB1dFRpbWVDb21wb25lbnQsXHJcbiAgICBNdWx0aVNlbGVjdENvbXBvbmVudCxcclxuICAgIFN3aXRjaENvbXBvbmVudCxcclxuICAgIFJhZGlvR3JvdXBDb21wb25lbnQsXHJcbiAgICBJbnB1dFRleHRDaGVja2JveENvbXBvbmVudCxcclxuICAgIEVkaXRvckNvbXBvbmVudFxyXG4gIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIEt2SW5wdXRzTW9kdWxlIHsgfVxyXG4iXX0=
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
3
|
-
import { BaseComponentMultiSelect } from '../../api/base-components/base-component-multi-select';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../../api/services/component.service";
|
|
6
|
-
import * as i2 from "@angular/common";
|
|
7
|
-
import * as i3 from "@angular/forms";
|
|
8
|
-
import * as i4 from "../../api/components/error/error.component";
|
|
9
|
-
import * as i5 from "primeng/api";
|
|
10
|
-
import * as i6 from "primeng/multiselect";
|
|
11
|
-
import * as i7 from "../../label/label.component";
|
|
12
|
-
export class MultiSelectComponent extends BaseComponentMultiSelect {
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
super.ngOnInit();
|
|
15
|
-
if (this.optionInactive == true) {
|
|
16
|
-
this.inactiveOptions = 'inactive';
|
|
17
|
-
this.options.map((element, index) => {
|
|
18
|
-
Object.defineProperty(element, 'inactive', {
|
|
19
|
-
value: true,
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
constructor(componentService) {
|
|
25
|
-
super(componentService);
|
|
26
|
-
this.group = false;
|
|
27
|
-
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectComponent, selector: "kv-multi-select", inputs: { optionInactive: "optionInactive", group: "group", itemTemplate: "itemTemplate" }, providers: ComponentProviders(MultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n\n <p-multiSelect\n appendTo=\"body\"\n display=\"chip\"\n inputId=\"multiselect\"\n styleClass=\"inputs\"\n [class]=\"baseInputClass\"\n [group]=\"group\"\n [disabled]=\"disabled\"\n [options]=\"options\"\n [optionDisabled]=\" inactiveOptions\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [(ngModel)]=\"value\"\n (onChange)=\"selectionChange($event)\"\n (onPanelHide)=\"panelHide($event)\"\n >\n\n\n <ng-template\n let-item\n pTemplate=\"item\"\n *ngIf=\"itemTemplate\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n >\n\n </ng-container>\n </ng-template>\n\n\n </p-multiSelect>\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i5.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i7.LabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }] }); }
|
|
30
|
-
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
32
|
-
type: Component,
|
|
33
|
-
args: [{ selector: 'kv-multi-select', providers: ComponentProviders(MultiSelectComponent), template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n\n <p-multiSelect\n appendTo=\"body\"\n display=\"chip\"\n inputId=\"multiselect\"\n styleClass=\"inputs\"\n [class]=\"baseInputClass\"\n [group]=\"group\"\n [disabled]=\"disabled\"\n [options]=\"options\"\n [optionDisabled]=\" inactiveOptions\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [(ngModel)]=\"value\"\n (onChange)=\"selectionChange($event)\"\n (onPanelHide)=\"panelHide($event)\"\n >\n\n\n <ng-template\n let-item\n pTemplate=\"item\"\n *ngIf=\"itemTemplate\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n >\n\n </ng-container>\n </ng-template>\n\n\n </p-multiSelect>\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
34
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { optionInactive: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], group: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], itemTemplate: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}] } });
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
3
|
+
import { BaseComponentMultiSelect } from '../../api/base-components/base-component-multi-select';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../api/services/component.service";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
7
|
+
import * as i3 from "@angular/forms";
|
|
8
|
+
import * as i4 from "../../api/components/error/error.component";
|
|
9
|
+
import * as i5 from "primeng/api";
|
|
10
|
+
import * as i6 from "primeng/multiselect";
|
|
11
|
+
import * as i7 from "../../label/label.component";
|
|
12
|
+
export class MultiSelectComponent extends BaseComponentMultiSelect {
|
|
13
|
+
ngOnInit() {
|
|
14
|
+
super.ngOnInit();
|
|
15
|
+
if (this.optionInactive == true) {
|
|
16
|
+
this.inactiveOptions = 'inactive';
|
|
17
|
+
this.options.map((element, index) => {
|
|
18
|
+
Object.defineProperty(element, 'inactive', {
|
|
19
|
+
value: true,
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
constructor(componentService) {
|
|
25
|
+
super(componentService);
|
|
26
|
+
this.group = false;
|
|
27
|
+
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectComponent, selector: "kv-multi-select", inputs: { optionInactive: "optionInactive", group: "group", itemTemplate: "itemTemplate" }, providers: ComponentProviders(MultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n styleClass=\"inputs\"\r\n [class]=\"baseInputClass\"\r\n [group]=\"group\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [optionDisabled]=\" inactiveOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onPanelHide)=\"panelHide($event)\"\r\n >\r\n\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n </p-multiSelect>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i5.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i7.LabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }] }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{ selector: 'kv-multi-select', providers: ComponentProviders(MultiSelectComponent), template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n styleClass=\"inputs\"\r\n [class]=\"baseInputClass\"\r\n [group]=\"group\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [optionDisabled]=\" inactiveOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onPanelHide)=\"panelHide($event)\"\r\n >\r\n\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n </p-multiSelect>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
34
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { optionInactive: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}], group: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}], itemTemplate: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}] } });
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGktc2VsZWN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9pbnB1dHMvbXVsdGktc2VsZWN0L211bHRpLXNlbGVjdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rZWV2by1jb21wb25lbnRzL3NyYy9saWIvaW5wdXRzL211bHRpLXNlbGVjdC9tdWx0aS1zZWxlY3QuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQWUsTUFBTSxlQUFlLENBQUM7QUFDOUQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFFM0UsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sdURBQXVELENBQUM7Ozs7Ozs7OztBQVFqRyxNQUFNLE9BQU8sb0JBQXFCLFNBQVEsd0JBQXdCO0lBUXZELFFBQVE7UUFDZixLQUFLLENBQUMsUUFBUSxFQUFFLENBQUM7UUFDakIsSUFBSSxJQUFJLENBQUMsY0FBYyxJQUFJLElBQUksRUFBRTtZQUMvQixJQUFJLENBQUMsZUFBZSxHQUFHLFVBQVUsQ0FBQztZQUNsQ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xuXHJcbiAgICA8bmctdGVtcGxhdGVcclxuICAgICAgbGV0LWl0ZW1cclxuICAgICAgcFRlbXBsYXRlPVwiaXRlbVwiXHJcbiAgICAgICpuZ0lmPVwiaXRlbVRlbXBsYXRlXCJcclxuICAgID5cclxuICAgICAgPG5nLWNvbnRhaW5lclxyXG4gICAgICAgIFtuZ1RlbXBsYXRlT3V0bGV0XT1cIml0ZW1UZW1wbGF0ZVwiXHJcbiAgICAgICAgW25nVGVtcGxhdGVPdXRsZXRDb250ZXh0XT1cInsgJGltcGxpY2l0OiBpdGVtIH1cIlxyXG4gICAgICA+XHJcblxyXG4gICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgIDwvbmctdGVtcGxhdGU+XHJcblxyXG5cclxuICA8L3AtbXVsdGlTZWxlY3Q+XHJcbiAgPGt2LWVycm9yIFtoYXNFcnJvcl09XCJoYXNDb250cm9sRXJyb3IoKVwiPnt7IGVycm9NZXNzYWdlKCkgfX08L2t2LWVycm9yPlxyXG48L3NwYW4+XHJcbjxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuIl19
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { BaseComponentInput } from '../../api/base-components/base-component-input';
|
|
3
|
-
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../../api/services/component.service";
|
|
6
|
-
import * as i2 from "@angular/common";
|
|
7
|
-
import * as i3 from "@angular/forms";
|
|
8
|
-
import * as i4 from "../../api/components/error/error.component";
|
|
9
|
-
import * as i5 from "primeng/radiobutton";
|
|
10
|
-
import * as i6 from "../../label/label.component";
|
|
11
|
-
export class RadioGroupComponent extends BaseComponentInput {
|
|
12
|
-
constructor(componentService) {
|
|
13
|
-
super(componentService);
|
|
14
|
-
this.options = [
|
|
15
|
-
{ id: 0, description: 'Não' },
|
|
16
|
-
{ id: 1, description: 'Sim' },
|
|
17
|
-
];
|
|
18
|
-
this.onSelectedOption = new EventEmitter();
|
|
19
|
-
this.vertical = false;
|
|
20
|
-
this.selectedOpt = null;
|
|
21
|
-
}
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
this.selectedDefault();
|
|
24
|
-
}
|
|
25
|
-
ngDoCheck() {
|
|
26
|
-
this.selectedDefault();
|
|
27
|
-
}
|
|
28
|
-
selectedDefault() {
|
|
29
|
-
if (this.optionValueDefault != undefined && !this.selectedOpt) {
|
|
30
|
-
let item = this.options.find(opt => opt.id === this.optionValueDefault);
|
|
31
|
-
if (item)
|
|
32
|
-
this.selectedOpt = item;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
selectedOption(event) {
|
|
36
|
-
this.onSelectedOption.emit(event.value.id);
|
|
37
|
-
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RadioGroupComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(RadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label\" />\n<div [class.vertical-radio-group]=\"vertical\">\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\n <p-radioButton\n [inputId]=\"option.id\"\n name=\"option\"\n [value]=\"option\"\n [(ngModel)]=\"selectedOpt\"\n (onClick)=\"selectedOption($event)\"\n [disabled]=\"disabled\"\n [class.ml-3]=\"!isFirst && !vertical\"\n >\n </p-radioButton>\n <label [for]=\"option.id\" class=\"radio-option-label\">\n {{ option.description }}</label\n >\n </div>\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</div>\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i5.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i6.LabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }] }); }
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
42
|
-
type: Component,
|
|
43
|
-
args: [{ selector: 'kv-radio-group', providers: ComponentProviders(RadioGroupComponent), template: "<kv-label [label]=\"label\" />\n<div [class.vertical-radio-group]=\"vertical\">\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\n <p-radioButton\n [inputId]=\"option.id\"\n name=\"option\"\n [value]=\"option\"\n [(ngModel)]=\"selectedOpt\"\n (onClick)=\"selectedOption($event)\"\n [disabled]=\"disabled\"\n [class.ml-3]=\"!isFirst && !vertical\"\n >\n </p-radioButton>\n <label [for]=\"option.id\" class=\"radio-option-label\">\n {{ option.description }}</label\n >\n </div>\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</div>\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
44
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { options: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}], optionValueDefault: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}], onSelectedOption: [{
|
|
49
|
-
type: Output
|
|
50
|
-
}], vertical: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}] } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { BaseComponentInput } from '../../api/base-components/base-component-input';
|
|
3
|
+
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../api/services/component.service";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
7
|
+
import * as i3 from "@angular/forms";
|
|
8
|
+
import * as i4 from "../../api/components/error/error.component";
|
|
9
|
+
import * as i5 from "primeng/radiobutton";
|
|
10
|
+
import * as i6 from "../../label/label.component";
|
|
11
|
+
export class RadioGroupComponent extends BaseComponentInput {
|
|
12
|
+
constructor(componentService) {
|
|
13
|
+
super(componentService);
|
|
14
|
+
this.options = [
|
|
15
|
+
{ id: 0, description: 'Não' },
|
|
16
|
+
{ id: 1, description: 'Sim' },
|
|
17
|
+
];
|
|
18
|
+
this.onSelectedOption = new EventEmitter();
|
|
19
|
+
this.vertical = false;
|
|
20
|
+
this.selectedOpt = null;
|
|
21
|
+
}
|
|
22
|
+
ngOnInit() {
|
|
23
|
+
this.selectedDefault();
|
|
24
|
+
}
|
|
25
|
+
ngDoCheck() {
|
|
26
|
+
this.selectedDefault();
|
|
27
|
+
}
|
|
28
|
+
selectedDefault() {
|
|
29
|
+
if (this.optionValueDefault != undefined && !this.selectedOpt) {
|
|
30
|
+
let item = this.options.find(opt => opt.id === this.optionValueDefault);
|
|
31
|
+
if (item)
|
|
32
|
+
this.selectedOpt = item;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
selectedOption(event) {
|
|
36
|
+
this.onSelectedOption.emit(event.value.id);
|
|
37
|
+
}
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RadioGroupComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(RadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option.id\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option.id\" class=\"radio-option-label\">\r\n {{ option.description }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i5.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i6.LabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }] }); }
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{ selector: 'kv-radio-group', providers: ComponentProviders(RadioGroupComponent), template: "<kv-label [label]=\"label\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option.id\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option.id\" class=\"radio-option-label\">\r\n {{ option.description }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
44
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { options: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], optionValueDefault: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], onSelectedOption: [{
|
|
49
|
+
type: Output
|
|
50
|
+
}], vertical: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}] } });
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tZ3JvdXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2lucHV0cy9yYWRpby1ncm91cC9yYWRpby1ncm91cC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rZWV2by1jb21wb25lbnRzL3NyYy9saWIvaW5wdXRzL3JhZGlvLWdyb3VwL3JhZGlvLWdyb3VwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVcsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDeEYsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sZ0RBQWdELENBQUM7QUFFcEYsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7Ozs7Ozs7O0FBUzNFLE1BQU0sT0FBTyxtQkFBb0IsU0FBUSxrQkFBdUI7SUFlOUQsWUFBWSxnQkFBa0M7UUFDNUMsS0FBSyxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFkakIsWUFBTyxHQUFVO1lBQ3hCLEVBQUU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,32 +1,32 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
3
|
-
import { BaseComponentInput } from '../../api/base-components/base-component-input';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../../api/services/component.service";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
import * as i3 from "../../api/components/error/error.component";
|
|
8
|
-
import * as i4 from "primeng/inputswitch";
|
|
9
|
-
export class SwitchComponent extends BaseComponentInput {
|
|
10
|
-
constructor(componentService) {
|
|
11
|
-
super(componentService);
|
|
12
|
-
this.onSwitchChange = new EventEmitter();
|
|
13
|
-
}
|
|
14
|
-
ngOnInit() {
|
|
15
|
-
if (this.switchValue)
|
|
16
|
-
this.value = this.switchValue;
|
|
17
|
-
}
|
|
18
|
-
emitOnSwitchChange(event) {
|
|
19
|
-
this.onSwitchChange.emit(event);
|
|
20
|
-
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SwitchComponent, selector: "kv-switch", inputs: { switchValue: "switchValue" }, outputs: { onSwitchChange: "onSwitchChange" }, providers: ComponentProviders(SwitchComponent), usesInheritance: true, ngImport: i0, template: "<div class=\"center field-checkbox\">\n\n <p-inputSwitch\n [inputId]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"emitOnSwitchChange($event)\">\n </p-inputSwitch>\n <label [for]=\"componentId\">{{ label }}</label>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</div>\n", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }] }); }
|
|
23
|
-
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
25
|
-
type: Component,
|
|
26
|
-
args: [{ selector: 'kv-switch', providers: ComponentProviders(SwitchComponent), template: "<div class=\"center field-checkbox\">\n\n <p-inputSwitch\n [inputId]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"emitOnSwitchChange($event)\">\n </p-inputSwitch>\n <label [for]=\"componentId\">{{ label }}</label>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</div>\n", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
27
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { switchValue: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], onSwitchChange: [{
|
|
30
|
-
type: Output
|
|
31
|
-
}] } });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ComponentProviders } from '../../api/helpers/component-providers';
|
|
3
|
+
import { BaseComponentInput } from '../../api/base-components/base-component-input';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../api/services/component.service";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "../../api/components/error/error.component";
|
|
8
|
+
import * as i4 from "primeng/inputswitch";
|
|
9
|
+
export class SwitchComponent extends BaseComponentInput {
|
|
10
|
+
constructor(componentService) {
|
|
11
|
+
super(componentService);
|
|
12
|
+
this.onSwitchChange = new EventEmitter();
|
|
13
|
+
}
|
|
14
|
+
ngOnInit() {
|
|
15
|
+
if (this.switchValue)
|
|
16
|
+
this.value = this.switchValue;
|
|
17
|
+
}
|
|
18
|
+
emitOnSwitchChange(event) {
|
|
19
|
+
this.onSwitchChange.emit(event);
|
|
20
|
+
}
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SwitchComponent, selector: "kv-switch", inputs: { switchValue: "switchValue" }, outputs: { onSwitchChange: "onSwitchChange" }, providers: ComponentProviders(SwitchComponent), usesInheritance: true, ngImport: i0, template: "<div class=\"center field-checkbox\">\r\n\r\n <p-inputSwitch\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n (ngModelChange)=\"emitOnSwitchChange($event)\">\r\n </p-inputSwitch>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }] }); }
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
25
|
+
type: Component,
|
|
26
|
+
args: [{ selector: 'kv-switch', providers: ComponentProviders(SwitchComponent), template: "<div class=\"center field-checkbox\">\r\n\r\n <p-inputSwitch\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n (ngModelChange)=\"emitOnSwitchChange($event)\">\r\n </p-inputSwitch>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
|
27
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { switchValue: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], onSwitchChange: [{
|
|
30
|
+
type: Output
|
|
31
|
+
}] } });
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3dpdGNoLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9pbnB1dHMvc3dpdGNoL3N3aXRjaC5jb21wb25lbnQud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