mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
- Added @analogjs/vite-plugin-angular and @analogjs/vitest-angular to devDependencies. - Updated @nx/vite to version 20.1.4. - Added @vitest/coverage-v8 and @vitest/ui to devDependencies. - Added jsdom to devDependencies. - Added vite and vitest to devDependencies. - Updated tsconfig.base.json to include new paths for shared libraries. - Created vitest.workspace.ts for vitest configuration. Refs: #5135
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import {
|
|
ChangeDetectionStrategy,
|
|
Component,
|
|
inject,
|
|
signal,
|
|
} from '@angular/core';
|
|
import { DialogContentDirective } from './dialog-content.directive';
|
|
import { DIALOG_CONTENT, DIALOG_TITLE } from './tokens';
|
|
import { ComponentType } from '@angular/cdk/portal';
|
|
import { NgComponentOutlet } from '@angular/common';
|
|
|
|
/**
|
|
* Base dialog component that serves as a container for dialog content
|
|
* Handles the outer dialog shell including title and content projection
|
|
*
|
|
* @template D Type of data passed to the dialog
|
|
* @template R Type of result returned from the dialog
|
|
* @template C Type of content component displayed in the dialog
|
|
*/
|
|
@Component({
|
|
selector: 'ui-dialog',
|
|
templateUrl: './dialog.component.html',
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
imports: [NgComponentOutlet],
|
|
host: {
|
|
'[class]': '["ui-dialog"]',
|
|
},
|
|
})
|
|
export class DialogComponent<D, R, C extends DialogContentDirective<D, R>> {
|
|
/** The title to display at the top of the dialog */
|
|
title = signal(inject(DIALOG_TITLE));
|
|
|
|
/** The component type to instantiate as the dialog content */
|
|
readonly component = inject(DIALOG_CONTENT) as ComponentType<C>;
|
|
}
|