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,1481 +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
- var _a;
175
- if (!((_a = this.formControl) === null || _a === void 0 ? void 0 : _a.errors))
176
- return;
177
- let message = '';
178
- if (this.formControl.errors) {
179
- const objErrors = this.formControl.errors;
180
- if (objErrors.erroMessage)
181
- message = objErrors.erroMessage;
182
- }
183
- return message;
184
- }
185
- getName(control) {
186
- var _a, _b, _c, _d;
187
- return (_d = (_c = Object.entries((_b = (_a = control.parent) === null || _a === void 0 ? void 0 : _a.controls) !== null && _b !== void 0 ? _b : []).find(([_, value]) => value === control)) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : null;
188
- }
189
- hasControlError() {
190
- if (!this.formControl)
191
- return false;
192
- return (this.formControl.dirty || this.formControl.touched) && this.formControl.errors !== null;
193
- }
194
- ngAfterViewInit() {
195
- this.viewErrors.forEach(c => {
196
- c.emitError.subscribe(res => {
197
- this.hasError = res;
198
- this.componentService.changeDetectorRef.detectChanges();
199
- });
200
- });
201
- }
202
- ngAfterContentInit() {
203
- this.contentErrors.forEach(c => {
204
- c.emitError.subscribe(res => {
205
- this.hasError = res;
206
- });
207
- });
208
- }
209
- ngOnInit() {
210
- this.formControl = this.componentService.getFormControl();
211
- }
212
- onInputBlur(event) {
213
- this.onTouched();
214
- this.onBlur.emit(event);
215
- }
216
- }
217
- BaseComponentInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentInput, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
218
- 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 });
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentInput, decorators: [{
220
- type: Component,
221
- args: [{
222
- template: '',
223
- }]
224
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { placeholder: [{
225
- type: Input
226
- }], onBlur: [{
227
- type: Output
228
- }], viewErrors: [{
229
- type: ViewChildren,
230
- args: [ErrorComponent]
231
- }], contentErrors: [{
232
- type: ContentChildren,
233
- args: [ErrorComponent]
234
- }] } });
235
-
236
- function ComponentProviders(ref) {
237
- return [
238
- {
239
- provide: NG_VALUE_ACCESSOR,
240
- useExisting: forwardRef(() => ref),
241
- multi: true,
242
- },
243
- {
244
- provide: ComponentService
245
- }
246
- ];
247
- }
248
-
249
- class CheckComponent extends BaseComponentInput {
250
- constructor(componentService) {
251
- super(componentService);
252
- this.onCheckChange = new EventEmitter();
253
- }
254
- emitOnCheckChange(event) {
255
- this.onCheckChange.emit(event);
256
- }
257
- }
258
- CheckComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CheckComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
259
- 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"] }] });
260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CheckComponent, decorators: [{
261
- type: Component,
262
- 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"] }]
263
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { onCheckChange: [{
264
- type: Output
265
- }] } });
266
-
267
- class ObjectService {
268
- static filterObject(array, propertyName, value) {
269
- return array.filter((e) => {
270
- return e[propertyName] === value;
271
- });
272
- }
273
- static findObject(array, propertyName, value) {
274
- return array.find((e) => {
275
- return e[propertyName] === value;
276
- });
277
- }
278
- static getProperty(obj, propertyName) {
279
- return obj[propertyName];
280
- }
281
- }
282
- ObjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
283
- ObjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, providedIn: 'root' });
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ObjectService, decorators: [{
285
- type: Injectable,
286
- args: [{
287
- providedIn: 'root'
288
- }]
289
- }] });
290
-
291
- class BaseComponentDropDown extends BaseComponentInput {
292
- constructor(componentService, dialogService) {
293
- super(componentService);
294
- this.dialogService = dialogService;
295
- this.addButton = false;
296
- this.filter = true;
297
- this.showClear = true;
298
- this.onAddClick = new EventEmitter();
299
- this.onSelectionChange = new EventEmitter();
300
- this.onSelectionValue = new EventEmitter();
301
- this.onClick = new EventEmitter();
302
- this.registerOnTouched(() => { });
303
- }
304
- ngOnInit() {
305
- super.ngOnInit();
306
- // this.carregarCombo();
307
- this.setPlaceHolder('Selecione um valor');
308
- }
309
- addClick(event) {
310
- this.onAddClick.emit(event);
311
- }
312
- carregarCombo() {
313
- this.listar().subscribe({
314
- next: (data) => {
315
- this.options = data;
316
- this.filteredOptions = data;
317
- },
318
- error: (error) => { },
319
- });
320
- }
321
- filterOptions(field, value) {
322
- if (this.options) {
323
- let lista = ObjectService.filterObject(this.options, field, value);
324
- if ((lista === null || lista === void 0 ? void 0 : lista.length) > 0) {
325
- of(lista).subscribe((opts) => {
326
- this.filteredOptions = opts;
327
- });
328
- }
329
- else
330
- this.filteredOptions = [];
331
- }
332
- }
333
- listar() { }
334
- onInputClick(event) {
335
- this.onClick.emit(event);
336
- }
337
- openDialog(componentType, width, height) {
338
- const ref = this.dialogService.open(componentType, {
339
- width: width || '70%',
340
- height: height,
341
- closable: false,
342
- maximizable: true,
343
- data: { popup: true },
344
- });
345
- ref.onClose.subscribe((id) => {
346
- if (id) {
347
- this.listar().subscribe((data) => {
348
- var _a;
349
- this.options = data;
350
- this.filteredOptions = data;
351
- if (id)
352
- (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.setValue(id);
353
- });
354
- }
355
- });
356
- }
357
- selectionValue(event) {
358
- this.onSelectionValue.emit(event);
359
- let currentItem = null;
360
- const controlName = this.getName(this.formControl);
361
- if (controlName)
362
- currentItem = ObjectService.findObject(this.options, controlName, event.value);
363
- this.onSelectionChange.emit(currentItem);
364
- }
365
- setPlaceHolder(p) {
366
- if (!this.placeholder)
367
- this.placeholder = p;
368
- }
369
- }
370
- 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 });
371
- 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 });
372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentDropDown, decorators: [{
373
- type: Component,
374
- args: [{
375
- template: '',
376
- }]
377
- }], ctorParameters: function () { return [{ type: ComponentService }, { type: i2$1.DialogService }]; }, propDecorators: { options: [{
378
- type: Input
379
- }], filteredOptions: [{
380
- type: Input
381
- }], optionLabel: [{
382
- type: Input
383
- }], optionValue: [{
384
- type: Input
385
- }], addButton: [{
386
- type: Input
387
- }], filter: [{
388
- type: Input
389
- }], showClear: [{
390
- type: Input
391
- }], onAddClick: [{
392
- type: Output
393
- }], onSelectionChange: [{
394
- type: Output
395
- }], onSelectionValue: [{
396
- type: Output
397
- }], onClick: [{
398
- type: Output
399
- }] } });
400
-
401
- class DropdownComponent extends BaseComponentDropDown {
402
- constructor(componentService, dialogService) {
403
- super(componentService, dialogService);
404
- }
405
- }
406
- 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 });
407
- 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"] }] });
408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DropdownComponent, decorators: [{
409
- type: Component,
410
- 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"] }]
411
- }], ctorParameters: function () { return [{ type: ComponentService }, { type: i2$1.DialogService }]; } });
412
-
413
- class InputCalendarComponent extends BaseComponentInput {
414
- constructor(componentService) {
415
- super(componentService);
416
- this.isYear = false;
417
- this.isMonthYear = false;
418
- this.showButtonBar = false;
419
- this.showIcon = true;
420
- this.selectionMode = 'single';
421
- this.typeView = 'date';
422
- this.dateFormat = 'dd/mm/yy';
423
- }
424
- writeValue(value) {
425
- this.value = value;
426
- if (value && typeof value === 'string') {
427
- this.value = new Date(value);
428
- }
429
- }
430
- ngOnInit() {
431
- super.ngOnInit();
432
- if (this.isYear) {
433
- this.typeView = "year";
434
- this.dateFormat = 'yy';
435
- }
436
- else if (this.isMonthYear) {
437
- this.typeView = 'month';
438
- this.dateFormat = 'mm/yy';
439
- }
440
- else {
441
- this.typeView = 'date';
442
- this.dateFormat = 'dd/mm/yy';
443
- }
444
- }
445
- }
446
- InputCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputCalendarComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
447
- 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"] }] });
448
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputCalendarComponent, decorators: [{
449
- type: Component,
450
- 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"] }]
451
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { isYear: [{
452
- type: Input
453
- }], isMonthYear: [{
454
- type: Input
455
- }], minDate: [{
456
- type: Input
457
- }], maxDate: [{
458
- type: Input
459
- }], showButtonBar: [{
460
- type: Input
461
- }], showIcon: [{
462
- type: Input
463
- }], selectionMode: [{
464
- type: Input
465
- }] } });
466
-
467
- class InputMaskComponent extends BaseComponentInput {
468
- constructor(componentService) {
469
- super(componentService);
470
- }
471
- }
472
- InputMaskComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputMaskComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
473
- 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"] }] });
474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputMaskComponent, decorators: [{
475
- type: Component,
476
- 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"] }]
477
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { mask: [{
478
- type: Input
479
- }] } });
480
-
481
- class InputNumberComponent extends BaseComponentInput {
482
- constructor(componentService) {
483
- super(componentService);
484
- this.mode = 'decimal';
485
- this.digits = 0;
486
- this.min = 0;
487
- }
488
- ngOnInit() {
489
- super.ngOnInit();
490
- this.inputNumber.mode = this.mode;
491
- this.inputNumber.locale = 'pt-BR';
492
- switch (this.mode) {
493
- case 'decimal':
494
- this.configDecimal();
495
- break;
496
- case 'currency':
497
- this.configCurrency();
498
- break;
499
- }
500
- }
501
- configDecimal() {
502
- if (!this.digits)
503
- this.inputNumber.useGrouping = false;
504
- this.inputNumber.minFractionDigits = this.digits;
505
- this.inputNumber.maxFractionDigits = this.digits;
506
- }
507
- configCurrency() {
508
- this.inputNumber.currency = 'BRL';
509
- }
510
- }
511
- InputNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputNumberComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
512
- 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"] }] });
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputNumberComponent, decorators: [{
514
- type: Component,
515
- 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"] }]
516
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { mode: [{
517
- type: Input
518
- }], digits: [{
519
- type: Input
520
- }], min: [{
521
- type: Input
522
- }], max: [{
523
- type: Input
524
- }], inputNumber: [{
525
- type: ViewChild,
526
- args: ['inputNumber', { static: true }]
527
- }] } });
528
-
529
- class InputPasswordComponent extends BaseComponentInput {
530
- constructor(componentService) {
531
- super(componentService);
532
- this.feedback = false;
533
- this.mediumRegex = '';
534
- this.strongRegex = '';
535
- this.toggleMask = true;
536
- }
537
- }
538
- InputPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputPasswordComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
539
- 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"] }] });
540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputPasswordComponent, decorators: [{
541
- type: Component,
542
- 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"] }]
543
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { feedback: [{
544
- type: Input
545
- }], mediumRegex: [{
546
- type: Input
547
- }], strongRegex: [{
548
- type: Input
549
- }], toggleMask: [{
550
- type: Input
551
- }] } });
552
-
553
- class InputTextComponent extends BaseComponentInput {
554
- constructor(componentService) {
555
- super(componentService);
556
- }
557
- }
558
- InputTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
559
- 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]" }] });
560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextComponent, decorators: [{
561
- type: Component,
562
- 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"] }]
563
- }], ctorParameters: function () { return [{ type: ComponentService }]; } });
564
-
565
- class InputTextareaComponent extends BaseComponentInput {
566
- constructor(componentService) {
567
- super(componentService);
568
- this.multiline = false;
569
- this.rows = 2;
570
- this.cols = 20;
571
- this.autoResize = false;
572
- this.maxValueLength = 0;
573
- this.counterValueLength = 0;
574
- }
575
- ngOnInit() {
576
- var _a;
577
- super.ngOnInit();
578
- (_a = this.formControl) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe((value) => {
579
- this.counterValueLength = value === null || value === void 0 ? void 0 : value.length;
580
- });
581
- }
582
- }
583
- InputTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextareaComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
584
- 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"] }] });
585
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTextareaComponent, decorators: [{
586
- type: Component,
587
- 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"] }]
588
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { multiline: [{
589
- type: Input
590
- }], rows: [{
591
- type: Input
592
- }], cols: [{
593
- type: Input
594
- }], autoResize: [{
595
- type: Input
596
- }], maxValueLength: [{
597
- type: Input
598
- }] } });
599
-
600
- class InputTimeComponent extends BaseComponentInput {
601
- constructor(componentService) {
602
- super(componentService);
603
- this.showIcon = true;
604
- }
605
- }
606
- InputTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTimeComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
607
- 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"] }] });
608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: InputTimeComponent, decorators: [{
609
- type: Component,
610
- 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"] }]
611
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { showIcon: [{
612
- type: Input
613
- }] } });
614
-
615
- class MultiSelectComponent extends BaseComponentInput {
616
- constructor(componentService) {
617
- super(componentService);
618
- this.filter = false;
619
- this.showClear = false;
620
- this.onSelectionChange = new EventEmitter();
621
- this.onPanelHide = new EventEmitter();
622
- }
623
- ngOnInit() {
624
- super.ngOnInit();
625
- }
626
- get baseInputClass() {
627
- return `p-multiselect-sm ${this.hasError ? 'ng-invalid ng-dirty' : ''}`;
628
- }
629
- selectionChange(event) {
630
- this.onSelectionChange.emit(event);
631
- }
632
- panelHide(event) {
633
- this.onPanelHide.emit(event);
634
- }
635
- }
636
- MultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiSelectComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
637
- 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"] }] });
638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MultiSelectComponent, decorators: [{
639
- type: Component,
640
- 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"] }]
641
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { options: [{
642
- type: Input
643
- }], optionLabel: [{
644
- type: Input
645
- }], optionValue: [{
646
- type: Input
647
- }], filter: [{
648
- type: Input
649
- }], showClear: [{
650
- type: Input
651
- }], onSelectionChange: [{
652
- type: Output
653
- }], onPanelHide: [{
654
- type: Output
655
- }] } });
656
-
657
- class SwitchComponent extends BaseComponentInput {
658
- constructor(componentService) {
659
- super(componentService);
660
- this.onSwitchChange = new EventEmitter();
661
- }
662
- emitOnSwitchChange(event) {
663
- this.onSwitchChange.emit(event);
664
- }
665
- }
666
- SwitchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SwitchComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component });
667
- 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"] }] });
668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SwitchComponent, decorators: [{
669
- type: Component,
670
- 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"] }]
671
- }], ctorParameters: function () { return [{ type: ComponentService }]; }, propDecorators: { onSwitchChange: [{
672
- type: Output
673
- }] } });
674
-
675
- class BaseComponentButton {
676
- constructor() {
677
- this.icon = '';
678
- this.label = '';
679
- this.loading = false;
680
- this.disabled = false;
681
- this.color = 'bg-blue-100';
682
- this.onClick = new EventEmitter();
683
- }
684
- click(event) {
685
- this.onClick.emit();
686
- }
687
- }
688
- BaseComponentButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
689
- 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 });
690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BaseComponentButton, decorators: [{
691
- type: Component,
692
- args: [{
693
- template: '',
694
- }]
695
- }], ctorParameters: function () { return []; }, propDecorators: { icon: [{
696
- type: Input
697
- }], label: [{
698
- type: Input
699
- }], loading: [{
700
- type: Input
701
- }], disabled: [{
702
- type: Input
703
- }], color: [{
704
- type: Input
705
- }], onClick: [{
706
- type: Output
707
- }] } });
708
-
709
- class ButtonSecondaryComponent extends BaseComponentButton {
710
- constructor() {
711
- super();
712
- }
713
- }
714
- ButtonSecondaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
715
- 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]" }] });
716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, decorators: [{
717
- type: Component,
718
- 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"] }]
719
- }], ctorParameters: function () { return []; } });
720
-
721
- class ButtonSuccessComponent extends BaseComponentButton {
722
- constructor() {
723
- super();
724
- }
725
- }
726
- ButtonSuccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
727
- 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]" }] });
728
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, decorators: [{
729
- type: Component,
730
- 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"] }]
731
- }], ctorParameters: function () { return []; } });
732
-
733
- class ButtonPersonalizeComponent extends BaseComponentButton {
734
- constructor() {
735
- super();
736
- }
737
- }
738
- ButtonPersonalizeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonPersonalizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
739
- 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]" }] });
740
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonPersonalizeComponent, decorators: [{
741
- type: Component,
742
- 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" }]
743
- }], ctorParameters: function () { return []; } });
744
-
745
- class TemplateDirective {
746
- constructor(template) {
747
- this.template = template;
748
- }
749
- getType() {
750
- return this.name;
751
- }
752
- }
753
- TemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
754
- TemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: TemplateDirective, selector: "[cTemplate]", inputs: { type: "type", name: ["cTemplate", "name"] }, ngImport: i0 });
755
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TemplateDirective, decorators: [{
756
- type: Directive,
757
- args: [{
758
- selector: '[cTemplate]'
759
- }]
760
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { type: [{
761
- type: Input
762
- }], name: [{
763
- type: Input,
764
- args: ['cTemplate']
765
- }] } });
766
-
767
- class CodigoFipePipe {
768
- transform(value) {
769
- if (value) {
770
- const identificacao = value.replace(/[^0-9]/g, '');
771
- return identificacao.replace(/(\d{6})(\d{1})/g, "\$1-\$2");
772
- }
773
- else
774
- return null;
775
- }
776
- }
777
- CodigoFipePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
778
- CodigoFipePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, name: "codigoFipe" });
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CodigoFipePipe, decorators: [{
780
- type: Pipe,
781
- args: [{ name: 'codigoFipe' }]
782
- }] });
783
-
784
- class CpfCnpjPipe {
785
- transform(value) {
786
- if (value) {
787
- const identificacao = value.replace(/[^0-9]/g, '');
788
- if (identificacao.length === 11) {
789
- return identificacao.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/g, "\$1.\$2.\$3\-\$4");
790
- }
791
- else if (identificacao.length === 14) {
792
- return identificacao.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g, "\$1.\$2.\$3\/\$4\-\$5");
793
- }
794
- return value;
795
- }
796
- else
797
- return null;
798
- }
799
- }
800
- CpfCnpjPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
801
- CpfCnpjPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, name: "cpfCnpj" });
802
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CpfCnpjPipe, decorators: [{
803
- type: Pipe,
804
- args: [{ name: 'cpfCnpj' }]
805
- }] });
806
-
807
- class TelefonePipe {
808
- transform(tel) {
809
- if (tel) {
810
- const value = tel.toString().replace(/\D/g, '');
811
- let foneFormatado = '';
812
- if (value.length > 12) {
813
- foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{5})?(\d{4})/, '+$1 ($2) $3-$4');
814
- }
815
- else if (value.length > 11) {
816
- foneFormatado = value.replace(/(\d{2})?(\d{2})?(\d{4})?(\d{4})/, '+$1 ($2) $3-$4');
817
- }
818
- else if (value.length > 10) {
819
- foneFormatado = value.replace(/(\d{2})?(\d{5})?(\d{4})/, '($1) $2-$3');
820
- }
821
- else if (value.length > 9) {
822
- foneFormatado = value.replace(/(\d{2})?(\d{4})?(\d{4})/, '($1) $2-$3');
823
- }
824
- else if (value.length > 5) {
825
- foneFormatado = value.replace(/^(\d{2})?(\d{4})?(\d{0,4})/, '($1) $2-$3');
826
- }
827
- else if (value.length > 1) {
828
- foneFormatado = value.replace(/^(\d{2})?(\d{0,5})/, '($1) $2');
829
- }
830
- else {
831
- if (tel !== '') {
832
- foneFormatado = value.replace(/^(\d*)/, '($1');
833
- }
834
- }
835
- return foneFormatado;
836
- }
837
- else
838
- return null;
839
- }
840
- }
841
- TelefonePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
842
- TelefonePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, name: "Telefone" });
843
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TelefonePipe, decorators: [{
844
- type: Pipe,
845
- args: [{
846
- name: 'Telefone'
847
- }]
848
- }] });
849
-
850
- class TableComponent {
851
- set setConfig(value) {
852
- this.config = Object.assign({ enableCation: value.enableCation || true, enableSelect: value.enableSelect || false, enableFilter: value.enableFilter || true }, value);
853
- if (this.config.enableFilter) {
854
- this.config.columns.forEach(col => {
855
- this.globalFilterFields.push(col.field);
856
- });
857
- }
858
- }
859
- constructor(datePipe, decimalPipe, codigoFipePipe, cpfCnpjPipe, telefonePipe) {
860
- this.datePipe = datePipe;
861
- this.decimalPipe = decimalPipe;
862
- this.codigoFipePipe = codigoFipePipe;
863
- this.cpfCnpjPipe = cpfCnpjPipe;
864
- this.telefonePipe = telefonePipe;
865
- this.globalFilterFields = [];
866
- this.selectedSize = '';
867
- this.paginator = true;
868
- this.rows = 5;
869
- this.applyStyle = (rowData, col) => '';
870
- this.onActiveItem = new EventEmitter();
871
- this.onPaginate = new EventEmitter();
872
- this.onSelectionChange = new EventEmitter();
873
- this.doubleClickEvent = new EventEmitter();
874
- this.filterField = new EventEmitter();
875
- }
876
- ngOnInit() {
877
- this.adjustTableSize();
878
- this.tamanhoTela = window.innerWidth;
879
- }
880
- onWindowResize() {
881
- this.adjustTableSize();
882
- this.tamanhoTela = window.innerWidth;
883
- }
884
- activeItem(rowData) {
885
- this.onActiveItem.emit(rowData);
886
- }
887
- isBooleanField(rowData, col) {
888
- return typeof rowData[col.field] == 'boolean';
889
- }
890
- onGlobalFilter(table, event) {
891
- this.filterField.emit(event.target.value);
892
- table.filterGlobal(event.target.value, 'contains');
893
- }
894
- paginate(event) {
895
- if (event) {
896
- let paginaInicial = (((event === null || event === void 0 ? void 0 : event.first) > 0) ? (event.first / event.rows) : event.first) + 1;
897
- let termoPesquisa = '';
898
- let ordenacao = '';
899
- if (event.globalFilter)
900
- termoPesquisa = event.globalFilter;
901
- if (event.sortField)
902
- ordenacao = `${event.sortField} ${(event.sortOrder === 1) ? 'ASC' : 'DESC'}`;
903
- const objeto = {
904
- paginaInicial: paginaInicial,
905
- tamanhoPagina: event.rows,
906
- termoPesquisa: termoPesquisa,
907
- ordenacao: ordenacao
908
- };
909
- this.onPaginate.emit(objeto);
910
- }
911
- }
912
- selectionChange(value = []) {
913
- this.onSelectionChange.emit(value);
914
- }
915
- returnRowClass(rowData, col) {
916
- let value = rowData[col.field];
917
- let rowClass;
918
- this.tableSize > 800 ? rowClass = 'text-base' : rowClass = 'text-sm';
919
- if (col.field == 'datavencimento') {
920
- new Date(value) < new Date() ? rowClass = rowClass + ' text-red-400 font-semibold' : '';
921
- }
922
- return rowClass;
923
- }
924
- expiredFile(rowData, col) {
925
- let value = rowData['datavencimento'];
926
- return new Date(value) < new Date() && col.field == 'area';
927
- }
928
- transformValue(rowData, col) {
929
- let value = rowData[col.field];
930
- if (value != null) {
931
- if (col.field == 'valor')
932
- return `R$${value.toFixed(2)}`;
933
- else if (!col.pipe) {
934
- return value;
935
- }
936
- switch (col.pipe) {
937
- case 'date':
938
- return this.datePipe.transform(value, 'dd/MM/yyyy');
939
- break;
940
- case 'decimal':
941
- return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
942
- break;
943
- case 'cpfcnpj':
944
- return this.cpfCnpjPipe.transform(value);
945
- break;
946
- case 'telefone':
947
- return this.telefonePipe.transform(value);
948
- break;
949
- case 'codigofipe':
950
- return this.codigoFipePipe.transform(value);
951
- break;
952
- }
953
- }
954
- }
955
- adjustTableSize() {
956
- if (this.tableSize < 800) {
957
- this.selectedSize = 'p-datatable-sm';
958
- }
959
- else {
960
- this.selectedSize = '';
961
- }
962
- }
963
- doubleClick(e, rowData) {
964
- let eventDoubleClick = { event: e, rowData: rowData };
965
- this.doubleClickEvent.emit(eventDoubleClick);
966
- }
967
- centralizarColunas(col) {
968
- if (col.centralize) {
969
- return 'text-align: center';
970
- }
971
- else
972
- return '';
973
- }
974
- retornarCampo(action, rowData, field) {
975
- const _function = action.dynamicfields ? action.dynamicfields[field] : null;
976
- const _field = _function ? _function.apply(action, [rowData]) : action[field];
977
- return _field;
978
- }
979
- }
980
- 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 });
981
- 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"] }] });
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableComponent, decorators: [{
983
- type: Component,
984
- 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"] }]
985
- }], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CodigoFipePipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }]; }, propDecorators: { templates: [{
986
- type: ContentChildren,
987
- args: [TemplateDirective]
988
- }], table: [{
989
- type: ViewChild,
990
- args: ['table', { static: false }]
991
- }], setConfig: [{
992
- type: Input,
993
- args: ['config']
994
- }], dataSource: [{
995
- type: Input
996
- }], selectedItems: [{
997
- type: Input
998
- }], totalRecords: [{
999
- type: Input
1000
- }], paginator: [{
1001
- type: Input
1002
- }], rowsPerPageOptions: [{
1003
- type: Input
1004
- }], rows: [{
1005
- type: Input
1006
- }], tableSize: [{
1007
- type: Input
1008
- }], applyStyle: [{
1009
- type: Input
1010
- }], onActiveItem: [{
1011
- type: Output
1012
- }], onPaginate: [{
1013
- type: Output
1014
- }], onSelectionChange: [{
1015
- type: Output
1016
- }], doubleClickEvent: [{
1017
- type: Output
1018
- }], filterField: [{
1019
- type: Output
1020
- }], onWindowResize: [{
1021
- type: HostListener,
1022
- args: ['window:resize', ['$event']]
1023
- }] } });
1024
-
1025
- class PrimeNgModule {
1026
- }
1027
- PrimeNgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1028
- PrimeNgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, exports: [AccordionModule,
1029
- AutoFocusModule,
1030
- BadgeModule,
1031
- ButtonModule,
1032
- CalendarModule,
1033
- CardModule,
1034
- CarouselModule,
1035
- CheckboxModule,
1036
- ConfirmDialogModule,
1037
- ContextMenuModule,
1038
- DialogModule,
1039
- DividerModule,
1040
- DropdownModule,
1041
- DynamicDialogModule,
1042
- InputMaskModule,
1043
- InputNumberModule,
1044
- InputSwitchModule,
1045
- InputTextModule,
1046
- InputTextareaModule,
1047
- MenuModule,
1048
- MessageModule,
1049
- MessagesModule,
1050
- MultiSelectModule,
1051
- OverlayPanelModule,
1052
- OverlayPanelModule,
1053
- PanelModule,
1054
- PasswordModule,
1055
- PickListModule,
1056
- RadioButtonModule,
1057
- RatingModule,
1058
- RippleModule,
1059
- SidebarModule,
1060
- SkeletonModule,
1061
- SpeedDialModule,
1062
- SplitButtonModule,
1063
- StepsModule,
1064
- TableModule,
1065
- ToastModule,
1066
- ToolbarModule,
1067
- TooltipModule,
1068
- OverlayModule] });
1069
- PrimeNgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, providers: [
1070
- ConfirmationService,
1071
- DialogService,
1072
- DynamicDialogRef,
1073
- DynamicDialogConfig,
1074
- MessageService,
1075
- ], imports: [AccordionModule,
1076
- AutoFocusModule,
1077
- BadgeModule,
1078
- ButtonModule,
1079
- CalendarModule,
1080
- CardModule,
1081
- CarouselModule,
1082
- CheckboxModule,
1083
- ConfirmDialogModule,
1084
- ContextMenuModule,
1085
- DialogModule,
1086
- DividerModule,
1087
- DropdownModule,
1088
- DynamicDialogModule,
1089
- InputMaskModule,
1090
- InputNumberModule,
1091
- InputSwitchModule,
1092
- InputTextModule,
1093
- InputTextareaModule,
1094
- MenuModule,
1095
- MessageModule,
1096
- MessagesModule,
1097
- MultiSelectModule,
1098
- OverlayPanelModule,
1099
- OverlayPanelModule,
1100
- PanelModule,
1101
- PasswordModule,
1102
- PickListModule,
1103
- RadioButtonModule,
1104
- RatingModule,
1105
- RippleModule,
1106
- SidebarModule,
1107
- SkeletonModule,
1108
- SpeedDialModule,
1109
- SplitButtonModule,
1110
- StepsModule,
1111
- TableModule,
1112
- ToastModule,
1113
- ToolbarModule,
1114
- TooltipModule,
1115
- OverlayModule] });
1116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PrimeNgModule, decorators: [{
1117
- type: NgModule,
1118
- args: [{
1119
- exports: [
1120
- AccordionModule,
1121
- AutoFocusModule,
1122
- BadgeModule,
1123
- ButtonModule,
1124
- CalendarModule,
1125
- CardModule,
1126
- CarouselModule,
1127
- CheckboxModule,
1128
- ConfirmDialogModule,
1129
- ContextMenuModule,
1130
- DialogModule,
1131
- DividerModule,
1132
- DropdownModule,
1133
- DynamicDialogModule,
1134
- InputMaskModule,
1135
- InputNumberModule,
1136
- InputSwitchModule,
1137
- InputTextModule,
1138
- InputTextareaModule,
1139
- MenuModule,
1140
- MessageModule,
1141
- MessagesModule,
1142
- MultiSelectModule,
1143
- OverlayPanelModule,
1144
- OverlayPanelModule,
1145
- PanelModule,
1146
- PasswordModule,
1147
- PickListModule,
1148
- RadioButtonModule,
1149
- RatingModule,
1150
- RippleModule,
1151
- SidebarModule,
1152
- SkeletonModule,
1153
- SpeedDialModule,
1154
- SplitButtonModule,
1155
- StepsModule,
1156
- TableModule,
1157
- ToastModule,
1158
- ToolbarModule,
1159
- TooltipModule,
1160
- OverlayModule
1161
- ],
1162
- providers: [
1163
- ConfirmationService,
1164
- DialogService,
1165
- DynamicDialogRef,
1166
- DynamicDialogConfig,
1167
- MessageService,
1168
- ]
1169
- }]
1170
- }] });
1171
-
1172
- class KvButtonsModule {
1173
- }
1174
- KvButtonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1175
- KvButtonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, declarations: [ButtonSecondaryComponent,
1176
- ButtonSuccessComponent,
1177
- ButtonPersonalizeComponent], imports: [PrimeNgModule], exports: [ButtonSecondaryComponent,
1178
- ButtonSuccessComponent,
1179
- ButtonPersonalizeComponent] });
1180
- KvButtonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, imports: [PrimeNgModule] });
1181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvButtonsModule, decorators: [{
1182
- type: NgModule,
1183
- args: [{
1184
- declarations: [
1185
- ButtonSecondaryComponent,
1186
- ButtonSuccessComponent,
1187
- ButtonPersonalizeComponent
1188
- ],
1189
- imports: [
1190
- PrimeNgModule
1191
- ],
1192
- exports: [
1193
- ButtonSecondaryComponent,
1194
- ButtonSuccessComponent,
1195
- ButtonPersonalizeComponent
1196
- ]
1197
- }]
1198
- }] });
1199
-
1200
- class kvErrorModule {
1201
- }
1202
- kvErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1203
- kvErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, declarations: [ErrorComponent], imports: [CommonModule,
1204
- FormsModule,
1205
- PrimeNgModule,
1206
- ReactiveFormsModule], exports: [ErrorComponent] });
1207
- kvErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, imports: [CommonModule,
1208
- FormsModule,
1209
- PrimeNgModule,
1210
- ReactiveFormsModule] });
1211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: kvErrorModule, decorators: [{
1212
- type: NgModule,
1213
- args: [{
1214
- declarations: [
1215
- ErrorComponent,
1216
- ],
1217
- imports: [
1218
- CommonModule,
1219
- FormsModule,
1220
- PrimeNgModule,
1221
- ReactiveFormsModule,
1222
- ],
1223
- exports: [
1224
- ErrorComponent,
1225
- ]
1226
- }]
1227
- }] });
1228
-
1229
- class KvInputsModule {
1230
- }
1231
- KvInputsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1232
- KvInputsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, declarations: [CheckComponent,
1233
- DropdownComponent,
1234
- InputCalendarComponent,
1235
- InputMaskComponent,
1236
- InputNumberComponent,
1237
- InputPasswordComponent,
1238
- InputTextComponent,
1239
- InputTextareaComponent,
1240
- InputTimeComponent,
1241
- MultiSelectComponent,
1242
- SwitchComponent], imports: [CommonModule,
1243
- FormsModule,
1244
- kvErrorModule,
1245
- PrimeNgModule,
1246
- ReactiveFormsModule], exports: [CheckComponent,
1247
- DropdownComponent,
1248
- InputCalendarComponent,
1249
- InputMaskComponent,
1250
- InputNumberComponent,
1251
- InputPasswordComponent,
1252
- InputTextComponent,
1253
- InputTextareaComponent,
1254
- InputTimeComponent,
1255
- MultiSelectComponent,
1256
- SwitchComponent] });
1257
- KvInputsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, imports: [CommonModule,
1258
- FormsModule,
1259
- kvErrorModule,
1260
- PrimeNgModule,
1261
- ReactiveFormsModule] });
1262
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvInputsModule, decorators: [{
1263
- type: NgModule,
1264
- args: [{
1265
- declarations: [
1266
- CheckComponent,
1267
- DropdownComponent,
1268
- InputCalendarComponent,
1269
- InputMaskComponent,
1270
- InputNumberComponent,
1271
- InputPasswordComponent,
1272
- InputTextComponent,
1273
- InputTextareaComponent,
1274
- InputTimeComponent,
1275
- MultiSelectComponent,
1276
- SwitchComponent,
1277
- ],
1278
- imports: [
1279
- CommonModule,
1280
- FormsModule,
1281
- kvErrorModule,
1282
- PrimeNgModule,
1283
- ReactiveFormsModule,
1284
- ],
1285
- exports: [
1286
- CheckComponent,
1287
- DropdownComponent,
1288
- InputCalendarComponent,
1289
- InputMaskComponent,
1290
- InputNumberComponent,
1291
- InputPasswordComponent,
1292
- InputTextComponent,
1293
- InputTextareaComponent,
1294
- InputTimeComponent,
1295
- MultiSelectComponent,
1296
- SwitchComponent,
1297
- ]
1298
- }]
1299
- }] });
1300
-
1301
- class KvTableModule {
1302
- }
1303
- KvTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1304
- KvTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, declarations: [TableComponent], imports: [CommonModule,
1305
- PrimeNgModule], exports: [TableComponent] });
1306
- KvTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, imports: [CommonModule,
1307
- PrimeNgModule] });
1308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KvTableModule, decorators: [{
1309
- type: NgModule,
1310
- args: [{
1311
- declarations: [
1312
- TableComponent
1313
- ],
1314
- imports: [
1315
- CommonModule,
1316
- PrimeNgModule
1317
- ],
1318
- exports: [
1319
- TableComponent
1320
- ]
1321
- }]
1322
- }] });
1323
-
1324
- class KeevoComponentsModule {
1325
- }
1326
- KeevoComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1327
- KeevoComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvInputsModule,
1328
- KvButtonsModule,
1329
- KvTableModule], exports: [KvInputsModule,
1330
- KvButtonsModule,
1331
- KvTableModule] });
1332
- KeevoComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvInputsModule,
1333
- KvButtonsModule,
1334
- KvTableModule, KvInputsModule,
1335
- KvButtonsModule,
1336
- KvTableModule] });
1337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: KeevoComponentsModule, decorators: [{
1338
- type: NgModule,
1339
- args: [{
1340
- declarations: [],
1341
- imports: [
1342
- KvInputsModule,
1343
- KvButtonsModule,
1344
- KvTableModule
1345
- ],
1346
- exports: [
1347
- KvInputsModule,
1348
- KvButtonsModule,
1349
- KvTableModule
1350
- ]
1351
- }]
1352
- }] });
1353
-
1354
- class PipesModule {
1355
- }
1356
- PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1357
- PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, declarations: [CpfCnpjPipe,
1358
- TelefonePipe,
1359
- CodigoFipePipe], imports: [CommonModule], exports: [CpfCnpjPipe,
1360
- TelefonePipe,
1361
- CodigoFipePipe] });
1362
- PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, imports: [CommonModule] });
1363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PipesModule, decorators: [{
1364
- type: NgModule,
1365
- args: [{
1366
- imports: [
1367
- CommonModule
1368
- ],
1369
- declarations: [
1370
- CpfCnpjPipe,
1371
- TelefonePipe,
1372
- CodigoFipePipe
1373
- ],
1374
- exports: [
1375
- CpfCnpjPipe,
1376
- TelefonePipe,
1377
- CodigoFipePipe
1378
- ]
1379
- }]
1380
- }] });
1381
-
1382
- class TranslatePrimeng {
1383
- config(config) {
1384
- config.ripple = true;
1385
- config.setTranslation({
1386
- monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
1387
- monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
1388
- dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabádo'],
1389
- dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
1390
- dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
1391
- today: 'Hoje',
1392
- weekHeader: 'Semana',
1393
- emptyMessage: 'Nenhum resultado encontrado',
1394
- emptyFilterMessage: 'Nenhum registro encontrado com o filtro informado',
1395
- weak: 'Fraca',
1396
- medium: 'Média',
1397
- strong: 'Forte',
1398
- passwordPrompt: 'Informe a senha',
1399
- clear: 'Limpar',
1400
- apply: 'Aplicar'
1401
- });
1402
- }
1403
- }
1404
-
1405
- class NotificationService {
1406
- constructor(confirmationService, messageService) {
1407
- this.confirmationService = confirmationService;
1408
- this.messageService = messageService;
1409
- }
1410
- question(config) {
1411
- this.confirmationService.confirm(Object.assign({ header: config.type === 'alert' ? 'Atenção' : 'Confirmação', icon: `pi ${config.type === 'alert' ? 'pi-exclamation-triangle' : 'pi-question-circle'}`, acceptLabel: 'Sim', acceptButtonStyleClass: 'p-button-success', rejectLabel: 'Não', rejectButtonStyleClass: 'p-button-secondary' }, config));
1412
- }
1413
- dialog(config) {
1414
- let dialogHeader;
1415
- let dialogIcon;
1416
- switch (config.type) {
1417
- case 'alert':
1418
- dialogHeader = 'Atenção';
1419
- dialogIcon = 'pi pi-exclamation-triangle';
1420
- break;
1421
- case 'info':
1422
- dialogHeader = 'Info';
1423
- dialogIcon = 'pi pi-info-circle';
1424
- break;
1425
- case 'error':
1426
- dialogHeader = 'Erro';
1427
- dialogIcon = 'pi pi-times-circle';
1428
- break;
1429
- }
1430
- this.confirmationService.confirm({
1431
- header: dialogHeader,
1432
- icon: dialogIcon,
1433
- acceptLabel: 'Ok',
1434
- acceptButtonStyleClass: 'p-button-success',
1435
- rejectVisible: false,
1436
- message: config.message,
1437
- });
1438
- }
1439
- toastSuccess(message) {
1440
- this.messageService.add({ severity: 'success', summary: 'Sucesso', detail: message });
1441
- }
1442
- toastInfo(message) {
1443
- this.messageService.add({ severity: 'info', summary: 'Info', detail: message });
1444
- }
1445
- toastWarn(message) {
1446
- this.messageService.add({ severity: 'warn', summary: 'Aviso', detail: message });
1447
- }
1448
- toastError(message) {
1449
- this.messageService.add({ severity: 'error', summary: 'Erro', detail: message });
1450
- }
1451
- }
1452
- 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 });
1453
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, providedIn: 'root' });
1454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, decorators: [{
1455
- type: Injectable,
1456
- args: [{
1457
- providedIn: 'root',
1458
- }]
1459
- }], ctorParameters: function () { return [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }]; } });
1460
-
1461
- class TablePaginate {
1462
- constructor() {
1463
- this.paginaInicial = 1;
1464
- this.tamanhoPagina = 10;
1465
- this.termoPesquisa = '';
1466
- this.ordenacao = '';
1467
- }
1468
- }
1469
-
1470
- ;
1471
-
1472
- /*
1473
- * Public API Surface of keevo-components
1474
- */
1475
-
1476
- /**
1477
- * Generated bundle index. Do not edit.
1478
- */
1479
-
1480
- 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 };
1481
- //# sourceMappingURL=keevo-components.mjs.map