valtech-components 4.0.108 → 4.0.110

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.
@@ -2,5 +2,5 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export const VERSION = '4.0.108';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC4xMDgnO1xuIl19
5
+ export const VERSION = '4.0.110';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC4xMTAnO1xuIl19
@@ -56,7 +56,7 @@ import { BrowserMultiFormatReader } from '@zxing/browser';
56
56
  * Current version of valtech-components.
57
57
  * This is automatically updated during the publish process.
58
58
  */
59
- const VERSION = '4.0.108';
59
+ const VERSION = '4.0.110';
60
60
 
61
61
  // Control de estado de refresco (singleton a nivel de módulo)
62
62
  let isRefreshing = false;
@@ -8580,7 +8580,10 @@ class AuthService {
8580
8580
  },
8581
8581
  });
8582
8582
  }), catchError(error => {
8583
- this.logout();
8583
+ // Do NOT call logout() here — callers decide what to do on failure.
8584
+ // The auth interceptor already calls logout() explicitly, and
8585
+ // initialize() only clears state (no redirect). Auto-navigating to
8586
+ // /login from this method redirects even users on public routes.
8584
8587
  return throwError(() => error);
8585
8588
  }));
8586
8589
  }
@@ -28953,38 +28956,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
28953
28956
  }] } });
28954
28957
 
28955
28958
  /**
28956
- * val-section-header
28959
+ * val-section-header — standard section eyebrow for all factory apps.
28957
28960
  *
28958
- * Standard molecule for section titles across all factory apps. Renders a
28959
- * bold title + optional right-aligned action button(s) on one row, with an
28960
- * optional muted subtitle below.
28961
- *
28962
- * Replaces ad-hoc eyebrow spans, custom `.section-header` divs, and
28963
- * paired val-title + val-button combinations that accumulate per-page
28964
- * padding inconsistencies.
28965
- *
28966
- * **Actions:** pass `actions: ButtonMetadata[]` for right-side buttons.
28967
- * Use `fill: 'clear'` + `size: 'small'` for a text-link style CTA, or
28968
- * `fill: 'outline'` + `size: 'small'` for a contained button (e.g. "New").
28961
+ * Two-row layout:
28962
+ * ```
28963
+ * ┌────────────────────────────────────────────────┐
28964
+ * │ TITLE (bold 18px) [action btn] │ ← row 1, space-between
28965
+ * │ info link / subtitle (muted 13px) │ ← row 2, optional
28966
+ * └────────────────────────────────────────────────┘
28967
+ * ```
28969
28968
  *
28970
- * **Theming:** set `--val-section-header-cta-color` on the host or parent
28971
- * to tint plain-text CTAs without affecting full buttons.
28969
+ * CSS var `--val-section-header-cta-color` tints the `infoLink` text color.
28972
28970
  *
28973
- * @example
28974
- * ```html
28975
- * <val-section-header
28976
- * [props]="{
28977
- * title: 'Premios',
28978
- * subtitle: 'Regalos sorteados por ronda.',
28979
- * actions: [{ text: '¿Qué son?', fill: 'clear', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'info' }]
28980
- * }"
28981
- * (actionClick)="openInfoModal()" />
28982
- * ```
28971
+ * Both `action` (button) and `infoLink` (text link) emit `(actionClick)` with
28972
+ * their respective `token`.
28983
28973
  */
