keevo-components 1.3.8 → 1.4.0

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/esm2020/keevo-components.mjs +5 -0
  2. package/esm2020/lib/api/base-components/base-component-button.mjs +36 -0
  3. package/esm2020/lib/api/base-components/base-component-dropdown.mjs +116 -0
  4. package/esm2020/lib/api/base-components/base-component-input.mjs +77 -0
  5. package/esm2020/lib/api/base-components/base-component.mjs +49 -0
  6. package/esm2020/lib/api/components/error/error.component.mjs +26 -0
  7. package/esm2020/lib/api/components/error/kverror.module.mjs +35 -0
  8. package/esm2020/lib/api/components/table/action-item.mjs +2 -0
  9. package/esm2020/lib/api/components/table/kv-menuitem.mjs +3 -0
  10. package/esm2020/lib/api/components/table/table.config.column.mjs +2 -0
  11. package/esm2020/lib/api/components/table/table.config.mjs +2 -0
  12. package/esm2020/lib/api/components/table/table.paginate.mjs +9 -0
  13. package/esm2020/lib/api/helpers/component-providers.mjs +16 -0
  14. package/esm2020/lib/api/helpers/translate-primeng.mjs +23 -0
  15. package/esm2020/lib/api/modules/primeng.module.mjs +191 -0
  16. package/esm2020/lib/api/services/component.service.mjs +27 -0
  17. package/esm2020/lib/api/services/notification.service.mjs +67 -0
  18. package/esm2020/lib/api/services/object.service.mjs +26 -0
  19. package/esm2020/lib/buttons/button-personalize/button-personalize.component.mjs +17 -0
  20. package/esm2020/lib/buttons/button-secondary/button-secondary.component.mjs +17 -0
  21. package/esm2020/lib/buttons/button-success/button-success.component.mjs +17 -0
  22. package/esm2020/lib/buttons/kvbutton.module.mjs +34 -0
  23. package/esm2020/lib/directives/template.directive.mjs +24 -0
  24. package/esm2020/lib/inputs/check/check.component.mjs +26 -0
  25. package/esm2020/lib/inputs/dropdown/dropdown.component.mjs +26 -0
  26. package/esm2020/lib/inputs/input-calendar/input-calendar.component.mjs +62 -0
  27. package/esm2020/lib/inputs/input-mask/input-mask.component.mjs +22 -0
  28. package/esm2020/lib/inputs/input-number/input-number.component.mjs +56 -0
  29. package/esm2020/lib/inputs/input-password/input-password.component.mjs +32 -0
  30. package/esm2020/lib/inputs/input-text/input-text.component.mjs +20 -0
  31. package/esm2020/lib/inputs/input-textarea/input-textarea.component.mjs +42 -0
  32. package/esm2020/lib/inputs/input-time/input-time.component.mjs +23 -0
  33. package/esm2020/lib/inputs/kvinputs.module.mjs +89 -0
  34. package/esm2020/lib/inputs/multi-select/multi-select.component.mjs +50 -0
  35. package/esm2020/lib/inputs/switch/switch.component.mjs +26 -0
  36. package/esm2020/lib/keevo-components.module.mjs +35 -0
  37. package/esm2020/lib/pipes/codigofile.pipe.mjs +19 -0
  38. package/esm2020/lib/pipes/cpfcnpj.pipe.mjs +25 -0
  39. package/esm2020/lib/pipes/pipes.module.mjs +34 -0
  40. package/esm2020/lib/pipes/telefone.pipe.mjs +45 -0
  41. package/esm2020/lib/table/kvtable.module.mjs +28 -0
  42. package/esm2020/lib/table/table.component.mjs +214 -0
  43. package/esm2020/public-api.mjs +44 -0
  44. package/fesm2015/keevo-components.mjs +1501 -0
  45. package/fesm2015/keevo-components.mjs.map +1 -0
  46. package/fesm2020/keevo-components.mjs +1510 -0
  47. package/fesm2020/keevo-components.mjs.map +1 -0
  48. package/index.d.ts +5 -0
  49. package/lib/api/base-components/base-component-button.d.ts +14 -0
  50. package/lib/api/base-components/base-component-dropdown.d.ts +31 -0
  51. package/lib/api/base-components/base-component-input.d.ts +26 -0
  52. package/lib/api/base-components/base-component.d.ts +21 -0
  53. package/lib/api/components/error/error.component.d.ts +12 -0
  54. package/lib/api/components/error/kverror.module.d.ts +10 -0
  55. package/lib/api/components/table/action-item.d.ts +5 -0
  56. package/{src/lib/api/components/table/kv-menuitem.ts → lib/api/components/table/kv-menuitem.d.ts} +3 -4
  57. package/lib/api/components/table/table.config.column.d.ts +10 -0
  58. package/lib/api/components/table/table.config.d.ts +13 -0
  59. package/lib/api/components/table/table.paginate.d.ts +6 -0
  60. package/lib/api/helpers/component-providers.d.ts +2 -0
  61. package/lib/api/helpers/translate-primeng.d.ts +4 -0
  62. package/lib/api/modules/primeng.module.d.ts +46 -0
  63. package/lib/api/services/component.service.d.ts +11 -0
  64. package/lib/api/services/notification.service.d.ts +25 -0
  65. package/lib/api/services/object.service.d.ts +8 -0
  66. package/lib/buttons/button-personalize/button-personalize.component.d.ts +7 -0
  67. package/lib/buttons/button-secondary/button-secondary.component.d.ts +7 -0
  68. package/lib/buttons/button-success/button-success.component.d.ts +7 -0
  69. package/lib/buttons/kvbutton.module.d.ts +10 -0
  70. package/lib/directives/template.directive.d.ts +11 -0
  71. package/lib/inputs/check/check.component.d.ts +11 -0
  72. package/lib/inputs/dropdown/dropdown.component.d.ts +9 -0
  73. package/lib/inputs/input-calendar/input-calendar.component.d.ts +21 -0
  74. package/lib/inputs/input-mask/input-mask.component.d.ts +10 -0
  75. package/lib/inputs/input-number/input-number.component.d.ts +18 -0
  76. package/lib/inputs/input-password/input-password.component.d.ts +13 -0
  77. package/lib/inputs/input-text/input-text.component.d.ts +9 -0
  78. package/lib/inputs/input-textarea/input-textarea.component.d.ts +16 -0
  79. package/lib/inputs/input-time/input-time.component.d.ts +10 -0
  80. package/lib/inputs/kvinputs.module.d.ts +21 -0
  81. package/lib/inputs/multi-select/multi-select.component.d.ts +20 -0
  82. package/lib/inputs/switch/switch.component.d.ts +11 -0
  83. package/lib/keevo-components.module.d.ts +9 -0
  84. package/lib/pipes/codigofile.pipe.d.ts +7 -0
  85. package/lib/pipes/cpfcnpj.pipe.d.ts +7 -0
  86. package/lib/pipes/pipes.module.d.ts +10 -0
  87. package/lib/pipes/telefone.pipe.d.ts +7 -0
  88. package/lib/table/kvtable.module.d.ts +9 -0
  89. package/lib/table/table.component.d.ts +59 -0
  90. package/package.json +39 -20
  91. package/{src/public-api.ts → public-api.d.ts} +4 -11
  92. package/ng-package.json +0 -7
  93. package/src/index.ts +0 -1
  94. package/src/lib/api/base-components/base-component-button.ts +0 -26
  95. package/src/lib/api/base-components/base-component-dropdown.ts +0 -127
  96. package/src/lib/api/base-components/base-component-input.ts +0 -91
  97. package/src/lib/api/base-components/base-component.ts +0 -46
  98. package/src/lib/api/components/error/error.component.html +0 -3
  99. package/src/lib/api/components/error/error.component.scss +0 -0
  100. package/src/lib/api/components/error/error.component.ts +0 -22
  101. package/src/lib/api/components/error/kverror.module.ts +0 -23
  102. package/src/lib/api/components/table/action-item.ts +0 -5
  103. package/src/lib/api/components/table/table.config.column.ts +0 -10
  104. package/src/lib/api/components/table/table.config.ts +0 -14
  105. package/src/lib/api/components/table/table.paginate.ts +0 -6
  106. package/src/lib/api/helpers/component-providers.ts +0 -16
  107. package/src/lib/api/helpers/translate-primeng.ts +0 -25
  108. package/src/lib/api/modules/primeng.module.ts +0 -97
  109. package/src/lib/api/services/component.service.ts +0 -22
  110. package/src/lib/api/services/notification.service.ts +0 -82
  111. package/src/lib/api/services/object.service.ts +0 -20
  112. package/src/lib/buttons/button-personalize/button-personalize.component.html +0 -9
  113. package/src/lib/buttons/button-personalize/button-personalize.component.scss +0 -0
  114. package/src/lib/buttons/button-personalize/button-personalize.component.ts +0 -13
  115. package/src/lib/buttons/button-secondary/button-secondary.component.html +0 -9
  116. package/src/lib/buttons/button-secondary/button-secondary.component.scss +0 -13
  117. package/src/lib/buttons/button-secondary/button-secondary.component.ts +0 -13
  118. package/src/lib/buttons/button-success/button-success.component.html +0 -9
  119. package/src/lib/buttons/button-success/button-success.component.scss +0 -12
  120. package/src/lib/buttons/button-success/button-success.component.ts +0 -13
  121. package/src/lib/buttons/kvbutton.module.ts +0 -22
  122. package/src/lib/directives/template.directive.ts +0 -15
  123. package/src/lib/inputs/check/check.component.html +0 -11
  124. package/src/lib/inputs/check/check.component.scss +0 -0
  125. package/src/lib/inputs/check/check.component.ts +0 -24
  126. package/src/lib/inputs/dropdown/dropdown.component.html +0 -43
  127. package/src/lib/inputs/dropdown/dropdown.component.scss +0 -0
  128. package/src/lib/inputs/dropdown/dropdown.component.ts +0 -19
  129. package/src/lib/inputs/input-calendar/input-calendar.component.html +0 -22
  130. package/src/lib/inputs/input-calendar/input-calendar.component.scss +0 -0
  131. package/src/lib/inputs/input-calendar/input-calendar.component.ts +0 -54
  132. package/src/lib/inputs/input-mask/input-mask.component.html +0 -15
  133. package/src/lib/inputs/input-mask/input-mask.component.scss +0 -0
  134. package/src/lib/inputs/input-mask/input-mask.component.ts +0 -20
  135. package/src/lib/inputs/input-number/input-number.component.html +0 -15
  136. package/src/lib/inputs/input-number/input-number.component.scss +0 -0
  137. package/src/lib/inputs/input-number/input-number.component.ts +0 -51
  138. package/src/lib/inputs/input-password/input-password.component.html +0 -18
  139. package/src/lib/inputs/input-password/input-password.component.scss +0 -0
  140. package/src/lib/inputs/input-password/input-password.component.ts +0 -23
  141. package/src/lib/inputs/input-text/input-text.component.html +0 -14
  142. package/src/lib/inputs/input-text/input-text.component.scss +0 -18
  143. package/src/lib/inputs/input-text/input-text.component.ts +0 -17
  144. package/src/lib/inputs/input-textarea/input-textarea.component.html +0 -17
  145. package/src/lib/inputs/input-textarea/input-textarea.component.scss +0 -0
  146. package/src/lib/inputs/input-textarea/input-textarea.component.ts +0 -33
  147. package/src/lib/inputs/input-time/input-time.component.html +0 -18
  148. package/src/lib/inputs/input-time/input-time.component.scss +0 -0
  149. package/src/lib/inputs/input-time/input-time.component.ts +0 -20
  150. package/src/lib/inputs/kvinputs.module.ts +0 -53
  151. package/src/lib/inputs/multi-select/multi-select.component.html +0 -21
  152. package/src/lib/inputs/multi-select/multi-select.component.scss +0 -0
  153. package/src/lib/inputs/multi-select/multi-select.component.ts +0 -44
  154. package/src/lib/inputs/switch/switch.component.html +0 -11
  155. package/src/lib/inputs/switch/switch.component.scss +0 -3
  156. package/src/lib/inputs/switch/switch.component.ts +0 -24
  157. package/src/lib/keevo-components.module.ts +0 -20
  158. package/src/lib/pipes/codigofile.pipe.ts +0 -15
  159. package/src/lib/pipes/cpfcnpj.pipe.ts +0 -21
  160. package/src/lib/pipes/pipes.module.ts +0 -22
  161. package/src/lib/pipes/telefone.pipe.ts +0 -38
  162. package/src/lib/styles-components.scss +0 -3
  163. package/src/lib/table/kvtable.module.ts +0 -20
  164. package/src/lib/table/table.component.html +0 -189
  165. package/src/lib/table/table.component.scss +0 -21
  166. package/src/lib/table/table.component.spec.ts +0 -28
  167. package/src/lib/table/table.component.ts +0 -211
  168. package/tsconfig.lib.json +0 -14
  169. package/tsconfig.lib.prod.json +0 -10
  170. package/tsconfig.spec.json +0 -14
