Last active
March 31, 2020 13:45
-
-
Save daver182/ca1ab70ff4ac31314510e7dc00b59761 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const buscarStates = { | |
id: 'file', | |
type: 'parallel', | |
states: { | |
upload: { | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
INIT_UPLOAD: 'pending' | |
} | |
}, | |
pending: { | |
on: { | |
UPLOAD_COMPLETE: 'success' | |
} | |
}, | |
success: {} | |
} | |
}, | |
download: { | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
INIT_DOWNLOAD: 'pending' | |
} | |
}, | |
pending: { | |
on: { | |
DOWNLOAD_COMPLETE: 'success' | |
} | |
}, | |
success: {} | |
} | |
}, | |
resaltar: { | |
initial: "idle", | |
states: { | |
idle: { | |
}, | |
resaltar_cuadro_texto: { | |
}, | |
resaltar_regiones: { | |
}, | |
resaltar_ordenar: { | |
}, | |
}, | |
on: { | |
RESALTAR_CUADRO_TEXTO: ".resaltar_cuadro_texto", | |
RESALTAR_REGIONES: ".resaltar_regiones", | |
RESALTAR_ORDENAR: ".resaltar_ordenar" | |
}, | |
} | |
} | |
}; | |
const yapoMachine = Machine({ | |
key: "estado", | |
initial: "vista_inicio", | |
states: { | |
vista_inicio: { | |
on: { | |
VER_VISTA_BUSQUEDA: "vista_busqueda", | |
}, | |
}, | |
vista_busqueda: { | |
on: { | |
VOLVER: "vista_inicio", | |
}, | |
...buscarStates | |
}, | |
vista_resultados: { | |
on: { | |
VER_VISTA_BUSQUEDA: "vista_busqueda", | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment