codexly-ui 0.0.70 → 0.0.72
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.
|
@@ -5,15 +5,6 @@
|
|
|
5
5
|
-webkit-backdrop-filter: blur(4px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
/* ── CDK overlay z-index ─────────────────────────────────────────────────── */
|
|
9
|
-
.cdk-overlay-container {
|
|
10
|
-
z-index: 1000 !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* ── Toast always on top ─────────────────────────────────────────────────── */
|
|
14
|
-
clx-toast-container {
|
|
15
|
-
z-index: 9999 !important;
|
|
16
|
-
}
|
|
17
8
|
|
|
18
9
|
/* ── Scrollbar ───────────────────────────────────────────────────────────── */
|
|
19
10
|
::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; }
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { NG_VALUE_ACCESSOR, FormsModule, NgControl, FormControl, ReactiveFormsMo
|
|
|
6
6
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
7
|
import { startWith, map, debounceTime, distinctUntilChanged, switchMap, of, catchError } from 'rxjs';
|
|
8
8
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
9
|
-
import { ScrollStrategyOptions, OverlayModule, Overlay,
|
|
9
|
+
import { ScrollStrategyOptions, OverlayModule, Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
10
10
|
import { Chart, LineController, BarController, PieController, DoughnutController, RadarController, PolarAreaController, CategoryScale, LinearScale, RadialLinearScale, BarElement, LineElement, PointElement, ArcElement, Filler, Tooltip, Legend } from 'chart.js';
|
|
11
11
|
import * as i1$2 from '@angular/cdk/portal';
|
|
12
12
|
import { PortalModule, ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -6264,7 +6264,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
6264
6264
|
class ClxToastContainerComponent {
|
|
6265
6265
|
entries = model([], ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
|
|
6266
6266
|
position = model('top-right', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
6267
|
-
/** Called by service to get the ClxToastComponent instance for exit animation */
|
|
6268
6267
|
toastRefs;
|
|
6269
6268
|
_positionClass = computed(() => TOAST_POSITION_MAP[this.position()], ...(ngDevMode ? [{ debugName: "_positionClass" }] : /* istanbul ignore next */ []));
|
|
6270
6269
|
async requestDismiss(id) {
|
|
@@ -6272,13 +6271,12 @@ class ClxToastContainerComponent {
|
|
|
6272
6271
|
if (ref) {
|
|
6273
6272
|
await ref.playExitAnimation();
|
|
6274
6273
|
}
|
|
6275
|
-
this.entries.
|
|
6274
|
+
this.entries.set(this.entries().filter(e => e.id !== id));
|
|
6276
6275
|
}
|
|
6277
6276
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6278
6277
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxToastContainerComponent, isStandalone: true, selector: "clx-toast-container", inputs: { entries: { classPropertyName: "entries", publicName: "entries", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entries: "entriesChange", position: "positionChange" }, viewQueries: [{ propertyName: "toastRefs", predicate: ClxToastComponent, descendants: true }], ngImport: i0, template: `
|
|
6279
6278
|
<div
|
|
6280
6279
|
class="clx-toast-stack fixed flex flex-col gap-2 w-full max-w-sm pointer-events-none sm:max-w-sm max-sm:max-w-full max-sm:left-0! max-sm:right-0! max-sm:translate-x-0! max-sm:px-3 max-sm:items-stretch!"
|
|
6281
|
-
style="z-index: 99999"
|
|
6282
6280
|
[class]="_positionClass()"
|
|
6283
6281
|
>
|
|
6284
6282
|
@for (entry of entries(); track entry.id) {
|
|
@@ -6290,14 +6288,13 @@ class ClxToastContainerComponent {
|
|
|
6290
6288
|
</div>
|
|
6291
6289
|
}
|
|
6292
6290
|
</div>
|
|
6293
|
-
`, isInline: true, styles: ["
|
|
6291
|
+
`, isInline: true, styles: ["@media(max-width:639px){.clx-toast-stack{left:0!important;right:0!important;transform:none!important;padding-left:.75rem;padding-right:.75rem;max-width:100%!important;align-items:stretch!important}}\n"], dependencies: [{ kind: "component", type: ClxToastComponent, selector: "clx-toast", inputs: ["entry"], outputs: ["dismiss"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
6294
6292
|
}
|
|
6295
6293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxToastContainerComponent, decorators: [{
|
|
6296
6294
|
type: Component,
|
|
6297
6295
|
args: [{ selector: 'clx-toast-container', standalone: true, imports: [ClxToastComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
6298
6296
|
<div
|
|
6299
6297
|
class="clx-toast-stack fixed flex flex-col gap-2 w-full max-w-sm pointer-events-none sm:max-w-sm max-sm:max-w-full max-sm:left-0! max-sm:right-0! max-sm:translate-x-0! max-sm:px-3 max-sm:items-stretch!"
|
|
6300
|
-
style="z-index: 99999"
|
|
6301
6298
|
[class]="_positionClass()"
|
|
6302
6299
|
>
|
|
6303
6300
|
@for (entry of entries(); track entry.id) {
|
|
@@ -6309,7 +6306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
6309
6306
|
</div>
|
|
6310
6307
|
}
|
|
6311
6308
|
</div>
|
|
6312
|
-
`, styles: ["
|
|
6309
|
+
`, styles: ["@media(max-width:639px){.clx-toast-stack{left:0!important;right:0!important;transform:none!important;padding-left:.75rem;padding-right:.75rem;max-width:100%!important;align-items:stretch!important}}\n"] }]
|
|
6313
6310
|
}], propDecorators: { entries: [{ type: i0.Input, args: [{ isSignal: true, alias: "entries", required: false }] }, { type: i0.Output, args: ["entriesChange"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }, { type: i0.Output, args: ["positionChange"] }], toastRefs: [{
|
|
6314
6311
|
type: ViewChildren,
|
|
6315
6312
|
args: [ClxToastComponent]
|
|
@@ -8977,14 +8974,10 @@ class ClxModalService {
|
|
|
8977
8974
|
_overlay;
|
|
8978
8975
|
_injector;
|
|
8979
8976
|
_focusTrapFactory;
|
|
8980
|
-
_overlayContainer;
|
|
8981
8977
|
constructor() {
|
|
8982
8978
|
this._overlay = inject(Overlay);
|
|
8983
8979
|
this._injector = inject(Injector);
|
|
8984
8980
|
this._focusTrapFactory = inject(FocusTrapFactory);
|
|
8985
|
-
this._overlayContainer = inject(OverlayContainer);
|
|
8986
|
-
// Keep CDK overlay below toast (toast uses z-index 99999)
|
|
8987
|
-
this._overlayContainer.getContainerElement().style.zIndex = '1000';
|
|
8988
8981
|
}
|
|
8989
8982
|
open(
|
|
8990
8983
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13963,17 +13956,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13963
13956
|
}], ctorParameters: () => [] });
|
|
13964
13957
|
|
|
13965
13958
|
class ClxToastService {
|
|
13966
|
-
|
|
13959
|
+
_overlay = inject(Overlay);
|
|
13960
|
+
_injector = inject(Injector);
|
|
13967
13961
|
_containers = new Map();
|
|
13968
|
-
constructor() {
|
|
13969
|
-
this._appRef = inject(ApplicationRef);
|
|
13970
|
-
}
|
|
13971
13962
|
// ─── Core show ─────────────────────────────────────────────────────────────
|
|
13972
13963
|
show(options) {
|
|
13973
13964
|
const position = options.position ?? TOAST_DEFAULTS.position;
|
|
13974
13965
|
const container = this._getOrCreateContainer(position);
|
|
13975
|
-
// Always move toast container to end of body so it renders above CDK overlays
|
|
13976
|
-
document.body.appendChild(container.location.nativeElement);
|
|
13977
13966
|
const entry = {
|
|
13978
13967
|
id: this._uid(),
|
|
13979
13968
|
type: options.type ?? TOAST_DEFAULTS.type,
|
|
@@ -13991,7 +13980,8 @@ class ClxToastService {
|
|
|
13991
13980
|
removing: false,
|
|
13992
13981
|
};
|
|
13993
13982
|
const isBottom = position.startsWith('bottom');
|
|
13994
|
-
container.instance.entries
|
|
13983
|
+
const list = container.instance.entries();
|
|
13984
|
+
container.instance.entries.set(isBottom ? [...list, entry] : [entry, ...list]);
|
|
13995
13985
|
}
|
|
13996
13986
|
// ─── Convenience shortcuts ─────────────────────────────────────────────────
|
|
13997
13987
|
success(message, opts = {}) {
|
|
@@ -14006,25 +13996,26 @@ class ClxToastService {
|
|
|
14006
13996
|
info(message, opts = {}) {
|
|
14007
13997
|
this.show({ ...opts, type: 'sky', message });
|
|
14008
13998
|
}
|
|
14009
|
-
/** Dismiss all toasts across all containers immediately (no exit anim). */
|
|
14010
13999
|
dismissAll() {
|
|
14011
|
-
this._containers.forEach(
|
|
14000
|
+
this._containers.forEach(c => c.instance.entries.set([]));
|
|
14012
14001
|
}
|
|
14013
14002
|
// ─── Container management ──────────────────────────────────────────────────
|
|
14014
14003
|
_getOrCreateContainer(position) {
|
|
14015
14004
|
const existing = this._containers.get(position);
|
|
14016
14005
|
if (existing)
|
|
14017
14006
|
return existing;
|
|
14018
|
-
const
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
|
|
14027
|
-
|
|
14007
|
+
const overlayRef = this._overlay.create(new OverlayConfig({
|
|
14008
|
+
hasBackdrop: false,
|
|
14009
|
+
panelClass: 'clx-toast-overlay',
|
|
14010
|
+
scrollStrategy: this._overlay.scrollStrategies.noop(),
|
|
14011
|
+
positionStrategy: this._overlay.position().global(),
|
|
14012
|
+
}));
|
|
14013
|
+
const portal = new ComponentPortal(ClxToastContainerComponent, null, Injector.create({ parent: this._injector, providers: [] }));
|
|
14014
|
+
const compRef = overlayRef.attach(portal);
|
|
14015
|
+
compRef.setInput('position', position);
|
|
14016
|
+
const entry = { overlayRef, instance: compRef.instance };
|
|
14017
|
+
this._containers.set(position, entry);
|
|
14018
|
+
return entry;
|
|
14028
14019
|
}
|
|
14029
14020
|
// ─── Utilities ─────────────────────────────────────────────────────────────
|
|
14030
14021
|
_uid() {
|
|
@@ -14036,7 +14027,7 @@ class ClxToastService {
|
|
|
14036
14027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxToastService, decorators: [{
|
|
14037
14028
|
type: Injectable,
|
|
14038
14029
|
args: [{ providedIn: 'root' }]
|
|
14039
|
-
}]
|
|
14030
|
+
}] });
|
|
14040
14031
|
|
|
14041
14032
|
const PROGRESS_BAR_SIZE_MAP = {
|
|
14042
14033
|
xs: 'h-1',
|