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
| My Awesome Sketch | |
| Oferty i Grupy Ofert* | |
| wybór grupy -> Lista Ofert | |
| wybór oferty -> Lista Procesów | |
| Lista Ofert | |
| wybór oferty -> Lista Procesów | |
| powrót -> Oferty i Grupy Ofert | |
| Lista Procesów |
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
| Sufler | |
| Oferty i Grupy Ofert* | |
| wybór grupy -> Lista Ofert | |
| wybór oferty -> Lista Procesów | |
| Lista Ofert | |
| wybór oferty -> Wymagania Oferty | |
| powrót -> Oferty i Grupy Ofert | |
| Wymagania Oferty |
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
| Grupy Ofert* | |
| WYBÓR GRUPY -> Oferty | |
| Oferty | |
| # Na wejściu | |
| _ENTRY | |
| Tylko jedna oferta w grupie | |
| # Wywołanie akcji | |
| Tak? -> WYBÓR OFERTY |
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
| # Wyrazy rozpoczynające się od małej litery są stanami. | |
| # Wyrazy pisane wielkimi literami są akcjami. | |
| # | |
| # `_entry` - akcja wykonyana na wejściu do danego stanu | |
| # `_entry_[suffix]` - akcja w wykonywana na wejściu do danego podstanu. Sufix jest niezbędny aby uniknąć kolizji nazw | |
| # `_entry - condition? [value]` -> akcja wykonywana tylko gdy `condition [value]` jest spełniona | |
| Sufler | |
| Resolve* | |
| _entry -> offerGroups |
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 suffMachine = Machine({ | |
| id: 'stuff', | |
| initial: 'idle', | |
| context: { | |
| /** | |
| *This value is provied from external sourcre. | |
| */ | |
| isLogged: false | |
| }, | |
| states: { |
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 m = Machine({ | |
| id: 'error', | |
| context: { | |
| list: null, | |
| currentItem: null, | |
| }, | |
| initial: 'init', | |
| states: { | |
| init: { | |
| on: { |
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
| <h1>Orange</h1> | |
| <h2>jest cool</h2> | |
| <p> | |
| lorem stuff | |
| </p> |
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
| # Wyrazy rozpoczynające się od małej litery są stanami. | |
| # Wyrazy pisane wielkimi literami są akcjami. | |
| # | |
| # `_entry` - akcja wykonyana na wejściu do danego stanu | |
| # `_entry_[suffix]` - akcja w wykonywana na wejściu do danego podstanu. Sufix jest niezbędny aby uniknąć kolizji nazw | |
| # `_entry - condition? [value]` -> akcja wykonywana tylko gdy `condition [value]` jest spełniona | |
| Sufler | |
| Resolve* | |
| _entry -> offerGroups |
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
| import { createMachine, assign } from "xstate"; | |
| type Context = { | |
| groups: number[], | |
| group: number | |
| } | |
| type Event = | |
| | { type: "SELECT_OFFER_GROUP"; data: number } | |
| | { type: "SET_GROUPS"; data: number[] }; |
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 m = Machine({ | |
| id: 'offerActionResolver', | |
| initial: 'idle', | |
| states: { | |
| idle: { | |
| on: { | |
| '': [ | |
| { target: 'fix', cond: 'isFix'}, | |
| { target: "procedures"} | |
| ] |