Compare commits

...

4 Commits

Author SHA1 Message Date
34780386f6 Add loading overlay
- Update overlay example page
- Add LLoadingCircle icon
- Rename LErrorCircle to LWarningCircle
- Change ToastMessageTypeCaution to use LWarningCircle
2023-05-28 16:47:10 +02:00
69160e02c4 Add timeout/duration option to toasts
- Rename overlay-classes.go to interfaces.go
- Add event parameter to AddToast method
- Update overlay example page
2023-05-28 15:04:18 +02:00
c5b642cdc8 Add ContainerHorizontal 2023-05-28 13:52:21 +02:00
9b07b21ab5 Add ToastMessage
- Remove OverlayContainerRef from toast components
- Update overlay example page
2023-05-28 13:39:43 +02:00
21 changed files with 2065 additions and 897 deletions

View File

@ -30,7 +30,6 @@
<icons:LDownload></icons:LDownload> <icons:LDownload></icons:LDownload>
<icons:LEdit></icons:LEdit> <icons:LEdit></icons:LEdit>
<icons:LEllipsis></icons:LEllipsis> <icons:LEllipsis></icons:LEllipsis>
<icons:LErrorCircle></icons:LErrorCircle>
<icons:LFilter></icons:LFilter> <icons:LFilter></icons:LFilter>
<icons:LFullScreen></icons:LFullScreen> <icons:LFullScreen></icons:LFullScreen>
<icons:LGlobalNav></icons:LGlobalNav> <icons:LGlobalNav></icons:LGlobalNav>
@ -39,6 +38,7 @@
<icons:LHourglass></icons:LHourglass> <icons:LHourglass></icons:LHourglass>
<icons:LInfoCircle></icons:LInfoCircle> <icons:LInfoCircle></icons:LInfoCircle>
<icons:LInputField></icons:LInputField> <icons:LInputField></icons:LInputField>
<icons:LLoadingCircle></icons:LLoadingCircle>
<icons:LLockClosed></icons:LLockClosed> <icons:LLockClosed></icons:LLockClosed>
<icons:LLockDisabled></icons:LLockDisabled> <icons:LLockDisabled></icons:LLockDisabled>
<icons:LLockOpened></icons:LLockOpened> <icons:LLockOpened></icons:LLockOpened>
@ -66,6 +66,7 @@
<icons:LUpload></icons:LUpload> <icons:LUpload></icons:LUpload>
<icons:LWarehouse></icons:LWarehouse> <icons:LWarehouse></icons:LWarehouse>
<icons:LWarning></icons:LWarning> <icons:LWarning></icons:LWarning>
<icons:LWarningCircle></icons:LWarningCircle>
<icons:LZoom></icons:LZoom> <icons:LZoom></icons:LZoom>
<icons:LZoomIn></icons:LZoomIn> <icons:LZoomIn></icons:LZoomIn>
<icons:LZoomOut></icons:LZoomOut> <icons:LZoomOut></icons:LZoomOut>

View File

