Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@backbone.one/bb1-web-components
Advanced tools
To install the BB1EnergyCalculator
web component, you need to use npm. Run the following command in your project
directory:
npm i @backbone.one/bb1-web-components
After installing the package, you can use the bb1-energy-calculator
web component in your project. Follow the steps
below to integrate it into your application.
Import the Component
Import the @backbone-one/web-components
web component in your JavaScript or TypeScript file:
import '@backbone-one/web-components';
Add the Component to Your HTML
You can now use the bb1-energy-calculator
component in your HTML. Here is an example of how to include it in your
HTML file:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Your Page</title>
</head>
<body>
<bb1-energy-calculator
offer-service-api-key="your-api-key"
calculator-link="https://your-domain.com/#/energy-calculator"
translations='{"key": "value"}'
onsubmit="handleSubmit"
onerror="handleError"
></bb1-energy-calculator>
</body>
</html>
Attributes
The bb1-energy-calculator
component accepts the following attributes:
offer-service-api-key
(string): The API key for the offer service.calculator-link
(string?): The URL to the tariff calculator that will be opened when the form is submitted. If not provided, no calculator will be opened.translations
(object): A JSON object containing translation keys and values.onsubmit
(function(event: Event): void?): A JavaScript function to handle the form submission.onerror
(function(error: Error): void?): A JavaScript function to handle errors.Translations
The translations
attribute accepts a JSON object with the following keys:
title
(string): The title of the calculator.subTitle
(string): The subtitle of the calculator.householdSize
(string): The label for the household size input.annualConsumption
(string): The label for the annual consumption input.zip
(string): The label for the ZIP code input.zipPlaceholder
(string): The placeholder for the ZIP code input.gridOperator
(string): The label for the grid operator input.gridOperatorPlaceholder
(string): The placeholder for the grid operator input.gridOperatorInfo
(string): The info text for the grid operator input.submit
(string): The text for the submit button.FAQs
#### Installation
We found that @backbone.one/bb1-web-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.