i-tech-shared-components 1.0.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.
- package/.npmignore +2 -0
- package/README.md +24 -0
- package/esm2022/i-tech-shared-components.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +66 -0
- package/esm2022/lib/components/icon-button/icon-button.component.mjs +49 -0
- package/esm2022/lib/components/text/text-input.component.mjs +75 -0
- package/esm2022/lib/directives/input-mask.directive.mjs +92 -0
- package/esm2022/lib/interfaces/app-input.interface.mjs +2 -0
- package/esm2022/lib/interfaces/button-types.constants.mjs +9 -0
- package/esm2022/lib/pipes/generate-error-messages.pipe.mjs +31 -0
- package/esm2022/lib/services/input.service.mjs +29 -0
- package/esm2022/public-api.mjs +11 -0
- package/fesm2022/i-tech-shared-components.mjs +335 -0
- package/fesm2022/i-tech-shared-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +21 -0
- package/lib/components/icon-button/icon-button.component.d.ts +14 -0
- package/lib/components/text/text-input.component.d.ts +21 -0
- package/lib/directives/input-mask.directive.d.ts +21 -0
- package/lib/interfaces/app-input.interface.d.ts +31 -0
- package/lib/interfaces/button-types.constants.d.ts +7 -0
- package/lib/pipes/generate-error-messages.pipe.d.ts +10 -0
- package/lib/services/input.service.d.ts +7 -0
- package/package.json +32 -0
- package/public-api.d.ts +7 -0
- package/theme/_buttons.scss +63 -0
- package/theme/_color_themes.scss +136 -0
- package/theme/_date_picker.scss +77 -0
- package/theme/_form_fields.scss +106 -0
- package/theme/_icon-button.scss +123 -0
- package/theme/_label.scss +119 -0
- package/theme/_mat-selects.scss +248 -0
- package/theme/_menu.scss +9 -0
- package/theme/_text_input.scss +28 -0
- package/theme.scss +36 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe, inject, Injectable, Directive, Input, HostListener, EventEmitter, Component, Output } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ngx-translate/core';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { NgControl, FormControlName, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { MatIconButton, MatFabButton, MatButton } from '@angular/material/button';
|
|
8
|
+
import { NgClass, NgIf } from '@angular/common';
|
|
9
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
10
|
+
import * as i1$1 from '@angular/material/icon';
|
|
11
|
+
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
12
|
+
import { MatLabel, MatFormField, MatError, MatHint } from '@angular/material/form-field';
|
|
13
|
+
import { MatInput } from '@angular/material/input';
|
|
14
|
+
import { NgxMaskDirective } from 'ngx-mask';
|
|
15
|
+
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
16
|
+
|
|
17
|
+
class GenerateErrorMessagesPipe {
|
|
18
|
+
constructor(translateService) {
|
|
19
|
+
this.translateService = translateService;
|
|
20
|
+
}
|
|
21
|
+
transform(control, label, defaultPatternKey = 'fixed') {
|
|
22
|
+
if (!control.errors) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
let translateParams;
|
|
26
|
+
let errorMessageKey = '';
|
|
27
|
+
const key = (Object.keys(control.errors)[0]);
|
|
28
|
+
translateParams = { ERROR_KEY: this.translateService.instant(label) || 'Field' };
|
|
29
|
+
errorMessageKey = (key === 'pattern') ?
|
|
30
|
+
'errorMessages.pattern.' + defaultPatternKey : 'errorMessages.' + key;
|
|
31
|
+
return this.translateService.instant(errorMessageKey, translateParams);
|
|
32
|
+
}
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GenerateErrorMessagesPipe, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
34
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: GenerateErrorMessagesPipe, isStandalone: true, name: "generateErrorMessages" }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GenerateErrorMessagesPipe, decorators: [{
|
|
37
|
+
type: Pipe,
|
|
38
|
+
args: [{
|
|
39
|
+
name: 'generateErrorMessages',
|
|
40
|
+
standalone: true,
|
|
41
|
+
pure: true
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: () => [{ type: i1.TranslateService }] });
|
|
44
|
+
|
|
45
|
+
class NoopValueAccessor {
|
|
46
|
+
writeValue() { }
|
|
47
|
+
registerOnChange() { }
|
|
48
|
+
registerOnTouched() { }
|
|
49
|
+
}
|
|
50
|
+
class InputService {
|
|
51
|
+
injectNgControl() {
|
|
52
|
+
const ngControl = inject(NgControl, { self: true, optional: true });
|
|
53
|
+
if (!ngControl)
|
|
54
|
+
throw new Error('...');
|
|
55
|
+
if (ngControl instanceof FormControlName) {
|
|
56
|
+
ngControl.valueAccessor = new NoopValueAccessor();
|
|
57
|
+
return ngControl;
|
|
58
|
+
}
|
|
59
|
+
throw new Error(`...`);
|
|
60
|
+
}
|
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
62
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputService, providedIn: 'root' }); }
|
|
63
|
+
}
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputService, decorators: [{
|
|
65
|
+
type: Injectable,
|
|
66
|
+
args: [{
|
|
67
|
+
providedIn: 'root'
|
|
68
|
+
}]
|
|
69
|
+
}] });
|
|
70
|
+
|
|
71
|
+
class InputMaskDirective {
|
|
72
|
+
set min(value) {
|
|
73
|
+
this.minimumValue = Number(value);
|
|
74
|
+
}
|
|
75
|
+
set max(value) {
|
|
76
|
+
this.maximumValue = Number(value);
|
|
77
|
+
}
|
|
78
|
+
set float(value) {
|
|
79
|
+
this.isFloat = value === 'true';
|
|
80
|
+
}
|
|
81
|
+
onPaste(event) {
|
|
82
|
+
this.makeValidation(event, true);
|
|
83
|
+
}
|
|
84
|
+
constructor(elementRef) {
|
|
85
|
+
this.elementRef = elementRef;
|
|
86
|
+
this.regexFloat = new RegExp(/^([0-9]*[.])?[0-9]+$/);
|
|
87
|
+
this.regexOnlyNumbers = new RegExp(/^-?[0-9]+(?:\.[0-9]+)?$/);
|
|
88
|
+
this.elementRef.nativeElement.addEventListener('keypress', (event) => {
|
|
89
|
+
this.makeValidation(event);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
makeValidation(event, fromPaste = false) {
|
|
93
|
+
let value;
|
|
94
|
+
let newChar;
|
|
95
|
+
if (!fromPaste) {
|
|
96
|
+
newChar = String.fromCharCode(event.keyCode);
|
|
97
|
+
const cursorPos = event.target.selectionStart;
|
|
98
|
+
const inputText = event.target.value;
|
|
99
|
+
value = `${inputText.slice(0, cursorPos)}${newChar}${inputText.slice(cursorPos, inputText.length)}`;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
value = event.clipboardData?.getData('text/plain');
|
|
103
|
+
}
|
|
104
|
+
if (this.inputMask === 'number') {
|
|
105
|
+
return this.checkingForNumbers(value, event, newChar, fromPaste);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return this.checkingForTexts(value, event);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
checkingForNumbers(value, event, newChar, fromPaste = false) {
|
|
112
|
+
if ((isNaN(this.minimumValue) || this.minimumValue < 0) && value === '-') {
|
|
113
|
+
value = Number('-0');
|
|
114
|
+
}
|
|
115
|
+
if (this.isFloat && (newChar === '.')) {
|
|
116
|
+
value += '0';
|
|
117
|
+
}
|
|
118
|
+
if (!this.isFloat && fromPaste && value.includes('.')) {
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
const regex = (this.isFloat) ? this.regexFloat : this.regexOnlyNumbers;
|
|
123
|
+
if (!regex.test(value) ||
|
|
124
|
+
(this.minimumValue && value < this.minimumValue) ||
|
|
125
|
+
(this.maximumValue && value > this.maximumValue)) {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
checkingForTexts(value, event) {
|
|
132
|
+
let regex = new RegExp(/^[A-Za-z0-9]*$/);
|
|
133
|
+
if (!regex.test(value)) {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputMaskDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
140
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: InputMaskDirective, isStandalone: true, selector: "[inputMask]", inputs: { inputMask: "inputMask", min: "min", max: "max", float: "float" }, host: { listeners: { "paste": "onPaste($event)" } }, ngImport: i0 }); }
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputMaskDirective, decorators: [{
|
|
143
|
+
type: Directive,
|
|
144
|
+
args: [{
|
|
145
|
+
selector: '[inputMask]',
|
|
146
|
+
standalone: true
|
|
147
|
+
}]
|
|
148
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { inputMask: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], min: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], max: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}], float: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], onPaste: [{
|
|
157
|
+
type: HostListener,
|
|
158
|
+
args: ['paste', ['$event']]
|
|
159
|
+
}] } });
|
|
160
|
+
|
|
161
|
+
class IconButtonComponent {
|
|
162
|
+
constructor() {
|
|
163
|
+
this.size = 'medium';
|
|
164
|
+
this.type = 'tonal';
|
|
165
|
+
this.buttonClick = new EventEmitter();
|
|
166
|
+
}
|
|
167
|
+
onClick(event) {
|
|
168
|
+
if (!this.disabled) {
|
|
169
|
+
this.buttonClick.emit();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
173
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: IconButtonComponent, isStandalone: true, selector: "app-icon-button", inputs: { size: "size", type: "type", iconSvg: "iconSvg", iconName: "iconName", tooltip: "tooltip", disabled: "disabled" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\r\n *ngIf=\"['tonal','standard'].includes(type)\"\r\n mat-icon-button\r\n [ngClass]=\"{small: size === 'small', tonal: type === 'tonal', standard: type === 'standard'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n\r\n<button\r\n *ngIf=\"type === 'filled'\"\r\n mat-fab\r\n class=\"filled\"\r\n [ngClass]=\"{small: size === 'small'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [color]=\"'primary'\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n", styles: [""], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IconButtonComponent, decorators: [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{ selector: 'app-icon-button', imports: [
|
|
178
|
+
MatIconButton,
|
|
179
|
+
NgClass,
|
|
180
|
+
MatTooltip,
|
|
181
|
+
TranslateModule,
|
|
182
|
+
MatIcon,
|
|
183
|
+
MatFabButton,
|
|
184
|
+
NgIf
|
|
185
|
+
], standalone: true, template: "<button\r\n *ngIf=\"['tonal','standard'].includes(type)\"\r\n mat-icon-button\r\n [ngClass]=\"{small: size === 'small', tonal: type === 'tonal', standard: type === 'standard'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n\r\n<button\r\n *ngIf=\"type === 'filled'\"\r\n mat-fab\r\n class=\"filled\"\r\n [ngClass]=\"{small: size === 'small'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [color]=\"'primary'\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n" }]
|
|
186
|
+
}], propDecorators: { size: [{
|
|
187
|
+
type: Input
|
|
188
|
+
}], type: [{
|
|
189
|
+
type: Input
|
|
190
|
+
}], iconSvg: [{
|
|
191
|
+
type: Input
|
|
192
|
+
}], iconName: [{
|
|
193
|
+
type: Input
|
|
194
|
+
}], tooltip: [{
|
|
195
|
+
type: Input
|
|
196
|
+
}], disabled: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}], buttonClick: [{
|
|
199
|
+
type: Output
|
|
200
|
+
}] } });
|
|
201
|
+
|
|
202
|
+
class TextInputComponent {
|
|
203
|
+
set inputData(data) {
|
|
204
|
+
// If submit becomes true, mark the control as touched
|
|
205
|
+
if (data?.submit && this.ngControl.control) {
|
|
206
|
+
this.ngControl.control.markAsTouched();
|
|
207
|
+
}
|
|
208
|
+
this._inputData = data;
|
|
209
|
+
}
|
|
210
|
+
get inputData() {
|
|
211
|
+
return this._inputData;
|
|
212
|
+
}
|
|
213
|
+
constructor(inputService) {
|
|
214
|
+
this.inputService = inputService;
|
|
215
|
+
this.focusOutEmitter = new EventEmitter();
|
|
216
|
+
this.customErrorStateMatcher = {
|
|
217
|
+
isErrorState: (control, form) => {
|
|
218
|
+
return !!(control && control.invalid && this.inputData?.submit);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
this.ngControl = this.inputService.injectNgControl();
|
|
222
|
+
}
|
|
223
|
+
onFocusOut() {
|
|
224
|
+
if (this._inputData.focusOutEmit) {
|
|
225
|
+
this.focusOutEmitter.emit();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
clear() {
|
|
229
|
+
if (this.ngControl) {
|
|
230
|
+
this.ngControl.control.reset();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextInputComponent, deps: [{ token: InputService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TextInputComponent, isStandalone: true, selector: "app-text-input", inputs: { inputData: "inputData" }, outputs: { focusOutEmitter: "focusOutEmitter" }, ngImport: i0, template: "<div *ngIf=\"inputData && ngControl\">\r\n <div class=\"w-100\">\r\n <mat-label [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\" *ngIf=\"inputData.label\">\r\n {{inputData.label | translate}}\r\n </mat-label>\r\n <span *ngIf=\"inputData.required\" class=\"required-input\" [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\">*</span>\r\n </div>\r\n <mat-form-field appearance=\"outline\" class=\"w-100\"\r\n [class.readonly-field]=\"inputData.readOnly || ngControl.control.disabled\"\r\n >\r\n <!-- Leading Icon -->\r\n <mat-icon *ngIf=\"inputData.iconPrefix\"\r\n matPrefix\r\n [ngClass]=\"{\r\n 'readonly-color' : !inputData.iconPrefixColor && (inputData.readOnly || ngControl.control.disabled),\r\n 'default-form-icon-color' : !inputData.iconPrefixColor && !(inputData.readOnly || ngControl.control.disabled)\r\n }\"\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [style.color]=\"inputData.iconPrefixColor || null\"\r\n >{{ inputData.iconPrefix }}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf=\"inputData.iconPrefixSvg\"\r\n matPrefix\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [svgIcon]=\"inputData.iconPrefixSvg\"\r\n ></mat-icon>\r\n\r\n <!-- Input Field -->\r\n <input matInput\r\n *ngIf=\"!inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [mask]=\"inputData.mask || ''\"\r\n [ngClass]=\"{'readonly-color readonly-cursor' : inputData.readOnly || ngControl.control.disabled}\"\r\n [inputMask]=\"inputData.inputMask!\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n (blur)=\"onFocusOut()\"\r\n >\r\n\r\n <textarea matInput\r\n *ngIf=\"inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n ></textarea>\r\n\r\n <!-- Clear Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.clearable\"\r\n iconName=\"cancel\"\r\n matSuffix\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n (click)=\"clear()\"\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Trailing Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.iconSuffix\"\r\n [iconName]=\"inputData.iconSuffix\"\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n matSuffix\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Error Messages -->\r\n <mat-error *ngIf=\"!!(ngControl.control.errors && inputData.submit)\">\r\n {{ ngControl.control | generateErrorMessages : (inputData.label || '') : inputData.defaultPatternKey}}\r\n </mat-error>\r\n\r\n <!-- Helper Text -->\r\n <mat-hint *ngIf=\"!(!!(ngControl.control.errors && inputData.submit)) && inputData.hint\">\r\n {{inputData.hint | translate}}\r\n </mat-hint>\r\n </mat-form-field>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: GenerateErrorMessagesPipe, name: "generateErrorMessages" }, { kind: "component", type: IconButtonComponent, selector: "app-icon-button", inputs: ["size", "type", "iconSvg", "iconName", "tooltip", "disabled"], outputs: ["buttonClick"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: InputMaskDirective, selector: "[inputMask]", inputs: ["inputMask", "min", "max", "float"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] }); }
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextInputComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{ selector: 'app-text-input', imports: [
|
|
239
|
+
MatLabel,
|
|
240
|
+
TranslateModule,
|
|
241
|
+
NgClass,
|
|
242
|
+
MatFormField,
|
|
243
|
+
MatIcon,
|
|
244
|
+
MatTooltip,
|
|
245
|
+
MatInput,
|
|
246
|
+
ReactiveFormsModule,
|
|
247
|
+
NgIf,
|
|
248
|
+
GenerateErrorMessagesPipe,
|
|
249
|
+
IconButtonComponent,
|
|
250
|
+
MatError,
|
|
251
|
+
MatHint,
|
|
252
|
+
InputMaskDirective,
|
|
253
|
+
NgxMaskDirective
|
|
254
|
+
], standalone: true, template: "<div *ngIf=\"inputData && ngControl\">\r\n <div class=\"w-100\">\r\n <mat-label [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\" *ngIf=\"inputData.label\">\r\n {{inputData.label | translate}}\r\n </mat-label>\r\n <span *ngIf=\"inputData.required\" class=\"required-input\" [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\">*</span>\r\n </div>\r\n <mat-form-field appearance=\"outline\" class=\"w-100\"\r\n [class.readonly-field]=\"inputData.readOnly || ngControl.control.disabled\"\r\n >\r\n <!-- Leading Icon -->\r\n <mat-icon *ngIf=\"inputData.iconPrefix\"\r\n matPrefix\r\n [ngClass]=\"{\r\n 'readonly-color' : !inputData.iconPrefixColor && (inputData.readOnly || ngControl.control.disabled),\r\n 'default-form-icon-color' : !inputData.iconPrefixColor && !(inputData.readOnly || ngControl.control.disabled)\r\n }\"\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [style.color]=\"inputData.iconPrefixColor || null\"\r\n >{{ inputData.iconPrefix }}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf=\"inputData.iconPrefixSvg\"\r\n matPrefix\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [svgIcon]=\"inputData.iconPrefixSvg\"\r\n ></mat-icon>\r\n\r\n <!-- Input Field -->\r\n <input matInput\r\n *ngIf=\"!inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [mask]=\"inputData.mask || ''\"\r\n [ngClass]=\"{'readonly-color readonly-cursor' : inputData.readOnly || ngControl.control.disabled}\"\r\n [inputMask]=\"inputData.inputMask!\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n (blur)=\"onFocusOut()\"\r\n >\r\n\r\n <textarea matInput\r\n *ngIf=\"inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n ></textarea>\r\n\r\n <!-- Clear Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.clearable\"\r\n iconName=\"cancel\"\r\n matSuffix\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n (click)=\"clear()\"\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Trailing Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.iconSuffix\"\r\n [iconName]=\"inputData.iconSuffix\"\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n matSuffix\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Error Messages -->\r\n <mat-error *ngIf=\"!!(ngControl.control.errors && inputData.submit)\">\r\n {{ ngControl.control | generateErrorMessages : (inputData.label || '') : inputData.defaultPatternKey}}\r\n </mat-error>\r\n\r\n <!-- Helper Text -->\r\n <mat-hint *ngIf=\"!(!!(ngControl.control.errors && inputData.submit)) && inputData.hint\">\r\n {{inputData.hint | translate}}\r\n </mat-hint>\r\n </mat-form-field>\r\n</div>\r\n" }]
|
|
255
|
+
}], ctorParameters: () => [{ type: InputService }], propDecorators: { inputData: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], focusOutEmitter: [{
|
|
258
|
+
type: Output
|
|
259
|
+
}] } });
|
|
260
|
+
|
|
261
|
+
var ButtonType;
|
|
262
|
+
(function (ButtonType) {
|
|
263
|
+
ButtonType["FILLED"] = "FILLED";
|
|
264
|
+
ButtonType["TONAL"] = "TONAL";
|
|
265
|
+
ButtonType["OUTLINE"] = "OUTLINE";
|
|
266
|
+
ButtonType["TEXT"] = "TEXT";
|
|
267
|
+
ButtonType["WARNING"] = "WARNING";
|
|
268
|
+
})(ButtonType || (ButtonType = {}));
|
|
269
|
+
|
|
270
|
+
class ButtonComponent {
|
|
271
|
+
constructor() {
|
|
272
|
+
this.text = '';
|
|
273
|
+
this.data_cy = '';
|
|
274
|
+
this.fontIcon = '';
|
|
275
|
+
this.svgIcon = '';
|
|
276
|
+
this.type = ButtonType.FILLED;
|
|
277
|
+
this.submit = false;
|
|
278
|
+
this.disabled = false;
|
|
279
|
+
this.activated = false;
|
|
280
|
+
this.color = 'primary';
|
|
281
|
+
this.buttonClick = new EventEmitter();
|
|
282
|
+
this.ButtonType = ButtonType;
|
|
283
|
+
}
|
|
284
|
+
onClick(event) {
|
|
285
|
+
if (!this.disabled && !this.submit) {
|
|
286
|
+
this.buttonClick.emit();
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
290
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ButtonComponent, isStandalone: true, selector: "lib-button", inputs: { text: "text", data_cy: "data_cy", fontIcon: "fontIcon", svgIcon: "svgIcon", type: "type", customClass: "customClass", submit: "submit", disabled: "disabled", activated: "activated", color: "color" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button *ngIf=\"[ButtonType.FILLED,ButtonType.WARNING].includes(type)\"\r\n mat-flat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [color]=\"type === ButtonType.WARNING ? 'warn' : color\"\r\n [class.activated]=\"activated\"\r\n [ngClass]=\"(customClass || '')\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"[ButtonType.TONAL,ButtonType.TEXT].includes(type)\"\r\n mat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(type === ButtonType.TONAL ? 'tertiary ' : '') + (customClass || '')\"\r\n [class.activated]=\"activated\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"type === ButtonType.OUTLINE\"\r\n [color]=\"color\"\r\n mat-stroked-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(customClass || '') \"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n [class.activated]=\"activated\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\" >{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] }); }
|
|
291
|
+
}
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
293
|
+
type: Component,
|
|
294
|
+
args: [{ selector: 'lib-button', standalone: true, imports: [
|
|
295
|
+
MatButton,
|
|
296
|
+
NgClass,
|
|
297
|
+
MatProgressSpinner,
|
|
298
|
+
NgIf,
|
|
299
|
+
MatIconModule,
|
|
300
|
+
TranslateModule
|
|
301
|
+
], template: "<button *ngIf=\"[ButtonType.FILLED,ButtonType.WARNING].includes(type)\"\r\n mat-flat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [color]=\"type === ButtonType.WARNING ? 'warn' : color\"\r\n [class.activated]=\"activated\"\r\n [ngClass]=\"(customClass || '')\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"[ButtonType.TONAL,ButtonType.TEXT].includes(type)\"\r\n mat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(type === ButtonType.TONAL ? 'tertiary ' : '') + (customClass || '')\"\r\n [class.activated]=\"activated\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"type === ButtonType.OUTLINE\"\r\n [color]=\"color\"\r\n mat-stroked-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(customClass || '') \"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n [class.activated]=\"activated\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\" >{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n" }]
|
|
302
|
+
}], ctorParameters: () => [], propDecorators: { text: [{
|
|
303
|
+
type: Input
|
|
304
|
+
}], data_cy: [{
|
|
305
|
+
type: Input
|
|
306
|
+
}], fontIcon: [{
|
|
307
|
+
type: Input
|
|
308
|
+
}], svgIcon: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], type: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], customClass: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], submit: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], disabled: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}], activated: [{
|
|
319
|
+
type: Input
|
|
320
|
+
}], color: [{
|
|
321
|
+
type: Input
|
|
322
|
+
}], buttonClick: [{
|
|
323
|
+
type: Output
|
|
324
|
+
}] } });
|
|
325
|
+
|
|
326
|
+
/*
|
|
327
|
+
* Public API Surface of shared-components
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Generated bundle index. Do not edit.
|
|
332
|
+
*/
|
|
333
|
+
|
|
334
|
+
export { ButtonComponent, GenerateErrorMessagesPipe, IconButtonComponent, InputMaskDirective, InputService, TextInputComponent };
|
|
335
|
+
//# sourceMappingURL=i-tech-shared-components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-tech-shared-components.mjs","sources":["../../../projects/shared-components/src/lib/pipes/generate-error-messages.pipe.ts","../../../projects/shared-components/src/lib/services/input.service.ts","../../../projects/shared-components/src/lib/directives/input-mask.directive.ts","../../../projects/shared-components/src/lib/components/icon-button/icon-button.component.ts","../../../projects/shared-components/src/lib/components/icon-button/icon-button.component.html","../../../projects/shared-components/src/lib/components/text/text-input.component.ts","../../../projects/shared-components/src/lib/components/text/text-input.component.html","../../../projects/shared-components/src/lib/interfaces/button-types.constants.ts","../../../projects/shared-components/src/lib/components/button/button.component.ts","../../../projects/shared-components/src/lib/components/button/button.component.html","../../../projects/shared-components/src/public-api.ts","../../../projects/shared-components/src/i-tech-shared-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport {TranslateService} from \"@ngx-translate/core\";\r\n\r\n@Pipe({\r\n name: 'generateErrorMessages',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class GenerateErrorMessagesPipe implements PipeTransform {\r\n\r\n constructor(private translateService: TranslateService) {\r\n }\r\n\r\n transform(control: any,label: string,defaultPatternKey: string = 'fixed'): string {\r\n\r\n if (!control.errors) {\r\n return '';\r\n }\r\n let translateParams!: {ERROR_KEY: string};\r\n let errorMessageKey = ''\r\n\r\n const key = (Object.keys(control.errors)[0]);\r\n\r\n translateParams = {ERROR_KEY: this.translateService.instant(label) || 'Field'};\r\n errorMessageKey = (key === 'pattern') ?\r\n 'errorMessages.pattern.' + defaultPatternKey : 'errorMessages.' + key;\r\n\r\n return this.translateService.instant(errorMessageKey,translateParams);\r\n }\r\n\r\n}\r\n","import {ControlValueAccessor, FormControlName, NgControl} from \"@angular/forms\";\r\nimport {inject, Injectable} from \"@angular/core\";\r\n\r\nclass NoopValueAccessor implements ControlValueAccessor {\r\n writeValue() {}\r\n registerOnChange() {}\r\n\r\n registerOnTouched() {}\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\n\r\nexport class InputService {\r\n injectNgControl(): FormControlName {\r\n const ngControl = inject(NgControl, {self: true, optional: true});\r\n\r\n if (!ngControl) throw new Error('...');\r\n\r\n if (\r\n ngControl instanceof FormControlName\r\n ) {\r\n ngControl.valueAccessor = new NoopValueAccessor();\r\n return ngControl;\r\n }\r\n\r\n throw new Error(`...`);\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef, HostListener,\r\n Input\r\n} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[inputMask]',\r\n standalone: true\r\n})\r\nexport class InputMaskDirective {\r\n @Input() inputMask!: 'number' | 'string';\r\n @Input() set min(value: string) {\r\n this.minimumValue = Number(value);\r\n }\r\n @Input() set max(value: string) {\r\n this.maximumValue = Number(value);\r\n }\r\n @Input() set float(value: string) {\r\n this.isFloat = value === 'true';\r\n }\r\n minimumValue!: number;\r\n maximumValue!: number;\r\n isFloat!: boolean;\r\n regexFloat = new RegExp(/^([0-9]*[.])?[0-9]+$/);\r\n regexOnlyNumbers = new RegExp(/^-?[0-9]+(?:\\.[0-9]+)?$/);\r\n\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: any) {\r\n this.makeValidation(event, true)\r\n }\r\n\r\n constructor(private elementRef: ElementRef) {\r\n this.elementRef.nativeElement.addEventListener('keypress', (event: Event) => {\r\n this.makeValidation(event)\r\n })\r\n }\r\n\r\n makeValidation(event: any, fromPaste = false): boolean {\r\n let value: any;\r\n let newChar: any;\r\n\r\n if (!fromPaste) {\r\n newChar = String.fromCharCode(event.keyCode);\r\n const cursorPos = event.target.selectionStart;\r\n const inputText = event.target.value;\r\n value = `${inputText.slice(0, cursorPos)}${newChar}${inputText.slice(cursorPos, inputText.length)}`;\r\n } else {\r\n value = event.clipboardData?.getData('text/plain');\r\n }\r\n\r\n if (this.inputMask === 'number') {\r\n return this.checkingForNumbers(value, event, newChar, fromPaste);\r\n } else {\r\n return this.checkingForTexts(value, event);\r\n }\r\n }\r\n\r\n checkingForNumbers(value: any, event: any, newChar: string, fromPaste = false): boolean {\r\n if ((isNaN(this.minimumValue) || this.minimumValue < 0) && value === '-') { value = Number('-0'); }\r\n\r\n if (this.isFloat && (newChar === '.')) {\r\n value += '0';\r\n }\r\n if (!this.isFloat && fromPaste && value.includes('.')) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n\r\n const regex = (this.isFloat) ? this.regexFloat : this.regexOnlyNumbers;\r\n\r\n if (!regex.test(value) ||\r\n (this.minimumValue && value < this.minimumValue) ||\r\n (this.maximumValue && value > this.maximumValue)\r\n ) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkingForTexts(value: any, event: any): boolean {\r\n let regex = new RegExp(/^[A-Za-z0-9]*$/);\r\n if (!regex.test(value)) {\r\n event.preventDefault();\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n}\r\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {MatFabButton, MatIconButton} from \"@angular/material/button\";\r\nimport {NgClass, NgIf} from \"@angular/common\";\r\nimport {MatTooltip} from \"@angular/material/tooltip\";\r\nimport {TranslateModule} from \"@ngx-translate/core\";\r\nimport {MatIcon} from \"@angular/material/icon\";\r\n\r\n@Component({\r\n selector: 'app-icon-button',\r\n templateUrl: './icon-button.component.html',\r\n styleUrl: './icon-button.component.scss',\r\n imports: [\r\n MatIconButton,\r\n NgClass,\r\n MatTooltip,\r\n TranslateModule,\r\n MatIcon,\r\n MatFabButton,\r\n NgIf\r\n ],\r\n standalone: true\r\n})\r\nexport class IconButtonComponent {\r\n @Input() size: 'medium' | 'small' = 'medium';\r\n @Input() type: 'standard' | 'filled' | 'tonal' = 'tonal';\r\n @Input() iconSvg!: string;\r\n @Input() iconName!: string;\r\n @Input() tooltip!: string;\r\n @Input() disabled!: boolean;\r\n @Output() buttonClick = new EventEmitter<void>();\r\n\r\n onClick(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.buttonClick.emit();\r\n }\r\n }\r\n}\r\n","<button\r\n *ngIf=\"['tonal','standard'].includes(type)\"\r\n mat-icon-button\r\n [ngClass]=\"{small: size === 'small', tonal: type === 'tonal', standard: type === 'standard'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n\r\n<button\r\n *ngIf=\"type === 'filled'\"\r\n mat-fab\r\n class=\"filled\"\r\n [ngClass]=\"{small: size === 'small'}\"\r\n [matTooltip]=\"tooltip | translate\"\r\n [matTooltipDisabled]=\"!tooltip\"\r\n [color]=\"'primary'\"\r\n [disabled]=\"disabled || false\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"iconSvg\" [svgIcon]=\"iconSvg\"></mat-icon>\r\n <mat-icon *ngIf=\"iconName\">{{iconName}}</mat-icon>\r\n</button>\r\n","import { Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {FormControlName, ReactiveFormsModule} from '@angular/forms';\r\nimport { InputService } from '../../services/input.service';\r\nimport {AppInputInterface} from \"../../interfaces/app-input.interface\";\r\nimport {MatError, MatFormField, MatHint, MatLabel} from \"@angular/material/form-field\";\r\nimport {TranslateModule} from \"@ngx-translate/core\";\r\nimport {NgClass, NgIf} from \"@angular/common\";\r\nimport {MatIcon} from \"@angular/material/icon\";\r\nimport {MatTooltip} from \"@angular/material/tooltip\";\r\nimport {MatInput} from \"@angular/material/input\";\r\nimport {GenerateErrorMessagesPipe} from \"../../pipes/generate-error-messages.pipe\";\r\nimport {IconButtonComponent} from \"../icon-button/icon-button.component\";\r\nimport {InputMaskDirective} from \"../../directives/input-mask.directive\";\r\nimport {NgxMaskDirective} from \"ngx-mask\";\r\n\r\n@Component({\r\n selector: 'app-text-input',\r\n templateUrl: './text-input.component.html',\r\n styleUrls: [],\r\n imports: [\r\n MatLabel,\r\n TranslateModule,\r\n NgClass,\r\n MatFormField,\r\n MatIcon,\r\n MatTooltip,\r\n MatInput,\r\n ReactiveFormsModule,\r\n NgIf,\r\n GenerateErrorMessagesPipe,\r\n IconButtonComponent,\r\n MatError,\r\n MatHint,\r\n InputMaskDirective,\r\n NgxMaskDirective\r\n ],\r\n standalone: true\r\n})\r\nexport class TextInputComponent {\r\n @Input() set inputData(data: AppInputInterface) {\r\n // If submit becomes true, mark the control as touched\r\n if (data?.submit && this.ngControl.control) {\r\n this.ngControl.control.markAsTouched();\r\n }\r\n this._inputData = data;\r\n }\r\n get inputData(): AppInputInterface {\r\n return this._inputData;\r\n }\r\n @Output() focusOutEmitter = new EventEmitter<void>();\r\n\r\n private _inputData!: AppInputInterface;\r\n ngControl: FormControlName;\r\n\r\n constructor(private inputService: InputService) {\r\n this.ngControl = this.inputService.injectNgControl();\r\n }\r\n\r\n onFocusOut(): void {\r\n if (this._inputData.focusOutEmit) {\r\n this.focusOutEmitter.emit();\r\n }\r\n }\r\n\r\n clear(): void {\r\n if (this.ngControl) {\r\n this.ngControl.control.reset();\r\n }\r\n }\r\n\r\n customErrorStateMatcher = {\r\n isErrorState: (control: any, form: any): boolean => {\r\n return !!(control && control.invalid && this.inputData?.submit);\r\n }\r\n };\r\n}\r\n","<div *ngIf=\"inputData && ngControl\">\r\n <div class=\"w-100\">\r\n <mat-label [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\" *ngIf=\"inputData.label\">\r\n {{inputData.label | translate}}\r\n </mat-label>\r\n <span *ngIf=\"inputData.required\" class=\"required-input\" [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\">*</span>\r\n </div>\r\n <mat-form-field appearance=\"outline\" class=\"w-100\"\r\n [class.readonly-field]=\"inputData.readOnly || ngControl.control.disabled\"\r\n >\r\n <!-- Leading Icon -->\r\n <mat-icon *ngIf=\"inputData.iconPrefix\"\r\n matPrefix\r\n [ngClass]=\"{\r\n 'readonly-color' : !inputData.iconPrefixColor && (inputData.readOnly || ngControl.control.disabled),\r\n 'default-form-icon-color' : !inputData.iconPrefixColor && !(inputData.readOnly || ngControl.control.disabled)\r\n }\"\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [style.color]=\"inputData.iconPrefixColor || null\"\r\n >{{ inputData.iconPrefix }}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf=\"inputData.iconPrefixSvg\"\r\n matPrefix\r\n [matTooltip]=\"((inputData.iconPrefixTooltip || '') | translate)\"\r\n [svgIcon]=\"inputData.iconPrefixSvg\"\r\n ></mat-icon>\r\n\r\n <!-- Input Field -->\r\n <input matInput\r\n *ngIf=\"!inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [mask]=\"inputData.mask || ''\"\r\n [ngClass]=\"{'readonly-color readonly-cursor' : inputData.readOnly || ngControl.control.disabled}\"\r\n [inputMask]=\"inputData.inputMask!\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n (blur)=\"onFocusOut()\"\r\n >\r\n\r\n <textarea matInput\r\n *ngIf=\"inputData.textarea\"\r\n [type]=\"inputData.type || 'text'\"\r\n [readonly]=\"inputData.readOnly\"\r\n [placeholder]=\"(inputData.placeholder || '') | translate\"\r\n [pattern]=\"inputData.pattern!\"\r\n [formControl]=\"ngControl.control\"\r\n [ngClass]=\"{'readonly-color' : inputData.readOnly || ngControl.control.disabled}\"\r\n [errorStateMatcher]=\"customErrorStateMatcher\"\r\n ></textarea>\r\n\r\n <!-- Clear Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.clearable\"\r\n iconName=\"cancel\"\r\n matSuffix\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n (click)=\"clear()\"\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Trailing Icon -->\r\n <app-icon-button\r\n *ngIf=\"inputData.iconSuffix\"\r\n [iconName]=\"inputData.iconSuffix\"\r\n [disabled]=\"inputData.readOnly || ngControl.control.disabled || false\"\r\n [ngClass]=\"inputData.readOnly || ngControl.control.disabled ? 'readonly-color' : 'default-form-icon-color'\"\r\n matSuffix\r\n >\r\n </app-icon-button>\r\n\r\n <!-- Error Messages -->\r\n <mat-error *ngIf=\"!!(ngControl.control.errors && inputData.submit)\">\r\n {{ ngControl.control | generateErrorMessages : (inputData.label || '') : inputData.defaultPatternKey}}\r\n </mat-error>\r\n\r\n <!-- Helper Text -->\r\n <mat-hint *ngIf=\"!(!!(ngControl.control.errors && inputData.submit)) && inputData.hint\">\r\n {{inputData.hint | translate}}\r\n </mat-hint>\r\n </mat-form-field>\r\n</div>\r\n","export enum ButtonType {\r\n FILLED = 'FILLED' ,\r\n TONAL = 'TONAL',\r\n OUTLINE = 'OUTLINE',\r\n TEXT = 'TEXT',\r\n WARNING = 'WARNING',\r\n}\r\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {MatButton} from \"@angular/material/button\";\r\nimport {NgClass, NgIf} from \"@angular/common\";\r\nimport {MatProgressSpinner} from \"@angular/material/progress-spinner\";\r\nimport {MatIconModule} from \"@angular/material/icon\";\r\nimport {TranslateModule} from \"@ngx-translate/core\";\r\nimport { ButtonType } from '../../interfaces/button-types.constants';\r\n\r\n@Component({\r\n selector: 'lib-button',\r\n standalone: true,\r\n imports: [\r\n MatButton,\r\n NgClass,\r\n MatProgressSpinner,\r\n NgIf,\r\n MatIconModule,\r\n TranslateModule\r\n ],\r\n templateUrl: './button.component.html',\r\n styleUrl: './button.component.css'\r\n})\r\nexport class ButtonComponent {\r\n @Input() text: string = '';\r\n @Input() data_cy: string = '';\r\n @Input() fontIcon: string = '';\r\n @Input() svgIcon: string = '';\r\n @Input() type: ButtonType = ButtonType.FILLED;\r\n @Input() customClass!: string;\r\n @Input() submit: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() activated: boolean = false;\r\n @Input() color: 'primary' | 'warn' = 'primary';\r\n @Output() buttonClick = new EventEmitter<void>();\r\n protected readonly ButtonType = ButtonType;\r\n\r\n constructor() {}\r\n\r\n onClick(event: MouseEvent): void {\r\n if (!this.disabled && !this.submit) {\r\n this.buttonClick.emit();\r\n }\r\n }\r\n}\r\n","<button *ngIf=\"[ButtonType.FILLED,ButtonType.WARNING].includes(type)\"\r\n mat-flat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [color]=\"type === ButtonType.WARNING ? 'warn' : color\"\r\n [class.activated]=\"activated\"\r\n [ngClass]=\"(customClass || '')\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"[ButtonType.TONAL,ButtonType.TEXT].includes(type)\"\r\n mat-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(type === ButtonType.TONAL ? 'tertiary ' : '') + (customClass || '')\"\r\n [class.activated]=\"activated\"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\">{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n\r\n <span>{{text | translate}}</span>\r\n</button>\r\n<button *ngIf=\"type === ButtonType.OUTLINE\"\r\n [color]=\"color\"\r\n mat-stroked-button\r\n [attr.data-cy]=\"data_cy\"\r\n [ngClass]=\"(customClass || '') \"\r\n [disabled]=\"disabled || submit\"\r\n (click)=\"onClick($event)\"\r\n [class.activated]=\"activated\"\r\n>\r\n <span *ngIf=\"submit\" class=\"spinner-overlay\">\r\n <mat-spinner diameter=\"16\"></mat-spinner>\r\n </span>\r\n <mat-icon *ngIf=\"fontIcon && !submit\" >{{fontIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"svgIcon && !submit\" [svgIcon]=\"svgIcon\"></mat-icon>\r\n <span>{{text | translate}}</span>\r\n</button>\r\n","/*\r\n * Public API Surface of shared-components\r\n */\r\n\r\nexport * from './lib/pipes/generate-error-messages.pipe';\r\nexport * from './lib/services/input.service';\r\nexport * from './lib/interfaces/app-input.interface';\r\nexport * from './lib/directives/input-mask.directive';\r\nexport * from './lib/components/icon-button/icon-button.component';\r\nexport * from './lib/components/text/text-input.component';\r\nexport * from './lib/components/button/button.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.InputService","i2"],"mappings":";;;;;;;;;;;;;;;;MAQa,yBAAyB,CAAA;AAElC,IAAA,WAAA,CAAoB,gBAAkC,EAAA;QAAlC,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAkB;KACrD;AAED,IAAA,SAAS,CAAC,OAAY,EAAC,KAAa,EAAC,oBAA4B,OAAO,EAAA;AAEpE,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;AACjB,YAAA,OAAO,EAAE,CAAC;SACb;AACD,QAAA,IAAI,eAAqC,CAAC;QAC1C,IAAI,eAAe,GAAG,EAAE,CAAA;AAExB,QAAA,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7C,QAAA,eAAe,GAAG,EAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,EAAC,CAAC;AAC/E,QAAA,eAAe,GAAG,CAAC,GAAG,KAAK,SAAS;YAChC,wBAAwB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,GAAG,CAAC;QAE1E,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,eAAe,EAAC,eAAe,CAAC,CAAC;KACzE;+GApBQ,yBAAyB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,uBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,IAAI;AAAC,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AA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAI,EACJ,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAa,qLACb,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAKN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EACP,OAAA,EAAA;wBACP,SAAS;wBACT,OAAO;wBACP,kBAAkB;wBAClB,IAAI;wBACJ,aAAa;wBACb,eAAe;AAChB,qBAAA,EAAA,QAAA,EAAA,yiEAAA,EAAA,CAAA;wDAKQ,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AEjCT;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ButtonType } from '../../interfaces/button-types.constants';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ButtonComponent {
|
|
5
|
+
text: string;
|
|
6
|
+
data_cy: string;
|
|
7
|
+
fontIcon: string;
|
|
8
|
+
svgIcon: string;
|
|
9
|
+
type: ButtonType;
|
|
10
|
+
customClass: string;
|
|
11
|
+
submit: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
activated: boolean;
|
|
14
|
+
color: 'primary' | 'warn';
|
|
15
|
+
buttonClick: EventEmitter<void>;
|
|
16
|
+
protected readonly ButtonType: typeof ButtonType;
|
|
17
|
+
constructor();
|
|
18
|
+
onClick(event: MouseEvent): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "lib-button", never, { "text": { "alias": "text"; "required": false; }; "data_cy": { "alias": "data_cy"; "required": false; }; "fontIcon": { "alias": "fontIcon"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "type": { "alias": "type"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "submit": { "alias": "submit"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "activated": { "alias": "activated"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IconButtonComponent {
|
|
4
|
+
size: 'medium' | 'small';
|
|
5
|
+
type: 'standard' | 'filled' | 'tonal';
|
|
6
|
+
iconSvg: string;
|
|
7
|
+
iconName: string;
|
|
8
|
+
tooltip: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
buttonClick: EventEmitter<void>;
|
|
11
|
+
onClick(event: MouseEvent): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconButtonComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconButtonComponent, "app-icon-button", never, { "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "iconSvg": { "alias": "iconSvg"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormControlName } from '@angular/forms';
|
|
3
|
+
import { InputService } from '../../services/input.service';
|
|
4
|
+
import { AppInputInterface } from "../../interfaces/app-input.interface";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TextInputComponent {
|
|
7
|
+
private inputService;
|
|
8
|
+
set inputData(data: AppInputInterface);
|
|
9
|
+
get inputData(): AppInputInterface;
|
|
10
|
+
focusOutEmitter: EventEmitter<void>;
|
|
11
|
+
private _inputData;
|
|
12
|
+
ngControl: FormControlName;
|
|
13
|
+
constructor(inputService: InputService);
|
|
14
|
+
onFocusOut(): void;
|
|
15
|
+
clear(): void;
|
|
16
|
+
customErrorStateMatcher: {
|
|
17
|
+
isErrorState: (control: any, form: any) => boolean;
|
|
18
|
+
};
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "app-text-input", never, { "inputData": { "alias": "inputData"; "required": false; }; }, { "focusOutEmitter": "focusOutEmitter"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InputMaskDirective {
|
|
4
|
+
private elementRef;
|
|
5
|
+
inputMask: 'number' | 'string';
|
|
6
|
+
set min(value: string);
|
|
7
|
+
set max(value: string);
|
|
8
|
+
set float(value: string);
|
|
9
|
+
minimumValue: number;
|
|
10
|
+
maximumValue: number;
|
|
11
|
+
isFloat: boolean;
|
|
12
|
+
regexFloat: RegExp;
|
|
13
|
+
regexOnlyNumbers: RegExp;
|
|
14
|
+
onPaste(event: any): void;
|
|
15
|
+
constructor(elementRef: ElementRef);
|
|
16
|
+
makeValidation(event: any, fromPaste?: boolean): boolean;
|
|
17
|
+
checkingForNumbers(value: any, event: any, newChar: string, fromPaste?: boolean): boolean;
|
|
18
|
+
checkingForTexts(value: any, event: any): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputMaskDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InputMaskDirective, "[inputMask]", never, { "inputMask": { "alias": "inputMask"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "float": { "alias": "float"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface AppInputInterface {
|
|
2
|
+
activeStateIconUrl?: string;
|
|
3
|
+
clearable?: boolean;
|
|
4
|
+
containerClass?: string;
|
|
5
|
+
datePicker?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
dontResetValueInClearAction?: boolean;
|
|
8
|
+
hint?: string;
|
|
9
|
+
iconPrefix?: string;
|
|
10
|
+
iconPrefixSvg?: string;
|
|
11
|
+
iconPrefixTooltip?: string;
|
|
12
|
+
iconPrefixColor?: string;
|
|
13
|
+
iconPrefixVariant?: string;
|
|
14
|
+
iconSuffix?: string;
|
|
15
|
+
iconUrl?: string;
|
|
16
|
+
inputClass?: string;
|
|
17
|
+
inputMask?: 'number' | 'string';
|
|
18
|
+
label?: string;
|
|
19
|
+
leadZeroDateTime?: boolean;
|
|
20
|
+
mask?: string;
|
|
21
|
+
pattern?: string | RegExp;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
prefix?: string;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
submit: boolean;
|
|
27
|
+
textarea?: boolean;
|
|
28
|
+
type: string;
|
|
29
|
+
defaultPatternKey?: string;
|
|
30
|
+
focusOutEmit?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class GenerateErrorMessagesPipe implements PipeTransform {
|
|
5
|
+
private translateService;
|
|
6
|
+
constructor(translateService: TranslateService);
|
|
7
|
+
transform(control: any, label: string, defaultPatternKey?: string): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GenerateErrorMessagesPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<GenerateErrorMessagesPipe, "generateErrorMessages", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormControlName } from "@angular/forms";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InputService {
|
|
4
|
+
injectNgControl(): FormControlName;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InputService>;
|
|
7
|
+
}
|