@ -33,7 +33,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x95F6715FA8334771^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDFDE13A34120739E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LAccept) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LAccept)
if vgcomp == nil { if vgcomp == nil {
@ -49,7 +49,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8F98A983828960E8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xA4A99DEB8ABC6467^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowDown) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowDown)
if vgcomp == nil { if vgcomp == nil {
@ -65,7 +65,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xBFF1342F684A76E5^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3E98B0432F16B356^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowLeft) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowLeft)
if vgcomp == nil { if vgcomp == nil {
@ -81,7 +81,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6BB4C546D89B0DD^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD330161D7FCFBAEC^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowRight) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowRight)
if vgcomp == nil { if vgcomp == nil {
@ -97,7 +97,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6B971FBBCB7576B8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x8FD8B69C04771C5E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowUp) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LArrowUp)
if vgcomp == nil { if vgcomp == nil {
@ -113,7 +113,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x2371B9C1AB502465^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xED3F7B9C79EAFCBE^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBackToWindow) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBackToWindow)
if vgcomp == nil { if vgcomp == nil {
@ -129,7 +129,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8A16FD31A79A7D9C^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x496318AEECC17614^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBell) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBell)
if vgcomp == nil { if vgcomp == nil {
@ -145,7 +145,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x98F529D3A406EEB0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xAADCEEE4AA392299^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBellDisabled) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LBellDisabled)
if vgcomp == nil { if vgcomp == nil {
@ -161,7 +161,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6167C96337E9443A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xC5E74B82974D997A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCancel) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCancel)
if vgcomp == nil { if vgcomp == nil {
@ -177,7 +177,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6F67AFE3334F9F4C^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB01D24FC1AB43566^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronDown) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronDown)
if vgcomp == nil { if vgcomp == nil {
@ -193,7 +193,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x1ED662C427239432^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x16BE0776F608B6FC^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronLeft) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronLeft)
if vgcomp == nil { if vgcomp == nil {
@ -209,7 +209,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3C55118070D6BC8D^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xFFA4289EE084B4BD^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronRight) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronRight)
if vgcomp == nil { if vgcomp == nil {
@ -225,7 +225,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x82DD8E52A909262C^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB881C0A224F6C6B2^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronUp) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LChevronUp)
if vgcomp == nil { if vgcomp == nil {
@ -241,7 +241,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x558B17D8C65312AF^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xA4DD444EB318D2F6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCircleMinus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCircleMinus)
if vgcomp == nil { if vgcomp == nil {
@ -257,7 +257,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x13E9B77E1436FD4E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x90E48245CDE95F21^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCirclePlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCirclePlus)
if vgcomp == nil { if vgcomp == nil {
@ -273,7 +273,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4B8F6EAF9DB0A1F9^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x964614642D66809F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LClock) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LClock)
if vgcomp == nil { if vgcomp == nil {
@ -289,7 +289,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x1F09739880E5907E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD0F256A4423CF43B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCodeTags) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCodeTags)
if vgcomp == nil { if vgcomp == nil {
@ -305,7 +305,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x320F1B075668C151^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x35A4B19075865195^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCodeTagsClosing) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCodeTagsClosing)
if vgcomp == nil { if vgcomp == nil {
@ -321,7 +321,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE92BE5F32B54B376^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x265CAA088AF7ECE2^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCopy) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCopy)
if vgcomp == nil { if vgcomp == nil {
@ -337,7 +337,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x2BB153641C32D0B6^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x84AC700125A9A125^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCustomize) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCustomize)
if vgcomp == nil { if vgcomp == nil {
@ -353,7 +353,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x724F101C5119DE0E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD020D9D63A4A1D44^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCut) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LCut)
if vgcomp == nil { if vgcomp == nil {
@ -369,7 +369,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x841B78086DA75CEF^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x6FC5BA8D9571E7C1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDelete) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDelete)
if vgcomp == nil { if vgcomp == nil {
@ -385,7 +385,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xC19D15EA0AE2B45E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x20CC48C4ADB1FAA0^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDeliver) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDeliver)
if vgcomp == nil { if vgcomp == nil {
@ -401,7 +401,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x5F96E4FA60A4902A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xA1963C12F02CBA73^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocument) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocument)
if vgcomp == nil { if vgcomp == nil {
@ -417,7 +417,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA165973D7448C078^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDDB463F144A8CFA0^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentBulletList) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentBulletList)
if vgcomp == nil { if vgcomp == nil {
@ -433,7 +433,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xCB66E096C08F0A1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x99E081C9F76AC20F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentCheckboxes) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentCheckboxes)
if vgcomp == nil { if vgcomp == nil {
@ -449,7 +449,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x996E9753A2265CE8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3B0C424AD733AB5^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentRichText) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentRichText)
if vgcomp == nil { if vgcomp == nil {
@ -465,7 +465,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x18BFFD4E97FCC2A8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x412CA57BAB7FDDF3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentText) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDocumentText)
if vgcomp == nil { if vgcomp == nil {
@ -481,7 +481,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x5BFDD138C7559C4E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5F0E78C71661D985^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDownload) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LDownload)
if vgcomp == nil { if vgcomp == nil {
@ -497,7 +497,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3F071A11ACF6D117^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF0EA6E227C4ABBBF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LEdit) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LEdit)
if vgcomp == nil { if vgcomp == nil {
@ -513,7 +513,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x894922ADA2FA769B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xA507D44718A5DD5F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LEllipsis) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LEllipsis)
if vgcomp == nil { if vgcomp == nil {
@ -529,23 +529,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xBFBE1740D463A01E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2C7326B378100002^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LErrorCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LErrorCircle)
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)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xFBC1D05439D80D09^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LFilter) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LFilter)
if vgcomp == nil { if vgcomp == nil {
@ -561,7 +545,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF6A570BDCFAE22E3^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xACC51CF188BD4E8B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LFullScreen) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LFullScreen)
if vgcomp == nil { if vgcomp == nil {
@ -577,7 +561,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x120419A6EA2709CB^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9DCF1D62D9CE7862^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobalNav) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobalNav)
if vgcomp == nil { if vgcomp == nil {
@ -593,7 +577,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xC1918C95EFF3271F^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x26FE5BEF48EE857B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe)
if vgcomp == nil { if vgcomp == nil {
@ -609,7 +593,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x20857ADDCA63EC13^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE00757F8121F0B9D^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LHome) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LHome)
if vgcomp == nil { if vgcomp == nil {
@ -625,7 +609,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x7F91580101E260D6^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3348C39F38C0DD00^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LHourglass) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LHourglass)
if vgcomp == nil { if vgcomp == nil {
@ -641,7 +625,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x822F3BA5431775B1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9BF468CDD4C0EE57^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle)
if vgcomp == nil { if vgcomp == nil {
@ -657,7 +641,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE7DA76178599078A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x20D7E129C01BEC84^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInputField) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInputField)
if vgcomp == nil { if vgcomp == nil {
@ -673,7 +657,23 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xDD9959BEC9A1BF35^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xBF4AA0CD564D5A14^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLoadingCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LLoadingCircle)
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)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xA0A0C35F560CA5B8^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockClosed) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockClosed)
if vgcomp == nil { if vgcomp == nil {
@ -689,7 +689,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE1F0922E17A2DFB8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4D1DEDEE72261588^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockDisabled) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockDisabled)
if vgcomp == nil { if vgcomp == nil {
@ -705,7 +705,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x927AD75D5EEF022^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x69D94D03D081079C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockOpened) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLockOpened)
if vgcomp == nil { if vgcomp == nil {
@ -721,7 +721,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xDED91230E5BE0601^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xEE57B69201DDB75F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMail) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMail)
if vgcomp == nil { if vgcomp == nil {
@ -737,7 +737,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x29A151C262556137^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF34049E40EE6A9F6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMailOpened) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMailOpened)
if vgcomp == nil { if vgcomp == nil {
@ -753,7 +753,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x44D0A8DA9769D5B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x92C14EA8EECF16A6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMinus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMinus)
if vgcomp == nil { if vgcomp == nil {
@ -769,7 +769,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x198A83D9EDA1CB8B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xC4F3641D7C418B51^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMore) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LMore)
if vgcomp == nil { if vgcomp == nil {
@ -785,7 +785,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA0F5F1E589794DD^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE6F9DFFD10B1DDF6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPaste) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPaste)
if vgcomp == nil { if vgcomp == nil {
@ -801,7 +801,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA0CF0E73905F0B04^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE56B59CF51A1C77B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPause) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPause)
if vgcomp == nil { if vgcomp == nil {
@ -817,7 +817,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x229F79AF64929DD^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5B4AE06896563BFB^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus)
if vgcomp == nil { if vgcomp == nil {
@ -833,7 +833,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4A8DF9A36FF8946^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x88EA916C13E361AA^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPowerButton) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPowerButton)
if vgcomp == nil { if vgcomp == nil {
@ -849,7 +849,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF32301B037B43529^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xA1B1E11147FE3C43^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LQuestionMark) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LQuestionMark)
if vgcomp == nil { if vgcomp == nil {
@ -865,7 +865,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x99A6662BB652C8CE^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2B8CFD406F91944C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LRedo) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LRedo)
if vgcomp == nil { if vgcomp == nil {
@ -881,7 +881,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x306DFC1AA5773C1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x560AC5FCAB4ACB70^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LReload) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LReload)
if vgcomp == nil { if vgcomp == nil {
@ -897,7 +897,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xCBAD268E08594825^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x566C64872BC080B9^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSave) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSave)
if vgcomp == nil { if vgcomp == nil {
@ -913,7 +913,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x2E3EAB0A0FE0118^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x12C0A5D580DF7B29^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSearch) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSearch)
if vgcomp == nil { if vgcomp == nil {
@ -929,7 +929,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x7470F324308619BE^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xC6986698E5082964^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSettings) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSettings)
if vgcomp == nil { if vgcomp == nil {
@ -945,7 +945,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x24FE5D41143D4A02^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x27DD2531D73BC51^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSort) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LSort)
if vgcomp == nil { if vgcomp == nil {
@ -961,7 +961,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x524E4520F12D637F^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xBB3723095FCCAC34^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStar) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStar)
if vgcomp == nil { if vgcomp == nil {
@ -977,7 +977,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x72DC8782861A2857^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x54CA39A2AF8684AD^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStart) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStart)
if vgcomp == nil { if vgcomp == nil {
@ -993,7 +993,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3209B38E799A578^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2AEC982C5FA13775^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStop) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStop)
if vgcomp == nil { if vgcomp == nil {
@ -1009,7 +1009,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x972BBF1D60A4FB62^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x68D6FE586FEA1150^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStopWatch) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LStopWatch)
if vgcomp == nil { if vgcomp == nil {
@ -1025,7 +1025,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF706125900B5A6E2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xAAFD5C58AC2CFB71^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LTodoList) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LTodoList)
if vgcomp == nil { if vgcomp == nil {
@ -1041,7 +1041,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x17C92C294CE43D41^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x1DED8FE0AAA1C92F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LUndo) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LUndo)
if vgcomp == nil { if vgcomp == nil {
@ -1057,7 +1057,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6063D4CDF30E91C8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x15D6596E05B4671A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LUpload) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LUpload)
if vgcomp == nil { if vgcomp == nil {
@ -1073,7 +1073,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x23C1BF1D79F84202^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x7BB834E1D2946D07^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarehouse) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarehouse)
if vgcomp == nil { if vgcomp == nil {
@ -1089,7 +1089,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x10A39BADC857BF7A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xBF5DD2C4AC53C0B3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil { if vgcomp == nil {
@ -1105,7 +1105,23 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF82A98FCC91FB45A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x46BF577C4FD050EA^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarningCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LWarningCircle)
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)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x99CEB6B59A82F699^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoom) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoom)
if vgcomp == nil { if vgcomp == nil {
@ -1121,7 +1137,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x1698690F1C0D96^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4F648DAD858C0E8A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoomIn) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoomIn)
if vgcomp == nil { if vgcomp == nil {
@ -1137,7 +1153,7 @@ func (c *ComponentIcons) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE1A8373B4510AB44^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD93ACD076218E08^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoomOut) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LZoomOut)
if vgcomp == nil { if vgcomp == nil {

View File

@ -0,0 +1,27 @@
<div vg-attr='utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1685274222"}'>
<vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1685274222 {
display: flex;
flex-wrap: wrap;
gap: 0.5em;
margin: 0.5em 0;
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
"github.com/vugu/vugu"
)
// ContainerHorizonal arranges all contained elements in one row.
// This can be used to create a menu bar out of buttons.
type ContainerHorizontal struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder `vugu:"data"`
}
</script>

View File

@ -0,0 +1,62 @@
package layout
// 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/utils"
)
// ContainerHorizonal arranges all contained elements in one row.
// This can be used to create a menu bar out of buttons.
type ContainerHorizontal struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder `vugu:"data"`
}
func (c *ContainerHorizontal) 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(nil)}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1685274222"})
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.DefaultSlot
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"}
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-1685274222 {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 0.5em;\n\t\tmargin: 0.5em 0;\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

View File

@ -1,6 +1,9 @@
package overlay package overlay
import ( import (
"sync/atomic"
"time"
"git.d3nexus.de/Dadido3/D3vugu-components/components/navigation" "git.d3nexus.de/Dadido3/D3vugu-components/components/navigation"
"github.com/vugu/vugu" "github.com/vugu/vugu"
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
@ -14,6 +17,8 @@ type Container struct {
modalContainerClasses string // Additional classes that are applied to the whole modal body. modalContainerClasses string // Additional classes that are applied to the whole modal body.
toasts []ContainerToast `vugu:"data"` toasts []ContainerToast `vugu:"data"`
waitOverlayCounter atomic.Int32 // Counter for the wait/loading overlay. If > 0, the overlay will be shown.
} }
type ContainerToast struct { type ContainerToast struct {
@ -47,7 +52,7 @@ func (c *Container) handleToastClose(event vugu.DOMEvent, toast vugu.Builder) {
c.CloseToast(toast) c.CloseToast(toast)
} }
func (c *Container) AddToast(component vugu.Builder) { func (c *Container) AddToast(event vugu.DOMEvent, component vugu.Builder) {
toast := ContainerToast{ toast := ContainerToast{
body: component, body: component,
signalClasses: "d3c-color-accent", signalClasses: "d3c-color-accent",
@ -58,6 +63,16 @@ func (c *Container) AddToast(component vugu.Builder) {
toast.signalClasses, toast.containerClasses = overlayClassesGetter.OverlayClasses() toast.signalClasses, toast.containerClasses = overlayClassesGetter.OverlayClasses()
} }
// Handle auto close after a given amount of time.
if durationGetter, ok := component.(ToastDurationGetter); ok && durationGetter.ToastDuration() > 0 {
go func(component vugu.Builder) {
time.Sleep(durationGetter.ToastDuration())
event.EventEnv().Lock()
defer event.EventEnv().UnlockRender()
c.CloseToast(component)
}(component)
}
c.toasts = append(c.toasts, toast) c.toasts = append(c.toasts, toast)
} }
@ -70,6 +85,25 @@ func (c *Container) CloseToast(component vugu.Builder) {
} }
} }
// WaitOverlayOpen returns true if the wait overlay is currently opened.
func (c *Container) WaitOverlayActive() bool {
return c.waitOverlayCounter.Load() != 0
}
// WaitOverlayOpen shows the wait overlay.
// Internally this is implemented as counter, so you have to ensure that there are as many WaitOverlayOpen as WaitOverlayDone calls.
//
// Always ensure that there is the complementary WaitOverlayDone() call, ideally with a defer.
func (c *Container) WaitOverlayOpen() {
c.waitOverlayCounter.Add(1)
}
// WaitOverlayDone will mark the current wait overlay as done.
// Internally this is implemented as counter, so you have to ensure that there are as many WaitOverlayOpen as WaitOverlayDone calls.
func (c *Container) WaitOverlayDone() {
c.waitOverlayCounter.Add(-1)
}
type OverlayContainerRef struct { type OverlayContainerRef struct {
*Container *Container
} }

View File

@ -17,6 +17,9 @@
</div> </div>
</div> </div>
</div> </div>
<div vg-if="c.WaitOverlayActive()" class="d3c-1684423938-wait-overlay">
<icons:LLoadingCircle style="font-size: 4em;"></icons:LLoadingCircle>
</div>
</div> </div>
<style> <style>
@ -95,6 +98,24 @@
.d3c-1684423938-toast-menu { .d3c-1684423938-toast-menu {
padding: 0.5em 0.5em 0 0; padding: 0.5em 0.5em 0 0;
} }
.d3c-1684423938-wait-overlay {
pointer-events: none;
position: fixed;
box-sizing: border-box;
width: 100vw;
height: 100vh;
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
animation: d3c-1684423938-blur-in 2s forwards;
}
@keyframes d3c-1684423938-blur-in {
from {backdrop-filter: blur(0px) brightness(100%);}
to {backdrop-filter: blur(1px) brightness(80%);}
}
</style> </style>
<script type="application/x-go"> <script type="application/x-go">

View File

@ -218,12 +218,42 @@ func (c *Container) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
if c.WaitOverlayActive() {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1684423938-wait-overlay"}}}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x700D2E58F0637825^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LLoadingCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LLoadingCircle)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.AttrMap = make(map[string]interface{}, 8)
vgcomp.AttrMap["style"] = "font-size: 4em;"
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"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)} 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-1684423938 {\n\t\tposition: fixed;\n\t\tz-index: 2;\n\t}\n\n\t.d3c-1684423938-modal-container {\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tposition: fixed;\n\t\tbackdrop-filter: blur(1px) brightness(80%);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tz-index: 1;\n\t}\n\n\t.d3c-1684423938-modal-container > div {\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t\tborder-radius: 4px;\n\t\tmax-width: 100%;\n\t\tmax-height: 100%;\n\t\toverflow: auto;\n\t\tbox-shadow: 0 1em 3em var(--d3c-color-shadow);\n\t}\n\n\t.d3c-1684423938-modal-menu {\n\t\tpadding: 0.5em;\n\t\tdisplay: flex;\n\t\tgap: 0.5em;\n\t\tjustify-content: flex-end;\n\t\talign-items: baseline;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t}\n\n\t.d3c-1684423938-modal-title {\n\t\ttext-align: center;\n\t}\n\n\t.d3c-1684423938-toast-container {\n\t\tpadding: 1em;\n\t\tpointer-events: none;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tposition: fixed;\n\t\tz-index: 2;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\tgap: 1em;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.d3c-1684423938-toast {\n\t\tpointer-events: auto;\n\t\tdisplay: flex;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tborder-radius: 4px;\n\t\toverflow: hidden;\n\t\tcolor: var(--d3c-color-text);\n\t\tbox-shadow: 0 1em 2em var(--d3c-color-shadow);\n\t}\n\n\t.d3c-1684423938-toast-signal {\n\t\twidth: 0.5em;\n\t\theight: 100%;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t}\n\n\t.d3c-1684423938-toast-menu {\n\t\tpadding: 0.5em 0.5em 0 0;\n\t}\n", Attr: []vugu.VGAttribute(nil)}) vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1684423938 {\n\t\tposition: fixed;\n\t\tz-index: 2;\n\t}\n\n\t.d3c-1684423938-modal-container {\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tposition: fixed;\n\t\tbackdrop-filter: blur(1px) brightness(80%);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tz-index: 1;\n\t}\n\n\t.d3c-1684423938-modal-container > div {\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t\tborder-radius: 4px;\n\t\tmax-width: 100%;\n\t\tmax-height: 100%;\n\t\toverflow: auto;\n\t\tbox-shadow: 0 1em 3em var(--d3c-color-shadow);\n\t}\n\n\t.d3c-1684423938-modal-menu {\n\t\tpadding: 0.5em;\n\t\tdisplay: flex;\n\t\tgap: 0.5em;\n\t\tjustify-content: flex-end;\n\t\talign-items: baseline;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t}\n\n\t.d3c-1684423938-modal-title {\n\t\ttext-align: center;\n\t}\n\n\t.d3c-1684423938-toast-container {\n\t\tpadding: 1em;\n\t\tpointer-events: none;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tposition: fixed;\n\t\tz-index: 2;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\tgap: 1em;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.d3c-1684423938-toast {\n\t\tpointer-events: auto;\n\t\tdisplay: flex;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tborder-radius: 4px;\n\t\toverflow: hidden;\n\t\tcolor: var(--d3c-color-text);\n\t\tbox-shadow: 0 1em 2em var(--d3c-color-shadow);\n\t}\n\n\t.d3c-1684423938-toast-signal {\n\t\twidth: 0.5em;\n\t\theight: 100%;\n\t\tbackground-color: var(--d3c-color-background);\n\t\tcolor: var(--d3c-color-text);\n\t}\n\n\t.d3c-1684423938-toast-menu {\n\t\tpadding: 0.5em 0.5em 0 0;\n\t}\n\n\t.d3c-1684423938-wait-overlay {\n\t\tpointer-events: none;\n\t\tposition: fixed;\n\t\tbox-sizing: border-box;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tz-index: 3;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tanimation: d3c-1684423938-blur-in 2s forwards;\n\t}\n\n\t@keyframes d3c-1684423938-blur-in {\n\t\tfrom {backdrop-filter: blur(0px) brightness(100%);}\n\t\tto {backdrop-filter: blur(1px) brightness(80%);}\n\t}\n", Attr: []vugu.VGAttribute(nil)})
} }
vgout.AppendCSS(vgn) vgout.AppendCSS(vgn)
return vgout return vgout

