Privacy Policy
This section describes the BfmPrivacyPolicyComponent component.
Composition
The BfmPrivacyPolicyComponent component is composed of the following elements:
Usage
To use the BfmPrivacyPolicyComponent, you need to import it in your component:
- Angular
- Web Component
import { BfmPrivacyPolicyComponent } from "@celerofinancas/ui-auth";
@Component({
standalone: true,
selector: 'bfm-privacy-policy',
imports: [BfmPrivacyPolicyComponent],
templateUrl: './privacy-policy.component.html',
})
export class PrivacyPolicyComponent {}
Then, you can use the BfmPrivacyPolicyComponent in your template:
<bfm-privacy-policy
[hasAccepted]="hasAccepted"
[showUseTerms]="showUseTerms"
[downloadTermDescription]="downloadTermDescription"
[acceptTermDescription]="acceptTermDescription"
[privacyPolicyImage]="privacyPolicyImage"
/>
To use a web component, make sure that you have imported the javascript file in your HTML file. For more information, follow the Web components guide.
Also, have followed the Web Component Configuration guide.
If you want to use the BfmPrivacyPolicyComponent as a web component, you can import in your HTML file as follows:
<bfm-privacy-policy/>
Inputs
The BfmPrivacyPolicyComponent has the following inputs:
hasAccepted
Controls weather the user has already accepted the policy
| Type | Default |
|---|---|
boolean | false |
showUseTerms
Controls whether the user terms are displayed.
| Type | Default |
|---|---|
boolean | false |
downloadTermDescription
Text to show in the download button
| Type | Default |
|---|---|
string | Baixar termo |
acceptTermDescription
Text to show in the accept button
| Type | Default |
|---|---|
string | Aceitar |
privacyPolicyImage
The image displayed in the page.
- Accepts a string in cdsSource pattern.
| Type | Default |
|---|---|
string | assets/terms/privacy-policy.svg |
Events
The BfmPrivacyPolicyComponent has the following events:
Configuration
TOKEN PRIVACY_POLICY_TERMS
To customize the BfmPrivacyPolicyComponent, you can inject the PRIVACY_POLICY_TERMS token in your module.
This token is used to provide custom values to the component. If is not provided, the default values will be used.
Properties
| Key | Description | Default |
|---|---|---|
visibleTerms | Determines if terms are visible | false |
The PRIVACY_POLICY_TERMS default values are:
{
"visibleTerms": "false",
}
Example
To customize the BfmPrivacyPolicyComponent, you can inject the PRIVACY_POLICY_TERMS token in your module.
import { ApplicationConfig } from "@angular/core";
import { PRIVACY_POLICY_TERMS} from "@celerofinancas/ui-auth";
export const appConfig: ApplicationConfig = {
providers: [
{
provide: PRIVACY_POLICY_TERMS,
useValue: {
visibleTerms: true,
},
}
],
};