@plotinus/matrix-package-observable-coordinator
Version:
Observable coordinator pattern components using IntrospectableBaseCommunicationComponent and proper presentation architecture
25 lines (24 loc) • 852 B
JavaScript
/**
* PHASE 2: Component Definition DSL content for browser bundles
*
* These definitions can be registered with the DefinitionRegistry
* when the package is loaded in the browser.
*/
export const componentDefinitions = {
'app': `<app-definition
emits="SystemCompleted:direct"
onCompleteJob="handleCompleteJob"
/>`,
'coordinator': `<coordinator-definition
emits="CoordinatorReady:direct,CoordinatorDone:direct"
onProcessJob="handleProcessJob"
onJobCompleted="handleJobCompleted"
>
<worker id="workerA" onJobCompleted="handleWorkerJobCompleted" />
<worker id="workerB" onJobCompleted="handleWorkerJobCompleted" />
</coordinator-definition>`,
'worker': `<worker-definition
emits="JobCompleted:direct"
onStartJob="handleStartJob"
/>`
};