B4J Library SithasoDaisy: TailwindCss WebApps using B4x

PLEASE DO NOT ASK QUESTION ON THIS THREAD

Hi there

It's will pleasure to release the SithasoDaisy b4xlib for your TailwindCSS based Web Apps. This uses BANano

Get it now for $15 here

See Netlify Demo
Skim the eBook

Cove1.jpg


Check our flipbook here


This library has both Abstract Designer support and full code development.

Check our Netlify Demo here.


Check it on Share My Creations (where you can get a copy)


Happy coding..

SithasoDaisy TailwindCSS WebApps​


Subscribe to SithasoDaisy TailwindCSS WebApps and get a WebApp each month of the year.

Visit https://sithasoholdings.gumroad.com/l/vwaqj to activate your subscription.

PLEASE FOLLOW THIS LINK TO ASK QUESTIONS


Thank you so much.
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
Please redownload 1.31 (updated now), which addresses the locales for the FullCalendar and some other bug fixes.

Thanks

 

Mashiane

Expert
Licensed User
Longtime User
Table Append Icons - Loading

TableAppendIcons.gif


B4X:
Private Sub tb4_btnload (item As Map)
    'get the id of the record
    Dim sid As String = item.Get("id")
    'find the position of the record using the id
    Dim pos As Int = banano.Await(tb4.FindRowByColumn("id", sid))
    'get the caption of the button
    Dim btnCaption As String = banano.Await(tb4.GetRowColumn("btnload", pos))
    '
    Select Case btnCaption
    Case "Process"
        'change the caption to
        tb4.SetRowColumn("btnload", pos, "Loading")
        'set the append icon to loading
        tb4.SetRowColumnAppendLoading("country", pos, True)
    Case "Loading"
        'change the caption to
        tb4.SetRowColumn("btnload", pos, "Process")
        'set the append icon to not-loading
        tb4.SetRowColumnAppendLoading("country", pos, False)
    End Select
End Sub
 

Mashiane

Expert
Licensed User
Longtime User
Table Append Icons - Changing

TableAppendIcons1.gif


B4X:
Private Sub tb4_btnicon (item As Map)
    'get the id of the record
    Dim sid As String = item.Get("id")
    'find the position of the record using the id
    Dim pos As Int = banano.Await(tb4.FindRowByColumn("id", sid))
    'get the caption of the button
    Dim btnCaption As String = banano.Await(tb4.GetRowColumn("btnicon", pos))
    '
    Select Case btnCaption
    Case "Flag"
        'change the caption to
        tb4.SetRowColumn("btnicon", pos, "Insta")
        'set the append icon to insta
        tb4.SetRowColumnAppendIcon("country", pos, "fa-brands fa-instagram")
    Case "Insta"
        'change the caption to
        tb4.SetRowColumn("btnicon", pos, "Flag")
        'set the append icon to flag
        tb4.SetRowColumnAppendIcon("country", pos, "fa-regular fa-flag")
    End Select
End Sub
 

Mashiane

Expert
Licensed User
Longtime User
Table Menus

B4X:
tb2.AddColumnDropDown("menu", "Menu", "fa-solid fa-ellipsis-vertical", "#3f51b5", CreateMap("edit":"Edit","delete":"Delete","clone":"Clone","print":"Print"))

1684791794750.png


B4X:
Private Sub tb2_MenuRow (Row As Int, Action As String, item As Map)
    Log(Row)
    Log(Action)
    Log(item)
End Sub

set menu item colors

B4X:
tb2.SetMenuItemHoverColorIntensity("blue", "100")
    tb2.SetMenuItemFocusColorIntensity("blue", "100")
    tb2.SetMenuItemActiveColorIntensity("blue", "100")
 

Mashiane

Expert
Licensed User
Longtime User
Table ToolBar Menus

1685062643332.png



We add a toolbar menu button with 3 options..

B4X:
Dim ddown As SDUIDropDown = SDUITable1.AddToolbarDropDownIcon("ddown", "fa-solid fa-bars", app.COLOR_ORANGE)
    ddown.AtEnd
    ddown.RoundedBox
    ddown.shadow("")
    ddown.ItemHoverColorIntensity("blue", "100")
    ddown.ItemFocusColorIntensity("blue", "100")
    ddown.ItemActiveColorIntensity("blue", "100")
    '
    ddown.AddItemIcon("export2pdf", "fa-regular fa-file-pdf", "Export to PDF")
    ddown.AddItemIcon("export2xls", "fa-regular fa-file-excel", "Export to XLS")
    ddown.AddItemIcon("export2csv", "fa-solid fa-file-csv", "Export to CSV")

