keevo-components 1.3.7 → 1.3.8

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.
Files changed (170) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +20 -39
  3. package/src/index.ts +1 -0
  4. package/src/lib/api/base-components/base-component-button.ts +26 -0
  5. package/src/lib/api/base-components/base-component-dropdown.ts +127 -0
  6. package/src/lib/api/base-components/base-component-input.ts +91 -0
  7. package/src/lib/api/base-components/base-component.ts +46 -0
  8. package/src/lib/api/components/error/error.component.html +3 -0
  9. package/src/lib/api/components/error/error.component.scss +0 -0
  10. package/src/lib/api/components/error/error.component.ts +22 -0
  11. package/src/lib/api/components/error/kverror.module.ts +23 -0
  12. package/src/lib/api/components/table/action-item.ts +5 -0
  13. package/{lib/api/components/table/kv-menuitem.d.ts → src/lib/api/components/table/kv-menuitem.ts} +4 -3
  14. package/src/lib/api/components/table/table.config.column.ts +10 -0
  15. package/src/lib/api/components/table/table.config.ts +14 -0
  16. package/src/lib/api/components/table/table.paginate.ts +6 -0
  17. package/src/lib/api/helpers/component-providers.ts +16 -0
  18. package/src/lib/api/helpers/translate-primeng.ts +25 -0
  19. package/src/lib/api/modules/primeng.module.ts +97 -0
  20. package/src/lib/api/services/component.service.ts +22 -0
  21. package/src/lib/api/services/notification.service.ts +82 -0
  22. package/src/lib/api/services/object.service.ts +20 -0
  23. package/src/lib/buttons/button-personalize/button-personalize.component.html +9 -0
  24. package/src/lib/buttons/button-personalize/button-personalize.component.scss +0 -0
  25. package/src/lib/buttons/button-personalize/button-personalize.component.ts +13 -0
  26. package/src/lib/buttons/button-secondary/button-secondary.component.html +9 -0
  27. package/src/lib/buttons/button-secondary/button-secondary.component.scss +13 -0
  28. package/src/lib/buttons/button-secondary/button-secondary.component.ts +13 -0
  29. package/src/lib/buttons/button-success/button-success.component.html +9 -0
  30. package/src/lib/buttons/button-success/button-success.component.scss +12 -0
  31. package/src/lib/buttons/button-success/button-success.component.ts +13 -0
  32. package/src/lib/buttons/kvbutton.module.ts +22 -0
  33. package/src/lib/directives/template.directive.ts +15 -0
  34. package/src/lib/inputs/check/check.component.html +11 -0
  35. package/src/lib/inputs/check/check.component.scss +0 -0
  36. package/src/lib/inputs/check/check.component.ts +24 -0
  37. package/src/lib/inputs/dropdown/dropdown.component.html +43 -0
  38. package/src/lib/inputs/dropdown/dropdown.component.scss +0 -0
  39. package/src/lib/inputs/dropdown/dropdown.component.ts +19 -0
  40. package/src/lib/inputs/input-calendar/input-calendar.component.html +22 -0
  41. package/src/lib/inputs/input-calendar/input-calendar.component.scss +0 -0
  42. package/src/lib/inputs/input-calendar/input-calendar.component.ts +54 -0
  43. package/src/lib/inputs/input-mask/input-mask.component.html +15 -0
  44. package/src/lib/inputs/input-mask/input-mask.component.scss +0 -0
  45. package/src/lib/inputs/input-mask/input-mask.component.ts +20 -0
  46. package/src/lib/inputs/input-number/input-number.component.html +15 -0
  47. package/src/lib/inputs/input-number/input-number.component.scss +0 -0
  48. package/src/lib/inputs/input-number/input-number.component.ts +51 -0
  49. package/src/lib/inputs/input-password/input-password.component.html +18 -0
  50. package/src/lib/inputs/input-password/input-password.component.scss +0 -0
  51. package/src/lib/inputs/input-password/input-password.component.ts +23 -0
  52. package/src/lib/inputs/input-text/input-text.component.html +14 -0
  53. package/src/lib/inputs/input-text/input-text.component.scss +18 -0
  54. package/src/lib/inputs/input-text/input-text.component.ts +17 -0
  55. package/src/lib/inputs/input-textarea/input-textarea.component.html +17 -0
  56. package/src/lib/inputs/input-textarea/input-textarea.component.scss +0 -0
  57. package/src/lib/inputs/input-textarea/input-textarea.component.ts +33 -0
  58. package/src/lib/inputs/input-time/input-time.component.html +18 -0
  59. package/src/lib/inputs/input-time/input-time.component.scss +0 -0
  60. package/src/lib/inputs/input-time/input-time.component.ts +20 -0
  61. package/src/lib/inputs/kvinputs.module.ts +53 -0
  62. package/src/lib/inputs/multi-select/multi-select.component.html +21 -0
  63. package/src/lib/inputs/multi-select/multi-select.component.scss +0 -0
  64. package/src/lib/inputs/multi-select/multi-select.component.ts +44 -0
  65. package/src/lib/inputs/switch/switch.component.html +11 -0
  66. package/src/lib/inputs/switch/switch.component.scss +3 -0
  67. package/src/lib/inputs/switch/switch.component.ts +24 -0
  68. package/src/lib/keevo-components.module.ts +20 -0
  69. package/src/lib/pipes/codigofile.pipe.ts +15 -0
  70. package/src/lib/pipes/cpfcnpj.pipe.ts +21 -0
  71. package/src/lib/pipes/pipes.module.ts +22 -0
  72. package/src/lib/pipes/telefone.pipe.ts +38 -0
  73. package/src/lib/styles-components.scss +3 -0
  74. package/src/lib/table/kvtable.module.ts +20 -0
  75. package/src/lib/table/table.component.html +189 -0
  76. package/src/lib/table/table.component.scss +21 -0
  77. package/src/lib/table/table.component.spec.ts +28 -0
  78. package/src/lib/table/table.component.ts +211 -0
  79. package/{public-api.d.ts → src/public-api.ts} +11 -4
  80. package/tsconfig.lib.json +14 -0
  81. package/tsconfig.lib.prod.json +10 -0
  82. package/tsconfig.spec.json +14 -0
  83. package/esm2020/keevo-components.mjs +0 -5
  84. package/esm2020/lib/api/base-components/base-component-button.mjs +0 -36
  85. package/esm2020/lib/api/base-components/base-component-dropdown.mjs +0 -116
  86. package/esm2020/lib/api/base-components/base-component-input.mjs +0 -77
  87. package/esm2020/lib/api/base-components/base-component.mjs +0 -49
  88. package/esm2020/lib/api/components/error/error.component.mjs +0 -26
  89. package/esm2020/lib/api/components/error/kverror.module.mjs +0 -35
  90. package/esm2020/lib/api/components/table/action-item.mjs +0 -2
  91. package/esm2020/lib/api/components/table/kv-menuitem.mjs +0 -3
  92. package/esm2020/lib/api/components/table/table.config.column.mjs +0 -2
  93. package/esm2020/lib/api/components/table/table.config.mjs +0 -2
  94. package/esm2020/lib/api/components/table/table.paginate.mjs +0 -9
  95. package/esm2020/lib/api/helpers/component-providers.mjs +0 -16
  96. package/esm2020/lib/api/helpers/translate-primeng.mjs +0 -23
  97. package/esm2020/lib/api/modules/primeng.module.mjs +0 -191
  98. package/esm2020/lib/api/services/component.service.mjs +0 -27
  99. package/esm2020/lib/api/services/notification.service.mjs +0 -67
  100. package/esm2020/lib/api/services/object.service.mjs +0 -26
  101. package/esm2020/lib/buttons/button-personalize/button-personalize.component.mjs +0 -17
  102. package/esm2020/lib/buttons/button-secondary/button-secondary.component.mjs +0 -17
  103. package/esm2020/lib/buttons/button-success/button-success.component.mjs +0 -17
  104. package/esm2020/lib/buttons/kvbutton.module.mjs +0 -34
  105. package/esm2020/lib/directives/template.directive.mjs +0 -24
  106. package/esm2020/lib/inputs/check/check.component.mjs +0 -26
  107. package/esm2020/lib/inputs/dropdown/dropdown.component.mjs +0 -26
  108. package/esm2020/lib/inputs/input-calendar/input-calendar.component.mjs +0 -62
  109. package/esm2020/lib/inputs/input-mask/input-mask.component.mjs +0 -22
  110. package/esm2020/lib/inputs/input-number/input-number.component.mjs +0 -56
  111. package/esm2020/lib/inputs/input-password/input-password.component.mjs +0 -32
  112. package/esm2020/lib/inputs/input-text/input-text.component.mjs +0 -20
  113. package/esm2020/lib/inputs/input-textarea/input-textarea.component.mjs +0 -42
  114. package/esm2020/lib/inputs/input-time/input-time.component.mjs +0 -23
  115. package/esm2020/lib/inputs/kvinputs.module.mjs +0 -89
  116. package/esm2020/lib/inputs/multi-select/multi-select.component.mjs +0 -50
  117. package/esm2020/lib/inputs/switch/switch.component.mjs +0 -26
  118. package/esm2020/lib/keevo-components.module.mjs +0 -35
  119. package/esm2020/lib/pipes/codigofile.pipe.mjs +0 -19
  120. package/esm2020/lib/pipes/cpfcnpj.pipe.mjs +0 -25
  121. package/esm2020/lib/pipes/pipes.module.mjs +0 -34
  122. package/esm2020/lib/pipes/telefone.pipe.mjs +0 -45
  123. package/esm2020/lib/table/kvtable.module.mjs +0 -28
  124. package/esm2020/lib/table/table.component.mjs +0 -194
  125. package/esm2020/public-api.mjs +0 -44
  126. package/fesm2015/keevo-components.mjs +0 -1481
  127. package/fesm2015/keevo-components.mjs.map +0 -1
  128. package/fesm2020/keevo-components.mjs +0 -1490
  129. package/fesm2020/keevo-components.mjs.map +0 -1
  130. package/index.d.ts +0 -5
  131. package/lib/api/base-components/base-component-button.d.ts +0 -14
  132. package/lib/api/base-components/base-component-dropdown.d.ts +0 -31
  133. package/lib/api/base-components/base-component-input.d.ts +0 -26
  134. package/lib/api/base-components/base-component.d.ts +0 -21
  135. package/lib/api/components/error/error.component.d.ts +0 -12
  136. package/lib/api/components/error/kverror.module.d.ts +0 -10
  137. package/lib/api/components/table/action-item.d.ts +0 -5
  138. package/lib/api/components/table/table.config.column.d.ts +0 -10
  139. package/lib/api/components/table/table.config.d.ts +0 -12
  140. package/lib/api/components/table/table.paginate.d.ts +0 -6
  141. package/lib/api/helpers/component-providers.d.ts +0 -2
  142. package/lib/api/helpers/translate-primeng.d.ts +0 -4
  143. package/lib/api/modules/primeng.module.d.ts +0 -46
  144. package/lib/api/services/component.service.d.ts +0 -11
  145. package/lib/api/services/notification.service.d.ts +0 -25
  146. package/lib/api/services/object.service.d.ts +0 -8
  147. package/lib/buttons/button-personalize/button-personalize.component.d.ts +0 -7
  148. package/lib/buttons/button-secondary/button-secondary.component.d.ts +0 -7
  149. package/lib/buttons/button-success/button-success.component.d.ts +0 -7
  150. package/lib/buttons/kvbutton.module.d.ts +0 -10
  151. package/lib/directives/template.directive.d.ts +0 -11
  152. package/lib/inputs/check/check.component.d.ts +0 -11
  153. package/lib/inputs/dropdown/dropdown.component.d.ts +0 -9
  154. package/lib/inputs/input-calendar/input-calendar.component.d.ts +0 -21
  155. package/lib/inputs/input-mask/input-mask.component.d.ts +0 -10
  156. package/lib/inputs/input-number/input-number.component.d.ts +0 -18
  157. package/lib/inputs/input-password/input-password.component.d.ts +0 -13
  158. package/lib/inputs/input-text/input-text.component.d.ts +0 -9
  159. package/lib/inputs/input-textarea/input-textarea.component.d.ts +0 -16
  160. package/lib/inputs/input-time/input-time.component.d.ts +0 -10
  161. package/lib/inputs/kvinputs.module.d.ts +0 -21
  162. package/lib/inputs/multi-select/multi-select.component.d.ts +0 -20
  163. package/lib/inputs/switch/switch.component.d.ts +0 -11
  164. package/lib/keevo-components.module.d.ts +0 -9
  165. package/lib/pipes/codigofile.pipe.d.ts +0 -7
  166. package/lib/pipes/cpfcnpj.pipe.d.ts +0 -7
  167. package/lib/pipes/pipes.module.d.ts +0 -10
  168. package/lib/pipes/telefone.pipe.d.ts +0 -7
  169. package/lib/table/kvtable.module.d.ts +0 -9
  170. package/lib/table/table.component.d.ts +0 -56