28984
28974
  class SectionHeaderComponent {
28985
28975
  constructor() {
28986
28976
  this.props = input({});
28987
- /** Emits the clicked button's `token` (from `actions`). */
28988
28977
  this.actionClick = new EventEmitter();
28989
28978
  this.config = computed(() => ({
28990
28979
  title: '',
@@ -28995,36 +28984,38 @@ class SectionHeaderComponent {
28995
28984
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SectionHeaderComponent, isStandalone: true, selector: "val-section-header", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: `
28996
28985
  <div class="sh-row">
28997
28986
  <span class="sh-title">{{ config().title }}</span>
28998
- @if (config().actions?.length) {
28999
- <div class="sh-actions">
29000
- @for (action of config().actions; track action.token || $index) {
29001
- <val-button [props]="action" (onClick)="actionClick.emit($event)" />
29002
- }
29003
- </div>
28987
+ @if (config().action; as act) {
28988
+ <val-button [props]="act" (onClick)="actionClick.emit($event)" />
29004
28989
  }
29005
28990
  </div>
28991
+ @if (config().infoLink; as link) {
28992
+ <button type="button" class="sh-info-link" (click)="actionClick.emit(link.token ?? 'info')">
28993
+ {{ link.label }}
28994
+ </button>
28995
+ }
29006
28996
  @if (config().subtitle) {
29007
28997
  <p class="sh-subtitle">{{ config().subtitle }}</p>
29008
28998
  }
29009
- `, isInline: true, styles: [":host{display:block}.sh-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sh-title{font-size:1.125rem;font-weight:800;color:var(--val-ink, var(--ion-color-dark, #2f2a36));letter-spacing:-.01em;line-height:1.25;margin:0}.sh-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.sh-subtitle{margin:4px 0 0;font-size:.8125rem;color:var(--val-ink-soft, var(--ion-color-medium, #92949c));line-height:1.4}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }] }); }
28999
+ `, isInline: true, styles: [":host{display:block}.sh-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sh-title{font-size:1.125rem;font-weight:800;color:var(--val-ink, var(--ion-color-dark, #2f2a36));letter-spacing:-.01em;line-height:1.25;margin:0}.sh-info-link{display:inline-block;margin:4px 0 0;padding:0;background:none;border:none;cursor:pointer;font-size:.8125rem;font-family:inherit;font-weight:600;color:var(--val-section-header-cta-color, var(--ion-color-primary, #3880ff));line-height:1.4;text-align:start}.sh-subtitle{display:block;margin:4px 0 0;font-size:.8125rem;color:var(--val-ink-soft, var(--ion-color-medium, #92949c));line-height:1.4}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }] }); }
29010
29000
  }
29011
29001
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SectionHeaderComponent, decorators: [{
29012
29002
  type: Component,
29013
29003
  args: [{ selector: 'val-section-header', standalone: true, imports: [ButtonComponent], template: `
29014
29004
  <div class="sh-row">
29015
29005
  <span class="sh-title">{{ config().title }}</span>
29016
- @if (config().actions?.length) {
29017
- <div class="sh-actions">
29018
- @for (action of config().actions; track action.token || $index) {
29019
- <val-button [props]="action" (onClick)="actionClick.emit($event)" />
29020
- }
29021
- </div>
29006
+ @if (config().action; as act) {
29007
+ <val-button [props]="act" (onClick)="actionClick.emit($event)" />
29022
29008
  }
29023
29009
  </div>
29010
+ @if (config().infoLink; as link) {
29011
+ <button type="button" class="sh-info-link" (click)="actionClick.emit(link.token ?? 'info')">
29012
+ {{ link.label }}
29013
+ </button>
29014
+ }
29024
29015
  @if (config().subtitle) {
29025
29016
  <p class="sh-subtitle">{{ config().subtitle }}</p>
29026
29017
  }
29027
- `, styles: [":host{display:block}.sh-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sh-title{font-size:1.125rem;font-weight:800;color:var(--val-ink, var(--ion-color-dark, #2f2a36));letter-spacing:-.01em;line-height:1.25;margin:0}.sh-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.sh-subtitle{margin:4px 0 0;font-size:.8125rem;color:var(--val-ink-soft, var(--ion-color-medium, #92949c));line-height:1.4}\n"] }]
29018
+ `, styles: [":host{display:block}.sh-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.sh-title{font-size:1.125rem;font-weight:800;color:var(--val-ink, var(--ion-color-dark, #2f2a36));letter-spacing:-.01em;line-height:1.25;margin:0}.sh-info-link{display:inline-block;margin:4px 0 0;padding:0;background:none;border:none;cursor:pointer;font-size:.8125rem;font-family:inherit;font-weight:600;color:var(--val-section-header-cta-color, var(--ion-color-primary, #3880ff));line-height:1.4;text-align:start}.sh-subtitle{display:block;margin:4px 0 0;font-size:.8125rem;color:var(--val-ink-soft, var(--ion-color-medium, #92949c));line-height:1.4}\n"] }]
29028
29019
  }], propDecorators: { actionClick: [{
29029
29020
  type: Output
29030
29021
  }] } });