All Downloads are FREE. Search and download functionalities are using the official Maven repository.

divkit.dsl.DivanPatch.kt Maven / Gradle / Ivy

Go to download

DivKit is an open source Server-Driven UI (SDUI) framework. SDUI is a an emerging technique that leverage the server to build the user interfaces of their mobile app.

There is a newer version: 30.28.0
Show newest version
package divkit.dsl

import com.fasterxml.jackson.annotation.JsonIgnore
import divkit.dsl.core.Supplement
import divkit.dsl.core.SupplementKey
import divkit.dsl.scope.DivScope
import kotlin.String
import kotlin.collections.Map

class DivanPatch internal constructor(
    val patch: Patch,
    val templates: Map,
    @JsonIgnore
    val supplements: Map, Supplement>,
)

fun divanPatch(init: DivScope.() -> Patch): DivanPatch {
    val scope = DivScope()
    val patch = init.invoke(scope)
    return DivanPatch(
        patch = patch,
        templates = scope.templates.mapValues { (_, template) -> template.div },
        supplements = scope.supplements
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy