@sd-angular/core 1.3.213 → 1.3.214
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/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/autocomplete/src/lib/autocomplete.component.d.ts +4 -1
- package/bundles/sd-angular-core-autocomplete.umd.js +22 -2
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-month.umd.js +23 -1
- package/bundles/sd-angular-core-date-month.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-month.umd.min.js +2 -2
- package/bundles/sd-angular-core-date-month.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.js +24 -1
- package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.js +23 -3
- package/bundles/sd-angular-core-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.min.js +1 -1
- package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.js +22 -2
- package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.js +22 -2
- package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.js +22 -2
- package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input.umd.js +33 -3
- package/bundles/sd-angular-core-input.umd.js.map +1 -1
- package/bundles/sd-angular-core-input.umd.min.js +2 -2
- package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.js +1 -1
- package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.min.js +2 -2
- package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.js +22 -2
- package/bundles/sd-angular-core-select.umd.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.min.js +2 -2
- package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.js +95 -77
- package/bundles/sd-angular-core-table.umd.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.min.js +1 -1
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.js +22 -2
- package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.min.js +1 -1
- package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
- package/date-month/sd-angular-core-date-month.metadata.json +1 -1
- package/date-month/src/lib/date-month.component.d.ts +4 -1
- package/date-time/sd-angular-core-date-time.metadata.json +1 -1
- package/date-time/src/lib/date-time.component.d.ts +4 -1
- package/editor/sd-angular-core-editor.metadata.json +1 -1
- package/editor/src/lib/editor.component.d.ts +4 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +19 -3
- package/esm2015/date-month/src/lib/date-month.component.js +20 -2
- package/esm2015/date-time/src/lib/date-time.component.js +21 -2
- package/esm2015/editor/src/lib/editor.component.js +20 -4
- package/esm2015/input/src/lib/input.component.js +28 -3
- package/esm2015/input-currency/src/lib/input-currency.component.js +19 -3
- package/esm2015/input-dropdown/src/lib/input.component.js +19 -3
- package/esm2015/input-number/src/lib/input-number.component.js +19 -3
- package/esm2015/select/src/lib/select.component.js +19 -3
- package/esm2015/select-editor/src/lib/select-editor.component.js +2 -2
- package/esm2015/table/src/lib/components/column-inline-filter/column-inline-filter.component.js +1 -1
- package/esm2015/table/src/lib/models/table-column.model.js +1 -1
- package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +19 -7
- package/esm2015/table/src/lib/table.component.js +5 -2
- package/esm2015/textarea/src/lib/textarea.component.js +19 -3
- package/fesm2015/sd-angular-core-autocomplete.js +18 -2
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-date-month.js +19 -1
- package/fesm2015/sd-angular-core-date-month.js.map +1 -1
- package/fesm2015/sd-angular-core-date-time.js +20 -1
- package/fesm2015/sd-angular-core-date-time.js.map +1 -1
- package/fesm2015/sd-angular-core-editor.js +19 -3
- package/fesm2015/sd-angular-core-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-input-currency.js +18 -2
- package/fesm2015/sd-angular-core-input-currency.js.map +1 -1
- package/fesm2015/sd-angular-core-input-dropdown.js +18 -2
- package/fesm2015/sd-angular-core-input-dropdown.js.map +1 -1
- package/fesm2015/sd-angular-core-input-number.js +18 -2
- package/fesm2015/sd-angular-core-input-number.js.map +1 -1
- package/fesm2015/sd-angular-core-input.js +29 -4
- package/fesm2015/sd-angular-core-input.js.map +1 -1
- package/fesm2015/sd-angular-core-select-editor.js +1 -1
- package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-select.js +18 -2
- package/fesm2015/sd-angular-core-select.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +22 -7
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/fesm2015/sd-angular-core-textarea.js +18 -2
- package/fesm2015/sd-angular-core-textarea.js.map +1 -1
- package/input/sd-angular-core-input.metadata.json +1 -1
- package/input/src/lib/input.component.d.ts +5 -1
- package/input-currency/sd-angular-core-input-currency.metadata.json +1 -1
- package/input-currency/src/lib/input-currency.component.d.ts +4 -1
- package/input-dropdown/sd-angular-core-input-dropdown.metadata.json +1 -1
- package/input-dropdown/src/lib/input.component.d.ts +4 -1
- package/input-number/sd-angular-core-input-number.metadata.json +1 -1
- package/input-number/src/lib/input-number.component.d.ts +4 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.213.tgz → sd-angular-core-1.3.214.tgz} +0 -0
- package/select/sd-angular-core-select.metadata.json +1 -1
- package/select/src/lib/select.component.d.ts +4 -1
- package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
- package/table/sd-angular-core-table.metadata.json +1 -1
- package/table/src/lib/models/table-column.model.d.ts +1 -0
- package/textarea/sd-angular-core-textarea.metadata.json +1 -1
- package/textarea/src/lib/textarea.component.d.ts +4 -1
|
@@ -90,10 +90,15 @@ class SdTextarea {
|
|
|
90
90
|
if (__classPrivateFieldGet(this, _validator)) {
|
|
91
91
|
asyncValidators.push(__classPrivateFieldGet(this, _customValidator).call(this, __classPrivateFieldGet(this, _validator)));
|
|
92
92
|
}
|
|
93
|
+
if (this.inlineError) {
|
|
94
|
+
validators.push(this.customInlineErrorValidator());
|
|
95
|
+
}
|
|
93
96
|
this.formControl.setValidators(validators);
|
|
94
97
|
this.formControl.setAsyncValidators(asyncValidators);
|
|
95
98
|
this.formControl.updateValueAndValidity();
|
|
96
|
-
}
|
|
99
|
+
}
|
|
100
|
+
// Hàm tạo Validators tùy chỉnh cho inlineError
|
|
101
|
+
);
|
|
97
102
|
_customValidator.set(this, (func) => {
|
|
98
103
|
return (c) => __awaiter(this, void 0, void 0, function* () {
|
|
99
104
|
const value = c.value || null;
|
|
@@ -166,6 +171,10 @@ class SdTextarea {
|
|
|
166
171
|
__classPrivateFieldSet(this, _validator, validator);
|
|
167
172
|
__classPrivateFieldGet(this, _updateValidator).call(this);
|
|
168
173
|
}
|
|
174
|
+
set _inlineError(val) {
|
|
175
|
+
this.inlineError = val;
|
|
176
|
+
__classPrivateFieldGet(this, _updateValidator).call(this);
|
|
177
|
+
}
|
|
169
178
|
set disabled(val) {
|
|
170
179
|
val = (val === '') || val;
|
|
171
180
|
if (val) {
|
|
@@ -198,12 +207,18 @@ class SdTextarea {
|
|
|
198
207
|
(_a = __classPrivateFieldGet(this, _form)) === null || _a === void 0 ? void 0 : _a.removeControl(__classPrivateFieldGet(this, _name));
|
|
199
208
|
__classPrivateFieldGet(this, _subscription).unsubscribe();
|
|
200
209
|
}
|
|
210
|
+
// Hàm tạo Validators tùy chỉnh cho inlineError
|
|
211
|
+
customInlineErrorValidator() {
|
|
212
|
+
return (control) => {
|
|
213
|
+
return { inlineError: true };
|
|
214
|
+
};
|
|
215
|
+
}
|
|
201
216
|
}
|
|
202
217
|
_name = new WeakMap(), _form = new WeakMap(), _pattern = new WeakMap(), _validator = new WeakMap(), _autoHeight_1 = new WeakMap(), _subscription = new WeakMap(), _onChange = new WeakMap(), _onInput = new WeakMap(), _updateValidator = new WeakMap(), _customValidator = new WeakMap();
|
|
203
218
|
SdTextarea.decorators = [
|
|
204
219
|
{ type: Component, args: [{
|
|
205
220
|
selector: 'sd-textarea',
|
|
206
|
-
template: "<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"required\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field appearance=\"outline\" [class.c-no-label]=\"!label\">\r\n <mat-label *ngIf=\"appearance && label\">{{ label }}</mat-label>\r\n <textarea matInput [placeholder]=\"placeholder || (appearance ? label : '')\" [formControl]=\"formControl\"\r\n [required]=\"required\" autocomplete=\"off\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" [rows]=\"rows\"\r\n [maxlength]=\"maxlength\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #textarea></textarea>\r\n <span *ngIf=\"maxlength && !formControl.disabled\" matSuffix>{{formControl?.value?.length ||\r\n 0}}/{{maxlength}}</span>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.maxlength\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.pattern\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Pattern error' | sdTranslate}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
|
|
221
|
+
template: "<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"required\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field appearance=\"outline\" [class.c-no-label]=\"!label\">\r\n <mat-label *ngIf=\"appearance && label\">{{ label }}</mat-label>\r\n <textarea matInput [placeholder]=\"placeholder || (appearance ? label : '')\" [formControl]=\"formControl\"\r\n [required]=\"required\" autocomplete=\"off\" (focus)=\"onFocus()\" (blur)=\"onBlur()\" [rows]=\"rows\"\r\n [maxlength]=\"maxlength\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" #textarea></textarea>\r\n <span *ngIf=\"maxlength && !formControl.disabled\" matSuffix>{{formControl?.value?.length ||\r\n 0}}/{{maxlength}}</span>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.maxlength\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.pattern\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Pattern error' | sdTranslate}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.touched && formControl.errors?.inlineError\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{inlineError}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
|
|
207
222
|
styles: [":host ::ng-deep textarea.mat-input-element{resize:none}:host ::ng-deep .mat-form-field.c-no-label .mat-form-field-infix{border-top:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field textarea.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}"]
|
|
208
223
|
},] }
|
|
209
224
|
];
|
|
@@ -226,6 +241,7 @@ SdTextarea.propDecorators = {
|
|
|
226
241
|
_maxlength: [{ type: Input, args: ['maxlength',] }],
|
|
227
242
|
pattern: [{ type: Input }],
|
|
228
243
|
validator: [{ type: Input }],
|
|
244
|
+
_inlineError: [{ type: Input, args: ['inlineError',] }],
|
|
229
245
|
disabled: [{ type: Input }],
|
|
230
246
|
_autoHeight: [{ type: Input, args: ['autoHeight',] }],
|
|
231
247
|
textarea: [{ type: ViewChild, args: ['textarea',] }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-textarea.js","sources":["../../../../projects/sd-core/textarea/src/lib/textarea.component.ts","../../../../projects/sd-core/textarea/src/lib/textarea.module.ts","../../../../projects/sd-core/textarea/sd-angular-core-textarea.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectorRef, AfterViewInit, OnDestroy, ViewEncapsulation, OnInit, ContentChild, ViewChild, ElementRef, Inject, Optional } from '@angular/core';\r\n\r\nimport * as uuid from 'uuid';\r\nimport { AbstractControl, AsyncValidatorFn, FormGroup, NgForm, ValidatorFn, Validators } from '@angular/forms';\r\nimport { Subscription } from 'rxjs';\r\nimport hash from 'object-hash';\r\nimport { FORM_CONFIG, IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\n\r\n@Component({\r\n selector: 'sd-textarea',\r\n templateUrl: './textarea.component.html',\r\n styleUrls: ['./textarea.component.scss']\r\n})\r\n\r\nexport class SdTextarea implements OnInit, AfterViewInit, OnDestroy {\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n qcId: string;\r\n label: string;\r\n @Input('label') set _label(val: string) {\r\n this.label = val;\r\n this.qcId = hash({\r\n selector: 'sd-textarea',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n @Input() rows = 5;\r\n @Input() set model(value: any) {\r\n if (this.formControl.value !== value) {\r\n this.formControl.setValue(value);\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n @Output() sdChange = new EventEmitter<any>();\r\n\r\n // Optional\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n required = false;\r\n @Input('required') set _required(val: boolean | '') {\r\n this.required = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n maxlength: number;\r\n @Input('maxlength') set _maxlength(val: number) {\r\n this.maxlength = +val;\r\n this.#updateValidator();\r\n }\r\n #pattern: string;\r\n @Input() set pattern(val: string) {\r\n this.#pattern = val;\r\n this.#updateValidator();\r\n }\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n #autoHeight = false;\r\n @Input('autoHeight') set _autoHeight(val: boolean | '') {\r\n this.#autoHeight = (val === '') || val;\r\n }\r\n @ViewChild('textarea') textarea: ElementRef;\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n isFocused = false;\r\n formControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.valueChanges.subscribe(this.#onChange));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.#autoHeight) {\r\n this.textarea?.nativeElement?.setAttribute('style', `height: ${this.textarea?.nativeElement?.scrollHeight}px;overflow-y:hidden;`)\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n const val: string = (this.formControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.formControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.textarea?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.textarea?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #onChange = (value: any) => {\r\n if (this.#autoHeight) {\r\n this.textarea.nativeElement.style.height = 'auto';\r\n this.textarea.nativeElement.style.height = (this.textarea.nativeElement.scrollHeight) + 'px';\r\n }\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n #onInput = function () {\r\n // this.style.height = 'auto';\r\n // this.style.height = (this.scrollHeight) + 'px';\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.required) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.maxlength > 0) {\r\n validators.push(Validators.maxLength(this.maxlength));\r\n }\r\n if (this.#pattern) {\r\n validators.push(Validators.pattern(this.#pattern));\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value || null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdTextarea } from './textarea.component';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule\r\n ],\r\n declarations: [\r\n SdTextarea\r\n ],\r\n exports: [\r\n SdCommonModule,\r\n SdTextarea\r\n ]\r\n})\r\nexport class SdTextareaModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;MAgBa,UAAU;IAgFrB,YACU,GAAsB,EACW,UAA8B;QAD/D,QAAG,GAAH,GAAG,CAAmB;QACW,eAAU,GAAV,UAAU,CAAoB;QAjFzE,gBAAQA,EAAO,EAAE,EAAC;QAOlB,wBAAiB;QAoBR,SAAI,GAAG,CAAC,CAAC;QAMR,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;QACjC,aAAQ,GAAG,IAAI,YAAY,EAAO,CAAC;;QAG7C,wBAAmB,GAAG,KAAK,CAAC;QAI5B,aAAQ,GAAG,KAAK,CAAC;QAUjB,2BAAiB;QAKjB,6BAAqD;QAarD,wBAAc,KAAK,EAAC;QAOpB,cAAS,GAAG,KAAK,CAAC;QAClB,gBAAW,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,wBAAgB,IAAI,YAAY,EAAE,EAAC;QA0BnC,YAAO,GAAG;YACR,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB,CAAA;QAED,WAAM,GAAG;;YACP,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,MAAM,GAAG,GAAW,OAAC,IAAI,CAAC,WAAW,CAAC,KAAK,mCAAI,EAAE,EAAE,QAAQ,EAAE,CAAC;YAC9D,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;gBAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;aACvC;SACF,CAAA;QAED,YAAO,GAAG;;YACR,UAAI,IAAI,CAAC,MAAM,0CAAE,WAAW,EAAE;gBAC5B,IAAI,CAAC,IAAI,CAAC,WAA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/B,YAAY,SAAC,mBAAmB;;;MC7DtB,gBAAgB;;;YApB5B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,gBAAgB;oBAChB,iBAAiB;oBACjB,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,UAAU;iBACX;gBACD,OAAO,EAAE;oBACP,cAAc;oBACd,UAAU;iBACX;aACF;;;AC9BD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sd-angular-core-textarea.js","sources":["../../../../projects/sd-core/textarea/src/lib/textarea.component.ts","../../../../projects/sd-core/textarea/src/lib/textarea.module.ts","../../../../projects/sd-core/textarea/sd-angular-core-textarea.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectorRef, AfterViewInit, OnDestroy, ViewEncapsulation, OnInit, ContentChild, ViewChild, ElementRef, Inject, Optional } from '@angular/core';\r\n\r\nimport * as uuid from 'uuid';\r\nimport { AbstractControl, AsyncValidatorFn, FormGroup, NgForm, ValidatorFn, Validators } from '@angular/forms';\r\nimport { Subscription } from 'rxjs';\r\nimport hash from 'object-hash';\r\nimport { FORM_CONFIG, IFormConfiguration, SdFormControl, SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\n\r\n@Component({\r\n selector: 'sd-textarea',\r\n templateUrl: './textarea.component.html',\r\n styleUrls: ['./textarea.component.scss']\r\n})\r\n\r\nexport class SdTextarea implements OnInit, AfterViewInit, OnDestroy {\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n qcId: string;\r\n label: string;\r\n @Input('label') set _label(val: string) {\r\n this.label = val;\r\n this.qcId = hash({\r\n selector: 'sd-textarea',\r\n label: val\r\n });\r\n };\r\n @Input() placeholder: string;\r\n @Input() rows = 5;\r\n @Input() set model(value: any) {\r\n if (this.formControl.value !== value) {\r\n this.formControl.setValue(value);\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n @Output() sdChange = new EventEmitter<any>();\r\n\r\n // Optional\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n required = false;\r\n @Input('required') set _required(val: boolean | '') {\r\n this.required = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n maxlength: number;\r\n @Input('maxlength') set _maxlength(val: number) {\r\n this.maxlength = +val;\r\n this.#updateValidator();\r\n }\r\n #pattern: string;\r\n @Input() set pattern(val: string) {\r\n this.#pattern = val;\r\n this.#updateValidator();\r\n }\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n inlineError: string;\r\n @Input('inlineError') set _inlineError(val: string) {\r\n this.inlineError = val;\r\n this.#updateValidator();\r\n }\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n #autoHeight = false;\r\n @Input('autoHeight') set _autoHeight(val: boolean | '') {\r\n this.#autoHeight = (val === '') || val;\r\n }\r\n @ViewChild('textarea') textarea: ElementRef;\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n isFocused = false;\r\n formControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.valueChanges.subscribe(this.#onChange));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.#autoHeight) {\r\n this.textarea?.nativeElement?.setAttribute('style', `height: ${this.textarea?.nativeElement?.scrollHeight}px;overflow-y:hidden;`)\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n const val: string = (this.formControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.formControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.textarea?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.textarea?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #onChange = (value: any) => {\r\n if (this.#autoHeight) {\r\n this.textarea.nativeElement.style.height = 'auto';\r\n this.textarea.nativeElement.style.height = (this.textarea.nativeElement.scrollHeight) + 'px';\r\n }\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n #onInput = function () {\r\n // this.style.height = 'auto';\r\n // this.style.height = (this.scrollHeight) + 'px';\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.required) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.maxlength > 0) {\r\n validators.push(Validators.maxLength(this.maxlength));\r\n }\r\n if (this.#pattern) {\r\n validators.push(Validators.pattern(this.#pattern));\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n if (this.inlineError) {\r\n validators.push(this.customInlineErrorValidator());\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n // Hàm tạo Validators tùy chỉnh cho inlineError\r\n customInlineErrorValidator(): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: any } | null => {\r\n return { inlineError: true };\r\n };\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value || null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdTextarea } from './textarea.component';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule\r\n ],\r\n declarations: [\r\n SdTextarea\r\n ],\r\n exports: [\r\n SdCommonModule,\r\n SdTextarea\r\n ]\r\n})\r\nexport class SdTextareaModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;MAgBa,UAAU;IAqFrB,YACU,GAAsB,EACW,UAA8B;QAD/D,QAAG,GAAH,GAAG,CAAmB;QACW,eAAU,GAAV,UAAU,CAAoB;QAtFzE,gBAAQA,EAAO,EAAE,EAAC;QAOlB,wBAAiB;QAoBR,SAAI,GAAG,CAAC,CAAC;QAMR,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;QACjC,aAAQ,GAAG,IAAI,YAAY,EAAO,CAAC;;QAG7C,wBAAmB,GAAG,KAAK,CAAC;QAI5B,aAAQ,GAAG,KAAK,CAAC;QAUjB,2BAAiB;QAKjB,6BAAqD;QAkBrD,wBAAc,KAAK,EAAC;QAOpB,cAAS,GAAG,KAAK,CAAC;QAClB,gBAAW,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,wBAAgB,IAAI,YAAY,EAAE,EAAC;QA0BnC,YAAO,GAAG;YACR,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB,CAAA;QAED,WAAM,GAAG;;YACP,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,MAAM,GAAG,GAAW,OAAC,IAAI,CAAC,WAAW,CAAC,KAAK,mCAAI,EAAE,EAAE,QAAQ,EAAE,CAAC;YAC9D,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;gBAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;aACvC;SACF,CAAA;QAED,YAAO,GAAG;;YACR,UAAI,IAAI,CAAC,MAAM,0CAAE,WAAW,EAAE;gBAC5B,IAAI,CAAC,IAAI,CAAC,WAAW,C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B,KAAK;yBAKL,KAAK;mBAEL,KAAK;qBAWL,KAAK,SAAC,OAAO;0BAOb,KAAK;mBACL,KAAK;oBACL,KAAK;0BAKL,MAAM;uBACN,MAAM;mCAIN,KAAK,SAAC,qBAAqB;wBAI3B,KAAK,SAAC,UAAU;yBAKhB,KAAK,SAAC,WAAW;sBAKjB,KAAK;wBAKL,KAAK;2BAKL,KAAK,SAAC,aAAa;uBAInB,KAAK;0BASL,KAAK,SAAC,YAAY;uBAGlB,SAAS,SAAC,UAAU;qBACpB,YAAY,SAAC,kBAAkB;yBAC/B,YAAY,SAAC,mBAAmB;;;MClEtB,gBAAgB;;;YApB5B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,gBAAgB;oBAChB,iBAAiB;oBACjB,cAAc;iBACf;gBACD,YAAY,EAAE;oBACZ,UAAU;iBACX;gBACD,OAAO,EAAE;oBACP,cAAc;oBACd,UAAU;iBACX;aACF;;;AC9BD;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":24,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":25,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":26,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/popover","name":"SdPopoverModule","line":27,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":28,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"},{"__symbolic":"reference","name":"SdInputSuffixDirective"},{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"},{"__symbolic":"reference","name":"SdInputSuffixDirective"},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":40,"character":4}]}]}],"members":{}},"SdInputTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInputSuffixDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"[sdInputSuffix]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"SdInput":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":30,"character":1},"arguments":[{"selector":"sd-input","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":34,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\"\r\n [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input aria-hidden=\"true\" [id]=\"id\" [formControl]=\"formControl\" [type]=\"type\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\" [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [step]=\"1\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" [sdPopoverTriggerFor]=\"null\"\r\n [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <span class=\"mr-1\" *ngIf=\"maxlength && !formControl.disabled\" matSuffix>{{formControl.value?.length || 0}}/{{maxlength}}</span>\r\n <ng-container *ngIf=\"sdInputSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdInputSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-icon *ngIf=\"!hideIcon && sdClickIcon?.observers?.length\" (click)=\"onClickIcon($event)\"\r\n class=\"pointer sd-suffix-icon\" matSuffix>\r\n {{icon}}\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\" formControl.errors?.maxlength\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Max length' | sdTranslate}} {{maxlength}}\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Pattern error' | sdTranslate}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputTooltipPipe:tooltip\" matSuffix\r\n #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.maxlength\">\r\n {{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </span>\r\n <span *ngIf=\"formControl.errors?.pattern\">\r\n {{'Pattern error' | sdTranslate}}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}:host ::ng-deep .mat-form-field:hover .icon-copy{opacity:1}:host ::ng-deep .mat-form-field .icon-copy{cursor:pointer;fill:rgba(0,0,0,.5);height:.9em;opacity:0;transition:opacity .2s linear;width:.9em}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"_label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3},"arguments":["label"]}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":84,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3}}]}],"pMinlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3},"arguments":["minlength"]}]}],"pMaxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":104,"character":3},"arguments":["maxlength"]}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":109,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":114,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":120,"character":3}}]}],"icon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":128,"character":3}}]}],"_hideIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":130,"character":3},"arguments":["hideIcon"]}]}],"sdClickIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":134,"character":3}}]}],"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":137,"character":3}}]}],"sdBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":138,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":139,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":140,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":142,"character":3},"arguments":["control"]}]}],"sdInputSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":143,"character":3},"arguments":[{"__symbolic":"reference","name":"SdInputSuffixDirective"}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":144,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":144,"character":16}]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":148,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":148,"character":16}]}]}],"copyTooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":150,"character":3},"arguments":["copyTooltip"]}]}],"_copyable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":152,"character":3},"arguments":["copyable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":158,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":158,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":158,"character":26}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":157,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":158,"character":57},{"__symbolic":"reference","module":"@sd-angular/core/utility","name":"SdUtilityService","line":159,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onCopyText":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"[touch]"}]}],"members":{"touch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":6,"character":3}}]}],"ref":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":7,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}]}}},"origins":{"SdInputModule":"./src/lib/input.module","SdInputTooltipPipe":"./src/lib/input-tooltip.pipe","SdInputSuffixDirective":"./src/lib/directives/input-suffix.directive","SdInput":"./src/lib/input.component","ɵa":"./src/lib/directives/touch.directive"},"importAs":"@sd-angular/core/input"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":22,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":24,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":25,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":26,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/popover","name":"SdPopoverModule","line":27,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":28,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"},{"__symbolic":"reference","name":"SdInputSuffixDirective"},{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"},{"__symbolic":"reference","name":"SdInputSuffixDirective"},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":40,"character":4}]}]}],"members":{}},"SdInputTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInputSuffixDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"[sdInputSuffix]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}]}},"SdInput":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":30,"character":1},"arguments":[{"selector":"sd-input","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":34,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\"\r\n [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input aria-hidden=\"true\" [id]=\"id\" [formControl]=\"formControl\" [type]=\"type\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\" [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\" autocorrect=\"off\"\r\n [step]=\"1\" [attr.data-qclabel]=\"label\" [attr.data-qcid]=\"qcId\" [sdPopoverTriggerFor]=\"null\"\r\n [sdPopoverDisabled]=\"!disableErrorMessage || formControl.valid\">\r\n <svg \r\n #copyTooltip=\"matTooltip\" \r\n *ngIf=\"copyable\" \r\n matSuffix \r\n [matTooltip]=\"copied ? 'Copied' : 'Copy'\" \r\n class=\"icon-copy\" \r\n focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\" \r\n (click)=\"onCopyText()\">\r\n <path d=\"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"></path>\r\n </svg>\r\n <span class=\"mr-1\" *ngIf=\"maxlength && !formControl.disabled\" matSuffix>{{formControl.value?.length || 0}}/{{maxlength}}</span>\r\n <ng-container *ngIf=\"sdInputSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdInputSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-icon *ngIf=\"!hideIcon && sdClickIcon?.observers?.length\" (click)=\"onClickIcon($event)\"\r\n class=\"pointer sd-suffix-icon\" matSuffix>\r\n {{icon}}\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{ \"This field is required\" | sdTranslate }}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\" formControl.errors?.maxlength\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Max length' | sdTranslate}} {{maxlength}}\r\n </ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{'Pattern error' | sdTranslate}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{formControl.errors?.customValidator}}</ng-container>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{inlineError}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputTooltipPipe:tooltip\" matSuffix\r\n #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<!-- <sd-popover #error=\"sdPopover\" type=\"danger\" width=\"300px\">\r\n <span *ngIf=\"formControl.errors?.required\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.maxlength\">\r\n {{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </span>\r\n <span *ngIf=\"formControl.errors?.pattern\">\r\n {{'Pattern error' | sdTranslate}}\r\n </span>\r\n <span *ngIf=\"formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </span>\r\n</sd-popover> -->","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}:host ::ng-deep .mat-form-field:hover .icon-copy{opacity:1}:host ::ng-deep .mat-form-field .icon-copy{cursor:pointer;fill:rgba(0,0,0,.5);height:.9em;opacity:0;transition:opacity .2s linear;width:.9em}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"_label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3},"arguments":["label"]}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3},"arguments":["disableErrorMessage"]}]}],"_blurOnEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3},"arguments":["blurOnEnter"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":76,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":84,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3}}]}],"pMinlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":100,"character":3},"arguments":["minlength"]}]}],"pMaxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":105,"character":3},"arguments":["maxlength"]}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":115,"character":3}}]}],"_inlineError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":121,"character":3},"arguments":["inlineError"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":127,"character":3}}]}],"icon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":135,"character":3}}]}],"_hideIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":137,"character":3},"arguments":["hideIcon"]}]}],"sdClickIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":141,"character":3}}]}],"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":142,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":143,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":144,"character":3}}]}],"sdBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":145,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":146,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":147,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":149,"character":3},"arguments":["control"]}]}],"sdInputSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":150,"character":3},"arguments":[{"__symbolic":"reference","name":"SdInputSuffixDirective"}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":151,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":151,"character":16}]}]}],"sdView":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":155,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdViewDefDirective","line":155,"character":16}]}]}],"copyTooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":157,"character":3},"arguments":["copyTooltip"]}]}],"_copyable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":159,"character":3},"arguments":["copyable"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":165,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":165,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":165,"character":26}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":164,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":165,"character":57},{"__symbolic":"reference","module":"@sd-angular/core/utility","name":"SdUtilityService","line":166,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"customInlineErrorValidator":[{"__symbolic":"method"}],"onCopyText":[{"__symbolic":"method"}]}},"backendErrorValidator":{"__symbolic":"function","parameters":["backendErrorMessage"],"value":{"__symbolic":"error","message":"Lambda not supported","line":324,"character":9,"module":"./src/lib/input.component"}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"[touch]"}]}],"members":{"touch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":6,"character":3}}]}],"ref":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":7,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}]}}},"origins":{"SdInputModule":"./src/lib/input.module","SdInputTooltipPipe":"./src/lib/input-tooltip.pipe","SdInputSuffixDirective":"./src/lib/directives/input-suffix.directive","SdInput":"./src/lib/input.component","backendErrorValidator":"./src/lib/input.component","ɵa":"./src/lib/directives/touch.directive"},"importAs":"@sd-angular/core/input"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, ChangeDetectorRef, OnDestroy, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { NgForm, FormGroup } from '@angular/forms';
|
|
2
|
+
import { NgForm, ValidatorFn, FormGroup } from '@angular/forms';
|
|
3
3
|
import { SdInputSuffixDirective } from './directives/input-suffix.directive';
|
|
4
4
|
import { SdFormControl } from '@sd-angular/core/common';
|
|
5
5
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sd-angular/core/common';
|
|
@@ -37,6 +37,8 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
37
37
|
set pMaxlength(val: number);
|
|
38
38
|
set pattern(val: string);
|
|
39
39
|
set validator(validator: (value: any) => string | Promise<string>);
|
|
40
|
+
inlineError: string;
|
|
41
|
+
set _inlineError(val: string);
|
|
40
42
|
set disabled(val: boolean | '');
|
|
41
43
|
icon: string;
|
|
42
44
|
hideIcon: boolean;
|
|
@@ -63,6 +65,7 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
63
65
|
ngAfterViewInit(): void;
|
|
64
66
|
ngOnDestroy(): void;
|
|
65
67
|
reValidate: () => void;
|
|
68
|
+
customInlineErrorValidator(): ValidatorFn;
|
|
66
69
|
onKeyupEnter: () => void;
|
|
67
70
|
onClickIcon: (event: Event) => void;
|
|
68
71
|
onFocus: () => void;
|
|
@@ -72,3 +75,4 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
72
75
|
focus: () => void;
|
|
73
76
|
onCopyText(): void;
|
|
74
77
|
}
|
|
78
|
+
export declare function backendErrorValidator(backendErrorMessage: string): ValidatorFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdInputCurrencyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":21,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":23,"character":4},{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":24,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInputCurrency"},{"__symbolic":"reference","name":"SdInputCurrencyTooltipPipe"}],"exports":[{"__symbolic":"reference","name":"SdInputCurrency"},{"__symbolic":"reference","name":"SdInputCurrencyTooltipPipe"}]}]}],"members":{}},"SdInputCurrencyTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputCurrencyTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInputCurrency":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":25,"character":1},"arguments":[{"selector":"sd-input-currency","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":29,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\" *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\">\r\n <mat-form-field class=\"sd-md\"\r\n [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input currencyMask [options]=\"options\" [formControl]=\"formControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" [required]=\"isRequired\"\r\n autocomplete=\"off\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-error *ngIf=\"formControl.errors?.required && !disableErrorMessage\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern && !disableErrorMessage\">\r\n {{'Pattern error' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator && !disableErrorMessage\">\r\n <strong>{{formControl.errors?.customValidator}}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputCurrencyTooltipPipe:tooltip\"\r\n matSuffix #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n</div>","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3},"arguments":["disableErrorMessage"]}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":68,"character":3}}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":3}}]}],"allowNegative":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}}]}],"decimal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3}}]}],"suffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3}}]}],"thousands":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3}}]}],"nullable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":125,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3}}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":138,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":143,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":149,"character":3}}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":157,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":157,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":158,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":158,"character":16}]}]}],"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":159,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":160,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":161,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":162,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":164,"character":3},"arguments":["control"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":170,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":170,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":170,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":169,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":170,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"SdInputCurrencyModule":"./src/lib/input-currency.module","SdInputCurrencyTooltipPipe":"./src/lib/input-currency-tooltip.pipe","SdInputCurrency":"./src/lib/input-currency.component"},"importAs":"@sd-angular/core/input-currency"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdInputCurrencyModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":13,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":21,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdCommonModule","line":22,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":23,"character":4},{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":24,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInputCurrency"},{"__symbolic":"reference","name":"SdInputCurrencyTooltipPipe"}],"exports":[{"__symbolic":"reference","name":"SdInputCurrency"},{"__symbolic":"reference","name":"SdInputCurrencyTooltipPipe"}]}]}],"members":{}},"SdInputCurrencyTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputCurrencyTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInputCurrency":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":25,"character":1},"arguments":[{"selector":"sd-input-currency","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":29,"character":19},"member":"OnPush"},"template":"<ng-container *ngIf=\"!appearance && sdLabelDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<label *ngIf=\"!appearance && label && !sdLabelDef?.templateRef\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\" *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\">\r\n <mat-form-field class=\"sd-md\"\r\n [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input currencyMask [options]=\"options\" [formControl]=\"formControl\" #control matInput\r\n [placeholder]=\"placeholder || (appearance ? label : '')\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" [required]=\"isRequired\"\r\n autocomplete=\"off\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-error *ngIf=\"formControl.errors?.required && !disableErrorMessage\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern && !disableErrorMessage\">\r\n {{'Pattern error' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator && !disableErrorMessage\">\r\n <strong>{{formControl.errors?.customValidator}}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError\">\r\n <ng-container *ngIf=\"!disableErrorMessage\">{{inlineError}}</ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputCurrencyTooltipPipe:tooltip\"\r\n matSuffix #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n</div>","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}"]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"appearance":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"_disableErrorMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3},"arguments":["disableErrorMessage"]}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":68,"character":3}}]}],"align":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":71,"character":3}}]}],"allowNegative":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}}]}],"decimal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3}}]}],"precision":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":89,"character":3}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3}}]}],"suffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3}}]}],"thousands":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3}}]}],"nullable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":113,"character":3}}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":3}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":125,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":132,"character":3}}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":138,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":143,"character":3}}]}],"_inlineError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":149,"character":3},"arguments":["inlineError"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":155,"character":3}}]}],"sdSuffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":163,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdSuffixDirective","line":163,"character":16}]}]}],"sdLabelDef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":164,"character":3},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"SdLabelDefDirective","line":164,"character":16}]}]}],"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":165,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":166,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":167,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":168,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":170,"character":3},"arguments":["control"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":176,"character":5},"arguments":[{"__symbolic":"reference","module":"@sd-angular/core/common","name":"FORM_CONFIG","line":176,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":176,"character":26}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":175,"character":17},{"__symbolic":"reference","module":"@sd-angular/core/common","name":"IFormConfiguration","line":176,"character":57}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"customInlineErrorValidator":[{"__symbolic":"method"}]}}},"origins":{"SdInputCurrencyModule":"./src/lib/input-currency.module","SdInputCurrencyTooltipPipe":"./src/lib/input-currency-tooltip.pipe","SdInputCurrency":"./src/lib/input-currency.component"},"importAs":"@sd-angular/core/input-currency"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, ChangeDetectorRef, OnDestroy, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { NgForm, FormGroup } from '@angular/forms';
|
|
2
|
+
import { NgForm, ValidatorFn, FormGroup } from '@angular/forms';
|
|
3
3
|
import { IFormConfiguration, SdFormControl } from '@sd-angular/core/common';
|
|
4
4
|
import { SdSuffixDirective } from '@sd-angular/core/common';
|
|
5
5
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
@@ -32,6 +32,8 @@ export declare class SdInputCurrency implements OnDestroy, OnInit, AfterViewInit
|
|
|
32
32
|
set required(val: boolean | '');
|
|
33
33
|
set pattern(val: string);
|
|
34
34
|
set validator(validator: (value: any) => string | Promise<string>);
|
|
35
|
+
inlineError: string;
|
|
36
|
+
set _inlineError(val: string);
|
|
35
37
|
set disabled(val: boolean | '');
|
|
36
38
|
sdSuffix: SdSuffixDirective;
|
|
37
39
|
sdLabelDef: SdLabelDefDirective;
|
|
@@ -47,6 +49,7 @@ export declare class SdInputCurrency implements OnDestroy, OnInit, AfterViewInit
|
|
|
47
49
|
ngAfterViewInit(): void;
|
|
48
50
|
ngOnDestroy(): void;
|
|
49
51
|
reValidate: () => void;
|
|
52
|
+
customInlineErrorValidator(): ValidatorFn;
|
|
50
53
|
onKeyupEnter: () => void;
|
|
51
54
|
onFocus: () => void;
|
|
52
55
|
onBlur: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SdInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":19,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":20,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"}],"exports":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"}]}]}],"members":{}},"SdInputTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInput":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"sd-input","template":"<div class=\"d-flex align-items-center\">\r\n <div class=\"mat-label mr-12 mb-12\" *ngIf=\"leftLabel\" [ngStyle]=\"{'min-width': labelMinWidth}\">{{leftLabel}}</div>\r\n <div class=\"media-body\">\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm'}\" appearance=\"outline\">\r\n <mat-label *ngIf=\"label && !leftLabel\">{{label}}</mat-label>\r\n <input [formControl]=\"formControl\" [type]=\"type\" #control matInput\r\n [placeholder]=\"placeholder || label\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\r\n [required]=\"isRequired\" autocomplete=\"off\">\r\n <span class=\"mr-1\" *ngIf=\"maxlength\" matSuffix>{{formControl.value?.length || 0}}/{{maxlength}}</span>\r\n <mat-icon *ngIf=\"!formControl.disabled && sdClick?.observers?.length\" (click)=\"onClick()\"\r\n class=\"pointer sd-suffix-icon\" matSuffix>\r\n {{icon}}\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.maxlength\">\r\n {{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern\">\r\n {{'Pattern error' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <strong>{{formControl.errors?.customValidator}}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputTooltipPipe:tooltip\" matSuffix\r\n #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n </div>\r\n\r\n</div>","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}"]}]}],"members":{"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"leftLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"labelMinWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":52,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"pMinlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3},"arguments":["minlength"]}]}],"pMaxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3},"arguments":["maxlength"]}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SdInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":19,"character":4},{"__symbolic":"reference","module":"@sd-angular/core/translate","name":"SdTranslateModule","line":20,"character":4}],"declarations":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"}],"exports":[{"__symbolic":"reference","name":"SdInput"},{"__symbolic":"reference","name":"SdInputTooltipPipe"}]}]}],"members":{}},"SdInputTooltipPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":1,"character":1},"arguments":[{"name":"sdInputTooltipPipe"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"SdInput":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"sd-input","template":"<div class=\"d-flex align-items-center\">\r\n <div class=\"mat-label mr-12 mb-12\" *ngIf=\"leftLabel\" [ngStyle]=\"{'min-width': labelMinWidth}\">{{leftLabel}}</div>\r\n <div class=\"media-body\">\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{'sd-form-tooltip':tooltip, 'sd-sm': size === 'sm'}\" appearance=\"outline\">\r\n <mat-label *ngIf=\"label && !leftLabel\">{{label}}</mat-label>\r\n <input [formControl]=\"formControl\" [type]=\"type\" #control matInput\r\n [placeholder]=\"placeholder || label\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\r\n [required]=\"isRequired\" autocomplete=\"off\">\r\n <span class=\"mr-1\" *ngIf=\"maxlength\" matSuffix>{{formControl.value?.length || 0}}/{{maxlength}}</span>\r\n <mat-icon *ngIf=\"!formControl.disabled && sdClick?.observers?.length\" (click)=\"onClick()\"\r\n class=\"pointer sd-suffix-icon\" matSuffix>\r\n {{icon}}\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.maxlength\">\r\n {{'Max length' | sdTranslate}} <strong>{{maxlength}}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.pattern\">\r\n {{'Pattern error' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.customValidator\">\r\n <strong>{{formControl.errors?.customValidator}}</strong>\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl.errors?.inlineError\">\r\n <strong>{{inlineError}}</strong>\r\n </mat-error>\r\n </mat-form-field>\r\n <div *ngIf=\"tooltip\" class=\"sd-tooltip\">\r\n <mat-icon (click)=\"sdTooltip.toggle()\" [matTooltip]=\"formControl.value | sdInputTooltipPipe:tooltip\" matSuffix\r\n #sdTooltip=\"matTooltip\">info</mat-icon>\r\n </div>\r\n </div>\r\n\r\n</div>","styles":[":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}"]}]}],"members":{"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3}}]}],"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"step":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"leftLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"labelMinWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"modelChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":52,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"pMinlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3},"arguments":["minlength"]}]}],"pMaxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3},"arguments":["maxlength"]}]}],"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"validator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":77,"character":3}}]}],"_inlineError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":82,"character":3},"arguments":["inlineError"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":88,"character":3}}]}],"icon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":3}}]}],"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":97,"character":3}}]}],"sdClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":98,"character":3}}]}],"sdChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":99,"character":3}}]}],"sdFocus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":100,"character":3}}]}],"sdFocusForceBlur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":101,"character":3}}]}],"keyupEnter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":102,"character":3}}]}],"control":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":104,"character":3},"arguments":["control"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":107,"character":27},{"__symbolic":"reference","module":"@sd-angular/core/utility","name":"SdCurrencyPipe","line":107,"character":68}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"customInlineErrorValidator":[{"__symbolic":"method"}]}}},"origins":{"SdInputModule":"./src/lib/input.module","SdInputTooltipPipe":"./src/lib/input-tooltip.pipe","SdInput":"./src/lib/input.component"},"importAs":"@sd-angular/core/input-dropdown"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, ChangeDetectorRef, OnDestroy, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { FormControl, NgForm, FormGroup } from '@angular/forms';
|
|
2
|
+
import { FormControl, NgForm, ValidatorFn, FormGroup } from '@angular/forms';
|
|
3
3
|
import { SdCurrencyPipe } from '@sd-angular/core/utility';
|
|
4
4
|
export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
5
5
|
#private;
|
|
@@ -23,6 +23,8 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
23
23
|
set pMaxlength(val: number);
|
|
24
24
|
set pattern(val: string);
|
|
25
25
|
set validator(validator: (value: any) => string | Promise<string>);
|
|
26
|
+
inlineError: string;
|
|
27
|
+
set _inlineError(val: string);
|
|
26
28
|
set disabled(val: boolean | '');
|
|
27
29
|
icon: string;
|
|
28
30
|
tooltip: string | ((inputValue: string) => string);
|
|
@@ -38,6 +40,7 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
|
|
|
38
40
|
ngAfterViewInit(): void;
|
|
39
41
|
ngOnDestroy(): void;
|
|
40
42
|
reValidate: () => void;
|
|
43
|
+
customInlineErrorValidator(): ValidatorFn;
|
|
41
44
|
onKeyupEnter: () => void;
|
|
42
45
|
onClick: () => void;
|
|
43
46
|
onFocus: () => void;
|