mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
Billing - Prefer signal & change detection (#16944)
This commit is contained in:
@@ -16,6 +16,8 @@ export type LineItem = {
|
||||
* This component has no external dependencies and performs minimal logic -
|
||||
* it only displays data and allows expanding/collapsing of line items.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
selector: "billing-cart-summary",
|
||||
templateUrl: "./cart-summary.component.html",
|
||||
@@ -23,13 +25,13 @@ export type LineItem = {
|
||||
})
|
||||
export class CartSummaryComponent {
|
||||
// Required inputs
|
||||
passwordManager = input.required<LineItem>();
|
||||
additionalStorage = input<LineItem>();
|
||||
secretsManager = input<{ seats: LineItem; additionalServiceAccounts?: LineItem }>();
|
||||
estimatedTax = input.required<number>();
|
||||
readonly passwordManager = input.required<LineItem>();
|
||||
readonly additionalStorage = input<LineItem>();
|
||||
readonly secretsManager = input<{ seats: LineItem; additionalServiceAccounts?: LineItem }>();
|
||||
readonly estimatedTax = input.required<number>();
|
||||
|
||||
// UI state
|
||||
isExpanded = signal(true);
|
||||
readonly isExpanded = signal(true);
|
||||
|
||||
/**
|
||||
* Calculates total for password manager line item
|
||||
|
||||
@@ -6,6 +6,8 @@ import { ButtonType, IconModule, TypographyModule } from "@bitwarden/components"
|
||||
|
||||
import { PricingCardComponent } from "./pricing-card.component";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
template: `
|
||||
<billing-pricing-card
|
||||
|
||||
@@ -15,6 +15,8 @@ import {
|
||||
* This component has no external dependencies and performs no logic - it only displays data
|
||||
* and emits events when the button is clicked.
|
||||
*/
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@Component({
|
||||
selector: "billing-pricing-card",
|
||||
templateUrl: "./pricing-card.component.html",
|
||||
@@ -36,6 +38,8 @@ export class PricingCardComponent {
|
||||
readonly features = input<string[]>();
|
||||
readonly activeBadge = input<{ text: string; variant?: BadgeVariant }>();
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
||||
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
|
||||
@Output() buttonClick = new EventEmitter<void>();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user