View File

@ -1,8 +1,15 @@
package overlay package overlay
import "time"
// OverlayClassesGetter can be implemented by components that are used in overlays. // OverlayClassesGetter can be implemented by components that are used in overlays.
// With this mechanic these components can set additional CSS classes to the modal or toast container. // With this mechanic these components can set additional CSS classes to the modal or toast container.
// One use case is to give a toast or modal some other color with the `d3c-color-*` classes. // One use case is to give a toast or modal some other color with the `d3c-color-*` classes.
type OverlayClassesGetter interface { type OverlayClassesGetter interface {
OverlayClasses() (signalClasses, containerClasses string) OverlayClasses() (signalClasses, containerClasses string)
} }
// ToastDurationGetter can be implemented by toast components to signal that the toast should close automatically after some given duration.
type ToastDurationGetter interface {
ToastDuration() time.Duration
}

View File

@ -0,0 +1,37 @@
package overlay
import "time"
type ToastMessageType int
const (
ToastMessageTypeSuccess ToastMessageType = iota
ToastMessageTypeAttention
ToastMessageTypeCaution
ToastMessageTypeCritical
)
type ToastMessage struct {
MessageType ToastMessageType `vugu:"data"`
Message string `vugu:"data"`
Duration time.Duration // Auto close toast after this duration.
}
func (c *ToastMessage) OverlayClasses() (signalClasses, containerClasses string) {
switch c.MessageType {
case ToastMessageTypeSuccess:
return "d3c-color-success", ""
case ToastMessageTypeAttention:
return "d3c-color-attention", ""
case ToastMessageTypeCaution:
return "d3c-color-caution", ""
case ToastMessageTypeCritical:
return "d3c-color-critical", ""
}
return "", ""
}
func (c *ToastMessage) ToastDuration() time.Duration {
return c.Duration
}

