@fovestta2/web-angular 1.0.4 → 1.0.6
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/esm2022/lib/add-update-form/add-update-form.component.mjs +83 -26
- package/esm2022/lib/fv-checkbox/fv-checkbox.component.mjs +13 -3
- package/esm2022/lib/fv-controls.module.mjs +22 -4
- package/esm2022/lib/fv-date-field/fv-date-field.component.mjs +13 -3
- package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +67 -6
- package/esm2022/lib/fv-email-field/fv-email-field.component.mjs +123 -0
- package/esm2022/lib/fv-entry-field/fv-entry-field.component.mjs +13 -3
- package/esm2022/lib/fv-esi-field/fv-esi-field.component.mjs +13 -3
- package/esm2022/lib/fv-file-selector/fv-file-selector.component.mjs +13 -3
- package/esm2022/lib/fv-iban-field/fv-iban-field.component.mjs +13 -3
- package/esm2022/lib/fv-ifsc-field/fv-ifsc-field.component.mjs +3 -3
- package/esm2022/lib/fv-image-selector/fv-image-selector.component.mjs +3 -3
- package/esm2022/lib/fv-micr-field/fv-micr-field.component.mjs +3 -3
- package/esm2022/lib/fv-month-year-field/fv-month-year-field.component.mjs +39 -3
- package/esm2022/lib/fv-name-code/fv-name-code.component.mjs +73 -38
- package/esm2022/lib/fv-number-field/fv-number-field.component.mjs +13 -3
- package/esm2022/lib/fv-password-field/fv-password-field.component.mjs +118 -0
- package/esm2022/lib/fv-pf-field/fv-pf-field.component.mjs +46 -4
- package/esm2022/lib/fv-phone-field/fv-phone-field.component.mjs +13 -3
- package/esm2022/lib/fv-radio-group/fv-radio-group.component.mjs +16 -3
- package/esm2022/lib/fv-rich-text-editor/fv-rich-text-editor.component.mjs +4 -4
- package/esm2022/lib/fv-uan-field/fv-uan-field.component.mjs +13 -3
- package/esm2022/lib/query-form/query-form.component.mjs +58 -3
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/fovestta2-web-angular.mjs +874 -248
- package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
- package/lib/add-update-form/add-update-form.component.d.ts +5 -2
- package/lib/fv-checkbox/fv-checkbox.component.d.ts +3 -2
- package/lib/fv-controls.module.d.ts +4 -1
- package/lib/fv-date-field/fv-date-field.component.d.ts +3 -2
- package/lib/fv-dropdown/fv-dropdown.component.d.ts +3 -0
- package/lib/fv-email-field/fv-email-field.component.d.ts +27 -0
- package/lib/fv-entry-field/fv-entry-field.component.d.ts +3 -1
- package/lib/fv-esi-field/fv-esi-field.component.d.ts +3 -2
- package/lib/fv-file-selector/fv-file-selector.component.d.ts +3 -2
- package/lib/fv-iban-field/fv-iban-field.component.d.ts +3 -2
- package/lib/fv-month-year-field/fv-month-year-field.component.d.ts +6 -2
- package/lib/fv-name-code/fv-name-code.component.d.ts +3 -0
- package/lib/fv-number-field/fv-number-field.component.d.ts +3 -2
- package/lib/fv-password-field/fv-password-field.component.d.ts +29 -0
- package/lib/fv-pf-field/fv-pf-field.component.d.ts +4 -2
- package/lib/fv-phone-field/fv-phone-field.component.d.ts +3 -2
- package/lib/fv-radio-group/fv-radio-group.component.d.ts +5 -3
- package/lib/fv-rich-text-editor/fv-rich-text-editor.component.d.ts +1 -1
- package/lib/fv-uan-field/fv-uan-field.component.d.ts +3 -2
- package/lib/query-form/query-form.component.d.ts +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
|
@@ -6,7 +6,6 @@ import * as i2 from '@angular/forms';
|
|
|
6
6
|
import { ReactiveFormsModule, FormControl, NG_VALUE_ACCESSOR, FormsModule, Validators } from '@angular/forms';
|
|
7
7
|
import { Validator } from '@fovestta2/validation-engine';
|
|
8
8
|
import * as i1$1 from '@angular/platform-browser';
|
|
9
|
-
import { Validator as Validator$1 } from '@fovestta/validation-engine';
|
|
10
9
|
import { distinctUntilChanged } from 'rxjs/operators';
|
|
11
10
|
|
|
12
11
|
class FvEntryFieldComponent {
|
|
@@ -46,6 +45,16 @@ class FvEntryFieldComponent {
|
|
|
46
45
|
ngOnDestroy() {
|
|
47
46
|
this.subscription?.unsubscribe();
|
|
48
47
|
}
|
|
48
|
+
ngOnChanges(changes) {
|
|
49
|
+
if (changes['disabled'] && this.control) {
|
|
50
|
+
if (this.disabled) {
|
|
51
|
+
this.control.disable({ emitEvent: false });
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.control.enable({ emitEvent: false });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
49
58
|
validateValue(value) {
|
|
50
59
|
if (!this.schema)
|
|
51
60
|
return;
|
|
@@ -103,11 +112,11 @@ class FvEntryFieldComponent {
|
|
|
103
112
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
104
113
|
}
|
|
105
114
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEntryFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvEntryFieldComponent, isStandalone: true, selector: "fv-entry-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", type: "type", allowAlphabetsOnly: "allowAlphabetsOnly", maxLength: "maxLength" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-entry-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\" [class.fv-label-required]=\"isRequired()\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input [type]=\"type\" [formControl]=\"control\" [placeholder]=\"placeholder\" [
|
|
115
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvEntryFieldComponent, isStandalone: true, selector: "fv-entry-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", type: "type", allowAlphabetsOnly: "allowAlphabetsOnly", maxLength: "maxLength" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-entry-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\" [class.fv-label-required]=\"isRequired()\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input [type]=\"type\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\"\r\n (focus)=\"onFocus($event)\" (input)=\"onInput($event)\" [attr.maxlength]=\"maxLength\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage && control.touched\" [class.fv-input-disabled]=\"disabled\" />\r\n\r\n <span *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-entry-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;height:34px;width:100%;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-input::placeholder{color:#999;opacity:1}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
107
116
|
}
|
|
108
117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEntryFieldComponent, decorators: [{
|
|
109
118
|
type: Component,
|
|
110
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-entry-field', template: "<div class=\"fv-entry-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\" [class.fv-label-required]=\"isRequired()\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input [type]=\"type\" [formControl]=\"control\" [placeholder]=\"placeholder\" [
|
|
119
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-entry-field', template: "<div class=\"fv-entry-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\" [class.fv-label-required]=\"isRequired()\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input [type]=\"type\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\"\r\n (focus)=\"onFocus($event)\" (input)=\"onInput($event)\" [attr.maxlength]=\"maxLength\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage && control.touched\" [class.fv-input-disabled]=\"disabled\" />\r\n\r\n <span *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-entry-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;height:34px;width:100%;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-input::placeholder{color:#999;opacity:1}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"] }]
|
|
111
120
|
}], propDecorators: { label: [{
|
|
112
121
|
type: Input
|
|
113
122
|
}], placeholder: [{
|
|
@@ -168,6 +177,16 @@ class FvDateFieldComponent {
|
|
|
168
177
|
ngOnDestroy() {
|
|
169
178
|
this.subscription?.unsubscribe();
|
|
170
179
|
}
|
|
180
|
+
ngOnChanges(changes) {
|
|
181
|
+
if (changes['disabled'] && this.control) {
|
|
182
|
+
if (this.disabled) {
|
|
183
|
+
this.control.disable({ emitEvent: false });
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
this.control.enable({ emitEvent: false });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
171
190
|
extractConstraintsFromSchema() {
|
|
172
191
|
if (!this.schema?.rules)
|
|
173
192
|
return;
|
|
@@ -225,11 +244,11 @@ class FvDateFieldComponent {
|
|
|
225
244
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
226
245
|
}
|
|
227
246
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDateFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
228
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDateFieldComponent, isStandalone: true, selector: "fv-date-field", inputs: { label: "label", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"date\" [formControl]=\"control\" class=\"fv-input\" [class.error]=\"!!errorMessage\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:
|
|
247
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDateFieldComponent, isStandalone: true, selector: "fv-date-field", inputs: { label: "label", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"date\" [formControl]=\"control\" class=\"fv-input\" [class.error]=\"!!errorMessage\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-date-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;width:100%;height:34px;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
229
248
|
}
|
|
230
249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDateFieldComponent, decorators: [{
|
|
231
250
|
type: Component,
|
|
232
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-date-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"date\" [formControl]=\"control\" class=\"fv-input\" [class.error]=\"!!errorMessage\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:
|
|
251
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-date-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"date\" [formControl]=\"control\" class=\"fv-input\" [class.error]=\"!!errorMessage\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-date-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;width:100%;height:34px;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"] }]
|
|
233
252
|
}], propDecorators: { label: [{
|
|
234
253
|
type: Input
|
|
235
254
|
}], schema: [{
|
|
@@ -264,6 +283,7 @@ class FvMonthYearFieldComponent {
|
|
|
264
283
|
blur = new EventEmitter();
|
|
265
284
|
focus = new EventEmitter();
|
|
266
285
|
errorMessage = null;
|
|
286
|
+
displayValue = '';
|
|
267
287
|
subscription;
|
|
268
288
|
ngOnInit() {
|
|
269
289
|
if (!this.control) {
|
|
@@ -273,15 +293,27 @@ class FvMonthYearFieldComponent {
|
|
|
273
293
|
this.extractConstraintsFromSchema();
|
|
274
294
|
this.subscription = this.control.valueChanges.subscribe((value) => {
|
|
275
295
|
this.validateValue(value);
|
|
296
|
+
this.updateDisplayValue(value);
|
|
276
297
|
this.valueChange.emit(value);
|
|
277
298
|
});
|
|
278
299
|
if (this.control.value) {
|
|
279
300
|
this.validateValue(this.control.value);
|
|
301
|
+
this.updateDisplayValue(this.control.value);
|
|
280
302
|
}
|
|
281
303
|
}
|
|
282
304
|
ngOnDestroy() {
|
|
283
305
|
this.subscription?.unsubscribe();
|
|
284
306
|
}
|
|
307
|
+
ngOnChanges(changes) {
|
|
308
|
+
if (changes['disabled'] && this.control) {
|
|
309
|
+
if (this.disabled) {
|
|
310
|
+
this.control.disable({ emitEvent: false });
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
this.control.enable({ emitEvent: false });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
285
317
|
extractConstraintsFromSchema() {
|
|
286
318
|
if (!this.schema?.rules)
|
|
287
319
|
return;
|
|
@@ -337,12 +369,35 @@ class FvMonthYearFieldComponent {
|
|
|
337
369
|
};
|
|
338
370
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
339
371
|
}
|
|
372
|
+
updateDisplayValue(value) {
|
|
373
|
+
if (!value) {
|
|
374
|
+
this.displayValue = '';
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
const date = new Date(value + '-01'); // Ensure it's treated as YYYY-MM-01
|
|
378
|
+
if (isNaN(date.getTime())) {
|
|
379
|
+
this.displayValue = value;
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
383
|
+
this.displayValue = `${monthNames[date.getMonth()]} ${date.getFullYear()}`;
|
|
384
|
+
}
|
|
385
|
+
openPicker(picker) {
|
|
386
|
+
if (this.disabled || this.readonly)
|
|
387
|
+
return;
|
|
388
|
+
if (picker.showPicker) {
|
|
389
|
+
picker.showPicker();
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
picker.click();
|
|
393
|
+
}
|
|
394
|
+
}
|
|
340
395
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvMonthYearFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvMonthYearFieldComponent, isStandalone: true, selector: "fv-month-year-field", inputs: { label: "label", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvMonthYearFieldComponent, isStandalone: true, selector: "fv-month-year-field", inputs: { label: "label", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\" (click)=\"openPicker(monthPicker)\">\r\n <input type=\"text\" [value]=\"displayValue\" class=\"fv-input\" [class.error]=\"!!errorMessage\"\r\n placeholder=\"Select Month\" readonly />\r\n <input #monthPicker type=\"month\" [formControl]=\"control\" class=\"fv-hidden-picker\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n <span class=\"fv-calendar-icon\">\r\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\r\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\r\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\r\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\r\n </svg>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 35px 5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px;min-width:0;cursor:pointer}.fv-input-wrapper{position:relative;width:100%;cursor:pointer}.fv-hidden-picker{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.fv-calendar-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none;display:flex;align-items:center}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
342
397
|
}
|
|
343
398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvMonthYearFieldComponent, decorators: [{
|
|
344
399
|
type: Component,
|
|
345
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-month-year-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <input type=\"
|
|
400
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-month-year-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\" (click)=\"openPicker(monthPicker)\">\r\n <input type=\"text\" [value]=\"displayValue\" class=\"fv-input\" [class.error]=\"!!errorMessage\"\r\n placeholder=\"Select Month\" readonly />\r\n <input #monthPicker type=\"month\" [formControl]=\"control\" class=\"fv-hidden-picker\" [attr.min]=\"min\"\r\n [attr.max]=\"max\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" />\r\n <span class=\"fv-calendar-icon\">\r\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\r\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\r\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\r\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\r\n </svg>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 35px 5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px;min-width:0;cursor:pointer}.fv-input-wrapper{position:relative;width:100%;cursor:pointer}.fv-hidden-picker{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.fv-calendar-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none;display:flex;align-items:center}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
346
401
|
}], propDecorators: { label: [{
|
|
347
402
|
type: Input
|
|
348
403
|
}], schema: [{
|
|
@@ -400,6 +455,16 @@ class FvNumberFieldComponent {
|
|
|
400
455
|
ngOnDestroy() {
|
|
401
456
|
this.subscription?.unsubscribe();
|
|
402
457
|
}
|
|
458
|
+
ngOnChanges(changes) {
|
|
459
|
+
if (changes['disabled'] && this.control) {
|
|
460
|
+
if (this.disabled) {
|
|
461
|
+
this.control.disable({ emitEvent: false });
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
this.control.enable({ emitEvent: false });
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
403
468
|
validateValue(value) {
|
|
404
469
|
if (!this.schema)
|
|
405
470
|
return;
|
|
@@ -435,11 +500,11 @@ class FvNumberFieldComponent {
|
|
|
435
500
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
436
501
|
}
|
|
437
502
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvNumberFieldComponent, isStandalone: true, selector: "fv-number-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max", step: "step" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-number-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input type=\"number\" [formControl]=\"control\" [placeholder]=\"placeholder\" [
|
|
503
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvNumberFieldComponent, isStandalone: true, selector: "fv-number-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", min: "min", max: "max", step: "step" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-number-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input type=\"number\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [min]=\"min\" [max]=\"max\"\r\n [step]=\"step\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\"\r\n [class.fv-input-disabled]=\"disabled\" />\r\n\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-number-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;height:34px;width:100%;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}.fv-input::-webkit-inner-spin-button,.fv-input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.fv-input[type=number]{-moz-appearance:textfield;appearance:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
439
504
|
}
|
|
440
505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvNumberFieldComponent, decorators: [{
|
|
441
506
|
type: Component,
|
|
442
|
-
args: [{ selector: 'fv-number-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-number-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input type=\"number\" [formControl]=\"control\" [placeholder]=\"placeholder\" [
|
|
507
|
+
args: [{ selector: 'fv-number-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-number-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <input type=\"number\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [min]=\"min\" [max]=\"max\"\r\n [step]=\"step\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\"\r\n [class.fv-input-disabled]=\"disabled\" />\r\n\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-number-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48;display:flex;align-items:center;gap:4px}.fv-required-asterisk{color:#e74c3c;font-weight:700}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;transition:all .2s ease-in-out;background-color:#fff;color:#1f2b41;box-sizing:border-box;height:34px;width:100%;min-width:0}.fv-input:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input:hover:not(:disabled):not(:focus){border-color:#3498db}.fv-input-error{border-color:#dc3545!important}.fv-input-error:focus{box-shadow:0 0 0 3px #dc35451a}.fv-input-disabled{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}.fv-input::-webkit-inner-spin-button,.fv-input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.fv-input[type=number]{-moz-appearance:textfield;appearance:none}\n"] }]
|
|
443
508
|
}], propDecorators: { label: [{
|
|
444
509
|
type: Input
|
|
445
510
|
}], placeholder: [{
|
|
@@ -477,17 +542,27 @@ class FvCheckboxComponent {
|
|
|
477
542
|
console.error('FvCheckbox: control is required');
|
|
478
543
|
}
|
|
479
544
|
}
|
|
545
|
+
ngOnChanges(changes) {
|
|
546
|
+
if (changes['disabled'] && this.control) {
|
|
547
|
+
if (this.disabled) {
|
|
548
|
+
this.control.disable({ emitEvent: false });
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
this.control.enable({ emitEvent: false });
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
480
555
|
onChange(event) {
|
|
481
556
|
const checked = event.target.checked;
|
|
482
557
|
this.control.setValue(checked);
|
|
483
558
|
this.valueChange.emit(checked);
|
|
484
559
|
}
|
|
485
560
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
486
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvCheckboxComponent, isStandalone: true, selector: "fv-checkbox", inputs: { label: "label", control: "control", disabled: "disabled", required: "required" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"fv-checkbox-container\">\r\n <label class=\"fv-checkbox-label\">\r\n <input type=\"checkbox\" [formControl]=\"control\" [disabled]=\"disabled\" (change)=\"onChange($event)\"\r\n class=\"fv-checkbox-input\" />\r\n <span class=\"fv-checkbox-custom\"></span>\r\n <span class=\"fv-checkbox-text\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </span>\r\n </label>\r\n</div>", styles: [".fv-checkbox-container{margin-bottom:12px}.fv-checkbox-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-checkbox-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-checkbox-custom{position:absolute;left:0;top:0;height:
|
|
561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvCheckboxComponent, isStandalone: true, selector: "fv-checkbox", inputs: { label: "label", control: "control", disabled: "disabled", required: "required" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-checkbox-container\">\r\n <label class=\"fv-checkbox-label\">\r\n <input type=\"checkbox\" [formControl]=\"control\" [disabled]=\"disabled\" (change)=\"onChange($event)\"\r\n class=\"fv-checkbox-input\" />\r\n <span class=\"fv-checkbox-custom\"></span>\r\n <span class=\"fv-checkbox-text\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </span>\r\n </label>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-checkbox-container{margin-bottom:12px}.fv-checkbox-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-checkbox-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-checkbox-custom{position:absolute;left:0;top:0;height:18px;width:18px;background-color:#fff;border:1px solid #8CBBA8;border-radius:4px;transition:all .2s}.fv-checkbox-label:hover .fv-checkbox-custom{border-color:#3498db}.fv-checkbox-input:checked~.fv-checkbox-custom{background-color:#3498db;border-color:#3498db}.fv-checkbox-custom:after{content:\"\";position:absolute;display:none;left:5px;top:1px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.fv-checkbox-input:checked~.fv-checkbox-custom:after{display:block}.fv-checkbox-input:disabled~.fv-checkbox-custom{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-checkbox-text{font-size:14px;font-weight:600;color:#151d48}.fv-required-asterisk{color:#e74c3c;margin-left:4px;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
487
562
|
}
|
|
488
563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvCheckboxComponent, decorators: [{
|
|
489
564
|
type: Component,
|
|
490
|
-
args: [{ selector: 'fv-checkbox', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-checkbox-container\">\r\n <label class=\"fv-checkbox-label\">\r\n <input type=\"checkbox\" [formControl]=\"control\" [disabled]=\"disabled\" (change)=\"onChange($event)\"\r\n class=\"fv-checkbox-input\" />\r\n <span class=\"fv-checkbox-custom\"></span>\r\n <span class=\"fv-checkbox-text\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </span>\r\n </label>\r\n</div>", styles: [".fv-checkbox-container{margin-bottom:12px}.fv-checkbox-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-checkbox-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-checkbox-custom{position:absolute;left:0;top:0;height:
|
|
565
|
+
args: [{ selector: 'fv-checkbox', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-checkbox-container\">\r\n <label class=\"fv-checkbox-label\">\r\n <input type=\"checkbox\" [formControl]=\"control\" [disabled]=\"disabled\" (change)=\"onChange($event)\"\r\n class=\"fv-checkbox-input\" />\r\n <span class=\"fv-checkbox-custom\"></span>\r\n <span class=\"fv-checkbox-text\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </span>\r\n </label>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-checkbox-container{margin-bottom:12px}.fv-checkbox-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-checkbox-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-checkbox-custom{position:absolute;left:0;top:0;height:18px;width:18px;background-color:#fff;border:1px solid #8CBBA8;border-radius:4px;transition:all .2s}.fv-checkbox-label:hover .fv-checkbox-custom{border-color:#3498db}.fv-checkbox-input:checked~.fv-checkbox-custom{background-color:#3498db;border-color:#3498db}.fv-checkbox-custom:after{content:\"\";position:absolute;display:none;left:5px;top:1px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.fv-checkbox-input:checked~.fv-checkbox-custom:after{display:block}.fv-checkbox-input:disabled~.fv-checkbox-custom{background-color:#ecf0f1;cursor:not-allowed;opacity:.6}.fv-checkbox-text{font-size:14px;font-weight:600;color:#151d48}.fv-required-asterisk{color:#e74c3c;margin-left:4px;font-weight:700}\n"] }]
|
|
491
566
|
}], propDecorators: { label: [{
|
|
492
567
|
type: Input
|
|
493
568
|
}], control: [{
|
|
@@ -507,12 +582,23 @@ class FvRadioGroupComponent {
|
|
|
507
582
|
disabled = false;
|
|
508
583
|
required = false;
|
|
509
584
|
name = `fv-radio-${Math.random().toString(36).substr(2, 9)}`;
|
|
585
|
+
layout = 'vertical';
|
|
510
586
|
valueChange = new EventEmitter();
|
|
511
587
|
ngOnInit() {
|
|
512
588
|
if (!this.control) {
|
|
513
589
|
console.error('FvRadioGroup: control is required');
|
|
514
590
|
}
|
|
515
591
|
}
|
|
592
|
+
ngOnChanges(changes) {
|
|
593
|
+
if (changes['disabled'] && this.control) {
|
|
594
|
+
if (this.disabled) {
|
|
595
|
+
this.control.disable({ emitEvent: false });
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
this.control.enable({ emitEvent: false });
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
516
602
|
onChange(value) {
|
|
517
603
|
this.control.setValue(value);
|
|
518
604
|
this.valueChange.emit(value);
|
|
@@ -521,11 +607,11 @@ class FvRadioGroupComponent {
|
|
|
521
607
|
return this.control.value === value;
|
|
522
608
|
}
|
|
523
609
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
524
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvRadioGroupComponent, isStandalone: true, selector: "fv-radio-group", inputs: { label: "label", control: "control", options: "options", disabled: "disabled", required: "required", name: "name" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"fv-radio-group-container\">\r\n <label *ngIf=\"label\" class=\"fv-group-label\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n
|
|
610
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvRadioGroupComponent, isStandalone: true, selector: "fv-radio-group", inputs: { label: "label", control: "control", options: "options", disabled: "disabled", required: "required", name: "name", layout: "layout" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-radio-group-container\">\r\n <label *ngIf=\"label\" class=\"fv-group-label\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-radio-options\" [class.horizontal]=\"layout === 'horizontal'\" [class.vertical]=\"layout === 'vertical'\">\r\n <label *ngFor=\"let option of options\" class=\"fv-radio-label\"\r\n [class.fv-radio-disabled]=\"disabled || option.disabled\">\r\n <input type=\"radio\" [name]=\"name\" [value]=\"option.value\" [checked]=\"isSelected(option.value)\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onChange(option.value)\" class=\"fv-radio-input\" />\r\n <span class=\"fv-radio-custom\"></span>\r\n <span class=\"fv-radio-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-radio-group-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-group-label{display:block;margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48}.fv-required-asterisk{color:#e74c3c;margin-left:4px;font-weight:700}.fv-radio-options{display:flex;gap:12px}.fv-radio-options.vertical{flex-direction:column}.fv-radio-options.horizontal{flex-direction:row;flex-wrap:wrap;gap:24px}.fv-radio-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-radio-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-radio-custom{position:absolute;left:0;top:0;height:20px;width:20px;background-color:#fff;border:1px solid #8CBBA8;border-radius:50%;transition:all .2s;box-sizing:border-box}.fv-radio-label:hover .fv-radio-custom{border-color:#006aff}.fv-radio-input:checked~.fv-radio-custom{border-color:#006aff;border-width:1px}.fv-radio-custom:after{content:\"\";position:absolute;display:none;top:50%;left:50%;transform:translate(-50%,-50%);width:12px;height:12px;border-radius:50%;background:#006aff}.fv-radio-input:checked~.fv-radio-custom:after{display:block}.fv-radio-disabled{opacity:.6;cursor:not-allowed}.fv-radio-disabled .fv-radio-custom{background-color:#ecf0f1}.fv-radio-text{font-size:14px;font-weight:400;color:#1f2b41}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
525
611
|
}
|
|
526
612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvRadioGroupComponent, decorators: [{
|
|
527
613
|
type: Component,
|
|
528
|
-
args: [{ selector: 'fv-radio-group', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-radio-group-container\">\r\n <label *ngIf=\"label\" class=\"fv-group-label\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n
|
|
614
|
+
args: [{ selector: 'fv-radio-group', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-radio-group-container\">\r\n <label *ngIf=\"label\" class=\"fv-group-label\">\r\n {{ label }}\r\n <span *ngIf=\"required\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-radio-options\" [class.horizontal]=\"layout === 'horizontal'\" [class.vertical]=\"layout === 'vertical'\">\r\n <label *ngFor=\"let option of options\" class=\"fv-radio-label\"\r\n [class.fv-radio-disabled]=\"disabled || option.disabled\">\r\n <input type=\"radio\" [name]=\"name\" [value]=\"option.value\" [checked]=\"isSelected(option.value)\"\r\n [disabled]=\"disabled || option.disabled\" (change)=\"onChange(option.value)\" class=\"fv-radio-input\" />\r\n <span class=\"fv-radio-custom\"></span>\r\n <span class=\"fv-radio-text\">{{ option.label }}</span>\r\n </label>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-radio-group-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-group-label{display:block;margin-bottom:6px;font-size:14px;font-weight:600;color:#151d48}.fv-required-asterisk{color:#e74c3c;margin-left:4px;font-weight:700}.fv-radio-options{display:flex;gap:12px}.fv-radio-options.vertical{flex-direction:column}.fv-radio-options.horizontal{flex-direction:row;flex-wrap:wrap;gap:24px}.fv-radio-label{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;padding-left:32px;min-height:24px}.fv-radio-input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.fv-radio-custom{position:absolute;left:0;top:0;height:20px;width:20px;background-color:#fff;border:1px solid #8CBBA8;border-radius:50%;transition:all .2s;box-sizing:border-box}.fv-radio-label:hover .fv-radio-custom{border-color:#006aff}.fv-radio-input:checked~.fv-radio-custom{border-color:#006aff;border-width:1px}.fv-radio-custom:after{content:\"\";position:absolute;display:none;top:50%;left:50%;transform:translate(-50%,-50%);width:12px;height:12px;border-radius:50%;background:#006aff}.fv-radio-input:checked~.fv-radio-custom:after{display:block}.fv-radio-disabled{opacity:.6;cursor:not-allowed}.fv-radio-disabled .fv-radio-custom{background-color:#ecf0f1}.fv-radio-text{font-size:14px;font-weight:400;color:#1f2b41}\n"] }]
|
|
529
615
|
}], propDecorators: { label: [{
|
|
530
616
|
type: Input
|
|
531
617
|
}], control: [{
|
|
@@ -538,6 +624,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
538
624
|
type: Input
|
|
539
625
|
}], name: [{
|
|
540
626
|
type: Input
|
|
627
|
+
}], layout: [{
|
|
628
|
+
type: Input
|
|
541
629
|
}], valueChange: [{
|
|
542
630
|
type: Output
|
|
543
631
|
}] } });
|
|
@@ -559,6 +647,7 @@ class FvDropdownComponent {
|
|
|
559
647
|
subscription;
|
|
560
648
|
searchControl = new FormControl('');
|
|
561
649
|
filteredOptions = [];
|
|
650
|
+
highlightedIndex = -1;
|
|
562
651
|
constructor(el) {
|
|
563
652
|
this.el = el;
|
|
564
653
|
}
|
|
@@ -633,10 +722,12 @@ class FvDropdownComponent {
|
|
|
633
722
|
filterOptions(term) {
|
|
634
723
|
if (!term) {
|
|
635
724
|
this.filteredOptions = this.options;
|
|
636
|
-
return;
|
|
637
725
|
}
|
|
638
|
-
|
|
639
|
-
|
|
726
|
+
else {
|
|
727
|
+
const lower = term.toLowerCase();
|
|
728
|
+
this.filteredOptions = this.options.filter(opt => opt.label.toLowerCase().includes(lower));
|
|
729
|
+
}
|
|
730
|
+
this.highlightedIndex = this.filteredOptions.length === 1 ? 0 : -1;
|
|
640
731
|
}
|
|
641
732
|
toggleDropdown() {
|
|
642
733
|
if (!this.disabled) {
|
|
@@ -654,6 +745,7 @@ class FvDropdownComponent {
|
|
|
654
745
|
this.focus.emit();
|
|
655
746
|
// Filter based on current text, do not reset blindly
|
|
656
747
|
this.filterOptions(this.searchControl.value || '');
|
|
748
|
+
this.highlightedIndex = this.filteredOptions.length === 1 ? 0 : -1;
|
|
657
749
|
}
|
|
658
750
|
}
|
|
659
751
|
onContainerClick(event) {
|
|
@@ -670,6 +762,7 @@ class FvDropdownComponent {
|
|
|
670
762
|
}
|
|
671
763
|
closeDropdown() {
|
|
672
764
|
this.isOpen = false;
|
|
765
|
+
this.highlightedIndex = -1;
|
|
673
766
|
// Restore label
|
|
674
767
|
const selected = this.options.find(opt => opt.value === this.control.value);
|
|
675
768
|
if (selected) {
|
|
@@ -681,12 +774,65 @@ class FvDropdownComponent {
|
|
|
681
774
|
}
|
|
682
775
|
}
|
|
683
776
|
selectOption(option) {
|
|
777
|
+
if (!option)
|
|
778
|
+
return;
|
|
684
779
|
this.control.setValue(option.value);
|
|
685
780
|
this.searchControl.setValue(option.label, { emitEvent: false });
|
|
686
781
|
this.isOpen = false;
|
|
782
|
+
this.highlightedIndex = -1;
|
|
687
783
|
this.searchInput.nativeElement.blur(); // Remove focus from input
|
|
688
784
|
this.blur.emit();
|
|
689
785
|
}
|
|
786
|
+
onKeyDown(event) {
|
|
787
|
+
if (!this.isOpen && (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter')) {
|
|
788
|
+
this.openDropdown();
|
|
789
|
+
event.preventDefault();
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
if (!this.isOpen)
|
|
793
|
+
return;
|
|
794
|
+
switch (event.key) {
|
|
795
|
+
case 'ArrowDown':
|
|
796
|
+
event.preventDefault();
|
|
797
|
+
this.highlightedIndex = (this.highlightedIndex + 1) % this.filteredOptions.length;
|
|
798
|
+
this.scrollToHighlighted();
|
|
799
|
+
break;
|
|
800
|
+
case 'ArrowUp':
|
|
801
|
+
event.preventDefault();
|
|
802
|
+
this.highlightedIndex = (this.highlightedIndex - 1 + this.filteredOptions.length) % this.filteredOptions.length;
|
|
803
|
+
this.scrollToHighlighted();
|
|
804
|
+
break;
|
|
805
|
+
case 'Enter':
|
|
806
|
+
event.preventDefault();
|
|
807
|
+
if (this.filteredOptions.length === 1) {
|
|
808
|
+
this.selectOption(this.filteredOptions[0]);
|
|
809
|
+
}
|
|
810
|
+
else if (this.highlightedIndex >= 0 && this.highlightedIndex < this.filteredOptions.length) {
|
|
811
|
+
this.selectOption(this.filteredOptions[this.highlightedIndex]);
|
|
812
|
+
}
|
|
813
|
+
break;
|
|
814
|
+
case 'Escape':
|
|
815
|
+
this.closeDropdown();
|
|
816
|
+
break;
|
|
817
|
+
case 'Tab':
|
|
818
|
+
this.closeDropdown();
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
scrollToHighlighted() {
|
|
823
|
+
const list = document.querySelector('.fv-dropdown-options');
|
|
824
|
+
const item = document.querySelectorAll('.fv-dropdown-option')[this.highlightedIndex];
|
|
825
|
+
if (list && item) {
|
|
826
|
+
const listRect = list.getBoundingClientRect();
|
|
827
|
+
const itemRect = item.getBoundingClientRect();
|
|
828
|
+
if (itemRect.bottom > listRect.bottom) {
|
|
829
|
+
list.scrollTop += (itemRect.bottom - listRect.bottom);
|
|
830
|
+
}
|
|
831
|
+
else if (itemRect.top < listRect.top) {
|
|
832
|
+
list.scrollTop -= (listRect.top - itemRect.top);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
}
|
|
690
836
|
onBlur() {
|
|
691
837
|
// Validation handled on closeDropdown
|
|
692
838
|
}
|
|
@@ -724,11 +870,11 @@ class FvDropdownComponent {
|
|
|
724
870
|
return option.value === this.control?.value;
|
|
725
871
|
}
|
|
726
872
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
727
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDropdownComponent, isStandalone: true, selector: "fv-dropdown", inputs: { label: "label", placeholder: "placeholder", options: "options", schema: "schema", control: "control", disabled: "disabled" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-dropdown-container\">\r\n <label *ngIf=\"label\" class=\"fv-dropdown-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-dropdown-wrapper\">\r\n <div class=\"fv-dropdown\" [class.fv-dropdown-error]=\"errorMessage\" [class.fv-dropdown-disabled]=\"disabled\"\r\n [class.fv-dropdown-open]=\"isOpen\" (click)=\"onContainerClick($event)\">\r\n <input #searchInput type=\"text\" class=\"fv-dropdown-input\" [formControl]=\"searchControl\"\r\n [placeholder]=\"placeholder\" (focus)=\"onInputFocus()\" (click)=\"$event.stopPropagation()\"\r\n autocomplete=\"off\">\r\n <span class=\"fv-dropdown-arrow\" [class.arrow-up]=\"isOpen\" (click)=\"toggleDropdown()\">\u25BC</span>\r\n </div>\r\n\r\n <div *ngIf=\"isOpen\" class=\"fv-dropdown-options\">\r\n <div *ngFor=\"let option of filteredOptions\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"fv-dropdown-option fv-no-results\">\r\n No options found\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-dropdown-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-dropdown-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-dropdown-label{font-size:14px;font-weight:
|
|
873
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDropdownComponent, isStandalone: true, selector: "fv-dropdown", inputs: { label: "label", placeholder: "placeholder", options: "options", schema: "schema", control: "control", disabled: "disabled" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, host: { listeners: { "keydown": "onKeyDown($event)", "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-dropdown-container\">\r\n <label *ngIf=\"label\" class=\"fv-dropdown-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-dropdown-wrapper\">\r\n <div class=\"fv-dropdown\" [class.fv-dropdown-error]=\"errorMessage\" [class.fv-dropdown-disabled]=\"disabled\"\r\n [class.fv-dropdown-open]=\"isOpen\" (click)=\"onContainerClick($event)\">\r\n <input #searchInput type=\"text\" class=\"fv-dropdown-input\" [formControl]=\"searchControl\"\r\n [placeholder]=\"placeholder\" (focus)=\"onInputFocus()\" (click)=\"$event.stopPropagation()\"\r\n autocomplete=\"off\">\r\n <span class=\"fv-dropdown-arrow\" [class.arrow-up]=\"isOpen\" (click)=\"toggleDropdown()\">\u25BC</span>\r\n </div>\r\n\r\n <div *ngIf=\"isOpen\" class=\"fv-dropdown-options\">\r\n <div *ngFor=\"let option of filteredOptions; let i = index\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\"\r\n [class.fv-dropdown-option-highlighted]=\"i === highlightedIndex\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"fv-dropdown-option fv-no-results\">\r\n No options found\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-dropdown-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.material-icons{font-family:Material Icons!important}.fv-dropdown-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-dropdown-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-dropdown-wrapper{position:relative}.fv-dropdown{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:border-color .2s;outline:none;font-size:14px;font-weight:400;color:#1f2b41;box-sizing:border-box;height:34px}.fv-dropdown:hover:not(.fv-dropdown-disabled){border-color:#3498db}.fv-dropdown:focus-within:not(.fv-dropdown-disabled){border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-dropdown-error{border-color:#dc3545!important}.fv-dropdown-disabled{background-color:#ecf0f1;opacity:.6;cursor:not-allowed}.fv-dropdown-open{border-color:#3498db}.fv-dropdown-selected{font-size:14px;font-weight:400;color:#1f2b41;flex:1}.fv-dropdown-placeholder{color:#999}.fv-dropdown-arrow{font-size:10px;color:#666;margin-left:8px;margin-right:5px;transition:transform .2s}.arrow-up{transform:rotate(180deg)}.fv-dropdown-options{position:absolute;top:100%;left:0;right:0;margin-top:4px;background-color:#fff;border:1px solid #cccccc;border-radius:4px;max-height:300px;overflow-y:auto;z-index:1000;box-shadow:0 4px 6px #0000001a}.fv-dropdown-option{padding:12px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s;border-bottom:1px solid #eeeeee}.fv-dropdown-option:last-child{border-bottom:none}.fv-dropdown-option:hover,.fv-dropdown-option-highlighted{background-color:#f8f9fa}.fv-dropdown-option-selected{background-color:#e7f3ff;color:#007bff;font-weight:600}.fv-dropdown-error-message{margin-top:4px;font-size:12px;color:#dc3545}.fv-dropdown-input{border:none!important;outline:none!important;box-shadow:none!important;background:transparent;flex:1;width:100%;min-width:0;appearance:none;-webkit-appearance:none;font-size:14px;color:#1f2b41;padding:0;margin:0;cursor:text;z-index:2;position:relative;pointer-events:auto;height:100%}.fv-dropdown-input::placeholder{color:#999}.fv-no-results{color:#999;font-style:italic;cursor:default;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
728
874
|
}
|
|
729
875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDropdownComponent, decorators: [{
|
|
730
876
|
type: Component,
|
|
731
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-dropdown', template: "<div class=\"fv-dropdown-container\">\r\n <label *ngIf=\"label\" class=\"fv-dropdown-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-dropdown-wrapper\">\r\n <div class=\"fv-dropdown\" [class.fv-dropdown-error]=\"errorMessage\" [class.fv-dropdown-disabled]=\"disabled\"\r\n [class.fv-dropdown-open]=\"isOpen\" (click)=\"onContainerClick($event)\">\r\n <input #searchInput type=\"text\" class=\"fv-dropdown-input\" [formControl]=\"searchControl\"\r\n [placeholder]=\"placeholder\" (focus)=\"onInputFocus()\" (click)=\"$event.stopPropagation()\"\r\n autocomplete=\"off\">\r\n <span class=\"fv-dropdown-arrow\" [class.arrow-up]=\"isOpen\" (click)=\"toggleDropdown()\">\u25BC</span>\r\n </div>\r\n\r\n <div *ngIf=\"isOpen\" class=\"fv-dropdown-options\">\r\n <div *ngFor=\"let option of filteredOptions\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"fv-dropdown-option fv-no-results\">\r\n No options found\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-dropdown-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-dropdown-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-dropdown-label{font-size:14px;font-weight:
|
|
877
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-dropdown', template: "<div class=\"fv-dropdown-container\">\r\n <label *ngIf=\"label\" class=\"fv-dropdown-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-dropdown-wrapper\">\r\n <div class=\"fv-dropdown\" [class.fv-dropdown-error]=\"errorMessage\" [class.fv-dropdown-disabled]=\"disabled\"\r\n [class.fv-dropdown-open]=\"isOpen\" (click)=\"onContainerClick($event)\">\r\n <input #searchInput type=\"text\" class=\"fv-dropdown-input\" [formControl]=\"searchControl\"\r\n [placeholder]=\"placeholder\" (focus)=\"onInputFocus()\" (click)=\"$event.stopPropagation()\"\r\n autocomplete=\"off\">\r\n <span class=\"fv-dropdown-arrow\" [class.arrow-up]=\"isOpen\" (click)=\"toggleDropdown()\">\u25BC</span>\r\n </div>\r\n\r\n <div *ngIf=\"isOpen\" class=\"fv-dropdown-options\">\r\n <div *ngFor=\"let option of filteredOptions; let i = index\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\"\r\n [class.fv-dropdown-option-highlighted]=\"i === highlightedIndex\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0\" class=\"fv-dropdown-option fv-no-results\">\r\n No options found\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-dropdown-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.material-icons{font-family:Material Icons!important}.fv-dropdown-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-dropdown-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-dropdown-wrapper{position:relative}.fv-dropdown{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;background-color:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:border-color .2s;outline:none;font-size:14px;font-weight:400;color:#1f2b41;box-sizing:border-box;height:34px}.fv-dropdown:hover:not(.fv-dropdown-disabled){border-color:#3498db}.fv-dropdown:focus-within:not(.fv-dropdown-disabled){border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-dropdown-error{border-color:#dc3545!important}.fv-dropdown-disabled{background-color:#ecf0f1;opacity:.6;cursor:not-allowed}.fv-dropdown-open{border-color:#3498db}.fv-dropdown-selected{font-size:14px;font-weight:400;color:#1f2b41;flex:1}.fv-dropdown-placeholder{color:#999}.fv-dropdown-arrow{font-size:10px;color:#666;margin-left:8px;margin-right:5px;transition:transform .2s}.arrow-up{transform:rotate(180deg)}.fv-dropdown-options{position:absolute;top:100%;left:0;right:0;margin-top:4px;background-color:#fff;border:1px solid #cccccc;border-radius:4px;max-height:300px;overflow-y:auto;z-index:1000;box-shadow:0 4px 6px #0000001a}.fv-dropdown-option{padding:12px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s;border-bottom:1px solid #eeeeee}.fv-dropdown-option:last-child{border-bottom:none}.fv-dropdown-option:hover,.fv-dropdown-option-highlighted{background-color:#f8f9fa}.fv-dropdown-option-selected{background-color:#e7f3ff;color:#007bff;font-weight:600}.fv-dropdown-error-message{margin-top:4px;font-size:12px;color:#dc3545}.fv-dropdown-input{border:none!important;outline:none!important;box-shadow:none!important;background:transparent;flex:1;width:100%;min-width:0;appearance:none;-webkit-appearance:none;font-size:14px;color:#1f2b41;padding:0;margin:0;cursor:text;z-index:2;position:relative;pointer-events:auto;height:100%}.fv-dropdown-input::placeholder{color:#999}.fv-no-results{color:#999;font-style:italic;cursor:default;text-align:center}\n"] }]
|
|
732
878
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { label: [{
|
|
733
879
|
type: Input
|
|
734
880
|
}], placeholder: [{
|
|
@@ -750,6 +896,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
750
896
|
}], searchInput: [{
|
|
751
897
|
type: ViewChild,
|
|
752
898
|
args: ['searchInput']
|
|
899
|
+
}], onKeyDown: [{
|
|
900
|
+
type: HostListener,
|
|
901
|
+
args: ['keydown', ['$event']]
|
|
753
902
|
}], onClickOutside: [{
|
|
754
903
|
type: HostListener,
|
|
755
904
|
args: ['document:click', ['$event']]
|
|
@@ -792,6 +941,16 @@ class FvFileSelectorComponent {
|
|
|
792
941
|
ngOnDestroy() {
|
|
793
942
|
this.subscription?.unsubscribe();
|
|
794
943
|
}
|
|
944
|
+
ngOnChanges(changes) {
|
|
945
|
+
if (changes['disabled'] && this.control) {
|
|
946
|
+
if (this.disabled) {
|
|
947
|
+
this.control.disable({ emitEvent: false });
|
|
948
|
+
}
|
|
949
|
+
else {
|
|
950
|
+
this.control.enable({ emitEvent: false });
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
795
954
|
validateValue(value) {
|
|
796
955
|
if (!this.schema)
|
|
797
956
|
return;
|
|
@@ -860,11 +1019,11 @@ class FvFileSelectorComponent {
|
|
|
860
1019
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
861
1020
|
}
|
|
862
1021
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvFileSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
863
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvFileSelectorComponent, isStandalone: true, selector: "fv-file-selector", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", accept: "accept", maxSize: "maxSize" }, outputs: { valueChange: "valueChange", blur: "blur" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"fv-file-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-file-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #fileInput type=\"file\" [accept]=\"accept\" (change)=\"onFileSelected($event)\" style=\"display: none\" />\r\n\r\n <button type=\"button\" class=\"fv-file-selector-button\" [class.fv-file-selector-button-error]=\"errorMessage\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n {{ placeholder }}\r\n </button>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-file-info\">\r\n <div class=\"fv-file-details\">\r\n <div class=\"fv-file-name\">\uD83D\uDCC4 {{ selectedFile.name }}</div>\r\n <div class=\"fv-file-size\">{{ formatFileSize(selectedFile.size) }}</div>\r\n </div>\r\n <button type=\"button\" class=\"fv-file-remove\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n \u2715\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-file-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-file-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-file-selector-label{font-size:14px;font-weight:
|
|
1022
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvFileSelectorComponent, isStandalone: true, selector: "fv-file-selector", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", accept: "accept", maxSize: "maxSize" }, outputs: { valueChange: "valueChange", blur: "blur" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-file-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-file-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #fileInput type=\"file\" [accept]=\"accept\" (change)=\"onFileSelected($event)\" style=\"display: none\" />\r\n\r\n <button type=\"button\" class=\"fv-file-selector-button\" [class.fv-file-selector-button-error]=\"errorMessage\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n {{ placeholder }}\r\n </button>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-file-info\">\r\n <div class=\"fv-file-details\">\r\n <div class=\"fv-file-name\">\uD83D\uDCC4 {{ selectedFile.name }}</div>\r\n <div class=\"fv-file-size\">{{ formatFileSize(selectedFile.size) }}</div>\r\n </div>\r\n <button type=\"button\" class=\"fv-file-remove\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n \u2715\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-file-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-file-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-file-selector-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-file-selector-button{padding:8px 16px;border:1px solid #3498db;border-radius:8px;background-color:#3498db;color:#fff;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s,border-color .2s;text-align:center}.fv-file-selector-button:hover:not(:disabled){background-color:#2980b9;border-color:#2980b9}.fv-file-selector-button-error{border-color:#e74c3c;background-color:#e74c3c}.fv-file-selector-button-error:hover:not(:disabled){background-color:#c0392b;border-color:#c0392b}.fv-file-selector-button-disabled{background-color:#ecf0f1;border-color:#ecf0f1;color:#7f8c8d;opacity:.6;cursor:not-allowed}.fv-file-info{display:flex;align-items:center;margin-top:8px;padding:10px;background-color:#f8f9fa;border:1px solid #8CBBA8;border-radius:8px}.fv-file-details{flex:1}.fv-file-name{font-size:14px;color:#1f2b41;margin-bottom:4px;word-break:break-all}.fv-file-size{font-size:12px;color:#6c757d}.fv-file-remove{padding:4px 8px;margin-left:8px;background:none;border:none;font-size:18px;color:#e74c3c;font-weight:700;cursor:pointer;transition:color .2s}.fv-file-remove:hover:not(:disabled){color:#c0392b}.fv-file-remove:disabled{opacity:.5;cursor:not-allowed}.fv-file-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
864
1023
|
}
|
|
865
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvFileSelectorComponent, decorators: [{
|
|
866
1025
|
type: Component,
|
|
867
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-file-selector', template: "<div class=\"fv-file-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-file-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #fileInput type=\"file\" [accept]=\"accept\" (change)=\"onFileSelected($event)\" style=\"display: none\" />\r\n\r\n <button type=\"button\" class=\"fv-file-selector-button\" [class.fv-file-selector-button-error]=\"errorMessage\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n {{ placeholder }}\r\n </button>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-file-info\">\r\n <div class=\"fv-file-details\">\r\n <div class=\"fv-file-name\">\uD83D\uDCC4 {{ selectedFile.name }}</div>\r\n <div class=\"fv-file-size\">{{ formatFileSize(selectedFile.size) }}</div>\r\n </div>\r\n <button type=\"button\" class=\"fv-file-remove\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n \u2715\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-file-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-file-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-file-selector-label{font-size:14px;font-weight:
|
|
1026
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-file-selector', template: "<div class=\"fv-file-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-file-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #fileInput type=\"file\" [accept]=\"accept\" (change)=\"onFileSelected($event)\" style=\"display: none\" />\r\n\r\n <button type=\"button\" class=\"fv-file-selector-button\" [class.fv-file-selector-button-error]=\"errorMessage\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n {{ placeholder }}\r\n </button>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-file-info\">\r\n <div class=\"fv-file-details\">\r\n <div class=\"fv-file-name\">\uD83D\uDCC4 {{ selectedFile.name }}</div>\r\n <div class=\"fv-file-size\">{{ formatFileSize(selectedFile.size) }}</div>\r\n </div>\r\n <button type=\"button\" class=\"fv-file-remove\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n \u2715\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-file-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-file-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-file-selector-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-file-selector-button{padding:8px 16px;border:1px solid #3498db;border-radius:8px;background-color:#3498db;color:#fff;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s,border-color .2s;text-align:center}.fv-file-selector-button:hover:not(:disabled){background-color:#2980b9;border-color:#2980b9}.fv-file-selector-button-error{border-color:#e74c3c;background-color:#e74c3c}.fv-file-selector-button-error:hover:not(:disabled){background-color:#c0392b;border-color:#c0392b}.fv-file-selector-button-disabled{background-color:#ecf0f1;border-color:#ecf0f1;color:#7f8c8d;opacity:.6;cursor:not-allowed}.fv-file-info{display:flex;align-items:center;margin-top:8px;padding:10px;background-color:#f8f9fa;border:1px solid #8CBBA8;border-radius:8px}.fv-file-details{flex:1}.fv-file-name{font-size:14px;color:#1f2b41;margin-bottom:4px;word-break:break-all}.fv-file-size{font-size:12px;color:#6c757d}.fv-file-remove{padding:4px 8px;margin-left:8px;background:none;border:none;font-size:18px;color:#e74c3c;font-weight:700;cursor:pointer;transition:color .2s}.fv-file-remove:hover:not(:disabled){color:#c0392b}.fv-file-remove:disabled{opacity:.5;cursor:not-allowed}.fv-file-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
868
1027
|
}], propDecorators: { label: [{
|
|
869
1028
|
type: Input
|
|
870
1029
|
}], placeholder: [{
|
|
@@ -1011,11 +1170,11 @@ class FvImageSelectorComponent {
|
|
|
1011
1170
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
1012
1171
|
}
|
|
1013
1172
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvImageSelectorComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1014
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvImageSelectorComponent, isStandalone: true, selector: "fv-image-selector", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", maxSize: "maxSize" }, outputs: { valueChange: "valueChange", blur: "blur" }, viewQueries: [{ propertyName: "imageInput", first: true, predicate: ["imageInput"], descendants: true }], ngImport: i0, template: "<div class=\"fv-image-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-image-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #imageInput type=\"file\" accept=\"image/*\" (change)=\"onImageSelected($event)\" style=\"display: none\" />\r\n\r\n <div *ngIf=\"!selectedImage; else previewTemplate\">\r\n <button type=\"button\" class=\"fv-image-selector-button\" [class.fv-image-selector-button-error]=\"errorMessage\"\r\n [class.fv-image-selector-button-disabled]=\"disabled\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n \uD83D\uDCF7 {{ placeholder }}\r\n </button>\r\n </div>\r\n\r\n <ng-template #previewTemplate>\r\n <div class=\"fv-image-preview-container\">\r\n <img [src]=\"selectedImage!.url\" class=\"fv-image-preview\" alt=\"Selected image\" />\r\n <div class=\"fv-image-actions\">\r\n <button type=\"button\" class=\"fv-image-change-button\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Change\r\n </button>\r\n <button type=\"button\" class=\"fv-image-remove-button\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n Remove\r\n </button>\r\n </div>\r\n <div class=\"fv-image-info\">\r\n {{ selectedImage!.width }} \u00D7 {{ selectedImage!.height }} \u2022\r\n {{ formatFileSize(selectedImage!.size) }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-image-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-image-selector-label{font-size:14px;font-weight:
|
|
1173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvImageSelectorComponent, isStandalone: true, selector: "fv-image-selector", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", maxSize: "maxSize" }, outputs: { valueChange: "valueChange", blur: "blur" }, viewQueries: [{ propertyName: "imageInput", first: true, predicate: ["imageInput"], descendants: true }], ngImport: i0, template: "<div class=\"fv-image-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-image-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #imageInput type=\"file\" accept=\"image/*\" (change)=\"onImageSelected($event)\" style=\"display: none\" />\r\n\r\n <div *ngIf=\"!selectedImage; else previewTemplate\">\r\n <button type=\"button\" class=\"fv-image-selector-button\" [class.fv-image-selector-button-error]=\"errorMessage\"\r\n [class.fv-image-selector-button-disabled]=\"disabled\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n \uD83D\uDCF7 {{ placeholder }}\r\n </button>\r\n </div>\r\n\r\n <ng-template #previewTemplate>\r\n <div class=\"fv-image-preview-container\">\r\n <img [src]=\"selectedImage!.url\" class=\"fv-image-preview\" alt=\"Selected image\" />\r\n <div class=\"fv-image-actions\">\r\n <button type=\"button\" class=\"fv-image-change-button\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Change\r\n </button>\r\n <button type=\"button\" class=\"fv-image-remove-button\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n Remove\r\n </button>\r\n </div>\r\n <div class=\"fv-image-info\">\r\n {{ selectedImage!.width }} \u00D7 {{ selectedImage!.height }} \u2022\r\n {{ formatFileSize(selectedImage!.size) }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-image-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-image-selector-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-image-selector-button{padding:40px;border:2px dashed #3498db;border-radius:8px;background-color:#f8f9fa;color:#3498db;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s,border-color .2s;width:100%;text-align:center;box-sizing:border-box}.fv-image-selector-button:hover:not(:disabled){background-color:#e7f3ff}.fv-image-selector-button-error{border-color:#e74c3c;color:#e74c3c}.fv-image-selector-button-disabled{border-color:#ccc;background-color:#f5f5f5;color:#ccc;opacity:.6;cursor:not-allowed}.fv-image-preview-container{display:flex;flex-direction:column;align-items:center}.fv-image-preview{width:100%;max-width:600px;height:200px;object-fit:cover;border-radius:8px;background-color:#f0f0f0;margin-bottom:8px}.fv-image-actions{display:flex;gap:8px;margin-bottom:4px}.fv-image-change-button{padding:8px 16px;background-color:#3498db;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.fv-image-change-button:hover:not(:disabled){background-color:#2980b9}.fv-image-change-button:disabled{opacity:.6;cursor:not-allowed}.fv-image-remove-button{padding:8px 16px;background-color:#e74c3c;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.fv-image-remove-button:hover:not(:disabled){background-color:#c0392b}.fv-image-remove-button:disabled{opacity:.6;cursor:not-allowed}.fv-image-info{font-size:12px;color:#6c757d;text-align:center}.fv-image-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1015
1174
|
}
|
|
1016
1175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvImageSelectorComponent, decorators: [{
|
|
1017
1176
|
type: Component,
|
|
1018
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-image-selector', template: "<div class=\"fv-image-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-image-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #imageInput type=\"file\" accept=\"image/*\" (change)=\"onImageSelected($event)\" style=\"display: none\" />\r\n\r\n <div *ngIf=\"!selectedImage; else previewTemplate\">\r\n <button type=\"button\" class=\"fv-image-selector-button\" [class.fv-image-selector-button-error]=\"errorMessage\"\r\n [class.fv-image-selector-button-disabled]=\"disabled\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n \uD83D\uDCF7 {{ placeholder }}\r\n </button>\r\n </div>\r\n\r\n <ng-template #previewTemplate>\r\n <div class=\"fv-image-preview-container\">\r\n <img [src]=\"selectedImage!.url\" class=\"fv-image-preview\" alt=\"Selected image\" />\r\n <div class=\"fv-image-actions\">\r\n <button type=\"button\" class=\"fv-image-change-button\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Change\r\n </button>\r\n <button type=\"button\" class=\"fv-image-remove-button\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n Remove\r\n </button>\r\n </div>\r\n <div class=\"fv-image-info\">\r\n {{ selectedImage!.width }} \u00D7 {{ selectedImage!.height }} \u2022\r\n {{ formatFileSize(selectedImage!.size) }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-image-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-image-selector-label{font-size:14px;font-weight:
|
|
1177
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-image-selector', template: "<div class=\"fv-image-selector-container\">\r\n <label *ngIf=\"label\" class=\"fv-image-selector-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <input #imageInput type=\"file\" accept=\"image/*\" (change)=\"onImageSelected($event)\" style=\"display: none\" />\r\n\r\n <div *ngIf=\"!selectedImage; else previewTemplate\">\r\n <button type=\"button\" class=\"fv-image-selector-button\" [class.fv-image-selector-button-error]=\"errorMessage\"\r\n [class.fv-image-selector-button-disabled]=\"disabled\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n \uD83D\uDCF7 {{ placeholder }}\r\n </button>\r\n </div>\r\n\r\n <ng-template #previewTemplate>\r\n <div class=\"fv-image-preview-container\">\r\n <img [src]=\"selectedImage!.url\" class=\"fv-image-preview\" alt=\"Selected image\" />\r\n <div class=\"fv-image-actions\">\r\n <button type=\"button\" class=\"fv-image-change-button\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Change\r\n </button>\r\n <button type=\"button\" class=\"fv-image-remove-button\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n Remove\r\n </button>\r\n </div>\r\n <div class=\"fv-image-info\">\r\n {{ selectedImage!.width }} \u00D7 {{ selectedImage!.height }} \u2022\r\n {{ formatFileSize(selectedImage!.size) }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-image-selector-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-image-selector-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-image-selector-button{padding:40px;border:2px dashed #3498db;border-radius:8px;background-color:#f8f9fa;color:#3498db;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s,border-color .2s;width:100%;text-align:center;box-sizing:border-box}.fv-image-selector-button:hover:not(:disabled){background-color:#e7f3ff}.fv-image-selector-button-error{border-color:#e74c3c;color:#e74c3c}.fv-image-selector-button-disabled{border-color:#ccc;background-color:#f5f5f5;color:#ccc;opacity:.6;cursor:not-allowed}.fv-image-preview-container{display:flex;flex-direction:column;align-items:center}.fv-image-preview{width:100%;max-width:600px;height:200px;object-fit:cover;border-radius:8px;background-color:#f0f0f0;margin-bottom:8px}.fv-image-actions{display:flex;gap:8px;margin-bottom:4px}.fv-image-change-button{padding:8px 16px;background-color:#3498db;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.fv-image-change-button:hover:not(:disabled){background-color:#2980b9}.fv-image-change-button:disabled{opacity:.6;cursor:not-allowed}.fv-image-remove-button{padding:8px 16px;background-color:#e74c3c;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s}.fv-image-remove-button:hover:not(:disabled){background-color:#c0392b}.fv-image-remove-button:disabled{opacity:.6;cursor:not-allowed}.fv-image-info{font-size:12px;color:#6c757d;text-align:center}.fv-image-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1019
1178
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { label: [{
|
|
1020
1179
|
type: Input
|
|
1021
1180
|
}], placeholder: [{
|
|
@@ -1078,7 +1237,7 @@ class FvRichTextEditorComponent {
|
|
|
1078
1237
|
validateValue(value) {
|
|
1079
1238
|
if (!this.schema)
|
|
1080
1239
|
return;
|
|
1081
|
-
const result = Validator
|
|
1240
|
+
const result = Validator.validate(value, this.schema);
|
|
1082
1241
|
this.errorMessage = result.errorKey;
|
|
1083
1242
|
if (!result.isValid && result.errorKey) {
|
|
1084
1243
|
this.control.setErrors({ [result.errorKey]: true });
|
|
@@ -1161,11 +1320,11 @@ class FvRichTextEditorComponent {
|
|
|
1161
1320
|
return text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
1162
1321
|
}
|
|
1163
1322
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvRichTextEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1164
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvRichTextEditorComponent, isStandalone: true, selector: "fv-rich-text-editor", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", minHeight: "minHeight", showToolbar: "showToolbar" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true }], ngImport: i0, template: "<div class=\"fv-rich-text-editor-container\">\r\n <label *ngIf=\"label\" class=\"fv-rich-text-editor-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"showToolbar && !disabled && !readonly\" class=\"fv-rich-text-toolbar\">\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('**', '**')\" title=\"Bold\">\r\n <strong>B</strong>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('*', '*')\" title=\"Italic\">\r\n <em>I</em>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('__', '__')\" title=\"Underline\">\r\n <u>U</u>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('~~', '~~')\" title=\"Strikethrough\">\r\n <s>S</s>\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleBulletList()\" title=\"Bullet List\">\r\n \u2022 List\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleNumberedList()\" title=\"Numbered List\">\r\n 1. List\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button fv-toolbar-button-danger\" (click)=\"handleClear()\" title=\"Clear\">\r\n Clear\r\n </button>\r\n </div>\r\n\r\n <textarea #editor class=\"fv-rich-text-editor\" [class.fv-rich-text-editor-error]=\"errorMessage\"\r\n [class.fv-rich-text-editor-disabled]=\"disabled\" [class.fv-rich-text-editor-focused]=\"isFocused\"\r\n [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [style.min-height.px]=\"minHeight\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"></textarea>\r\n\r\n <div class=\"fv-rich-text-footer\">\r\n <div class=\"fv-rich-text-stats\">\r\n {{ getCharacterCount() }} characters \u2022 {{ getWordCount() }} words\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-rich-text-editor-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-rich-text-editor-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-rich-text-editor-label{font-size:14px;font-weight:
|
|
1323
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvRichTextEditorComponent, isStandalone: true, selector: "fv-rich-text-editor", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly", minHeight: "minHeight", showToolbar: "showToolbar" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true }], ngImport: i0, template: "<div class=\"fv-rich-text-editor-container\">\r\n <label *ngIf=\"label\" class=\"fv-rich-text-editor-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"showToolbar && !disabled && !readonly\" class=\"fv-rich-text-toolbar\">\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('**', '**')\" title=\"Bold\">\r\n <strong>B</strong>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('*', '*')\" title=\"Italic\">\r\n <em>I</em>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('__', '__')\" title=\"Underline\">\r\n <u>U</u>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('~~', '~~')\" title=\"Strikethrough\">\r\n <s>S</s>\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleBulletList()\" title=\"Bullet List\">\r\n \u2022 List\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleNumberedList()\" title=\"Numbered List\">\r\n 1. List\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button fv-toolbar-button-danger\" (click)=\"handleClear()\" title=\"Clear\">\r\n Clear\r\n </button>\r\n </div>\r\n\r\n <textarea #editor class=\"fv-rich-text-editor\" [class.fv-rich-text-editor-error]=\"errorMessage\"\r\n [class.fv-rich-text-editor-disabled]=\"disabled\" [class.fv-rich-text-editor-focused]=\"isFocused\"\r\n [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [style.min-height.px]=\"minHeight\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"></textarea>\r\n\r\n <div class=\"fv-rich-text-footer\">\r\n <div class=\"fv-rich-text-stats\">\r\n {{ getCharacterCount() }} characters \u2022 {{ getWordCount() }} words\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-rich-text-editor-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-rich-text-editor-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-rich-text-editor-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-rich-text-toolbar{display:flex;align-items:center;gap:4px;padding:4px;margin-bottom:8px;border:1px solid #dee2e6;border-radius:8px;background-color:#f8f9fa;flex-wrap:wrap}.fv-toolbar-button{padding:6px 10px;background-color:#fff;border:1px solid #dee2e6;border-radius:8px;font-size:14px;font-weight:500;color:#1f2b41;cursor:pointer;transition:background-color .2s,border-color .2s}.fv-toolbar-button:hover{background-color:#e7f3ff;border-color:#3498db}.fv-toolbar-button-danger{color:#e74c3c}.fv-toolbar-button-danger:hover{background-color:#ffe0e0;border-color:#e74c3c}.fv-toolbar-divider{width:1px;height:24px;background-color:#dee2e6;margin:0 4px}.fv-rich-text-editor{padding:10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;background-color:#fff;color:#1f2b41;resize:vertical;transition:border-color .2s,box-shadow .2s;outline:none;box-sizing:border-box;width:100%}.fv-rich-text-editor::placeholder{color:#999}.fv-rich-text-editor:focus:not(:disabled):not([readonly]){border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-rich-text-editor-error{border-color:#e74c3c}.fv-rich-text-editor-disabled,.fv-rich-text-editor[readonly]{background-color:#ecf0f1;opacity:.6;cursor:not-allowed}.fv-rich-text-editor-focused{border-color:#3498db;border-width:1px}.fv-rich-text-footer{display:flex;justify-content:flex-end;margin-top:4px}.fv-rich-text-stats{font-size:12px;color:#6c757d}.fv-rich-text-editor-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1165
1324
|
}
|
|
1166
1325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvRichTextEditorComponent, decorators: [{
|
|
1167
1326
|
type: Component,
|
|
1168
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-rich-text-editor', template: "<div class=\"fv-rich-text-editor-container\">\r\n <label *ngIf=\"label\" class=\"fv-rich-text-editor-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"showToolbar && !disabled && !readonly\" class=\"fv-rich-text-toolbar\">\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('**', '**')\" title=\"Bold\">\r\n <strong>B</strong>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('*', '*')\" title=\"Italic\">\r\n <em>I</em>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('__', '__')\" title=\"Underline\">\r\n <u>U</u>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('~~', '~~')\" title=\"Strikethrough\">\r\n <s>S</s>\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleBulletList()\" title=\"Bullet List\">\r\n \u2022 List\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleNumberedList()\" title=\"Numbered List\">\r\n 1. List\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button fv-toolbar-button-danger\" (click)=\"handleClear()\" title=\"Clear\">\r\n Clear\r\n </button>\r\n </div>\r\n\r\n <textarea #editor class=\"fv-rich-text-editor\" [class.fv-rich-text-editor-error]=\"errorMessage\"\r\n [class.fv-rich-text-editor-disabled]=\"disabled\" [class.fv-rich-text-editor-focused]=\"isFocused\"\r\n [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [style.min-height.px]=\"minHeight\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"></textarea>\r\n\r\n <div class=\"fv-rich-text-footer\">\r\n <div class=\"fv-rich-text-stats\">\r\n {{ getCharacterCount() }} characters \u2022 {{ getWordCount() }} words\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-rich-text-editor-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: [".fv-rich-text-editor-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-rich-text-editor-label{font-size:14px;font-weight:
|
|
1327
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-rich-text-editor', template: "<div class=\"fv-rich-text-editor-container\">\r\n <label *ngIf=\"label\" class=\"fv-rich-text-editor-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"required-asterisk\">*</span>\r\n </label>\r\n\r\n <div *ngIf=\"showToolbar && !disabled && !readonly\" class=\"fv-rich-text-toolbar\">\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('**', '**')\" title=\"Bold\">\r\n <strong>B</strong>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('*', '*')\" title=\"Italic\">\r\n <em>I</em>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('__', '__')\" title=\"Underline\">\r\n <u>U</u>\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"insertText('~~', '~~')\" title=\"Strikethrough\">\r\n <s>S</s>\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleBulletList()\" title=\"Bullet List\">\r\n \u2022 List\r\n </button>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button\" (click)=\"handleNumberedList()\" title=\"Numbered List\">\r\n 1. List\r\n </button>\r\n\r\n <div class=\"fv-toolbar-divider\"></div>\r\n\r\n <button type=\"button\" class=\"fv-toolbar-button fv-toolbar-button-danger\" (click)=\"handleClear()\" title=\"Clear\">\r\n Clear\r\n </button>\r\n </div>\r\n\r\n <textarea #editor class=\"fv-rich-text-editor\" [class.fv-rich-text-editor-error]=\"errorMessage\"\r\n [class.fv-rich-text-editor-disabled]=\"disabled\" [class.fv-rich-text-editor-focused]=\"isFocused\"\r\n [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [style.min-height.px]=\"minHeight\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"></textarea>\r\n\r\n <div class=\"fv-rich-text-footer\">\r\n <div class=\"fv-rich-text-stats\">\r\n {{ getCharacterCount() }} characters \u2022 {{ getWordCount() }} words\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage\" class=\"fv-rich-text-editor-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-rich-text-editor-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-rich-text-editor-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-rich-text-toolbar{display:flex;align-items:center;gap:4px;padding:4px;margin-bottom:8px;border:1px solid #dee2e6;border-radius:8px;background-color:#f8f9fa;flex-wrap:wrap}.fv-toolbar-button{padding:6px 10px;background-color:#fff;border:1px solid #dee2e6;border-radius:8px;font-size:14px;font-weight:500;color:#1f2b41;cursor:pointer;transition:background-color .2s,border-color .2s}.fv-toolbar-button:hover{background-color:#e7f3ff;border-color:#3498db}.fv-toolbar-button-danger{color:#e74c3c}.fv-toolbar-button-danger:hover{background-color:#ffe0e0;border-color:#e74c3c}.fv-toolbar-divider{width:1px;height:24px;background-color:#dee2e6;margin:0 4px}.fv-rich-text-editor{padding:10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;font-family:Poppins,sans-serif;background-color:#fff;color:#1f2b41;resize:vertical;transition:border-color .2s,box-shadow .2s;outline:none;box-sizing:border-box;width:100%}.fv-rich-text-editor::placeholder{color:#999}.fv-rich-text-editor:focus:not(:disabled):not([readonly]){border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-rich-text-editor-error{border-color:#e74c3c}.fv-rich-text-editor-disabled,.fv-rich-text-editor[readonly]{background-color:#ecf0f1;opacity:.6;cursor:not-allowed}.fv-rich-text-editor-focused{border-color:#3498db;border-width:1px}.fv-rich-text-footer{display:flex;justify-content:flex-end;margin-top:4px}.fv-rich-text-stats{font-size:12px;color:#6c757d}.fv-rich-text-editor-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1169
1328
|
}], propDecorators: { label: [{
|
|
1170
1329
|
type: Input
|
|
1171
1330
|
}], placeholder: [{
|
|
@@ -1198,31 +1357,21 @@ class FvNameCodeComponent {
|
|
|
1198
1357
|
placeholder = '';
|
|
1199
1358
|
options = [];
|
|
1200
1359
|
schema;
|
|
1201
|
-
control;
|
|
1360
|
+
control;
|
|
1202
1361
|
disabled = false;
|
|
1203
1362
|
selectionChange = new EventEmitter();
|
|
1204
1363
|
searchControl = new FormControl('');
|
|
1205
1364
|
filteredOptions = [];
|
|
1206
1365
|
isOpen = false;
|
|
1207
|
-
|
|
1366
|
+
highlightedIndex = -1;
|
|
1208
1367
|
onChange = () => { };
|
|
1209
1368
|
onTouched = () => { };
|
|
1210
1369
|
value = null;
|
|
1211
1370
|
ngOnInit() {
|
|
1212
1371
|
this.filteredOptions = this.options;
|
|
1213
|
-
// Setup search filter
|
|
1214
1372
|
this.searchControl.valueChanges.subscribe(term => {
|
|
1215
1373
|
this.filterOptions(term || '');
|
|
1216
|
-
if (!term && this.value) {
|
|
1217
|
-
// If user clears search but had a value, we might want to keep the value or clear it?
|
|
1218
|
-
// Usually search box is separate from value display.
|
|
1219
|
-
// But here the input acts as both display and search.
|
|
1220
|
-
// If user types, value is technically unset until selection?
|
|
1221
|
-
// Let's assume typing clears the current selection if it doesn't match?
|
|
1222
|
-
// For now, simple behavior: typing filters list. Selection sets value and display text.
|
|
1223
|
-
}
|
|
1224
1374
|
});
|
|
1225
|
-
// If control is passed directly
|
|
1226
1375
|
if (this.control) {
|
|
1227
1376
|
if (this.control.value) {
|
|
1228
1377
|
this.writeValue(this.control.value);
|
|
@@ -1230,7 +1379,6 @@ class FvNameCodeComponent {
|
|
|
1230
1379
|
this.control.valueChanges.subscribe(val => {
|
|
1231
1380
|
this.writeValue(val);
|
|
1232
1381
|
});
|
|
1233
|
-
// Sync disabled state
|
|
1234
1382
|
if (this.control.disabled !== this.disabled) {
|
|
1235
1383
|
this.setDisabledState(this.control.disabled);
|
|
1236
1384
|
}
|
|
@@ -1249,6 +1397,7 @@ class FvNameCodeComponent {
|
|
|
1249
1397
|
if (!this.disabled) {
|
|
1250
1398
|
this.isOpen = true;
|
|
1251
1399
|
this.filterOptions(this.searchControl.value || '');
|
|
1400
|
+
this.highlightedIndex = this.filteredOptions.length === 1 ? 0 : -1;
|
|
1252
1401
|
}
|
|
1253
1402
|
}
|
|
1254
1403
|
onBlur() {
|
|
@@ -1256,14 +1405,12 @@ class FvNameCodeComponent {
|
|
|
1256
1405
|
}
|
|
1257
1406
|
closeDropdown() {
|
|
1258
1407
|
this.isOpen = false;
|
|
1259
|
-
|
|
1408
|
+
this.highlightedIndex = -1;
|
|
1260
1409
|
const selectedOption = this.options.find(o => o.value === this.value);
|
|
1261
1410
|
if (selectedOption) {
|
|
1262
1411
|
this.searchControl.setValue(`${selectedOption.code} - ${selectedOption.name}`, { emitEvent: false });
|
|
1263
1412
|
}
|
|
1264
1413
|
else {
|
|
1265
|
-
// If no valid value, clear text? or keep partial text?
|
|
1266
|
-
// Usually better to clear if no selection made
|
|
1267
1414
|
if (!this.value) {
|
|
1268
1415
|
this.searchControl.setValue('', { emitEvent: false });
|
|
1269
1416
|
}
|
|
@@ -1271,11 +1418,14 @@ class FvNameCodeComponent {
|
|
|
1271
1418
|
this.onTouched();
|
|
1272
1419
|
}
|
|
1273
1420
|
selectOption(option) {
|
|
1421
|
+
if (!option)
|
|
1422
|
+
return;
|
|
1274
1423
|
this.value = option.value;
|
|
1275
1424
|
this.onChange(this.value);
|
|
1276
1425
|
this.searchControl.setValue(`${option.code} - ${option.name}`, { emitEvent: false });
|
|
1277
1426
|
this.selectionChange.emit(this.value);
|
|
1278
1427
|
this.isOpen = false;
|
|
1428
|
+
this.highlightedIndex = -1;
|
|
1279
1429
|
}
|
|
1280
1430
|
writeValue(value) {
|
|
1281
1431
|
this.value = value;
|
|
@@ -1315,18 +1465,12 @@ class FvNameCodeComponent {
|
|
|
1315
1465
|
if (!this.control || !this.control.errors || !this.schema)
|
|
1316
1466
|
return '';
|
|
1317
1467
|
for (const errorKey of this.schema.errorPriority) {
|
|
1318
|
-
if (this.control.hasError(errorKey)) {
|
|
1319
|
-
|
|
1320
|
-
// Standard angular validators use 'required', 'minlength', etc.
|
|
1321
|
-
// Our schema maps 'required' -> 'ERR_REQUIRED'.
|
|
1322
|
-
// We need to fetch the message based on rules.
|
|
1323
|
-
// For simplicity in this demo, return generic or mapped string.
|
|
1324
|
-
const rule = this.schema.rules.find(r => r.name === (errorKey === 'required' ? 'required' : errorKey)); // simplified logic
|
|
1468
|
+
if (this.control.hasError(errorKey)) {
|
|
1469
|
+
const rule = this.schema.rules.find(r => r.name === (errorKey === 'required' ? 'required' : errorKey));
|
|
1325
1470
|
if (rule)
|
|
1326
|
-
return this.getReadableError(rule.errorKey);
|
|
1471
|
+
return this.getReadableError(rule.errorKey || '');
|
|
1327
1472
|
}
|
|
1328
1473
|
}
|
|
1329
|
-
// Fallback for standard angular errors
|
|
1330
1474
|
if (this.control.hasError('required'))
|
|
1331
1475
|
return 'This field is required';
|
|
1332
1476
|
return 'Invalid value';
|
|
@@ -1335,27 +1479,74 @@ class FvNameCodeComponent {
|
|
|
1335
1479
|
const map = {
|
|
1336
1480
|
'ERR_REQUIRED': 'This field is required',
|
|
1337
1481
|
'ERR_MIN_LENGTH': 'Value is too short',
|
|
1338
|
-
// Add others as needed
|
|
1339
1482
|
};
|
|
1340
1483
|
return map[key] || 'Invalid value';
|
|
1341
1484
|
}
|
|
1342
1485
|
onClickOutside(event) {
|
|
1343
|
-
const element = event.target;
|
|
1344
|
-
// Check if click is inside component
|
|
1345
1486
|
const clickedInside = event.target.closest('.fv-name-code-container');
|
|
1346
1487
|
if (!clickedInside) {
|
|
1347
1488
|
this.closeDropdown();
|
|
1348
1489
|
}
|
|
1349
1490
|
}
|
|
1491
|
+
onKeyDown(event) {
|
|
1492
|
+
if (!this.isOpen && (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter')) {
|
|
1493
|
+
this.openDropdown();
|
|
1494
|
+
event.preventDefault();
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
if (!this.isOpen)
|
|
1498
|
+
return;
|
|
1499
|
+
switch (event.key) {
|
|
1500
|
+
case 'ArrowDown':
|
|
1501
|
+
event.preventDefault();
|
|
1502
|
+
this.highlightedIndex = (this.highlightedIndex + 1) % this.filteredOptions.length;
|
|
1503
|
+
this.scrollToHighlighted();
|
|
1504
|
+
break;
|
|
1505
|
+
case 'ArrowUp':
|
|
1506
|
+
event.preventDefault();
|
|
1507
|
+
this.highlightedIndex = (this.highlightedIndex - 1 + this.filteredOptions.length) % this.filteredOptions.length;
|
|
1508
|
+
this.scrollToHighlighted();
|
|
1509
|
+
break;
|
|
1510
|
+
case 'Enter':
|
|
1511
|
+
event.preventDefault();
|
|
1512
|
+
if (this.filteredOptions.length === 1) {
|
|
1513
|
+
this.selectOption(this.filteredOptions[0]);
|
|
1514
|
+
}
|
|
1515
|
+
else if (this.highlightedIndex >= 0 && this.highlightedIndex < this.filteredOptions.length) {
|
|
1516
|
+
this.selectOption(this.filteredOptions[this.highlightedIndex]);
|
|
1517
|
+
}
|
|
1518
|
+
break;
|
|
1519
|
+
case 'Escape':
|
|
1520
|
+
this.closeDropdown();
|
|
1521
|
+
break;
|
|
1522
|
+
case 'Tab':
|
|
1523
|
+
this.closeDropdown();
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
scrollToHighlighted() {
|
|
1528
|
+
const list = document.querySelector('.dropdown-list');
|
|
1529
|
+
const item = document.querySelectorAll('.dropdown-item')[this.highlightedIndex];
|
|
1530
|
+
if (list && item) {
|
|
1531
|
+
const listRect = list.getBoundingClientRect();
|
|
1532
|
+
const itemRect = item.getBoundingClientRect();
|
|
1533
|
+
if (itemRect.bottom > listRect.bottom) {
|
|
1534
|
+
list.scrollTop += (itemRect.bottom - listRect.bottom);
|
|
1535
|
+
}
|
|
1536
|
+
else if (itemRect.top < listRect.top) {
|
|
1537
|
+
list.scrollTop -= (listRect.top - itemRect.top);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1350
1541
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvNameCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1351
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvNameCodeComponent, isStandalone: true, selector: "fv-name-code", inputs: { label: "label", placeholder: "placeholder", options: "options", schema: "schema", control: "control", disabled: "disabled" }, outputs: { selectionChange: "selectionChange" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, providers: [
|
|
1542
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvNameCodeComponent, isStandalone: true, selector: "fv-name-code", inputs: { label: "label", placeholder: "placeholder", options: "options", schema: "schema", control: "control", disabled: "disabled" }, outputs: { selectionChange: "selectionChange" }, host: { listeners: { "document:click": "onClickOutside($event)", "keydown": "onKeyDown($event)" } }, providers: [
|
|
1352
1543
|
{
|
|
1353
1544
|
provide: NG_VALUE_ACCESSOR,
|
|
1354
1545
|
useExisting: forwardRef(() => FvNameCodeComponent),
|
|
1355
1546
|
multi: true
|
|
1356
1547
|
}
|
|
1357
1548
|
], ngImport: i0, template: `
|
|
1358
|
-
<div class="fv-name-code-container"
|
|
1549
|
+
<div class="fv-name-code-container">
|
|
1359
1550
|
<label *ngIf="label" class="fv-label">
|
|
1360
1551
|
{{ label }}
|
|
1361
1552
|
<span *ngIf="isRequired()" class="required-asterisk">*</span>
|
|
@@ -1370,14 +1561,14 @@ class FvNameCodeComponent {
|
|
|
1370
1561
|
(focus)="openDropdown()"
|
|
1371
1562
|
(blur)="onBlur()"
|
|
1372
1563
|
[class.error]="isInvalid()"
|
|
1373
|
-
[attr.disabled]="disabled ? true : null"
|
|
1374
1564
|
/>
|
|
1375
1565
|
</div>
|
|
1376
1566
|
|
|
1377
1567
|
<div class="dropdown-list" *ngIf="isOpen && !disabled">
|
|
1378
1568
|
<div
|
|
1379
1569
|
class="dropdown-item"
|
|
1380
|
-
*ngFor="let option of filteredOptions"
|
|
1570
|
+
*ngFor="let option of filteredOptions; let i = index"
|
|
1571
|
+
[class.highlighted]="i === highlightedIndex"
|
|
1381
1572
|
(click)="selectOption(option)"
|
|
1382
1573
|
>
|
|
1383
1574
|
<span class="code">{{ option.code }}</span>
|
|
@@ -1392,12 +1583,12 @@ class FvNameCodeComponent {
|
|
|
1392
1583
|
{{ getErrorMessage() }}
|
|
1393
1584
|
</div>
|
|
1394
1585
|
</div>
|
|
1395
|
-
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/
|
|
1586
|
+
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-name-code-container{position:relative;width:100%;margin-bottom:0}.fv-label{display:block;font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required-asterisk{color:#e74c3c;margin-left:2px}.search-box-wrapper{position:relative;display:flex;align-items:center}.fv-input{width:100%;padding:5px 10px;height:34px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;color:#1f2b41;outline:none;transition:all .2s;background-color:#fff;box-sizing:border-box;font-family:Poppins,sans-serif;min-width:0}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#e74c3c}.fv-input:disabled{background-color:#f5f5f5;cursor:not-allowed}.dropdown-list{position:absolute;top:100%;left:0;min-width:100%;width:max-content;max-width:300px;background:#fff;border:1px solid #ddd;border-radius:8px;margin-top:4px;max-height:200px;overflow-y:auto;overflow-x:hidden;z-index:1000;box-shadow:0 4px 6px #0000001a}.dropdown-item{padding:10px 12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;border-bottom:1px solid #f0f0f0;gap:12px}.dropdown-item:last-child{border-bottom:none}.dropdown-item:hover,.dropdown-item.highlighted{background-color:#f0f7ff}.code{color:#0056b3;font-weight:600;font-size:14px;white-space:nowrap}.name{color:#333;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.no-results{padding:10px;color:#999;text-align:center;font-size:13px}.error-message{color:#e74c3c;font-size:12px;margin-top:4px;display:flex;align-items:center;gap:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1396
1587
|
}
|
|
1397
1588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvNameCodeComponent, decorators: [{
|
|
1398
1589
|
type: Component,
|
|
1399
1590
|
args: [{ selector: 'fv-name-code', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: `
|
|
1400
|
-
<div class="fv-name-code-container"
|
|
1591
|
+
<div class="fv-name-code-container">
|
|
1401
1592
|
<label *ngIf="label" class="fv-label">
|
|
1402
1593
|
{{ label }}
|
|
1403
1594
|
<span *ngIf="isRequired()" class="required-asterisk">*</span>
|
|
@@ -1412,14 +1603,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1412
1603
|
(focus)="openDropdown()"
|
|
1413
1604
|
(blur)="onBlur()"
|
|
1414
1605
|
[class.error]="isInvalid()"
|
|
1415
|
-
[attr.disabled]="disabled ? true : null"
|
|
1416
1606
|
/>
|
|
1417
1607
|
</div>
|
|
1418
1608
|
|
|
1419
1609
|
<div class="dropdown-list" *ngIf="isOpen && !disabled">
|
|
1420
1610
|
<div
|
|
1421
1611
|
class="dropdown-item"
|
|
1422
|
-
*ngFor="let option of filteredOptions"
|
|
1612
|
+
*ngFor="let option of filteredOptions; let i = index"
|
|
1613
|
+
[class.highlighted]="i === highlightedIndex"
|
|
1423
1614
|
(click)="selectOption(option)"
|
|
1424
1615
|
>
|
|
1425
1616
|
<span class="code">{{ option.code }}</span>
|
|
@@ -1440,7 +1631,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1440
1631
|
useExisting: forwardRef(() => FvNameCodeComponent),
|
|
1441
1632
|
multi: true
|
|
1442
1633
|
}
|
|
1443
|
-
], styles: ["@import\"https://fonts.googleapis.com/
|
|
1634
|
+
], styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-name-code-container{position:relative;width:100%;margin-bottom:0}.fv-label{display:block;font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required-asterisk{color:#e74c3c;margin-left:2px}.search-box-wrapper{position:relative;display:flex;align-items:center}.fv-input{width:100%;padding:5px 10px;height:34px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;color:#1f2b41;outline:none;transition:all .2s;background-color:#fff;box-sizing:border-box;font-family:Poppins,sans-serif;min-width:0}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#e74c3c}.fv-input:disabled{background-color:#f5f5f5;cursor:not-allowed}.dropdown-list{position:absolute;top:100%;left:0;min-width:100%;width:max-content;max-width:300px;background:#fff;border:1px solid #ddd;border-radius:8px;margin-top:4px;max-height:200px;overflow-y:auto;overflow-x:hidden;z-index:1000;box-shadow:0 4px 6px #0000001a}.dropdown-item{padding:10px 12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;border-bottom:1px solid #f0f0f0;gap:12px}.dropdown-item:last-child{border-bottom:none}.dropdown-item:hover,.dropdown-item.highlighted{background-color:#f0f7ff}.code{color:#0056b3;font-weight:600;font-size:14px;white-space:nowrap}.name{color:#333;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.no-results{padding:10px;color:#999;text-align:center;font-size:13px}.error-message{color:#e74c3c;font-size:12px;margin-top:4px;display:flex;align-items:center;gap:4px}\n"] }]
|
|
1444
1635
|
}], propDecorators: { label: [{
|
|
1445
1636
|
type: Input
|
|
1446
1637
|
}], placeholder: [{
|
|
@@ -1458,6 +1649,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1458
1649
|
}], onClickOutside: [{
|
|
1459
1650
|
type: HostListener,
|
|
1460
1651
|
args: ['document:click', ['$event']]
|
|
1652
|
+
}], onKeyDown: [{
|
|
1653
|
+
type: HostListener,
|
|
1654
|
+
args: ['keydown', ['$event']]
|
|
1461
1655
|
}] } });
|
|
1462
1656
|
|
|
1463
1657
|
class FvPhoneFieldComponent {
|
|
@@ -1502,6 +1696,16 @@ class FvPhoneFieldComponent {
|
|
|
1502
1696
|
ngOnDestroy() {
|
|
1503
1697
|
this.subscription?.unsubscribe();
|
|
1504
1698
|
}
|
|
1699
|
+
ngOnChanges(changes) {
|
|
1700
|
+
if (changes['disabled'] && this.control) {
|
|
1701
|
+
if (this.disabled) {
|
|
1702
|
+
this.control.disable({ emitEvent: false });
|
|
1703
|
+
}
|
|
1704
|
+
else {
|
|
1705
|
+
this.control.enable({ emitEvent: false });
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1505
1709
|
onInput(event) {
|
|
1506
1710
|
const input = event.target;
|
|
1507
1711
|
let value = input.value;
|
|
@@ -1539,11 +1743,11 @@ class FvPhoneFieldComponent {
|
|
|
1539
1743
|
return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false;
|
|
1540
1744
|
}
|
|
1541
1745
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPhoneFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1542
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvPhoneFieldComponent, isStandalone: true, selector: "fv-phone-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-phone-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-phone-input-group\">\r\n <div class=\"fv-select-wrapper\">\r\n <select class=\"fv-country-code-select\" [disabled]=\"disabled\" [(ngModel)]=\"countryCode\">\r\n <option *ngFor=\"let code of countryCodes\" [value]=\"code\">{{code}}</option>\r\n </select>\r\n <i class=\"material-icons fv-select-arrow\">arrow_drop_down</i>\r\n </div>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1746
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvPhoneFieldComponent, isStandalone: true, selector: "fv-phone-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-phone-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-phone-input-group\">\r\n <div class=\"fv-select-wrapper\">\r\n <select class=\"fv-country-code-select\" [disabled]=\"disabled\" [(ngModel)]=\"countryCode\">\r\n <option *ngFor=\"let code of countryCodes\" [value]=\"code\">{{code}}</option>\r\n </select>\r\n <i class=\"material-icons fv-select-arrow\">arrow_drop_down</i>\r\n </div>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"\r\n placeholder=\"10 digit mobile number\" class=\"fv-input fv-phone-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n </div>\r\n\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ errorMessage }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.material-icons{font-family:Material Icons!important}.fv-phone-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-phone-input-group{display:flex;align-items:center}.fv-country-code-select{padding:5px 24px 5px 8px;border:1px solid #8CBBA8;border-radius:8px 0 0 8px;background-color:#f8f9fa;border-right:none;outline:none;cursor:pointer;font-size:14px;font-weight:400;color:#1f2b41;height:34px;width:60px;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none}.fv-select-wrapper{position:relative;display:flex;align-items:center}.fv-select-arrow{position:absolute;right:4px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:20px}.fv-phone-input{flex:1;border-radius:0 8px 8px 0!important}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;transition:border-color .2s;width:100%;box-sizing:border-box;height:34px;background-color:#fff;color:#1f2b41;min-width:0}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1543
1747
|
}
|
|
1544
1748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPhoneFieldComponent, decorators: [{
|
|
1545
1749
|
type: Component,
|
|
1546
|
-
args: [{ selector: 'fv-phone-field', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule], template: "<div class=\"fv-phone-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-phone-input-group\">\r\n <div class=\"fv-select-wrapper\">\r\n <select class=\"fv-country-code-select\" [disabled]=\"disabled\" [(ngModel)]=\"countryCode\">\r\n <option *ngFor=\"let code of countryCodes\" [value]=\"code\">{{code}}</option>\r\n </select>\r\n <i class=\"material-icons fv-select-arrow\">arrow_drop_down</i>\r\n </div>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1750
|
+
args: [{ selector: 'fv-phone-field', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule], template: "<div class=\"fv-phone-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-phone-input-group\">\r\n <div class=\"fv-select-wrapper\">\r\n <select class=\"fv-country-code-select\" [disabled]=\"disabled\" [(ngModel)]=\"countryCode\">\r\n <option *ngFor=\"let code of countryCodes\" [value]=\"code\">{{code}}</option>\r\n </select>\r\n <i class=\"material-icons fv-select-arrow\">arrow_drop_down</i>\r\n </div>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" (blur)=\"onBlur()\" (focus)=\"onFocus()\"\r\n placeholder=\"10 digit mobile number\" class=\"fv-input fv-phone-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n </div>\r\n\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">\r\n {{ errorMessage }}\r\n </span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.material-icons{font-family:Material Icons!important}.fv-phone-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-phone-input-group{display:flex;align-items:center}.fv-country-code-select{padding:5px 24px 5px 8px;border:1px solid #8CBBA8;border-radius:8px 0 0 8px;background-color:#f8f9fa;border-right:none;outline:none;cursor:pointer;font-size:14px;font-weight:400;color:#1f2b41;height:34px;width:60px;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none}.fv-select-wrapper{position:relative;display:flex;align-items:center}.fv-select-arrow{position:absolute;right:4px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:20px}.fv-phone-input{flex:1;border-radius:0 8px 8px 0!important}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;transition:border-color .2s;width:100%;box-sizing:border-box;height:34px;background-color:#fff;color:#1f2b41;min-width:0}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1547
1751
|
}], propDecorators: { label: [{
|
|
1548
1752
|
type: Input
|
|
1549
1753
|
}], control: [{
|
|
@@ -1573,6 +1777,16 @@ class FvUanFieldComponent {
|
|
|
1573
1777
|
this.subscription = this.control.valueChanges.subscribe((value) => this.validateValue(value));
|
|
1574
1778
|
}
|
|
1575
1779
|
ngOnDestroy() { this.subscription?.unsubscribe(); }
|
|
1780
|
+
ngOnChanges(changes) {
|
|
1781
|
+
if (changes['disabled'] && this.control) {
|
|
1782
|
+
if (this.disabled) {
|
|
1783
|
+
this.control.disable({ emitEvent: false });
|
|
1784
|
+
}
|
|
1785
|
+
else {
|
|
1786
|
+
this.control.enable({ emitEvent: false });
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1576
1790
|
onInput(event) {
|
|
1577
1791
|
const input = event.target;
|
|
1578
1792
|
let value = input.value;
|
|
@@ -1597,11 +1811,11 @@ class FvUanFieldComponent {
|
|
|
1597
1811
|
return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false;
|
|
1598
1812
|
}
|
|
1599
1813
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvUanFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1600
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvUanFieldComponent, isStandalone: true, selector: "fv-uan-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1814
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvUanFieldComponent, isStandalone: true, selector: "fv-uan-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"12 digit UAN\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1601
1815
|
}
|
|
1602
1816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvUanFieldComponent, decorators: [{
|
|
1603
1817
|
type: Component,
|
|
1604
|
-
args: [{ selector: 'fv-uan-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1818
|
+
args: [{ selector: 'fv-uan-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"12 digit UAN\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1605
1819
|
}], propDecorators: { label: [{
|
|
1606
1820
|
type: Input
|
|
1607
1821
|
}], control: [{
|
|
@@ -1626,9 +1840,41 @@ class FvPfFieldComponent {
|
|
|
1626
1840
|
errorMessage = null;
|
|
1627
1841
|
subscription;
|
|
1628
1842
|
ngOnInit() {
|
|
1629
|
-
if (!this.control)
|
|
1843
|
+
if (!this.control) {
|
|
1844
|
+
console.error('FvPfField: control is required');
|
|
1630
1845
|
return;
|
|
1846
|
+
}
|
|
1847
|
+
// Default PF Schema
|
|
1848
|
+
if (!this.schema) {
|
|
1849
|
+
this.schema = {
|
|
1850
|
+
controlType: 'PfField',
|
|
1851
|
+
errorPriority: ['required', 'regex'],
|
|
1852
|
+
rules: [
|
|
1853
|
+
{
|
|
1854
|
+
name: 'regex',
|
|
1855
|
+
params: {
|
|
1856
|
+
pattern: '^[A-Z]{2}/[A-Z]{3}/[0-9]{7}/[0-9]{3}/[0-9]{7}$'
|
|
1857
|
+
},
|
|
1858
|
+
errorKey: 'ERR_PF_INVALID'
|
|
1859
|
+
}
|
|
1860
|
+
]
|
|
1861
|
+
};
|
|
1862
|
+
}
|
|
1631
1863
|
this.subscription = this.control.valueChanges.subscribe((value) => this.validateValue(value));
|
|
1864
|
+
// Initial validation
|
|
1865
|
+
if (this.control.value) {
|
|
1866
|
+
this.validateValue(this.control.value);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
ngOnChanges(changes) {
|
|
1870
|
+
if (changes['disabled'] && this.control) {
|
|
1871
|
+
if (this.disabled) {
|
|
1872
|
+
this.control.disable({ emitEvent: false });
|
|
1873
|
+
}
|
|
1874
|
+
else {
|
|
1875
|
+
this.control.enable({ emitEvent: false });
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1632
1878
|
}
|
|
1633
1879
|
ngOnDestroy() { this.subscription?.unsubscribe(); }
|
|
1634
1880
|
onInput(event) {
|
|
@@ -1652,12 +1898,22 @@ class FvPfFieldComponent {
|
|
|
1652
1898
|
this.control.setErrors(null);
|
|
1653
1899
|
}
|
|
1654
1900
|
isRequired() { return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false; }
|
|
1901
|
+
getErrorMessage() {
|
|
1902
|
+
if (!this.errorMessage)
|
|
1903
|
+
return '';
|
|
1904
|
+
const errorMessages = {
|
|
1905
|
+
ERR_REQUIRED: 'PF Number is required',
|
|
1906
|
+
ERR_PF_INVALID: 'Invalid PF Number format (e.g. AA/AAA/0000000/000/0000000)',
|
|
1907
|
+
ERR_REGEX_MISMATCH: 'Invalid PF Number format'
|
|
1908
|
+
};
|
|
1909
|
+
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
1910
|
+
}
|
|
1655
1911
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPfFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1656
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvPfFieldComponent, isStandalone: true, selector: "fv-pf-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"
|
|
1912
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvPfFieldComponent, isStandalone: true, selector: "fv-pf-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"AA/AAA/0000000/000/0000000\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage && control.touched\" />\r\n <span *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">{{ getErrorMessage() }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1657
1913
|
}
|
|
1658
1914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPfFieldComponent, decorators: [{
|
|
1659
1915
|
type: Component,
|
|
1660
|
-
args: [{ selector: 'fv-pf-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"
|
|
1916
|
+
args: [{ selector: 'fv-pf-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"AA/AAA/0000000/000/0000000\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage && control.touched\" />\r\n <span *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">{{ getErrorMessage() }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1661
1917
|
}], propDecorators: { label: [{
|
|
1662
1918
|
type: Input
|
|
1663
1919
|
}], control: [{
|
|
@@ -1687,6 +1943,16 @@ class FvEsiFieldComponent {
|
|
|
1687
1943
|
this.subscription = this.control.valueChanges.subscribe((value) => this.validateValue(value));
|
|
1688
1944
|
}
|
|
1689
1945
|
ngOnDestroy() { this.subscription?.unsubscribe(); }
|
|
1946
|
+
ngOnChanges(changes) {
|
|
1947
|
+
if (changes['disabled'] && this.control) {
|
|
1948
|
+
if (this.disabled) {
|
|
1949
|
+
this.control.disable({ emitEvent: false });
|
|
1950
|
+
}
|
|
1951
|
+
else {
|
|
1952
|
+
this.control.enable({ emitEvent: false });
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1690
1956
|
onInput(event) {
|
|
1691
1957
|
const input = event.target;
|
|
1692
1958
|
let value = input.value;
|
|
@@ -1709,11 +1975,11 @@ class FvEsiFieldComponent {
|
|
|
1709
1975
|
}
|
|
1710
1976
|
isRequired() { return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false; }
|
|
1711
1977
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEsiFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1712
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvEsiFieldComponent, isStandalone: true, selector: "fv-esi-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1978
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvEsiFieldComponent, isStandalone: true, selector: "fv-esi-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"17 digit ESI\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1713
1979
|
}
|
|
1714
1980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEsiFieldComponent, decorators: [{
|
|
1715
1981
|
type: Component,
|
|
1716
|
-
args: [{ selector: 'fv-esi-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
1982
|
+
args: [{ selector: 'fv-esi-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"17 digit ESI\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1717
1983
|
}], propDecorators: { label: [{
|
|
1718
1984
|
type: Input
|
|
1719
1985
|
}], control: [{
|
|
@@ -1765,11 +2031,11 @@ class FvIfscFieldComponent {
|
|
|
1765
2031
|
}
|
|
1766
2032
|
isRequired() { return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false; }
|
|
1767
2033
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvIfscFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1768
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvIfscFieldComponent, isStandalone: true, selector: "fv-ifsc-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\" placeholder=\"IFSC Code\"\r\n class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:
|
|
2034
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvIfscFieldComponent, isStandalone: true, selector: "fv-ifsc-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\" placeholder=\"IFSC Code\"\r\n class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1769
2035
|
}
|
|
1770
2036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvIfscFieldComponent, decorators: [{
|
|
1771
2037
|
type: Component,
|
|
1772
|
-
args: [{ selector: 'fv-ifsc-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\" placeholder=\"IFSC Code\"\r\n class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:
|
|
2038
|
+
args: [{ selector: 'fv-ifsc-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\" placeholder=\"IFSC Code\"\r\n class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1773
2039
|
}], propDecorators: { label: [{
|
|
1774
2040
|
type: Input
|
|
1775
2041
|
}], control: [{
|
|
@@ -1821,11 +2087,11 @@ class FvMicrFieldComponent {
|
|
|
1821
2087
|
}
|
|
1822
2088
|
isRequired() { return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false; }
|
|
1823
2089
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvMicrFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1824
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvMicrFieldComponent, isStandalone: true, selector: "fv-micr-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"9 digit MICR\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:
|
|
2090
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvMicrFieldComponent, isStandalone: true, selector: "fv-micr-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"9 digit MICR\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-micr-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1825
2091
|
}
|
|
1826
2092
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvMicrFieldComponent, decorators: [{
|
|
1827
2093
|
type: Component,
|
|
1828
|
-
args: [{ selector: 'fv-micr-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"9 digit MICR\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: [".fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:
|
|
2094
|
+
args: [{ selector: 'fv-micr-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" [disabled]=\"disabled\" (input)=\"onInput($event)\"\r\n placeholder=\"9 digit MICR\" class=\"fv-input\" [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-micr-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1829
2095
|
}], propDecorators: { label: [{
|
|
1830
2096
|
type: Input
|
|
1831
2097
|
}], control: [{
|
|
@@ -1855,6 +2121,16 @@ class FvIbanFieldComponent {
|
|
|
1855
2121
|
this.subscription = this.control.valueChanges.subscribe((value) => this.validateValue(value));
|
|
1856
2122
|
}
|
|
1857
2123
|
ngOnDestroy() { this.subscription?.unsubscribe(); }
|
|
2124
|
+
ngOnChanges(changes) {
|
|
2125
|
+
if (changes['disabled'] && this.control) {
|
|
2126
|
+
if (this.disabled) {
|
|
2127
|
+
this.control.disable({ emitEvent: false });
|
|
2128
|
+
}
|
|
2129
|
+
else {
|
|
2130
|
+
this.control.enable({ emitEvent: false });
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
1858
2134
|
onInput(event) {
|
|
1859
2135
|
const input = event.target;
|
|
1860
2136
|
let value = input.value;
|
|
@@ -1877,11 +2153,11 @@ class FvIbanFieldComponent {
|
|
|
1877
2153
|
}
|
|
1878
2154
|
isRequired() { return this.schema?.rules?.some(r => r.name === 'required' && r.params?.['enabled']) || false; }
|
|
1879
2155
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvIbanFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1880
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvIbanFieldComponent, isStandalone: true, selector: "fv-iban-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
2156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvIbanFieldComponent, isStandalone: true, selector: "fv-iban-field", inputs: { label: "label", control: "control", disabled: "disabled", schema: "schema" }, outputs: { blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"IBAN\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-iban-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1881
2157
|
}
|
|
1882
2158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvIbanFieldComponent, decorators: [{
|
|
1883
2159
|
type: Component,
|
|
1884
|
-
args: [{ selector: 'fv-iban-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\"
|
|
2160
|
+
args: [{ selector: 'fv-iban-field', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }}\r\n <span *ngIf=\"isRequired()\" class=\"fv-required-asterisk\">*</span>\r\n </label>\r\n <input type=\"text\" [formControl]=\"control\" (input)=\"onInput($event)\" placeholder=\"IBAN\" class=\"fv-input\"\r\n [class.fv-input-error]=\"errorMessage\" />\r\n <span *ngIf=\"errorMessage\" class=\"fv-error-message\">{{ errorMessage }}</span>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";*{font-family:Poppins,sans-serif}.fv-iban-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.fv-required-asterisk{color:#e74c3c;margin-left:2px}.fv-input{padding:5px 10px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:border-color .2s;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input-error{border-color:#dc3545!important}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1885
2161
|
}], propDecorators: { label: [{
|
|
1886
2162
|
type: Input
|
|
1887
2163
|
}], control: [{
|
|
@@ -1896,75 +2172,302 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1896
2172
|
type: Output
|
|
1897
2173
|
}] } });
|
|
1898
2174
|
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
searchQueries = new Map();
|
|
1912
|
-
constructor(fb, hostRef) {
|
|
1913
|
-
this.fb = fb;
|
|
1914
|
-
this.hostRef = hostRef;
|
|
1915
|
-
}
|
|
2175
|
+
class FvEmailFieldComponent {
|
|
2176
|
+
label = 'Email Address';
|
|
2177
|
+
placeholder = 'e.g. john@example.com';
|
|
2178
|
+
schema;
|
|
2179
|
+
control;
|
|
2180
|
+
disabled = false;
|
|
2181
|
+
readonly = false;
|
|
2182
|
+
valueChange = new EventEmitter();
|
|
2183
|
+
blur = new EventEmitter();
|
|
2184
|
+
focus = new EventEmitter();
|
|
2185
|
+
errorMessage = null;
|
|
2186
|
+
subscription;
|
|
1916
2187
|
ngOnInit() {
|
|
1917
|
-
this.
|
|
2188
|
+
if (!this.control) {
|
|
2189
|
+
console.error('FvEmailField: control is required');
|
|
2190
|
+
return;
|
|
2191
|
+
}
|
|
2192
|
+
// Default email schema if not provided
|
|
2193
|
+
if (!this.schema) {
|
|
2194
|
+
this.schema = {
|
|
2195
|
+
controlType: 'EntryField',
|
|
2196
|
+
errorPriority: ['required', 'regex'],
|
|
2197
|
+
rules: [
|
|
2198
|
+
{
|
|
2199
|
+
name: 'regex',
|
|
2200
|
+
params: {
|
|
2201
|
+
pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
|
|
2202
|
+
},
|
|
2203
|
+
errorKey: 'ERR_EMAIL_INVALID',
|
|
2204
|
+
},
|
|
2205
|
+
],
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
// Subscribe to value changes
|
|
2209
|
+
this.subscription = this.control.valueChanges.subscribe((value) => {
|
|
2210
|
+
this.validateValue(value);
|
|
2211
|
+
this.valueChange.emit(value);
|
|
2212
|
+
});
|
|
2213
|
+
// Validate initial value
|
|
2214
|
+
if (this.control.value) {
|
|
2215
|
+
this.validateValue(this.control.value);
|
|
2216
|
+
}
|
|
1918
2217
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
2218
|
+
ngOnDestroy() {
|
|
2219
|
+
this.subscription?.unsubscribe();
|
|
1921
2220
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
2221
|
+
ngOnChanges(changes) {
|
|
2222
|
+
if (changes['disabled'] && this.control) {
|
|
2223
|
+
if (this.disabled) {
|
|
2224
|
+
this.control.disable({ emitEvent: false });
|
|
2225
|
+
}
|
|
2226
|
+
else {
|
|
2227
|
+
this.control.enable({ emitEvent: false });
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
1926
2230
|
}
|
|
1927
|
-
|
|
1928
|
-
|
|
2231
|
+
validateValue(value) {
|
|
2232
|
+
if (!this.schema)
|
|
2233
|
+
return;
|
|
2234
|
+
const result = Validator.validate(value, this.schema);
|
|
2235
|
+
this.errorMessage = result.errorKey;
|
|
2236
|
+
if (!result.isValid && result.errorKey) {
|
|
2237
|
+
this.control.setErrors({ [result.errorKey]: true });
|
|
2238
|
+
}
|
|
2239
|
+
else {
|
|
2240
|
+
this.control.setErrors(null);
|
|
2241
|
+
}
|
|
1929
2242
|
}
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
2243
|
+
onBlur(event) {
|
|
2244
|
+
if (this.control && this.schema) {
|
|
2245
|
+
this.validateValue(this.control.value);
|
|
2246
|
+
}
|
|
2247
|
+
this.blur.emit();
|
|
2248
|
+
}
|
|
2249
|
+
onFocus(event) {
|
|
2250
|
+
this.focus.emit();
|
|
2251
|
+
}
|
|
2252
|
+
isRequired() {
|
|
2253
|
+
return (this.schema?.rules?.some((r) => r.name === 'required' && r.params?.['enabled']) || false);
|
|
2254
|
+
}
|
|
2255
|
+
getErrorMessage() {
|
|
2256
|
+
if (!this.errorMessage)
|
|
2257
|
+
return '';
|
|
2258
|
+
const errorMessages = {
|
|
2259
|
+
ERR_REQUIRED: 'Email is required',
|
|
2260
|
+
ERR_EMAIL_INVALID: 'Invalid email format',
|
|
2261
|
+
ERR_REGEX_MISMATCH: 'Invalid email format',
|
|
2262
|
+
};
|
|
2263
|
+
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
2264
|
+
}
|
|
2265
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEmailFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2266
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvEmailFieldComponent, isStandalone: true, selector: "fv-email-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\">\r\n <input type=\"email\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\"\r\n (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" class=\"fv-input\"\r\n [class.error]=\"!!errorMessage && control.touched\" />\r\n <span class=\"fv-field-icon\">\r\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\r\n <polyline points=\"22,6 12,13 2,6\"></polyline>\r\n </svg>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-field-container,.fv-field-container *{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input-wrapper{position:relative;width:100%}.fv-input{padding:5px 35px 5px 12px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:all .2s ease-in-out;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-field-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#666;display:flex;align-items:center;pointer-events:none}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2267
|
+
}
|
|
2268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvEmailFieldComponent, decorators: [{
|
|
2269
|
+
type: Component,
|
|
2270
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-email-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\">\r\n <input type=\"email\" [formControl]=\"control\" [placeholder]=\"placeholder\" [readonly]=\"readonly\"\r\n (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" class=\"fv-input\"\r\n [class.error]=\"!!errorMessage && control.touched\" />\r\n <span class=\"fv-field-icon\">\r\n <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\r\n <polyline points=\"22,6 12,13 2,6\"></polyline>\r\n </svg>\r\n </span>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-field-container,.fv-field-container *{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input-wrapper{position:relative;width:100%}.fv-input{padding:5px 35px 5px 12px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:all .2s ease-in-out;height:34px}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-field-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#666;display:flex;align-items:center;pointer-events:none}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"] }]
|
|
2271
|
+
}], propDecorators: { label: [{
|
|
2272
|
+
type: Input
|
|
2273
|
+
}], placeholder: [{
|
|
2274
|
+
type: Input
|
|
2275
|
+
}], schema: [{
|
|
2276
|
+
type: Input
|
|
2277
|
+
}], control: [{
|
|
2278
|
+
type: Input
|
|
2279
|
+
}], disabled: [{
|
|
2280
|
+
type: Input
|
|
2281
|
+
}], readonly: [{
|
|
2282
|
+
type: Input
|
|
2283
|
+
}], valueChange: [{
|
|
2284
|
+
type: Output
|
|
2285
|
+
}], blur: [{
|
|
2286
|
+
type: Output
|
|
2287
|
+
}], focus: [{
|
|
2288
|
+
type: Output
|
|
2289
|
+
}] } });
|
|
2290
|
+
|
|
2291
|
+
class FvPasswordFieldComponent {
|
|
2292
|
+
label = 'Password';
|
|
2293
|
+
placeholder = '••••••••';
|
|
2294
|
+
schema;
|
|
2295
|
+
control;
|
|
2296
|
+
disabled = false;
|
|
2297
|
+
readonly = false;
|
|
2298
|
+
valueChange = new EventEmitter();
|
|
2299
|
+
blur = new EventEmitter();
|
|
2300
|
+
focus = new EventEmitter();
|
|
2301
|
+
errorMessage = null;
|
|
2302
|
+
showPassword = false;
|
|
2303
|
+
subscription;
|
|
2304
|
+
ngOnInit() {
|
|
2305
|
+
if (!this.control) {
|
|
2306
|
+
console.error('FvPasswordField: control is required');
|
|
2307
|
+
return;
|
|
2308
|
+
}
|
|
2309
|
+
// Subscribe to value changes
|
|
2310
|
+
this.subscription = this.control.valueChanges.subscribe((value) => {
|
|
2311
|
+
this.validateValue(value);
|
|
2312
|
+
this.valueChange.emit(value);
|
|
2313
|
+
});
|
|
2314
|
+
// Validate initial value
|
|
2315
|
+
if (this.control.value) {
|
|
2316
|
+
this.validateValue(this.control.value);
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
ngOnDestroy() {
|
|
2320
|
+
this.subscription?.unsubscribe();
|
|
2321
|
+
}
|
|
2322
|
+
ngOnChanges(changes) {
|
|
2323
|
+
if (changes['disabled'] && this.control) {
|
|
2324
|
+
if (this.disabled) {
|
|
2325
|
+
this.control.disable({ emitEvent: false });
|
|
2326
|
+
}
|
|
2327
|
+
else {
|
|
2328
|
+
this.control.enable({ emitEvent: false });
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
validateValue(value) {
|
|
2333
|
+
if (!this.schema)
|
|
2334
|
+
return;
|
|
2335
|
+
const result = Validator.validate(value, this.schema);
|
|
2336
|
+
this.errorMessage = result.errorKey;
|
|
2337
|
+
if (!result.isValid && result.errorKey) {
|
|
2338
|
+
this.control.setErrors({ [result.errorKey]: true });
|
|
2339
|
+
}
|
|
2340
|
+
else {
|
|
2341
|
+
this.control.setErrors(null);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
toggleVisibility() {
|
|
2345
|
+
if (this.disabled)
|
|
2346
|
+
return;
|
|
2347
|
+
this.showPassword = !this.showPassword;
|
|
2348
|
+
}
|
|
2349
|
+
onBlur(event) {
|
|
2350
|
+
if (this.control && this.schema) {
|
|
2351
|
+
this.validateValue(this.control.value);
|
|
2352
|
+
}
|
|
2353
|
+
this.blur.emit();
|
|
2354
|
+
}
|
|
2355
|
+
onFocus(event) {
|
|
2356
|
+
this.focus.emit();
|
|
2357
|
+
}
|
|
2358
|
+
isRequired() {
|
|
2359
|
+
return (this.schema?.rules?.some((r) => r.name === 'required' && r.params?.['enabled']) || false);
|
|
2360
|
+
}
|
|
2361
|
+
getErrorMessage() {
|
|
2362
|
+
if (!this.errorMessage)
|
|
2363
|
+
return '';
|
|
2364
|
+
const errorMessages = {
|
|
2365
|
+
ERR_REQUIRED: 'Password is required',
|
|
2366
|
+
ERR_MIN_LENGTH: 'Password is too short',
|
|
2367
|
+
ERR_REGEX_MISMATCH: 'Invalid password format',
|
|
2368
|
+
ERR_PASSWORD_TOO_SHORT: 'Password must be at least 8 characters',
|
|
2369
|
+
ERR_PASSWORD_MISSING_UPPERCASE: 'Uppercase letter missing',
|
|
2370
|
+
ERR_PASSWORD_MISSING_LOWERCASE: 'Lowercase letter missing',
|
|
2371
|
+
ERR_PASSWORD_MISSING_NUMBER: 'At least one number missing',
|
|
2372
|
+
ERR_PASSWORD_MISSING_SPECIAL_CHAR: 'Special character missing',
|
|
2373
|
+
};
|
|
2374
|
+
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
2375
|
+
}
|
|
2376
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPasswordFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2377
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvPasswordFieldComponent, isStandalone: true, selector: "fv-password-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", readonly: "readonly" }, outputs: { valueChange: "valueChange", blur: "blur", focus: "focus" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\">\r\n <input [type]=\"showPassword ? 'text' : 'password'\" [formControl]=\"control\" [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" class=\"fv-input\"\r\n [class.error]=\"!!errorMessage && control.touched\" />\r\n <button type=\"button\" class=\"fv-visibility-toggle\" (click)=\"toggleVisibility()\" [disabled]=\"disabled\">\r\n <svg *ngIf=\"!showPassword\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"></path>\r\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\r\n </svg>\r\n <svg *ngIf=\"showPassword\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path\r\n d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\">\r\n </path>\r\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line>\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-field-container,.fv-field-container *{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input-wrapper{position:relative;width:100%}.fv-input{padding:5px 40px 5px 12px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:all .2s ease-in-out;height:34px}:host ::ng-deep input::-ms-reveal,:host ::ng-deep input::-ms-clear,:host ::ng-deep input::-webkit-contacts-auto-fill-button,:host ::ng-deep input::-webkit-credentials-auto-fill-button,:host ::ng-deep input::-webkit-password-reveal-button{display:none!important;width:0!important;height:0!important}.fv-input::-ms-reveal,.fv-input::-ms-clear,.fv-input::-webkit-contacts-auto-fill-button,.fv-input::-webkit-credentials-auto-fill-button{display:none!important}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-visibility-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;padding:6px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:2}.fv-visibility-toggle:hover:not(:disabled){color:#3498db}.fv-visibility-toggle:disabled{cursor:not-allowed;opacity:.5}.fv-visibility-toggle svg{display:block}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2378
|
+
}
|
|
2379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvPasswordFieldComponent, decorators: [{
|
|
2380
|
+
type: Component,
|
|
2381
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-password-field', template: "<div class=\"fv-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-label\">\r\n {{ label }} <span *ngIf=\"isRequired()\" class=\"required\">*</span>\r\n </label>\r\n\r\n <div class=\"fv-input-wrapper\">\r\n <input [type]=\"showPassword ? 'text' : 'password'\" [formControl]=\"control\" [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\" (blur)=\"onBlur($event)\" (focus)=\"onFocus($event)\" class=\"fv-input\"\r\n [class.error]=\"!!errorMessage && control.touched\" />\r\n <button type=\"button\" class=\"fv-visibility-toggle\" (click)=\"toggleVisibility()\" [disabled]=\"disabled\">\r\n <svg *ngIf=\"!showPassword\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"></path>\r\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\r\n </svg>\r\n <svg *ngIf=\"showPassword\" viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\"\r\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path\r\n d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\">\r\n </path>\r\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line>\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control.touched\" class=\"fv-error-message\">\r\n {{ getErrorMessage() }}\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-field-container,.fv-field-container *{font-family:Poppins,sans-serif}.fv-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%}.fv-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px}.required{color:#e74c3c;margin-left:2px}.fv-input-wrapper{position:relative;width:100%}.fv-input{padding:5px 40px 5px 12px;border:1px solid #8CBBA8;border-radius:8px;font-size:14px;font-weight:400;outline:none;width:100%;box-sizing:border-box;background-color:#fff;color:#1f2b41;transition:all .2s ease-in-out;height:34px}:host ::ng-deep input::-ms-reveal,:host ::ng-deep input::-ms-clear,:host ::ng-deep input::-webkit-contacts-auto-fill-button,:host ::ng-deep input::-webkit-credentials-auto-fill-button,:host ::ng-deep input::-webkit-password-reveal-button{display:none!important;width:0!important;height:0!important}.fv-input::-ms-reveal,.fv-input::-ms-clear,.fv-input::-webkit-contacts-auto-fill-button,.fv-input::-webkit-credentials-auto-fill-button{display:none!important}.fv-input:focus{border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.fv-input.error{border-color:#dc3545!important}.fv-visibility-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;padding:6px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:2}.fv-visibility-toggle:hover:not(:disabled){color:#3498db}.fv-visibility-toggle:disabled{cursor:not-allowed;opacity:.5}.fv-visibility-toggle svg{display:block}.fv-error-message{margin-top:4px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}.fv-error-message:before{content:\"\\26a0\";font-size:14px}\n"] }]
|
|
2382
|
+
}], propDecorators: { label: [{
|
|
2383
|
+
type: Input
|
|
2384
|
+
}], placeholder: [{
|
|
2385
|
+
type: Input
|
|
2386
|
+
}], schema: [{
|
|
2387
|
+
type: Input
|
|
2388
|
+
}], control: [{
|
|
2389
|
+
type: Input
|
|
2390
|
+
}], disabled: [{
|
|
2391
|
+
type: Input
|
|
2392
|
+
}], readonly: [{
|
|
2393
|
+
type: Input
|
|
2394
|
+
}], valueChange: [{
|
|
2395
|
+
type: Output
|
|
2396
|
+
}], blur: [{
|
|
2397
|
+
type: Output
|
|
2398
|
+
}], focus: [{
|
|
2399
|
+
type: Output
|
|
2400
|
+
}] } });
|
|
2401
|
+
|
|
2402
|
+
// add-update-form.component.ts
|
|
2403
|
+
class AddUpdateFormComponent {
|
|
2404
|
+
fb;
|
|
2405
|
+
hostRef;
|
|
2406
|
+
config;
|
|
2407
|
+
validationError = new EventEmitter();
|
|
2408
|
+
form;
|
|
2409
|
+
submitted = false;
|
|
2410
|
+
filePreviews = new Map();
|
|
2411
|
+
fileNames = new Map();
|
|
2412
|
+
valueChangeSubscriptions = [];
|
|
2413
|
+
passwordVisibility = new Map();
|
|
2414
|
+
searchQueries = new Map();
|
|
2415
|
+
constructor(fb, hostRef) {
|
|
2416
|
+
this.fb = fb;
|
|
2417
|
+
this.hostRef = hostRef;
|
|
2418
|
+
}
|
|
2419
|
+
ngOnInit() {
|
|
2420
|
+
this.initializeForm();
|
|
2421
|
+
}
|
|
2422
|
+
ngAfterViewInit() {
|
|
2423
|
+
// Lifecycle hook - can be used for datepicker initialization if needed
|
|
2424
|
+
}
|
|
2425
|
+
getColumnWidth(column) {
|
|
2426
|
+
const maxCols = this.config.maxColsPerRow || 5;
|
|
2427
|
+
const colSpan = Math.min(column.colSpan || 1, maxCols);
|
|
2428
|
+
return `calc(${(colSpan / maxCols) * 100}% - 16px)`;
|
|
2429
|
+
}
|
|
2430
|
+
getControl(name) {
|
|
2431
|
+
return this.form.get(name);
|
|
2432
|
+
}
|
|
2433
|
+
// 2. HELPER: Convert your FieldValidation[] to the library's ValidationSchema
|
|
2434
|
+
getSchema(column) {
|
|
2435
|
+
const rules = [];
|
|
2436
|
+
const errorPriority = [];
|
|
2437
|
+
if (column.validations) {
|
|
2438
|
+
column.validations.forEach((v) => {
|
|
2439
|
+
switch (v.type) {
|
|
2440
|
+
case 'required':
|
|
2441
|
+
rules.push({
|
|
2442
|
+
name: 'required',
|
|
2443
|
+
params: { enabled: true },
|
|
2444
|
+
errorKey: 'ERR_REQUIRED',
|
|
2445
|
+
});
|
|
2446
|
+
errorPriority.push('required');
|
|
2447
|
+
break;
|
|
2448
|
+
case 'email':
|
|
2449
|
+
rules.push({
|
|
2450
|
+
name: 'regex',
|
|
2451
|
+
params: {
|
|
2452
|
+
pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
|
|
2453
|
+
},
|
|
2454
|
+
errorKey: 'ERR_REGEX_MISMATCH',
|
|
2455
|
+
});
|
|
2456
|
+
errorPriority.push('regex');
|
|
2457
|
+
break;
|
|
2458
|
+
case 'minLength':
|
|
2459
|
+
rules.push({
|
|
2460
|
+
name: 'minLength',
|
|
2461
|
+
params: { value: v.value },
|
|
2462
|
+
errorKey: 'ERR_MIN_LENGTH',
|
|
2463
|
+
});
|
|
2464
|
+
errorPriority.push('minLength');
|
|
2465
|
+
break;
|
|
2466
|
+
case 'maxLength':
|
|
2467
|
+
rules.push({
|
|
2468
|
+
name: 'maxLength',
|
|
2469
|
+
params: { value: v.value },
|
|
2470
|
+
errorKey: 'ERR_MAX_LENGTH',
|
|
1968
2471
|
});
|
|
1969
2472
|
errorPriority.push('maxLength');
|
|
1970
2473
|
break;
|
|
@@ -1976,6 +2479,20 @@ class AddUpdateFormComponent {
|
|
|
1976
2479
|
});
|
|
1977
2480
|
errorPriority.push('regex');
|
|
1978
2481
|
break;
|
|
2482
|
+
case 'passwordComplexity':
|
|
2483
|
+
rules.push({
|
|
2484
|
+
name: 'passwordComplexity',
|
|
2485
|
+
params: v.params || {
|
|
2486
|
+
requireUppercase: true,
|
|
2487
|
+
requireLowercase: true,
|
|
2488
|
+
requireNumber: true,
|
|
2489
|
+
requireSpecialChar: true,
|
|
2490
|
+
minLength: 8
|
|
2491
|
+
},
|
|
2492
|
+
errorKey: v.errorKey || 'ERR_PASSWORD_COMPLEXITY_INVALID',
|
|
2493
|
+
});
|
|
2494
|
+
errorPriority.push('passwordComplexity');
|
|
2495
|
+
break;
|
|
1979
2496
|
case 'min':
|
|
1980
2497
|
rules.push({
|
|
1981
2498
|
name: 'min',
|
|
@@ -2444,21 +2961,12 @@ class AddUpdateFormComponent {
|
|
|
2444
2961
|
[style.grid-column]="'span ' + (column.colSpan || 1)"
|
|
2445
2962
|
>
|
|
2446
2963
|
<ng-container
|
|
2447
|
-
*ngIf="
|
|
2448
|
-
['text', 'email', 'password'].includes(column.type) &&
|
|
2449
|
-
!column.hidden
|
|
2450
|
-
"
|
|
2964
|
+
*ngIf="column.type === 'text' && !column.hidden"
|
|
2451
2965
|
>
|
|
2452
2966
|
<fv-entry-field
|
|
2453
2967
|
[label]="column.label"
|
|
2454
2968
|
[placeholder]="column.placeholder || ''"
|
|
2455
|
-
|
|
2456
|
-
column.type === 'password'
|
|
2457
|
-
? 'password'
|
|
2458
|
-
: column.type === 'email'
|
|
2459
|
-
? 'email'
|
|
2460
|
-
: 'text'
|
|
2461
|
-
"
|
|
2969
|
+
type="text"
|
|
2462
2970
|
[control]="getControl(column.name)"
|
|
2463
2971
|
[schema]="getSchema(column)"
|
|
2464
2972
|
[disabled]="column.disabled || false"
|
|
@@ -2470,6 +2978,34 @@ class AddUpdateFormComponent {
|
|
|
2470
2978
|
</fv-entry-field>
|
|
2471
2979
|
</ng-container>
|
|
2472
2980
|
|
|
2981
|
+
<ng-container
|
|
2982
|
+
*ngIf="column.type === 'email' && !column.hidden"
|
|
2983
|
+
>
|
|
2984
|
+
<fv-email-field
|
|
2985
|
+
[label]="column.label"
|
|
2986
|
+
[placeholder]="column.placeholder || ''"
|
|
2987
|
+
[control]="getControl(column.name)"
|
|
2988
|
+
[schema]="getSchema(column)"
|
|
2989
|
+
[disabled]="column.disabled || false"
|
|
2990
|
+
(valueChange)="handleFieldChange(column.name, $event)"
|
|
2991
|
+
>
|
|
2992
|
+
</fv-email-field>
|
|
2993
|
+
</ng-container>
|
|
2994
|
+
|
|
2995
|
+
<ng-container
|
|
2996
|
+
*ngIf="column.type === 'password' && !column.hidden"
|
|
2997
|
+
>
|
|
2998
|
+
<fv-password-field
|
|
2999
|
+
[label]="column.label"
|
|
3000
|
+
[placeholder]="column.placeholder || ''"
|
|
3001
|
+
[control]="getControl(column.name)"
|
|
3002
|
+
[schema]="getSchema(column)"
|
|
3003
|
+
[disabled]="column.disabled || false"
|
|
3004
|
+
(valueChange)="handleFieldChange(column.name, $event)"
|
|
3005
|
+
>
|
|
3006
|
+
</fv-password-field>
|
|
3007
|
+
</ng-container>
|
|
3008
|
+
|
|
2473
3009
|
<ng-container
|
|
2474
3010
|
*ngIf="column.type === 'number' && !column.hidden"
|
|
2475
3011
|
>
|
|
@@ -2517,6 +3053,7 @@ class AddUpdateFormComponent {
|
|
|
2517
3053
|
[options]="column.options || []"
|
|
2518
3054
|
[control]="getControl(column.name)"
|
|
2519
3055
|
[disabled]="column.disabled || false"
|
|
3056
|
+
[layout]="column.layout || 'vertical'"
|
|
2520
3057
|
(valueChange)="handleFieldChange(column.name, $event)"
|
|
2521
3058
|
>
|
|
2522
3059
|
</fv-radio-group>
|
|
@@ -2652,7 +3189,7 @@ class AddUpdateFormComponent {
|
|
|
2652
3189
|
</div>
|
|
2653
3190
|
</form>
|
|
2654
3191
|
</div>
|
|
2655
|
-
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins!important}.form-container{background:#f5f5f5;padding:10px;border-radius:8px;margin:0 auto;max-width:100%;box-sizing:border-box}.error-border{border-color:red!important}.hidden{display:none!important}.form-header{margin-bottom:10px}.form-header h2{margin:0;font-size:20px;font-weight:700;color:#303030}.dynamic-form{background:#fff;padding:10px;border-radius:6px;box-shadow:0 1px 3px #0000001a;max-width:100%;box-sizing:border-box}.form-section{margin-bottom:10px}.section-title{font-size:16px;font-weight:700;color:#303030;margin:0 0 16px;text-transform:uppercase;letter-spacing:.5px}.fields-row{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;width:100%;box-sizing:border-box;overflow:visible}.form-field-wrapper{display:flex;position:relative;flex-direction:column;min-width:0;width:100%;box-sizing:border-box;overflow:visible}.password-toggle-btn{position:absolute;right:10px;top:32px;background:none;border:none;cursor:pointer;padding:4px;color:#666}.password-toggle-btn:hover{color:#333}.password-toggle-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}@media (min-width: 1200px) and (max-width: 1400px){.fields-row{grid-template-columns:repeat(5,1fr)}.form-control{width:180px;max-width:180px}}@media (max-width: 1200px){.fields-row{grid-template-columns:repeat(3,1fr)}.form-control{width:100%;max-width:100%}}@media (max-width: 992px){.fields-row{grid-template-columns:repeat(2,1fr);gap:12px}}@media (max-width: 768px){.fields-row{grid-template-columns:repeat(2,1fr);gap:10px}}@media (max-width: 640px){.fields-row{grid-template-columns:1fr;gap:12px}.form-field-wrapper{width:100%}}label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px}.required{color:#e74c3c;margin-left:2px}.form-control{padding:5px 10px;width:100%;max-width:100%;border:1px solid #8CBBA8;border-radius:8px;background-color:#fff;font-size:14px;font-weight:400;font-family:inherit;color:#1f2b41;transition:border-color .2s,box-shadow .2s;box-sizing:border-box}.form-control:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.form-control:disabled{background-color:#ecf0f1;cursor:not-allowed}textarea.form-control{resize:vertical;min-height:100px}select.form-control{cursor:pointer;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;padding-right:40px}.checkbox-wrapper{display:flex;align-items:center;gap:8px}input[type=checkbox]{width:18px;height:18px;cursor:pointer}.checkbox-label{cursor:pointer;margin:0}.file-upload-container{display:flex;align-items:center;gap:20px;padding:20px;background:#fff;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.material-icons{font-family:Material Icons!important;border-radius:4px;display:inline-block;width:40px;padding:8px;height:40px}.file-field-wrapper{width:100%;margin-top:16px;max-width:100%;box-sizing:border-box}.photo-preview-circle{width:100px;height:100px;border-radius:50%;overflow:hidden;border:2px solid #ddd;cursor:pointer;transition:border-color .2s}.photo-preview-circle:hover{border-color:#3498db}.preview-image,.default-photo{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.preview-image img{width:100%;height:100%;object-fit:cover}.default-photo{background:#f0f0f0;color:#999;font-size:40px}.file-info{display:flex;flex-direction:column;gap:8px}.btn-delete{border:none;border-radius:4px;cursor:pointer;font-size:14px;padding:0}.upload-btn-group{display:flex;align-items:center;border:1px solid #d3d3d3;border-radius:8px;background:#fff;overflow:hidden;width:fit-content}.btn-upload{background:#fff;color:#222;border:none;padding:0 18px;font-size:16px;border-right:1px solid #e0e0e0;border-radius:8px 0 0 8px;outline:none;box-shadow:none;cursor:pointer;height:40px;transition:background .2s}.btn-upload-icon{background:#f5f5f5;border:none;border-radius:0 8px 8px 0;display:flex;align-items:center;justify-content:center;width:48px;height:40px;cursor:pointer;transition:background .2s}.btn-upload-icon i.material-icons{font-size:22px;color:#222}.btn-upload:hover,.btn-upload-icon:hover{background:#f0f0f0}.btn-delete{background:#fff;color:red}.btn-delete:hover{background:#f0f0f0}.file-name{font-size:12px;color:#666;margin:10px 8px 8px}.file-label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px;display:block}.radio-label{font-weight:600;margin-bottom:15px;color:#151d48;font-size:14px;display:block}.radio-group{display:flex;gap:20px;align-items:center}.radio-item{display:flex;align-items:center;gap:6px}input[type=radio]{width:18px;height:18px;cursor:pointer;accent-color:#3498db}.radio-option-label{cursor:pointer;margin:0;font-weight:400}.hint{font-size:12px;color:#7f8c8d;margin-top:4px}.error-message{color:#e74c3c;font-size:12px;margin-top:4px}.form-actions{display:flex;gap:8px;align-items:center;justify-content:space-between;gap:12px;padding-top:5px}.btn{padding:8px 20px;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:all .2s}.btn-primary{background-color:#006aff;color:#fff}.btn-primary:hover:not(:disabled){background-color:#2980b9}.btn-primary:disabled{background-color:#bdc3c7;cursor:not-allowed}.btn-secondary{background-color:#95a5a6;color:#fff}.btn-secondary:hover{background-color:#7f8c8d}.btn-outline{background-color:#303030;color:#fff}.btn-outline:hover{background-color:#2b2b2b;color:#fff}.month-year-wrapper{position:relative;display:flex;align-items:center;width:100%}.month-year-wrapper .form-control{padding-right:45px}.month-picker-hidden{position:absolute;opacity:0;pointer-events:none;width:0;height:0;border:none;padding:0;margin:0}.month-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.month-picker-btn:hover:not(:disabled){color:#3498db}.month-picker-btn:disabled{cursor:not-allowed;opacity:.5}.month-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}.search-select-wrapper{position:relative;width:100%}.search-select-input{padding-right:10px}.search-select-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:auto;min-width:100%;max-width:calc(100vw - 16px);background:#fff;border:1px solid #d3d3d3;border-radius:8px;max-height:220px;overflow-y:auto;box-shadow:0 4px 10px #00000014;z-index:5;padding:6px 0;transform:translate(0);transition:transform .1s ease-out}.search-select-option{padding:8px 12px;cursor:pointer;display:flex;gap:8px;align-items:center;border-bottom:1px solid #f2f2f2}.search-select-option:last-child{border-bottom:none}.search-select-option:hover{background:#f5f9ff}.option-code{color:#0052cc;font-weight:700;min-width:90px}.option-name{color:#151d48;font-weight:500}.time-picker-wrapper{position:relative;display:flex;align-items:center;width:100%}.time-input{padding-right:45px;flex:1}.time-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.time-picker-btn:hover:not(:disabled){color:#3498db}.time-picker-btn:disabled{cursor:not-allowed;opacity:.5}.time-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}input[type=time]{cursor:pointer}input[type=time]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:0;position:absolute;right:0;width:100%;height:100%}.date-picker-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-form-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-text-field-wrapper{background-color:#fff}.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#3498db}.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:red!important}.date-picker-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}.date-picker-field ::ng-deep .mat-mdc-form-field-input-control input{font-family:Poppins!important;font-size:14px;font-weight:400;color:#1f2b41}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FvEntryFieldComponent, selector: "fv-entry-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "type", "allowAlphabetsOnly", "maxLength"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvNumberFieldComponent, selector: "fv-number-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "min", "max", "step"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvDropdownComponent, selector: "fv-dropdown", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvRadioGroupComponent, selector: "fv-radio-group", inputs: ["label", "control", "options", "disabled", "required", "name"], outputs: ["valueChange"] }, { kind: "component", type: FvCheckboxComponent, selector: "fv-checkbox", inputs: ["label", "control", "disabled", "required"], outputs: ["valueChange"] }, { kind: "component", type: FvDateFieldComponent, selector: "fv-date-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvMonthYearFieldComponent, selector: "fv-month-year-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvFileSelectorComponent, selector: "fv-file-selector", inputs: ["label", "placeholder", "schema", "control", "disabled", "accept", "maxSize"], outputs: ["valueChange", "blur"] }, { kind: "component", type: FvImageSelectorComponent, selector: "fv-image-selector", inputs: ["label", "placeholder", "schema", "control", "disabled", "maxSize"], outputs: ["valueChange", "blur"] }, { kind: "component", type: FvRichTextEditorComponent, selector: "fv-rich-text-editor", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "minHeight", "showToolbar"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvNameCodeComponent, selector: "fv-name-code", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["selectionChange"] }, { kind: "component", type: FvPhoneFieldComponent, selector: "fv-phone-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvUanFieldComponent, selector: "fv-uan-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvPfFieldComponent, selector: "fv-pf-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvEsiFieldComponent, selector: "fv-esi-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIfscFieldComponent, selector: "fv-ifsc-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvMicrFieldComponent, selector: "fv-micr-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIbanFieldComponent, selector: "fv-iban-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }] });
|
|
3192
|
+
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins!important}.form-container{background:#f5f5f5;padding:5px 10px 10px;border-radius:8px;margin:0 auto;max-width:100%;box-sizing:border-box}.error-border{border-color:red!important}.hidden{display:none!important}.form-header{margin-bottom:5px}.form-header h2{margin:0;font-size:20px;font-weight:700;color:#303030}.dynamic-form{background:#fff;padding:10px;border-radius:6px;box-shadow:0 1px 3px #0000001a;max-width:100%;box-sizing:border-box}.form-section{margin-bottom:10px}.section-title{font-size:16px;font-weight:700;color:#303030;margin:0 0 16px;text-transform:uppercase;letter-spacing:.5px}.fields-row{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;width:100%;box-sizing:border-box;overflow:visible}.form-field-wrapper{display:flex;position:relative;flex-direction:column;min-width:0;width:100%;box-sizing:border-box;overflow:visible}.password-toggle-btn{position:absolute;right:10px;top:32px;background:none;border:none;cursor:pointer;padding:4px;color:#666}.password-toggle-btn:hover{color:#333}.password-toggle-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}@media (min-width: 1200px) and (max-width: 1400px){.fields-row{grid-template-columns:repeat(5,1fr)}.form-control{width:180px;max-width:180px}}@media (max-width: 1200px){.fields-row{grid-template-columns:repeat(3,1fr)}.form-control{width:100%;max-width:100%}}@media (max-width: 992px){.fields-row{grid-template-columns:repeat(2,1fr);gap:12px}}@media (max-width: 768px){.fields-row{grid-template-columns:repeat(2,1fr);gap:10px}}@media (max-width: 640px){.fields-row{grid-template-columns:1fr;gap:12px}.form-field-wrapper{width:100%}}label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px}.required{color:#e74c3c;margin-left:2px}.form-control{padding:5px 10px;width:100%;max-width:100%;height:34px;border:1px solid #8CBBA8;border-radius:8px;background-color:#fff;font-size:14px;font-weight:400;font-family:inherit;color:#1f2b41;transition:border-color .2s,box-shadow .2s;box-sizing:border-box}.form-control:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.form-control:disabled{background-color:#ecf0f1;cursor:not-allowed}textarea.form-control{resize:vertical;min-height:100px}select.form-control{cursor:pointer;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;padding-right:40px}.checkbox-wrapper{display:flex;align-items:center;gap:8px}input[type=checkbox]{width:18px;height:18px;cursor:pointer}.checkbox-label{cursor:pointer;margin:0}.file-upload-container{display:flex;align-items:center;gap:20px;padding:20px;background:#fff;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.material-icons{font-family:Material Icons!important;border-radius:4px;display:inline-block;width:40px;padding:8px;height:40px}.file-field-wrapper{width:100%;margin-top:16px;max-width:100%;box-sizing:border-box}.photo-preview-circle{width:100px;height:100px;border-radius:50%;overflow:hidden;border:2px solid #ddd;cursor:pointer;transition:border-color .2s}.photo-preview-circle:hover{border-color:#3498db}.preview-image,.default-photo{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.preview-image img{width:100%;height:100%;object-fit:cover}.default-photo{background:#f0f0f0;color:#999;font-size:40px}.file-info{display:flex;flex-direction:column;gap:8px}.btn-delete{border:none;border-radius:4px;cursor:pointer;font-size:14px;padding:0}.upload-btn-group{display:flex;align-items:center;border:1px solid #d3d3d3;border-radius:8px;background:#fff;overflow:hidden;width:fit-content}.btn-upload{background:#fff;color:#222;border:none;padding:0 18px;font-size:16px;border-right:1px solid #e0e0e0;border-radius:8px 0 0 8px;outline:none;box-shadow:none;cursor:pointer;height:40px;transition:background .2s}.btn-upload-icon{background:#f5f5f5;border:none;border-radius:0 8px 8px 0;display:flex;align-items:center;justify-content:center;width:48px;height:40px;cursor:pointer;transition:background .2s}.btn-upload-icon i.material-icons{font-size:22px;color:#222}.btn-upload:hover,.btn-upload-icon:hover{background:#f0f0f0}.btn-delete{background:#fff;color:red}.btn-delete:hover{background:#f0f0f0}.file-name{font-size:12px;color:#666;margin:10px 8px 8px}.file-label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px;display:block}.radio-label{font-weight:600;margin-bottom:15px;color:#151d48;font-size:14px;display:block}.radio-group{display:flex;gap:20px;align-items:center}.radio-item{display:flex;align-items:center;gap:6px}input[type=radio]{width:18px;height:18px;cursor:pointer;accent-color:#3498db}.radio-option-label{cursor:pointer;margin:0;font-weight:400}.hint{font-size:12px;color:#7f8c8d;margin-top:4px}.error-message{color:#e74c3c;font-size:12px;margin-top:4px}.form-actions{display:flex;gap:8px;align-items:center;justify-content:space-between;gap:12px;padding-top:5px}.btn{padding:8px 20px;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:all .2s}.btn-primary{background-color:#006aff;color:#fff}.btn-primary:hover:not(:disabled){background-color:#2980b9}.btn-primary:disabled{background-color:#bdc3c7;cursor:not-allowed}.btn-secondary{background-color:#95a5a6;color:#fff}.btn-secondary:hover{background-color:#7f8c8d}.btn-outline{background-color:#303030;color:#fff}.btn-outline:hover{background-color:#2b2b2b;color:#fff}.month-year-wrapper{position:relative;display:flex;align-items:center;width:100%}.month-year-wrapper .form-control{padding-right:45px}.month-picker-hidden{position:absolute;opacity:0;pointer-events:none;width:0;height:0;border:none;padding:0;margin:0}.month-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.month-picker-btn:hover:not(:disabled){color:#3498db}.month-picker-btn:disabled{cursor:not-allowed;opacity:.5}.month-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}.search-select-wrapper{position:relative;width:100%}.search-select-input{padding-right:10px}.search-select-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:auto;min-width:100%;max-width:calc(100vw - 16px);background:#fff;border:1px solid #d3d3d3;border-radius:8px;max-height:220px;overflow-y:auto;box-shadow:0 4px 10px #00000014;z-index:5;padding:6px 0;transform:translate(0);transition:transform .1s ease-out}.search-select-option{padding:8px 12px;cursor:pointer;display:flex;gap:8px;align-items:center;border-bottom:1px solid #f2f2f2}.search-select-option:last-child{border-bottom:none}.search-select-option:hover{background:#f5f9ff}.option-code{color:#0052cc;font-weight:700;min-width:90px}.option-name{color:#151d48;font-weight:500}.time-picker-wrapper{position:relative;display:flex;align-items:center;width:100%}.time-input{padding-right:45px;flex:1}.time-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.time-picker-btn:hover:not(:disabled){color:#3498db}.time-picker-btn:disabled{cursor:not-allowed;opacity:.5}.time-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}input[type=time]{cursor:pointer}input[type=time]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:0;position:absolute;right:0;width:100%;height:100%}.date-picker-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-form-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-text-field-wrapper{background-color:#fff}.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#3498db}.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:red!important}.date-picker-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}.date-picker-field ::ng-deep .mat-mdc-form-field-input-control input{font-family:Poppins!important;font-size:14px;font-weight:400;color:#1f2b41}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FvEntryFieldComponent, selector: "fv-entry-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "type", "allowAlphabetsOnly", "maxLength"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvNumberFieldComponent, selector: "fv-number-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "min", "max", "step"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvDropdownComponent, selector: "fv-dropdown", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvRadioGroupComponent, selector: "fv-radio-group", inputs: ["label", "control", "options", "disabled", "required", "name", "layout"], outputs: ["valueChange"] }, { kind: "component", type: FvCheckboxComponent, selector: "fv-checkbox", inputs: ["label", "control", "disabled", "required"], outputs: ["valueChange"] }, { kind: "component", type: FvDateFieldComponent, selector: "fv-date-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvMonthYearFieldComponent, selector: "fv-month-year-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvFileSelectorComponent, selector: "fv-file-selector", inputs: ["label", "placeholder", "schema", "control", "disabled", "accept", "maxSize"], outputs: ["valueChange", "blur"] }, { kind: "component", type: FvImageSelectorComponent, selector: "fv-image-selector", inputs: ["label", "placeholder", "schema", "control", "disabled", "maxSize"], outputs: ["valueChange", "blur"] }, { kind: "component", type: FvRichTextEditorComponent, selector: "fv-rich-text-editor", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "minHeight", "showToolbar"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvNameCodeComponent, selector: "fv-name-code", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["selectionChange"] }, { kind: "component", type: FvPhoneFieldComponent, selector: "fv-phone-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvUanFieldComponent, selector: "fv-uan-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvPfFieldComponent, selector: "fv-pf-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvEsiFieldComponent, selector: "fv-esi-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIfscFieldComponent, selector: "fv-ifsc-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvMicrFieldComponent, selector: "fv-micr-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIbanFieldComponent, selector: "fv-iban-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvEmailFieldComponent, selector: "fv-email-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvPasswordFieldComponent, selector: "fv-password-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly"], outputs: ["valueChange", "blur", "focus"] }] });
|
|
2656
3193
|
}
|
|
2657
3194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AddUpdateFormComponent, decorators: [{
|
|
2658
3195
|
type: Component,
|
|
@@ -2669,7 +3206,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2669
3206
|
FvFileSelectorComponent,
|
|
2670
3207
|
FvImageSelectorComponent,
|
|
2671
3208
|
FvRichTextEditorComponent,
|
|
2672
|
-
FvRichTextEditorComponent,
|
|
2673
3209
|
FvNameCodeComponent,
|
|
2674
3210
|
FvPhoneFieldComponent,
|
|
2675
3211
|
FvUanFieldComponent,
|
|
@@ -2678,6 +3214,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2678
3214
|
FvIfscFieldComponent,
|
|
2679
3215
|
FvMicrFieldComponent,
|
|
2680
3216
|
FvIbanFieldComponent,
|
|
3217
|
+
FvEmailFieldComponent,
|
|
3218
|
+
FvPasswordFieldComponent,
|
|
2681
3219
|
], template: `
|
|
2682
3220
|
<div class="form-container">
|
|
2683
3221
|
<div class="form-header" *ngIf="config.formTitle">
|
|
@@ -2699,21 +3237,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2699
3237
|
[style.grid-column]="'span ' + (column.colSpan || 1)"
|
|
2700
3238
|
>
|
|
2701
3239
|
<ng-container
|
|
2702
|
-
*ngIf="
|
|
2703
|
-
['text', 'email', 'password'].includes(column.type) &&
|
|
2704
|
-
!column.hidden
|
|
2705
|
-
"
|
|
3240
|
+
*ngIf="column.type === 'text' && !column.hidden"
|
|
2706
3241
|
>
|
|
2707
3242
|
<fv-entry-field
|
|
2708
3243
|
[label]="column.label"
|
|
2709
3244
|
[placeholder]="column.placeholder || ''"
|
|
2710
|
-
|
|
2711
|
-
column.type === 'password'
|
|
2712
|
-
? 'password'
|
|
2713
|
-
: column.type === 'email'
|
|
2714
|
-
? 'email'
|
|
2715
|
-
: 'text'
|
|
2716
|
-
"
|
|
3245
|
+
type="text"
|
|
2717
3246
|
[control]="getControl(column.name)"
|
|
2718
3247
|
[schema]="getSchema(column)"
|
|
2719
3248
|
[disabled]="column.disabled || false"
|
|
@@ -2725,6 +3254,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2725
3254
|
</fv-entry-field>
|
|
2726
3255
|
</ng-container>
|
|
2727
3256
|
|
|
3257
|
+
<ng-container
|
|
3258
|
+
*ngIf="column.type === 'email' && !column.hidden"
|
|
3259
|
+
>
|
|
3260
|
+
<fv-email-field
|
|
3261
|
+
[label]="column.label"
|
|
3262
|
+
[placeholder]="column.placeholder || ''"
|
|
3263
|
+
[control]="getControl(column.name)"
|
|
3264
|
+
[schema]="getSchema(column)"
|
|
3265
|
+
[disabled]="column.disabled || false"
|
|
3266
|
+
(valueChange)="handleFieldChange(column.name, $event)"
|
|
3267
|
+
>
|
|
3268
|
+
</fv-email-field>
|
|
3269
|
+
</ng-container>
|
|
3270
|
+
|
|
3271
|
+
<ng-container
|
|
3272
|
+
*ngIf="column.type === 'password' && !column.hidden"
|
|
3273
|
+
>
|
|
3274
|
+
<fv-password-field
|
|
3275
|
+
[label]="column.label"
|
|
3276
|
+
[placeholder]="column.placeholder || ''"
|
|
3277
|
+
[control]="getControl(column.name)"
|
|
3278
|
+
[schema]="getSchema(column)"
|
|
3279
|
+
[disabled]="column.disabled || false"
|
|
3280
|
+
(valueChange)="handleFieldChange(column.name, $event)"
|
|
3281
|
+
>
|
|
3282
|
+
</fv-password-field>
|
|
3283
|
+
</ng-container>
|
|
3284
|
+
|
|
2728
3285
|
<ng-container
|
|
2729
3286
|
*ngIf="column.type === 'number' && !column.hidden"
|
|
2730
3287
|
>
|
|
@@ -2772,6 +3329,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2772
3329
|
[options]="column.options || []"
|
|
2773
3330
|
[control]="getControl(column.name)"
|
|
2774
3331
|
[disabled]="column.disabled || false"
|
|
3332
|
+
[layout]="column.layout || 'vertical'"
|
|
2775
3333
|
(valueChange)="handleFieldChange(column.name, $event)"
|
|
2776
3334
|
>
|
|
2777
3335
|
</fv-radio-group>
|
|
@@ -2907,92 +3465,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2907
3465
|
</div>
|
|
2908
3466
|
</form>
|
|
2909
3467
|
</div>
|
|
2910
|
-
`, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins!important}.form-container{background:#f5f5f5;padding:10px;border-radius:8px;margin:0 auto;max-width:100%;box-sizing:border-box}.error-border{border-color:red!important}.hidden{display:none!important}.form-header{margin-bottom:
|
|
3468
|
+
`, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins!important}.form-container{background:#f5f5f5;padding:5px 10px 10px;border-radius:8px;margin:0 auto;max-width:100%;box-sizing:border-box}.error-border{border-color:red!important}.hidden{display:none!important}.form-header{margin-bottom:5px}.form-header h2{margin:0;font-size:20px;font-weight:700;color:#303030}.dynamic-form{background:#fff;padding:10px;border-radius:6px;box-shadow:0 1px 3px #0000001a;max-width:100%;box-sizing:border-box}.form-section{margin-bottom:10px}.section-title{font-size:16px;font-weight:700;color:#303030;margin:0 0 16px;text-transform:uppercase;letter-spacing:.5px}.fields-row{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;width:100%;box-sizing:border-box;overflow:visible}.form-field-wrapper{display:flex;position:relative;flex-direction:column;min-width:0;width:100%;box-sizing:border-box;overflow:visible}.password-toggle-btn{position:absolute;right:10px;top:32px;background:none;border:none;cursor:pointer;padding:4px;color:#666}.password-toggle-btn:hover{color:#333}.password-toggle-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}@media (min-width: 1200px) and (max-width: 1400px){.fields-row{grid-template-columns:repeat(5,1fr)}.form-control{width:180px;max-width:180px}}@media (max-width: 1200px){.fields-row{grid-template-columns:repeat(3,1fr)}.form-control{width:100%;max-width:100%}}@media (max-width: 992px){.fields-row{grid-template-columns:repeat(2,1fr);gap:12px}}@media (max-width: 768px){.fields-row{grid-template-columns:repeat(2,1fr);gap:10px}}@media (max-width: 640px){.fields-row{grid-template-columns:1fr;gap:12px}.form-field-wrapper{width:100%}}label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px}.required{color:#e74c3c;margin-left:2px}.form-control{padding:5px 10px;width:100%;max-width:100%;height:34px;border:1px solid #8CBBA8;border-radius:8px;background-color:#fff;font-size:14px;font-weight:400;font-family:inherit;color:#1f2b41;transition:border-color .2s,box-shadow .2s;box-sizing:border-box}.form-control:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.form-control:disabled{background-color:#ecf0f1;cursor:not-allowed}textarea.form-control{resize:vertical;min-height:100px}select.form-control{cursor:pointer;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;padding-right:40px}.checkbox-wrapper{display:flex;align-items:center;gap:8px}input[type=checkbox]{width:18px;height:18px;cursor:pointer}.checkbox-label{cursor:pointer;margin:0}.file-upload-container{display:flex;align-items:center;gap:20px;padding:20px;background:#fff;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.material-icons{font-family:Material Icons!important;border-radius:4px;display:inline-block;width:40px;padding:8px;height:40px}.file-field-wrapper{width:100%;margin-top:16px;max-width:100%;box-sizing:border-box}.photo-preview-circle{width:100px;height:100px;border-radius:50%;overflow:hidden;border:2px solid #ddd;cursor:pointer;transition:border-color .2s}.photo-preview-circle:hover{border-color:#3498db}.preview-image,.default-photo{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.preview-image img{width:100%;height:100%;object-fit:cover}.default-photo{background:#f0f0f0;color:#999;font-size:40px}.file-info{display:flex;flex-direction:column;gap:8px}.btn-delete{border:none;border-radius:4px;cursor:pointer;font-size:14px;padding:0}.upload-btn-group{display:flex;align-items:center;border:1px solid #d3d3d3;border-radius:8px;background:#fff;overflow:hidden;width:fit-content}.btn-upload{background:#fff;color:#222;border:none;padding:0 18px;font-size:16px;border-right:1px solid #e0e0e0;border-radius:8px 0 0 8px;outline:none;box-shadow:none;cursor:pointer;height:40px;transition:background .2s}.btn-upload-icon{background:#f5f5f5;border:none;border-radius:0 8px 8px 0;display:flex;align-items:center;justify-content:center;width:48px;height:40px;cursor:pointer;transition:background .2s}.btn-upload-icon i.material-icons{font-size:22px;color:#222}.btn-upload:hover,.btn-upload-icon:hover{background:#f0f0f0}.btn-delete{background:#fff;color:red}.btn-delete:hover{background:#f0f0f0}.file-name{font-size:12px;color:#666;margin:10px 8px 8px}.file-label{font-weight:600;margin-bottom:6px;color:#151d48;font-size:14px;display:block}.radio-label{font-weight:600;margin-bottom:15px;color:#151d48;font-size:14px;display:block}.radio-group{display:flex;gap:20px;align-items:center}.radio-item{display:flex;align-items:center;gap:6px}input[type=radio]{width:18px;height:18px;cursor:pointer;accent-color:#3498db}.radio-option-label{cursor:pointer;margin:0;font-weight:400}.hint{font-size:12px;color:#7f8c8d;margin-top:4px}.error-message{color:#e74c3c;font-size:12px;margin-top:4px}.form-actions{display:flex;gap:8px;align-items:center;justify-content:space-between;gap:12px;padding-top:5px}.btn{padding:8px 20px;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:all .2s}.btn-primary{background-color:#006aff;color:#fff}.btn-primary:hover:not(:disabled){background-color:#2980b9}.btn-primary:disabled{background-color:#bdc3c7;cursor:not-allowed}.btn-secondary{background-color:#95a5a6;color:#fff}.btn-secondary:hover{background-color:#7f8c8d}.btn-outline{background-color:#303030;color:#fff}.btn-outline:hover{background-color:#2b2b2b;color:#fff}.month-year-wrapper{position:relative;display:flex;align-items:center;width:100%}.month-year-wrapper .form-control{padding-right:45px}.month-picker-hidden{position:absolute;opacity:0;pointer-events:none;width:0;height:0;border:none;padding:0;margin:0}.month-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.month-picker-btn:hover:not(:disabled){color:#3498db}.month-picker-btn:disabled{cursor:not-allowed;opacity:.5}.month-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}.search-select-wrapper{position:relative;width:100%}.search-select-input{padding-right:10px}.search-select-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:auto;min-width:100%;max-width:calc(100vw - 16px);background:#fff;border:1px solid #d3d3d3;border-radius:8px;max-height:220px;overflow-y:auto;box-shadow:0 4px 10px #00000014;z-index:5;padding:6px 0;transform:translate(0);transition:transform .1s ease-out}.search-select-option{padding:8px 12px;cursor:pointer;display:flex;gap:8px;align-items:center;border-bottom:1px solid #f2f2f2}.search-select-option:last-child{border-bottom:none}.search-select-option:hover{background:#f5f9ff}.option-code{color:#0052cc;font-weight:700;min-width:90px}.option-name{color:#151d48;font-weight:500}.time-picker-wrapper{position:relative;display:flex;align-items:center;width:100%}.time-input{padding-right:45px;flex:1}.time-picker-btn{position:absolute;right:5px;background:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center;color:#666;transition:color .2s;z-index:1}.time-picker-btn:hover:not(:disabled){color:#3498db}.time-picker-btn:disabled{cursor:not-allowed;opacity:.5}.time-picker-btn .material-icons{font-size:20px;width:auto;height:auto;padding:0}input[type=time]{cursor:pointer}input[type=time]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:0;position:absolute;right:0;width:100%;height:100%}.date-picker-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-form-field{width:100%}.date-picker-field ::ng-deep .mat-mdc-text-field-wrapper{background-color:#fff}.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#8cbba8}.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__leading,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__notch,.date-picker-field ::ng-deep .mdc-text-field--outlined.mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#3498db}.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__leading,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__notch,.date-picker-field.error-border ::ng-deep .mdc-text-field--outlined .mdc-notched-outline__trailing{border-color:red!important}.date-picker-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}.date-picker-field ::ng-deep .mat-mdc-form-field-input-control input{font-family:Poppins!important;font-size:14px;font-weight:400;color:#1f2b41}\n"] }]
|
|
2911
3469
|
}], ctorParameters: () => [{ type: i2.FormBuilder }, { type: i0.ElementRef }], propDecorators: { config: [{
|
|
2912
3470
|
type: Input
|
|
2913
3471
|
}], validationError: [{
|
|
2914
3472
|
type: Output
|
|
2915
3473
|
}] } });
|
|
2916
3474
|
|
|
2917
|
-
class FvControlsModule {
|
|
2918
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2919
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, imports: [CommonModule,
|
|
2920
|
-
ReactiveFormsModule,
|
|
2921
|
-
FvEntryFieldComponent,
|
|
2922
|
-
FvDateFieldComponent,
|
|
2923
|
-
FvMonthYearFieldComponent,
|
|
2924
|
-
FvNumberFieldComponent,
|
|
2925
|
-
FvCheckboxComponent,
|
|
2926
|
-
FvRadioGroupComponent,
|
|
2927
|
-
FvDropdownComponent,
|
|
2928
|
-
FvFileSelectorComponent,
|
|
2929
|
-
FvImageSelectorComponent,
|
|
2930
|
-
FvRichTextEditorComponent,
|
|
2931
|
-
FvNameCodeComponent,
|
|
2932
|
-
AddUpdateFormComponent], exports: [FvEntryFieldComponent,
|
|
2933
|
-
FvDateFieldComponent,
|
|
2934
|
-
FvMonthYearFieldComponent,
|
|
2935
|
-
FvNumberFieldComponent,
|
|
2936
|
-
FvCheckboxComponent,
|
|
2937
|
-
FvRadioGroupComponent,
|
|
2938
|
-
FvDropdownComponent,
|
|
2939
|
-
FvFileSelectorComponent,
|
|
2940
|
-
FvImageSelectorComponent,
|
|
2941
|
-
FvRichTextEditorComponent,
|
|
2942
|
-
FvNameCodeComponent,
|
|
2943
|
-
AddUpdateFormComponent] });
|
|
2944
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, imports: [CommonModule,
|
|
2945
|
-
ReactiveFormsModule,
|
|
2946
|
-
FvEntryFieldComponent,
|
|
2947
|
-
FvDateFieldComponent,
|
|
2948
|
-
FvMonthYearFieldComponent,
|
|
2949
|
-
FvNumberFieldComponent,
|
|
2950
|
-
FvCheckboxComponent,
|
|
2951
|
-
FvRadioGroupComponent,
|
|
2952
|
-
FvDropdownComponent,
|
|
2953
|
-
FvFileSelectorComponent,
|
|
2954
|
-
FvImageSelectorComponent,
|
|
2955
|
-
FvRichTextEditorComponent,
|
|
2956
|
-
FvNameCodeComponent,
|
|
2957
|
-
AddUpdateFormComponent] });
|
|
2958
|
-
}
|
|
2959
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, decorators: [{
|
|
2960
|
-
type: NgModule,
|
|
2961
|
-
args: [{
|
|
2962
|
-
declarations: [],
|
|
2963
|
-
imports: [
|
|
2964
|
-
CommonModule,
|
|
2965
|
-
ReactiveFormsModule,
|
|
2966
|
-
FvEntryFieldComponent,
|
|
2967
|
-
FvDateFieldComponent,
|
|
2968
|
-
FvMonthYearFieldComponent,
|
|
2969
|
-
FvNumberFieldComponent,
|
|
2970
|
-
FvCheckboxComponent,
|
|
2971
|
-
FvRadioGroupComponent,
|
|
2972
|
-
FvDropdownComponent,
|
|
2973
|
-
FvFileSelectorComponent,
|
|
2974
|
-
FvImageSelectorComponent,
|
|
2975
|
-
FvRichTextEditorComponent,
|
|
2976
|
-
FvNameCodeComponent,
|
|
2977
|
-
AddUpdateFormComponent,
|
|
2978
|
-
],
|
|
2979
|
-
exports: [
|
|
2980
|
-
FvEntryFieldComponent,
|
|
2981
|
-
FvDateFieldComponent,
|
|
2982
|
-
FvMonthYearFieldComponent,
|
|
2983
|
-
FvNumberFieldComponent,
|
|
2984
|
-
FvCheckboxComponent,
|
|
2985
|
-
FvRadioGroupComponent,
|
|
2986
|
-
FvDropdownComponent,
|
|
2987
|
-
FvFileSelectorComponent,
|
|
2988
|
-
FvImageSelectorComponent,
|
|
2989
|
-
FvRichTextEditorComponent,
|
|
2990
|
-
FvNameCodeComponent,
|
|
2991
|
-
AddUpdateFormComponent,
|
|
2992
|
-
],
|
|
2993
|
-
}]
|
|
2994
|
-
}] });
|
|
2995
|
-
|
|
2996
3475
|
class QueryFormComponent {
|
|
2997
3476
|
fb;
|
|
2998
3477
|
config;
|
|
@@ -3062,6 +3541,39 @@ class QueryFormComponent {
|
|
|
3062
3541
|
rules.push({ name: 'required', params: { enabled: true }, errorKey: 'ERR_REQUIRED' });
|
|
3063
3542
|
errorPriority.push('required');
|
|
3064
3543
|
}
|
|
3544
|
+
if (column.type === 'email') {
|
|
3545
|
+
rules.push({
|
|
3546
|
+
name: 'regex',
|
|
3547
|
+
params: {
|
|
3548
|
+
pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
|
|
3549
|
+
},
|
|
3550
|
+
errorKey: 'ERR_EMAIL_INVALID',
|
|
3551
|
+
});
|
|
3552
|
+
errorPriority.push('regex');
|
|
3553
|
+
}
|
|
3554
|
+
if (column.type === 'pf') {
|
|
3555
|
+
rules.push({
|
|
3556
|
+
name: 'regex',
|
|
3557
|
+
params: {
|
|
3558
|
+
pattern: '^[A-Z]{2}/[A-Z]{3}/[0-9]{7}/[0-9]{3}/[0-9]{7}$'
|
|
3559
|
+
},
|
|
3560
|
+
errorKey: 'ERR_PF_INVALID'
|
|
3561
|
+
});
|
|
3562
|
+
errorPriority.push('regex');
|
|
3563
|
+
}
|
|
3564
|
+
if (column.type === 'password') {
|
|
3565
|
+
rules.push({
|
|
3566
|
+
name: 'passwordComplexity',
|
|
3567
|
+
params: {
|
|
3568
|
+
minLength: 8,
|
|
3569
|
+
requireUppercase: true,
|
|
3570
|
+
requireLowercase: true,
|
|
3571
|
+
requireNumber: true,
|
|
3572
|
+
requireSpecialChar: true
|
|
3573
|
+
}
|
|
3574
|
+
});
|
|
3575
|
+
errorPriority.push('passwordComplexity');
|
|
3576
|
+
}
|
|
3065
3577
|
return {
|
|
3066
3578
|
controlType: this.mapType(column.type),
|
|
3067
3579
|
rules: rules,
|
|
@@ -3084,6 +3596,8 @@ class QueryFormComponent {
|
|
|
3084
3596
|
case 'ifsc': return 'IfscField';
|
|
3085
3597
|
case 'micr': return 'MicrField';
|
|
3086
3598
|
case 'iban': return 'IbanField';
|
|
3599
|
+
case 'email': return 'EmailField';
|
|
3600
|
+
case 'password': return 'PasswordField';
|
|
3087
3601
|
default: return 'EntryField';
|
|
3088
3602
|
}
|
|
3089
3603
|
}
|
|
@@ -3289,6 +3803,14 @@ class QueryFormComponent {
|
|
|
3289
3803
|
<ng-container *ngIf="column.type === 'iban'">
|
|
3290
3804
|
<fv-iban-field [label]="column.label" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-iban-field>
|
|
3291
3805
|
</ng-container>
|
|
3806
|
+
|
|
3807
|
+
<ng-container *ngIf="column.type === 'email'">
|
|
3808
|
+
<fv-email-field [label]="column.label" [placeholder]="column.placeholder || ''" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-email-field>
|
|
3809
|
+
</ng-container>
|
|
3810
|
+
|
|
3811
|
+
<ng-container *ngIf="column.type === 'password'">
|
|
3812
|
+
<fv-password-field [label]="column.label" [placeholder]="column.placeholder || ''" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-password-field>
|
|
3813
|
+
</ng-container>
|
|
3292
3814
|
</div>
|
|
3293
3815
|
</div>
|
|
3294
3816
|
|
|
@@ -3315,7 +3837,7 @@ class QueryFormComponent {
|
|
|
3315
3837
|
</form>
|
|
3316
3838
|
</div>
|
|
3317
3839
|
</div>
|
|
3318
|
-
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins}.material-icons{font-family:Material Icons!important;font-size:22px;display:inline-block}.cont{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.validation-message{background-color:#fee;color:#c33;padding:12px 16px;border-radius:8px;margin:10px 0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;border:1px solid #fcc}.export-buttons{display:flex;gap:10px}.export-btn{cursor:pointer;display:flex;align-items:center;gap:5px;transition:all .3s ease;border:none;padding:8px 16px;border-radius:7px;background:#006aff;color:#fff}.export-btn:hover{background:#0045a6;box-shadow:0 4px 8px #00000026}.export-menu-container{position:relative;border-radius:7px}.export-menu{position:absolute;top:100%;right:0;background:#fff;border-radius:4px;box-shadow:0 4px 12px #00000026;margin-top:5px;min-width:180px;z-index:1000}.menu-item{width:100%;color:#000;text-align:left;background:#fff;border:none;cursor:pointer;font-size:14px;transition:background .2s;padding:12px 16px;display:flex;align-items:center;gap:10px}.menu-item:hover{background:#f5f5f5}.query-form-container{background:#f2f2f2;border-radius:8px;padding:10px;margin:auto;box-shadow:0 2px 5px #0000001a;margin-bottom:1rem;overflow:visible}.form-title{font-size:20px;font-weight:700;color:#303030;margin:0;font-family:Poppins}.form-content{display:flex;flex-direction:column;gap:5px;background-color:#fff;padding:10px;border:.5px solid #cfcfcf;border-radius:12px;overflow:visible}.form-row{display:grid;grid-template-columns:repeat(auto-
|
|
3840
|
+
`, isInline: true, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins}.material-icons{font-family:Material Icons!important;font-size:22px;display:inline-block}.cont{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.validation-message{background-color:#fee;color:#c33;padding:12px 16px;border-radius:8px;margin:10px 0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;border:1px solid #fcc}.export-buttons{display:flex;gap:10px}.export-btn{cursor:pointer;display:flex;align-items:center;gap:5px;transition:all .3s ease;border:none;padding:8px 16px;border-radius:7px;background:#006aff;color:#fff}.export-btn:hover{background:#0045a6;box-shadow:0 4px 8px #00000026}.export-menu-container{position:relative;border-radius:7px}.export-menu{position:absolute;top:100%;right:0;background:#fff;border-radius:4px;box-shadow:0 4px 12px #00000026;margin-top:5px;min-width:180px;z-index:1000}.menu-item{width:100%;color:#000;text-align:left;background:#fff;border:none;cursor:pointer;font-size:14px;transition:background .2s;padding:12px 16px;display:flex;align-items:center;gap:10px}.menu-item:hover{background:#f5f5f5}.query-form-container{background:#f2f2f2;border-radius:8px;padding:5px 10px 10px;margin:auto;box-shadow:0 2px 5px #0000001a;margin-bottom:1rem;overflow:visible}.form-title{font-size:20px;font-weight:700;color:#303030;margin:0;font-family:Poppins}.form-content{display:flex;flex-direction:column;gap:5px;background-color:#fff;padding:10px;border:.5px solid #cfcfcf;border-radius:12px;overflow:visible}.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;width:100%;box-sizing:border-box;overflow:visible}.form-field{display:flex;flex-direction:column;min-width:0;width:100%;position:relative;overflow:visible;box-sizing:border-box}.view-button{padding:8px 20px;background:#006aff;color:#fff;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .2s}.view-button:hover{background:#0045a6}.button-row{display:flex;justify-content:space-between;gap:12px;padding-top:5px;margin-top:5px}.back-button{padding:8px 20px;background-color:#303030;color:#fff;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .2s}.back-button:hover{background-color:#2b2b2b}@media (min-width: 1200px) and (max-width: 1400px){.form-row{grid-template-columns:repeat(5,1fr)}}@media (max-width: 1200px){.form-row{grid-template-columns:repeat(3,1fr)}}@media (max-width: 992px){.form-row{grid-template-columns:repeat(2,1fr);gap:12px}}@media (max-width: 768px){.form-row{grid-template-columns:repeat(2,1fr);gap:10px}}@media (max-width: 640px){.form-row{grid-template-columns:1fr;gap:12px}.form-field{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FvEntryFieldComponent, selector: "fv-entry-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "type", "allowAlphabetsOnly", "maxLength"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvDropdownComponent, selector: "fv-dropdown", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvNumberFieldComponent, selector: "fv-number-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly", "min", "max", "step"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvDateFieldComponent, selector: "fv-date-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvMonthYearFieldComponent, selector: "fv-month-year-field", inputs: ["label", "schema", "control", "disabled", "readonly", "min", "max"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvFileSelectorComponent, selector: "fv-file-selector", inputs: ["label", "placeholder", "schema", "control", "disabled", "accept", "maxSize"], outputs: ["valueChange", "blur"] }, { kind: "component", type: FvNameCodeComponent, selector: "fv-name-code", inputs: ["label", "placeholder", "options", "schema", "control", "disabled"], outputs: ["selectionChange"] }, { kind: "component", type: FvPhoneFieldComponent, selector: "fv-phone-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvUanFieldComponent, selector: "fv-uan-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvPfFieldComponent, selector: "fv-pf-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvEsiFieldComponent, selector: "fv-esi-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIfscFieldComponent, selector: "fv-ifsc-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvMicrFieldComponent, selector: "fv-micr-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvIbanFieldComponent, selector: "fv-iban-field", inputs: ["label", "control", "disabled", "schema"], outputs: ["blur", "focus"] }, { kind: "component", type: FvEmailFieldComponent, selector: "fv-email-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly"], outputs: ["valueChange", "blur", "focus"] }, { kind: "component", type: FvPasswordFieldComponent, selector: "fv-password-field", inputs: ["label", "placeholder", "schema", "control", "disabled", "readonly"], outputs: ["valueChange", "blur", "focus"] }] });
|
|
3319
3841
|
}
|
|
3320
3842
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QueryFormComponent, decorators: [{
|
|
3321
3843
|
type: Component,
|
|
@@ -3336,6 +3858,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3336
3858
|
FvIfscFieldComponent,
|
|
3337
3859
|
FvMicrFieldComponent,
|
|
3338
3860
|
FvIbanFieldComponent,
|
|
3861
|
+
FvEmailFieldComponent,
|
|
3862
|
+
FvPasswordFieldComponent,
|
|
3339
3863
|
], template: `
|
|
3340
3864
|
<div class="query-form-container">
|
|
3341
3865
|
<div class="d-flex cont">
|
|
@@ -3501,6 +4025,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3501
4025
|
<ng-container *ngIf="column.type === 'iban'">
|
|
3502
4026
|
<fv-iban-field [label]="column.label" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-iban-field>
|
|
3503
4027
|
</ng-container>
|
|
4028
|
+
|
|
4029
|
+
<ng-container *ngIf="column.type === 'email'">
|
|
4030
|
+
<fv-email-field [label]="column.label" [placeholder]="column.placeholder || ''" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-email-field>
|
|
4031
|
+
</ng-container>
|
|
4032
|
+
|
|
4033
|
+
<ng-container *ngIf="column.type === 'password'">
|
|
4034
|
+
<fv-password-field [label]="column.label" [placeholder]="column.placeholder || ''" [control]="getControl(column.key)" [schema]="getSchema(column)" [disabled]="column.readonly || false"></fv-password-field>
|
|
4035
|
+
</ng-container>
|
|
3504
4036
|
</div>
|
|
3505
4037
|
</div>
|
|
3506
4038
|
|
|
@@ -3527,7 +4059,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3527
4059
|
</form>
|
|
3528
4060
|
</div>
|
|
3529
4061
|
</div>
|
|
3530
|
-
`, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins}.material-icons{font-family:Material Icons!important;font-size:22px;display:inline-block}.cont{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.validation-message{background-color:#fee;color:#c33;padding:12px 16px;border-radius:8px;margin:10px 0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;border:1px solid #fcc}.export-buttons{display:flex;gap:10px}.export-btn{cursor:pointer;display:flex;align-items:center;gap:5px;transition:all .3s ease;border:none;padding:8px 16px;border-radius:7px;background:#006aff;color:#fff}.export-btn:hover{background:#0045a6;box-shadow:0 4px 8px #00000026}.export-menu-container{position:relative;border-radius:7px}.export-menu{position:absolute;top:100%;right:0;background:#fff;border-radius:4px;box-shadow:0 4px 12px #00000026;margin-top:5px;min-width:180px;z-index:1000}.menu-item{width:100%;color:#000;text-align:left;background:#fff;border:none;cursor:pointer;font-size:14px;transition:background .2s;padding:12px 16px;display:flex;align-items:center;gap:10px}.menu-item:hover{background:#f5f5f5}.query-form-container{background:#f2f2f2;border-radius:8px;padding:10px;margin:auto;box-shadow:0 2px 5px #0000001a;margin-bottom:1rem;overflow:visible}.form-title{font-size:20px;font-weight:700;color:#303030;margin:0;font-family:Poppins}.form-content{display:flex;flex-direction:column;gap:5px;background-color:#fff;padding:10px;border:.5px solid #cfcfcf;border-radius:12px;overflow:visible}.form-row{display:grid;grid-template-columns:repeat(auto-
|
|
4062
|
+
`, styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";@import\"https://fonts.googleapis.com/icon?family=Material+Icons\";*{font-family:Poppins}.material-icons{font-family:Material Icons!important;font-size:22px;display:inline-block}.cont{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.validation-message{background-color:#fee;color:#c33;padding:12px 16px;border-radius:8px;margin:10px 0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;border:1px solid #fcc}.export-buttons{display:flex;gap:10px}.export-btn{cursor:pointer;display:flex;align-items:center;gap:5px;transition:all .3s ease;border:none;padding:8px 16px;border-radius:7px;background:#006aff;color:#fff}.export-btn:hover{background:#0045a6;box-shadow:0 4px 8px #00000026}.export-menu-container{position:relative;border-radius:7px}.export-menu{position:absolute;top:100%;right:0;background:#fff;border-radius:4px;box-shadow:0 4px 12px #00000026;margin-top:5px;min-width:180px;z-index:1000}.menu-item{width:100%;color:#000;text-align:left;background:#fff;border:none;cursor:pointer;font-size:14px;transition:background .2s;padding:12px 16px;display:flex;align-items:center;gap:10px}.menu-item:hover{background:#f5f5f5}.query-form-container{background:#f2f2f2;border-radius:8px;padding:5px 10px 10px;margin:auto;box-shadow:0 2px 5px #0000001a;margin-bottom:1rem;overflow:visible}.form-title{font-size:20px;font-weight:700;color:#303030;margin:0;font-family:Poppins}.form-content{display:flex;flex-direction:column;gap:5px;background-color:#fff;padding:10px;border:.5px solid #cfcfcf;border-radius:12px;overflow:visible}.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;width:100%;box-sizing:border-box;overflow:visible}.form-field{display:flex;flex-direction:column;min-width:0;width:100%;position:relative;overflow:visible;box-sizing:border-box}.view-button{padding:8px 20px;background:#006aff;color:#fff;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .2s}.view-button:hover{background:#0045a6}.button-row{display:flex;justify-content:space-between;gap:12px;padding-top:5px;margin-top:5px}.back-button{padding:8px 20px;background-color:#303030;color:#fff;border:none;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .2s}.back-button:hover{background-color:#2b2b2b}@media (min-width: 1200px) and (max-width: 1400px){.form-row{grid-template-columns:repeat(5,1fr)}}@media (max-width: 1200px){.form-row{grid-template-columns:repeat(3,1fr)}}@media (max-width: 992px){.form-row{grid-template-columns:repeat(2,1fr);gap:12px}}@media (max-width: 768px){.form-row{grid-template-columns:repeat(2,1fr);gap:10px}}@media (max-width: 640px){.form-row{grid-template-columns:1fr;gap:12px}.form-field{width:100%}}\n"] }]
|
|
3531
4063
|
}], ctorParameters: () => [{ type: i2.FormBuilder }], propDecorators: { config: [{
|
|
3532
4064
|
type: Input
|
|
3533
4065
|
}], onSubmit: [{
|
|
@@ -3541,6 +4073,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3541
4073
|
args: ['document:click', ['$event']]
|
|
3542
4074
|
}] } });
|
|
3543
4075
|
|
|
4076
|
+
class FvControlsModule {
|
|
4077
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4078
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, imports: [CommonModule,
|
|
4079
|
+
ReactiveFormsModule,
|
|
4080
|
+
FvEntryFieldComponent,
|
|
4081
|
+
FvDateFieldComponent,
|
|
4082
|
+
FvMonthYearFieldComponent,
|
|
4083
|
+
FvNumberFieldComponent,
|
|
4084
|
+
FvCheckboxComponent,
|
|
4085
|
+
FvRadioGroupComponent,
|
|
4086
|
+
FvDropdownComponent,
|
|
4087
|
+
FvFileSelectorComponent,
|
|
4088
|
+
FvImageSelectorComponent,
|
|
4089
|
+
FvRichTextEditorComponent,
|
|
4090
|
+
FvNameCodeComponent,
|
|
4091
|
+
AddUpdateFormComponent,
|
|
4092
|
+
QueryFormComponent,
|
|
4093
|
+
FvEmailFieldComponent,
|
|
4094
|
+
FvPasswordFieldComponent], exports: [FvEntryFieldComponent,
|
|
4095
|
+
FvDateFieldComponent,
|
|
4096
|
+
FvMonthYearFieldComponent,
|
|
4097
|
+
FvNumberFieldComponent,
|
|
4098
|
+
FvCheckboxComponent,
|
|
4099
|
+
FvRadioGroupComponent,
|
|
4100
|
+
FvDropdownComponent,
|
|
4101
|
+
FvFileSelectorComponent,
|
|
4102
|
+
FvImageSelectorComponent,
|
|
4103
|
+
FvRichTextEditorComponent,
|
|
4104
|
+
FvNameCodeComponent,
|
|
4105
|
+
AddUpdateFormComponent,
|
|
4106
|
+
QueryFormComponent,
|
|
4107
|
+
FvEmailFieldComponent,
|
|
4108
|
+
FvPasswordFieldComponent] });
|
|
4109
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, imports: [CommonModule,
|
|
4110
|
+
ReactiveFormsModule,
|
|
4111
|
+
FvEntryFieldComponent,
|
|
4112
|
+
FvDateFieldComponent,
|
|
4113
|
+
FvMonthYearFieldComponent,
|
|
4114
|
+
FvNumberFieldComponent,
|
|
4115
|
+
FvCheckboxComponent,
|
|
4116
|
+
FvRadioGroupComponent,
|
|
4117
|
+
FvDropdownComponent,
|
|
4118
|
+
FvFileSelectorComponent,
|
|
4119
|
+
FvImageSelectorComponent,
|
|
4120
|
+
FvRichTextEditorComponent,
|
|
4121
|
+
FvNameCodeComponent,
|
|
4122
|
+
AddUpdateFormComponent,
|
|
4123
|
+
QueryFormComponent,
|
|
4124
|
+
FvEmailFieldComponent,
|
|
4125
|
+
FvPasswordFieldComponent] });
|
|
4126
|
+
}
|
|
4127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvControlsModule, decorators: [{
|
|
4128
|
+
type: NgModule,
|
|
4129
|
+
args: [{
|
|
4130
|
+
declarations: [],
|
|
4131
|
+
imports: [
|
|
4132
|
+
CommonModule,
|
|
4133
|
+
ReactiveFormsModule,
|
|
4134
|
+
FvEntryFieldComponent,
|
|
4135
|
+
FvDateFieldComponent,
|
|
4136
|
+
FvMonthYearFieldComponent,
|
|
4137
|
+
FvNumberFieldComponent,
|
|
4138
|
+
FvCheckboxComponent,
|
|
4139
|
+
FvRadioGroupComponent,
|
|
4140
|
+
FvDropdownComponent,
|
|
4141
|
+
FvFileSelectorComponent,
|
|
4142
|
+
FvImageSelectorComponent,
|
|
4143
|
+
FvRichTextEditorComponent,
|
|
4144
|
+
FvNameCodeComponent,
|
|
4145
|
+
AddUpdateFormComponent,
|
|
4146
|
+
QueryFormComponent,
|
|
4147
|
+
FvEmailFieldComponent,
|
|
4148
|
+
FvPasswordFieldComponent,
|
|
4149
|
+
],
|
|
4150
|
+
exports: [
|
|
4151
|
+
FvEntryFieldComponent,
|
|
4152
|
+
FvDateFieldComponent,
|
|
4153
|
+
FvMonthYearFieldComponent,
|
|
4154
|
+
FvNumberFieldComponent,
|
|
4155
|
+
FvCheckboxComponent,
|
|
4156
|
+
FvRadioGroupComponent,
|
|
4157
|
+
FvDropdownComponent,
|
|
4158
|
+
FvFileSelectorComponent,
|
|
4159
|
+
FvImageSelectorComponent,
|
|
4160
|
+
FvRichTextEditorComponent,
|
|
4161
|
+
FvNameCodeComponent,
|
|
4162
|
+
AddUpdateFormComponent,
|
|
4163
|
+
QueryFormComponent,
|
|
4164
|
+
FvEmailFieldComponent,
|
|
4165
|
+
FvPasswordFieldComponent,
|
|
4166
|
+
],
|
|
4167
|
+
}]
|
|
4168
|
+
}] });
|
|
4169
|
+
|
|
3544
4170
|
/*
|
|
3545
4171
|
* Public API Surface of fv-controls
|
|
3546
4172
|
*/
|
|
@@ -3549,5 +4175,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3549
4175
|
* Generated bundle index. Do not edit.
|
|
3550
4176
|
*/
|
|
3551
4177
|
|
|
3552
|
-
export { AddUpdateFormComponent, FvCheckboxComponent, FvControlsModule, FvDateFieldComponent, FvDropdownComponent, FvEntryFieldComponent, FvEsiFieldComponent, FvFileSelectorComponent, FvIbanFieldComponent, FvIfscFieldComponent, FvImageSelectorComponent, FvMicrFieldComponent, FvMonthYearFieldComponent, FvNameCodeComponent, FvNumberFieldComponent, FvPfFieldComponent, FvPhoneFieldComponent, FvRadioGroupComponent, FvRichTextEditorComponent, FvUanFieldComponent, QueryFormComponent };
|
|
4178
|
+
export { AddUpdateFormComponent, FvCheckboxComponent, FvControlsModule, FvDateFieldComponent, FvDropdownComponent, FvEmailFieldComponent, FvEntryFieldComponent, FvEsiFieldComponent, FvFileSelectorComponent, FvIbanFieldComponent, FvIfscFieldComponent, FvImageSelectorComponent, FvMicrFieldComponent, FvMonthYearFieldComponent, FvNameCodeComponent, FvNumberFieldComponent, FvPasswordFieldComponent, FvPfFieldComponent, FvPhoneFieldComponent, FvRadioGroupComponent, FvRichTextEditorComponent, FvUanFieldComponent, QueryFormComponent };
|
|
3553
4179
|
//# sourceMappingURL=fovestta2-web-angular.mjs.map
|