codexly-ui 0.0.75 → 0.0.77

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, effect, signal, inject, ElementRef, InjectionToken, PLATFORM_ID, Injectable, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, Directive, output, contentChildren, NgZone, model, untracked, forwardRef, viewChild, HostListener, ViewChildren, contentChild, Injector, ViewChild, ChangeDetectorRef, ContentChildren, Input, numberAttribute, booleanAttribute } from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, effect, signal, inject, ElementRef, InjectionToken, PLATFORM_ID, Injectable, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, Directive, output, contentChildren, NgZone, model, untracked, forwardRef, viewChild, HostListener, ViewChildren, contentChild, Injector, ViewChild, ChangeDetectorRef, ContentChildren, Input, numberAttribute, booleanAttribute, runInInjectionContext } from '@angular/core';
3
3
  import { isPlatformBrowser, CurrencyPipe, NgTemplateOutlet, DecimalPipe, NgStyle, DOCUMENT } from '@angular/common';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormsModule, NgControl, FormControl, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
@@ -13967,19 +13967,19 @@ class ToastOverlayContainer extends OverlayContainer {
13967
13967
  }
13968
13968
  class ClxToastService {
13969
13969
  _injector = inject(Injector);
13970
- _platformId = inject(PLATFORM_ID);
13971
13970
  _toastOverlay = null;
13972
13971
  _containers = new Map();
13973
13972
  _getOverlay() {
13974
13973
  if (this._toastOverlay)
13975
13974
  return this._toastOverlay;
13976
- const container = new ToastOverlayContainer(this._platformId);
13977
- // Create a child injector that provides the custom OverlayContainer
13978
13975
  const childInjector = Injector.create({
13979
13976
  parent: this._injector,
13980
13977
  providers: [
13981
- { provide: OverlayContainer, useValue: container },
13982
- { provide: Overlay, deps: [OverlayContainer] },
13978
+ {
13979
+ provide: OverlayContainer,
13980
+ useFactory: () => runInInjectionContext(this._injector, () => new ToastOverlayContainer()),
13981
+ },
13982
+ { provide: Overlay },
13983
13983
  ],
13984
13984
  });
13985
13985
  this._toastOverlay = childInjector.get(Overlay);
@@ -13989,6 +13989,11 @@ class ClxToastService {
13989
13989
  show(options) {
13990
13990
  const position = options.position ?? TOAST_DEFAULTS.position;
13991
13991
  const container = this._getOrCreateContainer(position);
13992
+ // Move our dedicated overlay container to the end of body on every show
13993
+ // so it always appears after any modal cdk-overlay-container
13994
+ const el = container.overlayRef.overlayElement.closest('.clx-toast-overlay-container');
13995
+ if (el)
13996
+ document.body.appendChild(el);
13992
13997
  const entry = {
13993
13998
  id: this._uid(),
13994
13999
  type: options.type ?? TOAST_DEFAULTS.type,