feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+26
-21
@@ -49,6 +49,9 @@ let NzDropDownDirective = (() => {
|
||||
injector = inject(Injector);
|
||||
portal;
|
||||
overlayRef = null;
|
||||
positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, this.elementRef.nativeElement)
|
||||
.withLockedPosition()
|
||||
.withTransformOriginOn('.ant-dropdown');
|
||||
inputVisible$ = new BehaviorSubject(false);
|
||||
nzTrigger$ = new BehaviorSubject('hover');
|
||||
overlayClose$ = new Subject();
|
||||
@@ -71,7 +74,9 @@ let NzDropDownDirective = (() => {
|
||||
});
|
||||
}
|
||||
setDropdownMenuValue(key, value) {
|
||||
this.nzDropdownMenu?.setValue(key, value);
|
||||
if (this.nzDropdownMenu) {
|
||||
this.nzDropdownMenu.setValue(key, value);
|
||||
}
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
if (this.nzDropdownMenu) {
|
||||
@@ -101,7 +106,7 @@ let NzDropDownDirective = (() => {
|
||||
const visible$ = merge(this.inputVisible$, domTriggerVisible$);
|
||||
combineLatest([visible$, this.nzDropdownMenu.isChildSubMenuOpen$])
|
||||
.pipe(map(([visible, sub]) => visible || sub), auditTime(150), distinctUntilChanged(), filter(() => this.platform.isBrowser), takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe(visible => {
|
||||
.subscribe((visible) => {
|
||||
const element = this.nzMatchWidthElement ? this.nzMatchWidthElement.nativeElement : nativeElement;
|
||||
const triggerWidth = element.getBoundingClientRect().width;
|
||||
if (this.nzVisible !== visible) {
|
||||
@@ -109,30 +114,26 @@ let NzDropDownDirective = (() => {
|
||||
}
|
||||
this.nzVisible = visible;
|
||||
if (visible) {
|
||||
const positionStrategy = createFlexibleConnectedPositionStrategy(this.injector, this.elementRef.nativeElement)
|
||||
.withLockedPosition()
|
||||
.withTransformOriginOn('.ant-dropdown');
|
||||
// Listen for placement changes to update the menu classes (arrow position)
|
||||
positionStrategy.positionChanges
|
||||
.pipe(filter(() => Boolean(this.overlayRef)), map(change => getPlacementName(change)), takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe(placement => {
|
||||
if (placement) {
|
||||
this.setDropdownMenuValue('placement', normalizePlacementForClass(placement));
|
||||
}
|
||||
});
|
||||
/** set up overlayRef **/
|
||||
if (!this.overlayRef) {
|
||||
/** new overlay **/
|
||||
this.overlayRef = createOverlayRef(this.injector, {
|
||||
positionStrategy,
|
||||
positionStrategy: this.positionStrategy,
|
||||
minWidth: triggerWidth,
|
||||
disposeOnNavigation: true,
|
||||
hasBackdrop: this.nzBackdrop && this.nzTrigger === 'click',
|
||||
scrollStrategy: createRepositionScrollStrategy(this.injector)
|
||||
});
|
||||
// Listen for placement changes to update the menu classes (arrow position)
|
||||
this.positionStrategy.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(change => {
|
||||
const placement = getPlacementName(change);
|
||||
if (placement) {
|
||||
this.setDropdownMenuValue('placement', normalizePlacementForClass(placement));
|
||||
}
|
||||
});
|
||||
merge(this.overlayRef.backdropClick(), this.overlayRef.detachments(), this.overlayRef
|
||||
.outsidePointerEvents()
|
||||
.pipe(filter(e => !this.elementRef.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter(e => e.keyCode === ESCAPE && !hasModifierKey(e))))
|
||||
.pipe(filter((e) => !this.elementRef.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter(e => e.keyCode === ESCAPE && !hasModifierKey(e))))
|
||||
.pipe(takeUntilDestroyed(this.destroyRef))
|
||||
.subscribe(() => {
|
||||
this.overlayClose$.next(false);
|
||||
@@ -149,7 +150,7 @@ let NzDropDownDirective = (() => {
|
||||
? setConnectedPositionOffset(POSITION_MAP[position], TOOLTIP_OFFSET_MAP[position])
|
||||
: POSITION_MAP[position];
|
||||
});
|
||||
positionStrategy.withPositions(positions);
|
||||
this.positionStrategy.withPositions(positions);
|
||||
/** reset portal if needed **/
|
||||
if (!this.portal || this.portal.templateRef !== this.nzDropdownMenu.templateRef) {
|
||||
this.portal = new TemplatePortal(this.nzDropdownMenu.templateRef, this.viewContainerRef);
|
||||
@@ -161,12 +162,16 @@ let NzDropDownDirective = (() => {
|
||||
}
|
||||
else {
|
||||
/** detach overlayRef if needed **/
|
||||
this.overlayRef?.detach();
|
||||
if (this.overlayRef) {
|
||||
this.overlayRef.detach();
|
||||
}
|
||||
}
|
||||
});
|
||||
this.nzDropdownMenu.animationStateChange$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
|
||||
if (event.toState === 'void') {
|
||||
this.overlayRef?.dispose();
|
||||
if (this.overlayRef) {
|
||||
this.overlayRef.dispose();
|
||||
}
|
||||
this.overlayRef = null;
|
||||
}
|
||||
});
|
||||
@@ -303,17 +308,16 @@ class NzDropdownMenuComponent {
|
||||
viewContainerRef = inject(ViewContainerRef);
|
||||
directionality = inject(Directionality);
|
||||
destroyRef = inject(DestroyRef);
|
||||
noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });
|
||||
mouseState$ = new BehaviorSubject(false);
|
||||
nzMenuService = inject(MenuService);
|
||||
isChildSubMenuOpen$ = this.nzMenuService.isChildSubMenuOpen$;
|
||||
descendantMenuItemClick$ = this.nzMenuService.descendantMenuItemClick$;
|
||||
mouseState$ = new BehaviorSubject(false);
|
||||
animationStateChange$ = new EventEmitter();
|
||||
templateRef;
|
||||
nzOverlayClassName = '';
|
||||
nzOverlayStyle = {};
|
||||
nzArrow = false;
|
||||
placement = 'bottomLeft';
|
||||
templateRef;
|
||||
dir = 'ltr';
|
||||
onAnimationEvent(event) {
|
||||
this.animationStateChange$.emit(event);
|
||||
@@ -325,6 +329,7 @@ class NzDropdownMenuComponent {
|
||||
this[key] = value;
|
||||
this.cdr.markForCheck();
|
||||
}
|
||||
noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });
|
||||
ngOnInit() {
|
||||
this.directionality.change?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(direction => {
|
||||
this.dir = direction;
|
||||
|
||||
Reference in New Issue
Block a user