@solcre-org/core-ui 2.15.8 → 2.15.10

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.
@@ -12109,7 +12109,10 @@ class GenericTableComponent {
12109
12109
  return [];
12110
12110
  }
12111
12111
  const actions = this.customActions()
12112
- .filter(action => action.isExtra === isExtra)
12112
+ .filter(action => {
12113
+ const effectiveIsExtra = isMobile ? this.getMobileIsExtra(action) : (action.isExtra ?? false);
12114
+ return effectiveIsExtra === isExtra;
12115
+ })
12113
12116
  .filter(action => {
12114
12117
  if (!action.shouldShow)
12115
12118
  return true;
@@ -12119,8 +12122,12 @@ class GenericTableComponent {
12119
12122
  return actions;
12120
12123
  }
12121
12124
  getVisibleDefaultActions(row, isExtra = false) {
12125
+ const isMobile = this.mobileResolutionService.isMobile();
12122
12126
  const actions = this.actions()
12123
- .filter(action => action.isExtra === isExtra)
12127
+ .filter(action => {
12128
+ const effectiveIsExtra = isMobile ? this.getMobileIsExtra(action) : (action.isExtra ?? false);
12129
+ return effectiveIsExtra === isExtra;
12130
+ })
12124
12131
  .filter(action => {
12125
12132
  if (!action.shouldShow)
12126
12133
  return true;
@@ -12132,7 +12139,7 @@ class GenericTableComponent {
12132
12139
  getOutsideFixedActionsForRow(row) {
12133
12140
  const result = [];
12134
12141
  this.actions()
12135
- .filter(action => action.showOutsideFixedActions === true && action.action !== TableAction.CREATE)
12142
+ .filter(action => this.getMobileShowOutsideFixedActions(action) && action.action !== TableAction.CREATE)
12136
12143
  .forEach(action => {
12137
12144
  if (action.shouldShow && !action.shouldShow(row))
12138
12145
  return;
@@ -12140,6 +12147,21 @@ class GenericTableComponent {
12140
12147
  });
12141
12148
  return result;
12142
12149
  }
12150
+ getMobileShowInHeader(action) {
12151
+ return action.mobileConfig?.showInHeader ?? false;
12152
+ }
12153
+ getMobileShowOutsideFixedActions(action) {
12154
+ return action.mobileConfig?.showOutsideFixedActions ?? false;
12155
+ }
12156
+ getMobileShowInsideModal(action) {
12157
+ return action.mobileConfig?.showInsideModal ?? false;
12158
+ }
12159
+ getMobileIsExtra(action) {
12160
+ if ('mobileConfig' in action && action.mobileConfig?.isExtra !== undefined) {
12161
+ return action.mobileConfig.isExtra;
12162
+ }
12163
+ return action.isExtra ?? false;
12164
+ }
12143
12165
  hasExtraCustomActions = computed(() => this.extraCustomActions().length > 0);
12144
12166
  regularDefaultActions = computed(() => this.actions().filter(action => !action.isExtra));
12145
12167
  extraDefaultActions = computed(() => this.actions().filter(action => action.isExtra));
@@ -12170,7 +12192,7 @@ class GenericTableComponent {
12170
12192
  const actions = [];
12171
12193
  if (config.includeGlobalActions) {
12172
12194
  const floatingGlobalActions = this.globalActions()
12173
- .filter(ga => !ga.showInsideModal && !ga.showOutsideFixedActions && !ga.showInHeader)
12195
+ .filter(ga => !this.getMobileShowInsideModal(ga) && !this.getMobileShowOutsideFixedActions(ga) && !this.getMobileShowInHeader(ga))
12174
12196
  .map(globalAction => ({
12175
12197
  icon: globalAction.icon,
12176
12198
  label: globalAction.label,
@@ -12187,7 +12209,7 @@ class GenericTableComponent {
12187
12209
  }));
12188
12210
  actions.push(...floatingGlobalActions);
12189
12211
  const outsideTableActions = this.actions()
12190
- .filter(action => action.showOutsideFixedActions === true && !action.showInHeader)
12212
+ .filter(action => this.getMobileShowOutsideFixedActions(action) && !this.getMobileShowInHeader(action))
12191
12213
  .map(actionConfig => ({
12192
12214
  icon: actionConfig.icon || this.getDefaultIconForAction(actionConfig.action),
12193
12215
  label: this.getActionLabel(actionConfig.action),
@@ -12201,7 +12223,7 @@ class GenericTableComponent {
12201
12223
  }));
12202
12224
  actions.push(...outsideTableActions);
12203
12225
  const outsideGlobalActions = this.globalActions()
12204
- .filter(ga => ga.showOutsideFixedActions === true && !ga.showInHeader)
12226
+ .filter(ga => this.getMobileShowOutsideFixedActions(ga) && !this.getMobileShowInHeader(ga))
12205
12227
  .map(globalAction => ({
12206
12228
  icon: globalAction.icon,
12207
12229
  label: globalAction.label,
@@ -12219,7 +12241,7 @@ class GenericTableComponent {
12219
12241
  actions.push(...outsideGlobalActions);
12220
12242
  const modalActions = [];
12221
12243
  const createAction = this.actions().find(a => a.action === TableAction.CREATE);
12222
- if (createAction && createAction.showInHeader === false && !createAction.showOutsideFixedActions) {
12244
+ if (createAction && !this.getMobileShowInHeader(createAction) && !this.getMobileShowOutsideFixedActions(createAction)) {
12223
12245
  if (!createAction.requiredPermission ||
12224
12246
  this.permissionService.hasPermission(createAction.requiredPermission.resource, createAction.requiredPermission.action)) {
12225
12247
  modalActions.push({
@@ -12232,7 +12254,7 @@ class GenericTableComponent {
12232
12254
  });
12233
12255
  }
12234
12256
  }
12235
- const globalActionsForModal = this.globalActions().filter(ga => ga.showInsideModal || (ga.showInHeader === false && !ga.showOutsideFixedActions));
12257
+ const globalActionsForModal = this.globalActions().filter(ga => this.getMobileShowInsideModal(ga) || (!this.getMobileShowInHeader(ga) && !this.getMobileShowOutsideFixedActions(ga)));
12236
12258
  modalActions.push(...globalActionsForModal.map(globalAction => ({
12237
12259
  icon: globalAction.icon,
12238
12260
  label: globalAction.label,
@@ -12806,12 +12828,11 @@ class GenericTableComponent {
12806
12828
  if (!config)
12807
12829
  return;
12808
12830
  const convertedActions = [];
12809
- const extraTableActions = this.actions().filter(actionConfig => actionConfig.isExtra === true);
12831
+ const extraTableActions = this.actions().filter(actionConfig => this.getMobileIsExtra(actionConfig));
12810
12832
  extraTableActions.forEach(actionConfig => {
12811
- if (actionConfig.requiredPermission) {
12812
- const hasPermission = this.permissionService.hasPermission(actionConfig.requiredPermission.resource, actionConfig.requiredPermission.action);
12813
- if (!hasPermission)
12814
- return;
12833
+ // ✅ Usar el método hasPermission() existente en lugar de duplicar lógica
12834
+ if (!this.hasPermission(actionConfig)) {
12835
+ return;
12815
12836
  }
12816
12837
  if (actionConfig.shouldShow && !actionConfig.shouldShow(row)) {
12817
12838
  return;
@@ -12828,13 +12849,14 @@ class GenericTableComponent {
12828
12849
  });
12829
12850
  });
12830
12851
  const visibleCustomActions = this.customActions().filter(customAction => {
12852
+ if (!this.getMobileIsExtra(customAction)) {
12853
+ return false;
12854
+ }
12831
12855
  if (customAction.shouldShow && !customAction.shouldShow(row)) {
12832
12856
  return false;
12833
12857
  }
12834
- if (customAction.requiredPermission) {
12835
- const hasPermission = this.permissionService.hasPermission(customAction.requiredPermission.resource, customAction.requiredPermission.action);
12836
- if (!hasPermission)
12837
- return false;
12858
+ if (!this.hasPermission(customAction)) {
12859
+ return false;
12838
12860
  }
12839
12861
  return true;
12840
12862
  });
@@ -13462,7 +13484,7 @@ class GenericTableComponent {
13462
13484
  buildAndSetHeaderActions() {
13463
13485
  const headerActions = [];
13464
13486
  this.globalActions().forEach((globalAction, index) => {
13465
- if (globalAction.showInHeader && this.hasPermission(globalAction)) {
13487
+ if (this.getMobileShowInHeader(globalAction) && !this.getMobileShowOutsideFixedActions(globalAction) && this.hasPermission(globalAction)) {
13466
13488
  const actionId = `global-action-${index}`;
13467
13489
  headerActions.push({
13468
13490
  id: actionId,
@@ -13472,7 +13494,7 @@ class GenericTableComponent {
13472
13494
  }
13473
13495
  });
13474
13496
  this.actions().forEach((actionConfig) => {
13475
- if (actionConfig.showInHeader && this.hasPermission(actionConfig)) {
13497
+ if (this.getMobileShowInHeader(actionConfig) && !this.getMobileShowOutsideFixedActions(actionConfig) && this.hasPermission(actionConfig)) {
13476
13498
  const actionId = `table-action-${actionConfig.action}`;
13477
13499
  headerActions.push({
13478
13500
  id: actionId,
@@ -15567,12 +15589,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
15567
15589
  // Este archivo es generado automáticamente por scripts/update-version.js
15568
15590
  // No edites manualmente este archivo
15569
15591
  const VERSION = {
15570
- full: '2.15.8',
15592
+ full: '2.15.10',
15571
15593
  major: 2,
15572
15594
  minor: 15,
15573
- patch: 8,
15574
- timestamp: '2025-10-10T18:15:57.111Z',
15575
- buildDate: '10/10/2025'
15595
+ patch: 10,
15596
+ timestamp: '2025-10-13T11:27:13.355Z',
15597
+ buildDate: '13/10/2025'
15576
15598
  };
15577
15599
 
15578
15600
  class MainNavComponent {