@echelon-framework/runtime
v0.7.1
Published
Echelon runtime — default implementacje warstw infrastrukturalnych (DataBus, EventBus, ErrorBus, Clock, Logger, Storage, CorrelationIdGenerator) + config loader + widget host.
Downloads
350
Maintainers
Readme
@echelon-framework/runtime
Angular runtime for Echelon — widget host, handler engine, binding engine, DataBus/EventBus implementations.
Installation
npm install @echelon-framework/runtimeSetup
import { provideEchelon } from '@echelon-framework/runtime';
export const appConfig = {
providers: [
...provideEchelon({
widgets: [MyWidget, ...],
functions: [MyFunction, ...],
dataSources: [MyDS, ...],
pages: [...],
}),
],
};@EchelonWidget decorator
import { EchelonWidget } from '@echelon-framework/runtime';
@EchelonWidget({
manifest: {
type: 'my-widget',
version: '1.0.0',
category: 'data',
inputs: [{ name: 'rows', type: 'object[]', required: true }],
outputs: [{ name: 'select', eventType: 'my-widget.select' }],
},
selector: 'my-widget',
imports: [CommonModule],
template: `...`,
})
export class MyWidgetComponent { ... }Handler Engine
Declarative event handlers with actions:
// setDatasource — overwrite value
{ setDatasource: 'selected', from: '$event' }
// mergeDatasource — shallow merge (wizard accumulation)
{ mergeDatasource: 'draft', from: '$event' }
// emit — fire event
{ emit: 'fx.deal.completed', payload: '$event' }
// fetch — HTTP request → datasource
{ fetch: 'api/clients', into: 'clientsList', with: { page: 1 } }
// navigate — router
{ navigate: '/clients/123' }
// callComputed — pure function
{ callComputed: 'computeRate', with: ['$event.spot'], into: 'result' }Injection Tokens
import { DATA_BUS, EVENT_BUS, WIDGET_REGISTRY, TRANSPORT } from '@echelon-framework/runtime';License
BUSL-1.1
