Shpadoinkle-widgets-0.2.0.1: A collection of common reusable types and components.

Safe HaskellNone
LanguageHaskell2010

Shpadoinkle.Widgets.Table

Documentation

data Sort Source #

Constructors

ASC 
DESC 
Instances
Bounded Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Enum Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Eq Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

(==) :: Sort -> Sort -> Bool Source #

(/=) :: Sort -> Sort -> Bool Source #

Ord Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Read Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Show Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Generic Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Associated Types

type Rep Sort :: Type -> Type Source #

Methods

from :: Sort -> Rep Sort x Source #

to :: Rep Sort x -> Sort Source #

Semigroup Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Monoid Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

NFData Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

rnf :: Sort -> () Source #

ToJSON Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

FromJSON Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

type Rep Sort Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

type Rep Sort = D1 (MetaData "Sort" "Shpadoinkle.Widgets.Table" "Shpadoinkle-widgets-0.2.0.1-HaWUIlNGtuO41rdsllvehE" False) (C1 (MetaCons "ASC" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DESC" PrefixI False) (U1 :: Type -> Type))

data SortCol a Source #

Constructors

SortCol (Column a) Sort 
Instances
Functor Column => Functor SortCol Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

fmap :: (a -> b) -> SortCol a -> SortCol b Source #

(<$) :: a -> SortCol b -> SortCol a Source #

Eq (Column a) => Eq (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

(==) :: SortCol a -> SortCol a -> Bool Source #

(/=) :: SortCol a -> SortCol a -> Bool Source #

Ord (Column a) => Ord (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Read (Column a) => Read (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Show (Column a) => Show (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Generic (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Associated Types

type Rep (SortCol a) :: Type -> Type Source #

Methods

from :: SortCol a -> Rep (SortCol a) x Source #

to :: Rep (SortCol a) x -> SortCol a Source #

Ord (Column a) => Semigroup (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

(<>) :: SortCol a -> SortCol a -> SortCol a Source #

sconcat :: NonEmpty (SortCol a) -> SortCol a Source #

stimes :: Integral b => b -> SortCol a -> SortCol a Source #

(Bounded (Column a), Ord (Column a), Enum (Column a)) => Monoid (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

NFData (Column a) => NFData (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

rnf :: SortCol a -> () Source #

ToJSON (Column a) => ToJSON (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

FromJSON (Column a) => FromJSON (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

ToJSON (Column a) => ToHttpApiData (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

FromJSON (Column a) => FromHttpApiData (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

type Rep (SortCol a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

type Rep (SortCol a) = D1 (MetaData "SortCol" "Shpadoinkle.Widgets.Table" "Shpadoinkle-widgets-0.2.0.1-HaWUIlNGtuO41rdsllvehE" False) (C1 (MetaCons "SortCol" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Column a)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Sort)))

compareOn :: Ord a => Sort -> a -> a -> Ordering Source #

class Tabular a where Source #

Minimal complete definition

toRows, toCell, sortTable

Associated Types

type Effect a (m :: Type -> Type) :: Constraint Source #

Methods

toRows :: a -> [Row a] Source #

toFilter :: a -> Row a -> Bool Source #

toCell :: Functor m => Effect a m => a -> Row a -> Column a -> [Html m a] Source #

sortTable :: SortCol a -> Row a -> Row a -> Ordering Source #

ascendingIcon :: Functor m => Effect a m => Proxy a -> Html m (a, SortCol a) Source #

descendingIcon :: Functor m => Effect a m => Proxy a -> Html m (a, SortCol a) Source #

handleSort :: Monad m => Effect a m => a -> SortCol a -> Continuation m (a, SortCol a) Source #

data family Column (a :: Type) :: Type Source #

Instances
Bounded (Column a) => Bounded (Column (LazyTable a)) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

Enum (Column a) => Enum (Column (LazyTable a)) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

Eq (Column a) => Eq (Column (LazyTable a)) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

Ord (Column a) => Ord (Column (LazyTable a)) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

Humanize (Column a) => Humanize (Column (LazyTable a)) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

newtype Column (LazyTable a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

newtype Column (LazyTable a) = LazyColumn (Column a)

data family Row (a :: Type) :: Type Source #

Instances
data Row (LazyTable a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table.Lazy

data Row (LazyTable a)

data Theme m a Source #

Constructors

Theme 

Fields

Instances
Generic (Theme m a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Associated Types

type Rep (Theme m a) :: Type -> Type Source #

Methods

from :: Theme m a -> Rep (Theme m a) x Source #

to :: Rep (Theme m a) x -> Theme m a Source #

Semigroup (Theme m a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

(<>) :: Theme m a -> Theme m a -> Theme m a Source #

sconcat :: NonEmpty (Theme m a) -> Theme m a Source #

stimes :: Integral b => b -> Theme m a -> Theme m a Source #

Monoid (Theme m a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

Methods

mempty :: Theme m a Source #

mappend :: Theme m a -> Theme m a -> Theme m a Source #

mconcat :: [Theme m a] -> Theme m a Source #

type Rep (Theme m a) Source # 
Instance details

Defined in Shpadoinkle.Widgets.Table

type Rep (Theme m a) = D1 (MetaData "Theme" "Shpadoinkle.Widgets.Table" "Shpadoinkle-widgets-0.2.0.1-HaWUIlNGtuO41rdsllvehE" False) (C1 (MetaCons "Theme" PrefixI True) ((S1 (MetaSel (Just "tableProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> [(Text, Prop m (a, SortCol a))])) :*: (S1 (MetaSel (Just "headProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> [(Text, Prop m (a, SortCol a))])) :*: S1 (MetaSel (Just "htrProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> [(Text, Prop m (a, SortCol a))])))) :*: ((S1 (MetaSel (Just "trProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> Row a -> [(Text, Prop m (a, SortCol a))])) :*: S1 (MetaSel (Just "thProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> Column a -> [(Text, Prop m (a, SortCol a))]))) :*: (S1 (MetaSel (Just "bodyProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> [(Text, Prop m (a, SortCol a))])) :*: S1 (MetaSel (Just "tdProps") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> SortCol a -> Row a -> Column a -> [(Text, Prop m a)]))))))

view :: forall m a. (Tabular a, Effect a m, Monad m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => a -> SortCol a -> Html m (a, SortCol a) Source #

viewWith :: forall m a. (Tabular a, Effect a m, Monad m, Humanize (Column a), Bounded (Column a), Ord (Column a), Enum (Column a)) => Theme m a -> a -> SortCol a -> Html m (a, SortCol a) Source #