@solcre-org/core-ui 2.15.0 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/inc/components/fixed-actions.css +165 -0
- package/assets/css/inc/components/header-mobile.css +197 -0
- package/assets/css/inc/components/header.css +1 -11
- package/assets/css/inc/components/mobile-nav.css +105 -0
- package/assets/css/main.css +3 -0
- package/fesm2022/solcre-org-core-ui.mjs +583 -17
- package/fesm2022/solcre-org-core-ui.mjs.map +1 -1
- package/index.d.ts +190 -4
- package/package.json +1 -1
|
@@ -10847,6 +10847,16 @@ class HeaderService {
|
|
|
10847
10847
|
createButtonText = signal(undefined);
|
|
10848
10848
|
globalCustomClass = signal('');
|
|
10849
10849
|
headerOutside = signal(false);
|
|
10850
|
+
refreshCallback = signal(undefined);
|
|
10851
|
+
hasFilters = computed(() => {
|
|
10852
|
+
return this.showFilter() || this.customFilters().length > 0;
|
|
10853
|
+
});
|
|
10854
|
+
getRefreshCallback() {
|
|
10855
|
+
return this.refreshCallback;
|
|
10856
|
+
}
|
|
10857
|
+
setRefreshCallback(callback) {
|
|
10858
|
+
this.refreshCallback.set(callback);
|
|
10859
|
+
}
|
|
10850
10860
|
getHeaderOutside() {
|
|
10851
10861
|
return this.headerOutside;
|
|
10852
10862
|
}
|
|
@@ -10911,6 +10921,7 @@ class HeaderService {
|
|
|
10911
10921
|
this.createButtonText.set(undefined);
|
|
10912
10922
|
this.globalCustomClass.set('');
|
|
10913
10923
|
this.headerOutside.set(false);
|
|
10924
|
+
this.refreshCallback.set(undefined);
|
|
10914
10925
|
}
|
|
10915
10926
|
setTitle(title) {
|
|
10916
10927
|
this.title.set(title);
|
|
@@ -10951,6 +10962,8 @@ class HeaderService {
|
|
|
10951
10962
|
this.globalCustomClass.set(config.globalCustomClass);
|
|
10952
10963
|
if (config.headerOutside !== undefined)
|
|
10953
10964
|
this.headerOutside.set(config.headerOutside);
|
|
10965
|
+
if (config.refreshCallback !== undefined)
|
|
10966
|
+
this.refreshCallback.set(config.refreshCallback);
|
|
10954
10967
|
}
|
|
10955
10968
|
getIsVisible() {
|
|
10956
10969
|
return this.isVisible;
|
|
@@ -11719,11 +11732,235 @@ class GenericSwitchComponent {
|
|
|
11719
11732
|
this.valueChange.emit(option.value);
|
|
11720
11733
|
}
|
|
11721
11734
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11722
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericSwitchComponent, isStandalone: true, selector: "core-generic-switch", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<
|
|
11735
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericSwitchComponent, isStandalone: true, selector: "core-generic-switch", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"c-switch\" [attr.aria-label]=\"ariaLabel()\" role=\"group\">\n @for (option of options(); track option.value) {\n <button\n class=\"c-icon-btn\"\n [class]=\"option.icon || '' | coreIconCompat\"\n [class.is-active]=\"isSelected(option.value)\"\n [class.is-disabled]=\"option.disabled\"\n [attr.title]=\"option.tooltip || option.label || '' | translate\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.data-value]=\"option.value\"\n (click)=\"onOptionClick(option)\"\n >\n @if (option.label && !option.icon) {\n {{ option.label | translate }}\n }\n </button>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
11723
11736
|
}
|
|
11724
11737
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericSwitchComponent, decorators: [{
|
|
11725
11738
|
type: Component,
|
|
11726
|
-
args: [{ selector: 'core-generic-switch', standalone: true, imports: [CommonModule, IconCompatPipe, TranslateModule], template: "<
|
|
11739
|
+
args: [{ selector: 'core-generic-switch', standalone: true, imports: [CommonModule, IconCompatPipe, TranslateModule], template: "<div class=\"c-switch\" [attr.aria-label]=\"ariaLabel()\" role=\"group\">\n @for (option of options(); track option.value) {\n <button\n class=\"c-icon-btn\"\n [class]=\"option.icon || '' | coreIconCompat\"\n [class.is-active]=\"isSelected(option.value)\"\n [class.is-disabled]=\"option.disabled\"\n [attr.title]=\"option.tooltip || option.label || '' | translate\"\n [attr.aria-pressed]=\"isSelected(option.value)\"\n [attr.aria-disabled]=\"option.disabled\"\n [attr.data-value]=\"option.value\"\n (click)=\"onOptionClick(option)\"\n >\n @if (option.label && !option.icon) {\n {{ option.label | translate }}\n }\n </button>\n }\n</div>" }]
|
|
11740
|
+
}] });
|
|
11741
|
+
|
|
11742
|
+
class MobileResolutionService {
|
|
11743
|
+
DEFAULT_MOBILE_BREAKPOINT = 768;
|
|
11744
|
+
DEFAULT_CHECK_INTERVAL = 200;
|
|
11745
|
+
_isMobile = signal(false);
|
|
11746
|
+
_screenWidth = signal(0);
|
|
11747
|
+
_breakpoint = signal(this.DEFAULT_MOBILE_BREAKPOINT);
|
|
11748
|
+
_showHeaderBreakpoint = signal(null);
|
|
11749
|
+
_isConfigured = signal(false);
|
|
11750
|
+
resizeTimeout;
|
|
11751
|
+
isMobile = this._isMobile.asReadonly();
|
|
11752
|
+
screenWidth = this._screenWidth.asReadonly();
|
|
11753
|
+
breakpoint = this._breakpoint.asReadonly();
|
|
11754
|
+
showHeaderBreakpoint = this._showHeaderBreakpoint.asReadonly();
|
|
11755
|
+
isConfigured = this._isConfigured.asReadonly();
|
|
11756
|
+
isXSmall = computed(() => this._screenWidth() < 576);
|
|
11757
|
+
isSmall = computed(() => this._screenWidth() >= 576 && this._screenWidth() < 768);
|
|
11758
|
+
isMedium = computed(() => this._screenWidth() >= 768 && this._screenWidth() < 992);
|
|
11759
|
+
isLarge = computed(() => this._screenWidth() >= 992 && this._screenWidth() < 1200);
|
|
11760
|
+
isXLarge = computed(() => this._screenWidth() >= 1200);
|
|
11761
|
+
shouldShowMobileHeader = computed(() => {
|
|
11762
|
+
const headerBreakpoint = this._showHeaderBreakpoint();
|
|
11763
|
+
const effectiveBreakpoint = headerBreakpoint !== null ? headerBreakpoint : this._breakpoint();
|
|
11764
|
+
return this._screenWidth() <= effectiveBreakpoint;
|
|
11765
|
+
});
|
|
11766
|
+
isXs = this.isXSmall;
|
|
11767
|
+
isSm = this.isSmall;
|
|
11768
|
+
isMd = this.isMedium;
|
|
11769
|
+
isLg = this.isLarge;
|
|
11770
|
+
isXl = this.isXLarge;
|
|
11771
|
+
isMobileDevice = computed(() => this.isXSmall() || this.isSmall());
|
|
11772
|
+
isTablet = this.isMedium;
|
|
11773
|
+
isDesktop = computed(() => this.isLarge() || this.isXLarge());
|
|
11774
|
+
constructor() {
|
|
11775
|
+
if (typeof window !== 'undefined') {
|
|
11776
|
+
this.initializeWithDefaults();
|
|
11777
|
+
}
|
|
11778
|
+
}
|
|
11779
|
+
configure(config) {
|
|
11780
|
+
if (typeof window === 'undefined') {
|
|
11781
|
+
return;
|
|
11782
|
+
}
|
|
11783
|
+
const breakpoint = config?.maxWidth || this.DEFAULT_MOBILE_BREAKPOINT;
|
|
11784
|
+
const checkInterval = config?.checkInterval || this.DEFAULT_CHECK_INTERVAL;
|
|
11785
|
+
this._breakpoint.set(breakpoint);
|
|
11786
|
+
if (config?.showHeaderMaxWidth !== undefined) {
|
|
11787
|
+
this._showHeaderBreakpoint.set(config.showHeaderMaxWidth);
|
|
11788
|
+
}
|
|
11789
|
+
this._isConfigured.set(true);
|
|
11790
|
+
this.updateScreenSize();
|
|
11791
|
+
this.setupResizeListener(checkInterval);
|
|
11792
|
+
}
|
|
11793
|
+
initializeWithDefaults() {
|
|
11794
|
+
if (this._isConfigured()) {
|
|
11795
|
+
return;
|
|
11796
|
+
}
|
|
11797
|
+
this.configure({
|
|
11798
|
+
maxWidth: this.DEFAULT_MOBILE_BREAKPOINT,
|
|
11799
|
+
checkInterval: this.DEFAULT_CHECK_INTERVAL
|
|
11800
|
+
});
|
|
11801
|
+
}
|
|
11802
|
+
updateScreenSize() {
|
|
11803
|
+
if (typeof window === 'undefined') {
|
|
11804
|
+
return;
|
|
11805
|
+
}
|
|
11806
|
+
const width = window.innerWidth;
|
|
11807
|
+
this._screenWidth.set(width);
|
|
11808
|
+
this._isMobile.set(width <= this._breakpoint());
|
|
11809
|
+
}
|
|
11810
|
+
setupResizeListener(interval) {
|
|
11811
|
+
if (typeof window === 'undefined') {
|
|
11812
|
+
return;
|
|
11813
|
+
}
|
|
11814
|
+
window.removeEventListener('resize', this.handleResize);
|
|
11815
|
+
window.addEventListener('resize', this.handleResize.bind(this));
|
|
11816
|
+
}
|
|
11817
|
+
handleResize() {
|
|
11818
|
+
if (this.resizeTimeout) {
|
|
11819
|
+
clearTimeout(this.resizeTimeout);
|
|
11820
|
+
}
|
|
11821
|
+
this.resizeTimeout = setTimeout(() => {
|
|
11822
|
+
this.updateScreenSize();
|
|
11823
|
+
}, this.DEFAULT_CHECK_INTERVAL);
|
|
11824
|
+
}
|
|
11825
|
+
isWidthLessThan(width) {
|
|
11826
|
+
return this._screenWidth() <= width;
|
|
11827
|
+
}
|
|
11828
|
+
isWidthGreaterThan(width) {
|
|
11829
|
+
return this._screenWidth() > width;
|
|
11830
|
+
}
|
|
11831
|
+
isWidthBetween(min, max) {
|
|
11832
|
+
const width = this._screenWidth();
|
|
11833
|
+
return width >= min && width <= max;
|
|
11834
|
+
}
|
|
11835
|
+
getCurrentBreakpoint() {
|
|
11836
|
+
if (this.isXSmall())
|
|
11837
|
+
return 'xs';
|
|
11838
|
+
if (this.isSmall())
|
|
11839
|
+
return 'sm';
|
|
11840
|
+
if (this.isMedium())
|
|
11841
|
+
return 'md';
|
|
11842
|
+
if (this.isLarge())
|
|
11843
|
+
return 'lg';
|
|
11844
|
+
return 'xl';
|
|
11845
|
+
}
|
|
11846
|
+
destroy() {
|
|
11847
|
+
if (typeof window !== 'undefined') {
|
|
11848
|
+
window.removeEventListener('resize', this.handleResize);
|
|
11849
|
+
}
|
|
11850
|
+
if (this.resizeTimeout) {
|
|
11851
|
+
clearTimeout(this.resizeTimeout);
|
|
11852
|
+
}
|
|
11853
|
+
}
|
|
11854
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MobileResolutionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11855
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MobileResolutionService, providedIn: 'root' });
|
|
11856
|
+
}
|
|
11857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MobileResolutionService, decorators: [{
|
|
11858
|
+
type: Injectable,
|
|
11859
|
+
args: [{
|
|
11860
|
+
providedIn: 'root'
|
|
11861
|
+
}]
|
|
11862
|
+
}], ctorParameters: () => [] });
|
|
11863
|
+
|
|
11864
|
+
class FixedActionsMobileModalService {
|
|
11865
|
+
_isVisible = signal(false);
|
|
11866
|
+
_modalData = signal(null);
|
|
11867
|
+
isVisible = this._isVisible.asReadonly();
|
|
11868
|
+
modalData = this._modalData.asReadonly();
|
|
11869
|
+
open(data) {
|
|
11870
|
+
this._modalData.set(data);
|
|
11871
|
+
this._isVisible.set(true);
|
|
11872
|
+
}
|
|
11873
|
+
close() {
|
|
11874
|
+
this._isVisible.set(false);
|
|
11875
|
+
setTimeout(() => {
|
|
11876
|
+
if (!this._isVisible()) {
|
|
11877
|
+
this._modalData.set(null);
|
|
11878
|
+
}
|
|
11879
|
+
}, 300);
|
|
11880
|
+
}
|
|
11881
|
+
executeAction(action, row) {
|
|
11882
|
+
if (action.callback) {
|
|
11883
|
+
action.callback(row);
|
|
11884
|
+
}
|
|
11885
|
+
else if (action.customAction?.callback) {
|
|
11886
|
+
action.customAction.callback(row);
|
|
11887
|
+
}
|
|
11888
|
+
else if (action.globalAction?.callback) {
|
|
11889
|
+
const selectedRows = this._modalData()?.selectedRows || [];
|
|
11890
|
+
action.globalAction.callback(selectedRows);
|
|
11891
|
+
}
|
|
11892
|
+
this.close();
|
|
11893
|
+
}
|
|
11894
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11895
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalService, providedIn: 'root' });
|
|
11896
|
+
}
|
|
11897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalService, decorators: [{
|
|
11898
|
+
type: Injectable,
|
|
11899
|
+
args: [{
|
|
11900
|
+
providedIn: 'root'
|
|
11901
|
+
}]
|
|
11902
|
+
}] });
|
|
11903
|
+
|
|
11904
|
+
class FixedActionsMobileModalComponent {
|
|
11905
|
+
mobileModalService = inject(FixedActionsMobileModalService);
|
|
11906
|
+
permissionService = inject(PermissionService);
|
|
11907
|
+
isVisible = this.mobileModalService.isVisible;
|
|
11908
|
+
modalData = this.mobileModalService.modalData;
|
|
11909
|
+
visibleActions = computed(() => {
|
|
11910
|
+
const data = this.modalData();
|
|
11911
|
+
if (!data)
|
|
11912
|
+
return [];
|
|
11913
|
+
return data.actions.filter(action => this.shouldShowAction(action));
|
|
11914
|
+
});
|
|
11915
|
+
shouldShowAction(action) {
|
|
11916
|
+
if (action.requiredPermission) {
|
|
11917
|
+
const hasPermission = this.permissionService.hasPermission(action.requiredPermission.resource, action.requiredPermission.action);
|
|
11918
|
+
if (!hasPermission)
|
|
11919
|
+
return false;
|
|
11920
|
+
}
|
|
11921
|
+
const data = this.modalData();
|
|
11922
|
+
if (action.shouldShow && data?.data) {
|
|
11923
|
+
return action.shouldShow(data.data);
|
|
11924
|
+
}
|
|
11925
|
+
if (action.customAction?.requiredPermission) {
|
|
11926
|
+
const hasPermission = this.permissionService.hasPermission(action.customAction.requiredPermission.resource, action.customAction.requiredPermission.action);
|
|
11927
|
+
if (!hasPermission)
|
|
11928
|
+
return false;
|
|
11929
|
+
}
|
|
11930
|
+
if (action.customAction?.shouldShow && data?.data) {
|
|
11931
|
+
return action.customAction.shouldShow(data.data);
|
|
11932
|
+
}
|
|
11933
|
+
if (action.globalAction?.requiredPermission) {
|
|
11934
|
+
const hasPermission = this.permissionService.hasPermission(action.globalAction.requiredPermission.resource, action.globalAction.requiredPermission.action);
|
|
11935
|
+
if (!hasPermission)
|
|
11936
|
+
return false;
|
|
11937
|
+
}
|
|
11938
|
+
return true;
|
|
11939
|
+
}
|
|
11940
|
+
getActionLabel(action) {
|
|
11941
|
+
return action.label || action.customAction?.label || action.globalAction?.label || '';
|
|
11942
|
+
}
|
|
11943
|
+
getActionIcon(action) {
|
|
11944
|
+
return action.icon || action.customAction?.icon || action.globalAction?.icon || '';
|
|
11945
|
+
}
|
|
11946
|
+
onClose() {
|
|
11947
|
+
this.mobileModalService.close();
|
|
11948
|
+
}
|
|
11949
|
+
onActionClick(action) {
|
|
11950
|
+
const data = this.modalData();
|
|
11951
|
+
this.mobileModalService.executeAction(action, data?.data);
|
|
11952
|
+
}
|
|
11953
|
+
onOverlayClick(event) {
|
|
11954
|
+
if (event.target === event.currentTarget) {
|
|
11955
|
+
this.onClose();
|
|
11956
|
+
}
|
|
11957
|
+
}
|
|
11958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11959
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: FixedActionsMobileModalComponent, isStandalone: true, selector: "core-fixed-actions-mobile-modal", ngImport: i0, template: "@if (isVisible()) {\n <div class=\"c-services-chat c-modal is-visible\">\n <div class=\"c-modal__overlay\" (click)=\"onOverlayClick($event)\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n @if (modalData()?.title || modalData()?.subtitle) {\n <p class=\"c-modal__title\">\n {{ modalData()?.title }}\n @if (modalData()?.subtitle) {\n <br>\n <small>{{ modalData()?.subtitle }}</small>\n }\n </p>\n }\n <button \n type=\"button\" \n class=\"c-icon-btn c-modal__close\" \n aria-label=\"Cerrar\" \n title=\"Cerrar\"\n (click)=\"onClose()\">\n <span class=\"icon-cross-thin\"></span>\n </button>\n </div>\n <div class=\"c-modal__body\">\n <nav class=\"c-mobile-nav\">\n <ul>\n @for (action of visibleActions(); track $index) {\n <li class=\"c-mobile-nav__item\">\n <a \n class=\"c-mobile-nav__link\" \n href=\"javascript:void(0)\"\n (click)=\"onActionClick(action)\">\n @if (getActionIcon(action)) {\n <span [ngClass]=\"getActionIcon(action)\"></span>\n }\n {{ getActionLabel(action) }}\n </a>\n </li>\n }\n </ul>\n </nav>\n </div>\n </div>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
11960
|
+
}
|
|
11961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalComponent, decorators: [{
|
|
11962
|
+
type: Component,
|
|
11963
|
+
args: [{ selector: 'core-fixed-actions-mobile-modal', standalone: true, imports: [CommonModule], template: "@if (isVisible()) {\n <div class=\"c-services-chat c-modal is-visible\">\n <div class=\"c-modal__overlay\" (click)=\"onOverlayClick($event)\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n @if (modalData()?.title || modalData()?.subtitle) {\n <p class=\"c-modal__title\">\n {{ modalData()?.title }}\n @if (modalData()?.subtitle) {\n <br>\n <small>{{ modalData()?.subtitle }}</small>\n }\n </p>\n }\n <button \n type=\"button\" \n class=\"c-icon-btn c-modal__close\" \n aria-label=\"Cerrar\" \n title=\"Cerrar\"\n (click)=\"onClose()\">\n <span class=\"icon-cross-thin\"></span>\n </button>\n </div>\n <div class=\"c-modal__body\">\n <nav class=\"c-mobile-nav\">\n <ul>\n @for (action of visibleActions(); track $index) {\n <li class=\"c-mobile-nav__item\">\n <a \n class=\"c-mobile-nav__link\" \n href=\"javascript:void(0)\"\n (click)=\"onActionClick(action)\">\n @if (getActionIcon(action)) {\n <span [ngClass]=\"getActionIcon(action)\"></span>\n }\n {{ getActionLabel(action) }}\n </a>\n </li>\n }\n </ul>\n </nav>\n </div>\n </div>\n </div>\n}\n" }]
|
|
11727
11964
|
}] });
|
|
11728
11965
|
|
|
11729
11966
|
class GenericTableComponent {
|
|
@@ -11741,6 +11978,8 @@ class GenericTableComponent {
|
|
|
11741
11978
|
inlineEditService = inject((InlineEditService));
|
|
11742
11979
|
tableSortService = inject(TableSortService);
|
|
11743
11980
|
activeFiltersEventService = inject(ActiveFiltersEventService);
|
|
11981
|
+
mobileResolutionService = inject(MobileResolutionService);
|
|
11982
|
+
fixedActionsMobileModalService = inject(FixedActionsMobileModalService);
|
|
11744
11983
|
TableAction = TableAction;
|
|
11745
11984
|
ModalMode = ModalMode;
|
|
11746
11985
|
ButtonType = ButtonType;
|
|
@@ -11783,6 +12022,7 @@ class GenericTableComponent {
|
|
|
11783
12022
|
showManualRefresh = input(false);
|
|
11784
12023
|
manualRefreshConfig = input(undefined);
|
|
11785
12024
|
refreshButtonConfig = input(undefined);
|
|
12025
|
+
fixedActionsConfig = input(undefined);
|
|
11786
12026
|
customEdit = input();
|
|
11787
12027
|
customDelete = input();
|
|
11788
12028
|
customView = input();
|
|
@@ -11837,6 +12077,11 @@ class GenericTableComponent {
|
|
|
11837
12077
|
return actions;
|
|
11838
12078
|
});
|
|
11839
12079
|
getVisibleCustomActions(row, isExtra = false) {
|
|
12080
|
+
const config = this.fixedActionsConfig();
|
|
12081
|
+
const isMobile = this.mobileResolutionService.isMobile();
|
|
12082
|
+
if (!isExtra && config?.enabled && isMobile && config.includeCustomActions !== false) {
|
|
12083
|
+
return [];
|
|
12084
|
+
}
|
|
11840
12085
|
const actions = this.customActions()
|
|
11841
12086
|
.filter(action => action.isExtra === isExtra)
|
|
11842
12087
|
.filter(action => {
|
|
@@ -11869,6 +12114,67 @@ class GenericTableComponent {
|
|
|
11869
12114
|
});
|
|
11870
12115
|
currentFilterValues = signal(new Map());
|
|
11871
12116
|
currentActiveFilters = computed(() => this.generateActiveFilters());
|
|
12117
|
+
shouldShowFixedActions = computed(() => {
|
|
12118
|
+
const config = this.fixedActionsConfig();
|
|
12119
|
+
if (!config?.enabled)
|
|
12120
|
+
return false;
|
|
12121
|
+
if (config.showOnlyInMobile !== false) {
|
|
12122
|
+
return this.mobileResolutionService.isMobile();
|
|
12123
|
+
}
|
|
12124
|
+
return true;
|
|
12125
|
+
});
|
|
12126
|
+
shouldShowManualRefresh = computed(() => {
|
|
12127
|
+
return this.showManualRefresh() && !this.mobileResolutionService.isMobile();
|
|
12128
|
+
});
|
|
12129
|
+
fixedActionsArray = computed(() => {
|
|
12130
|
+
const config = this.fixedActionsConfig();
|
|
12131
|
+
if (!config?.enabled || !this.shouldShowFixedActions())
|
|
12132
|
+
return [];
|
|
12133
|
+
const actions = [];
|
|
12134
|
+
if (config.includeGlobalActions) {
|
|
12135
|
+
const floatingGlobalActions = this.globalActions()
|
|
12136
|
+
.filter(ga => !ga.showInsideModal)
|
|
12137
|
+
.map(globalAction => ({
|
|
12138
|
+
icon: globalAction.icon,
|
|
12139
|
+
label: globalAction.label,
|
|
12140
|
+
class: globalAction.class,
|
|
12141
|
+
tooltip: globalAction.tooltip,
|
|
12142
|
+
tooltipPosition: globalAction.tooltipPosition,
|
|
12143
|
+
globalAction,
|
|
12144
|
+
requiredPermission: globalAction.requiredPermission,
|
|
12145
|
+
callback: () => {
|
|
12146
|
+
if (globalAction.callback) {
|
|
12147
|
+
globalAction.callback(this.selectedRows());
|
|
12148
|
+
}
|
|
12149
|
+
}
|
|
12150
|
+
}));
|
|
12151
|
+
actions.push(...floatingGlobalActions);
|
|
12152
|
+
const modalGlobalActions = this.globalActions().filter(ga => ga.showInsideModal);
|
|
12153
|
+
if (modalGlobalActions.length > 0) {
|
|
12154
|
+
const plusButtonAction = {
|
|
12155
|
+
icon: 'icon-add-clean',
|
|
12156
|
+
class: 'c-btn--primary',
|
|
12157
|
+
tooltip: 'Más acciones',
|
|
12158
|
+
insideActions: modalGlobalActions.map(globalAction => ({
|
|
12159
|
+
icon: globalAction.icon,
|
|
12160
|
+
label: globalAction.label,
|
|
12161
|
+
requiredPermission: globalAction.requiredPermission,
|
|
12162
|
+
globalAction: globalAction,
|
|
12163
|
+
callback: () => {
|
|
12164
|
+
if (globalAction.callback) {
|
|
12165
|
+
globalAction.callback(this.selectedRows());
|
|
12166
|
+
}
|
|
12167
|
+
}
|
|
12168
|
+
}))
|
|
12169
|
+
};
|
|
12170
|
+
actions.push(plusButtonAction);
|
|
12171
|
+
}
|
|
12172
|
+
}
|
|
12173
|
+
if (config.customFixedActions) {
|
|
12174
|
+
actions.push(...config.customFixedActions);
|
|
12175
|
+
}
|
|
12176
|
+
return actions;
|
|
12177
|
+
});
|
|
11872
12178
|
hasExtraActionsForRow(row) {
|
|
11873
12179
|
const hasExtraDefaultActionsWithPermissions = this.getVisibleDefaultActions(row, true).some(action => this.hasPermission(action));
|
|
11874
12180
|
const hasExtraCustomActionsWithPermissions = this.getVisibleCustomActions(row, true).some(action => this.hasPermission(action));
|
|
@@ -12348,6 +12654,165 @@ class GenericTableComponent {
|
|
|
12348
12654
|
const maxSelection = action.maxSelection ?? Infinity;
|
|
12349
12655
|
return selectionCount < minSelection || selectionCount > maxSelection;
|
|
12350
12656
|
}
|
|
12657
|
+
onFixedActionClick(action) {
|
|
12658
|
+
const config = this.fixedActionsConfig();
|
|
12659
|
+
if (!config)
|
|
12660
|
+
return;
|
|
12661
|
+
if (action.insideActions && action.insideActions.length > 0) {
|
|
12662
|
+
this.openFixedActionsMobileModal(action);
|
|
12663
|
+
return;
|
|
12664
|
+
}
|
|
12665
|
+
if (action.callback) {
|
|
12666
|
+
action.callback();
|
|
12667
|
+
}
|
|
12668
|
+
else if (action.customAction?.callback) {
|
|
12669
|
+
const selectedRow = this.selectedRows()[0];
|
|
12670
|
+
if (selectedRow) {
|
|
12671
|
+
action.customAction.callback(selectedRow);
|
|
12672
|
+
}
|
|
12673
|
+
}
|
|
12674
|
+
else if (action.globalAction?.callback) {
|
|
12675
|
+
action.globalAction.callback(this.selectedRows());
|
|
12676
|
+
}
|
|
12677
|
+
}
|
|
12678
|
+
openFixedActionsMobileModal(action) {
|
|
12679
|
+
const config = this.fixedActionsConfig();
|
|
12680
|
+
if (!config || !action.insideActions)
|
|
12681
|
+
return;
|
|
12682
|
+
const selectedRow = this.selectedRows()[0];
|
|
12683
|
+
const convertedActions = action.insideActions.map(innerAction => {
|
|
12684
|
+
if ('callback' in innerAction && !('title' in innerAction) && !('requiresSelection' in innerAction)) {
|
|
12685
|
+
return innerAction;
|
|
12686
|
+
}
|
|
12687
|
+
if ('title' in innerAction) {
|
|
12688
|
+
const customAction = innerAction;
|
|
12689
|
+
return {
|
|
12690
|
+
customAction,
|
|
12691
|
+
icon: customAction.icon,
|
|
12692
|
+
label: customAction.title,
|
|
12693
|
+
requiredPermission: customAction.requiredPermission,
|
|
12694
|
+
callback: (row) => {
|
|
12695
|
+
if (row) {
|
|
12696
|
+
customAction.callback(row);
|
|
12697
|
+
}
|
|
12698
|
+
}
|
|
12699
|
+
};
|
|
12700
|
+
}
|
|
12701
|
+
const globalAction = innerAction;
|
|
12702
|
+
return {
|
|
12703
|
+
globalAction,
|
|
12704
|
+
icon: globalAction.icon,
|
|
12705
|
+
label: globalAction.label,
|
|
12706
|
+
requiredPermission: globalAction.requiredPermission,
|
|
12707
|
+
callback: () => {
|
|
12708
|
+
globalAction.callback(this.selectedRows());
|
|
12709
|
+
}
|
|
12710
|
+
};
|
|
12711
|
+
});
|
|
12712
|
+
this.fixedActionsMobileModalService.open({
|
|
12713
|
+
title: config.mobileModalTitle,
|
|
12714
|
+
subtitle: config.mobileModalSubtitle,
|
|
12715
|
+
actions: convertedActions,
|
|
12716
|
+
data: selectedRow,
|
|
12717
|
+
selectedRows: this.selectedRows()
|
|
12718
|
+
});
|
|
12719
|
+
}
|
|
12720
|
+
openCustomActionsMobileModal(row) {
|
|
12721
|
+
const config = this.fixedActionsConfig();
|
|
12722
|
+
if (!config)
|
|
12723
|
+
return;
|
|
12724
|
+
const visibleCustomActions = this.customActions().filter(customAction => {
|
|
12725
|
+
if (customAction.shouldShow && !customAction.shouldShow(row)) {
|
|
12726
|
+
return false;
|
|
12727
|
+
}
|
|
12728
|
+
if (customAction.requiredPermission) {
|
|
12729
|
+
const hasPermission = this.permissionService.hasPermission(customAction.requiredPermission.resource, customAction.requiredPermission.action);
|
|
12730
|
+
if (!hasPermission)
|
|
12731
|
+
return false;
|
|
12732
|
+
}
|
|
12733
|
+
return true;
|
|
12734
|
+
});
|
|
12735
|
+
const convertedActions = visibleCustomActions.map(customAction => ({
|
|
12736
|
+
customAction,
|
|
12737
|
+
icon: customAction.icon,
|
|
12738
|
+
label: customAction.title,
|
|
12739
|
+
requiredPermission: customAction.requiredPermission,
|
|
12740
|
+
callback: () => {
|
|
12741
|
+
customAction.callback(row);
|
|
12742
|
+
}
|
|
12743
|
+
}));
|
|
12744
|
+
this.fixedActionsMobileModalService.open({
|
|
12745
|
+
title: config.mobileModalTitle || 'Acciones',
|
|
12746
|
+
subtitle: config.mobileModalSubtitle,
|
|
12747
|
+
actions: convertedActions,
|
|
12748
|
+
data: row,
|
|
12749
|
+
selectedRows: [row]
|
|
12750
|
+
});
|
|
12751
|
+
}
|
|
12752
|
+
shouldShowFixedAction(action) {
|
|
12753
|
+
if (action.requiredPermission) {
|
|
12754
|
+
const hasPermission = this.permissionService.hasPermission(action.requiredPermission.resource, action.requiredPermission.action);
|
|
12755
|
+
if (!hasPermission)
|
|
12756
|
+
return false;
|
|
12757
|
+
}
|
|
12758
|
+
if (action.shouldShow) {
|
|
12759
|
+
const selectedRow = this.selectedRows()[0];
|
|
12760
|
+
return action.shouldShow(selectedRow);
|
|
12761
|
+
}
|
|
12762
|
+
if (action.customAction?.requiredPermission) {
|
|
12763
|
+
const hasPermission = this.permissionService.hasPermission(action.customAction.requiredPermission.resource, action.customAction.requiredPermission.action);
|
|
12764
|
+
if (!hasPermission)
|
|
12765
|
+
return false;
|
|
12766
|
+
}
|
|
12767
|
+
if (action.customAction?.shouldShow) {
|
|
12768
|
+
const selectedRow = this.selectedRows()[0];
|
|
12769
|
+
if (selectedRow) {
|
|
12770
|
+
return action.customAction.shouldShow(selectedRow);
|
|
12771
|
+
}
|
|
12772
|
+
}
|
|
12773
|
+
if (action.globalAction?.requiredPermission) {
|
|
12774
|
+
const hasPermission = this.permissionService.hasPermission(action.globalAction.requiredPermission.resource, action.globalAction.requiredPermission.action);
|
|
12775
|
+
if (!hasPermission)
|
|
12776
|
+
return false;
|
|
12777
|
+
}
|
|
12778
|
+
return true;
|
|
12779
|
+
}
|
|
12780
|
+
isFixedActionDisabled(action) {
|
|
12781
|
+
const selectedRow = this.selectedRows()[0];
|
|
12782
|
+
if (action.shouldDisable) {
|
|
12783
|
+
return action.shouldDisable(selectedRow);
|
|
12784
|
+
}
|
|
12785
|
+
if (action.customAction?.shouldDisable && selectedRow) {
|
|
12786
|
+
return action.customAction.shouldDisable(selectedRow);
|
|
12787
|
+
}
|
|
12788
|
+
if (action.globalAction?.isDisabled) {
|
|
12789
|
+
return action.globalAction.isDisabled;
|
|
12790
|
+
}
|
|
12791
|
+
if (action.globalAction) {
|
|
12792
|
+
return this.isGlobalActionDisabled(action.globalAction);
|
|
12793
|
+
}
|
|
12794
|
+
return false;
|
|
12795
|
+
}
|
|
12796
|
+
getFixedActionClass(action) {
|
|
12797
|
+
const classes = ['c-fixed-actions__btn', 'c-btn'];
|
|
12798
|
+
if (action.class) {
|
|
12799
|
+
classes.push(action.class);
|
|
12800
|
+
}
|
|
12801
|
+
else if (action.customAction?.class) {
|
|
12802
|
+
classes.push(action.customAction.class);
|
|
12803
|
+
}
|
|
12804
|
+
else if (action.globalAction?.class) {
|
|
12805
|
+
classes.push(action.globalAction.class);
|
|
12806
|
+
}
|
|
12807
|
+
const icon = action.icon || action.customAction?.icon || action.globalAction?.icon;
|
|
12808
|
+
if (icon) {
|
|
12809
|
+
classes.push(icon);
|
|
12810
|
+
}
|
|
12811
|
+
return classes.join(' ');
|
|
12812
|
+
}
|
|
12813
|
+
getFixedActionTooltip(action) {
|
|
12814
|
+
return action.tooltip || action.customAction?.tooltip || action.globalAction?.tooltip;
|
|
12815
|
+
}
|
|
12351
12816
|
onModalSave(updatedData) {
|
|
12352
12817
|
const modalMode = this.tableActionService.getModalMode();
|
|
12353
12818
|
this.beforeSave.emit({ data: updatedData, mode: modalMode });
|
|
@@ -12848,6 +13313,7 @@ class GenericTableComponent {
|
|
|
12848
13313
|
filterButtonConfig: this.filterButtonConfig(),
|
|
12849
13314
|
createButtonConfig: this.createButtonConfig(),
|
|
12850
13315
|
createButtonText: this.createButtonText(),
|
|
13316
|
+
refreshCallback: this.showManualRefresh() ? () => this.onManualRefresh() : undefined
|
|
12851
13317
|
});
|
|
12852
13318
|
}
|
|
12853
13319
|
onColumnHeaderClick(column) {
|
|
@@ -13116,6 +13582,15 @@ class GenericTableComponent {
|
|
|
13116
13582
|
this.toggleRowExpansion(row);
|
|
13117
13583
|
}
|
|
13118
13584
|
onMoreActionsClick(event, rowId) {
|
|
13585
|
+
const config = this.fixedActionsConfig();
|
|
13586
|
+
const isMobile = this.mobileResolutionService.isMobile();
|
|
13587
|
+
if (config?.enabled && isMobile && config.includeCustomActions !== false) {
|
|
13588
|
+
const row = this.displayedData().find(r => r.getId() === rowId);
|
|
13589
|
+
if (row) {
|
|
13590
|
+
this.openCustomActionsMobileModal(row);
|
|
13591
|
+
return;
|
|
13592
|
+
}
|
|
13593
|
+
}
|
|
13119
13594
|
this.toggleSubmenu(rowId, event.originalEvent);
|
|
13120
13595
|
}
|
|
13121
13596
|
sortDataByReference() {
|
|
@@ -13278,7 +13753,7 @@ class GenericTableComponent {
|
|
|
13278
13753
|
};
|
|
13279
13754
|
}
|
|
13280
13755
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13281
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonText: { classPropertyName: "createButtonText", publicName: "createButtonText", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, showManualRefresh: { classPropertyName: "showManualRefresh", publicName: "showManualRefresh", isSignal: true, isRequired: false, transformFunction: null }, manualRefreshConfig: { classPropertyName: "manualRefreshConfig", publicName: "manualRefreshConfig", isSignal: true, isRequired: false, transformFunction: null }, refreshButtonConfig: { classPropertyName: "refreshButtonConfig", publicName: "refreshButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", dataRefreshed: "dataRefreshed", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "manualRefreshComponent", first: true, predicate: CoreManualRefreshComponent, descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (showManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\">\n</core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:#28a745}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "steps", "title", "isMultiple", "customTemplate", "customViewTemplate", "finalStepTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges", "stepValidationEnabled", "allowFreeNavigation", "autoMarkCompleted"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }, { kind: "component", type: CoreManualRefreshComponent, selector: "core-manual-refresh", inputs: ["config", "refreshId"], outputs: ["onRefresh", "timestampUpdated"] }, { kind: "component", type: GenericSwitchComponent, selector: "core-generic-switch", inputs: ["options", "selectedValue", "ariaLabel"], outputs: ["valueChange"] }] });
|
|
13756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonText: { classPropertyName: "createButtonText", publicName: "createButtonText", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, showManualRefresh: { classPropertyName: "showManualRefresh", publicName: "showManualRefresh", isSignal: true, isRequired: false, transformFunction: null }, manualRefreshConfig: { classPropertyName: "manualRefreshConfig", publicName: "manualRefreshConfig", isSignal: true, isRequired: false, transformFunction: null }, refreshButtonConfig: { classPropertyName: "refreshButtonConfig", publicName: "refreshButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, fixedActionsConfig: { classPropertyName: "fixedActionsConfig", publicName: "fixedActionsConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", dataRefreshed: "dataRefreshed", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "manualRefreshComponent", first: true, predicate: CoreManualRefreshComponent, descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\">\n</core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>\n\n@if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n}\n\n<core-fixed-actions-mobile-modal />\n", styles: [".expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:#28a745}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "steps", "title", "isMultiple", "customTemplate", "customViewTemplate", "finalStepTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges", "stepValidationEnabled", "allowFreeNavigation", "autoMarkCompleted"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }, { kind: "component", type: CoreManualRefreshComponent, selector: "core-manual-refresh", inputs: ["config", "refreshId"], outputs: ["onRefresh", "timestampUpdated"] }, { kind: "component", type: GenericSwitchComponent, selector: "core-generic-switch", inputs: ["options", "selectedValue", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: FixedActionsMobileModalComponent, selector: "core-fixed-actions-mobile-modal" }] });
|
|
13282
13757
|
}
|
|
13283
13758
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
13284
13759
|
type: Component,
|
|
@@ -13294,7 +13769,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
13294
13769
|
ActiveFiltersComponent,
|
|
13295
13770
|
CoreManualRefreshComponent,
|
|
13296
13771
|
GenericSwitchComponent,
|
|
13297
|
-
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (showManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\">\n</core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:#28a745}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}\n"] }]
|
|
13772
|
+
FixedActionsMobileModalComponent,
|
|
13773
|
+
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\">\n</core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>\n\n@if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n}\n\n<core-fixed-actions-mobile-modal />\n", styles: [".expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:#28a745}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}\n"] }]
|
|
13298
13774
|
}], ctorParameters: () => [], propDecorators: { sentinel: [{
|
|
13299
13775
|
type: ViewChild,
|
|
13300
13776
|
args: ['sentinel', { static: false }]
|
|
@@ -14012,6 +14488,7 @@ class GenericSidebarComponent {
|
|
|
14012
14488
|
alertService = inject(AlertService);
|
|
14013
14489
|
mobileModalService = inject(SidebarMobileModalService);
|
|
14014
14490
|
customModalService = inject(SidebarCustomModalService);
|
|
14491
|
+
mobileResolutionService = inject(MobileResolutionService);
|
|
14015
14492
|
config = input(null);
|
|
14016
14493
|
position = input(SidebarPosition.LEFT);
|
|
14017
14494
|
customTemplate = input(null);
|
|
@@ -14030,7 +14507,7 @@ class GenericSidebarComponent {
|
|
|
14030
14507
|
isMobileView = computed(() => {
|
|
14031
14508
|
const config = this.getConfig();
|
|
14032
14509
|
const responsiveConfig = config?.responsiveConfig;
|
|
14033
|
-
const maxBreakpoint = responsiveConfig?.maxMobileBreakpoint ??
|
|
14510
|
+
const maxBreakpoint = responsiveConfig?.maxMobileBreakpoint ?? this.mobileResolutionService.breakpoint();
|
|
14034
14511
|
const minBreakpoint = responsiveConfig?.minMobileBreakpoint ?? 0;
|
|
14035
14512
|
return this.screenWidth() <= maxBreakpoint && this.screenWidth() >= minBreakpoint;
|
|
14036
14513
|
});
|
|
@@ -14712,6 +15189,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
14712
15189
|
], hostDirectives: [CoreHostDirective], template: "@if (headerService.getIsVisible()()) {\n @if(!headerService.getHeaderOutside()()) {\n <div class=\"c-header\">\n <div class=\"c-header__row\">\n\n <div class=\"c-header__group\">\n\n <h2 class=\"c-header__heading u-heading\">{{ getHeaderTitle() }}</h2>\n\n </div>\n\n <div class=\"c-header__group u-flex\">\n\n @for (element of headerService.getOrderedElements(); track element.type) {\n @if (headerService.isElementVisible(element.type)) {\n \n @switch (element.type) {\n @case (HeaderElementType.GLOBAL_ACTIONS) {\n @for (globalAction of headerService.getGlobalActions()(); track globalAction.label || $index) {\n @if (hasPermission(globalAction)) {\n @if (globalAction.isSwitch && globalAction.switchOptions) {\n <core-generic-switch\n [options]=\"globalAction.switchOptions\"\n [selectedValue]=\"globalAction.switchSelectedValue\"\n [ariaLabel]=\"globalAction.switchAriaLabel || globalAction.label || 'Switch options'\"\n (valueChange)=\"onGlobalSwitchChange($event, globalAction)\">\n </core-generic-switch>\n } @else {\n <core-generic-button \n [config]=\"getGlobalActionButtonConfig(globalAction)\"\n (buttonClick)=\"onGlobalButtonClick($event, globalAction)\">\n </core-generic-button>\n }\n }\n }\n }\n \n @case (HeaderElementType.CUSTOM_ACTIONS) {\n @for (customAction of headerService.getCustomActions()(); track customAction.id) {\n @if (isCustomActionVisible(customAction)) {\n <core-generic-button \n [config]=\"getCustomActionButtonConfig(customAction)\"\n (buttonClick)=\"onCustomButtonClick($event, customAction)\">\n </core-generic-button>\n }\n }\n }\n \n @case (HeaderElementType.FILTER) {\n <core-generic-button \n [config]=\"getFilterButtonConfig()\"\n (buttonClick)=\"onFilterButtonClick()\">\n </core-generic-button>\n }\n \n @case (HeaderElementType.CREATE) {\n <core-generic-button \n [config]=\"getCreateButtonConfig()\"\n (buttonClick)=\"onCreateButtonClick()\">\n </core-generic-button>\n }\n }\n \n }\n }\n\n </div>\n\n </div>\n\n <p class=\"c-header__text u-text\" *ngIf=\"getHeaderText()\">\n {{ getHeaderText() }}\n </p>\n\n @if (\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) && \n headerService.getCustomTemplate()()\n ) {\n <ng-container [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"></ng-container>\n }\n </div>\n } @else {\n @if(\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) && \n headerService.getCustomTemplate()()\n ) {\n <ng-container [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"></ng-container>\n }\n }\n}", styles: [":root{--header-bg: #ffffff;--header-text: #333;--header-shadow: rgba(0, 0, 0, .1);--logout-btn-color: #e74c3c;--logout-btn-hover: #c0392b;--theme-btn-color: #666;--theme-btn-hover: #007bff}.dark-mode{--header-bg: #1a1a1a;--header-text: #e0e0e0;--header-shadow: rgba(255, 255, 255, .1);--logout-btn-color: #ff6b6b;--logout-btn-hover: #ff8787;--theme-btn-color: #bbb;--theme-btn-hover: #4da8ff}.header{background-color:var(--header-bg);box-shadow:0 2px 4px var(--header-shadow);padding:15px 20px;display:flex;justify-content:space-between;align-items:center}.header .user-info{font-weight:500;color:var(--header-text)}.header .header-actions{display:flex;align-items:center;gap:15px}.header .theme-toggle-btn{background:none;border:none;color:var(--theme-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .theme-toggle-btn:hover{color:var(--theme-btn-hover)}.header .logout-btn{background:none;border:none;color:var(--logout-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .logout-btn i{margin-right:5px}.header .logout-btn:hover{color:var(--logout-btn-hover)}\n"] }]
|
|
14713
15190
|
}], ctorParameters: () => [] });
|
|
14714
15191
|
|
|
15192
|
+
class MobileHeaderComponent {
|
|
15193
|
+
mobileResolutionService = inject(MobileResolutionService);
|
|
15194
|
+
headerService = inject(HeaderService);
|
|
15195
|
+
config = input.required();
|
|
15196
|
+
menuClick = output();
|
|
15197
|
+
refreshClick = output();
|
|
15198
|
+
filterClick = output();
|
|
15199
|
+
isMobile = this.mobileResolutionService.isMobile;
|
|
15200
|
+
shouldShowRefreshButton = computed(() => {
|
|
15201
|
+
const config = this.config();
|
|
15202
|
+
if (config.showRefreshButton !== undefined) {
|
|
15203
|
+
return config.showRefreshButton;
|
|
15204
|
+
}
|
|
15205
|
+
return !!this.headerService.getRefreshCallback()();
|
|
15206
|
+
});
|
|
15207
|
+
shouldShowFilterButton = computed(() => {
|
|
15208
|
+
const config = this.config();
|
|
15209
|
+
if (config.showFilterButton !== undefined) {
|
|
15210
|
+
return config.showFilterButton;
|
|
15211
|
+
}
|
|
15212
|
+
return this.headerService.hasFilters();
|
|
15213
|
+
});
|
|
15214
|
+
onMenuClick() {
|
|
15215
|
+
this.menuClick.emit();
|
|
15216
|
+
}
|
|
15217
|
+
onRefreshClick() {
|
|
15218
|
+
this.refreshClick.emit();
|
|
15219
|
+
}
|
|
15220
|
+
onFilterClick() {
|
|
15221
|
+
this.filterClick.emit();
|
|
15222
|
+
}
|
|
15223
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MobileHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15224
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: MobileHeaderComponent, isStandalone: true, selector: "core-mobile-header", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { menuClick: "menuClick", refreshClick: "refreshClick", filterClick: "filterClick" }, ngImport: i0, template: "@if (isMobile()) {\n <div class=\"c-header-mobile__holder\">\n <div class=\"c-header-mobile__row\">\n <div class=\"c-header-mobile__col\">\n <p class=\"c-header-mobile__title\">{{ config().title | translate }}</p>\n </div>\n <div class=\"c-header-mobile__col\">\n <button \n type=\"button\" \n class=\"c-header-mobile__menu icon-burger\"\n [attr.aria-label]=\"'mobile-header.menu' | translate\"\n (click)=\"onMenuClick()\">\n </button>\n </div>\n </div>\n </div>\n \n @if (shouldShowRefreshButton() || shouldShowFilterButton()) {\n <div class=\"c-header-mobile__subnav\" \n [class.c-header-mobile__subnav--light]=\"config().lightSubnav !== false\">\n <div class=\"u-flex u-flex--space-between\">\n @if (shouldShowRefreshButton()) {\n <button \n type=\"button\"\n class=\"c-btn c-btn--stroke c-btn--secondary\"\n (click)=\"onRefreshClick()\">\n <span class=\"icon-reload\"></span>\n {{ (config().refreshButtonLabel || 'mobile-header.refresh') | translate }}\n </button>\n }\n \n @if (shouldShowFilterButton()) {\n <button \n type=\"button\"\n class=\"c-btn c-btn--stroke\"\n (click)=\"onFilterClick()\">\n <span class=\"icon-filter\"></span>\n {{ (config().filterButtonLabel || 'mobile-header.filter') | translate }}\n </button>\n }\n </div>\n </div>\n }\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
15225
|
+
}
|
|
15226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MobileHeaderComponent, decorators: [{
|
|
15227
|
+
type: Component,
|
|
15228
|
+
args: [{ selector: 'core-mobile-header', standalone: true, imports: [CommonModule, TranslateModule], template: "@if (isMobile()) {\n <div class=\"c-header-mobile__holder\">\n <div class=\"c-header-mobile__row\">\n <div class=\"c-header-mobile__col\">\n <p class=\"c-header-mobile__title\">{{ config().title | translate }}</p>\n </div>\n <div class=\"c-header-mobile__col\">\n <button \n type=\"button\" \n class=\"c-header-mobile__menu icon-burger\"\n [attr.aria-label]=\"'mobile-header.menu' | translate\"\n (click)=\"onMenuClick()\">\n </button>\n </div>\n </div>\n </div>\n \n @if (shouldShowRefreshButton() || shouldShowFilterButton()) {\n <div class=\"c-header-mobile__subnav\" \n [class.c-header-mobile__subnav--light]=\"config().lightSubnav !== false\">\n <div class=\"u-flex u-flex--space-between\">\n @if (shouldShowRefreshButton()) {\n <button \n type=\"button\"\n class=\"c-btn c-btn--stroke c-btn--secondary\"\n (click)=\"onRefreshClick()\">\n <span class=\"icon-reload\"></span>\n {{ (config().refreshButtonLabel || 'mobile-header.refresh') | translate }}\n </button>\n }\n \n @if (shouldShowFilterButton()) {\n <button \n type=\"button\"\n class=\"c-btn c-btn--stroke\"\n (click)=\"onFilterClick()\">\n <span class=\"icon-filter\"></span>\n {{ (config().filterButtonLabel || 'mobile-header.filter') | translate }}\n </button>\n }\n </div>\n </div>\n }\n}\n" }]
|
|
15229
|
+
}] });
|
|
15230
|
+
|
|
14715
15231
|
var PermissionsActions;
|
|
14716
15232
|
(function (PermissionsActions) {
|
|
14717
15233
|
PermissionsActions["WRITE"] = "W";
|
|
@@ -14786,12 +15302,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
14786
15302
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
14787
15303
|
// No edites manualmente este archivo
|
|
14788
15304
|
const VERSION = {
|
|
14789
|
-
full: '2.15.
|
|
15305
|
+
full: '2.15.2',
|
|
14790
15306
|
major: 2,
|
|
14791
15307
|
minor: 15,
|
|
14792
|
-
patch:
|
|
14793
|
-
timestamp: '2025-10-
|
|
14794
|
-
buildDate: '
|
|
15308
|
+
patch: 2,
|
|
15309
|
+
timestamp: '2025-10-10T15:29:20.165Z',
|
|
15310
|
+
buildDate: '10/10/2025'
|
|
14795
15311
|
};
|
|
14796
15312
|
|
|
14797
15313
|
class MainNavComponent {
|
|
@@ -14799,6 +15315,7 @@ class MainNavComponent {
|
|
|
14799
15315
|
mainNavService = inject(MainNavService);
|
|
14800
15316
|
authService = inject(AuthService);
|
|
14801
15317
|
router = inject(Router);
|
|
15318
|
+
mobileResolutionService = inject(MobileResolutionService);
|
|
14802
15319
|
isCollapsed = false;
|
|
14803
15320
|
isMobile = false;
|
|
14804
15321
|
isBottomNavOpen = false;
|
|
@@ -15016,6 +15533,22 @@ class MainNavComponent {
|
|
|
15016
15533
|
}
|
|
15017
15534
|
}
|
|
15018
15535
|
}
|
|
15536
|
+
toggleMobileNav() {
|
|
15537
|
+
if (!this.isMobile)
|
|
15538
|
+
return;
|
|
15539
|
+
this.isBottomNavOpen = !this.isBottomNavOpen;
|
|
15540
|
+
if (this.isBottomNavOpen) {
|
|
15541
|
+
document.body.classList.add('bottom-nav-open');
|
|
15542
|
+
document.documentElement.classList.add('nav-expanded');
|
|
15543
|
+
}
|
|
15544
|
+
else {
|
|
15545
|
+
document.body.classList.add('bottom-nav-closing');
|
|
15546
|
+
setTimeout(() => {
|
|
15547
|
+
document.body.classList.remove('bottom-nav-open');
|
|
15548
|
+
document.body.classList.remove('bottom-nav-closing');
|
|
15549
|
+
}, 700);
|
|
15550
|
+
}
|
|
15551
|
+
}
|
|
15019
15552
|
onBottomNavItemClick(item) {
|
|
15020
15553
|
if (item.disabled)
|
|
15021
15554
|
return;
|
|
@@ -15049,7 +15582,7 @@ class MainNavComponent {
|
|
|
15049
15582
|
return classes;
|
|
15050
15583
|
}
|
|
15051
15584
|
checkIfMobile() {
|
|
15052
|
-
this.isMobile = window.innerWidth <=
|
|
15585
|
+
this.isMobile = window.innerWidth <= this.mobileResolutionService.breakpoint();
|
|
15053
15586
|
}
|
|
15054
15587
|
setupResizeListener() {
|
|
15055
15588
|
window.addEventListener('resize', this.onResize.bind(this));
|
|
@@ -15070,11 +15603,11 @@ class MainNavComponent {
|
|
|
15070
15603
|
});
|
|
15071
15604
|
}
|
|
15072
15605
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MainNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15073
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: MainNavComponent, isStandalone: true, selector: "core-main-nav", inputs: { navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null }, appVersion: { classPropertyName: "appVersion", publicName: "appVersion", isSignal: true, isRequired: false, transformFunction: null }, navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, isProduction: { classPropertyName: "isProduction", publicName: "isProduction", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout" }, usesOnChanges: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "\n<!-- ! Refactor: Start -->\n<div class=\"c-nav-overlay\" (click)=\"toggleBottomNav()\"></div>\n<div class=\"o-layout__nav c-main-nav\"> <!-- [ngClass]=\"{'nav-expanded': !isCollapsed}\"> -->\n <div class=\"c-main-nav__viewport\">\n\n <!-- Toggle btn -->\n <button (click)=\"onToggleSidebar()\"\n class=\"c-main-nav__toggle c-mn-toggle\"\n [title]=\"isCollapsed ? ('Expandir navegaci\u00F3n' | translate) : ('Colapsar navegaci\u00F3n' | translate )\"\n aria-label=\"Expandir navegaci\u00F3n\"\n ></button>\n\n <!-- Brand -->\n @if(navConfig().showLogo !== false) {\n <div class=\"c-main-nav__brand c-mn-brand\">\n @if(getCollapsedLogoSrc()) {\n <img class=\"c-mn-brand__iso\" \n [src]=\"getCollapsedLogoSrc()\" \n [width]=\"getCollapsedLogoSettings().width\" \n [height]=\"getCollapsedLogoSettings().height\" \n [alt]=\"getCollapsedLogoSettings().alt\">\n }\n @if(getExpandedLogoSrc()) {\n <img class=\"c-mn-brand__logo\" \n [src]=\"getExpandedLogoSrc()\" \n [width]=\"getExpandedLogoSettings().width\" \n [height]=\"getExpandedLogoSettings().height\" \n [alt]=\"getExpandedLogoSettings().alt\">\n }\n </div>\n }\n\n <!-- Nav -->\n <nav class=\"c-main-nav__nav c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n\n <ng-template #menuItems let-items=\"items\" let-level=\"level\">\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container *ngIf=\"hasPermission(item) && !item.hidden && (!item.children || hasVisibleChildren(item))\">\n\n <li class=\"c-mn-nav__item c-mn-nav__submenu\"\n [ngClass]=\"{'is-expanded': isSectionExpanded(item.label, level)}\"\n *ngIf=\"item.children && hasVisibleChildren(item); else singleLink\"\n >\n \n <button class=\"c-mn-nav__link\"\n [ngClass]=\"{'is-active': isParentActive(item)}\"\n (click)=\"toggleSection(item.label, level)\"\n [title]=\"isCollapsed ? (item.label | translate) : ''\">\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n <span class=\"c-mn-nav__plus\"></span>\n </span>\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let child of item.children; let j = index\">\n <ng-container *ngIf=\"hasPermission(child) && !child.hidden && (!child.children || hasVisibleChildren(child))\">\n\n <ng-container *ngIf=\"!child.children; else nestedChild\">\n\n <li class=\"c-mn-nav__subitem\">\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"child.disabled ? null : child.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n [ngClass]=\"{'is-disabled': child.disabled}\"\n [style.pointer-events]=\"child.disabled ? 'none' : 'auto'\"\n [style.opacity]=\"child.disabled ? '0.5' : '1'\"\n >\n {{ child.label | translate }}\n </button>\n </li>\n </ng-container>\n\n <ng-template #nestedChild>\n \n <li class=\"c-mn-nav__subitem\"\n [ngClass]=\"{'submenu-open': isSectionExpanded(child.label, level + 1) && !isCollapsed}\"\n *ngIf=\"child.children && hasVisibleChildren(child)\"\n >\n <button class=\"c-mn-nav__sublink\"\n [ngClass]=\"{'is-active': isParentActive(child)}\"\n (click)=\"toggleSection(child.label, level + 1)\"\n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n >\n {{ child.label | translate }}\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let subItem of child.children\">\n <li class=\"c-mn-nav__subitem\"\n *ngIf=\"hasPermission(subItem) && !subItem.hidden\"\n >\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"subItem.path\"\n routerLinkActive=\"is-active\"\n >\n {{ subItem.label | translate }}\n </button>\n </li>\n </ng-container>\n\n </ul>\n </div>\n </li>\n </ng-template>\n\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </li>\n\n <ng-template #singleLink>\n\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n [routerLink]=\"item.disabled ? null : item.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (item.label | translate) : ''\" \n [ngClass]=\"{'is-disabled': item.disabled}\"\n [disabled]=\"item.disabled\"\n [style.opacity]=\"item.disabled ? '0.5' : '1'\"\n >\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n </span>\n </button>\n </li>\n </ng-template>\n\n\n </ng-container>\n </ng-container>\n </ng-template>\n \n <ng-container *ngTemplateOutlet=\"menuItems; context: { items: navItems(), level: 0 }\"></ng-container>\n\n </ul>\n </nav> <!-- .c-mn-nav -->\n\n <!-- TODO User -->\n\n <nav class=\"c-main-nav__bottom c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n (click)=\"logout()\"\n [title]=\"isCollapsed ? ('sidebar.logout' | translate) : ''\"\n >\n <span class=\"c-mn-nav__icon icon-logout\"></span>\n <span class=\"c-mn-nav__text\">\n {{ 'sidebar.logout' | translate }}\n </span>\n </button>\n </li>\n @if(navConfig().showVersion !== false) {\n <li class=\"c-mn-nav__version\">\n v{{ appVersion().full }}\n </li>\n }\n </ul>\n </nav>\n\n </div> <!-- .c-main-nav__viewport -->\n</div> <!-- .c-main-nav -->\n\n<!-- ! Refactor: End -->\n\n<nav class=\"c-bottom-nav\">\n <h2 class=\"u-hidden\"></h2>\n <ul class=\"c-bottom-nav__list\">\n <ng-container *ngFor=\"let item of bottomNavItems().slice(0, 2); let i = index\">\n <li class=\"c-bottom-nav__item\"\n [ngClass]=\"{\n 'is-active': item.isActive,\n 'c-bottom-nav__item--highlighted': item.isHighlighted\n }\">\n <button type=\"button\" \n [ngClass]=\"getBottomNavClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onBottomNavItemClick(item)\">\n </button>\n </li>\n </ng-container>\n\n <ng-container *ngIf=\"bottomNavItems().length > 2\">\n <li class=\"c-bottom-nav__item c-bottom-nav__item--center\"\n [ngClass]=\"{\n 'is-active': bottomNavItems()[2].isActive,\n 'c-bottom-nav__item--highlighted': bottomNavItems()[2].isHighlighted\n }\">\n <button type=\"button\" \n [ngClass]=\"getBottomNavClasses(bottomNavItems()[2])\"\n [disabled]=\"bottomNavItems()[2].disabled\"\n (click)=\"toggleBottomNav()\">\n </button>\n </li>\n </ng-container>\n\n <ng-container *ngFor=\"let item of bottomNavItems().slice(3, 5); let i = index\">\n <li class=\"c-bottom-nav__item\"\n [ngClass]=\"{\n 'is-active': item.isActive,\n 'c-bottom-nav__item--highlighted': item.isHighlighted\n }\">\n <button type=\"button\" \n [ngClass]=\"getBottomNavClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onBottomNavItemClick(item)\">\n </button>\n </li>\n </ng-container>\n </ul>\n</nav>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }] });
|
|
15606
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: MainNavComponent, isStandalone: true, selector: "core-main-nav", inputs: { navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null }, appVersion: { classPropertyName: "appVersion", publicName: "appVersion", isSignal: true, isRequired: false, transformFunction: null }, navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, isProduction: { classPropertyName: "isProduction", publicName: "isProduction", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout" }, usesOnChanges: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "\n<!-- ! Refactor: Start -->\n<div class=\"c-nav-overlay\" (click)=\"toggleMobileNav()\"></div>\n<div class=\"o-layout__nav c-main-nav\"> <!-- [ngClass]=\"{'nav-expanded': !isCollapsed}\"> -->\n <div class=\"c-main-nav__viewport\">\n\n <!-- Toggle btn -->\n <button (click)=\"onToggleSidebar()\"\n class=\"c-main-nav__toggle c-mn-toggle\"\n [title]=\"isCollapsed ? ('Expandir navegaci\u00F3n' | translate) : ('Colapsar navegaci\u00F3n' | translate )\"\n aria-label=\"Expandir navegaci\u00F3n\"\n ></button>\n\n <!-- Brand -->\n @if(navConfig().showLogo !== false) {\n <div class=\"c-main-nav__brand c-mn-brand\">\n @if(getCollapsedLogoSrc()) {\n <img class=\"c-mn-brand__iso\" \n [src]=\"getCollapsedLogoSrc()\" \n [width]=\"getCollapsedLogoSettings().width\" \n [height]=\"getCollapsedLogoSettings().height\" \n [alt]=\"getCollapsedLogoSettings().alt\">\n }\n @if(getExpandedLogoSrc()) {\n <img class=\"c-mn-brand__logo\" \n [src]=\"getExpandedLogoSrc()\" \n [width]=\"getExpandedLogoSettings().width\" \n [height]=\"getExpandedLogoSettings().height\" \n [alt]=\"getExpandedLogoSettings().alt\">\n }\n </div>\n }\n\n <!-- Nav -->\n <nav class=\"c-main-nav__nav c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n\n <ng-template #menuItems let-items=\"items\" let-level=\"level\">\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container *ngIf=\"hasPermission(item) && !item.hidden && (!item.children || hasVisibleChildren(item))\">\n\n <li class=\"c-mn-nav__item c-mn-nav__submenu\"\n [ngClass]=\"{'is-expanded': isSectionExpanded(item.label, level)}\"\n *ngIf=\"item.children && hasVisibleChildren(item); else singleLink\"\n >\n \n <button class=\"c-mn-nav__link\"\n [ngClass]=\"{'is-active': isParentActive(item)}\"\n (click)=\"toggleSection(item.label, level)\"\n [title]=\"isCollapsed ? (item.label | translate) : ''\">\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n <span class=\"c-mn-nav__plus\"></span>\n </span>\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let child of item.children; let j = index\">\n <ng-container *ngIf=\"hasPermission(child) && !child.hidden && (!child.children || hasVisibleChildren(child))\">\n\n <ng-container *ngIf=\"!child.children; else nestedChild\">\n\n <li class=\"c-mn-nav__subitem\">\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"child.disabled ? null : child.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n [ngClass]=\"{'is-disabled': child.disabled}\"\n [style.pointer-events]=\"child.disabled ? 'none' : 'auto'\"\n [style.opacity]=\"child.disabled ? '0.5' : '1'\"\n >\n {{ child.label | translate }}\n </button>\n </li>\n </ng-container>\n\n <ng-template #nestedChild>\n \n <li class=\"c-mn-nav__subitem\"\n [ngClass]=\"{'submenu-open': isSectionExpanded(child.label, level + 1) && !isCollapsed}\"\n *ngIf=\"child.children && hasVisibleChildren(child)\"\n >\n <button class=\"c-mn-nav__sublink\"\n [ngClass]=\"{'is-active': isParentActive(child)}\"\n (click)=\"toggleSection(child.label, level + 1)\"\n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n >\n {{ child.label | translate }}\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let subItem of child.children\">\n <li class=\"c-mn-nav__subitem\"\n *ngIf=\"hasPermission(subItem) && !subItem.hidden\"\n >\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"subItem.path\"\n routerLinkActive=\"is-active\"\n >\n {{ subItem.label | translate }}\n </button>\n </li>\n </ng-container>\n\n </ul>\n </div>\n </li>\n </ng-template>\n\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </li>\n\n <ng-template #singleLink>\n\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n [routerLink]=\"item.disabled ? null : item.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (item.label | translate) : ''\" \n [ngClass]=\"{'is-disabled': item.disabled}\"\n [disabled]=\"item.disabled\"\n [style.opacity]=\"item.disabled ? '0.5' : '1'\"\n >\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n </span>\n </button>\n </li>\n </ng-template>\n\n\n </ng-container>\n </ng-container>\n </ng-template>\n \n <ng-container *ngTemplateOutlet=\"menuItems; context: { items: navItems(), level: 0 }\"></ng-container>\n\n </ul>\n </nav> <!-- .c-mn-nav -->\n\n <!-- TODO User -->\n\n <nav class=\"c-main-nav__bottom c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n (click)=\"logout()\"\n [title]=\"isCollapsed ? ('sidebar.logout' | translate) : ''\"\n >\n <span class=\"c-mn-nav__icon icon-logout\"></span>\n <span class=\"c-mn-nav__text\">\n {{ 'sidebar.logout' | translate }}\n </span>\n </button>\n </li>\n @if(navConfig().showVersion !== false) {\n <li class=\"c-mn-nav__version\">\n v{{ appVersion().full }}\n </li>\n }\n </ul>\n </nav>\n\n </div> <!-- .c-main-nav__viewport -->\n</div> <!-- .c-main-nav -->\n\n<!-- ! Refactor: End -->\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }] });
|
|
15074
15607
|
}
|
|
15075
15608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MainNavComponent, decorators: [{
|
|
15076
15609
|
type: Component,
|
|
15077
|
-
args: [{ selector: 'core-main-nav', standalone: true, imports: [CommonModule, TranslateModule, RouterModule, IconCompatPipe], hostDirectives: [CoreHostDirective], template: "\n<!-- ! Refactor: Start -->\n<div class=\"c-nav-overlay\" (click)=\"
|
|
15610
|
+
args: [{ selector: 'core-main-nav', standalone: true, imports: [CommonModule, TranslateModule, RouterModule, IconCompatPipe], hostDirectives: [CoreHostDirective], template: "\n<!-- ! Refactor: Start -->\n<div class=\"c-nav-overlay\" (click)=\"toggleMobileNav()\"></div>\n<div class=\"o-layout__nav c-main-nav\"> <!-- [ngClass]=\"{'nav-expanded': !isCollapsed}\"> -->\n <div class=\"c-main-nav__viewport\">\n\n <!-- Toggle btn -->\n <button (click)=\"onToggleSidebar()\"\n class=\"c-main-nav__toggle c-mn-toggle\"\n [title]=\"isCollapsed ? ('Expandir navegaci\u00F3n' | translate) : ('Colapsar navegaci\u00F3n' | translate )\"\n aria-label=\"Expandir navegaci\u00F3n\"\n ></button>\n\n <!-- Brand -->\n @if(navConfig().showLogo !== false) {\n <div class=\"c-main-nav__brand c-mn-brand\">\n @if(getCollapsedLogoSrc()) {\n <img class=\"c-mn-brand__iso\" \n [src]=\"getCollapsedLogoSrc()\" \n [width]=\"getCollapsedLogoSettings().width\" \n [height]=\"getCollapsedLogoSettings().height\" \n [alt]=\"getCollapsedLogoSettings().alt\">\n }\n @if(getExpandedLogoSrc()) {\n <img class=\"c-mn-brand__logo\" \n [src]=\"getExpandedLogoSrc()\" \n [width]=\"getExpandedLogoSettings().width\" \n [height]=\"getExpandedLogoSettings().height\" \n [alt]=\"getExpandedLogoSettings().alt\">\n }\n </div>\n }\n\n <!-- Nav -->\n <nav class=\"c-main-nav__nav c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n\n <ng-template #menuItems let-items=\"items\" let-level=\"level\">\n <ng-container *ngFor=\"let item of items; let i = index\">\n <ng-container *ngIf=\"hasPermission(item) && !item.hidden && (!item.children || hasVisibleChildren(item))\">\n\n <li class=\"c-mn-nav__item c-mn-nav__submenu\"\n [ngClass]=\"{'is-expanded': isSectionExpanded(item.label, level)}\"\n *ngIf=\"item.children && hasVisibleChildren(item); else singleLink\"\n >\n \n <button class=\"c-mn-nav__link\"\n [ngClass]=\"{'is-active': isParentActive(item)}\"\n (click)=\"toggleSection(item.label, level)\"\n [title]=\"isCollapsed ? (item.label | translate) : ''\">\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n <span class=\"c-mn-nav__plus\"></span>\n </span>\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let child of item.children; let j = index\">\n <ng-container *ngIf=\"hasPermission(child) && !child.hidden && (!child.children || hasVisibleChildren(child))\">\n\n <ng-container *ngIf=\"!child.children; else nestedChild\">\n\n <li class=\"c-mn-nav__subitem\">\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"child.disabled ? null : child.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n [ngClass]=\"{'is-disabled': child.disabled}\"\n [style.pointer-events]=\"child.disabled ? 'none' : 'auto'\"\n [style.opacity]=\"child.disabled ? '0.5' : '1'\"\n >\n {{ child.label | translate }}\n </button>\n </li>\n </ng-container>\n\n <ng-template #nestedChild>\n \n <li class=\"c-mn-nav__subitem\"\n [ngClass]=\"{'submenu-open': isSectionExpanded(child.label, level + 1) && !isCollapsed}\"\n *ngIf=\"child.children && hasVisibleChildren(child)\"\n >\n <button class=\"c-mn-nav__sublink\"\n [ngClass]=\"{'is-active': isParentActive(child)}\"\n (click)=\"toggleSection(child.label, level + 1)\"\n [title]=\"isCollapsed ? (child.label | translate) : ''\"\n >\n {{ child.label | translate }}\n </button>\n\n <div class=\"c-mn-nav__subholder\">\n <ul class=\"c-mn-nav__sublist\">\n\n <ng-container *ngFor=\"let subItem of child.children\">\n <li class=\"c-mn-nav__subitem\"\n *ngIf=\"hasPermission(subItem) && !subItem.hidden\"\n >\n <button class=\"c-mn-nav__sublink\"\n [routerLink]=\"subItem.path\"\n routerLinkActive=\"is-active\"\n >\n {{ subItem.label | translate }}\n </button>\n </li>\n </ng-container>\n\n </ul>\n </div>\n </li>\n </ng-template>\n\n </ng-container>\n </ng-container>\n </ul>\n </div>\n </li>\n\n <ng-template #singleLink>\n\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n [routerLink]=\"item.disabled ? null : item.path\" \n routerLinkActive=\"is-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\" \n [title]=\"isCollapsed ? (item.label | translate) : ''\" \n [ngClass]=\"{'is-disabled': item.disabled}\"\n [disabled]=\"item.disabled\"\n [style.opacity]=\"item.disabled ? '0.5' : '1'\"\n >\n <span class=\"c-mn-nav__icon\" [ngClass]=\"item.icon | coreIconCompat\"></span>\n <span class=\"c-mn-nav__text\">\n {{ item.label | translate }}\n </span>\n </button>\n </li>\n </ng-template>\n\n\n </ng-container>\n </ng-container>\n </ng-template>\n \n <ng-container *ngTemplateOutlet=\"menuItems; context: { items: navItems(), level: 0 }\"></ng-container>\n\n </ul>\n </nav> <!-- .c-mn-nav -->\n\n <!-- TODO User -->\n\n <nav class=\"c-main-nav__bottom c-mn-nav\">\n <ul class=\"c-mn-nav__list\">\n <li class=\"c-mn-nav__item\">\n <button class=\"c-mn-nav__link\"\n (click)=\"logout()\"\n [title]=\"isCollapsed ? ('sidebar.logout' | translate) : ''\"\n >\n <span class=\"c-mn-nav__icon icon-logout\"></span>\n <span class=\"c-mn-nav__text\">\n {{ 'sidebar.logout' | translate }}\n </span>\n </button>\n </li>\n @if(navConfig().showVersion !== false) {\n <li class=\"c-mn-nav__version\">\n v{{ appVersion().full }}\n </li>\n }\n </ul>\n </nav>\n\n </div> <!-- .c-main-nav__viewport -->\n</div> <!-- .c-main-nav -->\n\n<!-- ! Refactor: End -->\n\n" }]
|
|
15078
15611
|
}], ctorParameters: () => [] });
|
|
15079
15612
|
|
|
15080
15613
|
class LayoutStateService {
|
|
@@ -15544,7 +16077,10 @@ class LayoutComponent {
|
|
|
15544
16077
|
expandedLogo = input('');
|
|
15545
16078
|
logoImagesConfig = input(null);
|
|
15546
16079
|
navConfig = input({});
|
|
16080
|
+
mobileHeaderConfig = input(null);
|
|
15547
16081
|
onLogout = output();
|
|
16082
|
+
onMobileRefresh = output();
|
|
16083
|
+
onMobileFilter = output();
|
|
15548
16084
|
dialogService = inject(ConfirmationDialogService);
|
|
15549
16085
|
mainNavService = inject(MainNavService);
|
|
15550
16086
|
layoutService = inject(LayoutService);
|
|
@@ -15552,12 +16088,16 @@ class LayoutComponent {
|
|
|
15552
16088
|
sidebarMobileModalService = inject(SidebarMobileModalService);
|
|
15553
16089
|
templateRegistry = inject(SidebarTemplateRegistryService);
|
|
15554
16090
|
headerService = inject(HeaderService);
|
|
16091
|
+
mobileResolutionService = inject(MobileResolutionService);
|
|
15555
16092
|
SidebarVisibility = SidebarVisibility;
|
|
15556
16093
|
ModalMode = ModalMode;
|
|
15557
16094
|
SidebarMobileType = SidebarMobileType;
|
|
15558
16095
|
screenWidth = signal(typeof window !== 'undefined' ? window.innerWidth : 1024);
|
|
15559
16096
|
isSidebarCollapsed = false;
|
|
15560
16097
|
isHeaderVisible = false;
|
|
16098
|
+
isMobile = this.mobileResolutionService.isMobile;
|
|
16099
|
+
shouldShowMobileHeader = this.mobileResolutionService.shouldShowMobileHeader;
|
|
16100
|
+
mainNavComponent;
|
|
15561
16101
|
get leftSidebarConfig() {
|
|
15562
16102
|
return this.layoutStateService.getLeftSidebarConfig()();
|
|
15563
16103
|
}
|
|
@@ -15583,7 +16123,7 @@ class LayoutComponent {
|
|
|
15583
16123
|
}
|
|
15584
16124
|
isMobileView(config) {
|
|
15585
16125
|
const responsiveConfig = config?.responsiveConfig;
|
|
15586
|
-
const maxBreakpoint = responsiveConfig?.maxMobileBreakpoint ??
|
|
16126
|
+
const maxBreakpoint = responsiveConfig?.maxMobileBreakpoint ?? this.mobileResolutionService.breakpoint();
|
|
15587
16127
|
const minBreakpoint = responsiveConfig?.minMobileBreakpoint ?? 0;
|
|
15588
16128
|
return this.screenWidth() <= maxBreakpoint && this.screenWidth() >= minBreakpoint;
|
|
15589
16129
|
}
|
|
@@ -15663,6 +16203,21 @@ class LayoutComponent {
|
|
|
15663
16203
|
const event = new CustomEvent('globalActionTriggered', { detail: action });
|
|
15664
16204
|
window.dispatchEvent(event);
|
|
15665
16205
|
}
|
|
16206
|
+
onMobileMenuClick() {
|
|
16207
|
+
this.mainNavComponent?.toggleMobileNav();
|
|
16208
|
+
}
|
|
16209
|
+
onMobileRefreshClick() {
|
|
16210
|
+
const refreshCallback = this.headerService.getRefreshCallback()();
|
|
16211
|
+
if (refreshCallback) {
|
|
16212
|
+
refreshCallback();
|
|
16213
|
+
}
|
|
16214
|
+
this.onMobileRefresh.emit();
|
|
16215
|
+
}
|
|
16216
|
+
onMobileFilterClick() {
|
|
16217
|
+
const event = new CustomEvent('filterRequested');
|
|
16218
|
+
window.dispatchEvent(event);
|
|
16219
|
+
this.onMobileFilter.emit();
|
|
16220
|
+
}
|
|
15666
16221
|
setLeftSidebarConfig(config) {
|
|
15667
16222
|
this.layoutStateService.setLeftSidebarConfig(config);
|
|
15668
16223
|
}
|
|
@@ -15713,13 +16268,14 @@ class LayoutComponent {
|
|
|
15713
16268
|
this.onLogout.emit();
|
|
15714
16269
|
}
|
|
15715
16270
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutComponent, isStandalone: true, selector: "core-layout", inputs: { navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout" }, host: { listeners: { "window:resize": "onResize($event)" } }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(layoutStateService.isHeaderVisible$() | async) {\n <core-header\n
|
|
16271
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutComponent, isStandalone: true, selector: "core-layout", inputs: { navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null }, mobileHeaderConfig: { classPropertyName: "mobileHeaderConfig", publicName: "mobileHeaderConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout", onMobileRefresh: "onMobileRefresh", onMobileFilter: "onMobileFilter" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "mainNavComponent", first: true, predicate: MainNavComponent, descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(shouldShowMobileHeader() && mobileHeaderConfig()) {\n <core-mobile-header\n class=\"o-layout__header c-header-mobile\"\n [config]=\"mobileHeaderConfig()!\"\n (menuClick)=\"onMobileMenuClick()\"\n (refreshClick)=\"onMobileRefreshClick()\"\n (filterClick)=\"onMobileFilterClick()\">\n </core-mobile-header>\n }\n\n @if(layoutStateService.isHeaderVisible$() | async) {\n @if(!shouldShowMobileHeader()) {\n <core-header\n [class]=\"getHeaderClasses()\"\n (filterRequested)=\"onFilterRequested()\"\n (createRequested)=\"onCreateRequested()\"\n (globalActionTriggered)=\"onGlobalActionTriggered($event)\">\n </core-header>\n }\n }\n\n @if(layoutService.sidebarLeft().visibility === SidebarVisibility.SHOW && leftSidebarConfig && shouldRenderLeftSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--left\"\n [config]=\"leftSidebarConfig\">\n </core-generic-sidebar>\n }\n\n <ng-content></ng-content>\n\n @if(layoutService.sidebarRight().visibility === SidebarVisibility.SHOW && rightSidebarConfig && shouldRenderRightSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--right\"\n [config]=\"rightSidebarConfig\">\n </core-generic-sidebar>\n }\n\n\n @if(dialogService.isOpen$()) {\n <core-confirmation-dialog\n [isOpen]=\"dialogService.isOpen$()\"\n [config]=\"dialogService.config$()\"\n (confirm)=\"dialogService.confirm($event)\"\n (cancel)=\"dialogService.cancel()\"\n ></core-confirmation-dialog>\n }\n\n @if(sidebarMobileModalService.isOpen()) {\n <core-generic-modal\n [isOpen]=\"sidebarMobileModalService.isOpen()\"\n [mode]=\"ModalMode.CREATE\"\n [title]=\"getSidebarModalTitle()\"\n [customTemplate]=\"sidebarModalContentTemplate\"\n (close)=\"sidebarMobileModalService.closeModal()\"\n [buttonConfig]=\"getSidebarModalButtons()\">\n </core-generic-modal>\n }\n\n </div> <!-- .o-layout__body -->\n</div> <!-- .o-layout -->\n\n<!-- Sidebar Custom Modal Global -->\n<core-sidebar-custom-modal></core-sidebar-custom-modal>\n\n<!-- Image Modal Global -->\n<core-image-modal></core-image-modal>\n\n<!-- Gallery Modal Global -->\n<core-gallery-modal></core-gallery-modal>\n\n<!-- ! Refactor: End -->", dependencies: [{ kind: "component", type: MainNavComponent, selector: "core-main-nav", inputs: ["navConfig", "appVersion", "navItems", "bottomNavItems", "isProduction", "logoImagesConfig", "collapsedLogo", "expandedLogo"], outputs: ["onLogout"] }, { kind: "component", type: HeaderComponent, selector: "core-header", outputs: ["filterRequested", "createRequested", "globalActionTriggered"] }, { kind: "component", type: MobileHeaderComponent, selector: "core-mobile-header", inputs: ["config"], outputs: ["menuClick", "refreshClick", "filterClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "component", type: ConfirmationDialogComponent, selector: "core-confirmation-dialog", inputs: ["isOpen", "config"], outputs: ["confirm", "cancel"] }, { kind: "component", type: GenericSidebarComponent, selector: "core-generic-sidebar", inputs: ["config", "position", "customTemplate"], outputs: ["itemClicked", "subItemClicked"] }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "steps", "title", "isMultiple", "customTemplate", "customViewTemplate", "finalStepTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges", "stepValidationEnabled", "allowFreeNavigation", "autoMarkCompleted"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: ImageModalComponent, selector: "core-image-modal", outputs: ["modalClosed"] }, { kind: "component", type: GalleryModalComponent, selector: "core-gallery-modal" }, { kind: "component", type: SidebarCustomModalComponent, selector: "core-sidebar-custom-modal" }] });
|
|
15717
16272
|
}
|
|
15718
16273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
15719
16274
|
type: Component,
|
|
15720
16275
|
args: [{ selector: 'core-layout', imports: [
|
|
15721
16276
|
MainNavComponent,
|
|
15722
16277
|
HeaderComponent,
|
|
16278
|
+
MobileHeaderComponent,
|
|
15723
16279
|
CommonModule,
|
|
15724
16280
|
ConfirmationDialogComponent,
|
|
15725
16281
|
GenericSidebarComponent,
|
|
@@ -15727,8 +16283,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
15727
16283
|
ImageModalComponent,
|
|
15728
16284
|
GalleryModalComponent,
|
|
15729
16285
|
SidebarCustomModalComponent
|
|
15730
|
-
], hostDirectives: [CoreHostDirective], template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(layoutStateService.isHeaderVisible$() | async) {\n <core-header\n
|
|
15731
|
-
}], propDecorators: {
|
|
16286
|
+
], hostDirectives: [CoreHostDirective], template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(shouldShowMobileHeader() && mobileHeaderConfig()) {\n <core-mobile-header\n class=\"o-layout__header c-header-mobile\"\n [config]=\"mobileHeaderConfig()!\"\n (menuClick)=\"onMobileMenuClick()\"\n (refreshClick)=\"onMobileRefreshClick()\"\n (filterClick)=\"onMobileFilterClick()\">\n </core-mobile-header>\n }\n\n @if(layoutStateService.isHeaderVisible$() | async) {\n @if(!shouldShowMobileHeader()) {\n <core-header\n [class]=\"getHeaderClasses()\"\n (filterRequested)=\"onFilterRequested()\"\n (createRequested)=\"onCreateRequested()\"\n (globalActionTriggered)=\"onGlobalActionTriggered($event)\">\n </core-header>\n }\n }\n\n @if(layoutService.sidebarLeft().visibility === SidebarVisibility.SHOW && leftSidebarConfig && shouldRenderLeftSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--left\"\n [config]=\"leftSidebarConfig\">\n </core-generic-sidebar>\n }\n\n <ng-content></ng-content>\n\n @if(layoutService.sidebarRight().visibility === SidebarVisibility.SHOW && rightSidebarConfig && shouldRenderRightSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--right\"\n [config]=\"rightSidebarConfig\">\n </core-generic-sidebar>\n }\n\n\n @if(dialogService.isOpen$()) {\n <core-confirmation-dialog\n [isOpen]=\"dialogService.isOpen$()\"\n [config]=\"dialogService.config$()\"\n (confirm)=\"dialogService.confirm($event)\"\n (cancel)=\"dialogService.cancel()\"\n ></core-confirmation-dialog>\n }\n\n @if(sidebarMobileModalService.isOpen()) {\n <core-generic-modal\n [isOpen]=\"sidebarMobileModalService.isOpen()\"\n [mode]=\"ModalMode.CREATE\"\n [title]=\"getSidebarModalTitle()\"\n [customTemplate]=\"sidebarModalContentTemplate\"\n (close)=\"sidebarMobileModalService.closeModal()\"\n [buttonConfig]=\"getSidebarModalButtons()\">\n </core-generic-modal>\n }\n\n </div> <!-- .o-layout__body -->\n</div> <!-- .o-layout -->\n\n<!-- Sidebar Custom Modal Global -->\n<core-sidebar-custom-modal></core-sidebar-custom-modal>\n\n<!-- Image Modal Global -->\n<core-image-modal></core-image-modal>\n\n<!-- Gallery Modal Global -->\n<core-gallery-modal></core-gallery-modal>\n\n<!-- ! Refactor: End -->" }]
|
|
16287
|
+
}], propDecorators: { mainNavComponent: [{
|
|
16288
|
+
type: ViewChild,
|
|
16289
|
+
args: [MainNavComponent]
|
|
16290
|
+
}], onResize: [{
|
|
15732
16291
|
type: HostListener,
|
|
15733
16292
|
args: ['window:resize', ['$event']]
|
|
15734
16293
|
}] } });
|
|
@@ -17972,6 +18531,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
17972
18531
|
args: [{ selector: 'core-generic-gallery', standalone: true, imports: [CommonModule, GenericSkeletonComponent], providers: [], template: "<div [class]=\"containerClasses()\" \n [ngStyle]=\"containerStyles()\">\n \n @if (finalConfig().layoutType === 'main-left') {\n @if (mainImage()) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(mainImage()!, 0)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(mainImage()!, 0)\">\n \n @if (isImageLoading(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading image: ' + (mainImage()!.alt || 'Main image')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(mainImage()!, 0) && !hasImageError(mainImage()!, 0)) {\n <img\n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n [title]=\"mainImage()!.title || ''\"\n [loading]=\"getImageLoading(true)\"\n (click)=\"onImageClick(mainImage()!, 0)\">\n }\n \n @if (isImageLoading(mainImage()!, 0)) {\n <img \n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(mainImage()!, 0)\"\n (error)=\"onImageError(mainImage()!, 0)\">\n }\n \n @if (hasImageError(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error al cargar imagen</span>\n </div>\n </div>\n }\n </div>\n }\n \n @if (thumbnailImages().length > 0) {\n <div class=\"c-gallery-grid__imgs-xs\">\n @for (image of thumbnailImages(); track image.id || $index; let i = $index) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(image, i + 1)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(image, i + 1)\">\n \n @if (isImageLoading(image, i + 1)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading thumbnail: ' + (image.alt || 'Thumbnail')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(image, i + 1) && !hasImageError(image, i + 1)) {\n <img\n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n [title]=\"image.title || ''\"\n [loading]=\"getImageLoading(false)\"\n (click)=\"onImageClick(image, i + 1)\">\n }\n \n @if (isImageLoading(image, i + 1)) {\n <img \n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(image, i + 1)\"\n (error)=\"onImageError(image, i + 1)\">\n }\n \n @if (hasImageError(image, i + 1)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n \n @if (finalConfig().layoutType === 'main-right') {\n @if (thumbnailImages().length > 0) {\n <div class=\"c-gallery-grid__imgs-xs\">\n @for (image of thumbnailImages(); track image.id || $index; let i = $index) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(image, i + 1)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(image, i + 1)\">\n \n @if (isImageLoading(image, i + 1)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading thumbnail: ' + (image.alt || 'Thumbnail')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(image, i + 1) && !hasImageError(image, i + 1)) {\n <img\n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n [title]=\"image.title || ''\"\n [loading]=\"getImageLoading(false)\"\n (click)=\"onImageClick(image, i + 1)\">\n }\n \n @if (isImageLoading(image, i + 1)) {\n <img \n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(image, i + 1)\"\n (error)=\"onImageError(image, i + 1)\">\n }\n \n @if (hasImageError(image, i + 1)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n \n @if (mainImage()) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(mainImage()!, 0)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(mainImage()!, 0)\">\n \n @if (isImageLoading(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading image: ' + (mainImage()!.alt || 'Main image')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(mainImage()!, 0) && !hasImageError(mainImage()!, 0)) {\n <img\n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n [title]=\"mainImage()!.title || ''\"\n [loading]=\"getImageLoading(true)\"\n (click)=\"onImageClick(mainImage()!, 0)\">\n }\n \n @if (isImageLoading(mainImage()!, 0)) {\n <img \n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(mainImage()!, 0)\"\n (error)=\"onImageError(mainImage()!, 0)\">\n }\n \n @if (hasImageError(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error al cargar imagen</span>\n </div>\n </div>\n }\n </div>\n }\n }\n \n @if (finalConfig().layoutType === 'main-top') {\n @if (mainImage()) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(mainImage()!, 0)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(mainImage()!, 0)\">\n \n @if (isImageLoading(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading image: ' + (mainImage()!.alt || 'Main image')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(mainImage()!, 0) && !hasImageError(mainImage()!, 0)) {\n <img\n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n [title]=\"mainImage()!.title || ''\"\n [loading]=\"getImageLoading(true)\"\n (click)=\"onImageClick(mainImage()!, 0)\">\n }\n \n @if (isImageLoading(mainImage()!, 0)) {\n <img \n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(mainImage()!, 0)\"\n (error)=\"onImageError(mainImage()!, 0)\">\n }\n \n @if (hasImageError(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error al cargar imagen</span>\n </div>\n </div>\n }\n </div>\n }\n \n @if (thumbnailImages().length > 0) {\n <div class=\"c-gallery-grid__imgs-xs\">\n @for (image of thumbnailImages(); track image.id || $index; let i = $index) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(image, i + 1)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(image, i + 1)\">\n \n @if (isImageLoading(image, i + 1)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading thumbnail: ' + (image.alt || 'Thumbnail')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(image, i + 1) && !hasImageError(image, i + 1)) {\n <img\n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n [title]=\"image.title || ''\"\n [loading]=\"getImageLoading(false)\"\n (click)=\"onImageClick(image, i + 1)\">\n }\n \n @if (isImageLoading(image, i + 1)) {\n <img \n [src]=\"image.thumbnail || image.src\"\n [alt]=\"image.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(image, i + 1)\"\n (error)=\"onImageError(image, i + 1)\">\n }\n \n @if (hasImageError(image, i + 1)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n }\n\n @if (finalConfig().layoutType === 'single') {\n @if (mainImage()) {\n <div class=\"c-gallery-grid__img\" \n [class.c-gallery-grid__img--loading]=\"isImageLoading(mainImage()!, 0)\"\n [class.c-gallery-grid__img--error]=\"hasImageError(mainImage()!, 0)\">\n \n @if (isImageLoading(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__skeleton\">\n <core-generic-skeleton \n [type]=\"SkeletonType.IMAGE\"\n width=\"100%\"\n height=\"100%\"\n [animation]=\"SkeletonAnimation.SHIMMER\"\n [ariaLabel]=\"'Loading image: ' + (mainImage()!.alt || 'Single image')\">\n </core-generic-skeleton>\n </div>\n }\n \n @if (!isImageLoading(mainImage()!, 0) && !hasImageError(mainImage()!, 0)) {\n <img\n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n [title]=\"mainImage()!.title || ''\"\n [loading]=\"getImageLoading(true)\"\n (click)=\"onImageClick(mainImage()!, 0)\">\n }\n \n @if (isImageLoading(mainImage()!, 0)) {\n <img \n [src]=\"mainImage()!.src\"\n [alt]=\"mainImage()!.alt || ''\"\n style=\"display: none;\"\n (load)=\"onImageLoad(mainImage()!, 0)\"\n (error)=\"onImageError(mainImage()!, 0)\">\n }\n \n @if (hasImageError(mainImage()!, 0)) {\n <div class=\"c-gallery-grid__error\">\n <div class=\"c-gallery-grid__error-content\">\n <span class=\"c-gallery-grid__error-icon\">\uD83D\uDCF7</span>\n <span class=\"c-gallery-grid__error-text\">Error al cargar imagen</span>\n </div>\n </div>\n }\n </div>\n }\n }\n</div>\n" }]
|
|
17973
18532
|
}], ctorParameters: () => [] });
|
|
17974
18533
|
|
|
18534
|
+
var FixedActionPosition;
|
|
18535
|
+
(function (FixedActionPosition) {
|
|
18536
|
+
FixedActionPosition["LEFT"] = "left";
|
|
18537
|
+
FixedActionPosition["RIGHT"] = "right";
|
|
18538
|
+
FixedActionPosition["CENTER"] = "center";
|
|
18539
|
+
})(FixedActionPosition || (FixedActionPosition = {}));
|
|
18540
|
+
|
|
17975
18541
|
class CacheBustingInterceptor {
|
|
17976
18542
|
intercept(req, next) {
|
|
17977
18543
|
if (req.url.includes('/assets/i18n/') && req.url.endsWith('.json')) {
|
|
@@ -18253,5 +18819,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
18253
18819
|
* Generated bundle index. Do not edit.
|
|
18254
18820
|
*/
|
|
18255
18821
|
|
|
18256
|
-
export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, CustomClassService, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DataStoreService, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentFieldValidators, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericSwitchComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
|
|
18822
|
+
export { ALL_COUNTRY_CODES, ActiveFiltersComponent, AgeValidationHelper, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, COMMON_COUNTRIES, CacheBustingInterceptor, CardComponent, CarouselComponent, ChatMessagePosition, ChatMessageType, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreManualRefreshComponent, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, CountryCode, CustomClassService, DEFAULT_COUNTRIES, DataListComponent, DataListItemComponent, DataStoreService, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DocumentFieldComponent, DocumentFieldValidators, DocumentPayloadMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, DynamicFieldsHelper, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FilePreviewActionType, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, FixedActionPosition, FixedActionsMobileModalComponent, FixedActionsMobileModalService, GalleryAnimationType, GalleryLayoutType, GalleryModalComponent, GalleryModalGlobalService, GenericButtonComponent, GenericChatComponent, GenericChatService, GenericDocumentationComponent, GenericGalleryComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSkeletonComponent, GenericStepsComponent, GenericSwitchComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LATIN_AMERICA_COUNTRIES, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ManualRefreshService, MobileHeaderComponent, MobileResolutionService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, PhoneFieldComponent, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SOUTH_AMERICA_COUNTRIES, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SkeletonAnimation, SkeletonService, SkeletonSize, SkeletonType, SmartFieldComponent, SortDirection, SortMode, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TableSortService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UruguayanDocumentValidationHelper, UsersModel, VERSION, ageValidator, calculateAge, equalToValidator, generateRandomUruguayanDocument, getCountryCodeStrings, getLatestBirthDateForAge, getRandomCi, getUruguayanDocumentValidationDigit, getValidationDigit, isSameDate, isValidCountryCode, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader, random, transform, transformUruguayanDocument, uruguayanDocumentValidator, validate, validateAge, validateCi, validateUruguayanDocument, validationDigit };
|
|
18257
18823
|
//# sourceMappingURL=solcre-org-core-ui.mjs.map
|