We trap the events, in this case we want to export the table contents to csv file.

B4X:
Private Sub SDUITable1_ddown_Click (item As String)
    Select Case item
    Case "export2pdf"
    Case "export2csv"
        Dim content As String = banano.Await(SDUITable1.ExportToCSV(True, ",", True))
        app.Download(content, "table2csv.csv")
    Case "export2xls"
    End Select
End Sub
 

Mashiane

Expert
Licensed User
Longtime User
Coming Updates to V1.34 SDUITable PropetyBag

1685649818874.png


Add Avatar with Online/Offline Status

B4X:
SDUITable1.AddPropertyAvatar("online", "Avatar Online", "", "12", app.MASK_CIRCLE, "./assets/face11.jpg")
    SDUITable1.SetPropertyAvatarOnline("online", True, True)

Add Avatar with ring

B4X:
    SDUITable1.AddPropertyAvatar("hasring", "Avatar ring", "", "12", app.MASK_CIRCLE, "./assets/face11.jpg")
    SDUITable1.SetPropertyAvatarRing("hasring", True, app.COLOR_PRIMARY)

Add Avatar Group

B4X:
    SDUITable1.AddPropertyAvatarGroup("agroup", "Avatar Group", "", "12", app.MASK_CIRCLE, Array("./assets/1.jpg","./assets/2.jpg","./assets/3.jpg","./assets/4.jpg", "./assets/Angela.jpg"))

Change/Update Avatar Group Images

B4X:
SDUITable1.SetPropertyAvatarGroupItems("agroup", "12", app.MASK_SQUIRCLE, Array("./assets/Anna.jpg","./assets/daisywoman3.png","./assets/face25.jpg","./assets/sponge.png"))

1685650860409.png
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
SDUITable AvatarGroup

1685717904848.png


B4X:
tb4.AddColumnAvatarGroup("agroup", "Resources", "2rem", app.MASK_CIRCLE)
tb4.SetColumnComputeValue("agroup", "Computeagroup")

B4X:
Sub Computeagroup(item As String) As String
    Return $"./assets/Angela.jpg;./assets/Anna.jpg;./assets/daisywoman3.png;./assets/daisywoman1.jpg;./assets/face13.jpg;./assets/profile12.jpg"$
End Sub

Changing the row column avatar group

B4X:
tb4.SetRowColumn("agroup", 2, $"./assets/team-1.jpg;./assets/team-2.jpg;./assets/team-3.jpg;./assets/team-4.jpg;./assets/team-5.jpg"$)


1685718377310.png
 

Mashiane

Expert
Licensed User
Longtime User
SDUITable Totals

This sums up column values and set them on foote

totals.png


B4X:
''start building the page
Private Sub BuildPage
    banano.LoadLayout(app.PageViewer, "summaryperimpactlayout")
    'Set property bag for input
    banano.Await(pbsummaryperimpact.LoadPropertyBagFromJSON("./assets/summaryperimpact.json"))
    'tblsummaryperimpact.AddColumn("id", "#")
    tblsummaryperimpact.AddColumn("balanceimpact", "Impact")
    tblsummaryperimpact.AddColumnMoney("gross", "Gross")
    tblsummaryperimpact.AddColumnMoney("fee", "Fee")
    tblsummaryperimpact.AddColumnMoney("net", "Net")
    'Add edit/delete etc columns
    'tblsummaryperimpact.AddDesignerColums
    tblsummaryperimpact.AddColumnAction("view", "View", "fa-solid fa-eye", "#797EF6")
    'Mount the records
    banano.Await(mounted)
    'total sum of columns on footer
    Dim summary As Map = banano.Await(tblsummaryperimpact.SetFooterTotalSumCountColumns(Array("gross","fee","net")))
    'get the rowcount
    Dim srowcount As String = summary.Get("rowcount")
    'set the footer column to reflect total
    tblsummaryperimpact.SetFooterColumn("balanceimpact", $"Total (${srowcount})"$)
End Sub
 
Last edited:
Top