@@ -1,1490 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input, EventEmitter, Injectable, Output, ViewChildren, ContentChildren, forwardRef, ViewChild, Directive, Pipe, HostListener, NgModule } from '@angular/core';
3
- import { Subject, of } from 'rxjs';
4
- import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
6
- import * as i2 from '@angular/forms';
7
- import { NgControl, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import * as i4 from 'primeng/checkbox';
9
- import { CheckboxModule } from 'primeng/checkbox';
10
- import * as i2$1 from 'primeng/dynamicdialog';
11
- import { DynamicDialogModule, DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
12
- import * as i1$1 from 'primeng/api';
13
- import { ConfirmationService, MessageService } from 'primeng/api';
14
- import * as i1$2 from 'primeng/button';
15
- import { ButtonModule } from 'primeng/button';
16
- import * as i8 from 'primeng/tooltip';
17
- import { TooltipModule } from 'primeng/tooltip';
18
- import * as i9 from 'primeng/divider';
19
- import { DividerModule } from 'primeng/divider';
20
- import * as i10 from 'primeng/dropdown';
21
- import { DropdownModule } from 'primeng/dropdown';
22
- import * as i4$1 from 'primeng/calendar';
23
- import { CalendarModule } from 'primeng/calendar';
24
- import * as i4$2 from 'primeng/inputmask';
25
- import { InputMaskModule } from 'primeng/inputmask';
26
- import * as i4$3 from 'primeng/inputnumber';
27
- import { InputNumberModule } from 'primeng/inputnumber';
28
- import * as i4$4 from 'primeng/password';
29
- import { PasswordModule } from 'primeng/password';
30
- import * as i4$5 from 'primeng/inputtext';
31
- import { InputTextModule } from 'primeng/inputtext';
32
- import * as i4$6 from 'primeng/inputtextarea';
33
- import { InputTextareaModule } from 'primeng/inputtextarea';
34
- import * as i4$7 from 'primeng/multiselect';
35
- import { MultiSelectModule } from 'primeng/multiselect';
36
- import * as i4$8 from 'primeng/inputswitch';
37
- import { InputSwitchModule } from 'primeng/inputswitch';
38
- import * as i2$2 from 'primeng/ripple';
39
- import { RippleModule } from 'primeng/ripple';
40
- import * as i6 from 'primeng/autofocus';
41
- import { AutoFocusModule } from 'primeng/autofocus';
42
- import * as i10$1 from 'primeng/menu';
43
- import { MenuModule } from 'primeng/menu';
44
- import * as i11 from 'primeng/table';
45
- import { TableModule } from 'primeng/table';
46
- import { AccordionModule } from 'primeng/accordion';
47
- import { BadgeModule } from 'primeng/badge';
48
- import { CardModule } from 'primeng/card';
49
- import { CarouselModule } from 'primeng/carousel';
50
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
51
- import { ContextMenuModule } from 'primeng/contextmenu';
52
- import { DialogModule } from 'primeng/dialog';
53
- import { MessageModule } from 'primeng/message';
54
- import { MessagesModule } from 'primeng/messages';
55
- import { OverlayPanelModule } from 'primeng/overlaypanel';
56
- import { PanelModule } from 'primeng/panel';
57
- import { PickListModule } from 'primeng/picklist';
58
- import { RadioButtonModule } from 'primeng/radiobutton';
59
- import { RatingModule } from 'primeng/rating';
60
- import { SidebarModule } from 'primeng/sidebar';
61
- import { SkeletonModule } from 'primeng/skeleton';
62
- import { SpeedDialModule } from 'primeng/speeddial';
63
- import { SplitButtonModule } from 'primeng/splitbutton';
64
- import { StepsModule } from 'primeng/steps';
65
- import { ToastModule } from 'primeng/toast';
66
- import { ToolbarModule } from 'primeng/toolbar';
67
- import { OverlayModule } from 'primeng/overlay';
68
-
69
- class BaseComponent {
70
- constructor() {
71
- this.stateChanges = new Subject();
72
- this.isRequired = false;
73
- this.disabled = false;
74
- }
75
- set value(value) {
76
- this._value = value;
77
- if (this.onChange)
78
- this.onChange(value);
79
- this.stateChanges.next();
80
- }
81
- get value() {
82
- return this._value;
83
- }
84
- registerOnChange(fn) {
85
- this.onChange = fn;
86
- }
87
- registerOnTouched(fn) {
88
- this.onTouched = fn;
89
- }
90
- setDisabledState(isDisabled) {
91
- this.disabled = isDisabled;
92
- }
93
- writeValue(value) {
94
- this.value = value;
95
- }
96
- }
97
- BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- BaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponent, selector: "ng-component", inputs: { isRequired: ["required", "isRequired"], componentId: "componentId", label: "label", disabled: "disabled" }, ngImport: i0, template: '', isInline: true });
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponent, decorators: [{
100
- type: Component,
101
- args: [{
102
- template: ''
103
- }]
104
- }], propDecorators: { isRequired: [{
105
- type: Input,
106
- args: ['required']
107
- }], componentId: [{
108
- type: Input
109
- }], label: [{
110
- type: Input
111
- }], disabled: [{
112
- type: Input
113
- }] } });
114
-
115
- class ErrorComponent {
116
- set setHasError(value) {
117
- this.hasError = value;
118
- this.emitError.emit(value);
119
- }
120
- ;
121
- constructor() {
122
- this.hasError = false;
123
- this.emitError = new EventEmitter();
124
- }
125
- }
126
- ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
- ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ErrorComponent, selector: "kv-error", inputs: { formControl: "formControl", setHasError: ["hasError", "setHasError"] }, ngImport: i0, template: "<small *ngIf=\"hasError\" id=\"error-message\" class=\"p-error block absolute\">\r\n <ng-content></ng-content>\r\n</small>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ErrorComponent, decorators: [{
129
- type: Component,
130
- args: [{ selector: 'kv-error', template: "<small *ngIf=\"hasError\" id=\"error-message\" class=\"p-error block absolute\">\r\n <ng-content></ng-content>\r\n</small>\r\n" }]
131
- }], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
132
- type: Input
133
- }], setHasError: [{
134
- type: Input,
135
- args: ['hasError']
136
- }] } });
137
-
138
- class ComponentService {
139
- constructor(injector, changeDetectorRef) {
140
- this.injector = injector;
141
- this.changeDetectorRef = changeDetectorRef;
142
- }
143
- getFormControl() {
144
- try {
145
- const control = this.injector.get(NgControl);
146
- if (control.constructor === FormControlName) {
147
- return this.injector.get(FormGroupDirective).getControl(control);
148
- }
149
- return undefined;
150
- }
151
- catch (ex) {
152
- return undefined;
153
- }
154
- }
155
- }
156
- ComponentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ComponentService, deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
157
- ComponentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ComponentService });
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ComponentService, decorators: [{
159
- type: Injectable
160
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }]; } });
161
-
162
- class BaseComponentInput extends BaseComponent {
163
- constructor(componentService) {
164
- super();
165
- this.componentService = componentService;
166
- this.hasError = false;
167
- this.placeholder = '';
168
- this.onBlur = new EventEmitter();
169
- }
170
- get baseInputClass() {
171
- return `${this.hasError ? 'ng-invalid ng-dirty' : ''} !important`;
172
- }
173
- erroMessage() {
174
- if (!this.formControl?.errors)
175
- return;
176
- let message = '';
177
- if (this.formControl.errors) {
178
- const objErrors = this.formControl.errors;
179
- if (objErrors.erroMessage)
180
- message = objErrors.erroMessage;
181
- }
182
- return message;
183
- }
184
- getName(control) {
185
- return Object.entries(control.parent?.controls ?? []).find(([_, value]) => value === control)?.[0] ?? null;
186
- }
187
- hasControlError() {
188
- if (!this.formControl)
189
- return false;
190
- return (this.formControl.dirty || this.formControl.touched) && this.formControl.errors !== null;
191
- }
192
- ngAfterViewInit() {
193
- this.viewErrors.forEach(c => {
194
- c.emitError.subscribe(res => {
195
- this.hasError = res;
196
- this.componentService.changeDetectorRef.detectChanges();
197
- });
198
- });
199
- }
200
- ngAfterContentInit() {
201
- this.contentErrors.forEach(c => {
202
- c.emitError.subscribe(res => {
203
- this.hasError = res;
204
- });
205
- });
206
- }
207
- ngOnInit() {
208
- this.formControl = this.componentService.getFormControl();
209
- }
210
- onInputBlur(event) {
211
- this.onTouched();
212
- this.onBlur.emit(event);
213
- }
214
- }
215
- BaseComponentInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentInput, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
216
- BaseComponentInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponentInput, selector: "ng-component", inputs: { placeholder: "placeholder" }, outputs: { onBlur: "onBlur" }, queries: [{ propertyName: "contentErrors", predicate: ErrorComponent }], viewQueries: [{ propertyName: "viewErrors", predicate: ErrorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentInput, decorators: [{
218
- type: Component,
219
- args: [{
220
- template: '',
221
- }]
222
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { placeholder: [{
223
- type: Input
224
- }], onBlur: [{
225
- type: Output
226
- }], viewErrors: [{
227
- type: ViewChildren,
228
- args: [ErrorComponent]
229
- }], contentErrors: [{
230
- type: ContentChildren,
231
- args: [ErrorComponent]
232
- }] } });
233
-
234
- function ComponentProviders(ref) {
235
- return [
236
- {
237
- provide: NG_VALUE_ACCESSOR,
238
- useExisting: forwardRef(() => ref),
239
- multi: true,
240
- },
241
- {
242
- provide: ComponentService
243
- }
244
- ];
245
- }
246
-
247
- class CheckComponent extends BaseComponentInput {
248
- constructor(componentService) {
249
- super(componentService);
250
- this.onCheckChange = new EventEmitter();
251
- }
252
- emitOnCheckChange(event) {
253
- this.onCheckChange.emit(event);
254
- }
255
- }
256
- CheckComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CheckComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
257
- CheckComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: CheckComponent, selector: "kv-check", outputs: { onCheckChange: "onCheckChange" }, providers: ComponentProviders(CheckComponent), usesInheritance: true, ngImport: i0, template: "<div class=\"field-checkbox\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [disabled]=\"disabled\"\r\n [label]=\"label\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"emitOnCheckChange($event)\">\r\n </p-checkbox>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }] });
258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CheckComponent, decorators: [{
259
- type: Component,
260
- args: [{ selector: 'kv-check', providers: ComponentProviders(CheckComponent), template: "<div class=\"field-checkbox\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [disabled]=\"disabled\"\r\n [label]=\"label\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"emitOnCheckChange($event)\">\r\n </p-checkbox>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
261
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { onCheckChange: [{
262
- type: Output
263
- }] } });
264
-
265
- class ObjectService {
266
- static filterObject(array, propertyName, value) {
267
- return array.filter((e) => {
268
- return e[propertyName] === value;
269
- });
270
- }
271
- static findObject(array, propertyName, value) {
272
- return array.find((e) => {
273
- return e[propertyName] === value;
274
- });
275
- }
276
- static getProperty(obj, propertyName) {
277
- return obj[propertyName];
278
- }
279
- }
280
- ObjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
281
- ObjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, providedIn: 'root' });
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, decorators: [{
283
- type: Injectable,
284
- args: [{
285
- providedIn: 'root'
286
- }]
287
- }] });
288
-
289
- class BaseComponentDropDown extends BaseComponentInput {
290
- constructor(componentService, dialogService) {
291
- super(componentService);
292
- this.dialogService = dialogService;
293
- this.addButton = false;
294
- this.filter = true;
295
- this.showClear = true;
296
- this.onAddClick = new EventEmitter();
297
- this.onSelectionChange = new EventEmitter();
298
- this.onSelectionValue = new EventEmitter();
299
- this.onClick = new EventEmitter();
300
- this.registerOnTouched(() => { });
301
- }
302
- ngOnInit() {
303
- super.ngOnInit();
304
- // this.carregarCombo();
305
- this.setPlaceHolder('Selecione um valor');
306
- }
307
- addClick(event) {
308
- this.onAddClick.emit(event);
309
- }
310
- carregarCombo() {
311
- this.listar().subscribe({
312
- next: (data) => {
313
- this.options = data;
314
- this.filteredOptions = data;
315
- },
316
- error: (error) => { },
317
- });
318
- }
319
- filterOptions(field, value) {
320
- if (this.options) {
321
- let lista = ObjectService.filterObject(this.options, field, value);
322
- if (lista?.length > 0) {
323
- of(lista).subscribe((opts) => {
324
- this.filteredOptions = opts;
325
- });
326
- }
327
- else
328
- this.filteredOptions = [];
329
- }
330
- }
331
- listar() { }
332
- onInputClick(event) {
333
- this.onClick.emit(event);
334
- }
335
- openDialog(componentType, width, height) {
336
- const ref = this.dialogService.open(componentType, {
337
- width: width || '70%',
338
- height: height,
339
- closable: false,
340
- maximizable: true,
341
- data: { popup: true },
342
- });
343
- ref.onClose.subscribe((id) => {
344
- if (id) {
345
- this.listar().subscribe((data) => {
346
- this.options = data;
347
- this.filteredOptions = data;
348
- if (id)
349
- this.formControl?.setValue(id);
350
- });
351
- }
352
- });
353
- }
354
- selectionValue(event) {
355
- this.onSelectionValue.emit(event);
356
- let currentItem = null;
357
- const controlName = this.getName(this.formControl);
358
- if (controlName)
359
- currentItem = ObjectService.findObject(this.options, controlName, event.value);
360
- this.onSelectionChange.emit(currentItem);
361
- }
362
- setPlaceHolder(p) {
363
- if (!this.placeholder)
364
- this.placeholder = p;
365
- }
366
- }
367
- BaseComponentDropDown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentDropDown, deps: [{ token: ComponentService }, { token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
368
- BaseComponentDropDown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponentDropDown, selector: "ng-component", inputs: { options: "options", filteredOptions: "filteredOptions", optionLabel: "optionLabel", optionValue: "optionValue", addButton: "addButton", filter: "filter", showClear: "showClear" }, outputs: { onAddClick: "onAddClick", onSelectionChange: "onSelectionChange", onSelectionValue: "onSelectionValue", onClick: "onClick" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
369
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentDropDown, decorators: [{
370
- type: Component,
371
- args: [{
372
- template: '',
373
- }]
374
- }], ctorParameters: function () { return [{ type: ComponentService }, { type: i2$1.DialogService }]; }, propDecorators: { options: [{
375
- type: Input
376
- }], filteredOptions: [{
377
- type: Input
378
- }], optionLabel: [{
379
- type: Input
380
- }], optionValue: [{
381
- type: Input
382
- }], addButton: [{
383
- type: Input
384
- }], filter: [{
385
- type: Input
386
- }], showClear: [{
387
- type: Input
388
- }], onAddClick: [{
389
- type: Output
390
- }], onSelectionChange: [{
391
- type: Output
392
- }], onSelectionValue: [{
393
- type: Output
394
- }], onClick: [{
395
- type: Output
396
- }] } });
397
-
398
- class DropdownComponent extends BaseComponentDropDown {
399
- constructor(componentService, dialogService) {
400
- super(componentService, dialogService);
401
- }
402
- }
403
- DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DropdownComponent, deps: [{ token: ComponentService }, { token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
404
- DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: DropdownComponent, selector: "kv-dropdown", providers: ComponentProviders(DropdownComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-dropdown\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [filter]=\"filter\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [options]=\"filteredOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"true\"\r\n scrollHeight=\"100px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"selectionValue($event)\"\r\n [style]=\"{'width':'100%'}\"\r\n >\r\n\r\n <ng-template *ngIf=\"addButton\" pTemplate=\"footer\">\r\n <p-divider></p-divider>\r\n <div class=\"flex flex-wrap card-container p-1\">\r\n <div class=\"flex justify-content-center\">\r\n <button\r\n pButton\r\n label=\"Incluir\"\r\n pTooltip=\"Clique aqui para incluir um novo registro\"\r\n tooltipPosition=\"bottom\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-rounded p-button-success mr-2\"\r\n (click)=\"addClick($event)\"></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </p-dropdown>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i9.Divider, selector: "p-divider", inputs: ["styleClass", "style", "layout", "type", "align"] }, { kind: "component", type: i10.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] });
405
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DropdownComponent, decorators: [{
406
- type: Component,
407
- args: [{ selector: 'kv-dropdown', providers: ComponentProviders(DropdownComponent), template: "<span class=\"p-float-label\">\r\n\r\n <p-dropdown\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [filter]=\"filter\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [options]=\"filteredOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"true\"\r\n scrollHeight=\"100px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"selectionValue($event)\"\r\n [style]=\"{'width':'100%'}\"\r\n >\r\n\r\n <ng-template *ngIf=\"addButton\" pTemplate=\"footer\">\r\n <p-divider></p-divider>\r\n <div class=\"flex flex-wrap card-container p-1\">\r\n <div class=\"flex justify-content-center\">\r\n <button\r\n pButton\r\n label=\"Incluir\"\r\n pTooltip=\"Clique aqui para incluir um novo registro\"\r\n tooltipPosition=\"bottom\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-rounded p-button-success mr-2\"\r\n (click)=\"addClick($event)\"></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </p-dropdown>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
408
- }], ctorParameters: function () { return [{ type: ComponentService }, { type: i2$1.DialogService }]; } });
409
-
410
- class InputCalendarComponent extends BaseComponentInput {
411
- constructor(componentService) {
412
- super(componentService);
413
- this.isYear = false;
414
- this.isMonthYear = false;
415
- this.showButtonBar = false;
416
- this.showIcon = true;
417
- this.selectionMode = 'single';
418
- this.typeView = 'date';
419
- this.dateFormat = 'dd/mm/yy';
420
- }
421
- writeValue(value) {
422
- this.value = value;
423
- if (value && typeof value === 'string') {
424
- this.value = new Date(value);
425
- }
426
- }
427
- ngOnInit() {
428
- super.ngOnInit();
429
- if (this.isYear) {
430
- this.typeView = "year";
431
- this.dateFormat = 'yy';
432
- }
433
- else if (this.isMonthYear) {
434
- this.typeView = 'month';
435
- this.dateFormat = 'mm/yy';
436
- }
437
- else {
438
- this.typeView = 'date';
439
- this.dateFormat = 'dd/mm/yy';
440
- }
441
- }
442
- }
443
- InputCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputCalendarComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
444
- InputCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputCalendarComponent, selector: "kv-input-calendar", inputs: { isYear: "isYear", isMonthYear: "isMonthYear", minDate: "minDate", maxDate: "maxDate", showButtonBar: "showButtonBar", showIcon: "showIcon", selectionMode: "selectionMode" }, providers: ComponentProviders(InputCalendarComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-calendar\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\"\r\n [selectionMode]=\"selectionMode\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [showIcon]=\"showIcon\"\r\n [view]=\"typeView\"\r\n [dateFormat]=\"dateFormat\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-calendar>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputCalendarComponent, decorators: [{
446
- type: Component,
447
- args: [{ selector: 'kv-input-calendar', providers: ComponentProviders(InputCalendarComponent), template: "<span class=\"p-float-label\">\r\n\r\n <p-calendar\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\"\r\n [selectionMode]=\"selectionMode\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [showIcon]=\"showIcon\"\r\n [view]=\"typeView\"\r\n [dateFormat]=\"dateFormat\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-calendar>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
448
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { isYear: [{
449
- type: Input
450
- }], isMonthYear: [{
451
- type: Input
452
- }], minDate: [{
453
- type: Input
454
- }], maxDate: [{
455
- type: Input
456
- }], showButtonBar: [{
457
- type: Input
458
- }], showIcon: [{
459
- type: Input
460
- }], selectionMode: [{
461
- type: Input
462
- }] } });
463
-
464
- class InputMaskComponent extends BaseComponentInput {
465
- constructor(componentService) {
466
- super(componentService);
467
- }
468
- }
469
- InputMaskComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputMaskComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
470
- InputMaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputMaskComponent, selector: "kv-input-mask", inputs: { mask: "mask" }, providers: ComponentProviders(InputMaskComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-inputMask\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [mask]=\"mask\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-inputMask>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$2.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }] });
471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputMaskComponent, decorators: [{
472
- type: Component,
473
- args: [{ selector: 'kv-input-mask', providers: ComponentProviders(InputMaskComponent), template: "<span class=\"p-float-label\">\r\n\r\n <p-inputMask\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [mask]=\"mask\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-inputMask>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
474
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { mask: [{
475
- type: Input
476
- }] } });
477
-
478
- class InputNumberComponent extends BaseComponentInput {
479
- constructor(componentService) {
480
- super(componentService);
481
- this.mode = 'decimal';
482
- this.digits = 0;
483
- this.min = 0;
484
- }
485
- ngOnInit() {
486
- super.ngOnInit();
487
- this.inputNumber.mode = this.mode;
488
- this.inputNumber.locale = 'pt-BR';
489
- switch (this.mode) {
490
- case 'decimal':
491
- this.configDecimal();
492
- break;
493
- case 'currency':
494
- this.configCurrency();
495
- break;
496
- }
497
- }
498
- configDecimal() {
499
- if (!this.digits)
500
- this.inputNumber.useGrouping = false;
501
- this.inputNumber.minFractionDigits = this.digits;
502
- this.inputNumber.maxFractionDigits = this.digits;
503
- }
504
- configCurrency() {
505
- this.inputNumber.currency = 'BRL';
506
- }
507
- }
508
- InputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputNumberComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
509
- InputNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputNumberComponent, selector: "kv-input-number", inputs: { mode: "mode", digits: "digits", min: "min", max: "max" }, providers: ComponentProviders(InputNumberComponent), viewQueries: [{ propertyName: "inputNumber", first: true, predicate: ["inputNumber"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n <p-inputNumber\r\n #inputNumber\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [(ngModel)]=\"value\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-inputNumber>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }] });
510
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputNumberComponent, decorators: [{
511
- type: Component,
512
- args: [{ selector: 'kv-input-number', providers: ComponentProviders(InputNumberComponent), template: "<span class=\"p-float-label\">\r\n <p-inputNumber\r\n #inputNumber\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [(ngModel)]=\"value\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-inputNumber>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
513
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { mode: [{
514
- type: Input
515
- }], digits: [{
516
- type: Input
517
- }], min: [{
518
- type: Input
519
- }], max: [{
520
- type: Input
521
- }], inputNumber: [{
522
- type: ViewChild,
523
- args: ['inputNumber', { static: true }]
524
- }] } });
525
-
526
- class InputPasswordComponent extends BaseComponentInput {
527
- constructor(componentService) {
528
- super(componentService);
529
- this.feedback = false;
530
- this.mediumRegex = '';
531
- this.strongRegex = '';
532
- this.toggleMask = true;
533
- }
534
- }
535
- InputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputPasswordComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
536
- InputPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputPasswordComponent, selector: "kv-input-password", inputs: { feedback: "feedback", mediumRegex: "mediumRegex", strongRegex: "strongRegex", toggleMask: "toggleMask" }, providers: ComponentProviders(InputPasswordComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n <p-password\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [toggleMask]=\"toggleMask\"\r\n [feedback]=\"feedback\"\r\n [mediumRegex]=\"mediumRegex\"\r\n [strongRegex]=\"strongRegex\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-password>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$4.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "panelStyle", "panelStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "placeholder", "showClear"], outputs: ["onFocus", "onBlur", "onClear"] }] });
537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputPasswordComponent, decorators: [{
538
- type: Component,
539
- args: [{ selector: 'kv-input-password', providers: ComponentProviders(InputPasswordComponent), template: "<span class=\"p-float-label\">\r\n <p-password\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [toggleMask]=\"toggleMask\"\r\n [feedback]=\"feedback\"\r\n [mediumRegex]=\"mediumRegex\"\r\n [strongRegex]=\"strongRegex\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-password>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
540
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { feedback: [{
541
- type: Input
542
- }], mediumRegex: [{
543
- type: Input
544
- }], strongRegex: [{
545
- type: Input
546
- }], toggleMask: [{
547
- type: Input
548
- }] } });
549
-
550
- class InputTextComponent extends BaseComponentInput {
551
- constructor(componentService) {
552
- super(componentService);
553
- }
554
- }
555
- InputTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
556
- InputTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputTextComponent, selector: "kv-input-text", providers: ComponentProviders(InputTextComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n (blur)=\"onInputBlur($event)\">\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [".div-pai{display:flex;flex-direction:row;column-gap:.25rem;padding-right:0}.div-input{width:100%}.div-button{width:20%}.div-button button{width:100%}\n", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i4$5.InputText, selector: "[pInputText]" }] });
557
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextComponent, decorators: [{
558
- type: Component,
559
- args: [{ selector: 'kv-input-text', providers: ComponentProviders(InputTextComponent), template: "<span class=\"p-float-label\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n (blur)=\"onInputBlur($event)\">\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [".div-pai{display:flex;flex-direction:row;column-gap:.25rem;padding-right:0}.div-input{width:100%}.div-button{width:20%}.div-button button{width:100%}\n", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
560
- }], ctorParameters: function () { return [{ type: ComponentService }]; } });
561
-
562
- class InputTextareaComponent extends BaseComponentInput {
563
- constructor(componentService) {
564
- super(componentService);
565
- this.multiline = false;
566
- this.rows = 2;
567
- this.cols = 20;
568
- this.autoResize = false;
569
- this.maxValueLength = 0;
570
- this.counterValueLength = 0;
571
- }
572
- ngOnInit() {
573
- super.ngOnInit();
574
- this.formControl?.valueChanges.subscribe((value) => {
575
- this.counterValueLength = value?.length;
576
- });
577
- }
578
- }
579
- InputTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextareaComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
580
- InputTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputTextareaComponent, selector: "kv-input-textarea", inputs: { multiline: "multiline", rows: "rows", cols: "cols", autoResize: "autoResize", maxValueLength: "maxValueLength" }, providers: ComponentProviders(InputTextareaComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n <textarea\r\n pInputTextarea\r\n [autoResize]=\"autoResize\"\r\n [class]=\"baseInputClass\"\r\n [cols]=\"cols\"\r\n [disabled]=\"disabled\"\r\n [id]=\"componentId\"\r\n [rows]=\"rows\"\r\n [(ngModel)]=\"value\"\r\n (blur)=\"onInputBlur($event)\">\r\n </textarea>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i4$6.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }] });
581
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextareaComponent, decorators: [{
582
- type: Component,
583
- args: [{ selector: 'kv-input-textarea', providers: ComponentProviders(InputTextareaComponent), template: "<span class=\"p-float-label\">\r\n <textarea\r\n pInputTextarea\r\n [autoResize]=\"autoResize\"\r\n [class]=\"baseInputClass\"\r\n [cols]=\"cols\"\r\n [disabled]=\"disabled\"\r\n [id]=\"componentId\"\r\n [rows]=\"rows\"\r\n [(ngModel)]=\"value\"\r\n (blur)=\"onInputBlur($event)\">\r\n </textarea>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
584
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { multiline: [{
585
- type: Input
586
- }], rows: [{
587
- type: Input
588
- }], cols: [{
589
- type: Input
590
- }], autoResize: [{
591
- type: Input
592
- }], maxValueLength: [{
593
- type: Input
594
- }] } });
595
-
596
- class InputTimeComponent extends BaseComponentInput {
597
- constructor(componentService) {
598
- super(componentService);
599
- this.showIcon = true;
600
- }
601
- }
602
- InputTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTimeComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
603
- InputTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: InputTimeComponent, selector: "kv-input-time", inputs: { showIcon: "showIcon" }, providers: ComponentProviders(InputTimeComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-calendar\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [showIcon]=\"showIcon\"\r\n [showTime]=\"true\"\r\n [timeOnly]=\"true\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-calendar>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] });
604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTimeComponent, decorators: [{
605
- type: Component,
606
- args: [{ selector: 'kv-input-time', providers: ComponentProviders(InputTimeComponent), template: "<span class=\"p-float-label\">\r\n\r\n <p-calendar\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [id]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [disabled]=\"disabled\"\r\n [showIcon]=\"showIcon\"\r\n [showTime]=\"true\"\r\n [timeOnly]=\"true\"\r\n (onBlur)=\"onInputBlur($event)\">\r\n </p-calendar>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
607
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { showIcon: [{
608
- type: Input
609
- }] } });
610
-
611
- class MultiSelectComponent extends BaseComponentInput {
612
- constructor(componentService) {
613
- super(componentService);
614
- this.filter = false;
615
- this.showClear = false;
616
- this.onSelectionChange = new EventEmitter();
617
- this.onPanelHide = new EventEmitter();
618
- }
619
- ngOnInit() {
620
- super.ngOnInit();
621
- }
622
- get baseInputClass() {
623
- return `p-multiselect-sm ${this.hasError ? 'ng-invalid ng-dirty' : ''}`;
624
- }
625
- selectionChange(event) {
626
- this.onSelectionChange.emit(event);
627
- }
628
- panelHide(event) {
629
- this.onPanelHide.emit(event);
630
- }
631
- }
632
- MultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiSelectComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
633
- MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: MultiSelectComponent, selector: "kv-multi-select", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", filter: "filter", showClear: "showClear" }, outputs: { onSelectionChange: "onSelectionChange", onPanelHide: "onPanelHide" }, providers: ComponentProviders(MultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\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 </p-multiSelect>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$7.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "label", "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"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove"] }] });
634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiSelectComponent, decorators: [{
635
- type: Component,
636
- args: [{ selector: 'kv-multi-select', providers: ComponentProviders(MultiSelectComponent), template: "<span class=\"p-float-label\">\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\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 </p-multiSelect>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
637
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { options: [{
638
- type: Input
639
- }], optionLabel: [{
640
- type: Input
641
- }], optionValue: [{
642
- type: Input
643
- }], filter: [{
644
- type: Input
645
- }], showClear: [{
646
- type: Input
647
- }], onSelectionChange: [{
648
- type: Output
649
- }], onPanelHide: [{
650
- type: Output
651
- }] } });
652
-
653
- class SwitchComponent extends BaseComponentInput {
654
- constructor(componentService) {
655
- super(componentService);
656
- this.onSwitchChange = new EventEmitter();
657
- }
658
- emitOnSwitchChange(event) {
659
- this.onSwitchChange.emit(event);
660
- }
661
- }
662
- SwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SwitchComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
663
- SwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: SwitchComponent, selector: "kv-switch", 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 </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: ["p-inputSwitch{padding-right:.5rem}\n", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4$8.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }] });
664
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SwitchComponent, decorators: [{
665
- type: Component,
666
- 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 </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: ["p-inputSwitch{padding-right:.5rem}\n", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
667
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { onSwitchChange: [{
668
- type: Output
669
- }] } });
670
-
671
- class BaseComponentButton {
672
- constructor() {
673
- this.icon = '';
674
- this.label = '';
675
- this.loading = false;
676
- this.disabled = false;
677
- this.color = 'bg-blue-100';
678
- this.onClick = new EventEmitter();
679
- }
680
- click(event) {
681
- this.onClick.emit();
682
- }
683
- }
684
- BaseComponentButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
685
- BaseComponentButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: BaseComponentButton, selector: "ng-component", inputs: { icon: "icon", label: "label", loading: "loading", disabled: "disabled", color: "color" }, outputs: { onClick: "onClick" }, ngImport: i0, template: '', isInline: true });
686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentButton, decorators: [{
687
- type: Component,
688
- args: [{
689
- template: '',
690
- }]
691
- }], ctorParameters: function () { return []; }, propDecorators: { icon: [{
692
- type: Input
693
- }], label: [{
694
- type: Input
695
- }], loading: [{
696
- type: Input
697
- }], disabled: [{
698
- type: Input
699
- }], color: [{
700
- type: Input
701
- }], onClick: [{
702
- type: Output
703
- }] } });
704
-
705
- class ButtonSecondaryComponent extends BaseComponentButton {
706
- constructor() {
707
- super();
708
- }
709
- }
710
- ButtonSecondaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
711
- ButtonSecondaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSecondaryComponent, selector: "kv-button-secondary", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-secondary\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".btn-secondary{background-color:#f2f3f5!important;color:#000000de!important}.btn-secondary:hover{background-color:#ef5350!important;color:#fff!important}.btn-secondary:disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$2.Ripple, selector: "[pRipple]" }] });
712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, decorators: [{
713
- type: Component,
714
- args: [{ selector: 'kv-button-secondary', template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-secondary\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".btn-secondary{background-color:#f2f3f5!important;color:#000000de!important}.btn-secondary:hover{background-color:#ef5350!important;color:#fff!important}.btn-secondary:disabled{pointer-events:none}\n"] }]
715
- }], ctorParameters: function () { return []; } });
716
-
717
- class ButtonSuccessComponent extends BaseComponentButton {
718
- constructor() {
719
- super();
720
- }
721
- }
722
- ButtonSuccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
723
- ButtonSuccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSuccessComponent, selector: "kv-button-success", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-success\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".btn-success{background-color:#29b92d!important;color:#fff!important}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$2.Ripple, selector: "[pRipple]" }] });
724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, decorators: [{
725
- type: Component,
726
- args: [{ selector: 'kv-button-success', template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-success\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".btn-success{background-color:#29b92d!important;color:#fff!important}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}\n"] }]
727
- }], ctorParameters: function () { return []; } });
728
-
729
- class ButtonPersonalizeComponent extends BaseComponentButton {
730
- constructor() {
731
- super();
732
- }
733
- }
734
- ButtonPersonalizeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonPersonalizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
735
- ButtonPersonalizeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonPersonalizeComponent, selector: "kv-button-personalize", usesInheritance: true, ngImport: i0, template: "<button\n pButton\n pRipple\n [class]=\"color\"\n [icon]=\"icon\"\n [label]=\"label\"\n [loading]=\"loading\"\n (click)=\"click($event)\">\n</button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$2.Ripple, selector: "[pRipple]" }] });
736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonPersonalizeComponent, decorators: [{
737
- type: Component,
738
- args: [{ selector: 'kv-button-personalize', template: "<button\n pButton\n pRipple\n [class]=\"color\"\n [icon]=\"icon\"\n [label]=\"label\"\n [loading]=\"loading\"\n (click)=\"click($event)\">\n</button>\n" }]
739
- }], ctorParameters: function () { return []; } });
740
-
741
- class TemplateDirective {
742
- constructor(template) {
743
- this.template = template;
744
- }
745
- getType() {
746
- return this.name;
747
- }
748
- }
749
- TemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
750
- TemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: TemplateDirective, selector: "[cTemplate]", inputs: { type: "type", name: ["cTemplate", "name"] }, ngImport: i0 });
751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateDirective, decorators: [{
752
- type: Directive,
753
- args: [{
754
- selector: '[cTemplate]'
755
- }]
756
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { type: [{
757
- type: Input
758
- }], name: [{
759
- type: Input,
760
- args: ['cTemplate']
761
- }] } });
762
-
763
- class CodigoFipePipe {
764
- transform(value) {
765
- if (value) {
766
- const identificacao = value.replace(/[^0-9]/g, '');
767
- return identificacao.replace(/(\d{6})(\d{1})/g, "\$1-\$2");
768
- }
769
- else
770
- return null;
771
- }
772
- }
773
- CodigoFipePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
774
- CodigoFipePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, name: "codigoFipe" });
775
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, decorators: [{
776
- type: Pipe,
777
- args: [{ name: 'codigoFipe' }]
778
- }] });
779
-
780
- class CpfCnpjPipe {
781
- transform(value) {
782
- if (value) {
783
- const identificacao = value.replace(/[^0-9]/g, '');
784
- if (identificacao.length === 11) {
785
- return identificacao.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/g, "\$1.\$2.\$3\-\$4");
786
- }
787
- else if (identificacao.length === 14) {
788
- return identificacao.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g, "\$1.\$2.\$3\/\$4\-\$5");
789
- }
790
- return value;
791
- }
792
- else
793
- return null;
794
- }
795
- }
796
- CpfCnpjPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
797
- CpfCnpjPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, name: "cpfCnpj" });
798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, decorators: [{
799
- type: Pipe,
800
- args: [{ name: 'cpfCnpj' }]
801
- }] });
802
-
803
- class TelefonePipe {
804
- transform(tel) {
805
- if (tel) {
806
- const value = tel.toString().replace(/\D/g, '');
807
- let foneFormatado = '';
808
- if (value.length > 12) {
809
- foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{5})?(\d{4})/, '+$1 ($2) $3-$4');
810
- }
811
- else if (value.length > 11) {
812
- foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{4})?(\d{4})/, '+$1 ($2) $3-$4');
813
- }
814
- else if (value.length > 10) {
815
- foneFormatado = value.replace(/(\d{2})?(\d{5})?(\d{4})/, '($1) $2-$3');
816
- }
817
- else if (value.length > 9) {
818
- foneFormatado = value.replace(/(\d{2})?(\d{4})?(\d{4})/, '($1) $2-$3');
819
- }
820
- else if (value.length > 5) {
821
- foneFormatado = value.replace(/^(\d{2})?(\d{4})?(\d{0,4})/, '($1) $2-$3');
822
- }
823
- else if (value.length > 1) {
824
- foneFormatado = value.replace(/^(\d{2})?(\d{0,5})/, '($1) $2');
825
- }
826
- else {
827
- if (tel !== '') {
828
- foneFormatado = value.replace(/^(\d*)/, '($1');
829
- }
830
- }
831
- return foneFormatado;
832
- }
833
- else
834
- return null;
835
- }
836
- }
837
- TelefonePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
838
- TelefonePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, name: "Telefone" });
839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, decorators: [{
840
- type: Pipe,
841
- args: [{
842
- name: 'Telefone'
843
- }]
844
- }] });
845
-
846
- class TableComponent {
847
- set setConfig(value) {
848
- this.config = {
849
- enableCation: value.enableCation || true,
850
- enableSelect: value.enableSelect || false,
851
- enableFilter: value.enableFilter || true,
852
- ...value,
853
- };
854
- if (this.config.enableFilter) {
855
- this.config.columns.forEach(col => {
856
- this.globalFilterFields.push(col.field);
857
- });
858
- }
859
- }
860
- constructor(datePipe, decimalPipe, codigoFipePipe, cpfCnpjPipe, telefonePipe) {
861
- this.datePipe = datePipe;
862
- this.decimalPipe = decimalPipe;
863
- this.codigoFipePipe = codigoFipePipe;
864
- this.cpfCnpjPipe = cpfCnpjPipe;
865
- this.telefonePipe = telefonePipe;
866
- this.globalFilterFields = [];
867
- this.selectedSize = '';
868
- this.paginator = true;
869
- this.rows = 5;
870
- this.applyStyle = (rowData, col) => '';
871
- this.onActiveItem = new EventEmitter();
872
- this.onPaginate = new EventEmitter();
873
- this.onSelectionChange = new EventEmitter();
874
- this.doubleClickEvent = new EventEmitter();
875
- this.filterField = new EventEmitter();
876
- }
877
- ngOnInit() {
878
- this.adjustTableSize();
879
- this.tamanhoTela = window.innerWidth;
880
- }
881
- onWindowResize() {
882
- this.adjustTableSize();
883
- this.tamanhoTela = window.innerWidth;
884
- }
885
- activeItem(rowData) {
886
- this.onActiveItem.emit(rowData);
887
- }
888
- isBooleanField(rowData, col) {
889
- return typeof rowData[col.field] == 'boolean';
890
- }
891
- onGlobalFilter(table, event) {
892
- this.filterField.emit(event.target.value);
893
- table.filterGlobal(event.target.value, 'contains');
894
- }
895
- paginate(event) {
896
- if (event) {
897
- let paginaInicial = ((event?.first > 0) ? (event.first / event.rows) : event.first) + 1;
898
- let termoPesquisa = '';
899
- let ordenacao = '';
900
- if (event.globalFilter)
901
- termoPesquisa = event.globalFilter;
902
- if (event.sortField)
903
- ordenacao = `${event.sortField} ${(event.sortOrder === 1) ? 'ASC' : 'DESC'}`;
904
- const objeto = {
905
- paginaInicial: paginaInicial,
906
- tamanhoPagina: event.rows,
907
- termoPesquisa: termoPesquisa,
908
- ordenacao: ordenacao
909
- };
910
- this.onPaginate.emit(objeto);
911
- }
912
- }
913
- selectionChange(value = []) {
914
- this.onSelectionChange.emit(value);
915
- }
916
- returnRowClass(rowData, col) {
917
- let value = rowData[col.field];
918
- let rowClass;
919
- this.tableSize > 800 ? rowClass = 'text-base' : rowClass = 'text-sm';
920
- if (col.field == 'datavencimento') {
921
- new Date(value) < new Date() ? rowClass = rowClass + ' text-red-400 font-semibold' : '';
922
- }
923
- return rowClass;
924
- }
925
- expiredFile(rowData, col) {
926
- let value = rowData['datavencimento'];
927
- return new Date(value) < new Date() && col.field == 'area';
928
- }
929
- transformValue(rowData, col) {
930
- let value = rowData[col.field];
931
- if (value != null) {
932
- if (col.field == 'valor')
933
- return `R$${value.toFixed(2)}`;
934
- else if (!col.pipe) {
935
- return value;
936
- }
937
- switch (col.pipe) {
938
- case 'date':
939
- return this.datePipe.transform(value, 'dd/MM/yyyy');
940
- break;
941
- case 'decimal':
942
- return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
943
- break;
944
- case 'cpfcnpj':
945
- return this.cpfCnpjPipe.transform(value);
946
- break;
947
- case 'telefone':
948
- return this.telefonePipe.transform(value);
949
- break;
950
- case 'codigofipe':
951
- return this.codigoFipePipe.transform(value);
952
- break;
953
- }
954
- }
955
- }
956
- adjustTableSize() {
957
- if (this.tableSize < 800) {
958
- this.selectedSize = 'p-datatable-sm';
959
- }
960
- else {
961
- this.selectedSize = '';
962
- }
963
- }
964
- doubleClick(e, rowData) {
965
- let eventDoubleClick = { event: e, rowData: rowData };
966
- this.doubleClickEvent.emit(eventDoubleClick);
967
- }
968
- centralizarColunas(col) {
969
- if (col.centralize) {
970
- return 'text-align: center';
971
- }
972
- else
973
- return '';
974
- }
975
- retornarCampo(action, rowData, field) {
976
- const _function = action.dynamicfields ? action.dynamicfields[field] : null;
977
- const _field = _function ? _function.apply(action, [rowData]) : action[field];
978
- return _field;
979
- }
980
- }
981
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CodigoFipePipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }], target: i0.ɵɵFactoryTarget.Component });
982
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: TableComponent, selector: "kv-table", inputs: { setConfig: ["config", "setConfig"], dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", tableSize: "tableSize", applyStyle: "applyStyle" }, outputs: { onActiveItem: "onActiveItem", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }], ngImport: i0, template: "<p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"false\"\r\n [pageLinks]=\"1\"\r\n [responsive]=\"true\"\r\n responsiveLayout=\"stack\"\r\n>\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12\">\r\n <h5\r\n class=\"field col-3\"\r\n *ngIf=\"config.title\"\r\n >{{ config.title }}</h5>\r\n <div [class]=\"tamanhoTela < 768 ? 'col-12 md:col-6 lg:col-4' : 'col-12 md:col-6 lg:col-4 input-search'\">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"block mt-2 md:mt-0 p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"w-full\"\r\n />\r\n </span>\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n\r\n <tr>\r\n <th\r\n style=\"width: 4rem\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns;\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div [class]=\" centralizarColunas(col) ? 'flex flex-row justify-content-center' : 'flex flex-row '\">\r\n {{col.header}}\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px;\"\r\n ></p-sortIcon>\r\n </div>\r\n\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length> 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n\r\n <tr (dblclick)=\"doubleClick($event, rowData)\">\r\n\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, {field:'check-box' , header: ''})\"\r\n >\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of columns\">\r\n <td\r\n *ngIf=\"rowgroup\"\r\n [attr.rowspan]=\"rowgroup && col.grouped? rowspan: null\"\r\n class=\"rowTable\"\r\n [style]=\"applyStyle(rowData, col) + centralizarColunas(col)\"\r\n >\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped\"\r\n [style]=\"applyStyle(rowData, col) + centralizarColunas(col)\"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500 pi pi-check' : 'text-red-500 pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length> 0\"\r\n [style]=\"applyStyle(rowData, {field:'btns-options' , header: ''})\"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <div *ngFor=\"let action of config.actions\">\r\n <p-button\r\n [icon]=\"retornarCampo(action, rowData, 'icon')\"\r\n styleClass=\"p-button-text p-button-secondary p-button-raised h-2rem w-2rem ml-1\"\r\n (click)=\"action?.command(); activeItem(rowData)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n ></p-button>\r\n </div>\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length\"\r\n style=\"text-align: center;\"\r\n >\r\n Nenhum registro encontrado\r\n </td>\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n<p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"config.actions\"\r\n></p-menu>", styles: [".error-show{background-color:red;width:5px;height:10px}.input-search{position:relative;right:15px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i6.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i4$5.InputText, selector: "[pInputText]" }, { kind: "component", type: i10$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i11.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i11.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i11.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i11.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i11.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }] });
983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableComponent, decorators: [{
984
- type: Component,
985
- args: [{ selector: 'kv-table', template: "<p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"false\"\r\n [pageLinks]=\"1\"\r\n [responsive]=\"true\"\r\n responsiveLayout=\"stack\"\r\n>\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12\">\r\n <h5\r\n class=\"field col-3\"\r\n *ngIf=\"config.title\"\r\n >{{ config.title }}</h5>\r\n <div [class]=\"tamanhoTela < 768 ? 'col-12 md:col-6 lg:col-4' : 'col-12 md:col-6 lg:col-4 input-search'\">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"block mt-2 md:mt-0 p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"w-full\"\r\n />\r\n </span>\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n\r\n <tr>\r\n <th\r\n style=\"width: 4rem\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns;\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div [class]=\" centralizarColunas(col) ? 'flex flex-row justify-content-center' : 'flex flex-row '\">\r\n {{col.header}}\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px;\"\r\n ></p-sortIcon>\r\n </div>\r\n\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length> 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n\r\n <tr (dblclick)=\"doubleClick($event, rowData)\">\r\n\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, {field:'check-box' , header: ''})\"\r\n >\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of columns\">\r\n <td\r\n *ngIf=\"rowgroup\"\r\n [attr.rowspan]=\"rowgroup && col.grouped? rowspan: null\"\r\n class=\"rowTable\"\r\n [style]=\"applyStyle(rowData, col) + centralizarColunas(col)\"\r\n >\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped\"\r\n [style]=\"applyStyle(rowData, col) + centralizarColunas(col)\"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500 pi pi-check' : 'text-red-500 pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length> 0\"\r\n [style]=\"applyStyle(rowData, {field:'btns-options' , header: ''})\"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <div *ngFor=\"let action of config.actions\">\r\n <p-button\r\n [icon]=\"retornarCampo(action, rowData, 'icon')\"\r\n styleClass=\"p-button-text p-button-secondary p-button-raised h-2rem w-2rem ml-1\"\r\n (click)=\"action?.command(); activeItem(rowData)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n ></p-button>\r\n </div>\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length\"\r\n style=\"text-align: center;\"\r\n >\r\n Nenhum registro encontrado\r\n </td>\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n<p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"config.actions\"\r\n></p-menu>", styles: [".error-show{background-color:red;width:5px;height:10px}.input-search{position:relative;right:15px}\n"] }]
986
- }], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CodigoFipePipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }]; }, propDecorators: { templates: [{
987
- type: ContentChildren,
988
- args: [TemplateDirective]
989
- }], table: [{
990
- type: ViewChild,
991
- args: ['table', { static: false }]
992
- }], setConfig: [{
993
- type: Input,
994
- args: ['config']
995
- }], dataSource: [{
996
- type: Input
997
- }], selectedItems: [{
998
- type: Input
999
- }], totalRecords: [{
1000
- type: Input
1001
- }], paginator: [{
1002
- type: Input
1003
- }], rowsPerPageOptions: [{
1004
- type: Input
1005
- }], rows: [{
1006
- type: Input
1007
- }], tableSize: [{
1008
- type: Input
1009
- }], applyStyle: [{
1010
- type: Input
1011
- }], onActiveItem: [{
1012
- type: Output
1013
- }], onPaginate: [{
1014
- type: Output
1015
- }], onSelectionChange: [{
1016
- type: Output
1017
- }], doubleClickEvent: [{
1018
- type: Output
1019
- }], filterField: [{
1020
- type: Output
1021
- }], onWindowResize: [{
1022
- type: HostListener,
1023
- args: ['window:resize', ['$event']]
1024
- }] } });
1025
-
1026
- class PrimeNgModule {
1027
- }
1028
- PrimeNgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1029
- PrimeNgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, exports: [AccordionModule,
1030
- AutoFocusModule,
1031
- BadgeModule,
1032
- ButtonModule,
1033
- CalendarModule,
1034
- CardModule,
1035
- CarouselModule,
1036
- CheckboxModule,
1037
- ConfirmDialogModule,
1038
- ContextMenuModule,
1039
- DialogModule,
1040
- DividerModule,
1041
- DropdownModule,
1042
- DynamicDialogModule,
1043
- InputMaskModule,
1044
- InputNumberModule,
1045
- InputSwitchModule,
1046
- InputTextModule,
1047
- InputTextareaModule,
1048
- MenuModule,
1049
- MessageModule,
1050
- MessagesModule,
1051
- MultiSelectModule,
1052
- OverlayPanelModule,
1053
- OverlayPanelModule,
1054
- PanelModule,
1055
- PasswordModule,
1056
- PickListModule,
1057
- RadioButtonModule,
1058
- RatingModule,
1059
- RippleModule,
1060
- SidebarModule,
1061
- SkeletonModule,
1062
- SpeedDialModule,
1063
- SplitButtonModule,
1064
- StepsModule,
1065
- TableModule,
1066
- ToastModule,
1067
- ToolbarModule,
1068
- TooltipModule,
1069
- OverlayModule] });
1070
- PrimeNgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, providers: [
1071
- ConfirmationService,
1072
- DialogService,
1073
- DynamicDialogRef,
1074
- DynamicDialogConfig,
1075
- MessageService,
1076
- ], imports: [AccordionModule,
1077
- AutoFocusModule,
1078
- BadgeModule,
1079
- ButtonModule,
1080
- CalendarModule,
1081
- CardModule,
1082
- CarouselModule,
1083
- CheckboxModule,
1084
- ConfirmDialogModule,
1085
- ContextMenuModule,
1086
- DialogModule,
1087
- DividerModule,
1088
- DropdownModule,
1089
- DynamicDialogModule,
1090
- InputMaskModule,
1091
- InputNumberModule,
1092
- InputSwitchModule,
1093
- InputTextModule,
1094
- InputTextareaModule,
1095
- MenuModule,
1096
- MessageModule,
1097
- MessagesModule,
1098
- MultiSelectModule,
1099
- OverlayPanelModule,
1100
- OverlayPanelModule,
1101
- PanelModule,
1102
- PasswordModule,
1103
- PickListModule,
1104
- RadioButtonModule,
1105
- RatingModule,
1106
- RippleModule,
1107
- SidebarModule,
1108
- SkeletonModule,
1109
- SpeedDialModule,
1110
- SplitButtonModule,
1111
- StepsModule,
1112
- TableModule,
1113
- ToastModule,
1114
- ToolbarModule,
1115
- TooltipModule,
1116
- OverlayModule] });
1117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, decorators: [{
1118
- type: NgModule,
1119
- args: [{
1120
- exports: [
1121
- AccordionModule,
1122
- AutoFocusModule,
1123
- BadgeModule,
1124
- ButtonModule,
1125
- CalendarModule,
1126
- CardModule,
1127
- CarouselModule,
1128
- CheckboxModule,
1129
- ConfirmDialogModule,
1130
- ContextMenuModule,
1131
- DialogModule,
1132
- DividerModule,
1133
- DropdownModule,
1134
- DynamicDialogModule,
1135
- InputMaskModule,
1136
- InputNumberModule,
1137
- InputSwitchModule,
1138
- InputTextModule,
1139
- InputTextareaModule,
1140
- MenuModule,
1141
- MessageModule,
1142
- MessagesModule,
1143
- MultiSelectModule,
1144
- OverlayPanelModule,
1145
- OverlayPanelModule,
1146
- PanelModule,
1147
- PasswordModule,
1148
- PickListModule,
1149
- RadioButtonModule,
1150
- RatingModule,
1151
- RippleModule,
1152
- SidebarModule,
1153
- SkeletonModule,
1154
- SpeedDialModule,
1155
- SplitButtonModule,
1156
- StepsModule,
1157
- TableModule,
1158
- ToastModule,
1159
- ToolbarModule,
1160
- TooltipModule,
1161
- OverlayModule
1162
- ],
1163
- providers: [
1164
- ConfirmationService,
1165
- DialogService,
1166
- DynamicDialogRef,
1167
- DynamicDialogConfig,
1168
- MessageService,
1169
- ]
1170
- }]
1171
- }] });
1172
-
1173
- class KvButtonsModule {
1174
- }
1175
- KvButtonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1176
- KvButtonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, declarations: [ButtonSecondaryComponent,
1177
- ButtonSuccessComponent,
1178
- ButtonPersonalizeComponent], imports: [PrimeNgModule], exports: [ButtonSecondaryComponent,
1179
- ButtonSuccessComponent,
1180
- ButtonPersonalizeComponent] });
1181
- KvButtonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, imports: [PrimeNgModule] });
1182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, decorators: [{
1183
- type: NgModule,
1184
- args: [{
1185
- declarations: [
1186
- ButtonSecondaryComponent,
1187
- ButtonSuccessComponent,
1188
- ButtonPersonalizeComponent
1189
- ],
1190
- imports: [
1191
- PrimeNgModule
1192
- ],
1193
- exports: [
1194
- ButtonSecondaryComponent,
1195
- ButtonSuccessComponent,
1196
- ButtonPersonalizeComponent
1197
- ]
1198
- }]
1199
- }] });
1200
-
1201
- class kvErrorModule {
1202
- }
1203
- kvErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1204
- kvErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, declarations: [ErrorComponent], imports: [CommonModule,
1205
- FormsModule,
1206
- PrimeNgModule,
1207
- ReactiveFormsModule], exports: [ErrorComponent] });
1208
- kvErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, imports: [CommonModule,
1209
- FormsModule,
1210
- PrimeNgModule,
1211
- ReactiveFormsModule] });
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, decorators: [{
1213
- type: NgModule,
1214
- args: [{
1215
- declarations: [
1216
- ErrorComponent,
1217
- ],
1218
- imports: [
1219
- CommonModule,
1220
- FormsModule,
1221
- PrimeNgModule,
1222
- ReactiveFormsModule,
1223
- ],
1224
- exports: [
1225
- ErrorComponent,
1226
- ]
1227
- }]
1228
- }] });
1229
-
1230
- class KvInputsModule {
1231
- }
1232
- KvInputsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1233
- KvInputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, declarations: [CheckComponent,
1234
- DropdownComponent,
1235
- InputCalendarComponent,
1236
- InputMaskComponent,
1237
- InputNumberComponent,
1238
- InputPasswordComponent,
1239
- InputTextComponent,
1240
- InputTextareaComponent,
1241
- InputTimeComponent,
1242
- MultiSelectComponent,
1243
- SwitchComponent], imports: [CommonModule,
1244
- FormsModule,
1245
- kvErrorModule,
1246
- PrimeNgModule,
1247
- ReactiveFormsModule], exports: [CheckComponent,
1248
- DropdownComponent,
1249
- InputCalendarComponent,
1250
- InputMaskComponent,
1251
- InputNumberComponent,
1252
- InputPasswordComponent,
1253
- InputTextComponent,
1254
- InputTextareaComponent,
1255
- InputTimeComponent,
1256
- MultiSelectComponent,
1257
- SwitchComponent] });
1258
- KvInputsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, imports: [CommonModule,
1259
- FormsModule,
1260
- kvErrorModule,
1261
- PrimeNgModule,
1262
- ReactiveFormsModule] });
1263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, decorators: [{
1264
- type: NgModule,
1265
- args: [{
1266
- declarations: [
1267
- CheckComponent,
1268
- DropdownComponent,
1269
- InputCalendarComponent,
1270
- InputMaskComponent,
1271
- InputNumberComponent,
1272
- InputPasswordComponent,
1273
- InputTextComponent,
1274
- InputTextareaComponent,
1275
- InputTimeComponent,
1276
- MultiSelectComponent,
1277
- SwitchComponent,
1278
- ],
1279
- imports: [
1280
- CommonModule,
1281
- FormsModule,
1282
- kvErrorModule,
1283
- PrimeNgModule,
1284
- ReactiveFormsModule,
1285
- ],
1286
- exports: [
1287
- CheckComponent,
1288
- DropdownComponent,
1289
- InputCalendarComponent,
1290
- InputMaskComponent,
1291
- InputNumberComponent,
1292
- InputPasswordComponent,
1293
- InputTextComponent,
1294
- InputTextareaComponent,
1295
- InputTimeComponent,
1296
- MultiSelectComponent,
1297
- SwitchComponent,
1298
- ]
1299
- }]
1300
- }] });
1301
-
1302
- class KvTableModule {
1303
- }
1304
- KvTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1305
- KvTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, declarations: [TableComponent], imports: [CommonModule,
1306
- PrimeNgModule], exports: [TableComponent] });
1307
- KvTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, imports: [CommonModule,
1308
- PrimeNgModule] });
1309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, decorators: [{
1310
- type: NgModule,
1311
- args: [{
1312
- declarations: [
1313
- TableComponent
1314
- ],
1315
- imports: [
1316
- CommonModule,
1317
- PrimeNgModule
1318
- ],
1319
- exports: [
1320
- TableComponent
1321
- ]
1322
- }]
1323
- }] });
1324
-
1325
- class KeevoComponentsModule {
1326
- }
1327
- KeevoComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1328
- KeevoComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvInputsModule,
1329
- KvButtonsModule,
1330
- KvTableModule], exports: [KvInputsModule,
1331
- KvButtonsModule,
1332
- KvTableModule] });
1333
- KeevoComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvInputsModule,
1334
- KvButtonsModule,
1335
- KvTableModule, KvInputsModule,
1336
- KvButtonsModule,
1337
- KvTableModule] });
1338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, decorators: [{
1339
- type: NgModule,
1340
- args: [{
1341
- declarations: [],
1342
- imports: [
1343
- KvInputsModule,
1344
- KvButtonsModule,
1345
- KvTableModule
1346
- ],
1347
- exports: [
1348
- KvInputsModule,
1349
- KvButtonsModule,
1350
- KvTableModule
1351
- ]
1352
- }]
1353
- }] });
1354
-
1355
- class PipesModule {
1356
- }
1357
- PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1358
- PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, declarations: [CpfCnpjPipe,
1359
- TelefonePipe,
1360
- CodigoFipePipe], imports: [CommonModule], exports: [CpfCnpjPipe,
1361
- TelefonePipe,
1362
- CodigoFipePipe] });
1363
- PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, imports: [CommonModule] });
1364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, decorators: [{
1365
- type: NgModule,
1366
- args: [{
1367
- imports: [
1368
- CommonModule
1369
- ],
1370
- declarations: [
1371
- CpfCnpjPipe,
1372
- TelefonePipe,
1373
- CodigoFipePipe
1374
- ],
1375
- exports: [
1376
- CpfCnpjPipe,
1377
- TelefonePipe,
1378
- CodigoFipePipe
1379
- ]
1380
- }]
1381
- }] });
1382
-
1383
- class TranslatePrimeng {
1384
- config(config) {
1385
- config.ripple = true;
1386
- config.setTranslation({
1387
- monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
1388
- monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
1389
- dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabádo'],
1390
- dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
1391
- dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
1392
- today: 'Hoje',
1393
- weekHeader: 'Semana',
1394
- emptyMessage: 'Nenhum resultado encontrado',
1395
- emptyFilterMessage: 'Nenhum registro encontrado com o filtro informado',
1396
- weak: 'Fraca',
1397
- medium: 'Média',
1398
- strong: 'Forte',
1399
- passwordPrompt: 'Informe a senha',
1400
- clear: 'Limpar',
1401
- apply: 'Aplicar'
1402
- });
1403
- }
1404
- }
1405
-
1406
- class NotificationService {
1407
- constructor(confirmationService, messageService) {
1408
- this.confirmationService = confirmationService;
1409
- this.messageService = messageService;
1410
- }
1411
- question(config) {
1412
- this.confirmationService.confirm({
1413
- header: config.type === 'alert' ? 'Atenção' : 'Confirmação',
1414
- icon: `pi ${config.type === 'alert' ? 'pi-exclamation-triangle' : 'pi-question-circle'}`,
1415
- acceptLabel: 'Sim',
1416
- acceptButtonStyleClass: 'p-button-success',
1417
- rejectLabel: 'Não',
1418
- rejectButtonStyleClass: 'p-button-secondary',
1419
- ...config,
1420
- });
1421
- }
1422
- dialog(config) {
1423
- let dialogHeader;
1424
- let dialogIcon;
1425
- switch (config.type) {
1426
- case 'alert':
1427
- dialogHeader = 'Atenção';
1428
- dialogIcon = 'pi pi-exclamation-triangle';
1429
- break;
1430
- case 'info':
1431
- dialogHeader = 'Info';
1432
- dialogIcon = 'pi pi-info-circle';
1433
- break;
1434
- case 'error':
1435
- dialogHeader = 'Erro';
1436
- dialogIcon = 'pi pi-times-circle';
1437
- break;
1438
- }
1439
- this.confirmationService.confirm({
1440
- header: dialogHeader,
1441
- icon: dialogIcon,
1442
- acceptLabel: 'Ok',
1443
- acceptButtonStyleClass: 'p-button-success',
1444
- rejectVisible: false,
1445
- message: config.message,
1446
- });
1447
- }
1448
- toastSuccess(message) {
1449
- this.messageService.add({ severity: 'success', summary: 'Sucesso', detail: message });
1450
- }
1451
- toastInfo(message) {
1452
- this.messageService.add({ severity: 'info', summary: 'Info', detail: message });
1453
- }
1454
- toastWarn(message) {
1455
- this.messageService.add({ severity: 'warn', summary: 'Aviso', detail: message });
1456
- }
1457
- toastError(message) {
1458
- this.messageService.add({ severity: 'error', summary: 'Erro', detail: message });
1459
- }
1460
- }
1461
- NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, deps: [{ token: i1$1.ConfirmationService }, { token: i1$1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
1462
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, providedIn: 'root' });
1463
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, decorators: [{
1464
- type: Injectable,
1465
- args: [{
1466
- providedIn: 'root',
1467
- }]
1468
- }], ctorParameters: function () { return [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }]; } });
1469
-
1470
- class TablePaginate {
1471
- constructor() {
1472
- this.paginaInicial = 1;
1473
- this.tamanhoPagina = 10;
1474
- this.termoPesquisa = '';
1475
- this.ordenacao = '';
1476
- }
1477
- }
1478
-
1479
- ;
1480
-
1481
- /*
1482
- * Public API Surface of keevo-components
1483
- */
1484
-
1485
- /**
1486
- * Generated bundle index. Do not edit.
1487
- */
1488
-
1489
- export { BaseComponent, BaseComponentButton, BaseComponentDropDown, BaseComponentInput, ButtonPersonalizeComponent, ButtonSecondaryComponent, ButtonSuccessComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, ErrorComponent, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KeevoComponentsModule, KvButtonsModule, KvInputsModule, KvTableModule, MultiSelectComponent, NotificationService, ObjectService, PipesModule, PrimeNgModule, SwitchComponent, TableComponent, TablePaginate, TelefonePipe, TranslatePrimeng, kvErrorModule };
1490
- //# sourceMappingURL=keevo-components.mjs.map