@solcre-org/core-ui 2.15.10 → 2.15.12
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.
|
@@ -11928,7 +11928,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
11928
11928
|
|
|
11929
11929
|
class FixedActionsMobileModalComponent {
|
|
11930
11930
|
mobileModalService = inject(FixedActionsMobileModalService);
|
|
11931
|
-
permissionService = inject(
|
|
11931
|
+
permissionService = inject(PermissionWrapperService);
|
|
11932
11932
|
isVisible = this.mobileModalService.isVisible;
|
|
11933
11933
|
modalData = this.mobileModalService.modalData;
|
|
11934
11934
|
visibleActions = computed(() => {
|
|
@@ -11962,6 +11962,21 @@ class FixedActionsMobileModalComponent {
|
|
|
11962
11962
|
}
|
|
11963
11963
|
return true;
|
|
11964
11964
|
}
|
|
11965
|
+
isActionDisabled(action) {
|
|
11966
|
+
const data = this.modalData();
|
|
11967
|
+
if (!data?.data)
|
|
11968
|
+
return false;
|
|
11969
|
+
if (action.shouldDisable) {
|
|
11970
|
+
return action.shouldDisable(data.data);
|
|
11971
|
+
}
|
|
11972
|
+
if (action.customAction?.shouldDisable) {
|
|
11973
|
+
return action.customAction.shouldDisable(data.data);
|
|
11974
|
+
}
|
|
11975
|
+
if (action.globalAction?.isDisabled) {
|
|
11976
|
+
return true;
|
|
11977
|
+
}
|
|
11978
|
+
return false;
|
|
11979
|
+
}
|
|
11965
11980
|
getActionLabel(action) {
|
|
11966
11981
|
return action.label || action.customAction?.label || action.globalAction?.label || '';
|
|
11967
11982
|
}
|
|
@@ -11972,6 +11987,9 @@ class FixedActionsMobileModalComponent {
|
|
|
11972
11987
|
this.mobileModalService.close();
|
|
11973
11988
|
}
|
|
11974
11989
|
onActionClick(action) {
|
|
11990
|
+
if (this.isActionDisabled(action)) {
|
|
11991
|
+
return;
|
|
11992
|
+
}
|
|
11975
11993
|
const data = this.modalData();
|
|
11976
11994
|
this.mobileModalService.executeAction(action, data?.data);
|
|
11977
11995
|
}
|
|
@@ -11981,11 +11999,11 @@ class FixedActionsMobileModalComponent {
|
|
|
11981
11999
|
}
|
|
11982
12000
|
}
|
|
11983
12001
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11984
|
-
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) | translate }}\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"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
12002
|
+
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 [class.is-disabled]=\"isActionDisabled(action)\"\n [attr.aria-disabled]=\"isActionDisabled(action)\"\n href=\"javascript:void(0)\"\n (click)=\"onActionClick(action)\">\n @if (getActionIcon(action)) {\n <span [ngClass]=\"getActionIcon(action)\"></span>\n }\n {{ getActionLabel(action) | translate }}\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"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
11985
12003
|
}
|
|
11986
12004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FixedActionsMobileModalComponent, decorators: [{
|
|
11987
12005
|
type: Component,
|
|
11988
|
-
args: [{ selector: 'core-fixed-actions-mobile-modal', standalone: true, imports: [CommonModule, TranslateModule], 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) | translate }}\n </a>\n </li>\n }\n </ul>\n </nav>\n </div>\n </div>\n </div>\n}\n" }]
|
|
12006
|
+
args: [{ selector: 'core-fixed-actions-mobile-modal', standalone: true, imports: [CommonModule, TranslateModule], 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 [class.is-disabled]=\"isActionDisabled(action)\"\n [attr.aria-disabled]=\"isActionDisabled(action)\"\n href=\"javascript:void(0)\"\n (click)=\"onActionClick(action)\">\n @if (getActionIcon(action)) {\n <span [ngClass]=\"getActionIcon(action)\"></span>\n }\n {{ getActionLabel(action) | translate }}\n </a>\n </li>\n }\n </ul>\n </nav>\n </div>\n </div>\n </div>\n}\n" }]
|
|
11989
12007
|
}] });
|
|
11990
12008
|
|
|
11991
12009
|
class GenericTableComponent {
|
|
@@ -12830,22 +12848,17 @@ class GenericTableComponent {
|
|
|
12830
12848
|
const convertedActions = [];
|
|
12831
12849
|
const extraTableActions = this.actions().filter(actionConfig => this.getMobileIsExtra(actionConfig));
|
|
12832
12850
|
extraTableActions.forEach(actionConfig => {
|
|
12833
|
-
// ✅ Usar el método hasPermission() existente en lugar de duplicar lógica
|
|
12834
|
-
if (!this.hasPermission(actionConfig)) {
|
|
12835
|
-
return;
|
|
12836
|
-
}
|
|
12837
12851
|
if (actionConfig.shouldShow && !actionConfig.shouldShow(row)) {
|
|
12838
12852
|
return;
|
|
12839
12853
|
}
|
|
12840
|
-
const isDisabled = actionConfig.shouldDisable ? actionConfig.shouldDisable(row) : false;
|
|
12841
12854
|
convertedActions.push({
|
|
12842
12855
|
icon: actionConfig.icon || this.getDefaultIconForAction(actionConfig.action),
|
|
12843
12856
|
label: this.getActionLabel(actionConfig.action),
|
|
12844
12857
|
requiredPermission: actionConfig.requiredPermission,
|
|
12858
|
+
shouldDisable: actionConfig.shouldDisable,
|
|
12845
12859
|
callback: () => {
|
|
12846
12860
|
this.triggerAction(actionConfig.action, row);
|
|
12847
|
-
}
|
|
12848
|
-
shouldDisable: isDisabled ? (() => true) : undefined
|
|
12861
|
+
}
|
|
12849
12862
|
});
|
|
12850
12863
|
});
|
|
12851
12864
|
const visibleCustomActions = this.customActions().filter(customAction => {
|
|
@@ -12855,9 +12868,6 @@ class GenericTableComponent {
|
|
|
12855
12868
|
if (customAction.shouldShow && !customAction.shouldShow(row)) {
|
|
12856
12869
|
return false;
|
|
12857
12870
|
}
|
|
12858
|
-
if (!this.hasPermission(customAction)) {
|
|
12859
|
-
return false;
|
|
12860
|
-
}
|
|
12861
12871
|
return true;
|
|
12862
12872
|
});
|
|
12863
12873
|
visibleCustomActions.forEach(customAction => {
|
|
@@ -12900,7 +12910,7 @@ class GenericTableComponent {
|
|
|
12900
12910
|
getDefaultIconForAction(action) {
|
|
12901
12911
|
switch (action) {
|
|
12902
12912
|
case TableAction.VIEW:
|
|
12903
|
-
return 'icon-
|
|
12913
|
+
return 'icon-search';
|
|
12904
12914
|
case TableAction.EDIT:
|
|
12905
12915
|
return 'icon-edit';
|
|
12906
12916
|
case TableAction.DELETE:
|
|
@@ -15589,11 +15599,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
15589
15599
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
15590
15600
|
// No edites manualmente este archivo
|
|
15591
15601
|
const VERSION = {
|
|
15592
|
-
full: '2.15.
|
|
15602
|
+
full: '2.15.12',
|
|
15593
15603
|
major: 2,
|
|
15594
15604
|
minor: 15,
|
|
15595
|
-
patch:
|
|
15596
|
-
timestamp: '2025-10-
|
|
15605
|
+
patch: 12,
|
|
15606
|
+
timestamp: '2025-10-13T13:56:48.610Z',
|
|
15597
15607
|
buildDate: '13/10/2025'
|
|
15598
15608
|
};
|
|
15599
15609
|
|