Events & apply
The element communicates entirely through DOM CustomEvents — subscribe to as many as you
need.
| Event | Fires when | detail includes |
|---|---|---|
import-ready |
License verified, widget mounted | tenantId |
import-ingested |
A file is decoded into a record | recordId, deduplicated |
import-mapped |
Columns are matched to your schema | mapping |
import-step |
The wizard advances a step | step |
import-applied |
The import is delivered | rowCount, action, mapping |
import-error |
Something fails | code, message |
import-cancel |
The user dismisses the import | — |
const el = document.querySelector('mildport-import')!;
el.addEventListener('import-applied', e => { const { rowCount, mapping } = (e as CustomEvent).detail; console.log(`${rowCount} rows delivered`, mapping);});Two ways to receive rows
Section titled “Two ways to receive rows”Browser mode (applyMode = 'browser') — rows are handed back in-page via onResults or
the import-applied event. Good for demos and small client-side flows.
Webhook mode (applyMode = 'webhook') — the engine POSTs the applied rows to your backend
as an HMAC-signed delivery, with durable retries and an audit log. This is the production
path. See the webhook reference for the signature and headers.