Created
July 14, 2022 15:34
-
-
Save saabi/d786578c1f7c975ac8d9de30fc2d75b0 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
| Machine({ | |
| "id": "TestingBuilder", | |
| "type": "parallel", | |
| "context": { | |
| "autoExecute": false, | |
| "cached": false, | |
| "hideDisabledAxes": true, | |
| "hideDisabledAggs": false, | |
| "hideDisabledDatasets": false, | |
| "hideDisabledItems": true, | |
| "matching": false, | |
| "selectionComplete": false, | |
| "showFullResponse": false, | |
| "queryReady": false | |
| }, | |
| "states": { | |
| "GuardsConfig": { | |
| "initial": "Idle", | |
| "states": { | |
| "Idle": { | |
| "on": { | |
| "SELECTION_COMPLETE_TOGGLED": { | |
| "target": "Idle", | |
| "actions": "toggleSelectionComplete" | |
| }, | |
| "QUERY_READY_TOGGLED": { | |
| "target": "Idle", | |
| "actions": "toggleQueryReady" | |
| }, | |
| "MATCHING_TOGGLED": { | |
| "target": "Idle", | |
| "actions": "toggleMatching" | |
| }, | |
| "CACHED_TOGGLED": { | |
| "target": "Idle", | |
| "actions": "toggleCached" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "BuilderRoute": { | |
| "id": "BuilderRoute", | |
| "initial": "Loading", | |
| "on": {}, | |
| "states": { | |
| "Loading": { | |
| "on": { | |
| "READY": { | |
| "target": "#BuilderRoute.Interactive", | |
| "actions": [ | |
| "resetForms" | |
| ] | |
| } | |
| } | |
| }, | |
| "Interactive": { | |
| "type": "parallel", | |
| "states": { | |
| "Docs": { | |
| "initial": "Idle", | |
| "states": { | |
| "Idle": { | |
| "on": { | |
| "FIELD_DOC_SHOWN": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setFieldDoc" | |
| ] | |
| }, | |
| "FIELD_DOC_DEFAULT": { | |
| "target": "Idle", | |
| "actions": [ | |
| "resetFieldDoc" | |
| ] | |
| }, | |
| "AGG_DOC_SHOWN": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setAggDoc" | |
| ] | |
| }, | |
| "AGG_DOC_DEFAULT": { | |
| "target": "Idle", | |
| "actions": [ | |
| "resetAggDoc" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "FormEditing": { | |
| "initial": "Idle", | |
| "states": { | |
| "Idle": { | |
| "on": { | |
| "AUTO_EXEC_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleAutoExecute", | |
| "log" | |
| ] | |
| }, | |
| "DATASET_CHANGED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setDataset" | |
| ] | |
| }, | |
| "FORM_ADDED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "spawnNestedForm" | |
| ] | |
| }, | |
| "SELECTION_COMPLETED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "configureSubforms" | |
| ] | |
| }, | |
| "SELECTION_INCOMPLETE": { | |
| "target": "Idle", | |
| "actions": [ | |
| "deleteNestedForms" | |
| ] | |
| }, | |
| "FORM_SELECTED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "selectForm", | |
| "sendEdited" | |
| ] | |
| }, | |
| "HIDE_DISABLED_FORMS_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleHideDisabledForms" | |
| ] | |
| }, | |
| "HIDE_DISABLED_AGGS_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleHideDisabledAggs" | |
| ] | |
| }, | |
| "HIDE_DISABLED_DSETS_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleHideDisabledDatasets" | |
| ] | |
| }, | |
| "HIDE_DISABLED_FIELDS_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleHideDisabledFields" | |
| ] | |
| }, | |
| "REQUEST_TAB_SELECTED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setTab" | |
| ] | |
| }, | |
| "RESULT_SIZE_CHANGED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setResultSize" | |
| ] | |
| }, | |
| "SHOW_FULL_RESPONSE_TOGGLED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "toggleShowFullResponse" | |
| ] | |
| }, | |
| "TYPINGS_CHANGED": { | |
| "target": "Idle", | |
| "actions": [ | |
| "setTypings" | |
| ] | |
| }, | |
| "PARSING_START": { | |
| "target": "Idle", | |
| "actions": "setParsing" | |
| }, | |
| "PARSING_DONE": { | |
| "target": "Idle", | |
| "actions": "setParsingDone" | |
| }, | |
| "FORM_CHANGED": { | |
| "target": "Idle", | |
| "actions": "sendTreeChanged" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "History": { | |
| "initial": "Saved", | |
| "states": { | |
| "Saved": { | |
| "on": { | |
| "EDITED": { | |
| "target": "Editing", | |
| "actions": "initEntry" | |
| } | |
| } | |
| }, | |
| "Editing": { | |
| "on": { | |
| "EDITED": { | |
| "target": "Editing", | |
| "actions": "updateEntry" | |
| }, | |
| "COMMITTED": { | |
| "target": "Saved", | |
| "cond": "isActiveForm", | |
| "actions": "commitLastGoodURL" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "on": { | |
| "ROUTE_CHANGED": { | |
| "target": "#BuilderRoute.Interactive", | |
| "actions": [ | |
| "resetForms" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, { | |
| "actions": { | |
| "toggleAutoExecute": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "autoExecute": ctx => !ctx.autoExecute | |
| } | |
| }, | |
| "toggleCached": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "cached": ctx => !ctx.cached | |
| } | |
| }, | |
| "toggleHideDisabledAxes": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "hideDisabledAxes": ctx => !ctx.hideDisabledAxes | |
| } | |
| }, | |
| "toggleHideDisabledAggs": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "hideDisabledAggs": ctx => !ctx.hideDisabledAggs | |
| } | |
| }, | |
| "toggleHideDisabledDatasets": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "hideDisabledDatasets": ctx => !ctx.hideDisabledDatasets | |
| } | |
| }, | |
| "toggleHideDisabledItems": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "hideDisabledItems": ctx => !ctx.hideDisabledItems | |
| } | |
| }, | |
| "toggleShowFullResponse": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "showFullResponse": ctx => !ctx.showFullResponse | |
| } | |
| }, | |
| "toggleMatching": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "matching": ctx => !ctx.matching | |
| } | |
| }, | |
| "toggleSelectionComplete": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "selectionComplete": ctx => !ctx.selectionComplete | |
| } | |
| }, | |
| "toggleQueryReady": { | |
| "type": "xstate.assign", | |
| "assignment": { | |
| "queryReady": ctx => !ctx.queryReady | |
| } | |
| } | |
| }, | |
| "guards": { | |
| "isAutoExecute": ctx => ctx.autoExecute, | |
| "isInCache": ctx => ctx.cached, | |
| "isMatching": ctx => ctx.matching, | |
| "isSelectionComplete": ctx => ctx.selectionComplete, | |
| "isQueryReady": ctx => ctx.queryReady | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment