@@ -137,6 +137,7 @@ dynComment t = do
137display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
137display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
138display = dynText . fmap (T.pack . show)
138display = dynText . fmap (T.pack . show)
140+{-# DEPRECATED button "Use 'elAttr'' in combination with 'domEvent' instead" #-}
140button :: DomBuilder t m => Text -> m (Event t ())
141button :: DomBuilder t m => Text -> m (Event t ())
141button t = do
142button t = do
142 (e, _) <- element "button" def $ text t
143 (e, _) <- element "button" def $ text t
@@ -290,23 +291,25 @@ elDynHtmlAttr' elementTag attrs html = do
290 wrapElement defaultDomEventHandler e
291 wrapElement defaultDomEventHandler e
294+{-# DEPRECATED Link "Will be removed when 'linkClass' and 'link' are removed" #-}
293newtype Link t
295newtype Link t
294 = Link { _link_clicked :: Event t ()
296 = Link { _link_clicked :: Event t ()
297−-- | >>> linkClass "Click here" "link-class"
299+{-# DEPRECATED linkClass "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
298−-- > <a class="link-class">Click here</a>
299linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
300linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
300linkClass s c = do
301linkClass s c = do
301 (l,_) <- elAttr' "a" ("class" =: c) $ text s
302 (l,_) <- elAttr' "a" ("class" =: c) $ text s
302 return $ Link $ domEvent Click l
303 return $ Link $ domEvent Click l
305+{-# DEPRECATED link "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
304link :: DomBuilder t m => Text -> m (Link t)
306link :: DomBuilder t m => Text -> m (Link t)
305link s = linkClass s ""
307link s = linkClass s ""
307divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
309divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
308divClass = elClass "div"
310divClass = elClass "div"
312+{-# DEPRECATED dtdd "Use an application specific widget generating function" #-}
310dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
313dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
311dtdd h w = do
314dtdd h w = do
312 el "dt" $ text h
315 el "dt" $ text h
@@ -315,7 +318,9 @@ dtdd h w = do
315blank :: forall m. Monad m => m ()
318blank :: forall m. Monad m => m ()
316blank = return ()
319blank = return ()
321+-- TODO: Move to an example project.
318-- | A widget to display a table with static columns and dynamic rows.
322-- | A widget to display a table with static columns and dynamic rows.
323+{-# DEPRECATED tableDynAttr "Use an application specific widget generating function" #-}
319tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
324tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
320 => Text -- ^ Class applied to <table> element
325 => Text -- ^ Class applied to <table> element
321 -> [(Text, k -> Dynamic t r -> m v)] -- ^ Columns of (header, row key -> row value -> child widget)
326 -> [(Text, k -> Dynamic t r -> m v)] -- ^ Columns of (header, row key -> row value -> child widget)
@@ -331,9 +336,11 @@ tableDynAttr klass cols dRows rowAttrs = elAttr "div" (Map.singleton "style" "zo
331 dAttrs <- rowAttrs k
336 dAttrs <- rowAttrs k
332 elDynAttr' "tr" dAttrs $ mapM (\x -> el "td" $ snd x k r) cols)
337 elDynAttr' "tr" dAttrs $ mapM (\x -> el "td" $ snd x k r) cols)
339+-- TODO: Move to an example project.
334-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
340-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
335-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
341-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
336-- the corresponding child and hides all others.
342-- the corresponding child and hides all others.
343+{-# DEPRECATED tabDisplay "Use an application specific widget generating function" #-}
337tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
344tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
338 => Text -- ^ Class applied to <ul> element
345 => Text -- ^ Class applied to <ul> element
339 -> Text -- ^ Class applied to currently active <li> element
346 -> Text -- ^ Class applied to currently active <li> element