valtech-components 2.0.1019 → 2.0.1021

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.
@@ -54,7 +54,7 @@ import 'prismjs/components/prism-json';
54
54
  * Current version of valtech-components.
55
55
  * This is automatically updated during the publish process.
56
56
  */
57
- const VERSION = '2.0.1019';
57
+ const VERSION = '2.0.1021';
58
58
 
59
59
  // Control de estado de refresco (singleton a nivel de módulo)
60
60
  let isRefreshing = false;
@@ -48420,11 +48420,32 @@ const MEMBER_DETAIL_MODAL_I18N = {
48420
48420
  permRoles: 'Roles',
48421
48421
  permMedia: 'Media',
48422
48422
  permTemplates: 'Plantillas',
48423
+ permRbac: 'Control de acceso',
48424
+ permApps: 'Aplicaciones',
48425
+ permApiKeys: 'API Keys',
48426
+ permEmailLogs: 'Registros de email',
48427
+ permSmsLogs: 'Registros de SMS',
48428
+ permCommsTemplates: 'Plantillas de comunicación',
48429
+ permRequests: 'Solicitudes',
48430
+ permMembers: 'Miembros',
48431
+ permAccounts: 'Cuentas',
48432
+ permSupport: 'Soporte',
48433
+ permBingo: 'Bingo',
48423
48434
  permRead: 'Leer',
48424
48435
  permWrite: 'Escribir',
48425
48436
  permCreate: 'Crear',
48426
48437
  permDelete: 'Eliminar',
48427
48438
  permManage: 'Gestionar',
48439
+ permEdit: 'Editar',
48440
+ permSell: 'Vender',
48441
+ permCheckin: 'Registrar entrada',
48442
+ permSettle: 'Rendir',
48443
+ permExport: 'Exportar',
48444
+ permOperate: 'Operar',
48445
+ permSuspend: 'Suspender',
48446
+ permReactivate: 'Reactivar',
48447
+ permResetPassword: 'Restablecer contraseña',
48448
+ permImport: 'Importar',
48428
48449
  },
48429
48450
  en: {
48430
48451
  close: 'Close',
@@ -48452,11 +48473,32 @@ const MEMBER_DETAIL_MODAL_I18N = {
48452
48473
  permRoles: 'Roles',
48453
48474
  permMedia: 'Media',
48454
48475
  permTemplates: 'Templates',
48476
+ permRbac: 'Access control',
48477
+ permApps: 'Apps',
48478
+ permApiKeys: 'API Keys',
48479
+ permEmailLogs: 'Email logs',
48480
+ permSmsLogs: 'SMS logs',
48481
+ permCommsTemplates: 'Comms templates',
48482
+ permRequests: 'Requests',
48483
+ permMembers: 'Members',
48484
+ permAccounts: 'Accounts',
48485
+ permSupport: 'Support',
48486
+ permBingo: 'Bingo',
48455
48487
  permRead: 'Read',
48456
48488
  permWrite: 'Write',
48457
48489
  permCreate: 'Create',
48458
48490
  permDelete: 'Delete',
48459
48491
  permManage: 'Manage',
48492
+ permEdit: 'Edit',
48493
+ permSell: 'Sell',
48494
+ permCheckin: 'Check-in',
48495
+ permSettle: 'Settle',
48496
+ permExport: 'Export',
48497
+ permOperate: 'Operate',
48498
+ permSuspend: 'Suspend',
48499
+ permReactivate: 'Reactivate',
48500
+ permResetPassword: 'Reset password',
48501
+ permImport: 'Import',
48460
48502
  },
48461
48503
  };
48462
48504
 
@@ -48566,6 +48608,17 @@ class MemberDetailModalComponent {
48566
48608
  roles: 'permRoles',
48567
48609
  media: 'permMedia',
48568
48610
  templates: 'permTemplates',
48611
+ rbac: 'permRbac',
48612
+ apps: 'permApps',
48613
+ 'api-keys': 'permApiKeys',
48614
+ 'email-logs': 'permEmailLogs',
48615
+ 'sms-logs': 'permSmsLogs',
48616
+ 'comms-templates': 'permCommsTemplates',
48617
+ requests: 'permRequests',
48618
+ members: 'permMembers',
48619
+ accounts: 'permAccounts',
48620
+ support: 'permSupport',
48621
+ bingo: 'permBingo',
48569
48622
  '*': 'permAll',
48570
48623
  };
48571
48624
  const actKey = {
@@ -48574,12 +48627,33 @@ class MemberDetailModalComponent {
48574
48627
  create: 'permCreate',
48575
48628
  delete: 'permDelete',
48576
48629
  manage: 'permManage',
48630
+ edit: 'permEdit',
48631
+ sell: 'permSell',
48632
+ checkin: 'permCheckin',
48633
+ settle: 'permSettle',
48634
+ export: 'permExport',
48635
+ operate: 'permOperate',
48636
+ suspend: 'permSuspend',
48637
+ reactivate: 'permReactivate',
48638
+ 'reset-password': 'permResetPassword',
48639
+ import: 'permImport',
48577
48640
  '*': 'permAll',
48578
48641
  };
48579
- const res = this.t(resKey[resource] ?? resource);
48580
- const act = this.t(actKey[action] ?? action);
48642
+ // Label del i18n si el recurso/acción está mapeado; si no, humanizar el código
48643
+ // crudo (evita que un recurso nuevo salga vacío, ej. ": Gestionar").
48644
+ const res = resKey[resource] ? this.t(resKey[resource]) : this.humanizeCode(resource);
48645
+ const act = actKey[action] ? this.t(actKey[action]) : this.humanizeCode(action);
48581
48646
  return `${res}: ${act}`;
48582
48647
  }
