diff --git a/AlgebraicDataflowArchitectureModel/models/TestTable.model b/AlgebraicDataflowArchitectureModel/models/TestTable.model new file mode 100644 index 0000000..bef7ac2 --- /dev/null +++ b/AlgebraicDataflowArchitectureModel/models/TestTable.model @@ -0,0 +1,309 @@ +init { + screenTemplates := { + "screen1":{ + "widgets": { + "7019851523234447a240c3dedba971e5": {"type": "button", "text": "名刺登録", "visible": true, "x": 106, "y": 63, "width": 100, "height": 40}, + "52d3cfc247dd4b44a880425d8121dd35": {"type": "button", "text": "名刺一覧", "visible": true, "x": 414, "y": 64, "width": 100, "height": 40}, + "df8a46be90e541a29f236b8a1805dee3": {"type": "button", "text": "スタートアップ企業登録", "visible": true, "x": 55, "y": 197, "width": 197, "height": 41}, + "730bd4998e06476c908909f5ea5d5214": {"type": "button", "text": "スタートアップ企業一覧", "visible": true, "x": 357, "y": 200, "width": 191, "height": 39} + }, + "layout": false +}, + "screen2":{ + "widgets": { + "eab4ab11006a4d4aad2941dc88e6c1c1": {"type": "label", "text": "住所", "visible": true, "x": 11, "y": 191, "width": 101, "height": 22}, + "d91784537b284fe18600d341b0892205": {"type": "label", "text": "氏名", "visible": true, "x": 13, "y": 151, "width": 98, "height": 22}, + "9e93ff73634f41a2b5140971719ef059": {"type": "label", "text": "会社名", "visible": true, "x": 14, "y": 101, "width": 104, "height": 28}, + "393eb3ce387a4ae4ac3a37acbede16ec": {"type": "label", "text": "名刺id", "visible": true, "x": 10, "y": 58, "width": 98, "height": 21}, + "7635b0b5c7d9473c83466ba17dfd4672": {"type": "label", "text": "名刺登録", "visible": true, "x": 254, "y": 14, "width": 100, "height": 40}, + "compNameInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 107, "y": 104, "width": 386, "height": 26}, + "addressInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 108, "y": 190, "width": 390, "height": 27}, + "personNameInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 108, "y": 149, "width": 389, "height": 25}, + "nameCardIdInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 107, "y": 58, "width": 392, "height": 26}, + "7c349c606bda40bfa86f201d7ab07738": {"type": "button", "text": "戻る", "visible": true, "x": 94, "y": 263, "width": 100, "height": 40}, + "4d368f3942014e34973c9573bc10f026": {"type": "button", "text": "登録", "visible": true, "x": 406, "y": 260, "width": 100, "height": 40} + }, + "layout": false +}, + "screen3":{ + "widgets": { + "eb3f0d77a0e949e18ae46688fc08e4b8": {"type": "table", "text": "table", "visible": true, "x": 10, "y": 10, "width": 571, "height": 267, "data": {"_": {"companyName": "_", "personName": "_", "address": "_"}}, "columns": append(append(append(nil, "address"), "personName"), "companyName"), "primaryKeyName": "nameCardId"}, + "9a7147d3c6a844cf91c748af4e8b975a": {"type": "button", "text": "戻る", "visible": true, "x": 244, "y": 285, "width": 100, "height": 40} + }, + "layout": false +}, + "screen4":{ + "widgets": { + "56a620652f6849c1ac5646fde0bbab6e": {"type": "label", "text": "スタートアップid", "visible": true, "x": 5, "y": 54, "width": 106, "height": 23}, + "1b6391c537be42e6b5781ae200f71df8": {"type": "label", "text": "代表者名", "visible": true, "x": 6, "y": 90, "width": 108, "height": 24}, + "800ceeb6df24462fbed616c28a7d61a1": {"type": "label", "text": "代表者役職", "visible": true, "x": 6, "y": 126, "width": 99, "height": 21}, + "b8f128ddd50041389ea1d72544ad5490": {"type": "label", "text": "名刺id", "visible": true, "x": 7, "y": 165, "width": 94, "height": 25}, + "a971db3aa04b4387ba201ec5556385c7": {"type": "label", "text": "設立日", "visible": true, "x": 8, "y": 204, "width": 84, "height": 23}, + "1bfed77c640141a493492c4c966ec7dc": {"type": "label", "text": "事業内容", "visible": true, "x": 7, "y": 243, "width": 88, "height": 27}, + "45c778d316964c5d92c9211bee8220d6": {"type": "label", "text": "スタートアップ企業登録", "visible": true, "x": 205, "y": 11, "width": 172, "height": 29}, + "startupIdInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 113, "y": 54, "width": 399, "height": 25}, + "topNameInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 113, "y": 91, "width": 403, "height": 24}, + "postInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 112, "y": 128, "width": 409, "height": 24}, + "nameCardIdInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 112, "y": 165, "width": 408, "height": 27}, + "establisedDateInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 112, "y": 204, "width": 416, "height": 24}, + "contentsInput": {"type": "textInput", "text": "textInput", "visible": true, "x": 111, "y": 243, "width": 415, "height": 23}, + "c34157984ccc4bf5b9d86f0ce366888f": {"type": "button", "text": "戻る", "visible": true, "x": 104, "y": 292, "width": 100, "height": 40}, + "31737106f75b42829336630b7640cc59": {"type": "button", "text": "登録", "visible": true, "x": 406, "y": 289, "width": 100, "height": 40} + }, + "layout": false +}, + "screen5":{ + "widgets": { + "42271e4903044634a535ba4a88f7c733": {"type": "table", "text": "table", "visible": true, "x": 6, "y": 8, "width": 569, "height": 274, "data": {"_": {"topName": "_", "topPost": "_", "companyNameOfCompany": "_", "addressOfCompany": "_", "establishedDate": "_", "contents": "_"}}, "columns": append(append(append(append(append(append(nil, "contents"), "establishedDate"), "addressOfCompany"), "companyNameOfCompany"), "topPost"), "topName"), "primaryKeyName": "startupCompanyId"}, + "8314bfb998d24c26af0882c0d6bed852": {"type": "button", "text": "戻る", "visible": true, "x": 264, "y": 289, "width": 100, "height": 40} + }, + "layout": false +}, + "screen6":{ + "widgets": { + "b0c9a7cd4ad54d529e2e9c82a7704d52": {"type": "label", "text": "登録に失敗しました", "visible": true, "x": 198, "y": 97, "width": 259, "height": 31}, + "6f6349a4042a4604be8b3618da94eed8": {"type": "button", "text": "戻る", "visible": true, "x": 215, "y": 217, "width": 100, "height": 40} + }, + "layout": false +}, + "screen7":{ + "widgets": { + "c7d077fc04d64b11a6e8372fb7defee0": {"type": "button", "text": "button", "visible": true, "x": 10, "y": 10, "width": 100, "height": 40} + }, + "layout": false +} + } + curScreen := "screen1" + nameCardIdInput := "nameCardIdInput" + compNameInput := "compNameInput" + personNameInput := "personNameInput" + addressInput := "addressInput" + screen3 := "screen3" + eb3f0d77a0e949e18ae46688fc08e4b8 := "eb3f0d77a0e949e18ae46688fc08e4b8" + startupIdInput := "startupIdInput" + topNameInput := "topNameInput" + postInput := "postInput" + nameCardIdInput := "nameCardIdInput" + establisedDateInput := "establisedDateInput" + contentsInput := "contentsInput" + screen5 := "screen5" + 42271e4903044634a535ba4a88f7c733 := "42271e4903044634a535ba4a88f7c733" + nameCardIdInput := "nameCardIdInput" + compNameInput := "compNameInput" + personNameInput := "personNameInput" + addressInput := "addressInput" + startupIdInput := "startupIdInput" + topNameInput := "topNameInput" + postInput := "postInput" + nameCardIdInput := "nameCardIdInput" + establisedDateInput := "establisedDateInput" + contentsInput := "contentsInput" +} +native channel ScreenUpdate { + in screen(curSc: Json, update(curSc, nextSc)) = nextSc +} + +native channel SetLayout { + in screen.layout(curLayout: Bool, setLayout(nextLayout)) = nextLayout +} + +native channel SetVisible(wid: Str) { + in screen.widgets.{wid}.visible(curVisible: Bool, setVisible(nextVisible)) = nextVisible +} + +native channel SetText(wid: Str) { + in screen.widgets.{wid}.text(curText: Str, setText(nextText)) = nextText +} + +native channel SetX(wid: Str) { + in screen.widgets.{wid}.x(curX: Int, setX(nextX)) = nextX +} + +native channel SetY(wid: Str) { + in screen.widgets.{wid}.y(curY: Int, setY(nextY)) = nextY +} + +native channel SetWidth(wid: Str) { + in screen.widgets.{wid}.width(curWidth: Int, setWidth(nextWidth)) = nextWidth +} + +native channel SetHeight(wid: Str) { + in screen.widgets.{wid}.height(curHeight: Int, setHeight(nextHeight)) = nextHeight +} + +native channel OnTableChanged(wid: Str) { + in screen.widgets.{wid}.data(curData: Map, tableChanged(nextData)) = nextData +} + +native channel MouseEvent(wid: Str) { + out screen.widgets.{wid}.state(curState: Int, mouseEvent(nextState)) = nextState +} + +native channel TextEvent(wid: Str) { + out screen.widgets.{wid}.text(curText: Str, textEvent(nextText)) = nextText +} + +channel ChangeCurScreen { + out curScreen(curScId: Str, changeCurScreen(nextScId)) = nextScId +} + +channel ScreenTransition { + in curScreen(curScId: Str, transScreen(nextScId, screen)) = nextScId + ref screenTemplates.{nextScId}(screen, transScreen(nextScId, screen)) + out screen(curS, transScreen(nextScId, screen)) = screen +} + +channel EventDispatch(wid: Str) { + in screen.widgets.{wid}.state(curState: Int, dispatchEvent(curScId, wid, nextState)) = nextState + ref curScreen(curScId: Str, dispatchEvent(curScId, wid, nextState)) + out screenTemplates.{curScId}.widgets.{wid}.state(curState: Int, dispatchEvent(curScId, wid, nextState)) = nextState +} + +channel EventDispatch2(wid: Str) { + in screen.widgets.{wid}.text(curText: Str, dispatchEvent2(curScId, wid, nextText)) = nextText + ref curScreen(curScId: Str, dispatchEvent2(curScId, wid, nextText)) + out screenTemplates.{curScId}.widgets.{wid}.text(curText: Str, dispatchEvent2(curScId, wid, nextText)) = nextText +} + +channel OnWidgetUpdata(scId: Str, wid: Str) { + ref curScreen(curScId: Str, handle(curScId: Str, screen: Json, wid)) + in screenTemplates.{scId=curScId}.widgets.{wid}(curScreen, handle(curScId, nextScreen, wid)) = nextScreen + out screen.widgets.{wid}(cur, handler(curScId, next, wid)) = next +} + +channel 7019851523234447a240c3dedba971e5Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen1"}.widgets.{wid="7019851523234447a240c3dedba971e5"}.state(curState: Str, 7019851523234447a240c3dedba971e5Navigate(nextState)) = nextState + out curScreen(curScId: Str, 7019851523234447a240c3dedba971e5Navigate(nextState)) = if(nextState==0, "screen2", curScId) +} +channel 52d3cfc247dd4b44a880425d8121dd35Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen1"}.widgets.{wid="52d3cfc247dd4b44a880425d8121dd35"}.state(curState: Str, 52d3cfc247dd4b44a880425d8121dd35Navigate(nextState)) = nextState + out curScreen(curScId: Str, 52d3cfc247dd4b44a880425d8121dd35Navigate(nextState)) = if(nextState==0, "screen3", curScId) +} +channel df8a46be90e541a29f236b8a1805dee3Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen1"}.widgets.{wid="df8a46be90e541a29f236b8a1805dee3"}.state(curState: Str, df8a46be90e541a29f236b8a1805dee3Navigate(nextState)) = nextState + out curScreen(curScId: Str, df8a46be90e541a29f236b8a1805dee3Navigate(nextState)) = if(nextState==0, "screen4", curScId) +} +channel 730bd4998e06476c908909f5ea5d5214Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen1"}.widgets.{wid="730bd4998e06476c908909f5ea5d5214"}.state(curState: Str, 730bd4998e06476c908909f5ea5d5214Navigate(nextState)) = nextState + out curScreen(curScId: Str, 730bd4998e06476c908909f5ea5d5214Navigate(nextState)) = if(nextState==0, "screen5", curScId) +} +channel 7c349c606bda40bfa86f201d7ab07738Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen2"}.widgets.{wid="7c349c606bda40bfa86f201d7ab07738"}.state(curState: Str, 7c349c606bda40bfa86f201d7ab07738Navigate(nextState)) = nextState + out curScreen(curScId: Str, 7c349c606bda40bfa86f201d7ab07738Navigate(nextState)) = if(nextState==0, "screen1", curScId) +} +channel 4d368f3942014e34973c9573bc10f026NameCardsSetData(scId: Str, wid: Str){ + in screenTemplates.{scId="screen2"}.widgets.{wid="4d368f3942014e34973c9573bc10f026"}.state(curState, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) = nextState + ref nameCardIdInput(nameCardIdInput, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref screen.widgets.{nameCardIdInput}.text(nameCardId, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref compNameInput(compNameInput, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref screen.widgets.{compNameInput}.text(companyName, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref personNameInput(personNameInput, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref screen.widgets.{personNameInput}.text(personName, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref addressInput(addressInput, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref screen.widgets.{addressInput}.text(address, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + ref nameCards(nameCardsRef, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) + out nameCards(nameCards: Map, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) = if((nextState == 0) && (nameCardId != "") && (!contains(nameCardsRef, nameCardId)), insert(nameCards, nameCardId, {"companyName": companyName, "personName": personName, "address": address}), nameCards) + out curScreen(curScreen, 4d368f3942014e34973c9573bc10f026NameCardsSetData(nextState, nameCardId, nameCardIdInput, companyName, compNameInput, personName, personNameInput, address, addressInput, nameCardsRef)) = if((nextState == 0), if((nameCardId != "") && (!contains(nameCardsRef, nameCardId)), "screen1", "screen6"), curScreen) +} +channel sendNameCardsToEb3f0d77a0e949e18ae46688fc08e4b8 { + in nameCards(cur: Map, sendNameCardsToEb3f0d77a0e949e18ae46688fc08e4b8(next: Map, scId:Str, wid:Str)) = next + ref screen3(scId:Str, sendNameCardsToEb3f0d77a0e949e18ae46688fc08e4b8(next, scId, wid)) + ref eb3f0d77a0e949e18ae46688fc08e4b8(wid: Str, sendNameCardsToEb3f0d77a0e949e18ae46688fc08e4b8(next, scId, wid)) + out screenTemplates.{scId}.widgets.{wid}.data(cur: Map, sendNameCardsToEb3f0d77a0e949e18ae46688fc08e4b8(next, scId, wid)) = next +} + + +channel 9a7147d3c6a844cf91c748af4e8b975aNavigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen3"}.widgets.{wid="9a7147d3c6a844cf91c748af4e8b975a"}.state(curState: Str, 9a7147d3c6a844cf91c748af4e8b975aNavigate(nextState)) = nextState + out curScreen(curScId: Str, 9a7147d3c6a844cf91c748af4e8b975aNavigate(nextState)) = if(nextState==0, "screen1", curScId) +} +channel c34157984ccc4bf5b9d86f0ce366888fNavigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen4"}.widgets.{wid="c34157984ccc4bf5b9d86f0ce366888f"}.state(curState: Str, c34157984ccc4bf5b9d86f0ce366888fNavigate(nextState)) = nextState + out curScreen(curScId: Str, c34157984ccc4bf5b9d86f0ce366888fNavigate(nextState)) = if(nextState==0, "screen1", curScId) +} +channel 31737106f75b42829336630b7640cc59StartupCompanySetData(scId: Str, wid: Str){ + in screenTemplates.{scId="screen4"}.widgets.{wid="31737106f75b42829336630b7640cc59"}.state(curState, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) = nextState + ref startupIdInput(startupIdInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{startupIdInput}.text(startupCompanyId, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref topNameInput(topNameInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{topNameInput}.text(topName, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref postInput(postInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{postInput}.text(topPost, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref nameCardIdInput(nameCardIdInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{nameCardIdInput}.text(nameCardIdOfCompany, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref establisedDateInput(establisedDateInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{establisedDateInput}.text(establishedDate, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref contentsInput(contentsInput, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref screen.widgets.{contentsInput}.text(contents, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + ref startupCompany(startupCompanyRef, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) + out startupCompany(startupCompany: Map, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) = if((nextState == 0) && (startupCompanyId != "") && (!contains(startupCompanyRef, startupCompanyId)), insert(startupCompany, startupCompanyId, {"topName": topName, "topPost": topPost, "nameCardIdOfCompany": nameCardIdOfCompany, "establishedDate": establishedDate, "contents": contents}), startupCompany) + out curScreen(curScreen, 31737106f75b42829336630b7640cc59StartupCompanySetData(nextState, startupCompanyId, startupIdInput, topName, topNameInput, topPost, postInput, nameCardIdOfCompany, nameCardIdInput, establishedDate, establisedDateInput, contents, contentsInput, startupCompanyRef)) = if((nextState == 0), if((startupCompanyId != "") && (!contains(startupCompanyRef, startupCompanyId)), "screen1", "screen6"), curScreen) +} +channel sendStartupCompanyTo42271e4903044634a535ba4a88f7c733 { + in startupCompany(cur: Map, sendStartupCompanyTo42271e4903044634a535ba4a88f7c733(next: Map, scId:Str, wid:Str)) = next + ref screen5(scId:Str, sendStartupCompanyTo42271e4903044634a535ba4a88f7c733(next, scId, wid)) + ref 42271e4903044634a535ba4a88f7c733(wid: Str, sendStartupCompanyTo42271e4903044634a535ba4a88f7c733(next, scId, wid)) + out screenTemplates.{scId}.widgets.{wid}.data(cur: Map, sendStartupCompanyTo42271e4903044634a535ba4a88f7c733(next, scId, wid)) = next +} + + +channel 8314bfb998d24c26af0882c0d6bed852Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen5"}.widgets.{wid="8314bfb998d24c26af0882c0d6bed852"}.state(curState: Str, 8314bfb998d24c26af0882c0d6bed852Navigate(nextState)) = nextState + out curScreen(curScId: Str, 8314bfb998d24c26af0882c0d6bed852Navigate(nextState)) = if(nextState==0, "screen1", curScId) +} +channel 6f6349a4042a4604be8b3618da94eed8Navigate(scId: Str, wid: Str){ + in screenTemplates.{scId="screen6"}.widgets.{wid="6f6349a4042a4604be8b3618da94eed8"}.state(curState: Str, 6f6349a4042a4604be8b3618da94eed8Navigate(nextState)) = nextState + out curScreen(curScId: Str, 6f6349a4042a4604be8b3618da94eed8Navigate(nextState)) = if(nextState==0, "screen1", curScId) +} + +channel addNameCards { + out nameCards(nameCards: Map, addNameCards(nameCardId: Str, companyName: Str, personName: Str, address: Str)) = insert(nameCards, nameCardId, {"companyName": companyName,"personName": personName,"address": address}) +} + +channel changeCompanyNameOfNameCards(nameCardId: Str) { + out nameCards.{nameCardId}.companyName(companyName: Str, changeCompanyNameOfNameCards(newCompanyName: Str)) = newCompanyName +} + +channel changePersonNameOfNameCards(nameCardId: Str) { + out nameCards.{nameCardId}.personName(personName: Str, changePersonNameOfNameCards(newPersonName: Str)) = newPersonName +} + +channel changeAddressOfNameCards(nameCardId: Str) { + out nameCards.{nameCardId}.address(address: Str, changeAddressOfNameCards(newAddress: Str)) = newAddress +} + +channel addStartupCompany { + out startupCompany(startupCompany: Map, addStartupCompany(startupCompanyId: Str, topName: Str, topPost: Str, establishedDate: Str, contents: Str, nameCardIdOfCompany: Str)) = insert(startupCompany, startupCompanyId, {"topName": topName,"topPost": topPost,"establishedDate": establishedDate,"contents": contents,"nameCardIdOfCompany": nameCardIdOfCompany}) +} + +channel changeTopNameOfStartupCompany(startupCompanyId: Str) { + out startupCompany.{startupCompanyId}.topName(topName: Str, changeTopNameOfStartupCompany(newTopName: Str)) = newTopName +} + +channel changeTopPostOfStartupCompany(startupCompanyId: Str) { + out startupCompany.{startupCompanyId}.topPost(topPost: Str, changeTopPostOfStartupCompany(newTopPost: Str)) = newTopPost +} + +channel changeEstablishedDateOfStartupCompany(startupCompanyId: Str) { + out startupCompany.{startupCompanyId}.establishedDate(establishedDate: Str, changeEstablishedDateOfStartupCompany(newEstablishedDate: Str)) = newEstablishedDate +} + +channel changeContentsOfStartupCompany(startupCompanyId: Str) { + out startupCompany.{startupCompanyId}.contents(contents: Str, changeContentsOfStartupCompany(newContents: Str)) = newContents +} + +channel changeNameCardIdOfCompanyOfStartupCompany(startupCompanyId: Str) { + out startupCompany.{startupCompanyId}.nameCardIdOfCompany(nameCardIdOfCompany: Str, changeNameCardIdOfCompanyOfStartupCompany(newNameCardIdOfCompany: Str)) = newNameCardIdOfCompany +} + +channel companyNameOfCompanyOfStartupCompany(startupCompanyId: Str){ + in startupCompany.{startupCompanyId}.nameCardIdOfCompany(nameCardIdOfCompany: Str, companyNameOfCompanyOfStartupCompany(newNameCardIdOfCompany: Str, newCompanyNameOfCompany: Str)) = newNameCardIdOfCompany + in nameCards.{newNameCardIdOfCompany}.companyName(companyName: Str, companyNameOfCompanyOfStartupCompany(newNameCardIdOfCompany, newCompanyNameOfCompany)) = newCompanyNameOfCompany + out startupCompany.{startupCompanyId}.companyNameOfCompany(companyNameOfCompany, companyNameOfCompanyOfStartupCompany(newNameCardIdOfCompany, newCompanyNameOfCompany)) = newCompanyNameOfCompany +} + +channel addressOfCompanyOfStartupCompany(startupCompanyId: Str){ + in startupCompany.{startupCompanyId}.nameCardIdOfCompany(nameCardIdOfCompany: Str, addressOfCompanyOfStartupCompany(newNameCardIdOfCompany: Str, newAddressOfCompany: Str)) = newNameCardIdOfCompany + in nameCards.{newNameCardIdOfCompany}.address(address: Str, addressOfCompanyOfStartupCompany(newNameCardIdOfCompany, newAddressOfCompany)) = newAddressOfCompany + out startupCompany.{startupCompanyId}.addressOfCompany(addressOfCompany, addressOfCompanyOfStartupCompany(newNameCardIdOfCompany, newAddressOfCompany)) = newAddressOfCompany +}