@ngx-smz/ui-kit 21.9.0-next.13 → 21.9.0-next.14

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.
@@ -2528,11 +2528,28 @@ class SmzToastContainerComponent {
2528
2528
  const key = this.key();
2529
2529
  return this.service.messages().filter((message) => (key ? message.key === key : !message.key));
2530
2530
  }, ...(ngDevMode ? [{ debugName: "visibleMessages" }] : []));
2531
+ layer = viewChild('layer', ...(ngDevMode ? [{ debugName: "layer" }] : []));
2531
2532
  constructor() {
2532
2533
  effect(() => {
2533
2534
  for (const message of this.visibleMessages())
2534
2535
  this.schedule(message);
2535
2536
  });
2537
+ // Abre a camada quando ha mensagens (reabrindo a cada mudanca para ficar acima de overlays abertos depois) e fecha quando nao ha.
2538
+ effect(() => {
2539
+ const count = this.visibleMessages().length;
2540
+ const element = this.layer()?.nativeElement;
2541
+ if (!element || typeof element.showPopover !== 'function')
2542
+ return;
2543
+ try {
2544
+ if (element.matches(':popover-open'))
2545
+ element.hidePopover?.();
2546
+ if (count > 0)
2547
+ element.showPopover();
2548
+ }
2549
+ catch {
2550
+ /* sem suporte: segue com z-index */
2551
+ }
2552
+ });
2536
2553
  inject(DestroyRef).onDestroy(() => this.timers.forEach((timer) => clearTimeout(timer.handle)));
2537
2554
  }
2538
2555
  toneClasses(message) {
@@ -2572,7 +2589,9 @@ class SmzToastContainerComponent {
2572
2589
  this.timers.delete(message.id);
2573
2590
  }
2574
2591
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2575
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzToastContainerComponent, isStandalone: true, selector: "ui-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
2592
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SmzToastContainerComponent, isStandalone: true, selector: "ui-toast", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, life: { classPropertyName: "life", publicName: "life", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "layer", first: true, predicate: ["layer"], descendants: true, isSignal: true }], ngImport: i0, template: `
2593
+ <!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
2594
+ <div #layer popover="manual" class="pointer-events-none fixed inset-0 m-0 h-full w-full overflow-visible border-0 bg-transparent p-0">
2576
2595
  <div
2577
2596
  class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
2578
2597
  [class]="positionClasses()"
@@ -2615,6 +2634,7 @@ class SmzToastContainerComponent {
2615
2634
  </div>
2616
2635
  }
2617
2636
  </div>
2637
+ </div>
2618
2638
  `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2619
2639
  }
2620
2640
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SmzToastContainerComponent, decorators: [{
@@ -2624,6 +2644,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2624
2644
  changeDetection: ChangeDetectionStrategy.OnPush,
2625
2645
  imports: [NgClass, NgStyle],
2626
2646
  template: `
2647
+ <!-- Camada na top layer (Popover API): overlays do CDK (drawer/dialog) ficam la e z-index nao os supera. -->
2648
+ <div #layer popover="manual" class="pointer-events-none fixed inset-0 m-0 h-full w-full overflow-visible border-0 bg-transparent p-0">
2627
2649
  <div
2628
2650
  class="pointer-events-none fixed z-[2000] flex w-80 max-w-[95vw] flex-col gap-2"
2629
2651
  [class]="positionClasses()"
@@ -2666,9 +2688,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
2666
2688
  </div>
2667
2689
  }
2668
2690
  </div>
2691
+ </div>
2669
2692
  `,
2670
2693
  }]
2671
- }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], life: [{ type: i0.Input, args: [{ isSignal: true, alias: "life", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
2694
+ }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], life: [{ type: i0.Input, args: [{ isSignal: true, alias: "life", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], layer: [{ type: i0.ViewChild, args: ['layer', { isSignal: true }] }] } });
2672
2695
 
2673
2696
  /* eslint-disable max-len -- classes Tailwind nos templates */
2674
2697
  const POSITIONS$1 = [