48648
+ humanizeCode(code) {
48649
+ if (!code)
48650
+ return '';
48651
+ return code
48652
+ .split(/[-_]/)
48653
+ .filter(Boolean)
48654
+ .map(w => w.charAt(0).toUpperCase() + w.slice(1))
48655
+ .join(' ');
48656
+ }
48583
48657
  async onChangeRole(newRoleId) {
48584
48658
  if (this.working())
48585
48659
  return;
@@ -54199,9 +54273,22 @@ class AboutViewComponent {
54199
54273
  this.modalService = inject(ModalService);
54200
54274
  this.toast = inject(ToastService);
54201
54275
  this.route = inject(ActivatedRoute, { optional: true });
54276
+ /**
54277
+ * Config vía input (object-first). Si no se pasa, se cae al route data
54278
+ * `aboutConfig` (poblado por `provideValtechAboutRoutes`). `resolvedConfig`
54279
+ * mergea con los defaults — el input gana sobre route data.
54280
+ *
54281
+ * **Signal input** (no `@Input` clásico): `resolvedConfig` es un `computed` que se
54282
+ * evalúa por primera vez en el constructor (vía `this.ns` → `setBackHeader`), ANTES
54283
+ * de que un `@Input` clásico esté bindeado. Con `@Input` el computed memoizaba la
54284
+ * config vacía y, al no depender de ninguna señal, NUNCA recomputaba → ignoraba
54285
+ * `[config]` (social/acciones/versión/marca quedaban en default). Como signal, el
54286
+ * computed lo trackea y recomputa cuando el binding llega.
54287
+ */
54288
+ this.config = input(undefined);
54202
54289
  this.resolvedConfig = computed(() => {
54203
54290
  const fromRoute = (this.route?.snapshot.data['aboutConfig'] ?? {});
54204
- const merged = { ...fromRoute, ...(this.config ?? {}) };
54291
+ const merged = { ...fromRoute, ...(this.config() ?? {}) };
54205
54292
  return {
54206
54293
  brand: {
54207
54294
  name: merged.brand?.name ?? DEFAULT_BRAND_NAME,
@@ -54339,7 +54426,7 @@ class AboutViewComponent {
54339
54426
  this.resolvedConfig().onRated?.();
54340
54427
  }
54341
54428
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AboutViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54342
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AboutViewComponent, isStandalone: true, selector: "val-about-view", inputs: { config: "config" }, ngImport: i0, template: `
54429
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AboutViewComponent, isStandalone: true, selector: "val-about-view", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
54343
54430
  <ion-grid class="about-grid">
54344
54431
  <!-- HERO: logo + name + version -->
54345
54432
  <div class="about-hero">
@@ -54580,9 +54667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
54580
54667
  </footer>
54581
54668
  </ion-grid>
54582
54669
  `, styles: [":host{display:block}.about-grid{padding:16px 0;max-width:720px;margin:0 auto}.about-hero{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 0 16px;text-align:center}.about-hero__logo{height:96px;width:auto;display:block}.about-hero__logo--var{width:96px;height:96px;background-position:center;background-repeat:no-repeat;background-size:contain}.version-row{display:flex;align-items:center;gap:6px;cursor:pointer;opacity:.85;transition:opacity .15s ease}.version-row:hover{opacity:1}.version-copy-icon{font-size:14px;color:var(--ion-color-medium)}.about-section{padding:16px 0 8px;display:flex;flex-direction:column;gap:8px}.about-actions{display:flex;flex-direction:column;gap:8px}.about-section--reviews val-action-card{display:block}.about-section--reviews val-action-card ::ng-deep .action-card{background:var(--ion-color-light, #f4f5f8);box-shadow:none}.about-section--reviews val-action-card ::ng-deep .action-card__description{color:var(--ion-color-dark);opacity:.7}.about-social{display:flex;flex-wrap:wrap;gap:10px;padding-top:8px}.about-social .social-btn{--border-radius: 50%;--background: var(--ion-color-light, #f4f5f8);--color: var(--ion-color-dark);--padding-start: 0;--padding-end: 0;width:48px;height:48px;margin:0;transition:transform .15s ease}.about-social .social-btn:hover{--background: var(--ion-color-primary-tint, #8a4ce5);--color: #fff;transform:translateY(-2px)}.about-social .social-btn ion-icon{font-size:22px}.about-footer{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 0;text-align:center}:host-context(body.dark) val-action-card ::ng-deep .action-card,:host-context(html.ion-palette-dark) val-action-card ::ng-deep .action-card,:host-context([data-theme=\"dark\"]) val-action-card ::ng-deep .action-card{background:#ffffff0a}:host-context(body.dark) .about-section--reviews val-action-card ::ng-deep .action-card:hover,:host-context(html.ion-palette-dark) .about-section--reviews val-action-card ::ng-deep .action-card:hover,:host-context([data-theme=\"dark\"]) .about-section--reviews val-action-card ::ng-deep .action-card:hover{background:#ffffff14}:host-context(body.dark) .about-social .social-btn,:host-context(html.ion-palette-dark) .about-social .social-btn,:host-context([data-theme=\"dark\"]) .about-social .social-btn{--background: rgba(255, 255, 255, .04)}\n"] }]
54583
- }], ctorParameters: () => [], propDecorators: { config: [{
54584
- type: Input
54585
- }] } });
54670
+ }], ctorParameters: () => [] });
54586
54671
 
54587
54672
  /**
54588
54673
  * Configuración acotada de `val-about-view` (object-first). La vista About es