Skip to content

Commit

Permalink
fix(modal): provide modal config service in root and export
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbuhmann committed Sep 19, 2024
1 parent c84ffde commit 0a71fb2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
13 changes: 12 additions & 1 deletion projects/angular/clarity.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,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 @@ -2873,6 +2872,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

0 comments on commit 0a71fb2

Please sign in to comment.