173 lines
6.7 KiB
Go
173 lines
6.7 KiB
Go
package navigation
|
|
|
|
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
|
|
|
|
import "fmt"
|
|
import "reflect"
|
|
import "github.com/vugu/vjson"
|
|
import "github.com/vugu/vugu"
|
|
import js "github.com/vugu/vugu/js"
|
|
|
|
import (
|
|
"git.d3nexus.de/Dadido3/D3vugu-components/components/input"
|
|
"git.d3nexus.de/Dadido3/D3vugu-components/icons"
|
|
)
|
|
|
|
func (c *Sidebar) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
|
|
|
|
vgout = &vugu.BuildOut{}
|
|
|
|
var vgiterkey interface{}
|
|
_ = vgiterkey
|
|
var vgn *vugu.VGNode
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633"}}}
|
|
vgout.Out = append(vgout.Out, vgn) // root for output
|
|
vgn.AddAttrList(c.AttrMap)
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-sidebar"}}}
|
|
vgparent.AppendChild(vgn)
|
|
vgn.AddAttrInterface("style", fmt.Sprintf("width: %vpx;", c.Width))
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
vgcompKey := vugu.MakeCompKey(0xF056B7F7D7F7A2C6^vgin.CurrentPositionHash(), vgiterkey)
|
|
// ask BuildEnv for prior instance of this specific component
|
|
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
|
|
if vgcomp == nil {
|
|
// create new one if needed
|
|
vgcomp = new(input.Button)
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
}
|
|
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
|
|
vgcomp.SymbolSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
|
|
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
|
|
vgout = &vugu.BuildOut{}
|
|
vgout.Out = append(vgout.Out, vgn)
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
|
|
{
|
|
vgcompKey := vugu.MakeCompKey(0x2C2D8D3889E31C6A^vgin.CurrentPositionHash(), vgiterkey)
|
|
// ask BuildEnv for prior instance of this specific component
|
|
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobalNav)
|
|
if vgcomp == nil {
|
|
// create new one if needed
|
|
vgcomp = new(icons.LGlobalNav)
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
}
|
|
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
return
|
|
})
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
var vgcomp vugu.Builder = c.Entries
|
|
if vgcomp != nil {
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-spacer"}}}
|
|
vgparent.AppendChild(vgn)
|
|
vgn.SetInnerHTML(vugu.HTML(""))
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
var vgcomp vugu.Builder = c.BottomEntries
|
|
if vgcomp != nil {
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t"}
|
|
vgparent.AppendChild(vgn)
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-body"}}}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
vgparent := vgn
|
|
_ = vgparent
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
|
|
vgparent.AppendChild(vgn)
|
|
{
|
|
var vgcomp vugu.Builder = c.Body
|
|
if vgcomp != nil {
|
|
vgin.BuildEnv.WireComponent(vgcomp)
|
|
vgout.Components = append(vgout.Components, vgcomp)
|
|
vgn = &vugu.VGNode{Component: vgcomp}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
|
|
vgparent.AppendChild(vgn)
|
|
}
|
|
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
|
|
{
|
|
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1633357633 {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t}\n\n\t.d3c-1633357633-sidebar {\n\t\theight: 100%;\n\t\tborder-right: 1px solid RGBA(0, 0, 0, 0.05);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tflex-shrink: 0;\n\t}\n\n\t.d3c-1633357633-spacer {\n\t\tflex-grow: 1;\n\t}\n\n\t.d3c-1633357633-body {\n\t\toverflow: auto;\n\t\tflex-grow: 1;\n\t\tflex-shrink: 1;\n\t}\n", Attr: []vugu.VGAttribute(nil)})
|
|
}
|
|
vgout.AppendCSS(vgn)
|
|
return vgout
|
|
}
|
|
|
|
// 'fix' unused imports
|
|
var _ fmt.Stringer
|
|
var _ reflect.Type
|
|
var _ vjson.RawMessage
|
|
var _ js.Value
|