= {
width: '400px',
disableClose: false,
data: { userId: 123 },
overlayPanelClass: 'my-custom-panel-class'
};
this.actionsPanel.open(MyComponent, config);
```
```
--------------------------------
### Tree Component Example (Angular)
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/all/template.html
Shows a basic example of the Tree component, utilizing Angular's interpolation to display node values retrieved via a tree control object.
```html
{{ treeControl.getViewValue(node) }} {{ treeControl.getViewValue(node) }}
```
--------------------------------
### Basic Usage of KbqProgressSpinner
Source: https://github.com/koobiq/angular-components/blob/main/packages/components/progress-spinner/progress-spinner.en.md
Displays a simple sector progress spinner using the default Koobiq theme settings.
```html
```
--------------------------------
### Badge Component Examples
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/all/template.html
Illustrates the Badge component, used for displaying status or new information. The examples show the badge text 'Новый в работе' repeated multiple times.
```html
Новый в работе
Новый в работе
Новый в работе
Новый в работе
Новый в работе
Новый в работе
Новый в работе
```
--------------------------------
### Reactive Form with formControl in Angular
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/validation/template.html
This example demonstrates using `formControl` directly for form elements in a reactive Angular form. It includes handling typeahead suggestions and displaying validation errors for form controls.
```html
```
--------------------------------
### Form Group with Custom Validator in Angular
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/validation/template.html
This example demonstrates creating a form group with a custom validator in Angular. It specifically shows how to apply a 'required' validator to a login control and display the associated error message.
```html
```
--------------------------------
### Commit Message Structure Example
Source: https://github.com/koobiq/angular-components/blob/main/CONTRIBUTING.md
This example demonstrates the standard format for commit messages in the Koobiq project. It includes the commit type, scope, and a concise summary, adhering to present tense and no trailing punctuation for the summary.
```git
feat(button): added new type of button
```
```git
fix(button): fixes an issue of theming.
Closes #33
```
```git
refactor(button): removed deprecated method.
BREAKING CHANGE: The method has been removed.
Describe reasons.
```
--------------------------------
### KbqFullScreenDropzoneService Implementation
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/file-upload.api.md
Implements the KbqFullScreenDropzoneService for handling full-screen drop zone functionality. It extends KbqDrop and implements OnDestroy for lifecycle management. Key methods include close, createOverlay, init, ngOnDestroy, onDrop, open, and stop.
```typescript
constructor();
close(): void;
protected createOverlay(): OverlayRef;
init(config?: KbqDropzoneData): void;
// (undocumented)
ngOnDestroy(): void;
onDrop(event: DragEvent): void;
open(config?: KbqDropzoneData): void;
stop(): void;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration;
// (undocumented)
static ɵprov: i0.ɵɵInjectableDeclaration;
}
```
--------------------------------
### Open KbqActionsPanel with Data
Source: https://github.com/koobiq/angular-components/blob/main/packages/components/actions-panel/actions-panel.en.md
Demonstrates how to open an actions panel and pass custom data using the KbqActionsPanel service.
```typescript
import { inject } from '@angular/core';
import { KbqActionsPanel } from '@koobiq/components/actions-panel';
export class YourComponent {
private readonly actionsPanel = inject(KbqActionsPanel, { self: true });
openActionsPanel() {
const actionsPanelRef = this.actionsPanel.open(YourActionsPanelComponent, {
data: { name: 'koobiq' }
});
}
}
```
--------------------------------
### Inset Divider
Source: https://github.com/koobiq/angular-components/blob/main/packages/components/divider/divider.en.md
An inset divider that provides padding from the start of the container. This is useful for aligning separators with text content in lists.
```html
```
--------------------------------
### Select Component Overview
Source: https://github.com/koobiq/angular-components/blob/main/packages/components/select/select.en.md
Demonstrates the basic usage and overview of the Angular Select component, allowing users to select one or more values from a predefined list.
```html
{{ item.label }}
```
--------------------------------
### Define KbqLoaderOverlay Component and Directives
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/loader-overlay.api.md
The KbqLoaderOverlay class manages the display of loading states, supporting custom indicators, text, and captions. It implements OnInit and OnDestroy interfaces to handle component lifecycle and provides inputs for size, transparency, and content configuration.
```typescript
export class KbqLoaderOverlay implements OnInit, OnDestroy {
constructor(elementRef: ElementRef, renderer: Renderer2);
caption: string;
size: KbqDefaultSizes;
text: string;
transparent: boolean;
ngOnDestroy(): void;
ngOnInit(): void;
}
```
--------------------------------
### Build Commands for Angular Components Project
Source: https://github.com/koobiq/angular-components/blob/main/AGENTS.md
These commands are used to build various parts of the angular-components project, including the main components library, CDK utilities, experimental components, date adapters, CLI, schematics, and documentation.
```bash
yarn run build:components # Build main components library
yarn run build:cdk # Build CDK utilities
yarn run build:components-experimental # Build experimental components
yarn run build:angular-luxon-adapter # Build Luxon date adapter
yarn run build:angular-moment-adapter # Build Moment date adapter
yarn run build:cli # Build release management CLI
yarn run build:schematics # Build Angular CLI schematics
yarn run styles:build-all # Build all SCSS bundles
yarn run docs:build # Build docs app for production
```
--------------------------------
### Configure Content Panel Container
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/content-panel.api.md
The KbqContentPanelContainer provides functionality for opening, closing, and resizing panels. It utilizes Angular signals for state management and supports inputs for width constraints and interaction settings.
```typescript
export class KbqContentPanelContainer {
open(): void;
close(): void;
toggle(): void;
readonly isOpened: Signal;
readonly width: InputSignalWithTransform;
readonly minWidth: InputSignalWithTransform;
readonly maxWidth: InputSignalWithTransform;
}
```
--------------------------------
### KbqRectangleItem
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/core.api.md
Represents an item within a rectangular layout, providing functionality to get its outer element width and manage its collapsed state.
```APIDOC
## KbqRectangleItem
### Description
Represents an item within a rectangular layout, providing functionality to get its outer element width and manage its collapsed state.
### Class
KbqRectangleItem
### Properties
- **collapsed** (boolean) - Gets or sets the collapsed state of the item.
- **state** (Subject) - Subject to emit state changes.
- **isBrowser** (boolean) - Protected property indicating if the code is running in a browser environment.
- **nativeElement** (HTMLElement) - Protected property referencing the native HTML element.
```
--------------------------------
### KbqActionsPanelRef
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/actions-panel.api.md
Reference object for interacting with an opened actions panel.
```APIDOC
## KbqActionsPanelRef
### Description
Provides a reference to an opened `KbqActionsPanel`, allowing for programmatic control and observation of its lifecycle.
### Properties
- **containerInstance** (`KbqActionsPanelContainer`): The instance of the `KbqActionsPanelContainer` component.
- **id** (`string`): The unique ID of the overlay element.
- **overlayRef** (`OverlayRef`): The CDK overlay reference.
### Methods
- **close(result?: R): void**
Closes the actions panel and optionally returns a result.
- **result** (`R`): The result to be returned when the panel is closed.
- **afterClosed**: `Observable`
An observable that emits when the dialog is closed. The emitted value is the result returned from the `close` method.
- **afterOpened**: `Observable`
An observable that emits when the dialog has been opened and attached to the view.
- **keydownEvents**: `Observable`
An observable that emits keyboard events that occur while the dialog is open.
### Example Usage
```typescript
const panelRef = this.actionsPanel.open(MyComponent);
panelRef.afterOpened.subscribe(() => {
console.log('Actions panel has been opened.');
});
panelRef.afterClosed.subscribe(result => {
console.log('Actions panel closed with:', result);
});
// To close the panel programmatically
// setTimeout(() => {
// panelRef.close('Operation successful');
// }, 5000);
```
```
--------------------------------
### Provide Default Actions Panel Configuration in TypeScript
Source: https://github.com/koobiq/angular-components/blob/main/tools/public_api_guard/components/actions-panel.api.md
A provider function to set the default configuration for the KbqActionsPanel. This allows for easy customization of default behaviors across the application.
```typescript
import { Provider } from '@angular/core';
import { KbqActionsPanelConfig } from './actions-panel-config';
export const kbqActionsPanelDefaultConfigProvider: (config: KbqActionsPanelConfig) => Provider;
```
--------------------------------
### Template-Driven Form in Angular
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/validation/template.html
This snippet shows a basic template-driven form in Angular. It uses template references and directives to manage form state and display user input.
```html
```
--------------------------------
### Basic HTML Structure for Angular Application
Source: https://github.com/koobiq/angular-components/blob/main/packages/docs-examples/components/markdown/markdown-code-block/markdown-code-block-example.html
This HTML file represents the root of an Angular application. It includes essential meta tags for character set and viewport, and a title for the browser tab. The `` tag is a placeholder for the main Angular component that bootstraps the application.
```html
Koobiq
```
--------------------------------
### Alert Component Examples
Source: https://github.com/koobiq/angular-components/blob/main/packages/components-dev/all/template.html
Demonstrates the usage of the Alert component in Angular. It shows basic alert messages and includes a comment suggesting the implementation of a separate button for actions.
```html
Alert text
Alert text
Alert text
Alert text
Alert text
```
--------------------------------
### Import Fontsource styles in SCSS
Source: https://github.com/koobiq/angular-components/blob/main/packages/components/core/styles/typography/typography.en.md
Imports specific font weights and styles into the global stylesheet of the Angular application. This ensures the fonts are bundled and available globally.
```scss
// Inter
@import '@fontsource/inter/400.css';
@import '@fontsource/inter/500.css';
@import '@fontsource/inter/600.css';
@import '@fontsource/inter/700.css';
@import '@fontsource/inter/400-italic.css';
@import '@fontsource/inter/500-italic.css';
// JetBrains Mono
@import '@fontsource/jetbrains-mono/400.css';
@import '@fontsource/jetbrains-mono/700.css';
```