Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(modal): provide modal config service in root and export (backport to 16.x) #1559

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion projects/angular/clarity.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2789,7 +2789,6 @@ export class ClrMainContainerModule {
export class ClrModal implements OnChanges, OnDestroy {
// Warning: (ae-forgotten-export) The symbol "ScrollingService" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ModalStackService" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ClrModalConfigurationService" needs to be exported by the entry point index.d.ts
constructor(_scrollingService: ScrollingService, commonStrings: ClrCommonStringsService, modalStackService: ModalStackService, configuration: ClrModalConfigurationService);
// (undocumented)
altClose: EventEmitter<boolean>;
Expand Down Expand Up @@ -2855,6 +2854,18 @@ export class ClrModalBody implements OnDestroy {
static ɵfac: i0.ɵɵFactoryDeclaration<ClrModalBody, never>;
}

// @public (undocumented)
export class ClrModalConfigurationService {
// (undocumented)
backdrop: boolean;
// (undocumented)
fadeMove: string;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ClrModalConfigurationService, never>;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration<ClrModalConfigurationService>;
}

// @public (undocumented)
export class ClrModalModule {
constructor();
Expand Down
1 change: 1 addition & 0 deletions projects/angular/src/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

export * from './modal';
export * from './modal.module';
export * from './modal-configuration.service';
export * from './side-panel.module';
export * from './modal-body';
export * from './side-panel';
2 changes: 1 addition & 1 deletion projects/angular/src/modal/modal-configuration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { Injectable } from '@angular/core';

@Injectable()
@Injectable({ providedIn: 'root' })
export class ClrModalConfigurationService {
fadeMove = 'fadeDown';
backdrop = true;
Expand Down
2 changes: 0 additions & 2 deletions projects/angular/src/modal/modal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ import { ClrIconModule } from '../icon/icon.module';
import { CdkTrapFocusModule } from '../utils/cdk/cdk-trap-focus.module';
import { ClrModal } from './modal';
import { ClrModalBody } from './modal-body';
import { ClrModalConfigurationService } from './modal-configuration.service';

export const CLR_MODAL_DIRECTIVES: Type<any>[] = [ClrModal, ClrModalBody];

@NgModule({
imports: [CommonModule, CdkTrapFocusModule, ClrIconModule],
declarations: [CLR_MODAL_DIRECTIVES],
exports: [CLR_MODAL_DIRECTIVES, ClrIconModule],
providers: [ClrModalConfigurationService],
})
export class ClrModalModule {
constructor() {
Expand Down
Loading