@codella-software/utils
v2.2.22
Published
Codella core services: FormBuilder, TableBuilder, FiltersAndSort, RichContent (framework-agnostic)
Downloads
887
Maintainers
Readme
@codella-software/utils
Framework-agnostic core services for building dynamic forms, tables, and more with TypeScript and RxJS.
Features
- FormBuilder - Comprehensive form state management with validation, masks, and middleware
- TableBuilder - Dynamic table management with filtering, sorting, and pagination
- FiltersAndSort - Flexible filtering and sorting logic for data operations
- TabsService - Tab state management and navigation
- APIService - RESTful API client with authentication, error handling, request/response interceptors, and middleware hooks
- LiveUpdatesService - Real-time updates via WebSocket or Server-Sent Events
Installation
npm install @codella-software/utilsQuick Start
FormBuilder
import { FormBuilder } from '@codella-software/utils';
const form = new FormBuilder({
fields: [
{ name: 'email', type: 'text', validators: ['required', 'email'] },
{ name: 'password', type: 'password', validators: ['required'] }
]
});
form.values$.subscribe(values => console.log(values));TableBuilder
import { TableBuilder } from '@codella-software/utils';
const table = new TableBuilder({
data: [{ id: 1, name: 'John' }],
columns: [
{ key: 'id', label: 'ID' },
{ key: 'name', label: 'Name' }
]
});
table.filteredData$.subscribe(data => console.log(data));APIService
import { createAPIClient } from '@codella-software/utils';
const api = createAPIClient({
baseURL: 'https://api.example.com',
authProvider: customAuthProvider
});
api.get('/users').then(data => console.log(data));Documentation
For full API documentation, visit https://CodellaSoftware.github.io/codella-utils/
License
MIT
