bulmex 3.0.0 → 4.0.0
raw patch · 3 files changed
+17/−17 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Reflex.Bulmex.Input.Debounce: withInput :: (PostBuild t m, MonadFix m, MonadHold t m) => (Event t inputEvt -> m (Event t inputEvt)) -> (result -> Bool) -> (Event t result -> Dynamic t InputStates -> m (actArgs, Event t inputEvt, finalRes)) -> (actArgs -> Event t inputEvt -> m (Event t result)) -> m (Event t result, finalRes)
+ Reflex.Bulmex.Input.Debounce: withInput :: (PostBuild t m, MonadFix m, MonadHold t m) => (Event t inputEvt -> m (Event t inputEvt)) -> (actionResult -> Bool) -> (actArgs -> Event t inputEvt -> m (Event t actionResult)) -> (Event t actionResult -> Dynamic t InputStates -> m (actArgs, Event t inputEvt, innerWidgetResult)) -> m (Event t actionResult, innerWidgetResult)
- Reflex.Bulmex.Input.Debounce: withInputDebounceEvt :: (PostBuild t m, MonadFix m, MonadHold t m, TriggerEvent t m, MonadIO (Performable m), PerformEvent t m) => NominalDiffTime -> (result -> Bool) -> (Dynamic t InputStates -> m (b, Event t inputEvt)) -> (b -> Event t inputEvt -> m (Event t result)) -> m (Event t result, b)
+ Reflex.Bulmex.Input.Debounce: withInputDebounceEvt :: (PostBuild t m, MonadFix m, MonadHold t m, TriggerEvent t m, MonadIO (Performable m), PerformEvent t m) => NominalDiffTime -> (result -> Bool) -> (b -> Event t inputEvt -> m (Event t result)) -> (Dynamic t InputStates -> m (b, Event t inputEvt)) -> m (Event t result, b)
Files
- bulmex.cabal +2/−2
- src/Reflex/Bulmex/Input/Debounce.hs +13/−13
- src/Reflex/Bulmex/Modal.hs +2/−2
bulmex.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 437fddec128f807a107380e8703fad0e32c13b707a2252431b9ac45157b6de50+-- hash: 24b48915c10fa2938bcde435e5aab601ccfefd05a2a2c4f9256067a879f93239 name: bulmex-version: 3.0.0+version: 4.0.0 synopsis: Reflex infused with bulma (css) description: Reflex infused with bulma, [Implements](https://hackage.haskell.org/package/bulmex/docs/Reflex-Bulmex-Modal.html) the [modal](https://bulma.io/documentation/components/modal/) for example. Also has helper functions for common tasks. such as making server side rendering easier. See related [blogpost](https://jappieklooster.nl/reflex-server-side-html-rendering.html). category: Web
src/Reflex/Bulmex/Input/Debounce.hs view
@@ -6,10 +6,10 @@ -- | This makes it easy to create auto-save operations -- not limited to saves. module Reflex.Bulmex.Input.Debounce- ( InputStates(..)- , defStateAttr- , withInputDebounceEvt+ ( withInputDebounceEvt , withInput+ , InputStates(..)+ , defStateAttr ) where @@ -42,12 +42,12 @@ , PerformEvent t m ) => NominalDiffTime -- ^ Delay before posting the request- -> (result -> Bool) -- ^ Was the final requess successfull?- -> (Dynamic t InputStates -> m (b, Event t inputEvt)) -- ^ Widget body reacting to states+ -> (result -> Bool) -- ^ Was the final requess successfull? For example: (isJust . reqSuccess) -> (b -> Event t inputEvt -> m (Event t result)) -- ^ Action function+ -> (Dynamic t InputStates -> m (b, Event t inputEvt)) -- ^ Widget body reacting to states -> m (Event t result, b)-withInputDebounceEvt debtime succF stateF =- withInput (debounce debtime) succF+withInputDebounceEvt debtime succF actF stateF =+ withInput (debounce debtime) succF actF $ const $ fmap (\(one', two) -> (one', two, one')) . stateF@@ -66,14 +66,14 @@ withInput :: (PostBuild t m, MonadFix m, MonadHold t m) => (Event t inputEvt -> m (Event t inputEvt)) -- ^ change input timeline, eg pure for no change- -> (result -> Bool) -- ^ Was the final requess successfull?- -> ( Event t result+ -> (actionResult -> Bool) -- ^ Was the final requess successfull?+ -> (actArgs -> Event t inputEvt -> m (Event t actionResult)) -- ^ Action function+ -> ( Event t actionResult -> Dynamic t InputStates- -> m (actArgs, Event t inputEvt, finalRes)+ -> m (actArgs, Event t inputEvt, innerWidgetResult) ) -- ^ Widget body reacting to states- -> (actArgs -> Event t inputEvt -> m (Event t result)) -- ^ Action function- -> m (Event t result, finalRes)-withInput timeF isSuccessF createTypeEvt reqFunc = mdo+ -> m (Event t actionResult, innerWidgetResult)+withInput timeF isSuccessF reqFunc createTypeEvt = mdo (someData, typeEvtImmediate, result) <- createTypeEvt postFinished areaState typeEvtDeb <- timeF typeEvtImmediate postFinished <- reqFunc someData typeEvtDeb
src/Reflex/Bulmex/Modal.hs view
@@ -1,8 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecursiveDo #-} --- | A modal dialogue, eg pop up, for example to confirm an action.--- Puts code behinds bulma's modal styling: https://bulma.io/documentation/components/modal/+-- | A modal dialogue, for example to confirm an action.+-- Makes bulma's <https://bulma.io/documentation/components/modal/ modal> styling work module Reflex.Bulmex.Modal ( modal , modal'