[reactix] leafComponent -> leaf

Removes duplications in Reactix.purs.
parent f4aba988
...@@ -70,7 +70,7 @@ type InnerProps = ...@@ -70,7 +70,7 @@ type InnerProps =
) )
annotatedFieldInner :: R2.Leaf InnerProps annotatedFieldInner :: R2.Leaf InnerProps
annotatedFieldInner = R2.leafComponent annotatedFieldInnerCpt annotatedFieldInner = R2.leaf annotatedFieldInnerCpt
annotatedFieldInnerCpt :: R.Component InnerProps annotatedFieldInnerCpt :: R.Component InnerProps
annotatedFieldInnerCpt = here.component "annotatedFieldInner" cpt where annotatedFieldInnerCpt = here.component "annotatedFieldInner" cpt where
......
...@@ -55,7 +55,7 @@ type Props = ...@@ -55,7 +55,7 @@ type Props =
data FolderStyle = FolderUp | FolderChild data FolderStyle = FolderUp | FolderChild
folderView :: R2.Leaf Props folderView :: R2.Leaf Props
folderView = R2.leafComponent folderViewCpt folderView = R2.leaf folderViewCpt
folderViewCpt :: R.Component Props folderViewCpt :: R.Component Props
folderViewCpt = here.component "folderViewCpt" cpt where folderViewCpt = here.component "folderViewCpt" cpt where
cpt { nodeId, session } _ = do cpt { nodeId, session } _ = do
......
...@@ -24,7 +24,7 @@ type NodePopupProps = ...@@ -24,7 +24,7 @@ type NodePopupProps =
) )
nodePopupView :: R2.Leaf NodePopupProps nodePopupView :: R2.Leaf NodePopupProps
nodePopupView = R2.leafComponent nodePopupViewCpt nodePopupView = R2.leaf nodePopupViewCpt
nodePopupViewCpt :: R.Component NodePopupProps nodePopupViewCpt :: R.Component NodePopupProps
nodePopupViewCpt = here.component "nodePopupView" cpt where nodePopupViewCpt = here.component "nodePopupView" cpt where
cpt props _ = do cpt props _ = do
......
...@@ -75,7 +75,7 @@ forestLayoutCpt = here.component "forest" cpt where ...@@ -75,7 +75,7 @@ forestLayoutCpt = here.component "forest" cpt where
type Plus = ( boxes :: Boxes ) type Plus = ( boxes :: Boxes )
plus :: R2.Leaf Plus plus :: R2.Leaf Plus
plus = R2.leafComponent plusCpt plus = R2.leaf plusCpt
plusCpt :: R.Component Plus plusCpt :: R.Component Plus
plusCpt = here.component "plus" cpt where plusCpt = here.component "plus" cpt where
cpt { boxes: { backend, showLogin } } _ = do cpt { boxes: { backend, showLogin } } _ = do
......
...@@ -569,7 +569,7 @@ nodeActionsCpt = here.component "nodeActions" cpt where ...@@ -569,7 +569,7 @@ nodeActionsCpt = here.component "nodeActions" cpt where
child _ = mempty child _ = mempty
graphNodeActions :: R2.Leaf NodeActionsCommon graphNodeActions :: R2.Leaf NodeActionsCommon
graphNodeActions = R2.leafComponent graphNodeActionsCpt graphNodeActions = R2.leaf graphNodeActionsCpt
graphNodeActionsCpt :: R.Component NodeActionsCommon graphNodeActionsCpt :: R.Component NodeActionsCommon
graphNodeActionsCpt = here.component "graphNodeActions" cpt where graphNodeActionsCpt = here.component "graphNodeActions" cpt where
cpt { id, session, refresh } _ = do cpt { id, session, refresh } _ = do
...@@ -596,7 +596,7 @@ graphNodeActionsCpt = here.component "graphNodeActions" cpt where ...@@ -596,7 +596,7 @@ graphNodeActionsCpt = here.component "graphNodeActions" cpt where
listNodeActions :: R2.Leaf NodeActionsCommon listNodeActions :: R2.Leaf NodeActionsCommon
listNodeActions = R2.leafComponent listNodeActionsCpt listNodeActions = R2.leaf listNodeActionsCpt
listNodeActionsCpt :: R.Component NodeActionsCommon listNodeActionsCpt :: R.Component NodeActionsCommon
listNodeActionsCpt = here.component "listNodeActions" cpt where listNodeActionsCpt = here.component "listNodeActions" cpt where
cpt { id, session, refresh } _ = do cpt { id, session, refresh } _ = do
......
...@@ -54,7 +54,7 @@ type TextInputBoxProps = ...@@ -54,7 +54,7 @@ type TextInputBoxProps =
type AddContactProps = ( firstname :: String, lastname :: String ) type AddContactProps = ( firstname :: String, lastname :: String )
textInputBox :: R2.Leaf TextInputBoxProps textInputBox :: R2.Leaf TextInputBoxProps
textInputBox = R2.leafComponent textInputBoxCpt textInputBox = R2.leaf textInputBoxCpt
textInputBoxCpt :: R.Component TextInputBoxProps textInputBoxCpt :: R.Component TextInputBoxProps
textInputBoxCpt = here.component "textInputBox" cpt where textInputBoxCpt = here.component "textInputBox" cpt where
cpt { boxName, boxAction, dispatch, isOpen cpt { boxName, boxAction, dispatch, isOpen
......
...@@ -67,14 +67,14 @@ type TeamRowProps = ...@@ -67,14 +67,14 @@ type TeamRowProps =
( nodeId :: ID ( nodeId :: ID
, session :: Session , session :: Session
, team :: T.Box (Array TeamMember) , team :: T.Box (Array TeamMember)
, error :: T.Box String , error :: T.Box String
, team' :: Array TeamMember , team' :: Array TeamMember
, error' :: String , error' :: String
, team_owner_username :: String , team_owner_username :: String
) )
teamLayoutRows :: R2.Leaf TeamRowProps teamLayoutRows :: R2.Leaf TeamRowProps
teamLayoutRows = R2.leafComponent teamLayoutRowsCpt teamLayoutRows = R2.leaf teamLayoutRowsCpt
teamLayoutRowsCpt :: R.Component TeamRowProps teamLayoutRowsCpt :: R.Component TeamRowProps
teamLayoutRowsCpt = here.component "teamLayoutRows" cpt where teamLayoutRowsCpt = here.component "teamLayoutRows" cpt where
...@@ -94,8 +94,8 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt where ...@@ -94,8 +94,8 @@ teamLayoutRowsCpt = here.component "teamLayoutRows" cpt where
, on: {click: submit shared_folder_id } , on: {click: submit shared_folder_id }
} [] } []
] ]
makeLeader username = H.div {className: "from-group row"} [ H.div { className: "col-8"} [ H.text username ] makeLeader username = H.div {className: "from-group row"} [ H.div { className: "col-8"} [ H.text username ]
, H.p { className: "col-2"} [ H.text "owner"] , H.p { className: "col-2"} [ H.text "owner"]
] ]
......
...@@ -101,7 +101,7 @@ type UploadFile = ...@@ -101,7 +101,7 @@ type UploadFile =
uploadFileView :: R2.Leaf Props uploadFileView :: R2.Leaf Props
uploadFileView = R2.leafComponent uploadFileViewCpt uploadFileView = R2.leaf uploadFileViewCpt
uploadFileViewCpt :: R.Component Props uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = here.component "uploadFileView" cpt uploadFileViewCpt = here.component "uploadFileView" cpt
where where
...@@ -276,7 +276,7 @@ uploadButtonCpt = here.component "uploadButton" cpt ...@@ -276,7 +276,7 @@ uploadButtonCpt = here.component "uploadButton" cpt
dispatch CloseBox dispatch CloseBox
uploadListView :: R2.Leaf Props uploadListView :: R2.Leaf Props
uploadListView = R2.leafComponent uploadListViewCpt uploadListView = R2.leaf uploadListViewCpt
uploadListViewCpt :: R.Component Props uploadListViewCpt :: R.Component Props
uploadListViewCpt = here.component "uploadListView" cpt where uploadListViewCpt = here.component "uploadListView" cpt where
cpt { dispatch, session } _ = do cpt { dispatch, session } _ = do
...@@ -676,7 +676,7 @@ type UploadTermButtonProps = ...@@ -676,7 +676,7 @@ type UploadTermButtonProps =
) )
uploadTermButton :: R2.Leaf UploadTermButtonProps uploadTermButton :: R2.Leaf UploadTermButtonProps
uploadTermButton = R2.leafComponent uploadTermButtonCpt uploadTermButton = R2.leaf uploadTermButtonCpt
uploadTermButtonCpt :: R.Component UploadTermButtonProps uploadTermButtonCpt :: R.Component UploadTermButtonProps
uploadTermButtonCpt = here.component "uploadTermButton" cpt uploadTermButtonCpt = here.component "uploadTermButton" cpt
where where
......
...@@ -47,7 +47,7 @@ type CommonProps = ...@@ -47,7 +47,7 @@ type CommonProps =
) )
nodePopupView :: R2.Leaf NodePopupProps nodePopupView :: R2.Leaf NodePopupProps
nodePopupView = R2.leafComponent nodePopupViewCpt nodePopupView = R2.leaf nodePopupViewCpt
nodePopupViewCpt :: R.Component NodePopupProps nodePopupViewCpt :: R.Component NodePopupProps
nodePopupViewCpt = here.component "nodePopupView" cpt where nodePopupViewCpt = here.component "nodePopupView" cpt where
cpt p@{ id, name, nodeType } _ = do cpt p@{ id, name, nodeType } _ = do
...@@ -328,7 +328,7 @@ type PanelActionProps = ...@@ -328,7 +328,7 @@ type PanelActionProps =
) )
panelAction :: R2.Leaf PanelActionProps panelAction :: R2.Leaf PanelActionProps
panelAction = R2.leafComponent panelActionCpt panelAction = R2.leaf panelActionCpt
panelActionCpt :: R.Component PanelActionProps panelActionCpt :: R.Component PanelActionProps
panelActionCpt = here.component "panelAction" cpt panelActionCpt = here.component "panelAction" cpt
where where
......
...@@ -280,7 +280,7 @@ type CheckboxProps = ...@@ -280,7 +280,7 @@ type CheckboxProps =
( value :: T.Box Boolean ) ( value :: T.Box Boolean )
checkbox :: R2.Leaf CheckboxProps checkbox :: R2.Leaf CheckboxProps
checkbox = R2.leafComponent checkboxCpt checkbox = R2.leaf checkboxCpt
checkboxCpt :: R.Component CheckboxProps checkboxCpt :: R.Component CheckboxProps
checkboxCpt = here.component "checkbox" cpt checkboxCpt = here.component "checkbox" cpt
where where
......
...@@ -23,7 +23,7 @@ type Props = ...@@ -23,7 +23,7 @@ type Props =
) )
inputWithEnterWithKey :: R2.Leaf ( key :: String | Props ) inputWithEnterWithKey :: R2.Leaf ( key :: String | Props )
inputWithEnterWithKey = R2.leafComponent inputWithEnterWithKeyCpt inputWithEnterWithKey = R2.leaf inputWithEnterWithKeyCpt
inputWithEnterWithKeyCpt :: R.Component ( key :: String | Props ) inputWithEnterWithKeyCpt :: R.Component ( key :: String | Props )
inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where
cpt { onBlur, onEnter, onValueChanged, autoFocus, className, defaultValue, placeholder, type: t } _ = do cpt { onBlur, onEnter, onValueChanged, autoFocus, className, defaultValue, placeholder, type: t } _ = do
...@@ -37,7 +37,7 @@ inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where ...@@ -37,7 +37,7 @@ inputWithEnterWithKeyCpt = here.component "inputWithEnterWithKey" cpt where
, type: t } , type: t }
inputWithEnter :: R2.Leaf Props inputWithEnter :: R2.Leaf Props
inputWithEnter = R2.leafComponent inputWithEnterCpt inputWithEnter = R2.leaf inputWithEnterCpt
inputWithEnterCpt :: R.Component Props inputWithEnterCpt :: R.Component Props
inputWithEnterCpt = here.component "inputWithEnter" cpt inputWithEnterCpt = here.component "inputWithEnter" cpt
where where
......
...@@ -169,7 +169,7 @@ type RenderListElementProps = ...@@ -169,7 +169,7 @@ type RenderListElementProps =
, selection :: T.Box Selection ) , selection :: T.Box Selection )
renderListElement :: R2.Leaf RenderListElementProps renderListElement :: R2.Leaf RenderListElementProps
renderListElement = R2.leafComponent renderListElementCpt renderListElement = R2.leaf renderListElementCpt
renderListElementCpt :: R.Component RenderListElementProps renderListElementCpt :: R.Component RenderListElementProps
renderListElementCpt = here.component "renderListElement" cpt where renderListElementCpt = here.component "renderListElement" cpt where
cpt { id, name, selection } _ = do cpt { id, name, selection } _ = do
......
...@@ -25,7 +25,7 @@ type SearchInputProps = ...@@ -25,7 +25,7 @@ type SearchInputProps =
-- "key": to prevent refreshing & losing input -- "key": to prevent refreshing & losing input
searchInput :: R2.Leaf ( key :: String | SearchInputProps ) searchInput :: R2.Leaf ( key :: String | SearchInputProps )
searchInput = R2.leafComponent searchInputCpt searchInput = R2.leaf searchInputCpt
searchInputCpt :: R.Component ( key :: String | SearchInputProps ) searchInputCpt :: R.Component ( key :: String | SearchInputProps )
searchInputCpt = here.component "searchInput" cpt searchInputCpt = here.component "searchInput" cpt
where where
......
...@@ -54,7 +54,7 @@ type LayoutProps = ...@@ -54,7 +54,7 @@ type LayoutProps =
) )
annuaireLayout :: R2.Leaf LayoutProps annuaireLayout :: R2.Leaf LayoutProps
annuaireLayout = R2.leafComponent annuaireLayoutCpt annuaireLayout = R2.leaf annuaireLayoutCpt
annuaireLayoutCpt :: R.Component LayoutProps annuaireLayoutCpt :: R.Component LayoutProps
annuaireLayoutCpt = here.component "annuaireLayout" cpt where annuaireLayoutCpt = here.component "annuaireLayout" cpt where
cpt { frontends, nodeId, session } _ = do cpt { frontends, nodeId, session } _ = do
...@@ -68,7 +68,7 @@ type KeyLayoutProps = ...@@ -68,7 +68,7 @@ type KeyLayoutProps =
) )
annuaireLayoutWithKey :: R2.Leaf KeyLayoutProps annuaireLayoutWithKey :: R2.Leaf KeyLayoutProps
annuaireLayoutWithKey = R2.leafComponent annuaireLayoutWithKeyCpt annuaireLayoutWithKey = R2.leaf annuaireLayoutWithKeyCpt
annuaireLayoutWithKeyCpt :: R.Component KeyLayoutProps annuaireLayoutWithKeyCpt :: R.Component KeyLayoutProps
annuaireLayoutWithKeyCpt = here.component "annuaireLayoutWithKey" cpt where annuaireLayoutWithKeyCpt = here.component "annuaireLayoutWithKey" cpt where
...@@ -92,7 +92,7 @@ type AnnuaireProps = ...@@ -92,7 +92,7 @@ type AnnuaireProps =
-- | Renders a basic table and the page loader -- | Renders a basic table and the page loader
annuaire :: R2.Leaf AnnuaireProps annuaire :: R2.Leaf AnnuaireProps
annuaire = R2.leafComponent annuaireCpt annuaire = R2.leaf annuaireCpt
-- Abuses closure to work around the Loader -- Abuses closure to work around the Loader
annuaireCpt :: R.Component AnnuaireProps annuaireCpt :: R.Component AnnuaireProps
......
...@@ -60,7 +60,7 @@ type TabsProps = ...@@ -60,7 +60,7 @@ type TabsProps =
) )
tabs :: R2.Leaf TabsProps tabs :: R2.Leaf TabsProps
tabs = R2.leafComponent tabsCpt tabs = R2.leaf tabsCpt
tabsCpt :: R.Component TabsProps tabsCpt :: R.Component TabsProps
tabsCpt = here.component "tabs" cpt where tabsCpt = here.component "tabs" cpt where
cpt props _ = do cpt props _ = do
...@@ -110,7 +110,7 @@ type NgramsViewTabsProps = ...@@ -110,7 +110,7 @@ type NgramsViewTabsProps =
| TabsProps ) | TabsProps )
ngramsView :: R2.Leaf NgramsViewTabsProps ngramsView :: R2.Leaf NgramsViewTabsProps
ngramsView = R2.leafComponent ngramsViewCpt ngramsView = R2.leaf ngramsViewCpt
ngramsViewCpt :: R.Component NgramsViewTabsProps ngramsViewCpt :: R.Component NgramsViewTabsProps
ngramsViewCpt = here.component "ngramsView" cpt where ngramsViewCpt = here.component "ngramsView" cpt where
cpt props@{ defaultListId, mode, nodeId, session } _ = do cpt props@{ defaultListId, mode, nodeId, session } _ = do
......
...@@ -91,7 +91,7 @@ userLayoutCpt = here.component "userLayout" cpt ...@@ -91,7 +91,7 @@ userLayoutCpt = here.component "userLayout" cpt
pure $ userLayoutWithKey $ Record.merge props { key: show sid <> "-" <> show nodeId } pure $ userLayoutWithKey $ Record.merge props { key: show sid <> "-" <> show nodeId }
userLayoutWithKey :: R2.Leaf ( key :: String | LayoutProps ) userLayoutWithKey :: R2.Leaf ( key :: String | LayoutProps )
userLayoutWithKey = R2.leafComponent userLayoutWithKeyCpt userLayoutWithKey = R2.leaf userLayoutWithKeyCpt
userLayoutWithKeyCpt :: R.Component ( key :: String | LayoutProps ) userLayoutWithKeyCpt :: R.Component ( key :: String | LayoutProps )
userLayoutWithKeyCpt = here.component "userLayoutWithKey" cpt where userLayoutWithKeyCpt = here.component "userLayoutWithKey" cpt where
cpt { boxes: boxes@{ sidePanelTexts } cpt { boxes: boxes@{ sidePanelTexts }
...@@ -184,7 +184,7 @@ type ContactInfoItemProps = ...@@ -184,7 +184,7 @@ type ContactInfoItemProps =
) )
contactInfoItem :: R2.Leaf ContactInfoItemProps contactInfoItem :: R2.Leaf ContactInfoItemProps
contactInfoItem = R2.leafComponent contactInfoItemCpt contactInfoItem = R2.leaf contactInfoItemCpt
contactInfoItemCpt :: R.Component ContactInfoItemProps contactInfoItemCpt :: R.Component ContactInfoItemProps
contactInfoItemCpt = here.component "contactInfoItem" cpt contactInfoItemCpt = here.component "contactInfoItem" cpt
where where
...@@ -216,7 +216,7 @@ type ItemProps = ...@@ -216,7 +216,7 @@ type ItemProps =
) )
itemNotEditing :: R2.Leaf ItemProps itemNotEditing :: R2.Leaf ItemProps
itemNotEditing = R2.leafComponent itemNotEditingCpt itemNotEditing = R2.leaf itemNotEditingCpt
itemNotEditingCpt :: R.Component ItemProps itemNotEditingCpt :: R.Component ItemProps
itemNotEditingCpt = here.component "itemEditing" cpt where itemNotEditingCpt = here.component "itemEditing" cpt where
cpt { isEditing, valueBox } _ = do cpt { isEditing, valueBox } _ = do
...@@ -233,7 +233,7 @@ itemNotEditingCpt = here.component "itemEditing" cpt where ...@@ -233,7 +233,7 @@ itemNotEditingCpt = here.component "itemEditing" cpt where
click _ = T.write_ true isEditing click _ = T.write_ true isEditing
itemEditing :: R2.Leaf ItemProps itemEditing :: R2.Leaf ItemProps
itemEditing = R2.leafComponent itemEditingCpt itemEditing = R2.leaf itemEditingCpt
itemEditingCpt :: R.Component ItemProps itemEditingCpt :: R.Component ItemProps
itemEditingCpt = here.component "itemNotEditing" cpt where itemEditingCpt = here.component "itemNotEditing" cpt where
cpt { defaultVal, isEditing, lens, onUpdateUserInfo, userInfo, valueBox } _ = do cpt { defaultVal, isEditing, lens, onUpdateUserInfo, userInfo, valueBox } _ = do
......
...@@ -58,7 +58,7 @@ type TabsProps = ...@@ -58,7 +58,7 @@ type TabsProps =
) )
tabs :: R2.Leaf TabsProps tabs :: R2.Leaf TabsProps
tabs = R2.leafComponent tabsCpt tabs = R2.leaf tabsCpt
tabsCpt :: R.Component TabsProps tabsCpt :: R.Component TabsProps
tabsCpt = here.component "tabs" cpt tabsCpt = here.component "tabs" cpt
where where
......
...@@ -97,7 +97,7 @@ mkRequest :: Session -> ReloadPath -> GUC.Request ...@@ -97,7 +97,7 @@ mkRequest :: Session -> ReloadPath -> GUC.Request
mkRequest session (_ /\ path) = GUC.makeGetRequest session $ chartUrl path mkRequest session (_ /\ path) = GUC.makeGetRequest session $ chartUrl path
pie :: R2.Leaf Props pie :: R2.Leaf Props
pie = R2.leafComponent pieCpt pie = R2.leaf pieCpt
pieCpt :: R.Component Props pieCpt :: R.Component Props
pieCpt = here.component "pie" cpt pieCpt = here.component "pie" cpt
where where
......
...@@ -46,7 +46,7 @@ type ViewProps = ...@@ -46,7 +46,7 @@ type ViewProps =
) )
corpusCodeLayout :: R2.Leaf Props corpusCodeLayout :: R2.Leaf Props
corpusCodeLayout = R2.leafComponent corpusCodeLayoutCpt corpusCodeLayout = R2.leaf corpusCodeLayoutCpt
corpusCodeLayoutCpt :: R.Component Props corpusCodeLayoutCpt :: R.Component Props
corpusCodeLayoutCpt = here.component "corpusCodeLayout" cpt where corpusCodeLayoutCpt = here.component "corpusCodeLayout" cpt where
cpt { nodeId, session, boxes } _ = do cpt { nodeId, session, boxes } _ = do
......
...@@ -48,7 +48,7 @@ instance Eq File where ...@@ -48,7 +48,7 @@ instance Eq File where
type FileLayoutProps = ( nodeId :: NodeID, session :: Session ) type FileLayoutProps = ( nodeId :: NodeID, session :: Session )
fileLayout :: R2.Leaf FileLayoutProps fileLayout :: R2.Leaf FileLayoutProps
fileLayout = R2.leafComponent fileLayoutCpt fileLayout = R2.leaf fileLayoutCpt
fileLayoutCpt :: R.Component FileLayoutProps fileLayoutCpt :: R.Component FileLayoutProps
fileLayoutCpt = here.component "fileLayout" cpt where fileLayoutCpt = here.component "fileLayout" cpt where
cpt { nodeId, session } _ = do cpt { nodeId, session } _ = do
......
...@@ -83,7 +83,7 @@ type HomeProps = ...@@ -83,7 +83,7 @@ type HomeProps =
( boxes :: Boxes ) ( boxes :: Boxes )
homeLayout :: R2.Leaf HomeProps homeLayout :: R2.Leaf HomeProps
homeLayout = R2.leafComponent homeLayoutCpt homeLayout = R2.leaf homeLayoutCpt
homeLayoutCpt :: R.Component HomeProps homeLayoutCpt :: R.Component HomeProps
homeLayoutCpt = here.component "homeLayout" cpt homeLayoutCpt = here.component "homeLayout" cpt
where where
...@@ -223,7 +223,7 @@ type TutorialProps = ...@@ -223,7 +223,7 @@ type TutorialProps =
, sessions :: Array Session ) , sessions :: Array Session )
tutorial :: R2.Leaf TutorialProps tutorial :: R2.Leaf TutorialProps
tutorial = R2.leafComponent tutorialCpt tutorial = R2.leaf tutorialCpt
tutorialCpt :: R.Component TutorialProps tutorialCpt :: R.Component TutorialProps
tutorialCpt = here.component "tutorial" cpt where tutorialCpt = here.component "tutorial" cpt where
cpt { sessions } _ = do cpt { sessions } _ = do
......
...@@ -66,7 +66,7 @@ loadPublicData _l = do ...@@ -66,7 +66,7 @@ loadPublicData _l = do
-} -}
renderPublic :: R2.Leaf () renderPublic :: R2.Leaf ()
renderPublic = R2.leafComponent renderPublicCpt renderPublic = R2.leaf renderPublicCpt
renderPublicCpt :: R.Component () renderPublicCpt :: R.Component ()
renderPublicCpt = here.component "renderPublic" cpt where renderPublicCpt = here.component "renderPublic" cpt where
cpt _ _ = do cpt _ _ = do
......
...@@ -64,7 +64,7 @@ type SessionNodeProps = ( nodeId :: NodeID | SessionProps ) ...@@ -64,7 +64,7 @@ type SessionNodeProps = ( nodeId :: NodeID | SessionProps )
type Props' = ( backend :: Backend, route' :: AppRoute | Props ) type Props' = ( backend :: Backend, route' :: AppRoute | Props )
router :: R2.Leaf Props router :: R2.Leaf Props
router = R2.leafComponent routerCpt router = R2.leaf routerCpt
routerCpt :: R.Component Props routerCpt :: R.Component Props
routerCpt = here.component "router" cpt where routerCpt = here.component "router" cpt where
cpt { boxes: boxes@{ handed } } _ = do cpt { boxes: boxes@{ handed } } _ = do
...@@ -121,7 +121,7 @@ routerCpt = here.component "router" cpt where ...@@ -121,7 +121,7 @@ routerCpt = here.component "router" cpt where
-------------------------------------------------------------- --------------------------------------------------------------
mainPage :: R2.Leaf Props mainPage :: R2.Leaf Props
mainPage = R2.leafComponent mainPageCpt mainPage = R2.leaf mainPageCpt
mainPageCpt :: R.Component Props mainPageCpt :: R.Component Props
mainPageCpt = here.component "mainPage" cpt where mainPageCpt = here.component "mainPage" cpt where
cpt { boxes } _ = do cpt { boxes } _ = do
...@@ -266,7 +266,7 @@ forestCpt = R.memo' $ here.component "forest" cpt where ...@@ -266,7 +266,7 @@ forestCpt = R.memo' $ here.component "forest" cpt where
-------------------------------------------------------------- --------------------------------------------------------------
sidePanel :: R2.Leaf Props sidePanel :: R2.Leaf Props
sidePanel = R2.leafComponent sidePanelCpt sidePanel = R2.leaf sidePanelCpt
sidePanelCpt :: R.Component Props sidePanelCpt :: R.Component Props
sidePanelCpt = here.component "sidePanel" cpt where sidePanelCpt = here.component "sidePanel" cpt where
cpt props@{ boxes: { session cpt props@{ boxes: { session
......
...@@ -731,7 +731,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt ...@@ -731,7 +731,7 @@ tableHeaderLayoutCpt = here.component "tableHeaderLayout" cpt
cacheStateToggle NT.CacheOff = NT.CacheOn cacheStateToggle NT.CacheOff = NT.CacheOn
table :: R2.Leaf Props table :: R2.Leaf Props
table = R2.leafComponent tableCpt table = R2.leaf tableCpt
tableCpt :: R.Component Props tableCpt :: R.Component Props
tableCpt = here.component "table" cpt tableCpt = here.component "table" cpt
where where
...@@ -860,7 +860,7 @@ type PaginationProps = ...@@ -860,7 +860,7 @@ type PaginationProps =
, totalPages :: Int ) , totalPages :: Int )
pagination :: R2.Leaf PaginationProps pagination :: R2.Leaf PaginationProps
pagination = R2.leafComponent paginationCpt pagination = R2.leaf paginationCpt
paginationCpt :: R.Component PaginationProps paginationCpt :: R.Component PaginationProps
paginationCpt = here.component "pagination" cpt paginationCpt = here.component "pagination" cpt
where where
......
...@@ -51,9 +51,6 @@ type Component p = Record p -> Array R.Element -> R.Element ...@@ -51,9 +51,6 @@ type Component p = Record p -> Array R.Element -> R.Element
-- | UI Component type with only required props and no child -- | UI Component type with only required props and no child
type Leaf p = Record p -> R.Element type Leaf p = Record p -> R.Element
leafComponent :: forall p. (R.Component p) -> Record p -> R.Element
leafComponent cpt p = R.createElement cpt p []
-- | UI Component type containing optional props and children -- | UI Component type containing optional props and children
type OptComponent options props provided = CO.Defaults (Record options) (Record provided) (Record props) type OptComponent options props provided = CO.Defaults (Record options) (Record provided) (Record props)
=> Record provided -> Array R.Element -> R.Element => Record provided -> Array R.Element -> R.Element
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment