@flusys/ng-shared 5.4.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ import { of, catchError as catchError$1, throwError, firstValueFrom, map as map$
|
|
|
8
8
|
import { map, tap, catchError } from 'rxjs/operators';
|
|
9
9
|
import * as i2 from '@angular/forms';
|
|
10
10
|
import { NgControl, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
|
-
import * as i3$1 from 'primeng/api';
|
|
12
11
|
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
13
12
|
import { RouterOutlet, RouterLink, RouterLinkActive, Router } from '@angular/router';
|
|
14
13
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
@@ -22,53 +21,50 @@ import { CheckboxModule } from 'primeng/checkbox';
|
|
|
22
21
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
23
22
|
import * as i6$1 from 'primeng/datepicker';
|
|
24
23
|
import { DatePickerModule } from 'primeng/datepicker';
|
|
25
|
-
import * as
|
|
24
|
+
import * as i4$1 from 'primeng/dialog';
|
|
26
25
|
import { DialogModule } from 'primeng/dialog';
|
|
27
26
|
import { DividerModule } from 'primeng/divider';
|
|
28
27
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
29
28
|
import * as i5 from 'primeng/iconfield';
|
|
30
29
|
import { IconFieldModule } from 'primeng/iconfield';
|
|
31
|
-
import { ImageModule } from 'primeng/image';
|
|
32
30
|
import * as i6 from 'primeng/inputicon';
|
|
33
31
|
import { InputIconModule } from 'primeng/inputicon';
|
|
34
|
-
import * as
|
|
32
|
+
import * as i9$1 from 'primeng/inputnumber';
|
|
35
33
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
36
|
-
import * as
|
|
34
|
+
import * as i10$1 from 'primeng/inputpassword';
|
|
35
|
+
import { InputPasswordModule } from 'primeng/inputpassword';
|
|
36
|
+
import { InputTagsModule } from 'primeng/inputtags';
|
|
37
|
+
import * as i7 from 'primeng/inputtext';
|
|
37
38
|
import { InputTextModule } from 'primeng/inputtext';
|
|
38
39
|
import { ListboxModule } from 'primeng/listbox';
|
|
39
|
-
import * as i9$1 from 'primeng/multiselect';
|
|
40
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
41
40
|
import { PaginatorModule } from 'primeng/paginator';
|
|
42
41
|
import { PanelModule } from 'primeng/panel';
|
|
43
|
-
import * as i10$1 from 'primeng/password';
|
|
44
|
-
import { PasswordModule } from 'primeng/password';
|
|
45
42
|
import { PopoverModule } from 'primeng/popover';
|
|
46
43
|
import * as i2$1 from 'primeng/progressbar';
|
|
47
44
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
48
45
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
49
46
|
import { RippleModule } from 'primeng/ripple';
|
|
50
|
-
import * as
|
|
47
|
+
import * as i12 from 'primeng/select';
|
|
51
48
|
import { SelectModule } from 'primeng/select';
|
|
52
49
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
53
50
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
54
51
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
55
52
|
import { StepsModule } from 'primeng/steps';
|
|
56
|
-
import * as i8
|
|
53
|
+
import * as i8 from 'primeng/table';
|
|
57
54
|
import { TableModule } from 'primeng/table';
|
|
58
55
|
import { TabsModule } from 'primeng/tabs';
|
|
59
56
|
import * as i9 from 'primeng/tag';
|
|
60
57
|
import { TagModule } from 'primeng/tag';
|
|
61
|
-
import * as
|
|
58
|
+
import * as i13 from 'primeng/textarea';
|
|
62
59
|
import { TextareaModule } from 'primeng/textarea';
|
|
63
60
|
import { ToastModule } from 'primeng/toast';
|
|
64
61
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
65
|
-
import * as
|
|
62
|
+
import * as i14 from 'primeng/toggleswitch';
|
|
66
63
|
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
67
64
|
import * as i10 from 'primeng/tooltip';
|
|
68
65
|
import { TooltipModule } from 'primeng/tooltip';
|
|
69
66
|
import { TreeTableModule } from 'primeng/treetable';
|
|
70
67
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
71
|
-
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
72
68
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
73
69
|
|
|
74
70
|
const SHARED_MESSAGES = {
|
|
@@ -85,6 +81,10 @@ const SHARED_MESSAGES = {
|
|
|
85
81
|
'error.conflict': '{{entity}} with this {{field}} already exists',
|
|
86
82
|
'error.db.foreign.key': "Invalid reference for '{{field}}'",
|
|
87
83
|
'error.db.not.null': "Required field '{{field}}' cannot be null",
|
|
84
|
+
'error.db.invalid.input': "Invalid {{type}} value",
|
|
85
|
+
'error.db.value.too.long': "Value too long for '{{field}}'",
|
|
86
|
+
'error.db.check.constraint': '{{entity}} violates a validation rule',
|
|
87
|
+
'error.db.deadlock': 'The request could not be completed due to a conflict, please try again',
|
|
88
88
|
'error.internal': 'Internal server error',
|
|
89
89
|
'error.service.unavailable': 'Service temporarily unavailable',
|
|
90
90
|
'error.unknown': 'Unknown error occurred',
|
|
@@ -556,10 +556,10 @@ class PlatformService {
|
|
|
556
556
|
get isServer() {
|
|
557
557
|
return isPlatformServer(this.platformId);
|
|
558
558
|
}
|
|
559
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
560
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
559
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PlatformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
560
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PlatformService, providedIn: 'root' });
|
|
561
561
|
}
|
|
562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PlatformService, decorators: [{
|
|
563
563
|
type: Injectable,
|
|
564
564
|
args: [{ providedIn: 'root' }]
|
|
565
565
|
}] });
|
|
@@ -571,10 +571,10 @@ class CookieService {
|
|
|
571
571
|
get() {
|
|
572
572
|
return !this.platformService.isServer ? this.doc.cookie : this.request?.headers.get('cookie') ?? "";
|
|
573
573
|
}
|
|
574
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
575
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CookieService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
575
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CookieService, providedIn: 'root' });
|
|
576
576
|
}
|
|
577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CookieService, decorators: [{
|
|
578
578
|
type: Injectable,
|
|
579
579
|
args: [{
|
|
580
580
|
providedIn: 'root',
|
|
@@ -588,7 +588,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
588
588
|
class FileUrlService {
|
|
589
589
|
http = inject(HttpClient);
|
|
590
590
|
appConfig = inject(APP_CONFIG);
|
|
591
|
-
_cache = signal(new Map(),
|
|
591
|
+
_cache = signal(new Map(), /* @ts-ignore */
|
|
592
|
+
...(ngDevMode ? [{ debugName: "_cache" }] : /* istanbul ignore next */ []));
|
|
592
593
|
cache = this._cache.asReadonly();
|
|
593
594
|
/** Fetch file URLs from backend and update cache */
|
|
594
595
|
fetchFileUrls(fileIds, forceRefresh = false) {
|
|
@@ -625,10 +626,10 @@ class FileUrlService {
|
|
|
625
626
|
.map((id) => cache.get(id))
|
|
626
627
|
.filter((f) => f !== undefined);
|
|
627
628
|
}
|
|
628
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
629
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
629
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUrlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
630
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUrlService, providedIn: 'root' });
|
|
630
631
|
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUrlService, decorators: [{
|
|
632
633
|
type: Injectable,
|
|
633
634
|
args: [{ providedIn: 'root' }]
|
|
634
635
|
}] });
|
|
@@ -698,9 +699,11 @@ function hasAllPermissions(permissionCodes, permissions) {
|
|
|
698
699
|
* Provides signal-based storage and permission checking with wildcard support.
|
|
699
700
|
*/
|
|
700
701
|
class PermissionValidatorService {
|
|
701
|
-
_permissions = signal([],
|
|
702
|
+
_permissions = signal([], /* @ts-ignore */
|
|
703
|
+
...(ngDevMode ? [{ debugName: "_permissions" }] : /* istanbul ignore next */ []));
|
|
702
704
|
permissions = this._permissions.asReadonly();
|
|
703
|
-
_isLoaded = signal(false,
|
|
705
|
+
_isLoaded = signal(false, /* @ts-ignore */
|
|
706
|
+
...(ngDevMode ? [{ debugName: "_isLoaded" }] : /* istanbul ignore next */ []));
|
|
704
707
|
isLoaded = this._isLoaded.asReadonly();
|
|
705
708
|
/** Set permissions (replaces existing) */
|
|
706
709
|
setPermissions(permissions) {
|
|
@@ -723,10 +726,10 @@ class PermissionValidatorService {
|
|
|
723
726
|
isPermissionsLoaded() {
|
|
724
727
|
return this._isLoaded();
|
|
725
728
|
}
|
|
726
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
727
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
729
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PermissionValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
730
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PermissionValidatorService, providedIn: 'root' });
|
|
728
731
|
}
|
|
729
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PermissionValidatorService, decorators: [{
|
|
730
733
|
type: Injectable,
|
|
731
734
|
args: [{ providedIn: 'root' }]
|
|
732
735
|
}] });
|
|
@@ -764,10 +767,10 @@ class TranslateService {
|
|
|
764
767
|
return value !== undefined ? String(value) : match;
|
|
765
768
|
});
|
|
766
769
|
}
|
|
767
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
768
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
771
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslateService, providedIn: 'root' });
|
|
769
772
|
}
|
|
770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslateService, decorators: [{
|
|
771
774
|
type: Injectable,
|
|
772
775
|
args: [{ providedIn: 'root' }]
|
|
773
776
|
}] });
|
|
@@ -802,10 +805,10 @@ class FaviconService {
|
|
|
802
805
|
link.href = `data:image/svg+xml,${encodeURIComponent(resolved)}`;
|
|
803
806
|
}
|
|
804
807
|
}
|
|
805
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
806
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
808
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FaviconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
809
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FaviconService, providedIn: 'root' });
|
|
807
810
|
}
|
|
808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FaviconService, decorators: [{
|
|
809
812
|
type: Injectable,
|
|
810
813
|
args: [{ providedIn: 'root' }]
|
|
811
814
|
}] });
|
|
@@ -813,7 +816,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
813
816
|
class EditModeElementChangerDirective {
|
|
814
817
|
el = inject(ElementRef);
|
|
815
818
|
ngControl = inject(NgControl, { optional: true });
|
|
816
|
-
isEditMode = input.required(
|
|
819
|
+
isEditMode = input.required(/* @ts-ignore */
|
|
820
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
817
821
|
constructor() {
|
|
818
822
|
effect(() => {
|
|
819
823
|
const editMode = this.isEditMode();
|
|
@@ -867,10 +871,10 @@ class EditModeElementChangerDirective {
|
|
|
867
871
|
}
|
|
868
872
|
}
|
|
869
873
|
}
|
|
870
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
871
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EditModeElementChangerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
875
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: EditModeElementChangerDirective, isStandalone: true, selector: "[appEditModeElementChanger]", inputs: { isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
872
876
|
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EditModeElementChangerDirective, decorators: [{
|
|
874
878
|
type: Directive,
|
|
875
879
|
args: [{
|
|
876
880
|
selector: '[appEditModeElementChanger]',
|
|
@@ -936,7 +940,8 @@ class HasPermissionDirective {
|
|
|
936
940
|
* - string: Single permission code to check
|
|
937
941
|
* - ILogicNode: Complex permission logic tree
|
|
938
942
|
*/
|
|
939
|
-
hasPermission = input(null,
|
|
943
|
+
hasPermission = input(null, /* @ts-ignore */
|
|
944
|
+
...(ngDevMode ? [{ debugName: "hasPermission" }] : /* istanbul ignore next */ []));
|
|
940
945
|
/**
|
|
941
946
|
* View created state
|
|
942
947
|
*/
|
|
@@ -988,10 +993,10 @@ class HasPermissionDirective {
|
|
|
988
993
|
this.viewCreated = false;
|
|
989
994
|
}
|
|
990
995
|
}
|
|
991
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
992
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
996
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: HasPermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
997
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: HasPermissionDirective, isStandalone: true, selector: "[hasPermission]", inputs: { hasPermission: { classPropertyName: "hasPermission", publicName: "hasPermission", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
993
998
|
}
|
|
994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: HasPermissionDirective, decorators: [{
|
|
995
1000
|
type: Directive,
|
|
996
1001
|
args: [{
|
|
997
1002
|
selector: '[hasPermission]',
|
|
@@ -999,8 +1004,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
999
1004
|
}], ctorParameters: () => [], propDecorators: { hasPermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPermission", required: false }] }] } });
|
|
1000
1005
|
|
|
1001
1006
|
class IsEmptyImageDirective {
|
|
1002
|
-
src = input('',
|
|
1003
|
-
|
|
1007
|
+
src = input('', /* @ts-ignore */
|
|
1008
|
+
...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
1009
|
+
hasError = signal(false, /* @ts-ignore */
|
|
1010
|
+
...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
|
|
1004
1011
|
defaultImg = 'lib/assets/images/default/default-image.jpg';
|
|
1005
1012
|
imageSrc = computed(() => {
|
|
1006
1013
|
if (this.hasError()) {
|
|
@@ -1008,14 +1015,15 @@ class IsEmptyImageDirective {
|
|
|
1008
1015
|
}
|
|
1009
1016
|
const srcValue = this.src();
|
|
1010
1017
|
return srcValue ? srcValue : this.defaultImg;
|
|
1011
|
-
},
|
|
1018
|
+
}, /* @ts-ignore */
|
|
1019
|
+
...(ngDevMode ? [{ debugName: "imageSrc" }] : /* istanbul ignore next */ []));
|
|
1012
1020
|
onError() {
|
|
1013
1021
|
this.hasError.set(true);
|
|
1014
1022
|
}
|
|
1015
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1016
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1023
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IsEmptyImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1024
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: IsEmptyImageDirective, isStandalone: true, selector: "img", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "error": "onError()" }, properties: { "src": "imageSrc()" } }, ngImport: i0 });
|
|
1017
1025
|
}
|
|
1018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IsEmptyImageDirective, decorators: [{
|
|
1019
1027
|
type: Directive,
|
|
1020
1028
|
args: [{
|
|
1021
1029
|
selector: 'img',
|
|
@@ -1027,8 +1035,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1027
1035
|
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }] } });
|
|
1028
1036
|
|
|
1029
1037
|
class PreventDefaultDirective {
|
|
1030
|
-
eventType = input('click',
|
|
1031
|
-
|
|
1038
|
+
eventType = input('click', /* @ts-ignore */
|
|
1039
|
+
...(ngDevMode ? [{ debugName: "eventType" }] : /* istanbul ignore next */ []));
|
|
1040
|
+
preventKey = input(undefined, /* @ts-ignore */
|
|
1041
|
+
...(ngDevMode ? [{ debugName: "preventKey" }] : /* istanbul ignore next */ []));
|
|
1032
1042
|
action = output();
|
|
1033
1043
|
onClick(event) {
|
|
1034
1044
|
if (this.eventType() === 'click') {
|
|
@@ -1053,10 +1063,10 @@ class PreventDefaultDirective {
|
|
|
1053
1063
|
event.preventDefault();
|
|
1054
1064
|
this.action.emit(event);
|
|
1055
1065
|
}
|
|
1056
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1057
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1066
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1067
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: PreventDefaultDirective, isStandalone: true, selector: "[appPreventDefault]", inputs: { eventType: { classPropertyName: "eventType", publicName: "eventType", isSignal: true, isRequired: false, transformFunction: null }, preventKey: { classPropertyName: "preventKey", publicName: "preventKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeydown($event)", "keyup": "onKeyup($event)" } }, ngImport: i0 });
|
|
1058
1068
|
}
|
|
1059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PreventDefaultDirective, decorators: [{
|
|
1060
1070
|
type: Directive,
|
|
1061
1071
|
args: [{
|
|
1062
1072
|
selector: '[appPreventDefault]',
|
|
@@ -1076,10 +1086,10 @@ class TranslatePipe {
|
|
|
1076
1086
|
const result = this.translateAdapter.translate(key, params ?? undefined);
|
|
1077
1087
|
return fallback !== undefined && result === key ? fallback : result;
|
|
1078
1088
|
}
|
|
1079
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1080
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1089
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1090
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: TranslatePipe, isStandalone: true, name: "translate", pure: false });
|
|
1081
1091
|
}
|
|
1082
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslatePipe, decorators: [{
|
|
1083
1093
|
type: Pipe,
|
|
1084
1094
|
args: [{
|
|
1085
1095
|
name: 'translate',
|
|
@@ -1305,8 +1315,8 @@ function resolveTranslationModule(config) {
|
|
|
1305
1315
|
}
|
|
1306
1316
|
|
|
1307
1317
|
class AngularModule {
|
|
1308
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1309
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1319
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: AngularModule, imports: [CommonModule,
|
|
1310
1320
|
FormsModule,
|
|
1311
1321
|
ReactiveFormsModule,
|
|
1312
1322
|
RouterOutlet,
|
|
@@ -1325,13 +1335,13 @@ class AngularModule {
|
|
|
1325
1335
|
NgOptimizedImage,
|
|
1326
1336
|
NgComponentOutlet,
|
|
1327
1337
|
PreventDefaultDirective] });
|
|
1328
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1338
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AngularModule, providers: [DatePipe], imports: [CommonModule,
|
|
1329
1339
|
FormsModule,
|
|
1330
1340
|
ReactiveFormsModule, CommonModule,
|
|
1331
1341
|
FormsModule,
|
|
1332
1342
|
ReactiveFormsModule] });
|
|
1333
1343
|
}
|
|
1334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AngularModule, decorators: [{
|
|
1335
1345
|
type: NgModule,
|
|
1336
1346
|
args: [{
|
|
1337
1347
|
imports: [
|
|
@@ -1363,8 +1373,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1363
1373
|
}] });
|
|
1364
1374
|
|
|
1365
1375
|
class PrimeModule {
|
|
1366
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1367
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1376
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PrimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1377
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: PrimeModule, exports: [AutoCompleteModule,
|
|
1368
1378
|
AvatarModule,
|
|
1369
1379
|
ButtonModule,
|
|
1370
1380
|
CardModule,
|
|
@@ -1375,15 +1385,14 @@ class PrimeModule {
|
|
|
1375
1385
|
DividerModule,
|
|
1376
1386
|
FileUploadModule,
|
|
1377
1387
|
IconFieldModule,
|
|
1378
|
-
ImageModule,
|
|
1379
1388
|
InputIconModule,
|
|
1380
1389
|
InputNumberModule,
|
|
1390
|
+
InputPasswordModule,
|
|
1391
|
+
InputTagsModule,
|
|
1381
1392
|
InputTextModule,
|
|
1382
1393
|
ListboxModule,
|
|
1383
|
-
MultiSelectModule,
|
|
1384
1394
|
PaginatorModule,
|
|
1385
1395
|
PanelModule,
|
|
1386
|
-
PasswordModule,
|
|
1387
1396
|
PopoverModule,
|
|
1388
1397
|
ProgressBarModule,
|
|
1389
1398
|
RadioButtonModule,
|
|
@@ -1402,9 +1411,8 @@ class PrimeModule {
|
|
|
1402
1411
|
ToggleSwitchModule,
|
|
1403
1412
|
TooltipModule,
|
|
1404
1413
|
TreeTableModule,
|
|
1405
|
-
ProgressSpinnerModule
|
|
1406
|
-
|
|
1407
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: PrimeModule, imports: [AutoCompleteModule,
|
|
1414
|
+
ProgressSpinnerModule] });
|
|
1415
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PrimeModule, imports: [AutoCompleteModule,
|
|
1408
1416
|
AvatarModule,
|
|
1409
1417
|
ButtonModule,
|
|
1410
1418
|
CardModule,
|
|
@@ -1415,15 +1423,14 @@ class PrimeModule {
|
|
|
1415
1423
|
DividerModule,
|
|
1416
1424
|
FileUploadModule,
|
|
1417
1425
|
IconFieldModule,
|
|
1418
|
-
ImageModule,
|
|
1419
1426
|
InputIconModule,
|
|
1420
1427
|
InputNumberModule,
|
|
1428
|
+
InputPasswordModule,
|
|
1429
|
+
InputTagsModule,
|
|
1421
1430
|
InputTextModule,
|
|
1422
1431
|
ListboxModule,
|
|
1423
|
-
MultiSelectModule,
|
|
1424
1432
|
PaginatorModule,
|
|
1425
1433
|
PanelModule,
|
|
1426
|
-
PasswordModule,
|
|
1427
1434
|
PopoverModule,
|
|
1428
1435
|
ProgressBarModule,
|
|
1429
1436
|
RadioButtonModule,
|
|
@@ -1442,10 +1449,9 @@ class PrimeModule {
|
|
|
1442
1449
|
ToggleSwitchModule,
|
|
1443
1450
|
TooltipModule,
|
|
1444
1451
|
TreeTableModule,
|
|
1445
|
-
ProgressSpinnerModule
|
|
1446
|
-
ColorPickerModule] });
|
|
1452
|
+
ProgressSpinnerModule] });
|
|
1447
1453
|
}
|
|
1448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PrimeModule, decorators: [{
|
|
1449
1455
|
type: NgModule,
|
|
1450
1456
|
args: [{
|
|
1451
1457
|
exports: [
|
|
@@ -1460,15 +1466,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1460
1466
|
DividerModule,
|
|
1461
1467
|
FileUploadModule,
|
|
1462
1468
|
IconFieldModule,
|
|
1463
|
-
ImageModule,
|
|
1464
1469
|
InputIconModule,
|
|
1465
1470
|
InputNumberModule,
|
|
1471
|
+
InputPasswordModule,
|
|
1472
|
+
InputTagsModule,
|
|
1466
1473
|
InputTextModule,
|
|
1467
1474
|
ListboxModule,
|
|
1468
|
-
MultiSelectModule,
|
|
1469
1475
|
PaginatorModule,
|
|
1470
1476
|
PanelModule,
|
|
1471
|
-
PasswordModule,
|
|
1472
1477
|
PopoverModule,
|
|
1473
1478
|
ProgressBarModule,
|
|
1474
1479
|
RadioButtonModule,
|
|
@@ -1488,7 +1493,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1488
1493
|
TooltipModule,
|
|
1489
1494
|
TreeTableModule,
|
|
1490
1495
|
ProgressSpinnerModule,
|
|
1491
|
-
ColorPickerModule,
|
|
1492
1496
|
],
|
|
1493
1497
|
}]
|
|
1494
1498
|
}] });
|
|
@@ -1507,29 +1511,36 @@ class ApiResourceService {
|
|
|
1507
1511
|
baseUrl;
|
|
1508
1512
|
moduleApiName;
|
|
1509
1513
|
// ── Public writable signals ───────────────────────────────────────────────
|
|
1510
|
-
searchTerm = signal('',
|
|
1511
|
-
|
|
1514
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
1515
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
1516
|
+
filterData = signal({ ...DEFAULT_FILTER }, /* @ts-ignore */
|
|
1517
|
+
...(ngDevMode ? [{ debugName: "filterData" }] : /* istanbul ignore next */ []));
|
|
1512
1518
|
// ── Private activation gate: avoids an initial fetch before fetchList() ──
|
|
1513
|
-
_active = signal(false,
|
|
1519
|
+
_active = signal(false, /* @ts-ignore */
|
|
1520
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
1514
1521
|
// ── Resource (reactive list fetching with abort support) ──────────────────
|
|
1515
1522
|
listResource;
|
|
1516
1523
|
// ── Derived/computed signals (pure reads, no side-effects) ────────────────
|
|
1517
|
-
isLoading = computed(() => this.listResource.isLoading(),
|
|
1524
|
+
isLoading = computed(() => this.listResource.isLoading(), /* @ts-ignore */
|
|
1525
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1518
1526
|
data = computed(() => {
|
|
1519
1527
|
if (this.listResource.error())
|
|
1520
1528
|
return [];
|
|
1521
1529
|
return this.listResource.value()?.data ?? [];
|
|
1522
|
-
},
|
|
1530
|
+
}, /* @ts-ignore */
|
|
1531
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1523
1532
|
total = computed(() => {
|
|
1524
1533
|
if (this.listResource.error())
|
|
1525
1534
|
return 0;
|
|
1526
1535
|
return this.listResource.value()?.meta?.total ?? 0;
|
|
1527
|
-
},
|
|
1536
|
+
}, /* @ts-ignore */
|
|
1537
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
1528
1538
|
pageInfo = computed(() => {
|
|
1529
1539
|
if (this.listResource.error())
|
|
1530
1540
|
return undefined;
|
|
1531
1541
|
return this.listResource.value()?.meta;
|
|
1532
|
-
},
|
|
1542
|
+
}, /* @ts-ignore */
|
|
1543
|
+
...(ngDevMode ? [{ debugName: "pageInfo" }] : /* istanbul ignore next */ []));
|
|
1533
1544
|
hasMore = computed(() => {
|
|
1534
1545
|
if (this.listResource.error())
|
|
1535
1546
|
return false;
|
|
@@ -1537,9 +1548,12 @@ class ApiResourceService {
|
|
|
1537
1548
|
if (!meta)
|
|
1538
1549
|
return false;
|
|
1539
1550
|
return meta.hasMore ?? (meta.page + 1) * meta.pageSize < meta.total;
|
|
1540
|
-
},
|
|
1541
|
-
|
|
1542
|
-
|
|
1551
|
+
}, /* @ts-ignore */
|
|
1552
|
+
...(ngDevMode ? [{ debugName: "hasMore" }] : /* istanbul ignore next */ []));
|
|
1553
|
+
error = computed(() => this.listResource.error(), /* @ts-ignore */
|
|
1554
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
1555
|
+
status = computed(() => this.listResource.status(), /* @ts-ignore */
|
|
1556
|
+
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
1543
1557
|
constructor(moduleApiName, serviceName) {
|
|
1544
1558
|
this.moduleApiName = moduleApiName;
|
|
1545
1559
|
// ── Resolve base URL once at construction, not per-request ───────────────
|
|
@@ -1549,7 +1563,7 @@ class ApiResourceService {
|
|
|
1549
1563
|
this.baseUrl = moduleApiName
|
|
1550
1564
|
? `${serviceBaseUrl}/${moduleApiName}`
|
|
1551
1565
|
: serviceBaseUrl;
|
|
1552
|
-
this.listResource = resource({ ...(ngDevMode ? { debugName: "listResource" } : {}), params: () => {
|
|
1566
|
+
this.listResource = resource({ ...(ngDevMode ? { debugName: "listResource" } : /* istanbul ignore next */ {}), params: () => {
|
|
1553
1567
|
// Short-circuit: skip the loader entirely when not yet activated
|
|
1554
1568
|
if (!this._active())
|
|
1555
1569
|
return undefined;
|
|
@@ -1661,8 +1675,10 @@ class ApiResourceService {
|
|
|
1661
1675
|
|
|
1662
1676
|
class BaseFormControl {
|
|
1663
1677
|
injector = inject(Injector);
|
|
1664
|
-
disabled = model(false,
|
|
1665
|
-
|
|
1678
|
+
disabled = model(false, /* @ts-ignore */
|
|
1679
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1680
|
+
touched = model(false, /* @ts-ignore */
|
|
1681
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
1666
1682
|
// ── CVA callbacks ─────────────────────────────────────────────────────────
|
|
1667
1683
|
// Initialised to no-ops so subclasses never need null-guards
|
|
1668
1684
|
onChange = () => { };
|
|
@@ -1724,10 +1740,10 @@ class BaseFormControl {
|
|
|
1724
1740
|
this.onTouched();
|
|
1725
1741
|
}
|
|
1726
1742
|
}
|
|
1727
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1728
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1744
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: BaseFormControl, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", touched: "touchedChange" }, ngImport: i0 });
|
|
1729
1745
|
}
|
|
1730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormControl, decorators: [{
|
|
1731
1747
|
type: Directive
|
|
1732
1748
|
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }] } });
|
|
1733
1749
|
/**
|
|
@@ -1751,12 +1767,12 @@ function provideValueAccessor(component) {
|
|
|
1751
1767
|
}
|
|
1752
1768
|
|
|
1753
1769
|
class BaseListTemplateDirective {
|
|
1754
|
-
key = input.required({ ...(ngDevMode ? { debugName: "key" } : {}), alias: 'baseListTemplate' });
|
|
1770
|
+
key = input.required({ ...(ngDevMode ? { debugName: "key" } : /* istanbul ignore next */ {}), alias: 'baseListTemplate' });
|
|
1755
1771
|
templateRef = inject((TemplateRef));
|
|
1756
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1757
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1772
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseListTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1773
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: BaseListTemplateDirective, isStandalone: true, selector: "ng-template[baseListTemplate]", inputs: { key: { classPropertyName: "key", publicName: "baseListTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1758
1774
|
}
|
|
1759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseListTemplateDirective, decorators: [{
|
|
1760
1776
|
type: Directive,
|
|
1761
1777
|
args: [{ selector: 'ng-template[baseListTemplate]' }]
|
|
1762
1778
|
}], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseListTemplate", required: true }] }] } });
|
|
@@ -1766,37 +1782,63 @@ class BaseListComponent {
|
|
|
1766
1782
|
router = inject(Router, { optional: true });
|
|
1767
1783
|
messageService = inject(MessageService, { optional: true });
|
|
1768
1784
|
confirmationService = inject(ConfirmationService, { optional: true });
|
|
1769
|
-
columns = input.required(
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1785
|
+
columns = input.required(/* @ts-ignore */
|
|
1786
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1787
|
+
actions = input([], /* @ts-ignore */
|
|
1788
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
1789
|
+
title = input('', /* @ts-ignore */
|
|
1790
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1791
|
+
showCreateButton = input(true, /* @ts-ignore */
|
|
1792
|
+
...(ngDevMode ? [{ debugName: "showCreateButton" }] : /* istanbul ignore next */ []));
|
|
1793
|
+
searchable = input(false, /* @ts-ignore */
|
|
1794
|
+
...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
1795
|
+
pageSize = input(10, /* @ts-ignore */
|
|
1796
|
+
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
1797
|
+
emptyMessage = input('', /* @ts-ignore */
|
|
1798
|
+
...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
1799
|
+
createButtonLabel = input('', /* @ts-ignore */
|
|
1800
|
+
...(ngDevMode ? [{ debugName: "createButtonLabel" }] : /* istanbul ignore next */ []));
|
|
1801
|
+
createButtonIcon = input('pi pi-plus', /* @ts-ignore */
|
|
1802
|
+
...(ngDevMode ? [{ debugName: "createButtonIcon" }] : /* istanbul ignore next */ []));
|
|
1803
|
+
data = input([], /* @ts-ignore */
|
|
1804
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
1805
|
+
total = input(0, /* @ts-ignore */
|
|
1806
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
1807
|
+
isLoading = input(false, /* @ts-ignore */
|
|
1808
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1809
|
+
service = input(null, /* @ts-ignore */
|
|
1810
|
+
...(ngDevMode ? [{ debugName: "service" }] : /* istanbul ignore next */ []));
|
|
1811
|
+
filter = input({}, /* @ts-ignore */
|
|
1812
|
+
...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
1813
|
+
createRoute = input(null, /* @ts-ignore */
|
|
1814
|
+
...(ngDevMode ? [{ debugName: "createRoute" }] : /* istanbul ignore next */ []));
|
|
1815
|
+
editRoute = input(null, /* @ts-ignore */
|
|
1816
|
+
...(ngDevMode ? [{ debugName: "editRoute" }] : /* istanbul ignore next */ []));
|
|
1817
|
+
deleteConfirmField = input(null, /* @ts-ignore */
|
|
1818
|
+
...(ngDevMode ? [{ debugName: "deleteConfirmField" }] : /* istanbul ignore next */ []));
|
|
1819
|
+
idField = input('id', /* @ts-ignore */
|
|
1820
|
+
...(ngDevMode ? [{ debugName: "idField" }] : /* istanbul ignore next */ []));
|
|
1821
|
+
canEdit = input(null, /* @ts-ignore */
|
|
1822
|
+
...(ngDevMode ? [{ debugName: "canEdit" }] : /* istanbul ignore next */ []));
|
|
1823
|
+
canDelete = input(null, /* @ts-ignore */
|
|
1824
|
+
...(ngDevMode ? [{ debugName: "canDelete" }] : /* istanbul ignore next */ []));
|
|
1789
1825
|
onCreate = output();
|
|
1790
1826
|
onLazyLoad = output();
|
|
1791
1827
|
onSearch = output();
|
|
1792
|
-
columnTemplates = contentChildren(BaseListTemplateDirective,
|
|
1793
|
-
|
|
1794
|
-
|
|
1828
|
+
columnTemplates = contentChildren(BaseListTemplateDirective, /* @ts-ignore */
|
|
1829
|
+
...(ngDevMode ? [{ debugName: "columnTemplates" }] : /* istanbul ignore next */ []));
|
|
1830
|
+
_first = signal(0, /* @ts-ignore */
|
|
1831
|
+
...(ngDevMode ? [{ debugName: "_first" }] : /* istanbul ignore next */ []));
|
|
1832
|
+
_searchTerm = signal('', /* @ts-ignore */
|
|
1833
|
+
...(ngDevMode ? [{ debugName: "_searchTerm" }] : /* istanbul ignore next */ []));
|
|
1795
1834
|
first = this._first.asReadonly();
|
|
1796
1835
|
searchTerm = this._searchTerm.asReadonly();
|
|
1797
|
-
effectiveData = computed(() => this.service()?.data() ?? this.data(),
|
|
1798
|
-
|
|
1799
|
-
|
|
1836
|
+
effectiveData = computed(() => this.service()?.data() ?? this.data(), /* @ts-ignore */
|
|
1837
|
+
...(ngDevMode ? [{ debugName: "effectiveData" }] : /* istanbul ignore next */ []));
|
|
1838
|
+
effectiveTotal = computed(() => this.service()?.total() ?? this.total(), /* @ts-ignore */
|
|
1839
|
+
...(ngDevMode ? [{ debugName: "effectiveTotal" }] : /* istanbul ignore next */ []));
|
|
1840
|
+
effectiveIsLoading = computed(() => this.service()?.isLoading() ?? this.isLoading(), /* @ts-ignore */
|
|
1841
|
+
...(ngDevMode ? [{ debugName: "effectiveIsLoading" }] : /* istanbul ignore next */ []));
|
|
1800
1842
|
effectiveActions = computed(() => {
|
|
1801
1843
|
const editRoute = this.editRoute();
|
|
1802
1844
|
const deleteField = this.deleteConfirmField();
|
|
@@ -1809,11 +1851,16 @@ class BaseListComponent {
|
|
|
1809
1851
|
show: this.canDelete() ?? undefined, handler: (item) => this.handleDeleteItem(item) }]
|
|
1810
1852
|
: [];
|
|
1811
1853
|
return [...editAction, ...this.actions(), ...deleteAction];
|
|
1812
|
-
},
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1854
|
+
}, /* @ts-ignore */
|
|
1855
|
+
...(ngDevMode ? [{ debugName: "effectiveActions" }] : /* istanbul ignore next */ []));
|
|
1856
|
+
visibleColumns = computed(() => this.columns().filter((c) => !c.hidden), /* @ts-ignore */
|
|
1857
|
+
...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
1858
|
+
columnCount = computed(() => this.visibleColumns().length + (this.effectiveActions().length > 0 ? 1 : 0), /* @ts-ignore */
|
|
1859
|
+
...(ngDevMode ? [{ debugName: "columnCount" }] : /* istanbul ignore next */ []));
|
|
1860
|
+
resolvedEmptyMessage = computed(() => this.emptyMessage() || this.t('shared.no.data'), /* @ts-ignore */
|
|
1861
|
+
...(ngDevMode ? [{ debugName: "resolvedEmptyMessage" }] : /* istanbul ignore next */ []));
|
|
1862
|
+
resolvedCreateLabel = computed(() => this.createButtonLabel() || this.t('shared.create'), /* @ts-ignore */
|
|
1863
|
+
...(ngDevMode ? [{ debugName: "resolvedCreateLabel" }] : /* istanbul ignore next */ []));
|
|
1817
1864
|
handleLazyLoad(event) {
|
|
1818
1865
|
const first = event.first ?? 0;
|
|
1819
1866
|
const rows = event.rows ?? this.pageSize();
|
|
@@ -1906,21 +1953,21 @@ class BaseListComponent {
|
|
|
1906
1953
|
t(key, vars) {
|
|
1907
1954
|
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
1908
1955
|
}
|
|
1909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1910
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: BaseListComponent, isStandalone: true, selector: "lib-base-list", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, createButtonLabel: { classPropertyName: "createButtonLabel", publicName: "createButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, createButtonIcon: { classPropertyName: "createButtonIcon", publicName: "createButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, createRoute: { classPropertyName: "createRoute", publicName: "createRoute", isSignal: true, isRequired: false, transformFunction: null }, editRoute: { classPropertyName: "editRoute", publicName: "editRoute", isSignal: true, isRequired: false, transformFunction: null }, deleteConfirmField: { classPropertyName: "deleteConfirmField", publicName: "deleteConfirmField", isSignal: true, isRequired: false, transformFunction: null }, idField: { classPropertyName: "idField", publicName: "idField", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, canDelete: { classPropertyName: "canDelete", publicName: "canDelete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCreate: "onCreate", onLazyLoad: "onLazyLoad", onSearch: "onSearch" }, queries: [{ propertyName: "columnTemplates", predicate: BaseListTemplateDirective, isSignal: true }], ngImport: i0, template: "<p-card>\n <ng-template #header>\n @if (title() || searchable() || showCreateButton()) {\n <div class=\"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 p-4\">\n @if (title()) {\n <h2 class=\"text-xl font-semibold m-0\">{{ title() }}</h2>\n }\n <div class=\"flex items-center gap-2\" [class.ml-auto]=\"!!title()\">\n @if (searchable()) {\n <p-iconfield>\n <p-inputicon class=\"pi pi-search\" />\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"t('shared.search')\"\n />\n </p-iconfield>\n }\n @if (showCreateButton()) {\n <p-button\n [icon]=\"createButtonIcon()\"\n [label]=\"resolvedCreateLabel()\"\n (onClick)=\"handleCreate()\"\n />\n }\n </div>\n </div>\n }\n </ng-template>\n\n <div class=\"overflow-x-auto\">\n <p-table\n [value]=\"effectiveData()\"\n [loading]=\"effectiveIsLoading()\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"effectiveTotal() > pageSize()\"\n [rows]=\"pageSize()\"\n [totalRecords]=\"effectiveTotal()\"\n [first]=\"first()\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n [showCurrentPageReport]=\"true\"\n [currentPageReportTemplate]=\"t('shared.pagination.report')\"\n class=\"p-datatable-striped\"\n >\n <ng-template #header>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <th [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\" [class]=\"getCellClass(col)\">\n {{ col.header }}\n </th>\n }\n @if (effectiveActions().length > 0) {\n <th style=\"width: 120px; text-align: center;\">{{ t('shared.actions') }}</th>\n }\n </tr>\n </ng-template>\n\n <ng-template #body let-item>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <td [class]=\"getCellClass(col)\">\n @switch (col.type ?? 'text') {\n @case ('tag') {\n @if (getTagConfig(col, getFieldValue(item, col.field)); as tagCfg) {\n <p-tag [severity]=\"tagCfg.severity\" [value]=\"tagCfg.label ?? getFieldValueAsString(item, col.field)\" />\n } @else {\n {{ getFieldValueAsString(item, col.field) }}\n }\n }\n @case ('boolean') {\n <p-tag\n [severity]=\"getFieldValue(item, col.field) ? 'success' : 'danger'\"\n [value]=\"getFieldValue(item, col.field) ? t('shared.yes') : t('shared.no')\"\n />\n }\n @case ('date') {\n {{ getFieldValueAsString(item, col.field) | date: (col.dateFormat ?? 'dd/MM/yyyy') }}\n }\n @case ('number') {\n {{ getFieldValueAsString(item, col.field) | number }}\n }\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getColumnTemplate(col.field); context: { $implicit: item, field: col.field }\"\n />\n }\n @default {\n {{ truncateText(getFieldValue(item, col.field), col.truncate) }}\n }\n }\n </td>\n }\n @if (effectiveActions().length > 0) {\n <td>\n <div class=\"flex items-center justify-center gap-2\">\n @for (action of effectiveActions(); track $index) {\n @if (!action.show || action.show(item)) {\n <p-button\n [icon]=\"action.icon\"\n [severity]=\"action.severity\"\n [pTooltip]=\"action.tooltip ? t(action.tooltip) : ''\"\n [disabled]=\"action.disabled ? action.disabled(item) : false\"\n (onClick)=\"action.handler(item)\"\n [rounded]=\"true\"\n [text]=\"true\"\n />\n }\n }\n </div>\n </td>\n }\n </tr>\n </ng-template>\n\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"columnCount()\">\n <div class=\"flex flex-col items-center justify-center py-12 text-surface-400\">\n <i class=\"pi pi-inbox text-5xl mb-3\"></i>\n <span>{{ resolvedEmptyMessage() }}</span>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n</p-card>\n", dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i5.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i6.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i8$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: i9.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
1956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1957
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: BaseListComponent, isStandalone: true, selector: "lib-base-list", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, createButtonLabel: { classPropertyName: "createButtonLabel", publicName: "createButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, createButtonIcon: { classPropertyName: "createButtonIcon", publicName: "createButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, createRoute: { classPropertyName: "createRoute", publicName: "createRoute", isSignal: true, isRequired: false, transformFunction: null }, editRoute: { classPropertyName: "editRoute", publicName: "editRoute", isSignal: true, isRequired: false, transformFunction: null }, deleteConfirmField: { classPropertyName: "deleteConfirmField", publicName: "deleteConfirmField", isSignal: true, isRequired: false, transformFunction: null }, idField: { classPropertyName: "idField", publicName: "idField", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, canDelete: { classPropertyName: "canDelete", publicName: "canDelete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCreate: "onCreate", onLazyLoad: "onLazyLoad", onSearch: "onSearch" }, queries: [{ propertyName: "columnTemplates", predicate: BaseListTemplateDirective, isSignal: true }], ngImport: i0, template: "<p-card>\n <ng-template #header>\n @if (title() || searchable() || showCreateButton()) {\n <div class=\"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 p-4\">\n @if (title()) {\n <h2 class=\"text-xl font-semibold m-0\">{{ title() }}</h2>\n }\n <div class=\"flex items-center gap-2\" [class.ml-auto]=\"!!title()\">\n @if (searchable()) {\n <p-iconfield>\n <p-inputicon class=\"pi pi-search\" />\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"t('shared.search')\"\n />\n </p-iconfield>\n }\n @if (showCreateButton()) {\n <button\n pButton\n (click)=\"handleCreate()\"\n >\n <span pButtonIcon [class]=\"createButtonIcon()\"></span>\n <span pButtonLabel>{{ resolvedCreateLabel() }}</span>\n </button>\n }\n </div>\n </div>\n }\n </ng-template>\n\n <div class=\"overflow-x-auto\">\n <p-table\n [value]=\"effectiveData()\"\n [loading]=\"effectiveIsLoading()\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"effectiveTotal() > pageSize()\"\n [rows]=\"pageSize()\"\n [totalRecords]=\"effectiveTotal()\"\n [first]=\"first()\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n [showCurrentPageReport]=\"true\"\n [currentPageReportTemplate]=\"t('shared.pagination.report')\"\n class=\"p-datatable-striped\"\n >\n <ng-template #header>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <th [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\" [class]=\"getCellClass(col)\">\n {{ col.header }}\n </th>\n }\n @if (effectiveActions().length > 0) {\n <th style=\"width: 120px; text-align: center;\">{{ t('shared.actions') }}</th>\n }\n </tr>\n </ng-template>\n\n <ng-template #body let-item>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <td [class]=\"getCellClass(col)\">\n @switch (col.type ?? 'text') {\n @case ('tag') {\n @if (getTagConfig(col, getFieldValue(item, col.field)); as tagCfg) {\n <p-tag [severity]=\"tagCfg.severity\" [value]=\"tagCfg.label ?? getFieldValueAsString(item, col.field)\" />\n } @else {\n {{ getFieldValueAsString(item, col.field) }}\n }\n }\n @case ('boolean') {\n <p-tag\n [severity]=\"getFieldValue(item, col.field) ? 'success' : 'danger'\"\n [value]=\"getFieldValue(item, col.field) ? t('shared.yes') : t('shared.no')\"\n />\n }\n @case ('date') {\n {{ getFieldValueAsString(item, col.field) | date: (col.dateFormat ?? 'dd/MM/yyyy') }}\n }\n @case ('number') {\n {{ getFieldValueAsString(item, col.field) | number }}\n }\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getColumnTemplate(col.field); context: { $implicit: item, field: col.field }\"\n />\n }\n @default {\n {{ truncateText(getFieldValue(item, col.field), col.truncate) }}\n }\n }\n </td>\n }\n @if (effectiveActions().length > 0) {\n <td>\n <div class=\"flex items-center justify-center gap-2\">\n @for (action of effectiveActions(); track $index) {\n @if (!action.show || action.show(item)) {\n <button\n pButton\n [severity]=\"action.severity\"\n [pTooltip]=\"action.tooltip ? t(action.tooltip) : ''\"\n [disabled]=\"action.disabled ? action.disabled(item) : false\"\n (click)=\"action.handler(item)\"\n [rounded]=\"true\"\n [text]=\"true\"\n >\n <span pButtonIcon [class]=\"action.icon\"></span>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n </ng-template>\n\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"columnCount()\">\n <div class=\"flex flex-col items-center justify-center py-12 text-surface-400\">\n <i class=\"pi pi-inbox text-5xl mb-3\"></i>\n <span>{{ resolvedEmptyMessage() }}</span>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n</p-card>\n", dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i3.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i3.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader"] }, { kind: "component", type: i5.IconField, selector: "p-iconfield, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: i6.InputIcon, selector: "p-inputicon", inputs: ["hostName"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "firstChange", "rowsChange", "totalRecordsChange", "selectionChange", "selectAllChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "onStateSave", "onStateRestore"] }, { kind: "component", type: i9.Tag, selector: "p-tag", inputs: ["severity", "value", "icon", "rounded"] }, { kind: "directive", type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
1911
1958
|
}
|
|
1912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseListComponent, decorators: [{
|
|
1913
1960
|
type: Component,
|
|
1914
|
-
args: [{ selector: 'lib-base-list', imports: [AngularModule, PrimeModule], template: "<p-card>\n <ng-template #header>\n @if (title() || searchable() || showCreateButton()) {\n <div class=\"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 p-4\">\n @if (title()) {\n <h2 class=\"text-xl font-semibold m-0\">{{ title() }}</h2>\n }\n <div class=\"flex items-center gap-2\" [class.ml-auto]=\"!!title()\">\n @if (searchable()) {\n <p-iconfield>\n <p-inputicon class=\"pi pi-search\" />\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"t('shared.search')\"\n />\n </p-iconfield>\n }\n @if (showCreateButton()) {\n <
|
|
1961
|
+
args: [{ selector: 'lib-base-list', imports: [AngularModule, PrimeModule], template: "<p-card>\n <ng-template #header>\n @if (title() || searchable() || showCreateButton()) {\n <div class=\"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 p-4\">\n @if (title()) {\n <h2 class=\"text-xl font-semibold m-0\">{{ title() }}</h2>\n }\n <div class=\"flex items-center gap-2\" [class.ml-auto]=\"!!title()\">\n @if (searchable()) {\n <p-iconfield>\n <p-inputicon class=\"pi pi-search\" />\n <input\n pInputText\n type=\"text\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"t('shared.search')\"\n />\n </p-iconfield>\n }\n @if (showCreateButton()) {\n <button\n pButton\n (click)=\"handleCreate()\"\n >\n <span pButtonIcon [class]=\"createButtonIcon()\"></span>\n <span pButtonLabel>{{ resolvedCreateLabel() }}</span>\n </button>\n }\n </div>\n </div>\n }\n </ng-template>\n\n <div class=\"overflow-x-auto\">\n <p-table\n [value]=\"effectiveData()\"\n [loading]=\"effectiveIsLoading()\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"effectiveTotal() > pageSize()\"\n [rows]=\"pageSize()\"\n [totalRecords]=\"effectiveTotal()\"\n [first]=\"first()\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n [showCurrentPageReport]=\"true\"\n [currentPageReportTemplate]=\"t('shared.pagination.report')\"\n class=\"p-datatable-striped\"\n >\n <ng-template #header>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <th [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\" [class]=\"getCellClass(col)\">\n {{ col.header }}\n </th>\n }\n @if (effectiveActions().length > 0) {\n <th style=\"width: 120px; text-align: center;\">{{ t('shared.actions') }}</th>\n }\n </tr>\n </ng-template>\n\n <ng-template #body let-item>\n <tr>\n @for (col of visibleColumns(); track col.field) {\n <td [class]=\"getCellClass(col)\">\n @switch (col.type ?? 'text') {\n @case ('tag') {\n @if (getTagConfig(col, getFieldValue(item, col.field)); as tagCfg) {\n <p-tag [severity]=\"tagCfg.severity\" [value]=\"tagCfg.label ?? getFieldValueAsString(item, col.field)\" />\n } @else {\n {{ getFieldValueAsString(item, col.field) }}\n }\n }\n @case ('boolean') {\n <p-tag\n [severity]=\"getFieldValue(item, col.field) ? 'success' : 'danger'\"\n [value]=\"getFieldValue(item, col.field) ? t('shared.yes') : t('shared.no')\"\n />\n }\n @case ('date') {\n {{ getFieldValueAsString(item, col.field) | date: (col.dateFormat ?? 'dd/MM/yyyy') }}\n }\n @case ('number') {\n {{ getFieldValueAsString(item, col.field) | number }}\n }\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getColumnTemplate(col.field); context: { $implicit: item, field: col.field }\"\n />\n }\n @default {\n {{ truncateText(getFieldValue(item, col.field), col.truncate) }}\n }\n }\n </td>\n }\n @if (effectiveActions().length > 0) {\n <td>\n <div class=\"flex items-center justify-center gap-2\">\n @for (action of effectiveActions(); track $index) {\n @if (!action.show || action.show(item)) {\n <button\n pButton\n [severity]=\"action.severity\"\n [pTooltip]=\"action.tooltip ? t(action.tooltip) : ''\"\n [disabled]=\"action.disabled ? action.disabled(item) : false\"\n (click)=\"action.handler(item)\"\n [rounded]=\"true\"\n [text]=\"true\"\n >\n <span pButtonIcon [class]=\"action.icon\"></span>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n </ng-template>\n\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"columnCount()\">\n <div class=\"flex flex-col items-center justify-center py-12 text-surface-400\">\n <i class=\"pi pi-inbox text-5xl mb-3\"></i>\n <span>{{ resolvedEmptyMessage() }}</span>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n</p-card>\n" }]
|
|
1915
1962
|
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], createButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "createButtonLabel", required: false }] }], createButtonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "createButtonIcon", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], service: [{ type: i0.Input, args: [{ isSignal: true, alias: "service", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], createRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "createRoute", required: false }] }], editRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "editRoute", required: false }] }], deleteConfirmField: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteConfirmField", required: false }] }], idField: [{ type: i0.Input, args: [{ isSignal: true, alias: "idField", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], canDelete: [{ type: i0.Input, args: [{ isSignal: true, alias: "canDelete", required: false }] }], onCreate: [{ type: i0.Output, args: ["onCreate"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onSearch: [{ type: i0.Output, args: ["onSearch"] }], columnTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BaseListTemplateDirective), { isSignal: true }] }] } });
|
|
1916
1963
|
|
|
1917
1964
|
class BaseFormTemplateDirective {
|
|
1918
|
-
key = input.required({ ...(ngDevMode ? { debugName: "key" } : {}), alias: 'baseFormTemplate' });
|
|
1965
|
+
key = input.required({ ...(ngDevMode ? { debugName: "key" } : /* istanbul ignore next */ {}), alias: 'baseFormTemplate' });
|
|
1919
1966
|
templateRef = inject((TemplateRef));
|
|
1920
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1921
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1967
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1968
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: BaseFormTemplateDirective, isStandalone: true, selector: "ng-template[baseFormTemplate]", inputs: { key: { classPropertyName: "key", publicName: "baseFormTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
1922
1969
|
}
|
|
1923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormTemplateDirective, decorators: [{
|
|
1924
1971
|
type: Directive,
|
|
1925
1972
|
args: [{ selector: 'ng-template[baseFormTemplate]' }]
|
|
1926
1973
|
}], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseFormTemplate", required: true }] }] } });
|
|
@@ -1929,47 +1976,75 @@ class BaseFormComponent {
|
|
|
1929
1976
|
translateAdapter = inject(TranslateService, { optional: true });
|
|
1930
1977
|
router = inject(Router, { optional: true });
|
|
1931
1978
|
messageService = inject(MessageService, { optional: true });
|
|
1932
|
-
fields = input.required(
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1979
|
+
fields = input.required(/* @ts-ignore */
|
|
1980
|
+
...(ngDevMode ? [{ debugName: "fields" }] : /* istanbul ignore next */ []));
|
|
1981
|
+
title = input('', /* @ts-ignore */
|
|
1982
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
1983
|
+
createTitle = input('', /* @ts-ignore */
|
|
1984
|
+
...(ngDevMode ? [{ debugName: "createTitle" }] : /* istanbul ignore next */ []));
|
|
1985
|
+
editTitle = input('', /* @ts-ignore */
|
|
1986
|
+
...(ngDevMode ? [{ debugName: "editTitle" }] : /* istanbul ignore next */ []));
|
|
1987
|
+
columns = input(2, /* @ts-ignore */
|
|
1988
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1989
|
+
submitLabel = input('', /* @ts-ignore */
|
|
1990
|
+
...(ngDevMode ? [{ debugName: "submitLabel" }] : /* istanbul ignore next */ []));
|
|
1991
|
+
cancelLabel = input('', /* @ts-ignore */
|
|
1992
|
+
...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
1993
|
+
isLoading = input(false, /* @ts-ignore */
|
|
1994
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1995
|
+
isEditMode = input(false, /* @ts-ignore */
|
|
1996
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
1997
|
+
initialValue = input({}, /* @ts-ignore */
|
|
1998
|
+
...(ngDevMode ? [{ debugName: "initialValue" }] : /* istanbul ignore next */ []));
|
|
1999
|
+
service = input(null, /* @ts-ignore */
|
|
2000
|
+
...(ngDevMode ? [{ debugName: "service" }] : /* istanbul ignore next */ []));
|
|
2001
|
+
editId = input(null, /* @ts-ignore */
|
|
2002
|
+
...(ngDevMode ? [{ debugName: "editId" }] : /* istanbul ignore next */ []));
|
|
2003
|
+
cancelRoute = input(null, /* @ts-ignore */
|
|
2004
|
+
...(ngDevMode ? [{ debugName: "cancelRoute" }] : /* istanbul ignore next */ []));
|
|
2005
|
+
navigateOnSuccess = input(null, /* @ts-ignore */
|
|
2006
|
+
...(ngDevMode ? [{ debugName: "navigateOnSuccess" }] : /* istanbul ignore next */ []));
|
|
2007
|
+
mapToRequest = input(null, /* @ts-ignore */
|
|
2008
|
+
...(ngDevMode ? [{ debugName: "mapToRequest" }] : /* istanbul ignore next */ []));
|
|
2009
|
+
mapFromEntity = input(null, /* @ts-ignore */
|
|
2010
|
+
...(ngDevMode ? [{ debugName: "mapFromEntity" }] : /* istanbul ignore next */ []));
|
|
1948
2011
|
onSubmit = output();
|
|
1949
2012
|
onCancel = output();
|
|
1950
2013
|
onValueChange = output();
|
|
1951
|
-
fieldTemplates = contentChildren(BaseFormTemplateDirective,
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
2014
|
+
fieldTemplates = contentChildren(BaseFormTemplateDirective, /* @ts-ignore */
|
|
2015
|
+
...(ngDevMode ? [{ debugName: "fieldTemplates" }] : /* istanbul ignore next */ []));
|
|
2016
|
+
_formData = signal({}, /* @ts-ignore */
|
|
2017
|
+
...(ngDevMode ? [{ debugName: "_formData" }] : /* istanbul ignore next */ []));
|
|
2018
|
+
_submitted = signal(false, /* @ts-ignore */
|
|
2019
|
+
...(ngDevMode ? [{ debugName: "_submitted" }] : /* istanbul ignore next */ []));
|
|
2020
|
+
_isLoadingInternal = signal(false, /* @ts-ignore */
|
|
2021
|
+
...(ngDevMode ? [{ debugName: "_isLoadingInternal" }] : /* istanbul ignore next */ []));
|
|
2022
|
+
_touchedFields = signal(new Set(), /* @ts-ignore */
|
|
2023
|
+
...(ngDevMode ? [{ debugName: "_touchedFields" }] : /* istanbul ignore next */ []));
|
|
2024
|
+
_visiblePasswordFields = signal(new Set(), /* @ts-ignore */
|
|
2025
|
+
...(ngDevMode ? [{ debugName: "_visiblePasswordFields" }] : /* istanbul ignore next */ []));
|
|
1956
2026
|
formData = this._formData.asReadonly();
|
|
1957
2027
|
submitted = this._submitted.asReadonly();
|
|
1958
|
-
effectiveIsEditMode = computed(() => this.isEditMode() || !!this.editId(),
|
|
1959
|
-
|
|
1960
|
-
|
|
2028
|
+
effectiveIsEditMode = computed(() => this.isEditMode() || !!this.editId(), /* @ts-ignore */
|
|
2029
|
+
...(ngDevMode ? [{ debugName: "effectiveIsEditMode" }] : /* istanbul ignore next */ []));
|
|
2030
|
+
effectiveIsLoading = computed(() => this.isLoading() || this._isLoadingInternal(), /* @ts-ignore */
|
|
2031
|
+
...(ngDevMode ? [{ debugName: "effectiveIsLoading" }] : /* istanbul ignore next */ []));
|
|
2032
|
+
isFormValid = computed(() => this.checkValidity(), /* @ts-ignore */
|
|
2033
|
+
...(ngDevMode ? [{ debugName: "isFormValid" }] : /* istanbul ignore next */ []));
|
|
1961
2034
|
resolvedTitle = computed(() => {
|
|
1962
2035
|
if (this.effectiveIsEditMode())
|
|
1963
2036
|
return this.editTitle() || this.title();
|
|
1964
2037
|
return this.createTitle() || this.title();
|
|
1965
|
-
},
|
|
2038
|
+
}, /* @ts-ignore */
|
|
2039
|
+
...(ngDevMode ? [{ debugName: "resolvedTitle" }] : /* istanbul ignore next */ []));
|
|
1966
2040
|
gridClass = computed(() => {
|
|
1967
2041
|
switch (this.columns()) {
|
|
1968
2042
|
case 1: return 'grid-cols-1';
|
|
1969
2043
|
case 3: return 'grid-cols-1 md:grid-cols-3';
|
|
1970
2044
|
default: return 'grid-cols-1 md:grid-cols-2';
|
|
1971
2045
|
}
|
|
1972
|
-
},
|
|
2046
|
+
}, /* @ts-ignore */
|
|
2047
|
+
...(ngDevMode ? [{ debugName: "gridClass" }] : /* istanbul ignore next */ []));
|
|
1973
2048
|
constructor() {
|
|
1974
2049
|
effect(() => {
|
|
1975
2050
|
const fields = this.fields();
|
|
@@ -2016,6 +2091,19 @@ class BaseFormComponent {
|
|
|
2016
2091
|
markFieldTouched(key) {
|
|
2017
2092
|
this._touchedFields.update((set) => new Set([...set, key]));
|
|
2018
2093
|
}
|
|
2094
|
+
isPasswordVisible(key) {
|
|
2095
|
+
return this._visiblePasswordFields().has(key);
|
|
2096
|
+
}
|
|
2097
|
+
togglePasswordVisibility(key) {
|
|
2098
|
+
this._visiblePasswordFields.update((set) => {
|
|
2099
|
+
const next = new Set(set);
|
|
2100
|
+
if (next.has(key))
|
|
2101
|
+
next.delete(key);
|
|
2102
|
+
else
|
|
2103
|
+
next.add(key);
|
|
2104
|
+
return next;
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2019
2107
|
isFieldInvalid(field) {
|
|
2020
2108
|
const isActive = this._submitted() || this._touchedFields().has(field.key);
|
|
2021
2109
|
if (!isActive || !field.required)
|
|
@@ -2107,28 +2195,29 @@ class BaseFormComponent {
|
|
|
2107
2195
|
return '';
|
|
2108
2196
|
}
|
|
2109
2197
|
}
|
|
2110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: BaseFormComponent, isStandalone: true, selector: "lib-base-form", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, createTitle: { classPropertyName: "createTitle", publicName: "createTitle", isSignal: true, isRequired: false, transformFunction: null }, editTitle: { classPropertyName: "editTitle", publicName: "editTitle", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, submitLabel: { classPropertyName: "submitLabel", publicName: "submitLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null }, editId: { classPropertyName: "editId", publicName: "editId", isSignal: true, isRequired: false, transformFunction: null }, cancelRoute: { classPropertyName: "cancelRoute", publicName: "cancelRoute", isSignal: true, isRequired: false, transformFunction: null }, navigateOnSuccess: { classPropertyName: "navigateOnSuccess", publicName: "navigateOnSuccess", isSignal: true, isRequired: false, transformFunction: null }, mapToRequest: { classPropertyName: "mapToRequest", publicName: "mapToRequest", isSignal: true, isRequired: false, transformFunction: null }, mapFromEntity: { classPropertyName: "mapFromEntity", publicName: "mapFromEntity", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSubmit: "onSubmit", onCancel: "onCancel", onValueChange: "onValueChange" }, queries: [{ propertyName: "fieldTemplates", predicate: BaseFormTemplateDirective, isSignal: true }], ngImport: i0, template: "<p-card>\n <ng-template #header>\n @if (resolvedTitle()) {\n <div class=\"flex justify-between items-center p-4\">\n <h2 class=\"text-xl font-semibold m-0\">{{ resolvedTitle() }}</h2>\n </div>\n }\n </ng-template>\n\n <form (ngSubmit)=\"handleSubmit()\" novalidate>\n <div class=\"grid gap-4\" [class]=\"gridClass()\">\n @for (field of fields(); track field.key) {\n <div class=\"flex flex-col gap-2\" [class.col-span-full]=\"field.fullWidth\">\n @if (field.type !== 'checkbox' && field.type !== 'toggle') {\n <label [for]=\"field.key\" class=\"font-medium\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n }\n\n @switch (field.type) {\n @case ('text') {\n <input\n pInputText\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('email') {\n <input\n pInputText\n type=\"email\"\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('password') {\n <p-password\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [feedback]=\"false\"\n [toggleMask]=\"true\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('number') {\n <p-inputnumber\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [min]=\"field.min ?? undefined\"\n [max]=\"field.max ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('textarea') {\n <textarea\n pTextarea\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [rows]=\"field.rows ?? 3\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n ></textarea>\n }\n\n @case ('select') {\n <p-select\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('multiselect') {\n <p-multiselect\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('date') {\n <p-datepicker\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [minDate]=\"field.minDate ?? undefined\"\n [maxDate]=\"field.maxDate ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('checkbox') {\n <div class=\"flex items-center gap-2 h-9\">\n <p-checkbox\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n [binary]=\"true\"\n [invalid]=\"isFieldInvalid(field)\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('toggle') {\n <div class=\"flex items-center gap-3 h-9\">\n <p-toggleswitch\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getFieldTemplate(field.key); context: { $implicit: getFieldValue(field.key), field: field }\"\n />\n }\n }\n\n @if (isFieldInvalid(field)) {\n <small class=\"text-red-500\">{{ field.label }} {{ t('shared.required') }}</small>\n }\n\n @if (field.hint && !isFieldInvalid(field)) {\n <small class=\"text-surface-400\">{{ field.hint }}</small>\n }\n </div>\n }\n\n <div class=\"col-span-full flex justify-end gap-4 pt-4\">\n <p-button\n type=\"button\"\n [label]=\"cancelLabel() || t('shared.cancel')\"\n severity=\"secondary\"\n [outlined]=\"true\"\n [disabled]=\"effectiveIsLoading()\"\n (onClick)=\"handleCancel()\"\n />\n <p-button\n type=\"submit\"\n [label]=\"submitLabel() || (effectiveIsEditMode() ? t('shared.update') : t('shared.save'))\"\n [loading]=\"effectiveIsLoading()\"\n [disabled]=\"!isFormValid() || effectiveIsLoading()\"\n />\n </div>\n </div>\n </form>\n</p-card>\n", dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i5$1.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i6$1.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i7.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i9$1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i10$1.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "toggleMask", "inputStyleClass", "styleClass", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear", "autofocus", "tabindex", "appendTo", "motionOptions", "overlayOptions"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "component", type: i11.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i12.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i13.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }] });
|
|
2198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: BaseFormComponent, isStandalone: true, selector: "lib-base-form", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, createTitle: { classPropertyName: "createTitle", publicName: "createTitle", isSignal: true, isRequired: false, transformFunction: null }, editTitle: { classPropertyName: "editTitle", publicName: "editTitle", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, submitLabel: { classPropertyName: "submitLabel", publicName: "submitLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null }, editId: { classPropertyName: "editId", publicName: "editId", isSignal: true, isRequired: false, transformFunction: null }, cancelRoute: { classPropertyName: "cancelRoute", publicName: "cancelRoute", isSignal: true, isRequired: false, transformFunction: null }, navigateOnSuccess: { classPropertyName: "navigateOnSuccess", publicName: "navigateOnSuccess", isSignal: true, isRequired: false, transformFunction: null }, mapToRequest: { classPropertyName: "mapToRequest", publicName: "mapToRequest", isSignal: true, isRequired: false, transformFunction: null }, mapFromEntity: { classPropertyName: "mapFromEntity", publicName: "mapFromEntity", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSubmit: "onSubmit", onCancel: "onCancel", onValueChange: "onValueChange" }, queries: [{ propertyName: "fieldTemplates", predicate: BaseFormTemplateDirective, isSignal: true }], ngImport: i0, template: "<p-card>\n <ng-template #header>\n @if (resolvedTitle()) {\n <div class=\"flex justify-between items-center p-4\">\n <h2 class=\"text-xl font-semibold m-0\">{{ resolvedTitle() }}</h2>\n </div>\n }\n </ng-template>\n\n <form (ngSubmit)=\"handleSubmit()\" novalidate>\n <div class=\"grid gap-4\" [class]=\"gridClass()\">\n @for (field of fields(); track field.key) {\n <div class=\"flex flex-col gap-2\" [class.col-span-full]=\"field.fullWidth\">\n @if (field.type !== 'checkbox' && field.type !== 'toggle') {\n <label [for]=\"field.key\" class=\"font-medium\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n }\n\n @switch (field.type) {\n @case ('text') {\n <input\n pInputText\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('email') {\n <input\n pInputText\n type=\"email\"\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('password') {\n <p-iconfield iconPosition=\"right\" class=\"w-full\">\n <input\n pInputText\n pInputPassword\n [id]=\"field.key\"\n [name]=\"field.key\"\n [mask]=\"!isPasswordVisible(field.key)\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n <p-inputicon\n [class]=\"\n isPasswordVisible(field.key)\n ? 'pi pi-eye-slash cursor-pointer'\n : 'pi pi-eye cursor-pointer'\n \"\n (click)=\"togglePasswordVisibility(field.key)\"\n />\n </p-iconfield>\n }\n\n @case ('number') {\n <p-inputnumber\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [min]=\"field.min ?? undefined\"\n [max]=\"field.max ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('textarea') {\n <textarea\n pTextarea\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [rows]=\"field.rows ?? 3\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n ></textarea>\n }\n\n @case ('select') {\n <p-select\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('multiselect') {\n <p-select\n [multiple]=\"true\"\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('date') {\n <p-datepicker\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [minDate]=\"field.minDate ?? undefined\"\n [maxDate]=\"field.maxDate ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('checkbox') {\n <div class=\"flex items-center gap-2 h-9\">\n <p-checkbox\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n [binary]=\"true\"\n [invalid]=\"isFieldInvalid(field)\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('toggle') {\n <div class=\"flex items-center gap-3 h-9\">\n <p-toggleswitch\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getFieldTemplate(field.key); context: { $implicit: getFieldValue(field.key), field: field }\"\n />\n }\n }\n\n @if (isFieldInvalid(field)) {\n <small class=\"text-red-500\">{{ field.label }} {{ t('shared.required') }}</small>\n }\n\n @if (field.hint && !isFieldInvalid(field)) {\n <small class=\"text-surface-400\">{{ field.hint }}</small>\n }\n </div>\n }\n\n <div class=\"col-span-full flex justify-end gap-4 pt-4\">\n <button\n pButton\n type=\"button\"\n severity=\"secondary\"\n [outlined]=\"true\"\n [disabled]=\"effectiveIsLoading()\"\n (click)=\"handleCancel()\"\n >\n <span pButtonLabel>{{ cancelLabel() || t('shared.cancel') }}</span>\n </button>\n <button\n pButton\n type=\"submit\"\n [disabled]=\"!isFormValid() || effectiveIsLoading()\"\n >\n @if (effectiveIsLoading()) {\n <span pButtonIcon class=\"pi pi-spinner pi-spin\"></span>\n }\n <span pButtonLabel>{{ submitLabel() || (effectiveIsEditMode() ? t('shared.update') : t('shared.save')) }}</span>\n </button>\n </div>\n </div>\n </form>\n</p-card>\n", dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i3.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i3.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader"] }, { kind: "component", type: i5$1.Checkbox, selector: "p-checkbox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i6$1.DatePicker, selector: "p-datepicker, p-date-picker", inputs: ["iconDisplay", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i5.IconField, selector: "p-iconfield, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: i6.InputIcon, selector: "p-inputicon", inputs: ["hostName"] }, { kind: "component", type: i9$1.InputNumber, selector: "p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i10$1.InputPassword, selector: "[pInputPassword]", inputs: ["mask"], outputs: ["maskChange"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i12.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i13.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i14.ToggleSwitch, selector: "p-toggleswitch, p-toggle-switch", inputs: ["tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }] });
|
|
2112
2200
|
}
|
|
2113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
2114
2202
|
type: Component,
|
|
2115
|
-
args: [{ selector: 'lib-base-form', imports: [AngularModule, PrimeModule], template: "<p-card>\n <ng-template #header>\n @if (resolvedTitle()) {\n <div class=\"flex justify-between items-center p-4\">\n <h2 class=\"text-xl font-semibold m-0\">{{ resolvedTitle() }}</h2>\n </div>\n }\n </ng-template>\n\n <form (ngSubmit)=\"handleSubmit()\" novalidate>\n <div class=\"grid gap-4\" [class]=\"gridClass()\">\n @for (field of fields(); track field.key) {\n <div class=\"flex flex-col gap-2\" [class.col-span-full]=\"field.fullWidth\">\n @if (field.type !== 'checkbox' && field.type !== 'toggle') {\n <label [for]=\"field.key\" class=\"font-medium\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n }\n\n @switch (field.type) {\n @case ('text') {\n <input\n pInputText\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('email') {\n <input\n pInputText\n type=\"email\"\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('password') {\n <p-
|
|
2203
|
+
args: [{ selector: 'lib-base-form', imports: [AngularModule, PrimeModule], template: "<p-card>\n <ng-template #header>\n @if (resolvedTitle()) {\n <div class=\"flex justify-between items-center p-4\">\n <h2 class=\"text-xl font-semibold m-0\">{{ resolvedTitle() }}</h2>\n </div>\n }\n </ng-template>\n\n <form (ngSubmit)=\"handleSubmit()\" novalidate>\n <div class=\"grid gap-4\" [class]=\"gridClass()\">\n @for (field of fields(); track field.key) {\n <div class=\"flex flex-col gap-2\" [class.col-span-full]=\"field.fullWidth\">\n @if (field.type !== 'checkbox' && field.type !== 'toggle') {\n <label [for]=\"field.key\" class=\"font-medium\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n }\n\n @switch (field.type) {\n @case ('text') {\n <input\n pInputText\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('email') {\n <input\n pInputText\n type=\"email\"\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('password') {\n <p-iconfield iconPosition=\"right\" class=\"w-full\">\n <input\n pInputText\n pInputPassword\n [id]=\"field.key\"\n [name]=\"field.key\"\n [mask]=\"!isPasswordVisible(field.key)\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n <p-inputicon\n [class]=\"\n isPasswordVisible(field.key)\n ? 'pi pi-eye-slash cursor-pointer'\n : 'pi pi-eye cursor-pointer'\n \"\n (click)=\"togglePasswordVisibility(field.key)\"\n />\n </p-iconfield>\n }\n\n @case ('number') {\n <p-inputnumber\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [min]=\"field.min ?? undefined\"\n [max]=\"field.max ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('textarea') {\n <textarea\n pTextarea\n [id]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (blur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [rows]=\"field.rows ?? 3\"\n [class.ng-invalid]=\"isFieldInvalid(field)\"\n [class.ng-dirty]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n ></textarea>\n }\n\n @case ('select') {\n <p-select\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('multiselect') {\n <p-select\n [multiple]=\"true\"\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [options]=\"field.options ?? []\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"field.placeholder ?? t('shared.select.placeholder')\"\n [disabled]=\"field.disabled ?? false\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n />\n }\n\n @case ('date') {\n <p-datepicker\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n (onBlur)=\"markFieldTouched(field.key)\"\n [placeholder]=\"field.placeholder ?? ''\"\n [disabled]=\"field.disabled ?? false\"\n [minDate]=\"field.minDate ?? undefined\"\n [maxDate]=\"field.maxDate ?? undefined\"\n [invalid]=\"isFieldInvalid(field)\"\n class=\"w-full\"\n inputStyleClass=\"w-full\"\n />\n }\n\n @case ('checkbox') {\n <div class=\"flex items-center gap-2 h-9\">\n <p-checkbox\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n [binary]=\"true\"\n [invalid]=\"isFieldInvalid(field)\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('toggle') {\n <div class=\"flex items-center gap-3 h-9\">\n <p-toggleswitch\n [inputId]=\"field.key\"\n [name]=\"field.key\"\n [ngModel]=\"getFieldValue(field.key)\"\n (ngModelChange)=\"setFieldValue(field.key, $event)\"\n [disabled]=\"field.disabled ?? false\"\n />\n <label [for]=\"field.key\" class=\"font-medium cursor-pointer select-none\">\n {{ field.label }}\n @if (field.required) {\n <span class=\"text-red-500 ml-1\">*</span>\n }\n </label>\n </div>\n }\n\n @case ('custom') {\n <ng-container\n *ngTemplateOutlet=\"getFieldTemplate(field.key); context: { $implicit: getFieldValue(field.key), field: field }\"\n />\n }\n }\n\n @if (isFieldInvalid(field)) {\n <small class=\"text-red-500\">{{ field.label }} {{ t('shared.required') }}</small>\n }\n\n @if (field.hint && !isFieldInvalid(field)) {\n <small class=\"text-surface-400\">{{ field.hint }}</small>\n }\n </div>\n }\n\n <div class=\"col-span-full flex justify-end gap-4 pt-4\">\n <button\n pButton\n type=\"button\"\n severity=\"secondary\"\n [outlined]=\"true\"\n [disabled]=\"effectiveIsLoading()\"\n (click)=\"handleCancel()\"\n >\n <span pButtonLabel>{{ cancelLabel() || t('shared.cancel') }}</span>\n </button>\n <button\n pButton\n type=\"submit\"\n [disabled]=\"!isFormValid() || effectiveIsLoading()\"\n >\n @if (effectiveIsLoading()) {\n <span pButtonIcon class=\"pi pi-spinner pi-spin\"></span>\n }\n <span pButtonLabel>{{ submitLabel() || (effectiveIsEditMode() ? t('shared.update') : t('shared.save')) }}</span>\n </button>\n </div>\n </div>\n </form>\n</p-card>\n" }]
|
|
2116
2204
|
}], ctorParameters: () => [], propDecorators: { fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], createTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "createTitle", required: false }] }], editTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "editTitle", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], submitLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: false }] }], initialValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValue", required: false }] }], service: [{ type: i0.Input, args: [{ isSignal: true, alias: "service", required: false }] }], editId: [{ type: i0.Input, args: [{ isSignal: true, alias: "editId", required: false }] }], cancelRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelRoute", required: false }] }], navigateOnSuccess: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigateOnSuccess", required: false }] }], mapToRequest: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapToRequest", required: false }] }], mapFromEntity: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapFromEntity", required: false }] }], onSubmit: [{ type: i0.Output, args: ["onSubmit"] }], onCancel: [{ type: i0.Output, args: ["onCancel"] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }], fieldTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BaseFormTemplateDirective), { isSignal: true }] }] } });
|
|
2117
2205
|
|
|
2118
2206
|
class InlineSvgComponent {
|
|
2119
|
-
src = input.required(
|
|
2207
|
+
src = input.required(/* @ts-ignore */
|
|
2208
|
+
...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
2120
2209
|
http = inject(HttpClient);
|
|
2121
2210
|
sanitizer = inject(DomSanitizer);
|
|
2122
|
-
svg = resource({ ...(ngDevMode ? { debugName: "svg" } : {}), params: this.src,
|
|
2211
|
+
svg = resource({ ...(ngDevMode ? { debugName: "svg" } : /* istanbul ignore next */ {}), params: this.src,
|
|
2123
2212
|
loader: ({ params: url }) => firstValueFrom(this.http.get(url, { responseType: 'text' })).then((text) => this.sanitizer.bypassSecurityTrustHtml(text)) });
|
|
2124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InlineSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: InlineSvgComponent, isStandalone: true, selector: "inline-svg", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
2126
2215
|
@if (svg.hasValue()) {
|
|
2127
2216
|
<span [innerHTML]="svg.value()"></span>
|
|
2128
2217
|
}
|
|
2129
2218
|
`, isInline: true, styles: ["inline-svg{display:inline-flex;align-items:center}inline-svg span{display:inline-flex;align-items:center;height:100%;width:100%}inline-svg svg{height:100%;width:auto}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
2130
2219
|
}
|
|
2131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: InlineSvgComponent, decorators: [{
|
|
2132
2221
|
type: Component,
|
|
2133
2222
|
args: [{ selector: 'inline-svg', encapsulation: ViewEncapsulation.None, template: `
|
|
2134
2223
|
@if (svg.hasValue()) {
|
|
@@ -2265,9 +2354,12 @@ class FileUploaderComponent {
|
|
|
2265
2354
|
optional: true,
|
|
2266
2355
|
});
|
|
2267
2356
|
fileProvider = inject(FILE_PROVIDER, { optional: true });
|
|
2268
|
-
uploadFile = input(
|
|
2269
|
-
|
|
2270
|
-
|
|
2357
|
+
uploadFile = input(/* @ts-ignore */
|
|
2358
|
+
...(ngDevMode ? [undefined, { debugName: "uploadFile" }] : /* istanbul ignore next */ []));
|
|
2359
|
+
uploadMultipleFiles = input(/* @ts-ignore */
|
|
2360
|
+
...(ngDevMode ? [undefined, { debugName: "uploadMultipleFiles" }] : /* istanbul ignore next */ []));
|
|
2361
|
+
hasUploadCapability = computed(() => !!this.uploadFile() || !!this.fileProvider, /* @ts-ignore */
|
|
2362
|
+
...(ngDevMode ? [{ debugName: "hasUploadCapability" }] : /* istanbul ignore next */ []));
|
|
2271
2363
|
getUploadFn() {
|
|
2272
2364
|
const inputFn = this.uploadFile();
|
|
2273
2365
|
if (inputFn)
|
|
@@ -2285,24 +2377,38 @@ class FileUploaderComponent {
|
|
|
2285
2377
|
}
|
|
2286
2378
|
return undefined;
|
|
2287
2379
|
}
|
|
2288
|
-
acceptTypes = input([],
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2380
|
+
acceptTypes = input([], /* @ts-ignore */
|
|
2381
|
+
...(ngDevMode ? [{ debugName: "acceptTypes" }] : /* istanbul ignore next */ []));
|
|
2382
|
+
multiple = input(false, /* @ts-ignore */
|
|
2383
|
+
...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
2384
|
+
maxFiles = input(10, /* @ts-ignore */
|
|
2385
|
+
...(ngDevMode ? [{ debugName: "maxFiles" }] : /* istanbul ignore next */ []));
|
|
2386
|
+
maxSizeMb = input(10, /* @ts-ignore */
|
|
2387
|
+
...(ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []));
|
|
2388
|
+
uploadOptions = input({}, /* @ts-ignore */
|
|
2389
|
+
...(ngDevMode ? [{ debugName: "uploadOptions" }] : /* istanbul ignore next */ []));
|
|
2390
|
+
disabled = input(false, /* @ts-ignore */
|
|
2391
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2392
|
+
showPreview = input(true, /* @ts-ignore */
|
|
2393
|
+
...(ngDevMode ? [{ debugName: "showPreview" }] : /* istanbul ignore next */ []));
|
|
2394
|
+
autoUpload = input(true, /* @ts-ignore */
|
|
2395
|
+
...(ngDevMode ? [{ debugName: "autoUpload" }] : /* istanbul ignore next */ []));
|
|
2296
2396
|
fileUploaded = output();
|
|
2297
2397
|
filesUploaded = output();
|
|
2298
2398
|
onError = output();
|
|
2299
2399
|
fileSelected = output();
|
|
2300
|
-
isUploading = signal(false,
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2400
|
+
isUploading = signal(false, /* @ts-ignore */
|
|
2401
|
+
...(ngDevMode ? [{ debugName: "isUploading" }] : /* istanbul ignore next */ []));
|
|
2402
|
+
isDragOver = signal(false, /* @ts-ignore */
|
|
2403
|
+
...(ngDevMode ? [{ debugName: "isDragOver" }] : /* istanbul ignore next */ []));
|
|
2404
|
+
uploadProgress = signal(0, /* @ts-ignore */
|
|
2405
|
+
...(ngDevMode ? [{ debugName: "uploadProgress" }] : /* istanbul ignore next */ []));
|
|
2406
|
+
uploadingFileName = signal('', /* @ts-ignore */
|
|
2407
|
+
...(ngDevMode ? [{ debugName: "uploadingFileName" }] : /* istanbul ignore next */ []));
|
|
2408
|
+
selectedFiles = signal([], /* @ts-ignore */
|
|
2409
|
+
...(ngDevMode ? [{ debugName: "selectedFiles" }] : /* istanbul ignore next */ []));
|
|
2410
|
+
acceptString = computed(() => getAcceptString(this.acceptTypes()), /* @ts-ignore */
|
|
2411
|
+
...(ngDevMode ? [{ debugName: "acceptString" }] : /* istanbul ignore next */ []));
|
|
2306
2412
|
acceptTypesDisplay = computed(() => {
|
|
2307
2413
|
const types = this.acceptTypes();
|
|
2308
2414
|
if (!types.length)
|
|
@@ -2317,7 +2423,8 @@ class FileUploaderComponent {
|
|
|
2317
2423
|
if (typesStr === JSON.stringify(FILE_TYPE_FILTERS.AUDIO))
|
|
2318
2424
|
return this.t('shared.file.type.audio');
|
|
2319
2425
|
return types.map((t) => t.split('/')[1] || t).join(', ');
|
|
2320
|
-
},
|
|
2426
|
+
}, /* @ts-ignore */
|
|
2427
|
+
...(ngDevMode ? [{ debugName: "acceptTypesDisplay" }] : /* istanbul ignore next */ []));
|
|
2321
2428
|
onDragOver(event) {
|
|
2322
2429
|
event.preventDefault();
|
|
2323
2430
|
event.stopPropagation();
|
|
@@ -2473,8 +2580,8 @@ class FileUploaderComponent {
|
|
|
2473
2580
|
}
|
|
2474
2581
|
return key;
|
|
2475
2582
|
}
|
|
2476
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2477
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2583
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2584
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FileUploaderComponent, isStandalone: true, selector: "lib-file-uploader", inputs: { uploadFile: { classPropertyName: "uploadFile", publicName: "uploadFile", isSignal: true, isRequired: false, transformFunction: null }, uploadMultipleFiles: { classPropertyName: "uploadMultipleFiles", publicName: "uploadMultipleFiles", isSignal: true, isRequired: false, transformFunction: null }, acceptTypes: { classPropertyName: "acceptTypes", publicName: "acceptTypes", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, maxSizeMb: { classPropertyName: "maxSizeMb", publicName: "maxSizeMb", isSignal: true, isRequired: false, transformFunction: null }, uploadOptions: { classPropertyName: "uploadOptions", publicName: "uploadOptions", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, autoUpload: { classPropertyName: "autoUpload", publicName: "autoUpload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileUploaded: "fileUploaded", filesUploaded: "filesUploaded", onError: "onError", fileSelected: "fileSelected" }, ngImport: i0, template: `
|
|
2478
2585
|
@if (!hasUploadCapability()) {
|
|
2479
2586
|
<div
|
|
2480
2587
|
class="p-4 border border-dashed border-orange-300 bg-orange-50 dark:bg-orange-900/20 rounded-lg text-center"
|
|
@@ -2513,7 +2620,7 @@ class FileUploaderComponent {
|
|
|
2513
2620
|
}}
|
|
2514
2621
|
</p>
|
|
2515
2622
|
@if (uploadProgress() > 0) {
|
|
2516
|
-
<p-
|
|
2623
|
+
<p-progressbar
|
|
2517
2624
|
[value]="uploadProgress()"
|
|
2518
2625
|
[showValue]="true"
|
|
2519
2626
|
class="w-full mt-2 max-w-xs"
|
|
@@ -2578,24 +2685,26 @@ class FileUploaderComponent {
|
|
|
2578
2685
|
class="text-xs sm:text-sm text-color-secondary whitespace-nowrap"
|
|
2579
2686
|
>{{ fileSize }}</span
|
|
2580
2687
|
>
|
|
2581
|
-
<
|
|
2582
|
-
|
|
2688
|
+
<button
|
|
2689
|
+
pButton
|
|
2583
2690
|
[text]="true"
|
|
2584
2691
|
[rounded]="true"
|
|
2585
2692
|
size="small"
|
|
2586
2693
|
severity="secondary"
|
|
2587
2694
|
[disabled]="isUploading()"
|
|
2588
|
-
(
|
|
2589
|
-
|
|
2695
|
+
(click)="removeFile(file)"
|
|
2696
|
+
>
|
|
2697
|
+
<span pButtonIcon class="pi pi-times"></span>
|
|
2698
|
+
</button>
|
|
2590
2699
|
</div>
|
|
2591
2700
|
}
|
|
2592
2701
|
</div>
|
|
2593
2702
|
}
|
|
2594
2703
|
</div>
|
|
2595
2704
|
}
|
|
2596
|
-
`, isInline: true, styles: [".upload-zone{border-color:var(--p-surface-300);background:var(--p-surface-50)}.upload-zone:hover:not(.cursor-not-allowed){border-color:var(--p-primary-color);background:var(--p-surface-100)}.upload-zone.drag-over{border-color:var(--p-primary-color);background:var(--p-primary-50)}:host-context(.p-dark) .upload-zone,.dark .upload-zone{border-color:var(--p-surface-600);background:var(--p-surface-800)}:host-context(.p-dark) .upload-zone:hover:not(.cursor-not-allowed),.dark .upload-zone:hover:not(.cursor-not-allowed){border-color:var(--p-primary-color);background:var(--p-surface-700)}:host-context(.p-dark) .upload-zone.drag-over,.dark .upload-zone.drag-over{border-color:var(--p-primary-color);background:var(--p-primary-900)}.file-preview-item{border:1px solid var(--p-surface-200);background:var(--p-surface-0)}:host-context(.p-dark) .file-preview-item,.dark .file-preview-item{border-color:var(--p-surface-600);background:var(--p-surface-800)}\n"], dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "
|
|
2705
|
+
`, isInline: true, styles: [".upload-zone{border-color:var(--p-surface-300);background:var(--p-surface-50)}.upload-zone:hover:not(.cursor-not-allowed){border-color:var(--p-primary-color);background:var(--p-surface-100)}.upload-zone.drag-over{border-color:var(--p-primary-color);background:var(--p-primary-50)}:host-context(.p-dark) .upload-zone,.dark .upload-zone{border-color:var(--p-surface-600);background:var(--p-surface-800)}:host-context(.p-dark) .upload-zone:hover:not(.cursor-not-allowed),.dark .upload-zone:hover:not(.cursor-not-allowed){border-color:var(--p-primary-color);background:var(--p-surface-700)}:host-context(.p-dark) .upload-zone.drag-over,.dark .upload-zone.drag-over{border-color:var(--p-primary-color);background:var(--p-primary-900)}.file-preview-item{border:1px solid var(--p-surface-200);background:var(--p-surface-0)}:host-context(.p-dark) .file-preview-item,.dark .file-preview-item{border-color:var(--p-surface-600);background:var(--p-surface-800)}\n"], dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i3.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i2$1.ProgressBar, selector: "p-progressbar, p-progress-bar", inputs: ["value", "showValue", "valueStyleClass", "unit", "mode", "color"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2597
2706
|
}
|
|
2598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileUploaderComponent, decorators: [{
|
|
2599
2708
|
type: Component,
|
|
2600
2709
|
args: [{ selector: 'lib-file-uploader', imports: [AngularModule, PrimeModule, TranslatePipe], template: `
|
|
2601
2710
|
@if (!hasUploadCapability()) {
|
|
@@ -2636,7 +2745,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2636
2745
|
}}
|
|
2637
2746
|
</p>
|
|
2638
2747
|
@if (uploadProgress() > 0) {
|
|
2639
|
-
<p-
|
|
2748
|
+
<p-progressbar
|
|
2640
2749
|
[value]="uploadProgress()"
|
|
2641
2750
|
[showValue]="true"
|
|
2642
2751
|
class="w-full mt-2 max-w-xs"
|
|
@@ -2701,15 +2810,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2701
2810
|
class="text-xs sm:text-sm text-color-secondary whitespace-nowrap"
|
|
2702
2811
|
>{{ fileSize }}</span
|
|
2703
2812
|
>
|
|
2704
|
-
<
|
|
2705
|
-
|
|
2813
|
+
<button
|
|
2814
|
+
pButton
|
|
2706
2815
|
[text]="true"
|
|
2707
2816
|
[rounded]="true"
|
|
2708
2817
|
size="small"
|
|
2709
2818
|
severity="secondary"
|
|
2710
2819
|
[disabled]="isUploading()"
|
|
2711
|
-
(
|
|
2712
|
-
|
|
2820
|
+
(click)="removeFile(file)"
|
|
2821
|
+
>
|
|
2822
|
+
<span pButtonIcon class="pi pi-times"></span>
|
|
2823
|
+
</button>
|
|
2713
2824
|
</div>
|
|
2714
2825
|
}
|
|
2715
2826
|
</div>
|
|
@@ -2729,9 +2840,12 @@ class FileSelectorDialogComponent {
|
|
|
2729
2840
|
fileProvider = inject(FILE_PROVIDER, { optional: true });
|
|
2730
2841
|
abortController = null;
|
|
2731
2842
|
searchDebounceTimer = null;
|
|
2732
|
-
header = input(
|
|
2733
|
-
|
|
2734
|
-
|
|
2843
|
+
header = input(/* @ts-ignore */
|
|
2844
|
+
...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
|
|
2845
|
+
acceptTypes = input([], /* @ts-ignore */
|
|
2846
|
+
...(ngDevMode ? [{ debugName: "acceptTypes" }] : /* istanbul ignore next */ []));
|
|
2847
|
+
multiple = input(false, /* @ts-ignore */
|
|
2848
|
+
...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
2735
2849
|
dialogHeader = computed(() => {
|
|
2736
2850
|
const customHeader = this.header();
|
|
2737
2851
|
if (customHeader)
|
|
@@ -2739,41 +2853,63 @@ class FileSelectorDialogComponent {
|
|
|
2739
2853
|
return this.t(this.multiple()
|
|
2740
2854
|
? 'shared.file.selector.select.files'
|
|
2741
2855
|
: 'shared.file.selector.select.file');
|
|
2742
|
-
},
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2856
|
+
}, /* @ts-ignore */
|
|
2857
|
+
...(ngDevMode ? [{ debugName: "dialogHeader" }] : /* istanbul ignore next */ []));
|
|
2858
|
+
maxSelection = input(10, /* @ts-ignore */
|
|
2859
|
+
...(ngDevMode ? [{ debugName: "maxSelection" }] : /* istanbul ignore next */ []));
|
|
2860
|
+
pageSize = input(DEFAULT_PAGE_SIZE$1, /* @ts-ignore */
|
|
2861
|
+
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
2862
|
+
folderId = input(/* @ts-ignore */
|
|
2863
|
+
...(ngDevMode ? [undefined, { debugName: "folderId" }] : /* istanbul ignore next */ [])); // Filter by folder
|
|
2864
|
+
withUploader = input(false, /* @ts-ignore */
|
|
2865
|
+
...(ngDevMode ? [{ debugName: "withUploader" }] : /* istanbul ignore next */ []));
|
|
2866
|
+
visible = model(false, /* @ts-ignore */
|
|
2867
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
2748
2868
|
fileSelected = output();
|
|
2749
2869
|
filesSelected = output();
|
|
2750
2870
|
closed = output();
|
|
2751
2871
|
onError = output();
|
|
2752
|
-
isLoading = signal(false,
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2872
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
2873
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
2874
|
+
files = signal([], /* @ts-ignore */
|
|
2875
|
+
...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
2876
|
+
selectedFiles = signal([], /* @ts-ignore */
|
|
2877
|
+
...(ngDevMode ? [{ debugName: "selectedFiles" }] : /* istanbul ignore next */ []));
|
|
2878
|
+
total = signal(undefined, /* @ts-ignore */
|
|
2879
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
2756
2880
|
pagination = signal({
|
|
2757
2881
|
pageSize: DEFAULT_PAGE_SIZE$1,
|
|
2758
2882
|
currentPage: 0,
|
|
2759
|
-
},
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2883
|
+
}, /* @ts-ignore */
|
|
2884
|
+
...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
|
|
2885
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
2886
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
2887
|
+
folders = signal([], /* @ts-ignore */
|
|
2888
|
+
...(ngDevMode ? [{ debugName: "folders" }] : /* istanbul ignore next */ []));
|
|
2889
|
+
selectedFolderId = signal(null, /* @ts-ignore */
|
|
2890
|
+
...(ngDevMode ? [{ debugName: "selectedFolderId" }] : /* istanbul ignore next */ []));
|
|
2891
|
+
foldersLoading = signal(false, /* @ts-ignore */
|
|
2892
|
+
...(ngDevMode ? [{ debugName: "foldersLoading" }] : /* istanbul ignore next */ []));
|
|
2764
2893
|
foldersPagination = signal({
|
|
2765
2894
|
pageSize: DEFAULT_SELECTOR_PAGE_SIZE,
|
|
2766
2895
|
currentPage: 0,
|
|
2767
|
-
},
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2896
|
+
}, /* @ts-ignore */
|
|
2897
|
+
...(ngDevMode ? [{ debugName: "foldersPagination" }] : /* istanbul ignore next */ []));
|
|
2898
|
+
foldersTotal = signal(undefined, /* @ts-ignore */
|
|
2899
|
+
...(ngDevMode ? [{ debugName: "foldersTotal" }] : /* istanbul ignore next */ []));
|
|
2900
|
+
storageConfigs = signal([], /* @ts-ignore */
|
|
2901
|
+
...(ngDevMode ? [{ debugName: "storageConfigs" }] : /* istanbul ignore next */ []));
|
|
2902
|
+
selectedStorageConfigId = signal(null, /* @ts-ignore */
|
|
2903
|
+
...(ngDevMode ? [{ debugName: "selectedStorageConfigId" }] : /* istanbul ignore next */ []));
|
|
2904
|
+
storageConfigsLoading = signal(false, /* @ts-ignore */
|
|
2905
|
+
...(ngDevMode ? [{ debugName: "storageConfigsLoading" }] : /* istanbul ignore next */ []));
|
|
2772
2906
|
storageConfigsPagination = signal({
|
|
2773
2907
|
pageSize: DEFAULT_SELECTOR_PAGE_SIZE,
|
|
2774
2908
|
currentPage: 0,
|
|
2775
|
-
},
|
|
2776
|
-
|
|
2909
|
+
}, /* @ts-ignore */
|
|
2910
|
+
...(ngDevMode ? [{ debugName: "storageConfigsPagination" }] : /* istanbul ignore next */ []));
|
|
2911
|
+
storageConfigsTotal = signal(undefined, /* @ts-ignore */
|
|
2912
|
+
...(ngDevMode ? [{ debugName: "storageConfigsTotal" }] : /* istanbul ignore next */ []));
|
|
2777
2913
|
effectiveStorageConfigId = computed(() => {
|
|
2778
2914
|
const selected = this.selectedStorageConfigId();
|
|
2779
2915
|
if (selected)
|
|
@@ -2781,7 +2917,8 @@ class FileSelectorDialogComponent {
|
|
|
2781
2917
|
// Find default config
|
|
2782
2918
|
const defaultConfig = this.storageConfigs().find((c) => c.isDefault);
|
|
2783
2919
|
return defaultConfig?.id;
|
|
2784
|
-
},
|
|
2920
|
+
}, /* @ts-ignore */
|
|
2921
|
+
...(ngDevMode ? [{ debugName: "effectiveStorageConfigId" }] : /* istanbul ignore next */ []));
|
|
2785
2922
|
uploadFileFn = (file, options) => {
|
|
2786
2923
|
if (!this.fileProvider)
|
|
2787
2924
|
throw new Error('shared.file.selector.provider.not.configured');
|
|
@@ -3066,8 +3203,8 @@ class FileSelectorDialogComponent {
|
|
|
3066
3203
|
}
|
|
3067
3204
|
return key;
|
|
3068
3205
|
}
|
|
3069
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3070
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FileSelectorDialogComponent, isStandalone: true, selector: "lib-file-selector-dialog", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, acceptTypes: { classPropertyName: "acceptTypes", publicName: "acceptTypes", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, maxSelection: { classPropertyName: "maxSelection", publicName: "maxSelection", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, folderId: { classPropertyName: "folderId", publicName: "folderId", isSignal: true, isRequired: false, transformFunction: null }, withUploader: { classPropertyName: "withUploader", publicName: "withUploader", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", fileSelected: "fileSelected", filesSelected: "filesSelected", closed: "closed", onError: "onError" }, ngImport: i0, template: `
|
|
3071
3208
|
<p-dialog
|
|
3072
3209
|
[header]="dialogHeader()"
|
|
3073
3210
|
[(visible)]="visible"
|
|
@@ -3095,12 +3232,9 @@ class FileSelectorDialogComponent {
|
|
|
3095
3232
|
>provideStorageProviders()</code
|
|
3096
3233
|
>
|
|
3097
3234
|
</p>
|
|
3098
|
-
<button
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
class="p-button-text"
|
|
3102
|
-
(click)="onCancel()"
|
|
3103
|
-
></button>
|
|
3235
|
+
<button pButton class="p-button-text" (click)="onCancel()">
|
|
3236
|
+
<span pButtonLabel>{{ 'shared.close' | translate }}</span>
|
|
3237
|
+
</button>
|
|
3104
3238
|
</div>
|
|
3105
3239
|
} @else {
|
|
3106
3240
|
@if (withUploader()) {
|
|
@@ -3152,13 +3286,13 @@ class FileSelectorDialogComponent {
|
|
|
3152
3286
|
class="w-full sm:w-40"
|
|
3153
3287
|
(onShow)="loadFolders()"
|
|
3154
3288
|
>
|
|
3155
|
-
<ng-template
|
|
3289
|
+
<ng-template #selectedItem let-folder>
|
|
3156
3290
|
<div class="flex items-center gap-2">
|
|
3157
3291
|
<i class="pi pi-folder text-color-secondary"></i>
|
|
3158
3292
|
<span>{{ folder?.name }}</span>
|
|
3159
3293
|
</div>
|
|
3160
3294
|
</ng-template>
|
|
3161
|
-
<ng-template
|
|
3295
|
+
<ng-template #item let-folder>
|
|
3162
3296
|
<div class="flex items-center gap-2">
|
|
3163
3297
|
<i class="pi pi-folder text-color-secondary"></i>
|
|
3164
3298
|
<span>{{ folder.name }}</span>
|
|
@@ -3183,7 +3317,7 @@ class FileSelectorDialogComponent {
|
|
|
3183
3317
|
class="w-full sm:w-40"
|
|
3184
3318
|
(onShow)="loadStorageConfigs()"
|
|
3185
3319
|
>
|
|
3186
|
-
<ng-template
|
|
3320
|
+
<ng-template #selectedItem let-config>
|
|
3187
3321
|
<div class="flex items-center gap-2">
|
|
3188
3322
|
<i class="pi pi-database text-color-secondary"></i>
|
|
3189
3323
|
<span>{{ config?.name }}</span>
|
|
@@ -3195,7 +3329,7 @@ class FileSelectorDialogComponent {
|
|
|
3195
3329
|
}
|
|
3196
3330
|
</div>
|
|
3197
3331
|
</ng-template>
|
|
3198
|
-
<ng-template
|
|
3332
|
+
<ng-template #item let-config>
|
|
3199
3333
|
<div class="flex items-center gap-2">
|
|
3200
3334
|
<i class="pi pi-database text-color-secondary"></i>
|
|
3201
3335
|
<span>{{ config.name }}</span>
|
|
@@ -3288,37 +3422,39 @@ class FileSelectorDialogComponent {
|
|
|
3288
3422
|
}
|
|
3289
3423
|
</div>
|
|
3290
3424
|
|
|
3291
|
-
<ng-template
|
|
3425
|
+
<ng-template #footer>
|
|
3292
3426
|
<div
|
|
3293
3427
|
class="flex flex-col-reverse sm:flex-row gap-2 w-full sm:w-auto sm:justify-end"
|
|
3294
3428
|
>
|
|
3295
3429
|
<button
|
|
3296
3430
|
pButton
|
|
3297
3431
|
type="button"
|
|
3298
|
-
[label]="'shared.cancel' | translate"
|
|
3299
3432
|
class="p-button-text w-full sm:w-auto"
|
|
3300
3433
|
(click)="onCancel()"
|
|
3301
|
-
|
|
3434
|
+
>
|
|
3435
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
3436
|
+
</button>
|
|
3302
3437
|
<button
|
|
3303
3438
|
pButton
|
|
3304
3439
|
type="button"
|
|
3305
|
-
[
|
|
3440
|
+
[disabled]="selectedFiles().length === 0"
|
|
3441
|
+
class="w-full sm:w-auto"
|
|
3442
|
+
(click)="onConfirm()"
|
|
3443
|
+
>
|
|
3444
|
+
<span pButtonLabel>{{
|
|
3306
3445
|
multiple()
|
|
3307
3446
|
? ('shared.file.selector.select.multiple'
|
|
3308
3447
|
| translate: { count: selectedFiles().length })
|
|
3309
3448
|
: ('shared.file.selector.select' | translate)
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
class="w-full sm:w-auto"
|
|
3313
|
-
(click)="onConfirm()"
|
|
3314
|
-
></button>
|
|
3449
|
+
}}</span>
|
|
3450
|
+
</button>
|
|
3315
3451
|
</div>
|
|
3316
3452
|
</ng-template>
|
|
3317
3453
|
}
|
|
3318
3454
|
</p-dialog>
|
|
3319
|
-
`, isInline: true, styles: [".file-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem;max-height:300px;overflow-y:auto;padding:.5rem}@media(min-width:480px){.file-grid{grid-template-columns:repeat(3,1fr);max-height:350px}}@media(min-width:640px){.file-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:1rem;max-height:400px}}.file-card{border:2px solid var(--p-surface-300);border-radius:var(--p-border-radius);cursor:pointer;transition:all .2s ease;overflow:hidden;background:var(--p-surface-0)}:host-context(.p-dark) .file-card,.dark .file-card{border-color:var(--p-surface-600);background:var(--p-surface-800)}.file-card:hover:not(.disabled){border-color:var(--p-primary-color);transform:translateY(-2px);box-shadow:var(--p-overlay-shadow)}.file-card.selected{border-color:var(--p-primary-color);background:var(--p-primary-50)}:host-context(.p-dark) .file-card.selected,.dark .file-card.selected{background:var(--p-primary-900)}.file-card.disabled{opacity:.5;cursor:not-allowed}.file-preview{position:relative;height:80px;display:flex;align-items:center;justify-content:center;background:var(--p-surface-100)}@media(min-width:640px){.file-preview{height:100px}}:host-context(.p-dark) .file-preview,.dark .file-preview{background:var(--p-surface-700)}.selected-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(var(--p-primary-500-rgb, 59, 130, 246),.3)}.selected-overlay i{color:var(--p-primary-color);background:var(--p-surface-0);border-radius:50%;padding:.5rem}:host-context(.p-dark) .selected-overlay i,.dark .selected-overlay i{background:var(--p-surface-900)}\n"], dependencies: [{ kind: "ngmodule", type: AngularModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IsEmptyImageDirective, selector: "img", inputs: ["src"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i3
|
|
3455
|
+
`, isInline: true, styles: [".file-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.75rem;max-height:300px;overflow-y:auto;padding:.5rem}@media(min-width:480px){.file-grid{grid-template-columns:repeat(3,1fr);max-height:350px}}@media(min-width:640px){.file-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:1rem;max-height:400px}}.file-card{border:2px solid var(--p-surface-300);border-radius:var(--p-border-radius);cursor:pointer;transition:all .2s ease;overflow:hidden;background:var(--p-surface-0)}:host-context(.p-dark) .file-card,.dark .file-card{border-color:var(--p-surface-600);background:var(--p-surface-800)}.file-card:hover:not(.disabled){border-color:var(--p-primary-color);transform:translateY(-2px);box-shadow:var(--p-overlay-shadow)}.file-card.selected{border-color:var(--p-primary-color);background:var(--p-primary-50)}:host-context(.p-dark) .file-card.selected,.dark .file-card.selected{background:var(--p-primary-900)}.file-card.disabled{opacity:.5;cursor:not-allowed}.file-preview{position:relative;height:80px;display:flex;align-items:center;justify-content:center;background:var(--p-surface-100)}@media(min-width:640px){.file-preview{height:100px}}:host-context(.p-dark) .file-preview,.dark .file-preview{background:var(--p-surface-700)}.selected-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(var(--p-primary-500-rgb, 59, 130, 246),.3)}.selected-overlay i{color:var(--p-primary-color);background:var(--p-surface-0);border-radius:50%;padding:.5rem}:host-context(.p-dark) .selected-overlay i,.dark .selected-overlay i{background:var(--p-surface-900)}\n"], dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IsEmptyImageDirective, selector: "img", inputs: ["src"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i3.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "component", type: i4$1.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo"], outputs: ["visibleChange", "onShow", "onHide", "onResizeInit", "onResizeEnd", "onDragStart", "onDragEnd", "onMaximize"] }, { kind: "component", type: i5.IconField, selector: "p-iconfield, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: i6.InputIcon, selector: "p-inputicon", inputs: ["hostName"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i12.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: FileUploaderComponent, selector: "lib-file-uploader", inputs: ["uploadFile", "uploadMultipleFiles", "acceptTypes", "multiple", "maxFiles", "maxSizeMb", "uploadOptions", "disabled", "showPreview", "autoUpload"], outputs: ["fileUploaded", "filesUploaded", "onError", "fileSelected"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
3320
3456
|
}
|
|
3321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FileSelectorDialogComponent, decorators: [{
|
|
3322
3458
|
type: Component,
|
|
3323
3459
|
args: [{ selector: 'lib-file-selector-dialog', imports: [AngularModule, PrimeModule, FileUploaderComponent, TranslatePipe], template: `
|
|
3324
3460
|
<p-dialog
|
|
@@ -3348,12 +3484,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3348
3484
|
>provideStorageProviders()</code
|
|
3349
3485
|
>
|
|
3350
3486
|
</p>
|
|
3351
|
-
<button
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
class="p-button-text"
|
|
3355
|
-
(click)="onCancel()"
|
|
3356
|
-
></button>
|
|
3487
|
+
<button pButton class="p-button-text" (click)="onCancel()">
|
|
3488
|
+
<span pButtonLabel>{{ 'shared.close' | translate }}</span>
|
|
3489
|
+
</button>
|
|
3357
3490
|
</div>
|
|
3358
3491
|
} @else {
|
|
3359
3492
|
@if (withUploader()) {
|
|
@@ -3405,13 +3538,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3405
3538
|
class="w-full sm:w-40"
|
|
3406
3539
|
(onShow)="loadFolders()"
|
|
3407
3540
|
>
|
|
3408
|
-
<ng-template
|
|
3541
|
+
<ng-template #selectedItem let-folder>
|
|
3409
3542
|
<div class="flex items-center gap-2">
|
|
3410
3543
|
<i class="pi pi-folder text-color-secondary"></i>
|
|
3411
3544
|
<span>{{ folder?.name }}</span>
|
|
3412
3545
|
</div>
|
|
3413
3546
|
</ng-template>
|
|
3414
|
-
<ng-template
|
|
3547
|
+
<ng-template #item let-folder>
|
|
3415
3548
|
<div class="flex items-center gap-2">
|
|
3416
3549
|
<i class="pi pi-folder text-color-secondary"></i>
|
|
3417
3550
|
<span>{{ folder.name }}</span>
|
|
@@ -3436,7 +3569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3436
3569
|
class="w-full sm:w-40"
|
|
3437
3570
|
(onShow)="loadStorageConfigs()"
|
|
3438
3571
|
>
|
|
3439
|
-
<ng-template
|
|
3572
|
+
<ng-template #selectedItem let-config>
|
|
3440
3573
|
<div class="flex items-center gap-2">
|
|
3441
3574
|
<i class="pi pi-database text-color-secondary"></i>
|
|
3442
3575
|
<span>{{ config?.name }}</span>
|
|
@@ -3448,7 +3581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3448
3581
|
}
|
|
3449
3582
|
</div>
|
|
3450
3583
|
</ng-template>
|
|
3451
|
-
<ng-template
|
|
3584
|
+
<ng-template #item let-config>
|
|
3452
3585
|
<div class="flex items-center gap-2">
|
|
3453
3586
|
<i class="pi pi-database text-color-secondary"></i>
|
|
3454
3587
|
<span>{{ config.name }}</span>
|
|
@@ -3541,30 +3674,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3541
3674
|
}
|
|
3542
3675
|
</div>
|
|
3543
3676
|
|
|
3544
|
-
<ng-template
|
|
3677
|
+
<ng-template #footer>
|
|
3545
3678
|
<div
|
|
3546
3679
|
class="flex flex-col-reverse sm:flex-row gap-2 w-full sm:w-auto sm:justify-end"
|
|
3547
3680
|
>
|
|
3548
3681
|
<button
|
|
3549
3682
|
pButton
|
|
3550
3683
|
type="button"
|
|
3551
|
-
[label]="'shared.cancel' | translate"
|
|
3552
3684
|
class="p-button-text w-full sm:w-auto"
|
|
3553
3685
|
(click)="onCancel()"
|
|
3554
|
-
|
|
3686
|
+
>
|
|
3687
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
3688
|
+
</button>
|
|
3555
3689
|
<button
|
|
3556
3690
|
pButton
|
|
3557
3691
|
type="button"
|
|
3558
|
-
[
|
|
3692
|
+
[disabled]="selectedFiles().length === 0"
|
|
3693
|
+
class="w-full sm:w-auto"
|
|
3694
|
+
(click)="onConfirm()"
|
|
3695
|
+
>
|
|
3696
|
+
<span pButtonLabel>{{
|
|
3559
3697
|
multiple()
|
|
3560
3698
|
? ('shared.file.selector.select.multiple'
|
|
3561
3699
|
| translate: { count: selectedFiles().length })
|
|
3562
3700
|
: ('shared.file.selector.select' | translate)
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
class="w-full sm:w-auto"
|
|
3566
|
-
(click)="onConfirm()"
|
|
3567
|
-
></button>
|
|
3701
|
+
}}</span>
|
|
3702
|
+
</button>
|
|
3568
3703
|
</div>
|
|
3569
3704
|
</ng-template>
|
|
3570
3705
|
}
|
|
@@ -3573,11 +3708,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3573
3708
|
}], ctorParameters: () => [], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], acceptTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptTypes", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], maxSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelection", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], folderId: [{ type: i0.Input, args: [{ isSignal: true, alias: "folderId", required: false }] }], withUploader: [{ type: i0.Input, args: [{ isSignal: true, alias: "withUploader", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], fileSelected: [{ type: i0.Output, args: ["fileSelected"] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], closed: [{ type: i0.Output, args: ["closed"] }], onError: [{ type: i0.Output, args: ["onError"] }] } });
|
|
3574
3709
|
|
|
3575
3710
|
class IconComponent {
|
|
3576
|
-
icon = input.required(
|
|
3577
|
-
|
|
3711
|
+
icon = input.required(/* @ts-ignore */
|
|
3712
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
3713
|
+
iconType = input(IconTypeEnum.PRIMENG_ICON, /* @ts-ignore */
|
|
3714
|
+
...(ngDevMode ? [{ debugName: "iconType" }] : /* istanbul ignore next */ []));
|
|
3578
3715
|
IconTypeEnum = IconTypeEnum; // Needed for template reference
|
|
3579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3580
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3717
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: IconComponent, isStandalone: true, selector: "lib-icon", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
3581
3718
|
@if (icon()) {
|
|
3582
3719
|
@if (iconType() === IconTypeEnum.PRIMENG_ICON) {
|
|
3583
3720
|
<i [class]="icon()"></i>
|
|
@@ -3589,7 +3726,7 @@ class IconComponent {
|
|
|
3589
3726
|
}
|
|
3590
3727
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: IsEmptyImageDirective, selector: "img", inputs: ["src"] }] });
|
|
3591
3728
|
}
|
|
3592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: IconComponent, decorators: [{
|
|
3593
3730
|
type: Component,
|
|
3594
3731
|
args: [{
|
|
3595
3732
|
selector: 'lib-icon',
|
|
@@ -3629,28 +3766,39 @@ class LazyMultiSelectComponent extends BaseFormControl {
|
|
|
3629
3766
|
// Portal state
|
|
3630
3767
|
overlayViewRef = null;
|
|
3631
3768
|
// Inputs
|
|
3632
|
-
placeHolder = input('',
|
|
3633
|
-
|
|
3769
|
+
placeHolder = input('', /* @ts-ignore */
|
|
3770
|
+
...(ngDevMode ? [{ debugName: "placeHolder" }] : /* istanbul ignore next */ []));
|
|
3771
|
+
showClear = input(true, /* @ts-ignore */
|
|
3772
|
+
...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
3634
3773
|
// Computed placeholder with translation fallback
|
|
3635
3774
|
displayPlaceholder = computed(() => {
|
|
3636
3775
|
const customPlaceholder = this.placeHolder();
|
|
3637
3776
|
if (customPlaceholder)
|
|
3638
3777
|
return customPlaceholder;
|
|
3639
3778
|
return this.t('shared.multi.select.placeholder');
|
|
3640
|
-
},
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3779
|
+
}, /* @ts-ignore */
|
|
3780
|
+
...(ngDevMode ? [{ debugName: "displayPlaceholder" }] : /* istanbul ignore next */ []));
|
|
3781
|
+
isEditMode = input.required(/* @ts-ignore */
|
|
3782
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
3783
|
+
isLoading = input.required(/* @ts-ignore */
|
|
3784
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
3785
|
+
total = input.required(/* @ts-ignore */
|
|
3786
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
3787
|
+
pagination = input.required(/* @ts-ignore */
|
|
3788
|
+
...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
|
|
3789
|
+
selectDataList = input.required(/* @ts-ignore */
|
|
3790
|
+
...(ngDevMode ? [{ debugName: "selectDataList" }] : /* istanbul ignore next */ []));
|
|
3646
3791
|
// Two-way bound value
|
|
3647
|
-
value = model(null,
|
|
3792
|
+
value = model(null, /* @ts-ignore */
|
|
3793
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3648
3794
|
// Outputs
|
|
3649
3795
|
onSearch = output();
|
|
3650
3796
|
onPagination = output();
|
|
3651
3797
|
// UI state
|
|
3652
|
-
searchTerm = signal('',
|
|
3653
|
-
|
|
3798
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
3799
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
3800
|
+
openOptions = signal(false, /* @ts-ignore */
|
|
3801
|
+
...(ngDevMode ? [{ debugName: "openOptions" }] : /* istanbul ignore next */ []));
|
|
3654
3802
|
// Computed values
|
|
3655
3803
|
selectedValueDisplay = computed(() => {
|
|
3656
3804
|
const selectedValues = this.value() ?? [];
|
|
@@ -3665,18 +3813,21 @@ class LazyMultiSelectComponent extends BaseFormControl {
|
|
|
3665
3813
|
.filter((item) => selectedValues.includes(item.value))
|
|
3666
3814
|
.map((item) => item.label)
|
|
3667
3815
|
.join(', ');
|
|
3668
|
-
},
|
|
3816
|
+
}, /* @ts-ignore */
|
|
3817
|
+
...(ngDevMode ? [{ debugName: "selectedValueDisplay" }] : /* istanbul ignore next */ []));
|
|
3669
3818
|
hasSelectedValues = computed(() => {
|
|
3670
3819
|
const selectedValues = this.value() ?? [];
|
|
3671
3820
|
return selectedValues.length > 0;
|
|
3672
|
-
},
|
|
3821
|
+
}, /* @ts-ignore */
|
|
3822
|
+
...(ngDevMode ? [{ debugName: "hasSelectedValues" }] : /* istanbul ignore next */ []));
|
|
3673
3823
|
isSelectAll = computed(() => {
|
|
3674
3824
|
const selectedValues = this.value() ?? [];
|
|
3675
3825
|
const allValues = this.selectDataList().map((item) => item.value);
|
|
3676
3826
|
if (selectedValues.length === 0 || allValues.length === 0)
|
|
3677
3827
|
return false;
|
|
3678
3828
|
return allValues.every((val) => selectedValues.includes(val));
|
|
3679
|
-
},
|
|
3829
|
+
}, /* @ts-ignore */
|
|
3830
|
+
...(ngDevMode ? [{ debugName: "isSelectAll" }] : /* istanbul ignore next */ []));
|
|
3680
3831
|
constructor() {
|
|
3681
3832
|
super();
|
|
3682
3833
|
this.initializeFormControl();
|
|
@@ -3807,10 +3958,10 @@ class LazyMultiSelectComponent extends BaseFormControl {
|
|
|
3807
3958
|
}
|
|
3808
3959
|
return key;
|
|
3809
3960
|
}
|
|
3810
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3811
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3961
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LazyMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3962
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LazyMultiSelectComponent, isStandalone: true, selector: "lib-lazy-multi-select", inputs: { placeHolder: { classPropertyName: "placeHolder", publicName: "placeHolder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: true, transformFunction: null }, selectDataList: { classPropertyName: "selectDataList", publicName: "selectDataList", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onSearch: "onSearch", onPagination: "onPagination" }, providers: [provideValueAccessor(LazyMultiSelectComponent)], viewQueries: [{ propertyName: "pSelectRef", first: true, predicate: ["pSelect"], descendants: true, isSignal: true }, { propertyName: "overlayTemplate", first: true, predicate: ["overlayTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"p-select w-full\"\n #pSelect\n (click)=\"onSelectClick()\"\n [class.p-disabled]=\"disabled()\"\n [class.edit-mode-element-css]=\"!isEditMode()\"\n [class.overflow-hidden]=\"!isEditMode()\"\n>\n @if (selectedValueDisplay()) {\n <span class=\"p-select-label\" [class.edit-mode-element-css]=\"!isEditMode()\">\n {{ selectedValueDisplay() }}\n </span>\n } @else {\n <span class=\"p-select-label p-placeholder\">{{ displayPlaceholder() }}</span>\n }\n\n @if (showClear() && hasSelectedValues()) {\n <span class=\"p-select-clear-icon\" (click)=\"clear($event)\">\n <i class=\"pi pi-times\"></i>\n </span>\n }\n\n @if (isEditMode()) {\n <div class=\"p-select-dropdown\">\n <span class=\"p-select-dropdown-icon flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"p-multiselect-dropdown-icon p-icon\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n </div>\n }\n</div>\n\n<ng-template #overlayTpl>\n <div class=\"p-select-overlay\" (click)=\"onOverlayClick($event)\">\n <div class=\"p-select-header flex flex-row gap-2 items-center\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isSelectAll()\"\n [disabled]=\"disabled()\"\n (onChange)=\"changeSelectAll($event)\"\n />\n <input\n type=\"text\"\n pInputText\n class=\"w-full\"\n [placeholder]=\"'shared.search' | translate\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"searchTerm.set($event)\"\n />\n </div>\n <div class=\"p-select-list-container\" (scroll)=\"onScroll($event)\">\n <ul class=\"p-select-list\">\n @for (data of selectDataList(); track data.value) {\n @let isItemSelected = isSelected(data);\n <li\n class=\"p-select-option flex flex-row gap-2 items-center\"\n [class.p-select-option-selected]=\"isItemSelected\"\n >\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isItemSelected\"\n [disabled]=\"disabled()\"\n (onChange)=\"selectValue($event, data)\"\n />\n <span>{{ data.label }}</span>\n </li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n", styles: [".p-select-overlay{display:flex;flex-direction:column;max-height:250px;overflow:hidden}.p-select-header{padding:.75rem;border-bottom:1px solid var(--p-surface-border);background:var(--p-content-hover-background);flex-shrink:0;width:100%;box-sizing:border-box}.p-select-header input{background:var(--p-form-field-background);border-color:var(--p-form-field-border-color);color:var(--p-text-color)}.p-select-header input::placeholder{color:var(--p-text-muted-color)}.p-select-list-container{flex:1;overflow-y:auto;min-height:0;width:100%}.p-select-list{margin:0;padding:.25rem 0;list-style:none;background:var(--p-surface-overlay);color:var(--p-text-color);width:100%}.p-select-option{padding:.5rem .75rem;cursor:pointer;transition:background-color .2s ease;color:var(--p-text-color)}.p-select-option:hover{background:var(--p-content-hover-background)}.p-select-option.p-select-option-selected{background:var(--p-highlight-background);color:var(--p-highlight-color)}.p-select-option.p-select-option-selected:hover{background:var(--p-highlight-focus-background);color:var(--p-highlight-focus-color)}.p-select-clear-icon{display:flex;align-items:center;padding:0 .5rem;color:var(--p-text-muted-color);cursor:pointer;transition:color .2s ease}.p-select-clear-icon:hover{color:var(--p-text-color)}\n"], dependencies: [{ kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i5$1.Checkbox, selector: "p-checkbox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
3812
3963
|
}
|
|
3813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LazyMultiSelectComponent, decorators: [{
|
|
3814
3965
|
type: Component,
|
|
3815
3966
|
args: [{ selector: 'lib-lazy-multi-select', imports: [PrimeModule, AngularModule, TranslatePipe], encapsulation: ViewEncapsulation.None, providers: [provideValueAccessor(LazyMultiSelectComponent)], template: "<div\n class=\"p-select w-full\"\n #pSelect\n (click)=\"onSelectClick()\"\n [class.p-disabled]=\"disabled()\"\n [class.edit-mode-element-css]=\"!isEditMode()\"\n [class.overflow-hidden]=\"!isEditMode()\"\n>\n @if (selectedValueDisplay()) {\n <span class=\"p-select-label\" [class.edit-mode-element-css]=\"!isEditMode()\">\n {{ selectedValueDisplay() }}\n </span>\n } @else {\n <span class=\"p-select-label p-placeholder\">{{ displayPlaceholder() }}</span>\n }\n\n @if (showClear() && hasSelectedValues()) {\n <span class=\"p-select-clear-icon\" (click)=\"clear($event)\">\n <i class=\"pi pi-times\"></i>\n </span>\n }\n\n @if (isEditMode()) {\n <div class=\"p-select-dropdown\">\n <span class=\"p-select-dropdown-icon flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"p-multiselect-dropdown-icon p-icon\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n </div>\n }\n</div>\n\n<ng-template #overlayTpl>\n <div class=\"p-select-overlay\" (click)=\"onOverlayClick($event)\">\n <div class=\"p-select-header flex flex-row gap-2 items-center\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isSelectAll()\"\n [disabled]=\"disabled()\"\n (onChange)=\"changeSelectAll($event)\"\n />\n <input\n type=\"text\"\n pInputText\n class=\"w-full\"\n [placeholder]=\"'shared.search' | translate\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"searchTerm.set($event)\"\n />\n </div>\n <div class=\"p-select-list-container\" (scroll)=\"onScroll($event)\">\n <ul class=\"p-select-list\">\n @for (data of selectDataList(); track data.value) {\n @let isItemSelected = isSelected(data);\n <li\n class=\"p-select-option flex flex-row gap-2 items-center\"\n [class.p-select-option-selected]=\"isItemSelected\"\n >\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isItemSelected\"\n [disabled]=\"disabled()\"\n (onChange)=\"selectValue($event, data)\"\n />\n <span>{{ data.label }}</span>\n </li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n", styles: [".p-select-overlay{display:flex;flex-direction:column;max-height:250px;overflow:hidden}.p-select-header{padding:.75rem;border-bottom:1px solid var(--p-surface-border);background:var(--p-content-hover-background);flex-shrink:0;width:100%;box-sizing:border-box}.p-select-header input{background:var(--p-form-field-background);border-color:var(--p-form-field-border-color);color:var(--p-text-color)}.p-select-header input::placeholder{color:var(--p-text-muted-color)}.p-select-list-container{flex:1;overflow-y:auto;min-height:0;width:100%}.p-select-list{margin:0;padding:.25rem 0;list-style:none;background:var(--p-surface-overlay);color:var(--p-text-color);width:100%}.p-select-option{padding:.5rem .75rem;cursor:pointer;transition:background-color .2s ease;color:var(--p-text-color)}.p-select-option:hover{background:var(--p-content-hover-background)}.p-select-option.p-select-option-selected{background:var(--p-highlight-background);color:var(--p-highlight-color)}.p-select-option.p-select-option-selected:hover{background:var(--p-highlight-focus-background);color:var(--p-highlight-focus-color)}.p-select-clear-icon{display:flex;align-items:center;padding:0 .5rem;color:var(--p-text-muted-color);cursor:pointer;transition:color .2s ease}.p-select-clear-icon:hover{color:var(--p-text-color)}\n"] }]
|
|
3816
3967
|
}], ctorParameters: () => [], propDecorators: { pSelectRef: [{ type: i0.ViewChild, args: ['pSelect', { isSignal: true }] }], overlayTemplate: [{ type: i0.ViewChild, args: ['overlayTpl', { isSignal: true }] }], placeHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeHolder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: true }] }], selectDataList: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectDataList", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], onSearch: [{ type: i0.Output, args: ["onSearch"] }], onPagination: [{ type: i0.Output, args: ["onPagination"] }] } });
|
|
@@ -3834,30 +3985,43 @@ class LazySelectComponent extends BaseFormControl {
|
|
|
3834
3985
|
// View references
|
|
3835
3986
|
scrollContainer = viewChild.required('scrollContainer');
|
|
3836
3987
|
// Inputs
|
|
3837
|
-
placeHolder = input('',
|
|
3838
|
-
|
|
3988
|
+
placeHolder = input('', /* @ts-ignore */
|
|
3989
|
+
...(ngDevMode ? [{ debugName: "placeHolder" }] : /* istanbul ignore next */ []));
|
|
3990
|
+
showClear = input(true, /* @ts-ignore */
|
|
3991
|
+
...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
3839
3992
|
// Computed placeholder with translation fallback
|
|
3840
3993
|
displayPlaceholder = computed(() => {
|
|
3841
3994
|
const customPlaceholder = this.placeHolder();
|
|
3842
3995
|
if (customPlaceholder)
|
|
3843
3996
|
return customPlaceholder;
|
|
3844
3997
|
return this.t('shared.select.placeholder');
|
|
3845
|
-
},
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3998
|
+
}, /* @ts-ignore */
|
|
3999
|
+
...(ngDevMode ? [{ debugName: "displayPlaceholder" }] : /* istanbul ignore next */ []));
|
|
4000
|
+
optionLabel = input.required(/* @ts-ignore */
|
|
4001
|
+
...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
4002
|
+
optionValue = input.required(/* @ts-ignore */
|
|
4003
|
+
...(ngDevMode ? [{ debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
4004
|
+
isEditMode = input.required(/* @ts-ignore */
|
|
4005
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
4006
|
+
isLoading = input.required(/* @ts-ignore */
|
|
4007
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
4008
|
+
total = input.required(/* @ts-ignore */
|
|
4009
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
4010
|
+
pagination = input.required(/* @ts-ignore */
|
|
4011
|
+
...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
|
|
4012
|
+
selectDataList = input.required(/* @ts-ignore */
|
|
4013
|
+
...(ngDevMode ? [{ debugName: "selectDataList" }] : /* istanbul ignore next */ []));
|
|
3853
4014
|
// Two-way bound value
|
|
3854
|
-
value = model(null,
|
|
4015
|
+
value = model(null, /* @ts-ignore */
|
|
4016
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3855
4017
|
// Outputs
|
|
3856
4018
|
onSearch = output();
|
|
3857
4019
|
onPagination = output();
|
|
3858
4020
|
// UI state
|
|
3859
|
-
searchTerm = signal('',
|
|
3860
|
-
|
|
4021
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
4022
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
4023
|
+
isPanelShow = signal(false, /* @ts-ignore */
|
|
4024
|
+
...(ngDevMode ? [{ debugName: "isPanelShow" }] : /* istanbul ignore next */ []));
|
|
3861
4025
|
constructor() {
|
|
3862
4026
|
super();
|
|
3863
4027
|
this.initializeFormControl();
|
|
@@ -3931,10 +4095,10 @@ class LazySelectComponent extends BaseFormControl {
|
|
|
3931
4095
|
}
|
|
3932
4096
|
return key;
|
|
3933
4097
|
}
|
|
3934
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3935
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
4098
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LazySelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4099
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: LazySelectComponent, isStandalone: true, selector: "lib-lazy-select", inputs: { placeHolder: { classPropertyName: "placeHolder", publicName: "placeHolder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: true, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: true, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: true, transformFunction: null }, selectDataList: { classPropertyName: "selectDataList", publicName: "selectDataList", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onSearch: "onSearch", onPagination: "onPagination" }, providers: [provideValueAccessor(LazySelectComponent)], viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #scrollContainer class=\"lib-scroll-container\">\n <p-select\n class=\"w-full\"\n [options]=\"selectDataList()\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n [filter]=\"true\"\n [showClear]=\"showClear()\"\n [placeholder]=\"displayPlaceholder()\"\n [disabled]=\"disabled()\"\n [(ngModel)]=\"value\"\n appEditModeElementChanger\n [isEditMode]=\"isEditMode()\"\n (click)=\"showPanel()\"\n (onBlur)=\"onBlur()\"\n >\n <ng-template #filter let-filter>\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"searchTerm.set($event)\"\n />\n </ng-template>\n <ng-template #selectedItem let-selectedOption>\n {{ selectedOption[optionLabel()] }}\n </ng-template>\n <ng-template #item let-item>\n {{ item[optionLabel()] }}\n </ng-template>\n </p-select>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i12.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: EditModeElementChangerDirective, selector: "[appEditModeElementChanger]", inputs: ["isEditMode"] }] });
|
|
3936
4100
|
}
|
|
3937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LazySelectComponent, decorators: [{
|
|
3938
4102
|
type: Component,
|
|
3939
4103
|
args: [{ selector: 'lib-lazy-select', imports: [AngularModule, PrimeModule, EditModeElementChangerDirective], providers: [provideValueAccessor(LazySelectComponent)], template: "<div #scrollContainer class=\"lib-scroll-container\">\n <p-select\n class=\"w-full\"\n [options]=\"selectDataList()\"\n [optionLabel]=\"optionLabel()\"\n [optionValue]=\"optionValue()\"\n [filter]=\"true\"\n [showClear]=\"showClear()\"\n [placeholder]=\"displayPlaceholder()\"\n [disabled]=\"disabled()\"\n [(ngModel)]=\"value\"\n appEditModeElementChanger\n [isEditMode]=\"isEditMode()\"\n (click)=\"showPanel()\"\n (onBlur)=\"onBlur()\"\n >\n <ng-template #filter let-filter>\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"searchTerm()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"searchTerm.set($event)\"\n />\n </ng-template>\n <ng-template #selectedItem let-selectedOption>\n {{ selectedOption[optionLabel()] }}\n </ng-template>\n <ng-template #item let-item>\n {{ item[optionLabel()] }}\n </ng-template>\n </p-select>\n</div>\n" }]
|
|
3940
4104
|
}], ctorParameters: () => [], propDecorators: { scrollContainer: [{ type: i0.ViewChild, args: ['scrollContainer', { isSignal: true }] }], placeHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeHolder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: true }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: true }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: true }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: true }] }], selectDataList: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectDataList", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], onSearch: [{ type: i0.Output, args: ["onSearch"] }], onPagination: [{ type: i0.Output, args: ["onPagination"] }] } });
|
|
@@ -3954,35 +4118,48 @@ class BaseUserSelectComponent {
|
|
|
3954
4118
|
translateAdapter = inject(TranslateService);
|
|
3955
4119
|
abortController = null;
|
|
3956
4120
|
// Inputs
|
|
3957
|
-
loadUsers = input(
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
4121
|
+
loadUsers = input(/* @ts-ignore */
|
|
4122
|
+
...(ngDevMode ? [undefined, { debugName: "loadUsers" }] : /* istanbul ignore next */ []));
|
|
4123
|
+
placeHolder = input('', /* @ts-ignore */
|
|
4124
|
+
...(ngDevMode ? [{ debugName: "placeHolder" }] : /* istanbul ignore next */ []));
|
|
4125
|
+
isEditMode = input.required(/* @ts-ignore */
|
|
4126
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
4127
|
+
filterActive = input(true, /* @ts-ignore */
|
|
4128
|
+
...(ngDevMode ? [{ debugName: "filterActive" }] : /* istanbul ignore next */ []));
|
|
4129
|
+
additionalFilters = input({}, /* @ts-ignore */
|
|
4130
|
+
...(ngDevMode ? [{ debugName: "additionalFilters" }] : /* istanbul ignore next */ []));
|
|
4131
|
+
pageSize = input(DEFAULT_PAGE_SIZE, /* @ts-ignore */
|
|
4132
|
+
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
3963
4133
|
// Outputs
|
|
3964
4134
|
onError = output();
|
|
3965
4135
|
// Internal state
|
|
3966
|
-
isLoading = signal(false,
|
|
3967
|
-
|
|
3968
|
-
|
|
4136
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
4137
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
4138
|
+
users = signal([], /* @ts-ignore */
|
|
4139
|
+
...(ngDevMode ? [{ debugName: "users" }] : /* istanbul ignore next */ []));
|
|
4140
|
+
total = signal(undefined, /* @ts-ignore */
|
|
4141
|
+
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
3969
4142
|
pagination = signal({
|
|
3970
4143
|
pageSize: DEFAULT_PAGE_SIZE,
|
|
3971
4144
|
currentPage: 0,
|
|
3972
|
-
},
|
|
3973
|
-
|
|
4145
|
+
}, /* @ts-ignore */
|
|
4146
|
+
...(ngDevMode ? [{ debugName: "pagination" }] : /* istanbul ignore next */ []));
|
|
4147
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
4148
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
3974
4149
|
// Computed dropdown data
|
|
3975
4150
|
dropdownUsers = computed(() => this.users().map((user) => ({
|
|
3976
4151
|
label: user.name || user.email,
|
|
3977
4152
|
value: user.id,
|
|
3978
|
-
})),
|
|
4153
|
+
})), /* @ts-ignore */
|
|
4154
|
+
...(ngDevMode ? [{ debugName: "dropdownUsers" }] : /* istanbul ignore next */ []));
|
|
3979
4155
|
// Computed placeholder with translation fallback
|
|
3980
4156
|
displayPlaceholder = computed(() => {
|
|
3981
4157
|
const customPlaceholder = this.placeHolder();
|
|
3982
4158
|
if (customPlaceholder)
|
|
3983
4159
|
return customPlaceholder;
|
|
3984
4160
|
return this.t('shared.user.select.placeholder');
|
|
3985
|
-
},
|
|
4161
|
+
}, /* @ts-ignore */
|
|
4162
|
+
...(ngDevMode ? [{ debugName: "displayPlaceholder" }] : /* istanbul ignore next */ []));
|
|
3986
4163
|
constructor() {
|
|
3987
4164
|
// Cleanup on destroy
|
|
3988
4165
|
this.destroyRef.onDestroy(() => {
|
|
@@ -4085,10 +4262,10 @@ class BaseUserSelectComponent {
|
|
|
4085
4262
|
}
|
|
4086
4263
|
return key;
|
|
4087
4264
|
}
|
|
4088
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4089
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
4265
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseUserSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4266
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: BaseUserSelectComponent, isStandalone: true, inputs: { loadUsers: { classPropertyName: "loadUsers", publicName: "loadUsers", isSignal: true, isRequired: false, transformFunction: null }, placeHolder: { classPropertyName: "placeHolder", publicName: "placeHolder", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: true, transformFunction: null }, filterActive: { classPropertyName: "filterActive", publicName: "filterActive", isSignal: true, isRequired: false, transformFunction: null }, additionalFilters: { classPropertyName: "additionalFilters", publicName: "additionalFilters", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onError: "onError" }, ngImport: i0 });
|
|
4090
4267
|
}
|
|
4091
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseUserSelectComponent, decorators: [{
|
|
4092
4269
|
type: Directive
|
|
4093
4270
|
}], ctorParameters: () => [], propDecorators: { loadUsers: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadUsers", required: false }] }], placeHolder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeHolder", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: true }] }], filterActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterActive", required: false }] }], additionalFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalFilters", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], onError: [{ type: i0.Output, args: ["onError"] }] } });
|
|
4094
4271
|
|
|
@@ -4122,9 +4299,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4122
4299
|
*/
|
|
4123
4300
|
class UserMultiSelectComponent extends BaseUserSelectComponent {
|
|
4124
4301
|
// Inputs
|
|
4125
|
-
showClear = input(true,
|
|
4302
|
+
showClear = input(true, /* @ts-ignore */
|
|
4303
|
+
...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
4126
4304
|
// Two-way bound value
|
|
4127
|
-
value = model(null,
|
|
4305
|
+
value = model(null, /* @ts-ignore */
|
|
4306
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4128
4307
|
// Outputs
|
|
4129
4308
|
usersSelected = output();
|
|
4130
4309
|
setupValueEffect() {
|
|
@@ -4138,8 +4317,8 @@ class UserMultiSelectComponent extends BaseUserSelectComponent {
|
|
|
4138
4317
|
});
|
|
4139
4318
|
});
|
|
4140
4319
|
}
|
|
4141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4142
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4320
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: UserMultiSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4321
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: UserMultiSelectComponent, isStandalone: true, selector: "lib-user-multi-select", inputs: { showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", usersSelected: "usersSelected" }, usesInheritance: true, ngImport: i0, template: `
|
|
4143
4322
|
<lib-lazy-multi-select
|
|
4144
4323
|
[(value)]="value"
|
|
4145
4324
|
[placeHolder]="displayPlaceholder()"
|
|
@@ -4154,7 +4333,7 @@ class UserMultiSelectComponent extends BaseUserSelectComponent {
|
|
|
4154
4333
|
/>
|
|
4155
4334
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: LazyMultiSelectComponent, selector: "lib-lazy-multi-select", inputs: ["placeHolder", "showClear", "isEditMode", "isLoading", "total", "pagination", "selectDataList", "value"], outputs: ["valueChange", "onSearch", "onPagination"] }] });
|
|
4156
4335
|
}
|
|
4157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: UserMultiSelectComponent, decorators: [{
|
|
4158
4337
|
type: Component,
|
|
4159
4338
|
args: [{
|
|
4160
4339
|
selector: 'lib-user-multi-select',
|
|
@@ -4205,9 +4384,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4205
4384
|
*/
|
|
4206
4385
|
class UserSelectComponent extends BaseUserSelectComponent {
|
|
4207
4386
|
// Inputs
|
|
4208
|
-
showClear = input(true,
|
|
4387
|
+
showClear = input(true, /* @ts-ignore */
|
|
4388
|
+
...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
4209
4389
|
// Two-way bound value
|
|
4210
|
-
value = model(null,
|
|
4390
|
+
value = model(null, /* @ts-ignore */
|
|
4391
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
4211
4392
|
// Outputs
|
|
4212
4393
|
userSelected = output();
|
|
4213
4394
|
setupValueEffect() {
|
|
@@ -4226,8 +4407,8 @@ class UserSelectComponent extends BaseUserSelectComponent {
|
|
|
4226
4407
|
});
|
|
4227
4408
|
});
|
|
4228
4409
|
}
|
|
4229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4230
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: UserSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: UserSelectComponent, isStandalone: true, selector: "lib-user-select", inputs: { showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", userSelected: "userSelected" }, usesInheritance: true, ngImport: i0, template: `
|
|
4231
4412
|
<lib-lazy-select
|
|
4232
4413
|
[(value)]="value"
|
|
4233
4414
|
[placeHolder]="displayPlaceholder()"
|
|
@@ -4244,7 +4425,7 @@ class UserSelectComponent extends BaseUserSelectComponent {
|
|
|
4244
4425
|
/>
|
|
4245
4426
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: LazySelectComponent, selector: "lib-lazy-select", inputs: ["placeHolder", "showClear", "optionLabel", "optionValue", "isEditMode", "isLoading", "total", "pagination", "selectDataList", "value"], outputs: ["valueChange", "onSearch", "onPagination"] }] });
|
|
4246
4427
|
}
|
|
4247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: UserSelectComponent, decorators: [{
|
|
4248
4429
|
type: Component,
|
|
4249
4430
|
args: [{
|
|
4250
4431
|
selector: 'lib-user-select',
|