Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@lakea/gravity-popover-adapter-floating-ui
Advanced tools
An adapter for `GrPopover` using [`Floating UI`](https://floating-ui.com/) as implementation.
An adapter for GrPopover
using Floating UI
as implementation.
Install the library using NPM:
npm install @lakea/gravity-popover-adapter-floating-ui @floating-ui/dom --save
Next, create a new file, cookie-adapter-root.module.ts
which exposes an Angular's module with a default configuration.
import {NgModule} from '@angular/core';
import {GrPopover} from '@lakea/gravity/ui';
import {GrPopoverAdapterFloatingUi} from '@lakea/gravity-popover-adapter-floating-ui';
@NgModule({
providers: [
{
provide: GrPopover,
useClass: GrPopoverAdapterFloatingUi,
},
],
})
export class PopoverAdapterRootModule {}
Import PopoverAdapterRootModule
to application root module like app.module.ts
.
You should import the PopoverAdapterRootModule once in your root module.
The PopoverAdapterRootModule
provide the adapter implementation for GrPopover
.
Create your adapter implementation class extending GrPopover
abstraction:
import {Injectable} from '@angular/core';
import {GrPopover, GrPopoverInstance, GrPopoverPlacements} from '@lakea/gravity/ui';
@Injectable()
export class GrPopoverAdapter extends GrPopover {
constructor() {
super();
}
public create(trigger: HTMLElement, element: HTMLElement, placement: GrPopoverPlacements): GrPopoverInstance {
// YOUR IMPLEMENTATION
}
}
class GrPopoverAdapterInstance implements GrPopoverInstance {
constructor(trigger: HTMLElement, element: HTMLElement, placement: GrPopoverPlacements) {
}
public show(): void {
// YOUR IMPLEMENTATION
}
public hide(): void {
// YOUR IMPLEMENTATION
}
public destroy(): void {
// YOUR IMPLEMENTATION
}
}
So, provide it on your application root module (maybe app.module.ts
), like this:
providers: [
{
provide: GrPopover,
useClass: GrPopoverAdapter,
}
]
FAQs
An adapter for `GrPopover` using [`Floating UI`](https://floating-ui.com/) as implementation.
We found that @lakea/gravity-popover-adapter-floating-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
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.