
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@nova-ui/bits
Advanced tools
In Bits, the philosophy is all about flexibility – it provides the Legos, plumbing and styles, while you control the layouts. Bits aims to provide high-quality, atomic building blocks, services and tools while allowing feature developers the ability to create whatever layouts they need.
Before you begin, make sure your development environment includes Node.js®, an npm package manager and the npm registries set.
To check your version, run node -v in a terminal/console window. To get Node.js, go to nodejs.org.
The Angular CLI is a command-line interface tool that you can use to initialize, develop, scaffold and maintain Angular applications.
You may want to check first whether it's already installed by running the following command:
ng --version
If you want to install it globally, run the following command:
npm install -g @angular/cli
In order to install bits in your project root using the CLI, run the following command:
ng add @nova-ui/bits
This will automatically perform most of the steps for you.
But, there's one additional step that needs to be done manually. Since bits uses @angular/localize
for localization, this dependency
needs to be imported in your app's polyfills.ts file. The easiest way to do this is to run the following command:
ng add @angular/localize
Installation is quite simple using npm. Nui includes all of its dependencies as part of the final build such as Angular, RxJs and more.
$ npm install @nova-ui/bits
Once all dependencies and project files are downloaded, import any component modules you want to use to the appropriate Angular
module in your project. The following example imports the NuiButtonModule
to make the ButtonComponent
available for use.
import { NuiButtonModule } from "@nova-ui/bits";
@NgModule({
imports: [
NuiButtonModule
]
})
Note that, before alpha.15, the forRoot() method was used and an optional argument in forRoot()
could be used to configure the Bits environment.
The current way to configure Bits is shown below:
import { LogLevel, NuiEnvironment } from "@nova-ui/bits";
export class OverriddenNuiEnv extends NuiEnvironment {
public logLevel: LogLevel = LogLevel.debug; // your override
}
@NgModule({
imports: [],
providers: [{
provide: NuiEnvironment,
useClass: OverriddenNuiEnv,
}],
The Nova modules you consume will search for the NuiEnvironment provider and use it; otherwise, they will use the default one. At the moment, only log levels can be configured this way.
In your root module, you need to add these imports:
imports: [
BrowserModule,
BrowserAnimationsModule,
...
]
and these providers:
providers: [
{provide: TRANSLATIONS_FORMAT, useValue: "xlf"},
{provide: MISSING_TRANSLATION_STRATEGY, useValue: MissingTranslationStrategy.Warning},
{provide: TRANSLATIONS, useValue: ""},
...
]
The TRANSLATIONS
provider can be used to internationalize bits. Details can be found here.
To get some of the styles to display, you have to add the nui
css class to the root html element:
<html class="nui">
<!--rest of page-->
</html>
To add styling for Bits, you need to modify angular.json corresponding to the targeted project with the following additions:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"stylePreprocessorOptions": {
"includePaths": [
"./node_modules/@nova-ui/bits/sdk/less"
]
},
...
}
}
}
"architect": {
"build": {
"options": {
"styles": [
"./node_modules/@nova-ui/bits/bundles/css/styles.css"
...
],
...
}
}
}
FYI - Bits does not use the Bootstrap component library nor does it include custom fonts.
We recommend the BEM naming convention for your css/less variable names, but you're free to use whatever convention you prefer.
Information about this can be found here.
By default Nova requires highlight.js (which normally goes with all of its languages which even Nova does not use). This can result in an excessively large bundle size (adds ~1MB). You can exclude the languages by updating the highlight.js import path inside your tsconfig.json file.
"compilerOptions": {
"paths": {
"highlight.js": ["./node_modules/highlight.js/lib/highlight.js"]
}
},
A schematic is a template-based code generator that supports complex logic. It is a set of instructions for transforming a software project by generating or modifying code. Schematics are part of the Angular ecosystem. Nova Bits offers the following [schematics](http://apollo-docs.swdev.local/nova-bits/release_nova_v8.x/sdk/api-docs-ng2/additional-documentation/schematics .html):
The Filtered View schematic provides the ability to create a generic filtered view that can cover many use cases for filtering a set of data. Its main responsibility is to integrate a filter group panel with a list or table view that displays the filtered data. More details can be found here To add a filtered view to your project, run the following command:
ng generate @nova-ui/bits:filtered-view --name=custom-name-for-filtered-view
The Filtered Group schematic provides the ability to create a filtered group view. It depends heavily on the LocalFilteringDataSource service, so first and foremost please check out the documentation for it. This code can be generated using the following command:
ng generate @nova-ui/bits:filter-group --name=basic-filter-group --p=app
The List schematic provides the ability to create a generic list that can cover a majority of use cases for a list. Its main responsibility is to integrate the functionality of the nui-repeat component with other components commonly used with a list such as nui-select, nui-search, nui-paginator and nui-sorter. This code can be generated using the following command:
ng g @nova-ui/bits:list --name=basic-list --p=app
Information about Atoms can be found here
Bits atoms can be imported from here: @nova-ui/bits/sdk/atoms
.
Nova Nui supports AoT. For a primer on AoT, you can go here or for a more detailed overview you can go here.
Nova formally supports the following browsers. Support for IE11 has been dropped as of Nova v9.0.0.
Using date pipe, string should be provided according to ISO format. Otherwise, put Moment object instead to avoid error in Safari browser. Follow this link for more details.
FAQs
SolarWinds Nova Framework
We found that @nova-ui/bits 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.