@fovestta2/web-angular 1.0.19 → 1.0.22
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/fv-document-field/fv-document-field.component.mjs +3 -3
- package/esm2022/lib/fv-dropdown/fv-dropdown.component.mjs +111 -37
- package/esm2022/lib/fv-file-selector/fv-file-selector.component.mjs +3 -3
- package/esm2022/lib/fv-image-selector/fv-image-selector.component.mjs +3 -3
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/fovestta2-web-angular.mjs +116 -42
- package/fesm2022/fovestta2-web-angular.mjs.map +1 -1
- package/lib/fv-dropdown/fv-dropdown.component.d.ts +19 -5
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -659,7 +659,7 @@ class FvDropdownComponent {
|
|
|
659
659
|
console.error('FvDropdown: control is required');
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
|
-
this.
|
|
662
|
+
this.filterOptions('');
|
|
663
663
|
if (!this.schema) {
|
|
664
664
|
console.warn('FvDropdown: schema is not provided, validation will be skipped');
|
|
665
665
|
return;
|
|
@@ -669,7 +669,7 @@ class FvDropdownComponent {
|
|
|
669
669
|
this.validateValue(value);
|
|
670
670
|
this.valueChange.emit(value);
|
|
671
671
|
// Sync search text
|
|
672
|
-
const selected = this.
|
|
672
|
+
const selected = this.findOption(value);
|
|
673
673
|
if (selected) {
|
|
674
674
|
this.searchControl.setValue(selected.label, { emitEvent: false });
|
|
675
675
|
}
|
|
@@ -684,7 +684,7 @@ class FvDropdownComponent {
|
|
|
684
684
|
// Validate initial value
|
|
685
685
|
this.validateValue(this.control.value);
|
|
686
686
|
if (this.control.value) {
|
|
687
|
-
const selected = this.
|
|
687
|
+
const selected = this.findOption(this.control.value);
|
|
688
688
|
if (selected) {
|
|
689
689
|
this.searchControl.setValue(selected.label, { emitEvent: false });
|
|
690
690
|
}
|
|
@@ -695,11 +695,8 @@ class FvDropdownComponent {
|
|
|
695
695
|
}
|
|
696
696
|
ngOnChanges(changes) {
|
|
697
697
|
if (changes['options'] && changes['options'].currentValue) {
|
|
698
|
-
this.filteredOptions = this.options;
|
|
699
698
|
// Re-filter if search text exists
|
|
700
|
-
|
|
701
|
-
this.filterOptions(this.searchControl.value);
|
|
702
|
-
}
|
|
699
|
+
this.filterOptions(this.searchControl.value || '');
|
|
703
700
|
}
|
|
704
701
|
if (changes['disabled']) {
|
|
705
702
|
if (this.disabled) {
|
|
@@ -723,14 +720,72 @@ class FvDropdownComponent {
|
|
|
723
720
|
}
|
|
724
721
|
}
|
|
725
722
|
filterOptions(term) {
|
|
726
|
-
|
|
727
|
-
|
|
723
|
+
this.filteredOptions = this.generateViewItems(this.options, term);
|
|
724
|
+
// Adjust highlight index if needed (reset if search changed)
|
|
725
|
+
if (this.filteredOptions.length === 1 && !this.filteredOptions[0].isGroupLabel) {
|
|
726
|
+
this.highlightedIndex = 0;
|
|
728
727
|
}
|
|
729
728
|
else {
|
|
730
|
-
|
|
731
|
-
|
|
729
|
+
this.highlightedIndex = -1;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
// Flattens the mixed options input into a view-ready list
|
|
733
|
+
generateViewItems(options, term) {
|
|
734
|
+
const result = [];
|
|
735
|
+
const lowerTerm = term ? term.toLowerCase() : '';
|
|
736
|
+
for (const item of options) {
|
|
737
|
+
if (this.isGroup(item)) {
|
|
738
|
+
// It's a group
|
|
739
|
+
let matchingItems = item.items;
|
|
740
|
+
if (lowerTerm) {
|
|
741
|
+
matchingItems = item.items.filter(opt => opt.label.toLowerCase().includes(lowerTerm));
|
|
742
|
+
}
|
|
743
|
+
if (matchingItems.length > 0) {
|
|
744
|
+
// Add header
|
|
745
|
+
result.push({ isGroupLabel: true, label: item.label });
|
|
746
|
+
// Add items
|
|
747
|
+
matchingItems.forEach(opt => {
|
|
748
|
+
result.push({
|
|
749
|
+
isGroupLabel: false,
|
|
750
|
+
label: opt.label,
|
|
751
|
+
value: opt.value,
|
|
752
|
+
option: opt,
|
|
753
|
+
isChild: true
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
// It's a standalone option
|
|
760
|
+
if (!lowerTerm || item.label.toLowerCase().includes(lowerTerm)) {
|
|
761
|
+
result.push({
|
|
762
|
+
isGroupLabel: false,
|
|
763
|
+
label: item.label,
|
|
764
|
+
value: item.value,
|
|
765
|
+
option: item,
|
|
766
|
+
isChild: false
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
return result;
|
|
772
|
+
}
|
|
773
|
+
isGroup(item) {
|
|
774
|
+
return 'items' in item && Array.isArray(item.items);
|
|
775
|
+
}
|
|
776
|
+
findOption(value) {
|
|
777
|
+
for (const item of this.options) {
|
|
778
|
+
if (this.isGroup(item)) {
|
|
779
|
+
const found = item.items.find(opt => opt.value === value);
|
|
780
|
+
if (found)
|
|
781
|
+
return found;
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
if (item.value === value)
|
|
785
|
+
return item;
|
|
786
|
+
}
|
|
732
787
|
}
|
|
733
|
-
|
|
788
|
+
return undefined;
|
|
734
789
|
}
|
|
735
790
|
toggleDropdown() {
|
|
736
791
|
if (!this.disabled) {
|
|
@@ -746,16 +801,25 @@ class FvDropdownComponent {
|
|
|
746
801
|
if (!this.disabled) {
|
|
747
802
|
this.isOpen = true;
|
|
748
803
|
this.focus.emit();
|
|
749
|
-
// Filter based on current text
|
|
804
|
+
// Filter based on current text
|
|
750
805
|
this.filterOptions(this.searchControl.value || '');
|
|
751
|
-
|
|
806
|
+
// Highlight selected option if available
|
|
807
|
+
if (this.control.value) {
|
|
808
|
+
const idx = this.filteredOptions.findIndex(v => !v.isGroupLabel && v.value === this.control.value);
|
|
809
|
+
if (idx >= 0)
|
|
810
|
+
this.highlightedIndex = idx;
|
|
811
|
+
}
|
|
812
|
+
else if (this.filteredOptions.length === 1 && !this.filteredOptions[0].isGroupLabel) {
|
|
813
|
+
this.highlightedIndex = 0;
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
this.highlightedIndex = -1;
|
|
817
|
+
}
|
|
752
818
|
}
|
|
753
819
|
}
|
|
754
820
|
onContainerClick(event) {
|
|
755
821
|
if (this.disabled)
|
|
756
822
|
return;
|
|
757
|
-
// If click is on the arrow or input, let them handle it.
|
|
758
|
-
// But if on the padding of div, focus input.
|
|
759
823
|
const target = event.target;
|
|
760
824
|
if (!target.classList.contains('fv-dropdown-input') && !target.classList.contains('fv-dropdown-arrow')) {
|
|
761
825
|
this.searchInput.nativeElement.focus();
|
|
@@ -767,7 +831,7 @@ class FvDropdownComponent {
|
|
|
767
831
|
this.isOpen = false;
|
|
768
832
|
this.highlightedIndex = -1;
|
|
769
833
|
// Restore label
|
|
770
|
-
const selected = this.
|
|
834
|
+
const selected = this.findOption(this.control.value);
|
|
771
835
|
if (selected) {
|
|
772
836
|
this.searchControl.setValue(selected.label, { emitEvent: false });
|
|
773
837
|
}
|
|
@@ -776,14 +840,14 @@ class FvDropdownComponent {
|
|
|
776
840
|
this.searchControl.setValue('', { emitEvent: false });
|
|
777
841
|
}
|
|
778
842
|
}
|
|
779
|
-
selectOption(
|
|
780
|
-
if (!option)
|
|
843
|
+
selectOption(viewItem) {
|
|
844
|
+
if (viewItem.isGroupLabel || !viewItem.option)
|
|
781
845
|
return;
|
|
782
|
-
this.control.setValue(
|
|
783
|
-
this.searchControl.setValue(
|
|
846
|
+
this.control.setValue(viewItem.value);
|
|
847
|
+
this.searchControl.setValue(viewItem.label, { emitEvent: false });
|
|
784
848
|
this.isOpen = false;
|
|
785
849
|
this.highlightedIndex = -1;
|
|
786
|
-
this.searchInput.nativeElement.blur();
|
|
850
|
+
this.searchInput.nativeElement.blur();
|
|
787
851
|
this.blur.emit();
|
|
788
852
|
}
|
|
789
853
|
onKeyDown(event) {
|
|
@@ -797,20 +861,17 @@ class FvDropdownComponent {
|
|
|
797
861
|
switch (event.key) {
|
|
798
862
|
case 'ArrowDown':
|
|
799
863
|
event.preventDefault();
|
|
800
|
-
this.
|
|
864
|
+
this.moveHighlight(1);
|
|
801
865
|
this.scrollToHighlighted();
|
|
802
866
|
break;
|
|
803
867
|
case 'ArrowUp':
|
|
804
868
|
event.preventDefault();
|
|
805
|
-
this.
|
|
869
|
+
this.moveHighlight(-1);
|
|
806
870
|
this.scrollToHighlighted();
|
|
807
871
|
break;
|
|
808
872
|
case 'Enter':
|
|
809
873
|
event.preventDefault();
|
|
810
|
-
if (this.filteredOptions.length
|
|
811
|
-
this.selectOption(this.filteredOptions[0]);
|
|
812
|
-
}
|
|
813
|
-
else if (this.highlightedIndex >= 0 && this.highlightedIndex < this.filteredOptions.length) {
|
|
874
|
+
if (this.highlightedIndex >= 0 && this.highlightedIndex < this.filteredOptions.length) {
|
|
814
875
|
this.selectOption(this.filteredOptions[this.highlightedIndex]);
|
|
815
876
|
}
|
|
816
877
|
break;
|
|
@@ -822,6 +883,21 @@ class FvDropdownComponent {
|
|
|
822
883
|
break;
|
|
823
884
|
}
|
|
824
885
|
}
|
|
886
|
+
moveHighlight(step) {
|
|
887
|
+
let nextIndex = this.highlightedIndex;
|
|
888
|
+
const len = this.filteredOptions.length;
|
|
889
|
+
if (len === 0)
|
|
890
|
+
return;
|
|
891
|
+
// Loop to find next non-group item
|
|
892
|
+
// Max iterations to avoid infinite loop (though unlikely)
|
|
893
|
+
for (let i = 0; i < len; i++) {
|
|
894
|
+
nextIndex = (nextIndex + step + len) % len;
|
|
895
|
+
if (!this.filteredOptions[nextIndex].isGroupLabel) {
|
|
896
|
+
this.highlightedIndex = nextIndex;
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
825
901
|
scrollToHighlighted() {
|
|
826
902
|
const list = this.el.nativeElement.querySelector('.fv-dropdown-options');
|
|
827
903
|
const items = this.el.nativeElement.querySelectorAll('.fv-dropdown-option');
|
|
@@ -866,19 +942,17 @@ class FvDropdownComponent {
|
|
|
866
942
|
};
|
|
867
943
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
868
944
|
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
isSelected(option) {
|
|
874
|
-
return option.value === this.control?.value;
|
|
945
|
+
isSelected(viewItem) {
|
|
946
|
+
if (viewItem.value === undefined || viewItem.value === null)
|
|
947
|
+
return false;
|
|
948
|
+
return viewItem.value === this.control?.value;
|
|
875
949
|
}
|
|
876
950
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
877
|
-
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 && control?.touched\"\r\n [class.fv-dropdown-disabled]=\"disabled\" [class.fv-dropdown-open]=\"isOpen\"\r\n (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 <
|
|
951
|
+
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 && control?.touched\"\r\n [class.fv-dropdown-disabled]=\"disabled\" [class.fv-dropdown-open]=\"isOpen\"\r\n (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 <ng-container *ngFor=\"let option of filteredOptions; let i = index\">\r\n <div *ngIf=\"option.isGroupLabel\" class=\"fv-dropdown-group-label\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"!option.isGroupLabel\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\"\r\n [class.fv-dropdown-option-highlighted]=\"i === highlightedIndex\"\r\n [class.child-option]=\"option.isChild\" (mouseenter)=\"highlightedIndex = i\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n </ng-container>\r\n\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 && control?.touched\" 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:#151d48;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}.fv-dropdown-group-label{font-weight:600;color:#151d48;padding:8px 16px;background-color:#f9f9f9;cursor:default;pointer-events:none;font-size:14px;letter-spacing:normal;border-bottom:1px solid #eee}.fv-dropdown-option.child-option{padding-left:32px}\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"] }] });
|
|
878
952
|
}
|
|
879
953
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDropdownComponent, decorators: [{
|
|
880
954
|
type: Component,
|
|
881
|
-
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 && control?.touched\"\r\n [class.fv-dropdown-disabled]=\"disabled\" [class.fv-dropdown-open]=\"isOpen\"\r\n (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 <
|
|
955
|
+
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 && control?.touched\"\r\n [class.fv-dropdown-disabled]=\"disabled\" [class.fv-dropdown-open]=\"isOpen\"\r\n (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 <ng-container *ngFor=\"let option of filteredOptions; let i = index\">\r\n <div *ngIf=\"option.isGroupLabel\" class=\"fv-dropdown-group-label\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"!option.isGroupLabel\" class=\"fv-dropdown-option\"\r\n [class.fv-dropdown-option-selected]=\"isSelected(option)\"\r\n [class.fv-dropdown-option-highlighted]=\"i === highlightedIndex\"\r\n [class.child-option]=\"option.isChild\" (mouseenter)=\"highlightedIndex = i\"\r\n (click)=\"selectOption(option)\">\r\n {{ option.label }}\r\n </div>\r\n </ng-container>\r\n\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 && control?.touched\" 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:#151d48;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}.fv-dropdown-group-label{font-weight:600;color:#151d48;padding:8px 16px;background-color:#f9f9f9;cursor:default;pointer-events:none;font-size:14px;letter-spacing:normal;border-bottom:1px solid #eee}.fv-dropdown-option.child-option{padding-left:32px}\n"] }]
|
|
882
956
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { label: [{
|
|
883
957
|
type: Input
|
|
884
958
|
}], placeholder: [{
|
|
@@ -1043,11 +1117,11 @@ class FvFileSelectorComponent {
|
|
|
1043
1117
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
1044
1118
|
}
|
|
1045
1119
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvFileSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1046
|
-
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\" *ngIf=\"control\">\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 <div *ngIf=\"!selectedFile\">\r\n <button type=\"button\" class=\"fv-file-selector-button\"\r\n [class.fv-file-selector-button-error]=\"errorMessage && control?.touched\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedFile.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" 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{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background-color:#fff;padding:0;cursor:pointer;overflow:hidden;height:34px;
|
|
1120
|
+
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\" *ngIf=\"control\">\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 <div *ngIf=\"!selectedFile\">\r\n <button type=\"button\" class=\"fv-file-selector-button\"\r\n [class.fv-file-selector-button-error]=\"errorMessage && control?.touched\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedFile.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" 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:fit-content;max-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{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background-color:#fff;padding:0;cursor:pointer;overflow:hidden;height:34px;width:150px;transition:all .2s ease}.fv-file-selector-button:hover:not(:disabled){border-color:#bbb;box-shadow:0 2px 4px #0000000d}.fv-file-selector-button-error{border-color:#e74c3c}.fv-file-selector-button-disabled{background-color:#f9f9f9;border-color:#dcdcdc;color:#7f8c8d;opacity:.6;cursor:not-allowed}.fv-upload-text{flex:1;padding:0 16px;font-size:14px;color:#1f2b41;text-align:left;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fv-upload-icon-section{background:#f4f5f7;padding:0 10px;border-left:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;color:#333;height:100%}.upload-icon{width:20px;height:20px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:40px;height:40px}.fv-file-icon-preview{width:40px;height:40px;border-radius:8px;background:#f4f5f7;display:flex;align-items:center;justify-content:center;color:#3498db;border:1px solid #dcdcdc}.fv-file-icon-preview.picture_as_pdf{color:#e74c3c;background:#fdf2f2}.fv-file-icon-preview.image{color:#3498db;background:#f1f8fe}.fv-file-icon-preview.table_view{color:#27ae60;background:#f1f9f4}.material-icons{font-size:24px}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-file-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1047
1121
|
}
|
|
1048
1122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvFileSelectorComponent, decorators: [{
|
|
1049
1123
|
type: Component,
|
|
1050
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-file-selector', template: "<div class=\"fv-file-selector-container\" *ngIf=\"control\">\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 <div *ngIf=\"!selectedFile\">\r\n <button type=\"button\" class=\"fv-file-selector-button\"\r\n [class.fv-file-selector-button-error]=\"errorMessage && control?.touched\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedFile.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" 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{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background-color:#fff;padding:0;cursor:pointer;overflow:hidden;height:34px;
|
|
1124
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-file-selector', template: "<div class=\"fv-file-selector-container\" *ngIf=\"control\">\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 <div *ngIf=\"!selectedFile\">\r\n <button type=\"button\" class=\"fv-file-selector-button\"\r\n [class.fv-file-selector-button-error]=\"errorMessage && control?.touched\"\r\n [class.fv-file-selector-button-disabled]=\"disabled\" (click)=\"openFileDialog()\" [disabled]=\"disabled\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"selectedFile\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedFile.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" 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:fit-content;max-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{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background-color:#fff;padding:0;cursor:pointer;overflow:hidden;height:34px;width:150px;transition:all .2s ease}.fv-file-selector-button:hover:not(:disabled){border-color:#bbb;box-shadow:0 2px 4px #0000000d}.fv-file-selector-button-error{border-color:#e74c3c}.fv-file-selector-button-disabled{background-color:#f9f9f9;border-color:#dcdcdc;color:#7f8c8d;opacity:.6;cursor:not-allowed}.fv-upload-text{flex:1;padding:0 16px;font-size:14px;color:#1f2b41;text-align:left;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fv-upload-icon-section{background:#f4f5f7;padding:0 10px;border-left:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;color:#333;height:100%}.upload-icon{width:20px;height:20px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:40px;height:40px}.fv-file-icon-preview{width:40px;height:40px;border-radius:8px;background:#f4f5f7;display:flex;align-items:center;justify-content:center;color:#3498db;border:1px solid #dcdcdc}.fv-file-icon-preview.picture_as_pdf{color:#e74c3c;background:#fdf2f2}.fv-file-icon-preview.image{color:#3498db;background:#f1f8fe}.fv-file-icon-preview.table_view{color:#27ae60;background:#f1f9f4}.material-icons{font-size:24px}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-file-selector-error-message{margin-top:4px;font-size:12px;color:#e74c3c}\n"] }]
|
|
1051
1125
|
}], propDecorators: { label: [{
|
|
1052
1126
|
type: Input
|
|
1053
1127
|
}], placeholder: [{
|
|
@@ -1284,11 +1358,11 @@ class FvImageSelectorComponent {
|
|
|
1284
1358
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
1285
1359
|
}
|
|
1286
1360
|
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 });
|
|
1287
|
-
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" }, host: { listeners: { "document:mousemove": "onDrag($event)", "document:mouseup": "endDrag()" } }, viewQueries: [{ propertyName: "imageInput", first: true, predicate: ["imageInput"], descendants: true }, { propertyName: "editorImage", first: true, predicate: ["editorImage"], descendants: true }], ngImport: i0, template: "<div class=\"fv-image-selector-container\" *ngIf=\"control\">\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 <!-- Initial State -->\r\n <div *ngIf=\"!selectedImage && !isEditorOpen\">\r\n <button type=\"button\" class=\"fv-upload-btn\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Upload\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Preview State -->\r\n <div *ngIf=\"selectedImage && !isEditorOpen\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <img [src]=\"selectedImage.url\" class=\"fv-circle-preview\" alt=\"Preview\" />\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedImage.file.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Modal -->\r\n <div *ngIf=\"isEditorOpen\" class=\"fv-modal-overlay\">\r\n <div class=\"fv-modal-content\">\r\n <div class=\"fv-modal-header\">\r\n <h3>Adjust Photo</h3>\r\n <button type=\"button\" class=\"close-icon\" (click)=\"closeEditor()\">\u00D7</button>\r\n </div>\r\n <div class=\"fv-modal-body\">\r\n <div class=\"fv-crop-container\" (mousedown)=\"startDrag($event)\">\r\n <img #editorImage [src]=\"editImageSrc\" class=\"fv-crop-image\"\r\n [style.transform]=\"'translate(' + panX + 'px, ' + panY + 'px) scale(' + scale + ')'\"\r\n draggable=\"false\" />\r\n <div class=\"fv-crop-mask\"></div>\r\n </div>\r\n\r\n <div class=\"fv-zoom-controls\">\r\n <span class=\"zoom-label\">Zoom</span>\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomOut()\">-</button>\r\n <input type=\"range\" [min]=\"minScale\" [max]=\"maxScale\" [step]=\"step\" [value]=\"scale\"\r\n (input)=\"onSliderChange($event)\" class=\"zoom-slider\">\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomIn()\">+</button>\r\n <span class=\"zoom-value\">{{ (scale * 100) | number:'1.0-0' }}%</span>\r\n </div>\r\n\r\n <p class=\"fv-hint-text\">Drag the image to reposition. Use the zoom control to fill the circle.</p>\r\n </div>\r\n\r\n <div class=\"fv-modal-footer\">\r\n <button type=\"button\" class=\"btn-reset\" (click)=\"resetEditor()\">Reset</button>\r\n <div class=\"footer-actions\">\r\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeEditor()\">Cancel</button>\r\n <button type=\"button\" class=\"btn-apply\" (click)=\"applyCrop()\">Apply</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\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;box-sizing:border-box}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:20px;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;margin-left:4px}.fv-upload-btn{display:inline-flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #dcdcdc;border-radius:8px;padding:0 0 0 16px;font-size:14px;color:#1f2b41;cursor:pointer;overflow:hidden;height:34px;
|
|
1361
|
+
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" }, host: { listeners: { "document:mousemove": "onDrag($event)", "document:mouseup": "endDrag()" } }, viewQueries: [{ propertyName: "imageInput", first: true, predicate: ["imageInput"], descendants: true }, { propertyName: "editorImage", first: true, predicate: ["editorImage"], descendants: true }], ngImport: i0, template: "<div class=\"fv-image-selector-container\" *ngIf=\"control\">\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 <!-- Initial State -->\r\n <div *ngIf=\"!selectedImage && !isEditorOpen\">\r\n <button type=\"button\" class=\"fv-upload-btn\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Upload\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Preview State -->\r\n <div *ngIf=\"selectedImage && !isEditorOpen\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <img [src]=\"selectedImage.url\" class=\"fv-circle-preview\" alt=\"Preview\" />\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedImage.file.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Modal -->\r\n <div *ngIf=\"isEditorOpen\" class=\"fv-modal-overlay\">\r\n <div class=\"fv-modal-content\">\r\n <div class=\"fv-modal-header\">\r\n <h3>Adjust Photo</h3>\r\n <button type=\"button\" class=\"close-icon\" (click)=\"closeEditor()\">\u00D7</button>\r\n </div>\r\n <div class=\"fv-modal-body\">\r\n <div class=\"fv-crop-container\" (mousedown)=\"startDrag($event)\">\r\n <img #editorImage [src]=\"editImageSrc\" class=\"fv-crop-image\"\r\n [style.transform]=\"'translate(' + panX + 'px, ' + panY + 'px) scale(' + scale + ')'\"\r\n draggable=\"false\" />\r\n <div class=\"fv-crop-mask\"></div>\r\n </div>\r\n\r\n <div class=\"fv-zoom-controls\">\r\n <span class=\"zoom-label\">Zoom</span>\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomOut()\">-</button>\r\n <input type=\"range\" [min]=\"minScale\" [max]=\"maxScale\" [step]=\"step\" [value]=\"scale\"\r\n (input)=\"onSliderChange($event)\" class=\"zoom-slider\">\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomIn()\">+</button>\r\n <span class=\"zoom-value\">{{ (scale * 100) | number:'1.0-0' }}%</span>\r\n </div>\r\n\r\n <p class=\"fv-hint-text\">Drag the image to reposition. Use the zoom control to fill the circle.</p>\r\n </div>\r\n\r\n <div class=\"fv-modal-footer\">\r\n <button type=\"button\" class=\"btn-reset\" (click)=\"resetEditor()\">Reset</button>\r\n <div class=\"footer-actions\">\r\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeEditor()\">Cancel</button>\r\n <button type=\"button\" class=\"btn-apply\" (click)=\"applyCrop()\">Apply</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\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;box-sizing:border-box}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:20px;width:fit-content;max-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;margin-left:4px}.fv-upload-btn{display:inline-flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #dcdcdc;border-radius:8px;padding:0 0 0 16px;font-size:14px;color:#1f2b41;cursor:pointer;overflow:hidden;height:34px;width:100px;transition:box-shadow .2s}.fv-upload-btn:hover:not(:disabled){box-shadow:0 2px 5px #0000000d;border-color:#bbb}.fv-upload-btn:disabled{opacity:.6;cursor:not-allowed;background:#f9f9f9}.upload-icon{width:40px;height:100%;padding:8px;background:#f4f5f7;border-left:1px solid #dcdcdc;fill:#333;margin-left:16px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:60px;height:60px}.fv-circle-preview{width:60px;height:60px;border-radius:50%;border:1px solid #eee;object-fit:cover}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-modal-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#0009;display:flex;align-items:center;justify-content:center;z-index:9999}.fv-modal-content{background:#fff;width:650px;max-width:90vw;border-radius:8px;overflow:hidden;box-shadow:0 10px 30px #0003;display:flex;flex-direction:column}.fv-modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid #f0f0f0}.fv-modal-header h3{margin:0;font-size:18px;font-weight:600;color:#1f2b41}.close-icon{background:none;border:none;font-size:24px;line-height:1;cursor:pointer;color:#888}.fv-modal-body{padding:24px;display:flex;flex-direction:column;align-items:center;background:#fff}.fv-crop-container{width:100%;height:350px;background:#333;position:relative;overflow:hidden;margin-bottom:24px;border-radius:4px;cursor:move;cursor:grab;display:flex;align-items:center;justify-content:center}.fv-crop-container:active{cursor:grabbing}.fv-crop-image{max-width:none;max-height:none;-webkit-user-select:none;user-select:none;pointer-events:none;transform-origin:center center}.fv-crop-mask{position:absolute;inset:0;background:radial-gradient(circle at center,transparent 150px,rgba(0,0,0,.6) 151px);pointer-events:none}.fv-zoom-controls{display:flex;align-items:center;gap:16px;width:100%;max-width:500px;margin-bottom:12px}.zoom-label{font-size:14px;font-weight:500;color:#333;min-width:40px}.zoom-btn{width:32px;height:32px;border-radius:50%;background:#e6f0ff;color:#006aff;border:none;font-weight:700;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding-bottom:2px}.zoom-btn:hover{background:#d0e1ff}.zoom-slider{flex:1;-webkit-appearance:none;appearance:none;height:4px;background:#ddd;border-radius:2px;outline:none}.zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:#006aff;cursor:pointer;box-shadow:0 0 0 4px #006aff33}.zoom-value{font-size:14px;color:#666;min-width:40px;text-align:right}.fv-hint-text{font-size:13px;color:#7f8c8d;margin:0;text-align:center}.fv-modal-footer{padding:16px 24px;border-top:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center;background:#fff}.footer-actions{display:flex;gap:12px}.btn-reset,.btn-cancel,.btn-apply{padding:8px 20px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s}.btn-reset{background:#f5f5f5;border:1px solid #ddd;color:#333}.btn-reset:hover{background:#eee}.btn-cancel{background:#fff;border:1px solid #ddd;color:#333}.btn-cancel:hover{border-color:#bbb}.btn-apply{background:#006aff;border:1px solid #006aff;color:#fff}.btn-apply:hover{background:#0056cc;border-color:#0056cc}.fv-image-selector-error-message{margin-top:6px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1288
1362
|
}
|
|
1289
1363
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvImageSelectorComponent, decorators: [{
|
|
1290
1364
|
type: Component,
|
|
1291
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-image-selector', template: "<div class=\"fv-image-selector-container\" *ngIf=\"control\">\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 <!-- Initial State -->\r\n <div *ngIf=\"!selectedImage && !isEditorOpen\">\r\n <button type=\"button\" class=\"fv-upload-btn\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Upload\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Preview State -->\r\n <div *ngIf=\"selectedImage && !isEditorOpen\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <img [src]=\"selectedImage.url\" class=\"fv-circle-preview\" alt=\"Preview\" />\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedImage.file.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Modal -->\r\n <div *ngIf=\"isEditorOpen\" class=\"fv-modal-overlay\">\r\n <div class=\"fv-modal-content\">\r\n <div class=\"fv-modal-header\">\r\n <h3>Adjust Photo</h3>\r\n <button type=\"button\" class=\"close-icon\" (click)=\"closeEditor()\">\u00D7</button>\r\n </div>\r\n <div class=\"fv-modal-body\">\r\n <div class=\"fv-crop-container\" (mousedown)=\"startDrag($event)\">\r\n <img #editorImage [src]=\"editImageSrc\" class=\"fv-crop-image\"\r\n [style.transform]=\"'translate(' + panX + 'px, ' + panY + 'px) scale(' + scale + ')'\"\r\n draggable=\"false\" />\r\n <div class=\"fv-crop-mask\"></div>\r\n </div>\r\n\r\n <div class=\"fv-zoom-controls\">\r\n <span class=\"zoom-label\">Zoom</span>\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomOut()\">-</button>\r\n <input type=\"range\" [min]=\"minScale\" [max]=\"maxScale\" [step]=\"step\" [value]=\"scale\"\r\n (input)=\"onSliderChange($event)\" class=\"zoom-slider\">\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomIn()\">+</button>\r\n <span class=\"zoom-value\">{{ (scale * 100) | number:'1.0-0' }}%</span>\r\n </div>\r\n\r\n <p class=\"fv-hint-text\">Drag the image to reposition. Use the zoom control to fill the circle.</p>\r\n </div>\r\n\r\n <div class=\"fv-modal-footer\">\r\n <button type=\"button\" class=\"btn-reset\" (click)=\"resetEditor()\">Reset</button>\r\n <div class=\"footer-actions\">\r\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeEditor()\">Cancel</button>\r\n <button type=\"button\" class=\"btn-apply\" (click)=\"applyCrop()\">Apply</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\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;box-sizing:border-box}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:20px;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;margin-left:4px}.fv-upload-btn{display:inline-flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #dcdcdc;border-radius:8px;padding:0 0 0 16px;font-size:14px;color:#1f2b41;cursor:pointer;overflow:hidden;height:34px;
|
|
1365
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-image-selector', template: "<div class=\"fv-image-selector-container\" *ngIf=\"control\">\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 <!-- Initial State -->\r\n <div *ngIf=\"!selectedImage && !isEditorOpen\">\r\n <button type=\"button\" class=\"fv-upload-btn\" (click)=\"openImageDialog()\" [disabled]=\"disabled\">\r\n Upload\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Preview State -->\r\n <div *ngIf=\"selectedImage && !isEditorOpen\" class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\">\r\n <img [src]=\"selectedImage.url\" class=\"fv-circle-preview\" alt=\"Preview\" />\r\n </div>\r\n <span class=\"fv-filename\">{{ selectedImage.file.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeImage()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <!-- Modal -->\r\n <div *ngIf=\"isEditorOpen\" class=\"fv-modal-overlay\">\r\n <div class=\"fv-modal-content\">\r\n <div class=\"fv-modal-header\">\r\n <h3>Adjust Photo</h3>\r\n <button type=\"button\" class=\"close-icon\" (click)=\"closeEditor()\">\u00D7</button>\r\n </div>\r\n <div class=\"fv-modal-body\">\r\n <div class=\"fv-crop-container\" (mousedown)=\"startDrag($event)\">\r\n <img #editorImage [src]=\"editImageSrc\" class=\"fv-crop-image\"\r\n [style.transform]=\"'translate(' + panX + 'px, ' + panY + 'px) scale(' + scale + ')'\"\r\n draggable=\"false\" />\r\n <div class=\"fv-crop-mask\"></div>\r\n </div>\r\n\r\n <div class=\"fv-zoom-controls\">\r\n <span class=\"zoom-label\">Zoom</span>\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomOut()\">-</button>\r\n <input type=\"range\" [min]=\"minScale\" [max]=\"maxScale\" [step]=\"step\" [value]=\"scale\"\r\n (input)=\"onSliderChange($event)\" class=\"zoom-slider\">\r\n <button type=\"button\" class=\"zoom-btn\" (click)=\"zoomIn()\">+</button>\r\n <span class=\"zoom-value\">{{ (scale * 100) | number:'1.0-0' }}%</span>\r\n </div>\r\n\r\n <p class=\"fv-hint-text\">Drag the image to reposition. Use the zoom control to fill the circle.</p>\r\n </div>\r\n\r\n <div class=\"fv-modal-footer\">\r\n <button type=\"button\" class=\"btn-reset\" (click)=\"resetEditor()\">Reset</button>\r\n <div class=\"footer-actions\">\r\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeEditor()\">Cancel</button>\r\n <button type=\"button\" class=\"btn-apply\" (click)=\"applyCrop()\">Apply</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\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;box-sizing:border-box}.fv-image-selector-container{display:flex;flex-direction:column;margin-bottom:20px;width:fit-content;max-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;margin-left:4px}.fv-upload-btn{display:inline-flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #dcdcdc;border-radius:8px;padding:0 0 0 16px;font-size:14px;color:#1f2b41;cursor:pointer;overflow:hidden;height:34px;width:100px;transition:box-shadow .2s}.fv-upload-btn:hover:not(:disabled){box-shadow:0 2px 5px #0000000d;border-color:#bbb}.fv-upload-btn:disabled{opacity:.6;cursor:not-allowed;background:#f9f9f9}.upload-icon{width:40px;height:100%;padding:8px;background:#f4f5f7;border-left:1px solid #dcdcdc;fill:#333;margin-left:16px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:60px;height:60px}.fv-circle-preview{width:60px;height:60px;border-radius:50%;border:1px solid #eee;object-fit:cover}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-modal-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#0009;display:flex;align-items:center;justify-content:center;z-index:9999}.fv-modal-content{background:#fff;width:650px;max-width:90vw;border-radius:8px;overflow:hidden;box-shadow:0 10px 30px #0003;display:flex;flex-direction:column}.fv-modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid #f0f0f0}.fv-modal-header h3{margin:0;font-size:18px;font-weight:600;color:#1f2b41}.close-icon{background:none;border:none;font-size:24px;line-height:1;cursor:pointer;color:#888}.fv-modal-body{padding:24px;display:flex;flex-direction:column;align-items:center;background:#fff}.fv-crop-container{width:100%;height:350px;background:#333;position:relative;overflow:hidden;margin-bottom:24px;border-radius:4px;cursor:move;cursor:grab;display:flex;align-items:center;justify-content:center}.fv-crop-container:active{cursor:grabbing}.fv-crop-image{max-width:none;max-height:none;-webkit-user-select:none;user-select:none;pointer-events:none;transform-origin:center center}.fv-crop-mask{position:absolute;inset:0;background:radial-gradient(circle at center,transparent 150px,rgba(0,0,0,.6) 151px);pointer-events:none}.fv-zoom-controls{display:flex;align-items:center;gap:16px;width:100%;max-width:500px;margin-bottom:12px}.zoom-label{font-size:14px;font-weight:500;color:#333;min-width:40px}.zoom-btn{width:32px;height:32px;border-radius:50%;background:#e6f0ff;color:#006aff;border:none;font-weight:700;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding-bottom:2px}.zoom-btn:hover{background:#d0e1ff}.zoom-slider{flex:1;-webkit-appearance:none;appearance:none;height:4px;background:#ddd;border-radius:2px;outline:none}.zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:#006aff;cursor:pointer;box-shadow:0 0 0 4px #006aff33}.zoom-value{font-size:14px;color:#666;min-width:40px;text-align:right}.fv-hint-text{font-size:13px;color:#7f8c8d;margin:0;text-align:center}.fv-modal-footer{padding:16px 24px;border-top:1px solid #f0f0f0;display:flex;justify-content:space-between;align-items:center;background:#fff}.footer-actions{display:flex;gap:12px}.btn-reset,.btn-cancel,.btn-apply{padding:8px 20px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s}.btn-reset{background:#f5f5f5;border:1px solid #ddd;color:#333}.btn-reset:hover{background:#eee}.btn-cancel{background:#fff;border:1px solid #ddd;color:#333}.btn-cancel:hover{border-color:#bbb}.btn-apply{background:#006aff;border:1px solid #006aff;color:#fff}.btn-apply:hover{background:#0056cc;border-color:#0056cc}.fv-image-selector-error-message{margin-top:6px;font-size:12px;color:#e74c3c;display:flex;align-items:center;gap:4px}\n"] }]
|
|
1292
1366
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { label: [{
|
|
1293
1367
|
type: Input
|
|
1294
1368
|
}], placeholder: [{
|
|
@@ -2804,11 +2878,11 @@ class FvDocumentFieldComponent {
|
|
|
2804
2878
|
return errorMessages[this.errorMessage] || this.errorMessage;
|
|
2805
2879
|
}
|
|
2806
2880
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDocumentFieldComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDocumentFieldComponent, isStandalone: true, selector: "fv-document-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", accept: "accept", maxSize: "maxSize" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-document-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-document-field-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 <div *ngIf=\"!control.value; else fileUploaded\" class=\"fv-upload-btn-wrapper\">\r\n <button type=\"button\" class=\"fv-upload-button\" [disabled]=\"disabled\" (click)=\"openFileDialog()\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <ng-template #fileUploaded>\r\n <div class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\" (click)=\"viewFile()\" style=\"cursor: pointer;\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\" (click)=\"viewFile()\" style=\"cursor: pointer;\">{{ control.value?.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" class=\"fv-document-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>\r\n\r\n<!-- Preview Overlay/Modal for Image -->\r\n<div *ngIf=\"showPreview\" class=\"fv-preview-overlay\" (click)=\"closePreview()\">\r\n <div class=\"fv-preview-content\" (click)=\"$event.stopPropagation()\">\r\n <img [src]=\"previewUrl\" alt=\"Preview\" />\r\n <div class=\"fv-preview-actions\">\r\n <button type=\"button\" class=\"fv-download-btn\" (click)=\"downloadFile()\">Download</button>\r\n <button type=\"button\" class=\"fv-close-btn\" (click)=\"closePreview()\">Close</button>\r\n </div>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-document-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%;font-family:Poppins,sans-serif}.fv-document-field-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-upload-button{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background:#fff;padding:0;cursor:pointer;overflow:hidden;width:
|
|
2881
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FvDocumentFieldComponent, isStandalone: true, selector: "fv-document-field", inputs: { label: "label", placeholder: "placeholder", schema: "schema", control: "control", disabled: "disabled", accept: "accept", maxSize: "maxSize" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"fv-document-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-document-field-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 <div *ngIf=\"!control.value; else fileUploaded\" class=\"fv-upload-btn-wrapper\">\r\n <button type=\"button\" class=\"fv-upload-button\" [disabled]=\"disabled\" (click)=\"openFileDialog()\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <ng-template #fileUploaded>\r\n <div class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\" (click)=\"viewFile()\" style=\"cursor: pointer;\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\" (click)=\"viewFile()\" style=\"cursor: pointer;\">{{ control.value?.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" class=\"fv-document-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>\r\n\r\n<!-- Preview Overlay/Modal for Image -->\r\n<div *ngIf=\"showPreview\" class=\"fv-preview-overlay\" (click)=\"closePreview()\">\r\n <div class=\"fv-preview-content\" (click)=\"$event.stopPropagation()\">\r\n <img [src]=\"previewUrl\" alt=\"Preview\" />\r\n <div class=\"fv-preview-actions\">\r\n <button type=\"button\" class=\"fv-download-btn\" (click)=\"downloadFile()\">Download</button>\r\n <button type=\"button\" class=\"fv-close-btn\" (click)=\"closePreview()\">Close</button>\r\n </div>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-document-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:fit-content;max-width:100%;font-family:Poppins,sans-serif}.fv-document-field-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-upload-button{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background:#fff;padding:0;cursor:pointer;overflow:hidden;width:100px;height:34px;transition:all .2s ease}.fv-upload-button:hover:not(:disabled){border-color:#bbb;box-shadow:0 2px 4px #0000000d}.fv-upload-button:disabled{cursor:not-allowed;background-color:#f9f9f9;opacity:.7}.fv-upload-text{flex:1;padding:0 16px;font-size:14px;color:#1f2b41;text-align:left;font-weight:500}.fv-upload-icon-section{background:#f4f5f7;padding:0 10px;border-left:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;color:#333;height:100%}.upload-icon{width:20px;height:20px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:40px;height:40px}.fv-file-icon-preview{width:40px;height:40px;border-radius:8px;background:#f4f5f7;display:flex;align-items:center;justify-content:center;color:#3498db;border:1px solid #dcdcdc}.fv-file-icon-preview.picture_as_pdf{color:#e74c3c;background:#fdf2f2}.fv-file-icon-preview.image{color:#3498db;background:#f1f8fe}.fv-file-icon-preview.table_view{color:#27ae60;background:#f1f9f4}.material-icons{font-size:24px}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-document-error-message{margin-top:4px;font-size:12px;color:#e74c3c}.fv-preview-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#000c;display:flex;justify-content:center;align-items:center;z-index:10000}.fv-preview-content{position:relative;background:#fff;padding:24px;border-radius:12px;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;align-items:center}.fv-preview-content img{max-width:100%;max-height:70vh;object-fit:contain;border-radius:4px;margin-bottom:20px}.fv-preview-actions{display:flex;gap:16px}.fv-preview-actions button{padding:10px 24px;border-radius:6px;border:none;cursor:pointer;font-weight:500;transition:background .2s}.fv-download-btn{background:#3498db;color:#fff}.fv-download-btn:hover{background:#2980b9}.fv-close-btn{background:#f0f0f0;color:#333}.fv-close-btn:hover{background:#e0e0e0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
2808
2882
|
}
|
|
2809
2883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FvDocumentFieldComponent, decorators: [{
|
|
2810
2884
|
type: Component,
|
|
2811
|
-
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-document-field', template: "<div class=\"fv-document-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-document-field-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 <div *ngIf=\"!control.value; else fileUploaded\" class=\"fv-upload-btn-wrapper\">\r\n <button type=\"button\" class=\"fv-upload-button\" [disabled]=\"disabled\" (click)=\"openFileDialog()\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <ng-template #fileUploaded>\r\n <div class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\" (click)=\"viewFile()\" style=\"cursor: pointer;\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\" (click)=\"viewFile()\" style=\"cursor: pointer;\">{{ control.value?.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" class=\"fv-document-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>\r\n\r\n<!-- Preview Overlay/Modal for Image -->\r\n<div *ngIf=\"showPreview\" class=\"fv-preview-overlay\" (click)=\"closePreview()\">\r\n <div class=\"fv-preview-content\" (click)=\"$event.stopPropagation()\">\r\n <img [src]=\"previewUrl\" alt=\"Preview\" />\r\n <div class=\"fv-preview-actions\">\r\n <button type=\"button\" class=\"fv-download-btn\" (click)=\"downloadFile()\">Download</button>\r\n <button type=\"button\" class=\"fv-close-btn\" (click)=\"closePreview()\">Close</button>\r\n </div>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-document-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:100%;font-family:Poppins,sans-serif}.fv-document-field-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-upload-button{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background:#fff;padding:0;cursor:pointer;overflow:hidden;width:
|
|
2885
|
+
args: [{ standalone: true, imports: [CommonModule, ReactiveFormsModule], selector: 'fv-document-field', template: "<div class=\"fv-document-field-container\">\r\n <label *ngIf=\"label\" class=\"fv-document-field-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 <div *ngIf=\"!control.value; else fileUploaded\" class=\"fv-upload-btn-wrapper\">\r\n <button type=\"button\" class=\"fv-upload-button\" [disabled]=\"disabled\" (click)=\"openFileDialog()\">\r\n <span class=\"fv-upload-text\">{{ placeholder }}</span>\r\n <span class=\"fv-upload-icon-section\">\r\n <svg viewBox=\"0 0 24 24\" class=\"upload-icon\">\r\n <path d=\"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z\" fill=\"currentColor\" />\r\n </svg>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <ng-template #fileUploaded>\r\n <div class=\"fv-preview-row\">\r\n <div class=\"fv-preview-wrapper\" (click)=\"viewFile()\" style=\"cursor: pointer;\">\r\n <div class=\"fv-file-icon-preview\" [ngClass]=\"getFileIcon()\">\r\n <span class=\"material-icons\">{{ getFileIcon() }}</span>\r\n </div>\r\n </div>\r\n <span class=\"fv-filename\" (click)=\"viewFile()\" style=\"cursor: pointer;\">{{ control.value?.name }}</span>\r\n <button type=\"button\" class=\"fv-trash-btn\" (click)=\"removeFile()\" [disabled]=\"disabled\">\r\n <svg viewBox=\"0 0 24 24\" class=\"trash-icon\">\r\n <path d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <div *ngIf=\"errorMessage && control?.touched\" class=\"fv-document-error-message\">\r\n \u26A0 {{ getErrorMessage() }}\r\n </div>\r\n</div>\r\n\r\n<!-- Preview Overlay/Modal for Image -->\r\n<div *ngIf=\"showPreview\" class=\"fv-preview-overlay\" (click)=\"closePreview()\">\r\n <div class=\"fv-preview-content\" (click)=\"$event.stopPropagation()\">\r\n <img [src]=\"previewUrl\" alt=\"Preview\" />\r\n <div class=\"fv-preview-actions\">\r\n <button type=\"button\" class=\"fv-download-btn\" (click)=\"downloadFile()\">Download</button>\r\n <button type=\"button\" class=\"fv-close-btn\" (click)=\"closePreview()\">Close</button>\r\n </div>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap\";.fv-document-field-container{display:flex;flex-direction:column;margin-bottom:16px;width:fit-content;max-width:100%;font-family:Poppins,sans-serif}.fv-document-field-label{font-size:14px;font-weight:600;color:#151d48;margin-bottom:6px;display:block}.required-asterisk{color:#e74c3c;font-weight:700}.fv-upload-button{display:flex;align-items:center;border:1px solid #dcdcdc;border-radius:8px;background:#fff;padding:0;cursor:pointer;overflow:hidden;width:100px;height:34px;transition:all .2s ease}.fv-upload-button:hover:not(:disabled){border-color:#bbb;box-shadow:0 2px 4px #0000000d}.fv-upload-button:disabled{cursor:not-allowed;background-color:#f9f9f9;opacity:.7}.fv-upload-text{flex:1;padding:0 16px;font-size:14px;color:#1f2b41;text-align:left;font-weight:500}.fv-upload-icon-section{background:#f4f5f7;padding:0 10px;border-left:1px solid #dcdcdc;display:flex;align-items:center;justify-content:center;color:#333;height:100%}.upload-icon{width:20px;height:20px}.fv-preview-row{display:flex;align-items:center;gap:8px;padding:8px 0;width:100px;box-sizing:border-box}.fv-preview-wrapper{position:relative;width:40px;height:40px}.fv-file-icon-preview{width:40px;height:40px;border-radius:8px;background:#f4f5f7;display:flex;align-items:center;justify-content:center;color:#3498db;border:1px solid #dcdcdc}.fv-file-icon-preview.picture_as_pdf{color:#e74c3c;background:#fdf2f2}.fv-file-icon-preview.image{color:#3498db;background:#f1f8fe}.fv-file-icon-preview.table_view{color:#27ae60;background:#f1f9f4}.material-icons{font-size:24px}.fv-filename{flex:1;font-size:14px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.fv-trash-btn{background:none;border:none;cursor:pointer;padding:6px;border-radius:50%;transition:background .2s;display:flex}.fv-trash-btn:hover:not(:disabled){background:#fee}.trash-icon{width:22px;height:22px;fill:red}.fv-document-error-message{margin-top:4px;font-size:12px;color:#e74c3c}.fv-preview-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#000c;display:flex;justify-content:center;align-items:center;z-index:10000}.fv-preview-content{position:relative;background:#fff;padding:24px;border-radius:12px;max-width:90vw;max-height:90vh;display:flex;flex-direction:column;align-items:center}.fv-preview-content img{max-width:100%;max-height:70vh;object-fit:contain;border-radius:4px;margin-bottom:20px}.fv-preview-actions{display:flex;gap:16px}.fv-preview-actions button{padding:10px 24px;border-radius:6px;border:none;cursor:pointer;font-weight:500;transition:background .2s}.fv-download-btn{background:#3498db;color:#fff}.fv-download-btn:hover{background:#2980b9}.fv-close-btn{background:#f0f0f0;color:#333}.fv-close-btn:hover{background:#e0e0e0}\n"] }]
|
|
2812
2886
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { label: [{
|
|
2813
2887
|
type: Input
|
|
2814
2888
|
}], placeholder: [{
|