extractNavigationTargets
extractNavigationTargets(
mock):string[]
Defined in: packages/core/src/extractNavigationTargets.ts:27
Extracts all navigation target screen IDs from a mock definition.
This function collects all navigateTo, itemNavigateTo, and rowNavigateTo
values from mock elements to automatically derive the next array.
It recursively processes child sections.
Parameters
Section titled “Parameters”The screen mock definition
Returns
Section titled “Returns”string[]
Array of unique screen IDs that can be navigated to
Example
Section titled “Example”const mock = { sections: [{ elements: [ { type: "button", label: "Edit", navigateTo: "billing.invoice.edit" }, { type: "list", label: "Items", itemNavigateTo: "billing.item.detail" }, ] }]}extractNavigationTargets(mock)// => ["billing.invoice.edit", "billing.item.detail"]