View File

@ -0,0 +1,25 @@
<div>
<layout:Container>
<div class="d3c-1685271365-flex">
<icons:LInfoCircle vg-if="c.MessageType == ToastMessageTypeAttention" style="font-size: 2em;"></icons:LInfoCircle>
<icons:LWarningCircle vg-if="c.MessageType == ToastMessageTypeCaution" style="font-size: 2em;"></icons:LWarningCircle>
<icons:LWarning vg-if="c.MessageType == ToastMessageTypeCritical" style="font-size: 2em;"></icons:LWarning>
<span vg-content="c.Message" style="white-space: pre-wrap;"></span>
</div>
</layout:Container>
</div>
<style>
.d3c-1685271365-flex {
margin: 0.5em 0;
display: flex;
gap: 0.5em;
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/components/layout"
"git.d3nexus.de/Dadido3/D3vugu-components/icons"
)
</script>

View File

@ -0,0 +1,145 @@
package overlay
// 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/layout"
"git.d3nexus.de/Dadido3/D3vugu-components/icons"
)
func (c *ToastMessage) 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(nil)}
vgout.Out = append(vgout.Out, vgn) // root for output
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xFE91A85B84F1D501^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.Container)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
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-1685271365-flex"}}}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
if c.MessageType == ToastMessageTypeAttention {
{
vgcompKey := vugu.MakeCompKey(0xDF2F2876D736456A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LInfoCircle)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.AttrMap = make(map[string]interface{}, 8)
vgcomp.AttrMap["style"] = "font-size: 2em;"
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\t"}
vgparent.AppendChild(vgn)
if c.MessageType == ToastMessageTypeCaution {
{
vgcompKey := vugu.MakeCompKey(0x4C9AB62B3E5D8C8E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarningCircle)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LWarningCircle)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.AttrMap = make(map[string]interface{}, 8)
vgcomp.AttrMap["style"] = "font-size: 2em;"
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\t"}
vgparent.AppendChild(vgn)
if c.MessageType == ToastMessageTypeCritical {
{
vgcompKey := vugu.MakeCompKey(0xA70DD6C2A5BD0087^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LWarning)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.AttrMap = make(map[string]interface{}, 8)
vgcomp.AttrMap["style"] = "font-size: 2em;"
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\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "span", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "white-space: pre-wrap;"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(c.Message)
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)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
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-1685271365-flex {\n\t\tmargin: 0.5em 0;\n\t\tdisplay: flex;\n\t\tgap: 0.5em;\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

View File

@ -1,15 +1,16 @@
package overlay package overlay
import ( import (
"time"
"github.com/vugu/vugu" "github.com/vugu/vugu"
) )
type ToastSimple struct { type ToastSimple struct {
OverlayContainerRef
IconSlot vugu.Builder `vugu:"data"` // Slot for the symbol. IconSlot vugu.Builder `vugu:"data"` // Slot for the symbol.
Message string `vugu:"data"` Message string `vugu:"data"`
Duration time.Duration // Auto close toast after this duration.
SignalColor string // A d3c CSS class for the color scheme of the small bar. SignalColor string // A d3c CSS class for the color scheme of the small bar.
} }
@ -17,3 +18,7 @@ type ToastSimple struct {
func (c *ToastSimple) OverlayClasses() (signalClasses, containerClasses string) { func (c *ToastSimple) OverlayClasses() (signalClasses, containerClasses string) {
return c.SignalColor, "" return c.SignalColor, ""
} }
func (c *ToastSimple) ToastDuration() time.Duration {
return c.Duration
}

View File

@ -0,0 +1,53 @@
<svg viewBox="0 0 16 16" vg-attr='utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-icon d3-lineicon"}'>
<circle class="d3c-1685282596-path d3c-icon-stroke" cx="8" cy="8" r="7.5" stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
</svg>
<style>
.d3c-icon {
height: 1em;
}
.d3c-icon-stroke {
stroke: var(--d3c-color-text);
}
.d3c-icon-fill {
fill: var(--d3c-color-text);
}
.d3c-icon-use-color .d3c-icon-stroke {
stroke: var(--d3c-color-background);
}
.d3c-icon-use-color .d3c-icon-fill {
fill: var(--d3c-color-background);
}
/*Custom stuff for the animation.*/
.d3c-1685282596-path {
stroke-dasharray: 150, 200;
stroke-dashoffset: -10;
animation: d3c-1685282596-rotate 2s linear infinite, d3c-1685282596-dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
transform-origin: center;
}
@keyframes d3c-1685282596-rotate {
100% {transform: rotate(360deg);}
}
@keyframes d3c-1685282596-dash {
0% {stroke-dasharray: 1, 75; stroke-dashoffset: 0;}
50% {stroke-dasharray: 33, 75; stroke-dashoffset: -13;}
100% {stroke-dasharray: 33, 75; stroke-dashoffset: -46;}
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
)
type LLoadingCircle struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,51 @@
package icons
// 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/utils"
)
type LLoadingCircle struct {
AttrMap vugu.AttrMap
}
func (c *LLoadingCircle) 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: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-icon d3-lineicon"})
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "circle", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1685282596-path d3c-icon-stroke"}, vugu.VGAttribute{Namespace: "", Key: "cx", Val: "8"}, vugu.VGAttribute{Namespace: "", Key: "cy", Val: "8"}, vugu.VGAttribute{Namespace: "", Key: "r", Val: "7.5"}, vugu.VGAttribute{Namespace: "", Key: "stroke-width", Val: "1"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linejoin", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linecap", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "fill", Val: "none"}}}
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-icon {\n\t\theight: 1em;\n\t}\n\n\t.d3c-icon-stroke {\n\t\tstroke: var(--d3c-color-text);\n\t}\n\n\t.d3c-icon-fill {\n\t\tfill: var(--d3c-color-text);\n\t}\n\n\t.d3c-icon-use-color .d3c-icon-stroke {\n\t\tstroke: var(--d3c-color-background);\n\t}\n\n\t.d3c-icon-use-color .d3c-icon-fill {\n\t\tfill: var(--d3c-color-background);\n\t}\n\n\t/*Custom stuff for the animation.*/\n\n\t.d3c-1685282596-path {\n\t\tstroke-dasharray: 150, 200;\n\t\tstroke-dashoffset: -10;\n\t\tanimation: d3c-1685282596-rotate 2s linear infinite, d3c-1685282596-dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;\n\t\ttransform-origin: center;\n\t}\n\n\t@keyframes d3c-1685282596-rotate {\n\t\t100% {transform: rotate(360deg);}\n\t}\n\t@keyframes d3c-1685282596-dash {\n\t\t0% {stroke-dasharray: 1, 75; stroke-dashoffset: 0;}\n\t\t50% {stroke-dasharray: 33, 75; stroke-dashoffset: -13;}\n\t\t100% {stroke-dasharray: 33, 75; stroke-dashoffset: -46;}\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

View File

@ -31,7 +31,7 @@
"git.d3nexus.de/Dadido3/D3vugu-components/utils" "git.d3nexus.de/Dadido3/D3vugu-components/utils"
) )
type LErrorCircle struct{ type LWarningCircle struct{
AttrMap vugu.AttrMap AttrMap vugu.AttrMap
} }
</script> </script>

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 962 B

View File

@ -12,11 +12,11 @@ import (
"git.d3nexus.de/Dadido3/D3vugu-components/utils" "git.d3nexus.de/Dadido3/D3vugu-components/utils"
) )
type LErrorCircle struct { type LWarningCircle struct {
AttrMap vugu.AttrMap AttrMap vugu.AttrMap
} }
func (c *LErrorCircle) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) { func (c *LWarningCircle) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{} vgout = &vugu.BuildOut{}

View File

@ -24,7 +24,7 @@
" <vg-slot name=\"DefaultSlot\">Successful action</vg-slot>\n" + " <vg-slot name=\"DefaultSlot\">Successful action</vg-slot>\n" +
"</input:Button>"' style="margin: 0;"></pre> "</input:Button>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container"> <layout:ContainerHorizontal>
<input:Button class="d3c-color-success"> <input:Button class="d3c-color-success">
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Successful action</vg-slot> <vg-slot name="DefaultSlot">Successful action</vg-slot>
@ -41,8 +41,8 @@
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot> <vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
<vg-slot name="DefaultSlot">Dangerous action</vg-slot> <vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button> </input:Button>
</div> </layout:ContainerHorizontal>
<div class="flex-container"> <layout:ContainerHorizontal>
<input:Button class="d3c-color-success-faded"> <input:Button class="d3c-color-success-faded">
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Successful action</vg-slot> <vg-slot name="DefaultSlot">Successful action</vg-slot>
@ -59,46 +59,48 @@
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot> <vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
<vg-slot name="DefaultSlot">Dangerous action</vg-slot> <vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button> </input:Button>
</div> </layout:ContainerHorizontal>
<h2>Tags</h2> <h2>Tags</h2>
<view:Code> <view:Code>
<pre vg-content='"<view:Tag class=\"d3c-color-success\">This was a success</view:Tag>"' style="margin: 0;"></pre> <pre vg-content='"<view:Tag class=\"d3c-color-success\">This was a success</view:Tag>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container"> <layout:ContainerHorizontal>
<view:Tag class="d3c-color-success">This was a success</view:Tag> <view:Tag class="d3c-color-success">This was a success</view:Tag>
<view:Tag class="d3c-color-attention">Attention needed</view:Tag> <view:Tag class="d3c-color-attention">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution">Warning</view:Tag> <view:Tag class="d3c-color-caution">Warning</view:Tag>
<view:Tag class="d3c-color-critical">Something went wrong</view:Tag> <view:Tag class="d3c-color-critical">Something went wrong</view:Tag>
</div> </layout:ContainerHorizontal>
<div class="flex-container"> <layout:ContainerHorizontal>
<view:Tag class="d3c-color-success-faded">This was a success</view:Tag> <view:Tag class="d3c-color-success-faded">This was a success</view:Tag>
<view:Tag class="d3c-color-attention-faded">Attention needed</view:Tag> <view:Tag class="d3c-color-attention-faded">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution-faded">Warning</view:Tag> <view:Tag class="d3c-color-caution-faded">Warning</view:Tag>
<view:Tag class="d3c-color-critical-faded">Something went wrong</view:Tag> <view:Tag class="d3c-color-critical-faded">Something went wrong</view:Tag>
</div> </layout:ContainerHorizontal>
<h2>Icons</h2> <h2>Icons</h2>
<p>Icons will use the text color by default, if you need to change their stroke/fill coloring, use the <view:CodeInline>d3c-icon-use-color</view:CodeInline> class.</p> <p>Icons will use the text color by default, if you need to change their stroke/fill coloring, use the <view:CodeInline>d3c-icon-use-color</view:CodeInline> class.</p>
<view:Code> <view:Code>
<pre vg-content='"<icons:LInfoCircle class=\"d3c-color-attention d3c-icon-use-color\"></icons:LInfoCircle>"' style="margin: 0;"></pre> <pre vg-content='"<icons:LInfoCircle class=\"d3c-color-attention d3c-icon-use-color\"></icons:LInfoCircle>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container" style="font-size: 2em;"> <layout:ContainerHorizontal style="font-size: 2em;">
<icons:LInfoCircle class="d3c-color-attention d3c-icon-use-color"></icons:LInfoCircle> <icons:LInfoCircle class="d3c-color-attention d3c-icon-use-color"></icons:LInfoCircle>
<icons:LWarning class="d3c-color-critical d3c-icon-use-color"></icons:LWarning> <icons:LWarning class="d3c-color-critical d3c-icon-use-color"></icons:LWarning>
</div> </layout:ContainerHorizontal>
<h2>Containers</h2> <h2>Containers</h2>
<layout:LayerContainer class="d3c-color-layer-1"> <layout:LayerContainer class="d3c-color-layer-1">
<span>This container uses the <view:CodeInline class="d3c-color-layer-2">d3c-color-layer-1</view:CodeInline> class. All child elements inherit the color scheme.</span> <span>This container uses the <view:CodeInline class="d3c-color-layer-2">d3c-color-layer-1</view:CodeInline> class. All child elements inherit the color scheme.</span>
<input:Button> <layout:ContainerHorizontal>
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <input:Button>
<vg-slot name="DefaultSlot">Does inherit color</vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
</input:Button> <vg-slot name="DefaultSlot">Does inherit color</vg-slot>
<input:Button class="d3c-color-layer-0"> </input:Button>
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <input:Button class="d3c-color-layer-0">
<vg-slot name="DefaultSlot">Doesn't inherit color</vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
</input:Button> <vg-slot name="DefaultSlot">Doesn't inherit color</vg-slot>
</input:Button>
</layout:ContainerHorizontal>
</layout:LayerContainer> </layout:LayerContainer>
<layout:LayerContainer class="d3c-color-critical-faded"> <layout:LayerContainer class="d3c-color-critical-faded">
<icons:LWarning></icons:LWarning> <span>Something bad happened!</span> <icons:LWarning></icons:LWarning> <span>Something bad happened!</span>

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ func (c *PageOverlays) handleSimpleModalButton(event vugu.DOMEvent) {
} }
func (c *PageOverlays) handleSimpleToastButton(event vugu.DOMEvent) { func (c *PageOverlays) handleSimpleToastButton(event vugu.DOMEvent) {
c.AddToast(&overlay.ToastSimple{ c.AddToast(event, &overlay.ToastSimple{
IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{"style": "font-size: 2em;"}}, IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{"style": "font-size: 2em;"}},
Message: "This is a simple toast!\nIt supports multiple lines and has an icon slot.\nThere also can be multiple of it at the same time, this one was opened at " + time.Now().Format(time.TimeOnly) + ".", Message: "This is a simple toast!\nIt supports multiple lines and has an icon slot.\nThere also can be multiple of it at the same time, this one was opened at " + time.Now().Format(time.TimeOnly) + ".",
SignalColor: "d3c-color-attention", SignalColor: "d3c-color-attention",
@ -33,9 +33,30 @@ func (c *PageOverlays) handleSimpleToastButton(event vugu.DOMEvent) {
} }
func (c *PageOverlays) handleWarningToastButton(event vugu.DOMEvent) { func (c *PageOverlays) handleWarningToastButton(event vugu.DOMEvent) {
c.AddToast(&overlay.ToastSimple{ c.AddToast(event, &overlay.ToastSimple{
IconSlot: &icons.LWarning{AttrMap: vugu.AttrMap{"style": "font-size: 2em;", "class": "d3c-color-caution d3c-icon-use-color"}}, IconSlot: &icons.LWarning{AttrMap: vugu.AttrMap{"style": "font-size: 2em;", "class": "d3c-color-caution d3c-icon-use-color"}},
Message: "This is a warning, be careful!", Message: "This is a warning, be careful!",
SignalColor: "d3c-color-caution", SignalColor: "d3c-color-caution",
}) })
} }
func (c *PageOverlays) handleToastMessageButton(event vugu.DOMEvent) {
c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeCritical, Message: "Uh oh!"})
}
func (c *PageOverlays) handleToastMessageTimeoutButton(event vugu.DOMEvent) {
c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeSuccess, Message: "That worked!", Duration: 5 * time.Second})
}
func (c *PageOverlays) handleWaitOverlayButton(event vugu.DOMEvent) {
c.WaitOverlayOpen()
go func() {
// Simulate some request or some other action.
time.Sleep(5 * time.Second)
// We need to lock and unlock the event environment in order for the DOM to re-render and the overlay to disappear correctly.
event.EventEnv().Lock()
defer event.EventEnv().UnlockRender()
defer c.WaitOverlayDone() // WaitOverlayDone has to be called before UnlockRender, so we need to put it afterwards (defer ordering).
// Update other UI stuff here.
}()
}

View File

@ -21,18 +21,60 @@
<input:Button @Click="c.handleSimpleModalButton(event)">Open simple modal</input:Button> <input:Button @Click="c.handleSimpleModalButton(event)">Open simple modal</input:Button>
<h2>Toasts</h2> <h2>Toasts</h2>
<p>A simple text and icon containing toast is already contained in the overlay package. Use it with:</p> <p>A simple toast with an icon slot and custom color setting can be found in the overlay package. Use it with:</p>
<view:Code> <view:Code>
<pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" + <pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(&overlay.ToastSimple{\n" + " c.AddToast(event, &overlay.ToastSimple{\n" +
" IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" + " IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" +
" Message: \"This is a simple toast!\\nIt supports multiple lines and has an icon slot.\\nThere also can be multiple of it at the same time, this one was opened at \" + time.Now().Format(time.TimeOnly) + \".\",\n" + " Message: \"This is a simple toast!\\nIt supports multiple lines and has an icon slot.\\nThere also can be multiple of it at the same time, this one was opened at \" + time.Now().Format(time.TimeOnly) + \".\",\n" +
" SignalColor: \"d3c-color-accent\",\n" + " SignalColor: \"d3c-color-accent\",\n" +
" })\n" + " })\n" +
"}"' style="margin: 0;"></pre> "}"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<input:Button @Click="c.handleSimpleToastButton(event)">Open simple toast</input:Button> <layout:ContainerHorizontal>
<input:Button @Click="c.handleWarningToastButton(event)">Open warning toast</input:Button> <input:Button @Click="c.handleSimpleToastButton(event)">Open simple toast</input:Button>
<input:Button @Click="c.handleWarningToastButton(event)">Open warning toast</input:Button>
</layout:ContainerHorizontal>
<p>A shorter version of this is <view:CodeInline>overlay.ToastMessage</view:CodeInline> which only accepts a message text and a message type which is one of</p>
<ul>
<li><view:CodeInline>overlay.ToastMessageTypeSuccess</view:CodeInline></li>
<li><view:CodeInline>overlay.ToastMessageTypeAttention</view:CodeInline></li>
<li><view:CodeInline>overlay.ToastMessageTypeCaution</view:CodeInline></li>
<li><view:CodeInline>overlay.ToastMessageTypeCritical</view:CodeInline></li>
</ul>
<view:Code>
<pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeCritical, Message: \"Uh oh!\"})\n" +
"}"' style="margin: 0;"></pre>
</view:Code>
<input:Button @Click="c.handleToastMessageButton(event)">Open message toast</input:Button>
<p>To let the toast close itself after some time, you can use the <view:CodeInline>Duration</view:CodeInline> option:</p>
<view:Code>
<pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeSuccess, Message: \"That worked!\", Duration: 5 * time.Second})\n" +
"}"' style="margin: 0;"></pre>
</view:Code>
<input:Button @Click="c.handleToastMessageTimeoutButton(event)">Open self closing message toast</input:Button>
<h2>Wait/Load overlay</h2>
<p>For actions that take a bit longer you can show the wait overlay:</p>
<view:Code>
<pre vg-content='"func (c *PageOverlays) handleWaitOverlayButton(event vugu.DOMEvent) {\n" +
" c.WaitOverlayOpen()\n" +
" go func() {\n" +
" // Simulate some request or some other action.\n" +
" time.Sleep(5 * time.Second)\n" +
" // We need to lock and unlock the event environment in order for the DOM to re-render and the overlay to disappear correctly.\n" +
" event.EventEnv().Lock()\n" +
" defer event.EventEnv().UnlockRender()\n" +
" defer c.WaitOverlayDone() // WaitOverlayDone has to be called before UnlockRender, so we need to put it afterwards (defer ordering).\n" +
" // Update other UI stuff here.\n" +
" }()\n" +
"}"' style="margin: 0;"></pre>
</view:Code>
<layout:ContainerHorizontal>
<input:Button @Click="c.handleWaitOverlayButton(event)">Do some action that takes time</input:Button>
</layout:ContainerHorizontal>
</layout:Container> </layout:Container>
</div> </div>

View File

@ -29,7 +29,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4EC622AB5385FB53^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x6122140AA7970454^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container)
if vgcomp == nil { if vgcomp == nil {
@ -60,7 +60,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA86AF7B68F8AD85^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x1B9CC39770823BF5^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -97,7 +97,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xAA81EC30F5C8A301^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5A00C43B8907AA2A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -124,7 +124,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x86D5B8E7A405D1BA^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xFBC0CBC5ECD097E3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -164,7 +164,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x231AC275ADD0C8A2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB6D21A4B8525BB8B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -205,7 +205,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xD96FB389C1BB7FDA^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDBC72B8B2CD6DEC6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -239,11 +239,11 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML("A simple text and icon containing toast is already contained in the overlay package. Use it with:")) vgn.SetInnerHTML(vugu.HTML("A simple toast with an icon slot and custom color setting can be found in the overlay package. Use it with:"))
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4C6CB0EF8A1C94A7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x63C4F75486DED1E9^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -264,7 +264,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "margin: 0;"}}} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "margin: 0;"}}}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn.SetInnerHTML("func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" + vgn.SetInnerHTML("func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(&overlay.ToastSimple{\n" + " c.AddToast(event, &overlay.ToastSimple{\n" +
" IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" + " IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" +
" Message: \"This is a simple toast!\\nIt supports multiple lines and has an icon slot.\\nThere also can be multiple of it at the same time, this one was opened at \" + time.Now().Format(time.TimeOnly) + \".\",\n" + " Message: \"This is a simple toast!\\nIt supports multiple lines and has an icon slot.\\nThere also can be multiple of it at the same time, this one was opened at \" + time.Now().Format(time.TimeOnly) + \".\",\n" +
" SignalColor: \"d3c-color-accent\",\n" + " SignalColor: \"d3c-color-accent\",\n" +
@ -281,16 +281,15 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x27E6D3B288976594^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF0ED0ED27EF42994^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil { if vgcomp == nil {
// create new one if needed // create new one if needed
vgcomp = new(input.Button) vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp) vgin.BuildEnv.WireComponent(vgcomp)
} }
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleSimpleToastButton(event) })
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) { vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)} vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{} vgout = &vugu.BuildOut{}
@ -298,7 +297,276 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open simple toast"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xA4081932846E05D1^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.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleSimpleToastButton(event) })
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open simple toast"}
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\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xF867B04EF9CAB93D^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.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleWarningToastButton(event) })
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open warning toast"}
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)
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(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "A shorter version of this is "}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x18470969C6AFC448^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "overlay.ToastMessage"}
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: " which only accepts a message text and a message type which is one of"}
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: "ul", 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)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "li", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
{
vgcompKey := vugu.MakeCompKey(0x2D884CCCED60ED30^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "overlay.ToastMessageTypeSuccess"}
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\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "li", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
{
vgcompKey := vugu.MakeCompKey(0xCA36BD2A0004F7B1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "overlay.ToastMessageTypeAttention"}
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\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "li", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
{
vgcompKey := vugu.MakeCompKey(0x86FB3ECC963617F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "overlay.ToastMessageTypeCaution"}
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\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "li", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
{
vgcompKey := vugu.MakeCompKey(0x75545EEE368E88F1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "overlay.ToastMessageTypeCritical"}
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)
{
vgcompKey := vugu.MakeCompKey(0xD4553E3A6B4CDAC5^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.Code)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "margin: 0;"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML("func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeCritical, Message: \"Uh oh!\"})\n" +
"}")
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return return
}) })
@ -309,7 +577,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA065017C7F9FF6D6^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x8893AD0E010D9420^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -318,7 +586,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgin.BuildEnv.WireComponent(vgcomp) vgin.BuildEnv.WireComponent(vgcomp)
} }
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleWarningToastButton(event) }) vgcomp.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleToastMessageButton(event) })
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) { vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)} vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{} vgout = &vugu.BuildOut{}
@ -326,7 +594,214 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open warning toast"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open message toast"}
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(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "To let the toast close itself after some time, you can use the "}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x984905AE566E7226^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.CodeInline)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Duration"}
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: " option:"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x170E6B6004248D96^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.Code)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "margin: 0;"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML("func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.AddToast(event, &overlay.ToastMessage{MessageType: overlay.ToastMessageTypeSuccess, Message: \"That worked!\", Duration: 5 * time.Second})\n" +
"}")
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
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)
{
vgcompKey := vugu.MakeCompKey(0x14E84F6F0F2D45AC^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.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleToastMessageTimeoutButton(event) })
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open self closing message toast"}
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\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "h2", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML("Wait/Load overlay"))
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML("For actions that take a bit longer you can show the wait overlay:"))
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x9C5F61CA0305F660^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.Code)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "style", Val: "margin: 0;"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML("func (c *PageOverlays) handleWaitOverlayButton(event vugu.DOMEvent) {\n" +
" c.WaitOverlayOpen()\n" +
" go func() {\n" +
" // Simulate some request or some other action.\n" +
" time.Sleep(5 * time.Second)\n" +
" // We need to lock and unlock the event environment in order for the DOM to re-render and the overlay to disappear correctly.\n" +
" event.EventEnv().Lock()\n" +
" defer event.EventEnv().UnlockRender()\n" +
" defer c.WaitOverlayDone() // WaitOverlayDone has to be called before UnlockRender, so we need to put it afterwards (defer ordering).\n" +
" // Update other UI stuff here.\n" +
" }()\n" +
"}")
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
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)
{
vgcompKey := vugu.MakeCompKey(0x2E51C28B04B3A7CF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xC9431316B96BAF61^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.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleWaitOverlayButton(event) })
vgcomp.DefaultSlot = 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
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Do some action that takes time"}
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) vgparent.AppendChild(vgn)
return return
}) })