keevo-components 1.8.38 → 1.8.39
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -24
- package/esm2022/keevo-components.mjs +4 -4
- package/esm2022/lib/api/base-components/base-component-button.mjs +36 -36
- package/esm2022/lib/api/base-components/base-component-chart.mjs +92 -92
- package/esm2022/lib/api/base-components/base-component-crud-form.mjs +298 -298
- package/esm2022/lib/api/base-components/base-component-crud-list.mjs +78 -78
- package/esm2022/lib/api/base-components/base-component-crud.mjs +65 -65
- package/esm2022/lib/api/base-components/base-component-dropdown-external.mjs +31 -31
- package/esm2022/lib/api/base-components/base-component-dropdown.mjs +169 -169
- package/esm2022/lib/api/base-components/base-component-input.mjs +94 -94
- package/esm2022/lib/api/base-components/base-component-multi-select.mjs +130 -130
- package/esm2022/lib/api/base-components/base-component.mjs +51 -51
- package/esm2022/lib/api/components/chart/chart.config.mjs +2 -2
- package/esm2022/lib/api/components/chart/chart.model.mjs +2 -2
- package/esm2022/lib/api/components/chart/orchart.config.mjs +2 -2
- package/esm2022/lib/api/components/chart/orchart.item.mjs +2 -2
- package/esm2022/lib/api/components/dropdown/filtro.combo.mjs +2 -2
- package/esm2022/lib/api/components/table/action-item.mjs +2 -2
- package/esm2022/lib/api/components/table/kv-menuitem.mjs +3 -3
- package/esm2022/lib/api/components/table/table-dropdown-control.mjs +2 -2
- package/esm2022/lib/api/components/table/table.config.column.mjs +2 -2
- package/esm2022/lib/api/components/table/table.config.mjs +2 -2
- package/esm2022/lib/api/components/table/table.paginate.mjs +9 -9
- package/esm2022/lib/api/components/table/tabledit.config.mjs +2 -2
- package/esm2022/lib/api/components/table/tableedit.config.column.mjs +2 -2
- package/esm2022/lib/api/directives/template/template.directive.mjs +24 -24
- package/esm2022/lib/api/helpers/component-providers.mjs +16 -16
- package/esm2022/lib/api/helpers/keevo-validators.mjs +72 -72
- package/esm2022/lib/api/helpers/translate-primeng.mjs +23 -23
- package/esm2022/lib/api/models/menu/menu.model.mjs +2 -2
- package/esm2022/lib/api/models/menu/menucompleto.model.mjs +2 -2
- package/esm2022/lib/api/models/menu/sistemamenu.model.mjs +2 -2
- package/esm2022/lib/api/modules/primeng.module.mjs +251 -251
- package/esm2022/lib/api/pipes/codigofile.pipe.mjs +19 -19
- package/esm2022/lib/api/pipes/cpfcnpj.pipe.mjs +25 -25
- package/esm2022/lib/api/pipes/mask.pipe.mjs +29 -29
- package/esm2022/lib/api/pipes/pipes.module.mjs +39 -39
- package/esm2022/lib/api/pipes/telefone.pipe.mjs +45 -45
- package/esm2022/lib/api/services/base.api.service.mjs +74 -74
- package/esm2022/lib/api/services/breadcrumbs.service.mjs +57 -57
- package/esm2022/lib/api/services/component.service.mjs +27 -27
- package/esm2022/lib/api/services/form.service.mjs +85 -85
- package/esm2022/lib/api/services/imagens.service.mjs +28 -28
- package/esm2022/lib/api/services/notification.service.mjs +67 -67
- package/esm2022/lib/api/services/object.service.mjs +39 -39
- package/esm2022/lib/components/keevo-components.module.mjs +144 -144
- package/esm2022/lib/components/kv-avatar/kv-avatar.component.mjs +78 -78
- package/esm2022/lib/components/kv-avatar/kv-avatar.module.mjs +32 -32
- package/esm2022/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.mjs +31 -17
- package/esm2022/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.mjs +31 -31
- package/esm2022/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.mjs +17 -17
- package/esm2022/lib/components/kv-buttons/kv-button-success/kv-button-success.component.mjs +17 -17
- package/esm2022/lib/components/kv-buttons/kv-button.module.mjs +39 -39
- package/esm2022/lib/components/kv-carousel/kv-carousel.component.mjs +92 -92
- package/esm2022/lib/components/kv-carousel/kv-carousel.module.mjs +28 -28
- package/esm2022/lib/components/kv-chart/kv-chart.component.mjs +145 -145
- package/esm2022/lib/components/kv-chart/kv-chart.module.mjs +32 -0
- package/esm2022/lib/components/kv-error/kv-error.component.mjs +26 -26
- package/esm2022/lib/components/kv-error/kv-error.module.mjs +35 -35
- package/esm2022/lib/components/kv-inputs/kv-check/kv-check.component.mjs +26 -26
- package/esm2022/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.mjs +37 -37
- package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.component.mjs +88 -88
- package/esm2022/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.mjs +89 -89
- package/esm2022/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.mjs +29 -29
- package/esm2022/lib/components/kv-inputs/kv-input-number/kv-input-number.component.mjs +59 -59
- package/esm2022/lib/components/kv-inputs/kv-input-password/kv-input-password.component.mjs +33 -33
- package/esm2022/lib/components/kv-inputs/kv-input-text/kv-input-text.component.mjs +21 -21
- package/esm2022/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.mjs +42 -42
- package/esm2022/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.mjs +43 -43
- package/esm2022/lib/components/kv-inputs/kv-input-time/kv-input-time.component.mjs +24 -24
- package/esm2022/lib/components/kv-inputs/kv-inputs.module.mjs +108 -108
- package/esm2022/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.mjs +44 -44
- package/esm2022/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.mjs +53 -53
- package/esm2022/lib/components/kv-inputs/kv-switch/kv-switch.component.mjs +34 -34
- package/esm2022/lib/components/kv-label/kv-label.component.mjs +15 -15
- package/esm2022/lib/components/kv-label/kv-label.module.mjs +24 -24
- package/esm2022/lib/components/kv-loader/kv-loader.component.mjs +17 -17
- package/esm2022/lib/components/kv-loader/kv-loader.module.mjs +28 -28
- package/esm2022/lib/components/kv-loader/kv-loader.service.mjs +29 -29
- package/esm2022/lib/components/kv-login/kv-login.component.mjs +52 -52
- package/esm2022/lib/components/kv-login/kv-login.module.mjs +47 -47
- package/esm2022/lib/components/kv-menu/kv-menu.component.mjs +188 -188
- package/esm2022/lib/components/kv-menu/kv-menu.module.mjs +47 -47
- package/esm2022/lib/components/kv-modal/kv-modal.component.mjs +67 -67
- package/esm2022/lib/components/kv-modal/kv-modal.module.mjs +31 -31
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.component.mjs +100 -100
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.module.mjs +24 -24
- package/esm2022/lib/components/kv-page-form/kv-page-form.component.mjs +147 -147
- package/esm2022/lib/components/kv-page-form/kv-page-form.module.mjs +38 -38
- package/esm2022/lib/components/kv-pick-list/kv-pick-list.component.mjs +48 -48
- package/esm2022/lib/components/kv-pick-list/kv-pick-list.module.mjs +32 -32
- package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.component.mjs +58 -58
- package/esm2022/lib/components/kv-progress-bar/kv-progress-bar.module.mjs +28 -28
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +554 -554
- package/esm2022/lib/components/kv-table/kv-table.module.mjs +36 -36
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +567 -567
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.module.mjs +34 -34
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +215 -215
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.module.mjs +28 -28
- package/esm2022/lib/components/kv-tree-view/kv-tree-view.component.mjs +30 -30
- package/esm2022/lib/components/kv-tree-view/kv-tree-view.module.mjs +28 -28
- package/esm2022/lib/components/kv-treetable/kv-treetable.component.mjs +371 -371
- package/esm2022/lib/components/kv-treetable/kv-treetable.module.mjs +32 -32
- package/esm2022/lib/components/kv-workspace/kv-workspace.component.mjs +178 -178
- package/esm2022/lib/components/kv-workspace/kv-workspace.module.mjs +51 -51
- package/esm2022/public-api.mjs +169 -169
- package/fesm2022/keevo-components.mjs +5786 -5772
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/api/base-components/base-component-button.d.ts +14 -14
- package/lib/api/base-components/base-component-chart.d.ts +40 -40
- package/lib/api/base-components/base-component-crud-form.d.ts +145 -145
- package/lib/api/base-components/base-component-crud-list.d.ts +63 -63
- package/lib/api/base-components/base-component-crud.d.ts +36 -36
- package/lib/api/base-components/base-component-dropdown-external.d.ts +15 -15
- package/lib/api/base-components/base-component-dropdown.d.ts +44 -44
- package/lib/api/base-components/base-component-input.d.ts +31 -31
- package/lib/api/base-components/base-component-multi-select.d.ts +35 -35
- package/lib/api/base-components/base-component.d.ts +22 -22
- package/lib/api/components/chart/chart.config.d.ts +11 -11
- package/lib/api/components/chart/chart.model.d.ts +9 -9
- package/lib/api/components/chart/orchart.config.d.ts +35 -35
- package/lib/api/components/chart/orchart.item.d.ts +26 -26
- package/lib/api/components/dropdown/filtro.combo.d.ts +4 -4
- package/lib/api/components/table/action-item.d.ts +11 -9
- package/lib/api/components/table/kv-menuitem.d.ts +10 -10
- package/lib/api/components/table/table-dropdown-control.d.ts +6 -6
- package/lib/api/components/table/table.config.column.d.ts +25 -25
- package/lib/api/components/table/table.config.d.ts +19 -19
- package/lib/api/components/table/table.paginate.d.ts +6 -6
- package/lib/api/components/table/tabledit.config.d.ts +8 -8
- package/lib/api/components/table/tableedit.config.column.d.ts +10 -10
- package/lib/api/directives/template/template.directive.d.ts +11 -11
- package/lib/api/helpers/component-providers.d.ts +2 -2
- package/lib/api/helpers/keevo-validators.d.ts +11 -11
- package/lib/api/helpers/translate-primeng.d.ts +4 -4
- package/lib/api/models/menu/menu.model.d.ts +10 -10
- package/lib/api/models/menu/menucompleto.model.d.ts +6 -6
- package/lib/api/models/menu/sistemamenu.model.d.ts +8 -8
- package/lib/api/modules/primeng.module.d.ts +61 -61
- package/lib/api/pipes/codigofile.pipe.d.ts +7 -7
- package/lib/api/pipes/cpfcnpj.pipe.d.ts +7 -7
- package/lib/api/pipes/mask.pipe.d.ts +7 -7
- package/lib/api/pipes/pipes.module.d.ts +11 -11
- package/lib/api/pipes/telefone.pipe.d.ts +7 -7
- package/lib/api/services/base.api.service.d.ts +25 -25
- package/lib/api/services/breadcrumbs.service.d.ts +16 -16
- package/lib/api/services/component.service.d.ts +11 -11
- package/lib/api/services/form.service.d.ts +28 -28
- package/lib/api/services/imagens.service.d.ts +10 -10
- package/lib/api/services/notification.service.d.ts +25 -25
- package/lib/api/services/object.service.d.ts +9 -9
- package/lib/components/keevo-components.module.d.ts +25 -25
- package/lib/components/kv-avatar/kv-avatar.component.d.ts +22 -22
- package/lib/components/kv-avatar/kv-avatar.module.d.ts +10 -10
- package/lib/components/kv-buttons/kv-button-personalize/kv-button-personalize.component.d.ts +13 -7
- package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +13 -13
- package/lib/components/kv-buttons/kv-button-secondary/kv-button-secondary.component.d.ts +7 -7
- package/lib/components/kv-buttons/kv-button-success/kv-button-success.component.d.ts +7 -7
- package/lib/components/kv-buttons/kv-button.module.d.ts +11 -11
- package/lib/components/kv-carousel/kv-carousel.component.d.ts +16 -16
- package/lib/components/kv-carousel/kv-carousel.module.d.ts +9 -9
- package/lib/components/kv-chart/kv-chart.component.d.ts +56 -56
- package/lib/components/kv-chart/{kvchart.module.d.ts → kv-chart.module.d.ts} +10 -10
- package/lib/components/kv-error/kv-error.component.d.ts +12 -12
- package/lib/components/kv-error/kv-error.module.d.ts +10 -10
- package/lib/components/kv-inputs/kv-check/kv-check.component.d.ts +11 -11
- package/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.d.ts +14 -14
- package/lib/components/kv-inputs/kv-editor/kv-editor.component.d.ts +36 -36
- package/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.d.ts +27 -27
- package/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.d.ts +12 -12
- package/lib/components/kv-inputs/kv-input-number/kv-input-number.component.d.ts +19 -19
- package/lib/components/kv-inputs/kv-input-password/kv-input-password.component.d.ts +13 -13
- package/lib/components/kv-inputs/kv-input-text/kv-input-text.component.d.ts +9 -9
- package/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.d.ts +16 -16
- package/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.d.ts +16 -16
- package/lib/components/kv-inputs/kv-input-time/kv-input-time.component.d.ts +10 -10
- package/lib/components/kv-inputs/kv-inputs.module.d.ts +25 -25
- package/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.d.ts +15 -15
- package/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.d.ts +18 -18
- package/lib/components/kv-inputs/kv-switch/kv-switch.component.d.ts +14 -14
- package/lib/components/kv-label/kv-label.component.d.ts +7 -7
- package/lib/components/kv-label/kv-label.module.d.ts +8 -8
- package/lib/components/kv-loader/kv-loader.component.d.ts +8 -8
- package/lib/components/kv-loader/kv-loader.module.d.ts +9 -9
- package/lib/components/kv-loader/kv-loader.service.d.ts +10 -10
- package/lib/components/kv-login/kv-login.component.d.ts +30 -30
- package/lib/components/kv-login/kv-login.module.d.ts +13 -13
- package/lib/components/kv-menu/kv-menu.component.d.ts +61 -61
- package/lib/components/kv-menu/kv-menu.module.d.ts +13 -13
- package/lib/components/kv-modal/kv-modal.component.d.ts +20 -20
- package/lib/components/kv-modal/kv-modal.module.d.ts +10 -10
- package/lib/components/kv-orgchart/kv-orgchart.component.d.ts +27 -27
- package/lib/components/kv-orgchart/kv-orgchart.module.d.ts +9 -9
- package/lib/components/kv-page-form/kv-page-form.component.d.ts +70 -70
- package/lib/components/kv-page-form/kv-page-form.module.d.ts +11 -11
- package/lib/components/kv-pick-list/kv-pick-list.component.d.ts +20 -20
- package/lib/components/kv-pick-list/kv-pick-list.module.d.ts +10 -10
- package/lib/components/kv-progress-bar/kv-progress-bar.component.d.ts +67 -67
- package/lib/components/kv-progress-bar/kv-progress-bar.module.d.ts +9 -9
- package/lib/components/kv-table/kv-table.component.d.ts +113 -113
- package/lib/components/kv-table/kv-table.module.d.ts +11 -11
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +116 -116
- package/lib/components/kv-table-edit/kv-table-edit.module.d.ts +12 -12
- package/lib/components/kv-tree-table/kv-tree-table.component.d.ts +42 -42
- package/lib/components/kv-tree-table/kv-tree-table.module.d.ts +9 -9
- package/lib/components/kv-tree-view/kv-tree-view.component.d.ts +14 -14
- package/lib/components/kv-tree-view/kv-tree-view.module.d.ts +9 -9
- package/lib/components/kv-treetable/kv-treetable.component.d.ts +85 -85
- package/lib/components/kv-treetable/kv-treetable.module.d.ts +11 -11
- package/lib/components/kv-workspace/kv-workspace.component.d.ts +46 -46
- package/lib/components/kv-workspace/kv-workspace.module.d.ts +14 -14
- package/package.json +1 -1
- package/public-api.d.ts +165 -165
- package/esm2022/lib/components/kv-chart/kvchart.module.mjs +0 -32
@@ -1,89 +1,89 @@
|
|
1
|
-
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
2
|
-
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
-
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "../../../api/services/component.service";
|
6
|
-
import * as i2 from "@angular/forms";
|
7
|
-
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
-
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
-
import * as i5 from "primeng/calendar";
|
10
|
-
export class KvInputCalendarComponent extends BaseComponentInput {
|
11
|
-
constructor(componentService) {
|
12
|
-
super(componentService);
|
13
|
-
this.isYear = false;
|
14
|
-
this.isMonthYear = false;
|
15
|
-
this.showButtonBar = false;
|
16
|
-
this.showIcon = true;
|
17
|
-
this.showTime = false;
|
18
|
-
this.selectionMode = 'single';
|
19
|
-
this.onSelectionChange = new EventEmitter();
|
20
|
-
this.onSelectionValue = new EventEmitter();
|
21
|
-
this.typeView = 'date';
|
22
|
-
this.dateFormat = 'dd/mm/yy';
|
23
|
-
}
|
24
|
-
writeValue(value) {
|
25
|
-
this.value = value;
|
26
|
-
if (value && typeof value === 'string') {
|
27
|
-
this.value = new Date(value);
|
28
|
-
}
|
29
|
-
}
|
30
|
-
ngOnInit() {
|
31
|
-
super.ngOnInit();
|
32
|
-
if (this.isYear) {
|
33
|
-
this.typeView = 'year';
|
34
|
-
this.dateFormat = 'yy';
|
35
|
-
}
|
36
|
-
else if (this.isMonthYear) {
|
37
|
-
this.typeView = 'month';
|
38
|
-
this.dateFormat = 'mm/yy';
|
39
|
-
}
|
40
|
-
else {
|
41
|
-
this.typeView = 'date';
|
42
|
-
this.dateFormat = 'dd/mm/yy';
|
43
|
-
}
|
44
|
-
}
|
45
|
-
onInputChange(event) {
|
46
|
-
this.hideOnRangeMode();
|
47
|
-
this.onSelectionValue.emit(event);
|
48
|
-
if (this.formControl) {
|
49
|
-
this.onSelectionChange.emit(this.formControl.value);
|
50
|
-
}
|
51
|
-
}
|
52
|
-
hideOnRangeMode() {
|
53
|
-
if (this.selectionMode == 'range') {
|
54
|
-
if (this.dateFilter.value[1]) {
|
55
|
-
this.dateFilter.hideOverlay();
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputCalendarComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: { isYear: "isYear", isMonthYear: "isMonthYear", minDate: "minDate", maxDate: "maxDate", showButtonBar: "showButtonBar", showIcon: "showIcon", showTime: "showTime", selectionMode: "selectionMode" }, outputs: { onSelectionChange: "onSelectionChange", onSelectionValue: "onSelectionValue" }, providers: ComponentProviders(KvInputCalendarComponent), viewQueries: [{ propertyName: "dateFilter", first: true, predicate: ["dateFilter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-calendar\n #dateFilter\n appendTo=\"body\"\n [class]=\"baseInputClass\"\n [id]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selectionMode]=\"selectionMode\"\n [showButtonBar]=\"showButtonBar\"\n [showIcon]=\"showIcon\"\n [showTime]=\"showTime\"\n [view]=\"typeView\"\n [dateFormat]=\"dateFormat\"\n (onBlur)=\"onInputBlur($event)\"\n (onClose)=\"onInputClose($event)\"\n (onSelect)=\"onInputChange($event)\"\n styleClass=\"inputs\"\n >\n </p-calendar>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "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", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] }); }
|
61
|
-
}
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputCalendarComponent, decorators: [{
|
63
|
-
type: Component,
|
64
|
-
args: [{ selector: 'kv-input-calendar', providers: ComponentProviders(KvInputCalendarComponent), template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-calendar\n #dateFilter\n appendTo=\"body\"\n [class]=\"baseInputClass\"\n [id]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selectionMode]=\"selectionMode\"\n [showButtonBar]=\"showButtonBar\"\n [showIcon]=\"showIcon\"\n [showTime]=\"showTime\"\n [view]=\"typeView\"\n [dateFormat]=\"dateFormat\"\n (onBlur)=\"onInputBlur($event)\"\n (onClose)=\"onInputClose($event)\"\n (onSelect)=\"onInputChange($event)\"\n styleClass=\"inputs\"\n >\n </p-calendar>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
65
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { isYear: [{
|
66
|
-
type: Input
|
67
|
-
}], isMonthYear: [{
|
68
|
-
type: Input
|
69
|
-
}], minDate: [{
|
70
|
-
type: Input
|
71
|
-
}], maxDate: [{
|
72
|
-
type: Input
|
73
|
-
}], showButtonBar: [{
|
74
|
-
type: Input
|
75
|
-
}], showIcon: [{
|
76
|
-
type: Input
|
77
|
-
}], showTime: [{
|
78
|
-
type: Input
|
79
|
-
}], selectionMode: [{
|
80
|
-
type: Input
|
81
|
-
}], onSelectionChange: [{
|
82
|
-
type: Output
|
83
|
-
}], onSelectionValue: [{
|
84
|
-
type: Output
|
85
|
-
}], dateFilter: [{
|
86
|
-
type: ViewChild,
|
87
|
-
args: ['dateFilter']
|
88
|
-
}] } });
|
89
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
2
|
+
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
+
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../../../api/services/component.service";
|
6
|
+
import * as i2 from "@angular/forms";
|
7
|
+
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
+
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
+
import * as i5 from "primeng/calendar";
|
10
|
+
export class KvInputCalendarComponent extends BaseComponentInput {
|
11
|
+
constructor(componentService) {
|
12
|
+
super(componentService);
|
13
|
+
this.isYear = false;
|
14
|
+
this.isMonthYear = false;
|
15
|
+
this.showButtonBar = false;
|
16
|
+
this.showIcon = true;
|
17
|
+
this.showTime = false;
|
18
|
+
this.selectionMode = 'single';
|
19
|
+
this.onSelectionChange = new EventEmitter();
|
20
|
+
this.onSelectionValue = new EventEmitter();
|
21
|
+
this.typeView = 'date';
|
22
|
+
this.dateFormat = 'dd/mm/yy';
|
23
|
+
}
|
24
|
+
writeValue(value) {
|
25
|
+
this.value = value;
|
26
|
+
if (value && typeof value === 'string') {
|
27
|
+
this.value = new Date(value);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
ngOnInit() {
|
31
|
+
super.ngOnInit();
|
32
|
+
if (this.isYear) {
|
33
|
+
this.typeView = 'year';
|
34
|
+
this.dateFormat = 'yy';
|
35
|
+
}
|
36
|
+
else if (this.isMonthYear) {
|
37
|
+
this.typeView = 'month';
|
38
|
+
this.dateFormat = 'mm/yy';
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
this.typeView = 'date';
|
42
|
+
this.dateFormat = 'dd/mm/yy';
|
43
|
+
}
|
44
|
+
}
|
45
|
+
onInputChange(event) {
|
46
|
+
this.hideOnRangeMode();
|
47
|
+
this.onSelectionValue.emit(event);
|
48
|
+
if (this.formControl) {
|
49
|
+
this.onSelectionChange.emit(this.formControl.value);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
hideOnRangeMode() {
|
53
|
+
if (this.selectionMode == 'range') {
|
54
|
+
if (this.dateFilter.value[1]) {
|
55
|
+
this.dateFilter.hideOverlay();
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputCalendarComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: { isYear: "isYear", isMonthYear: "isMonthYear", minDate: "minDate", maxDate: "maxDate", showButtonBar: "showButtonBar", showIcon: "showIcon", showTime: "showTime", selectionMode: "selectionMode" }, outputs: { onSelectionChange: "onSelectionChange", onSelectionValue: "onSelectionValue" }, providers: ComponentProviders(KvInputCalendarComponent), viewQueries: [{ propertyName: "dateFilter", first: true, predicate: ["dateFilter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-calendar\r\n #dateFilter\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 [showTime]=\"showTime\"\r\n [view]=\"typeView\"\r\n [dateFormat]=\"dateFormat\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClose)=\"onInputClose($event)\"\r\n (onSelect)=\"onInputChange($event)\"\r\n styleClass=\"inputs\"\r\n >\r\n </p-calendar>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "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", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }] }); }
|
61
|
+
}
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputCalendarComponent, decorators: [{
|
63
|
+
type: Component,
|
64
|
+
args: [{ selector: 'kv-input-calendar', providers: ComponentProviders(KvInputCalendarComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-calendar\r\n #dateFilter\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 [showTime]=\"showTime\"\r\n [view]=\"typeView\"\r\n [dateFormat]=\"dateFormat\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClose)=\"onInputClose($event)\"\r\n (onSelect)=\"onInputChange($event)\"\r\n styleClass=\"inputs\"\r\n >\r\n </p-calendar>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
65
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { isYear: [{
|
66
|
+
type: Input
|
67
|
+
}], isMonthYear: [{
|
68
|
+
type: Input
|
69
|
+
}], minDate: [{
|
70
|
+
type: Input
|
71
|
+
}], maxDate: [{
|
72
|
+
type: Input
|
73
|
+
}], showButtonBar: [{
|
74
|
+
type: Input
|
75
|
+
}], showIcon: [{
|
76
|
+
type: Input
|
77
|
+
}], showTime: [{
|
78
|
+
type: Input
|
79
|
+
}], selectionMode: [{
|
80
|
+
type: Input
|
81
|
+
}], onSelectionChange: [{
|
82
|
+
type: Output
|
83
|
+
}], onSelectionValue: [{
|
84
|
+
type: Output
|
85
|
+
}], dateFilter: [{
|
86
|
+
type: ViewChild,
|
87
|
+
args: ['dateFilter']
|
88
|
+
}] } });
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3YtaW5wdXQtY2FsZW5kYXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMva3YtaW5wdXRzL2t2LWlucHV0LWNhbGVuZGFyL2t2LWlucHV0LWNhbGVuZGFyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2t2LWlucHV0cy9rdi1pbnB1dC1jYWxlbmRhci9rdi1pbnB1dC1jYWxlbmRhci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULFlBQVksRUFDWixLQUFLLEVBRUwsTUFBTSxFQUNOLFNBQVMsRUFDVixNQUFNLGVBQWUsQ0FBQztBQUl2QixPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxtREFBbUQsQ0FBQztBQUN2RixPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQzs7Ozs7OztBQVk5RSxNQUFNLE9BQU8sd0JBQXlCLFNBQVEsa0JBQXdCO0lBZ0JwRSxZQUFZLGdCQUFrQztRQUM1QyxLQUFLLENBQUMsZ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RDaGFuZ2UoJGV2ZW50KVwiXHJcbiAgICBzdHlsZUNsYXNzPVwiaW5wdXRzXCJcclxuICA+XHJcbiAgPC9wLWNhbGVuZGFyPlxyXG5cclxuICA8a3YtZXJyb3IgW2hhc0Vycm9yXT1cImhhc0NvbnRyb2xFcnJvcigpXCI+e3sgZXJyb01lc3NhZ2UoKSB9fTwva3YtZXJyb3I+XHJcbjwvc3Bhbj5cclxuPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PiJdfQ==
|
@@ -1,29 +1,29 @@
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
-
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
-
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "../../../api/services/component.service";
|
6
|
-
import * as i2 from "@angular/forms";
|
7
|
-
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
-
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
-
import * as i5 from "primeng/inputmask";
|
10
|
-
export class KvInputMaskComponent extends BaseComponentInput {
|
11
|
-
constructor(componentService) {
|
12
|
-
super(componentService);
|
13
|
-
this.onComplete = new EventEmitter();
|
14
|
-
}
|
15
|
-
onCompleteComplete($event) {
|
16
|
-
this.onComplete.emit($event);
|
17
|
-
}
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputMaskComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: { mask: "mask" }, outputs: { onComplete: "onComplete" }, providers: ComponentProviders(KvInputMaskComponent), usesInheritance: true, ngImport: i0, template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-inputMask\n [class]=\"baseInputClass\"\n styleClass=\"inputs\"\n [inputId]=\"componentId\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n [mask]=\"mask\"\n (onBlur)=\"onInputBlur($event)\"\n (onInput)=\"onInputInput($event)\"\n (onComplete)=\"onCompleteComplete($event)\"\n >\n </p-inputMask>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }] }); }
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputMaskComponent, decorators: [{
|
22
|
-
type: Component,
|
23
|
-
args: [{ selector: 'kv-input-mask', providers: ComponentProviders(KvInputMaskComponent), template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-inputMask\n [class]=\"baseInputClass\"\n styleClass=\"inputs\"\n [inputId]=\"componentId\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n [mask]=\"mask\"\n (onBlur)=\"onInputBlur($event)\"\n (onInput)=\"onInputInput($event)\"\n (onComplete)=\"onCompleteComplete($event)\"\n >\n </p-inputMask>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
24
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { mask: [{
|
25
|
-
type: Input
|
26
|
-
}], onComplete: [{
|
27
|
-
type: Output
|
28
|
-
}] } });
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
2
|
+
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
+
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../../../api/services/component.service";
|
6
|
+
import * as i2 from "@angular/forms";
|
7
|
+
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
+
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
+
import * as i5 from "primeng/inputmask";
|
10
|
+
export class KvInputMaskComponent extends BaseComponentInput {
|
11
|
+
constructor(componentService) {
|
12
|
+
super(componentService);
|
13
|
+
this.onComplete = new EventEmitter();
|
14
|
+
}
|
15
|
+
onCompleteComplete($event) {
|
16
|
+
this.onComplete.emit($event);
|
17
|
+
}
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputMaskComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: { mask: "mask" }, outputs: { onComplete: "onComplete" }, providers: ComponentProviders(KvInputMaskComponent), usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-inputMask\r\n [class]=\"baseInputClass\"\r\n styleClass=\"inputs\"\r\n [inputId]=\"componentId\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [mask]=\"mask\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onInput)=\"onInputInput($event)\"\r\n (onComplete)=\"onCompleteComplete($event)\"\r\n >\r\n </p-inputMask>\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:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }] }); }
|
20
|
+
}
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputMaskComponent, decorators: [{
|
22
|
+
type: Component,
|
23
|
+
args: [{ selector: 'kv-input-mask', providers: ComponentProviders(KvInputMaskComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-inputMask\r\n [class]=\"baseInputClass\"\r\n styleClass=\"inputs\"\r\n [inputId]=\"componentId\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"value\"\r\n [mask]=\"mask\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onInput)=\"onInputInput($event)\"\r\n (onComplete)=\"onCompleteComplete($event)\"\r\n >\r\n </p-inputMask>\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:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
24
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { mask: [{
|
25
|
+
type: Input
|
26
|
+
}], onComplete: [{
|
27
|
+
type: Output
|
28
|
+
}] } });
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3YtaW5wdXQtbWFzay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rZWV2by1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9rdi1pbnB1dHMva3YtaW5wdXQtbWFzay9rdi1pbnB1dC1tYXNrLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2t2LWlucHV0cy9rdi1pbnB1dC1tYXNrL2t2LWlucHV0LW1hc2suY29tc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uQ29tcGxldGUuZW1pdCgkZXZlbnQpXHJcbiAgfVxyXG59XHJcbiIsIjxzcGFuPlxyXG4gIDxrdi1sYWJlbFxyXG4gICAgW2NvbXBvbmVudElkXT1cImNvbXBvbmVudElkXCJcclxuICAgIFtsYWJlbF09XCJsYWJlbFwiXHJcbiAgLz5cclxuICA8cC1pbnB1dE1hc2tcclxuICAgIFtjbGFzc109XCJiYXNlSW5wdXRDbGFzc1wiXHJcbiAgICBzdHlsZUNsYXNzPVwiaW5wdXRzXCJcclxuICAgIFtpbnB1dElkXT1cImNvbXBvbmVudElkXCJcclxuICAgIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXHJcbiAgICBbcGxhY2Vob2xkZXJdPVwicGxhY2Vob2xkZXJcIlxyXG4gICAgWyhuZ01vZGVsKV09XCJ2YWx1ZVwiXHJcbiAgICBbbWFza109XCJtYXNrXCJcclxuICAgIChvbkJsdXIpPVwib25JbnB1dEJsdXIoJGV2ZW50KVwiXHJcbiAgICAob25JbnB1dCk9XCJvbklucHV0SW5wdXQoJGV2ZW50KVwiXHJcbiAgICAob25Db21wbGV0ZSk9XCJvbkNvbXBsZXRlQ29tcGxldGUoJGV2ZW50KVwiXHJcbiAgPlxyXG4gIDwvcC1pbnB1dE1hc2s+XHJcblxyXG4gIDxrdi1lcnJvciBbaGFzRXJyb3JdPVwiaGFzQ29udHJvbEVycm9yKClcIj57eyBlcnJvTWVzc2FnZSgpIH19PC9rdi1lcnJvcj5cclxuPC9zcGFuPlxyXG48bmctY29udGVudD48L25nLWNvbnRlbnQ+XHJcbiJdfQ==
|
@@ -1,59 +1,59 @@
|
|
1
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
2
|
-
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
-
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "../../../api/services/component.service";
|
6
|
-
import * as i2 from "@angular/forms";
|
7
|
-
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
-
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
-
import * as i5 from "primeng/inputnumber";
|
10
|
-
export class KvInputNumberComponent extends BaseComponentInput {
|
11
|
-
constructor(componentService) {
|
12
|
-
super(componentService);
|
13
|
-
this.mode = 'decimal';
|
14
|
-
this.digits = 0;
|
15
|
-
this.min = 0;
|
16
|
-
}
|
17
|
-
ngOnInit() {
|
18
|
-
super.ngOnInit();
|
19
|
-
this.inputNumber.mode = this.mode;
|
20
|
-
this.inputNumber.locale = 'pt-BR';
|
21
|
-
switch (this.mode) {
|
22
|
-
case 'decimal':
|
23
|
-
this.configDecimal();
|
24
|
-
break;
|
25
|
-
case 'currency':
|
26
|
-
this.configCurrency();
|
27
|
-
break;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
configDecimal() {
|
31
|
-
if (!this.digits)
|
32
|
-
this.inputNumber.useGrouping = false;
|
33
|
-
this.inputNumber.minFractionDigits = this.digits;
|
34
|
-
this.inputNumber.maxFractionDigits = this.digits;
|
35
|
-
}
|
36
|
-
configCurrency() {
|
37
|
-
this.inputNumber.currency = 'BRL';
|
38
|
-
}
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputNumberComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputNumberComponent, selector: "kv-input-number", inputs: { mode: "mode", digits: "digits", min: "min", max: "max", suffix: "suffix" }, providers: ComponentProviders(KvInputNumberComponent), viewQueries: [{ propertyName: "inputNumber", first: true, predicate: ["inputNumber"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-inputNumber\n #inputNumber\n [disabled]=\"disabled\"\n [class]=\"baseInputClass\"\n [inputId]=\"componentId\"\n styleClass=\"inputs\"\n [min]=\"min\"\n [max]=\"max\"\n [suffix]=\"suffix\"\n [(ngModel)]=\"value\"\n (onBlur)=\"onInputBlur($event)\"\n [maxlength]=\"maxLength\"\n >\n </p-inputNumber>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "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"] }] }); }
|
41
|
-
}
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputNumberComponent, decorators: [{
|
43
|
-
type: Component,
|
44
|
-
args: [{ selector: 'kv-input-number', providers: ComponentProviders(KvInputNumberComponent), template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-inputNumber\n #inputNumber\n [disabled]=\"disabled\"\n [class]=\"baseInputClass\"\n [inputId]=\"componentId\"\n styleClass=\"inputs\"\n [min]=\"min\"\n [max]=\"max\"\n [suffix]=\"suffix\"\n [(ngModel)]=\"value\"\n (onBlur)=\"onInputBlur($event)\"\n [maxlength]=\"maxLength\"\n >\n </p-inputNumber>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
45
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { mode: [{
|
46
|
-
type: Input
|
47
|
-
}], digits: [{
|
48
|
-
type: Input
|
49
|
-
}], min: [{
|
50
|
-
type: Input
|
51
|
-
}], max: [{
|
52
|
-
type: Input
|
53
|
-
}], suffix: [{
|
54
|
-
type: Input
|
55
|
-
}], inputNumber: [{
|
56
|
-
type: ViewChild,
|
57
|
-
args: ['inputNumber', { static: true }]
|
58
|
-
}] } });
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
2
|
+
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
3
|
+
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../../../api/services/component.service";
|
6
|
+
import * as i2 from "@angular/forms";
|
7
|
+
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
+
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
+
import * as i5 from "primeng/inputnumber";
|
10
|
+
export class KvInputNumberComponent extends BaseComponentInput {
|
11
|
+
constructor(componentService) {
|
12
|
+
super(componentService);
|
13
|
+
this.mode = 'decimal';
|
14
|
+
this.digits = 0;
|
15
|
+
this.min = 0;
|
16
|
+
}
|
17
|
+
ngOnInit() {
|
18
|
+
super.ngOnInit();
|
19
|
+
this.inputNumber.mode = this.mode;
|
20
|
+
this.inputNumber.locale = 'pt-BR';
|
21
|
+
switch (this.mode) {
|
22
|
+
case 'decimal':
|
23
|
+
this.configDecimal();
|
24
|
+
break;
|
25
|
+
case 'currency':
|
26
|
+
this.configCurrency();
|
27
|
+
break;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
configDecimal() {
|
31
|
+
if (!this.digits)
|
32
|
+
this.inputNumber.useGrouping = false;
|
33
|
+
this.inputNumber.minFractionDigits = this.digits;
|
34
|
+
this.inputNumber.maxFractionDigits = this.digits;
|
35
|
+
}
|
36
|
+
configCurrency() {
|
37
|
+
this.inputNumber.currency = 'BRL';
|
38
|
+
}
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputNumberComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputNumberComponent, selector: "kv-input-number", inputs: { mode: "mode", digits: "digits", min: "min", max: "max", suffix: "suffix" }, providers: ComponentProviders(KvInputNumberComponent), viewQueries: [{ propertyName: "inputNumber", first: true, predicate: ["inputNumber"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-inputNumber\r\n #inputNumber\r\n [disabled]=\"disabled\"\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n styleClass=\"inputs\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [suffix]=\"suffix\"\r\n [(ngModel)]=\"value\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n [maxlength]=\"maxLength\"\r\n >\r\n </p-inputNumber>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "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"] }] }); }
|
41
|
+
}
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputNumberComponent, decorators: [{
|
43
|
+
type: Component,
|
44
|
+
args: [{ selector: 'kv-input-number', providers: ComponentProviders(KvInputNumberComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-inputNumber\r\n #inputNumber\r\n [disabled]=\"disabled\"\r\n [class]=\"baseInputClass\"\r\n [inputId]=\"componentId\"\r\n styleClass=\"inputs\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [suffix]=\"suffix\"\r\n [(ngModel)]=\"value\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n [maxlength]=\"maxLength\"\r\n >\r\n </p-inputNumber>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
45
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { mode: [{
|
46
|
+
type: Input
|
47
|
+
}], digits: [{
|
48
|
+
type: Input
|
49
|
+
}], min: [{
|
50
|
+
type: Input
|
51
|
+
}], max: [{
|
52
|
+
type: Input
|
53
|
+
}], suffix: [{
|
54
|
+
type: Input
|
55
|
+
}], inputNumber: [{
|
56
|
+
type: ViewChild,
|
57
|
+
args: ['inputNumber', { static: true }]
|
58
|
+
}] } });
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3YtaW5wdXQtbnVtYmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2t2LWlucHV0cy9rdi1pbnB1dC1udW1iZXIva3YtaW5wdXQtbnVtYmVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2t2LWlucHV0cy9rdi1pbnB1dC1udW1iZXIva3YtaW5wdXQtbnVtYmVyLmNvbXBvbmVudC5odG1sIl0s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GVkXT1cImRpc2FibGVkXCJcclxuICAgIFtjbGFzc109XCJiYXNlSW5wdXRDbGFzc1wiXHJcbiAgICBbaW5wdXRJZF09XCJjb21wb25lbnRJZFwiXHJcbiAgICBzdHlsZUNsYXNzPVwiaW5wdXRzXCJcclxuICAgIFttaW5dPVwibWluXCJcclxuICAgIFttYXhdPVwibWF4XCJcclxuICAgIFtzdWZmaXhdPVwic3VmZml4XCJcclxuICAgIFsobmdNb2RlbCldPVwidmFsdWVcIlxyXG4gICAgKG9uQmx1cik9XCJvbklucHV0Qmx1cigkZXZlbnQpXCJcclxuICAgIFttYXhsZW5ndGhdPVwibWF4TGVuZ3RoXCJcclxuICA+XHJcbiAgPC9wLWlucHV0TnVtYmVyPlxyXG5cclxuICA8a3YtZXJyb3IgW2hhc0Vycm9yXT1cImhhc0NvbnRyb2xFcnJvcigpXCI+e3sgZXJyb01lc3NhZ2UoKSB9fTwva3YtZXJyb3I+XHJcbjwvc3Bhbj5cclxuPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PiJdfQ==
|
@@ -1,33 +1,33 @@
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
2
|
-
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
3
|
-
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "../../../api/services/component.service";
|
6
|
-
import * as i2 from "@angular/forms";
|
7
|
-
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
-
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
-
import * as i5 from "primeng/password";
|
10
|
-
export class KvInputPasswordComponent extends BaseComponentInput {
|
11
|
-
constructor(componentService) {
|
12
|
-
super(componentService);
|
13
|
-
this.feedback = false;
|
14
|
-
this.mediumRegex = '';
|
15
|
-
this.strongRegex = '';
|
16
|
-
this.toggleMask = true;
|
17
|
-
}
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputPasswordComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputPasswordComponent, selector: "kv-input-password", inputs: { feedback: "feedback", mediumRegex: "mediumRegex", strongRegex: "strongRegex", toggleMask: "toggleMask" }, providers: ComponentProviders(KvInputPasswordComponent), usesInheritance: true, ngImport: i0, template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-password\n appendTo=\"body\"\n [class]=\"baseInputClass\"\n styleClass=\"inputs\"\n [id]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [toggleMask]=\"toggleMask\"\n [feedback]=\"feedback\"\n [mediumRegex]=\"mediumRegex\"\n [strongRegex]=\"strongRegex\"\n (onBlur)=\"onInputBlur($event)\"\n >\n </p-password>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear"], outputs: ["onFocus", "onBlur", "onClear"] }] }); }
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputPasswordComponent, decorators: [{
|
22
|
-
type: Component,
|
23
|
-
args: [{ selector: 'kv-input-password', providers: ComponentProviders(KvInputPasswordComponent), template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label\"\n />\n <p-password\n appendTo=\"body\"\n [class]=\"baseInputClass\"\n styleClass=\"inputs\"\n [id]=\"componentId\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [toggleMask]=\"toggleMask\"\n [feedback]=\"feedback\"\n [mediumRegex]=\"mediumRegex\"\n [strongRegex]=\"strongRegex\"\n (onBlur)=\"onInputBlur($event)\"\n >\n </p-password>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
24
|
-
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { feedback: [{
|
25
|
-
type: Input
|
26
|
-
}], mediumRegex: [{
|
27
|
-
type: Input
|
28
|
-
}], strongRegex: [{
|
29
|
-
type: Input
|
30
|
-
}], toggleMask: [{
|
31
|
-
type: Input
|
32
|
-
}] } });
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component, Input } from '@angular/core';
|
2
|
+
import { ComponentProviders } from '../../../api/helpers/component-providers';
|
3
|
+
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../../../api/services/component.service";
|
6
|
+
import * as i2 from "@angular/forms";
|
7
|
+
import * as i3 from "../../kv-error/kv-error.component";
|
8
|
+
import * as i4 from "../../kv-label/kv-label.component";
|
9
|
+
import * as i5 from "primeng/password";
|
10
|
+
export class KvInputPasswordComponent extends BaseComponentInput {
|
11
|
+
constructor(componentService) {
|
12
|
+
super(componentService);
|
13
|
+
this.feedback = false;
|
14
|
+
this.mediumRegex = '';
|
15
|
+
this.strongRegex = '';
|
16
|
+
this.toggleMask = true;
|
17
|
+
}
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputPasswordComponent, deps: [{ token: i1.ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: KvInputPasswordComponent, selector: "kv-input-password", inputs: { feedback: "feedback", mediumRegex: "mediumRegex", strongRegex: "strongRegex", toggleMask: "toggleMask" }, providers: ComponentProviders(KvInputPasswordComponent), usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-password\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n styleClass=\"inputs\"\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 >\r\n </p-password>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: i4.KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i5.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear"], outputs: ["onFocus", "onBlur", "onClear"] }] }); }
|
20
|
+
}
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: KvInputPasswordComponent, decorators: [{
|
22
|
+
type: Component,
|
23
|
+
args: [{ selector: 'kv-input-password', providers: ComponentProviders(KvInputPasswordComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-password\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n styleClass=\"inputs\"\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 >\r\n </p-password>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>", styles: ["label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
|
24
|
+
}], ctorParameters: function () { return [{ type: i1.ComponentService }]; }, propDecorators: { feedback: [{
|
25
|
+
type: Input
|
26
|
+
}], mediumRegex: [{
|
27
|
+
type: Input
|
28
|
+
}], strongRegex: [{
|
29
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