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 canSubmit = ctx => !!(ctx.username && ctx.password && ctx.companyId) | |
| const commonActions = { | |
| CLICK_COMPANY_ID: "companyId", | |
| CLICK_USERNAME: "username", | |
| CLICK_PASSWORD: "password", | |
| CLICK_OUTSIDE: "nothingHasFocus", | |
| CLICK_LOGIN: [ | |
| { |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
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
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions | |
| // - XState (all XState exports) |
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 updatePosition = assign({ | |
| position: (_, event) => event.position, | |
| }) | |
| function geoService(context, event) { | |
| return cb => { | |
| if (!navigator.geolocation) { | |
| cb({ | |
| type: 'error', | |
| error: new Error('Geolocation is not supported'), |
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 context = { | |
| questions: ["Q1", "Q2", "Q3"], | |
| current: -1, | |
| answers: new Map() | |
| } | |
| const machine = Machine( | |
| { | |
| id: "quiz", | |
| initial: "quizzing", |
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 valueInput = id => ({ | |
| initial: "empty", | |
| states: { | |
| empty: { | |
| on: { | |
| [`${id}.LOCK`]: { | |
| target: "locked", | |
| actions: send('STEP') | |
| } | |
| } |
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 machine = Machine({ | |
| "id": "bms", | |
| "type": "parallel", | |
| "states": { | |
| "login": { | |
| "id": "login", | |
| "type": "parallel", | |
| "states": { | |
| "username": { | |
| "type": "parallel", |
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
| BMS_SignUp_Onboarding | |
| PurchaseLicense& | |
| PremiumService | |
| SelectPremiumService | |
| selectService -> PremiumService | |
| viewExtendedDecription -> ViewExtendedDescription | |
| ViewExtendedDescription | |
| close -> SelectPremiumService | |
| Payment& |
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
| BMS_SignUp_Onboarding | |
| PurchaseLicense& | |
| submit -> SubmittingPurchase | |
| PremiumService | |
| SelectPremiumService | |
| selectService -> PremiumService | |
| viewExtendedDecription -> ViewExtendedDescription | |
| ViewExtendedDescription | |
| close -> SelectPremiumService |
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
| Topolokus | |
| Noop | |
| addPolygonBtnClick -> AddPolygon | |
| AddPolygon | |
| cancelBtnClick -> Noop | |
| escapeKeyPress -> Noop | |
| Start | |
| MouseOut |