Configuration
Unique identifier for this step. Used as a fallback label in the stepper progress bar if
label is omitted.Which built-in step this custom step is inserted after.
| Value | Inserted after |
|---|---|
"HEADER_SELECT" | Header row detection |
"COLUMN_MATCH" | Column mapping |
"SELECT_MATCH" | Select field matching, just before Review |
Text shown in the stepper progress bar. Defaults to
id if omitted.URL of the page to render inside an
<iframe> within Dromo’s modal.Called when the iframe posts
{ type: "DROMO_MESSAGE", payload }. The uploader argument exposes the same mutation methods available in step hooks.All uploader methods return Promise<void> — await them when order matters.Registering custom steps
JavaScript / TypeScript
registerCustomStep on the DromoUploader instance before open(). Multiple calls at the same insertAfter position are presented in registration order.
React
Pass an array of config objects to thecustomSteps prop:
Angular
Bind a config array to the[customSteps] input on lib-dromo-uploader:
postMessage API
Your iframe page communicates with Dromo by posting messages towindow.parent.
Navigation messages
{ type: "DROMO_NEXT" }
Advance to the next step.
{ type: "DROMO_BACK" }
Return to the previous step.
{ type: "DROMO_MESSAGE", payload: any }
Trigger the
onMessage callback with the uploader instance and payload. Does not automatically navigate — post DROMO_NEXT separately when ready.Uploader methods in onMessage
The uploader instance passed to onMessage exposes the following methods. These are the same mutation methods available in step hooks.
addField(field, position?) => Promise<void>
Dynamically add a field to the import schema. See
instance.addField.removeField(key) => Promise<void>
Remove a field from the schema. See
instance.removeField.addRows(rows) => Promise<string[]>
Inject rows into the dataset. Returns the IDs of the added rows. See
instance.addRows.removeRows(ids) => Promise<void>
Remove rows from the dataset by ID. See
instance.removeRows.setUser(user) => Promise<void>
Update the current user associated with the import.
