mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
[CL-135] Migrate component library to standalone components (#12389)
* Migrate component library to standalone components * Fix tests
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { SharedModule } from "../shared";
|
||||
|
||||
import { BitActionDirective } from "./bit-action.directive";
|
||||
import { BitSubmitDirective } from "./bit-submit.directive";
|
||||
import { BitFormButtonDirective } from "./form-button.directive";
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule],
|
||||
declarations: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective],
|
||||
imports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective],
|
||||
exports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective],
|
||||
})
|
||||
export class AsyncActionsModule {}
|
||||
|
||||
@@ -15,6 +15,7 @@ import { FunctionReturningAwaitable, functionToObservable } from "../utils/funct
|
||||
*/
|
||||
@Directive({
|
||||
selector: "[bitAction]",
|
||||
standalone: true,
|
||||
})
|
||||
export class BitActionDirective implements OnDestroy {
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
@@ -14,6 +14,7 @@ import { FunctionReturningAwaitable, functionToObservable } from "../utils/funct
|
||||
*/
|
||||
@Directive({
|
||||
selector: "[formGroup][bitSubmit]",
|
||||
standalone: true,
|
||||
})
|
||||
export class BitSubmitDirective implements OnInit, OnDestroy {
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
@@ -25,6 +25,7 @@ import { BitSubmitDirective } from "./bit-submit.directive";
|
||||
*/
|
||||
@Directive({
|
||||
selector: "button[bitFormButton]",
|
||||
standalone: true,
|
||||
})
|
||||
export class BitFormButtonDirective implements OnDestroy {
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
Reference in New Issue
Block a user