@@ -1,24 +0,0 @@
1
- import { Component, EventEmitter, OnInit, Output } from '@angular/core';
2
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
3
- import { ComponentService } from '../../api/services/component.service';
4
- import { ComponentProviders } from '../../api/helpers/component-providers';
5
-
6
-
7
- @Component({
8
- selector: 'kv-check',
9
- templateUrl: './check.component.html',
10
- styleUrls: ['./check.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(CheckComponent),
12
- })
13
- export class CheckComponent extends BaseComponentInput<boolean> implements OnInit {
14
-
15
- @Output() onCheckChange: EventEmitter<any> = new EventEmitter();
16
-
17
- constructor(componentService: ComponentService) {
18
- super(componentService);
19
- }
20
-
21
- emitOnCheckChange(event: any) {
22
- this.onCheckChange.emit(event);
23
- }
24
- }
@@ -1,43 +0,0 @@
1
- <span class="p-float-label">
2
-
3
- <p-dropdown
4
- appendTo="body"
5
- [class]="baseInputClass"
6
- [disabled]="disabled"
7
- [filter]="filter"
8
- [inputId]="componentId"
9
- [(ngModel)]="value"
10
- [options]="filteredOptions"
11
- [optionLabel]="optionLabel"
12
- [optionValue]="optionValue"
13
- [showClear]="showClear"
14
- [lazy]="true"
15
- scrollHeight="100px"
16
- (onBlur)="onInputBlur($event)"
17
- (onClick)="onInputClick($event)"
18
- (onChange)="selectionValue($event)"
19
- [style]="{'width':'100%'}"
20
- >
21
-
22
- <ng-template *ngIf="addButton" pTemplate="footer">
23
- <p-divider></p-divider>
24
- <div class="flex flex-wrap card-container p-1">
25
- <div class="flex justify-content-center">
26
- <button
27
- pButton
28
- label="Incluir"
29
- pTooltip="Clique aqui para incluir um novo registro"
30
- tooltipPosition="bottom"
31
- icon="pi pi-plus"
32
- class="p-button-rounded p-button-success mr-2"
33
- (click)="addClick($event)"></button>
34
- </div>
35
- </div>
36
- </ng-template>
37
-
38
- </p-dropdown>
39
- <label [for]="componentId">{{ label }}</label>
40
-
41
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
42
- </span>
43
- <ng-content></ng-content>
File without changes
@@ -1,19 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { DialogService } from 'primeng/dynamicdialog';
3
- import { ComponentService } from '../../api/services/component.service';
4
- import { ComponentProviders } from '../../api/helpers/component-providers';
5
- import { BaseComponentDropDown } from '../../api/base-components/base-component-dropdown';
6
-
7
- @Component({
8
- selector: 'kv-dropdown',
9
- templateUrl: './dropdown.component.html',
10
- styleUrls: ['./dropdown.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(DropdownComponent),
12
- })
13
- export class DropdownComponent extends BaseComponentDropDown {
14
- constructor(
15
- componentService: ComponentService,
16
- dialogService: DialogService) {
17
- super(componentService, dialogService);
18
- }
19
- }
@@ -1,22 +0,0 @@
1
- <span class="p-float-label">
2
-
3
- <p-calendar
4
- appendTo="body"
5
- [class]="baseInputClass"
6
- [id]="componentId"
7
- [(ngModel)]="value"
8
- [disabled]="disabled"
9
- [minDate]="minDate"
10
- [maxDate]="maxDate"
11
- [selectionMode]="selectionMode"
12
- [showButtonBar]="showButtonBar"
13
- [showIcon]="showIcon"
14
- [view]="typeView"
15
- [dateFormat]="dateFormat"
16
- (onBlur)="onInputBlur($event)">
17
- </p-calendar>
18
- <label [for]="componentId">{{ label }}</label>
19
-
20
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
21
- </span>
22
- <ng-content></ng-content>
@@ -1,54 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { CalendarTypeView } from 'primeng/calendar';
3
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
4
- import { ComponentProviders } from '../../api/helpers/component-providers';
5
- import { ComponentService } from '../../api/services/component.service';
6
-
7
- @Component({
8
- selector: 'kv-input-calendar',
9
- templateUrl: './input-calendar.component.html',
10
- styleUrls: ['./input-calendar.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputCalendarComponent),
12
- })
13
- export class InputCalendarComponent extends BaseComponentInput<Date> implements OnInit {
14
-
15
- @Input() isYear: boolean = false;
16
- @Input() isMonthYear: boolean = false;
17
- @Input() minDate!: Date;
18
- @Input() maxDate!: Date;
19
- @Input() showButtonBar: boolean = false;
20
- @Input() showIcon: boolean = true;
21
- @Input() selectionMode: 'single' | 'multiple' | 'range' = 'single';
22
-
23
- typeView: CalendarTypeView = 'date';
24
- dateFormat: string = 'dd/mm/yy';
25
-
26
- constructor(componentService: ComponentService) {
27
- super(componentService);
28
- }
29
-
30
- override writeValue(value: Date): void {
31
- this.value = value;
32
-
33
- if (value && typeof value === 'string') {
34
- this.value = new Date(value);
35
- }
36
- }
37
-
38
- override ngOnInit(): void {
39
- super.ngOnInit();
40
-
41
- if (this.isYear) {
42
- this.typeView = "year";
43
- this.dateFormat = 'yy';
44
- }
45
- else if (this.isMonthYear) {
46
- this.typeView = 'month';
47
- this.dateFormat = 'mm/yy';
48
- }
49
- else {
50
- this.typeView = 'date';
51
- this.dateFormat = 'dd/mm/yy';
52
- }
53
- }
54
- }
@@ -1,15 +0,0 @@
1
- <span class="p-float-label">
2
-
3
- <p-inputMask
4
- [class]="baseInputClass"
5
- [inputId]="componentId"
6
- [placeholder]="placeholder"
7
- [(ngModel)]="value"
8
- [mask]="mask"
9
- (onBlur)="onInputBlur($event)">
10
- </p-inputMask>
11
- <label [for]="componentId">{{ label }}</label>
12
-
13
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
14
- </span>
15
- <ng-content></ng-content>
@@ -1,20 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
3
- import { ComponentProviders } from '../../api/helpers/component-providers';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-input-mask',
9
- templateUrl: './input-mask.component.html',
10
- styleUrls: ['./input-mask.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputMaskComponent),
12
- })
13
- export class InputMaskComponent extends BaseComponentInput<string> implements OnInit {
14
-
15
- @Input() mask!: string;
16
-
17
- constructor(componentService: ComponentService) {
18
- super(componentService);
19
- }
20
- }
@@ -1,15 +0,0 @@
1
- <span class="p-float-label">
2
- <p-inputNumber
3
- #inputNumber
4
- [class]="baseInputClass"
5
- [inputId]="componentId"
6
- [min]="min"
7
- [max]="max"
8
- [(ngModel)]="value"
9
- (onBlur)="onInputBlur($event)">
10
- </p-inputNumber>
11
- <label [for]="componentId">{{ label }}</label>
12
-
13
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
14
- </span>
15
- <ng-content></ng-content>
@@ -1,51 +0,0 @@
1
- import { Component, Input, OnInit, ViewChild } from '@angular/core';
2
- import { InputNumber } from 'primeng/inputnumber';
3
- import { ComponentProviders } from '../../api/helpers/component-providers';
4
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
5
- import { ComponentService } from '../../api/services/component.service';
6
-
7
-
8
- @Component({
9
- selector: 'kv-input-number',
10
- templateUrl: './input-number.component.html',
11
- styleUrls: ['./input-number.component.scss', '../../styles-components.scss'],
12
- providers: ComponentProviders(InputNumberComponent),
13
- })
14
- export class InputNumberComponent extends BaseComponentInput<string> implements OnInit {
15
- @Input() mode: 'currency' | 'decimal' = 'decimal';
16
- @Input() digits: number = 0;
17
- @Input() min: number = 0;
18
- @Input() max!: number;
19
-
20
- @ViewChild('inputNumber', { static: true }) inputNumber!: InputNumber;
21
-
22
- constructor(componentService: ComponentService) {
23
- super(componentService);
24
- }
25
-
26
- override ngOnInit(): void {
27
- super.ngOnInit();
28
-
29
- this.inputNumber.mode = this.mode;
30
- this.inputNumber.locale = 'pt-BR';
31
-
32
- switch (this.mode) {
33
- case 'decimal':
34
- this.configDecimal();
35
- break;
36
- case 'currency':
37
- this.configCurrency();
38
- break;
39
- }
40
- }
41
-
42
- private configDecimal() {
43
- if (!this.digits) this.inputNumber.useGrouping = false;
44
- this.inputNumber.minFractionDigits = this.digits;
45
- this.inputNumber.maxFractionDigits = this.digits;
46
- }
47
-
48
- private configCurrency() {
49
- this.inputNumber.currency = 'BRL';
50
- }
51
- }
@@ -1,18 +0,0 @@
1
- <span class="p-float-label">
2
- <p-password
3
- appendTo="body"
4
- [class]="baseInputClass"
5
- [id]="componentId"
6
- [(ngModel)]="value"
7
- [disabled]="disabled"
8
- [toggleMask]="toggleMask"
9
- [feedback]="feedback"
10
- [mediumRegex]="mediumRegex"
11
- [strongRegex]="strongRegex"
12
- (onBlur)="onInputBlur($event)">
13
- </p-password>
14
- <label [for]="componentId">{{ label }}</label>
15
-
16
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
17
- </span>
18
- <ng-content></ng-content>
@@ -1,23 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { ComponentProviders } from '../../api/helpers/component-providers';
3
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-input-password',
9
- templateUrl: './input-password.component.html',
10
- styleUrls: ['./input-password.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputPasswordComponent),
12
- })
13
- export class InputPasswordComponent extends BaseComponentInput<string> implements OnInit {
14
-
15
- @Input() feedback: boolean = false;
16
- @Input() mediumRegex: string = '';
17
- @Input() strongRegex: string = '';
18
- @Input() toggleMask: boolean = true;
19
-
20
- constructor(componentService: ComponentService) {
21
- super(componentService);
22
- }
23
- }
@@ -1,14 +0,0 @@
1
- <span class="p-float-label">
2
- <input
3
- pInputText
4
- type="text"
5
- [class]="baseInputClass"
6
- [disabled]="disabled"
7
- [id]="componentId"
8
- [(ngModel)]="value"
9
- (blur)="onInputBlur($event)">
10
- <label [for]="componentId">{{ label }}</label>
11
-
12
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
13
- </span>
14
- <ng-content></ng-content>
@@ -1,18 +0,0 @@
1
- .div-pai {
2
- display: flex;
3
- flex-direction: row;
4
- column-gap: 0.25rem;
5
- padding-right: 0;
6
- }
7
-
8
- .div-input {
9
- width: 100%;
10
- }
11
-
12
- .div-button {
13
- width: 20%;
14
-
15
- button {
16
- width: 100%;
17
- }
18
- }
@@ -1,17 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { ComponentProviders } from '../../api/helpers/component-providers';
3
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-input-text',
9
- templateUrl: './input-text.component.html',
10
- styleUrls: ['./input-text.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputTextComponent),
12
- })
13
- export class InputTextComponent extends BaseComponentInput<string> implements OnInit {
14
- constructor(componentService: ComponentService) {
15
- super(componentService);
16
- }
17
- }
@@ -1,17 +0,0 @@
1
- <span class="p-float-label">
2
- <textarea
3
- pInputTextarea
4
- [autoResize]="autoResize"
5
- [class]="baseInputClass"
6
- [cols]="cols"
7
- [disabled]="disabled"
8
- [id]="componentId"
9
- [rows]="rows"
10
- [(ngModel)]="value"
11
- (blur)="onInputBlur($event)">
12
- </textarea>
13
- <label [for]="componentId">{{ label }}</label>
14
-
15
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
16
- </span>
17
- <ng-content></ng-content>
@@ -1,33 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
3
- import { ComponentProviders } from '../../api/helpers/component-providers';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-input-textarea',
9
- templateUrl: './input-textarea.component.html',
10
- styleUrls: ['./input-textarea.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputTextareaComponent),
12
- })
13
- export class InputTextareaComponent extends BaseComponentInput<string> implements OnInit {
14
- @Input() multiline: boolean = false;
15
- @Input() rows: number = 2;
16
- @Input() cols: number = 20;
17
- @Input() autoResize: boolean = false;
18
- @Input() maxValueLength: number = 0;
19
-
20
- counterValueLength: number = 0;
21
-
22
- constructor(componentService: ComponentService) {
23
- super(componentService);
24
- }
25
-
26
- override ngOnInit(): void {
27
- super.ngOnInit();
28
-
29
- this.formControl?.valueChanges.subscribe((value: any) => {
30
- this.counterValueLength = value?.length;
31
- });
32
- }
33
- }
@@ -1,18 +0,0 @@
1
- <span class="p-float-label">
2
-
3
- <p-calendar
4
- appendTo="body"
5
- [class]="baseInputClass"
6
- [id]="componentId"
7
- [(ngModel)]="value"
8
- [disabled]="disabled"
9
- [showIcon]="showIcon"
10
- [showTime]="true"
11
- [timeOnly]="true"
12
- (onBlur)="onInputBlur($event)">
13
- </p-calendar>
14
- <label [for]="componentId">{{ label }}</label>
15
-
16
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
17
- </span>
18
- <ng-content></ng-content>
@@ -1,20 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
3
- import { ComponentProviders } from '../../api/helpers/component-providers';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-input-time',
9
- templateUrl: './input-time.component.html',
10
- styleUrls: ['./input-time.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(InputTimeComponent),
12
- })
13
- export class InputTimeComponent extends BaseComponentInput<string> implements OnInit {
14
-
15
- @Input() showIcon: boolean = true;
16
-
17
- constructor(componentService: ComponentService) {
18
- super(componentService);
19
- }
20
- }
@@ -1,53 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { NgModule } from '@angular/core';
3
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4
- import { CheckComponent } from './check/check.component';
5
- import { DropdownComponent } from './dropdown/dropdown.component';
6
- import { InputCalendarComponent } from './input-calendar/input-calendar.component';
7
- import { InputMaskComponent } from './input-mask/input-mask.component';
8
- import { InputNumberComponent } from './input-number/input-number.component';
9
- import { InputPasswordComponent } from './input-password/input-password.component';
10
- import { InputTextComponent } from './input-text/input-text.component';
11
- import { InputTextareaComponent } from './input-textarea/input-textarea.component';
12
- import { InputTimeComponent } from './input-time/input-time.component';
13
- import { MultiSelectComponent } from './multi-select/multi-select.component';
14
- import { SwitchComponent } from './switch/switch.component';
15
- import { kvErrorModule } from '../api/components/error/kverror.module';
16
- import { PrimeNgModule } from '../api/modules/primeng.module';
17
-
18
- @NgModule({
19
- declarations: [
20
- CheckComponent,
21
- DropdownComponent,
22
- InputCalendarComponent,
23
- InputMaskComponent,
24
- InputNumberComponent,
25
- InputPasswordComponent,
26
- InputTextComponent,
27
- InputTextareaComponent,
28
- InputTimeComponent,
29
- MultiSelectComponent,
30
- SwitchComponent,
31
- ],
32
- imports: [
33
- CommonModule,
34
- FormsModule,
35
- kvErrorModule,
36
- PrimeNgModule,
37
- ReactiveFormsModule,
38
- ],
39
- exports: [
40
- CheckComponent,
41
- DropdownComponent,
42
- InputCalendarComponent,
43
- InputMaskComponent,
44
- InputNumberComponent,
45
- InputPasswordComponent,
46
- InputTextComponent,
47
- InputTextareaComponent,
48
- InputTimeComponent,
49
- MultiSelectComponent,
50
- SwitchComponent,
51
- ]
52
- })
53
- export class KvInputsModule { }
@@ -1,21 +0,0 @@
1
- <span class="p-float-label">
2
- <p-multiSelect
3
- appendTo="body"
4
- display="chip"
5
- inputId="multiselect"
6
- [class]="baseInputClass"
7
- [disabled]="disabled"
8
- [options]="options"
9
- [optionLabel]="optionLabel"
10
- [optionValue]="optionValue"
11
- [filter]="filter"
12
- [showClear]="showClear"
13
- [(ngModel)]="value"
14
- (onChange)="selectionChange($event)"
15
- (onPanelHide)="panelHide($event)">
16
- </p-multiSelect>
17
- <label [for]="componentId">{{ label }}</label>
18
-
19
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
20
- </span>
21
- <ng-content></ng-content>
@@ -1,44 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import { ComponentProviders } from '../../api/helpers/component-providers';
3
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-multi-select',
9
- templateUrl: './multi-select.component.html',
10
- styleUrls: ['./multi-select.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(MultiSelectComponent),
12
- })
13
- export class MultiSelectComponent extends BaseComponentInput<any> implements OnInit {
14
-
15
- @Input() options: any;
16
- @Input() optionLabel!: string;
17
- @Input() optionValue!: string;
18
- @Input() filter: boolean = false;
19
- @Input() showClear: boolean = false;
20
-
21
- @Output() onSelectionChange: EventEmitter<any> = new EventEmitter();
22
- @Output() onPanelHide: EventEmitter<any> = new EventEmitter();
23
-
24
-
25
- constructor(componentService: ComponentService) {
26
- super(componentService);
27
- }
28
-
29
- override ngOnInit(): void {
30
- super.ngOnInit();
31
- }
32
-
33
- public override get baseInputClass(): string {
34
- return `p-multiselect-sm ${this.hasError ? 'ng-invalid ng-dirty' : ''}`;
35
- }
36
-
37
- selectionChange(event: Event) {
38
- this.onSelectionChange.emit(event);
39
- }
40
-
41
- panelHide(event: Event) {
42
- this.onPanelHide.emit(event);
43
- }
44
- }
@@ -1,11 +0,0 @@
1
- <div class="center field-checkbox">
2
-
3
- <p-inputSwitch
4
- [inputId]="componentId"
5
- [(ngModel)]="value"
6
- [disabled]="disabled">
7
- </p-inputSwitch>
8
- <label [for]="componentId">{{ label }}</label>
9
-
10
- <kv-error [hasError]="hasControlError()">{{ erroMessage() }}</kv-error>
11
- </div>
@@ -1,3 +0,0 @@
1
- p-inputSwitch {
2
- padding-right: 0.5rem;
3
- }
@@ -1,24 +0,0 @@
1
- import { Component, EventEmitter, OnInit, Output } from '@angular/core';
2
- import { ComponentProviders } from '../../api/helpers/component-providers';
3
- import { BaseComponentInput } from '../../api/base-components/base-component-input';
4
- import { ComponentService } from '../../api/services/component.service';
5
-
6
-
7
- @Component({
8
- selector: 'kv-switch',
9
- templateUrl: './switch.component.html',
10
- styleUrls: ['./switch.component.scss', '../../styles-components.scss'],
11
- providers: ComponentProviders(SwitchComponent),
12
- })
13
- export class SwitchComponent extends BaseComponentInput<boolean> implements OnInit {
14
-
15
- @Output() onSwitchChange: EventEmitter<any> = new EventEmitter();
16
-
17
- constructor(componentService: ComponentService) {
18
- super(componentService);
19
- }
20
-
21
- emitOnSwitchChange(event: any) {
22
- this.onSwitchChange.emit(event);
23
- }
24
- }