Created
May 8, 2020 15:15
-
-
Save laheadle/8507f08982322599010933905387e13a 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 contentMachine = Machine({ | |
id: 'content', | |
initial: 'empty', | |
context: { | |
}, | |
states: { | |
empty: { | |
on: { | |
configure: 'configured' | |
} | |
}, | |
configured: { | |
on: { | |
initStore: 'hasStore' | |
} | |
}, | |
hasStore: { | |
on: { | |
showHighlight: 'hasVisibleHL' | |
} | |
}, | |
hasVisibleHL: { | |
on: { | |
createFixture: 'hasFixture' | |
} | |
}, | |
hasFixture: { | |
on: { | |
selectHighlight: 'hasCurrentSO' | |
} | |
}, | |
hasCurrentSO: { | |
on: { | |
detectChanges: 'baseStateAIsVisible' | |
} | |
}, | |
baseStateAIsVisible: { | |
on: { | |
clickAIDropDown: 'aiDropdownOpen' | |
} | |
}, | |
aiDropdownOpen: { | |
on: { | |
clickEditAI: 'aiModalOpen' | |
} | |
}, | |
aiModalOpen: { | |
initial: 'aiIsEnabled', | |
on: { done: 'baseStateAIsVisible' }, | |
states: { | |
aiIsEnabled: { on: { toggleAI: 'aiIsDisabled' } }, | |
aiIsDisabled: { on: { toggleAI: 'aiIsEnabled' } } | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment