Copyright | (c) digitally induced GmbH 2021 |
---|---|
Safe Haskell | Safe-Inferred |
IHP.ServerSideComponent.HtmlDiff
Description
Synopsis
- data NodeOperation
- = UpdateTextContent {
- textContent :: !Text
- path :: ![Int]
- | ReplaceNode { }
- | UpdateNode {
- attributeOperations :: ![AttributeOperation]
- path :: ![Int]
- | UpdateComment { }
- | UpdatePreEscapedTextNode {
- textContent :: !Text
- path :: ![Int]
- | DeleteNode { }
- | CreateNode { }
- = UpdateTextContent {
- data AttributeOperation
- = UpdateAttribute {
- attributeName :: !Text
- attributeValue :: !Text
- | AddAttribute {
- attributeName :: !Text
- attributeValue :: !Text
- | DeleteAttribute {
- attributeName :: !Text
- = UpdateAttribute {
- diffHtml :: Text -> Text -> Either _ [NodeOperation]
- type Path = [Int]
- diffNodes :: (?oldHtml :: text, ?newHtml :: Text) => Node -> Node -> [NodeOperation]
- diffNodes' :: (?oldHtml :: text, ?newHtml :: Text) => Path -> Node -> Node -> [NodeOperation]
- diffAttributes :: [Attribute] -> [Attribute] -> [AttributeOperation]
- nodeOuterHtml :: Node -> Text -> Text
- isNodeEqIgnoringPosition :: Node -> Node -> Bool
Documentation
data NodeOperation Source #
Constructors
UpdateTextContent | |
Fields
| |
ReplaceNode | |
UpdateNode | |
Fields
| |
UpdateComment | |
UpdatePreEscapedTextNode | |
Fields
| |
DeleteNode | |
CreateNode | |
Instances
FromJSON NodeOperation Source # | |
Defined in IHP.ServerSideComponent.ControllerFunctions Methods parseJSON :: Value -> Parser NodeOperation # parseJSONList :: Value -> Parser [NodeOperation] # | |
ToJSON NodeOperation Source # | |
Defined in IHP.ServerSideComponent.ControllerFunctions Methods toJSON :: NodeOperation -> Value # toEncoding :: NodeOperation -> Encoding # toJSONList :: [NodeOperation] -> Value # toEncodingList :: [NodeOperation] -> Encoding # | |
Show NodeOperation Source # | |
Defined in IHP.ServerSideComponent.HtmlDiff Methods showsPrec :: Int -> NodeOperation -> ShowS # show :: NodeOperation -> String showList :: [NodeOperation] -> ShowS # | |
Eq NodeOperation Source # | |
Defined in IHP.ServerSideComponent.HtmlDiff Methods (==) :: NodeOperation -> NodeOperation -> Bool # (/=) :: NodeOperation -> NodeOperation -> Bool # |
data AttributeOperation Source #
Constructors
UpdateAttribute | |
Fields
| |
AddAttribute | |
Fields
| |
DeleteAttribute | |
Fields
|
Instances
FromJSON AttributeOperation Source # | |
Defined in IHP.ServerSideComponent.ControllerFunctions Methods parseJSON :: Value -> Parser AttributeOperation # parseJSONList :: Value -> Parser [AttributeOperation] # | |
ToJSON AttributeOperation Source # | |
Defined in IHP.ServerSideComponent.ControllerFunctions Methods toJSON :: AttributeOperation -> Value # toEncoding :: AttributeOperation -> Encoding # toJSONList :: [AttributeOperation] -> Value # toEncodingList :: [AttributeOperation] -> Encoding # | |
Show AttributeOperation Source # | |
Defined in IHP.ServerSideComponent.HtmlDiff Methods showsPrec :: Int -> AttributeOperation -> ShowS # show :: AttributeOperation -> String showList :: [AttributeOperation] -> ShowS # | |
Eq AttributeOperation Source # | |
Defined in IHP.ServerSideComponent.HtmlDiff Methods (==) :: AttributeOperation -> AttributeOperation -> Bool # (/=) :: AttributeOperation -> AttributeOperation -> Bool # |
diffNodes' :: (?oldHtml :: text, ?newHtml :: Text) => Path -> Node -> Node -> [NodeOperation] Source #
diffAttributes :: [Attribute] -> [Attribute] -> [AttributeOperation] Source #