From 03d24172ca800727f7b5bcc662a0f1cf0991164f Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Sat, 25 Jan 2025 08:40:23 -0700 Subject: [PATCH] feat: updated version of templ --- ui/common_templ.go | 434 ++++++++++++++++----------------- ui/common_templ.txt | 185 ++++++++++++++ ui/errors_templ.go | 10 +- ui/errors_templ.txt | 3 + ui/selector/selector_templ.go | 54 ++-- ui/selector/selector_templ.txt | 25 ++ ui/trigger_rebuild.templ | 2 + ui/trigger_rebuild_templ.go | 40 +++ ui/trigger_rebuild_templ.txt | 1 + 9 files changed, 505 insertions(+), 249 deletions(-) create mode 100644 ui/common_templ.txt create mode 100644 ui/errors_templ.txt create mode 100644 ui/selector/selector_templ.txt create mode 100644 ui/trigger_rebuild.templ create mode 100644 ui/trigger_rebuild_templ.go create mode 100644 ui/trigger_rebuild_templ.txt diff --git a/ui/common_templ.go b/ui/common_templ.go index b3ee4ac..c2c4c15 100644 --- a/ui/common_templ.go +++ b/ui/common_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package ui //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -83,7 +83,7 @@ func HeroIcon(style string, name string) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" class=\"h-5 w-5\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -136,7 +136,7 @@ func button(args buttonArgs, attrs templ.Attributes) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -174,11 +174,11 @@ func button(args buttonArgs, attrs templ.Attributes) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -208,7 +208,7 @@ func mutedButton(args buttonArgs, attrs templ.Attributes) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -246,11 +246,11 @@ func mutedButton(args buttonArgs, attrs templ.Attributes) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -276,7 +276,7 @@ func FormBuilderNavTitle(form frm.Form) templ.Component { templ_7745c5c3_Var11 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -289,11 +289,11 @@ func FormBuilderNavTitle(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -319,7 +319,7 @@ func FormBuilderNav(form frm.Form) templ.Component { templ_7745c5c3_Var13 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -339,7 +339,7 @@ func FormBuilderNav(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -347,7 +347,7 @@ func FormBuilderNav(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" data-hx-trigger=\"click\" data-hx-swap=\"none\"> Save Form
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -395,7 +395,7 @@ func head(pageTitle string) templ.Component { templ_7745c5c3_Var15 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<head><title>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -408,7 +408,7 @@ func head(pageTitle string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -424,7 +424,7 @@ func head(pageTitle string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = loadDependenciesOnce.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var17), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -658,7 +658,7 @@ func footer() templ.Component { templ_7745c5c3_Var33 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - return templ_7745c5c3_Err + return nil }) } @@ -684,7 +684,7 @@ func App(pageTitle string) templ.Component { templ_7745c5c3_Var34 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -692,7 +692,7 @@ func App(pageTitle string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -700,7 +700,7 @@ func App(pageTitle string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -708,11 +708,11 @@ func App(pageTitle string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -750,7 +750,7 @@ func Builder(form frm.Form) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -758,7 +758,7 @@ func Builder(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -766,7 +766,7 @@ func Builder(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -774,7 +774,7 @@ func Builder(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -782,17 +782,17 @@ func Builder(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = App("Form builder").Render(templ.WithChildren(ctx, templ_7745c5c3_Var36), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -830,7 +830,7 @@ func Viewer(form frm.Form) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -838,17 +838,17 @@ func Viewer(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = App(form.Name).Render(templ.WithChildren(ctx, templ_7745c5c3_Var38), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -874,7 +874,7 @@ func FormSettings(form frm.Form) templ.Component { templ_7745c5c3_Var39 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "\" data-hx-swap-oob=\"true\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -908,7 +908,7 @@ func FormSettings(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -964,7 +964,7 @@ func builderColumnLeft(form frm.Form) templ.Component { templ_7745c5c3_Var44 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -976,11 +976,11 @@ func builderColumnLeft(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1006,7 +1006,7 @@ func FormPreview(form frm.Form) templ.Component { templ_7745c5c3_Var45 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
https://your-form-domain.com/form
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "
https://your-form-domain.com/form
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1014,11 +1014,11 @@ func FormPreview(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1043,7 +1043,7 @@ func FieldTypeIcon(fieldType types.FormFieldType) templ.Component { templ_7745c5c3_Var46 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1059,11 +1059,11 @@ func FieldTypeIcon(fieldType types.FormFieldType) templ.Component { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1089,7 +1089,7 @@ func FormFields(form frm.Form) templ.Component { templ_7745c5c3_Var47 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1097,11 +1097,11 @@ func FormFields(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1126,7 +1126,7 @@ func FormFieldsForm(form frm.Form) templ.Component { templ_7745c5c3_Var48 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1146,7 +1146,7 @@ func FormFieldsForm(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = button(buttonArgs{ Label: "Add field", @@ -1157,7 +1157,7 @@ func FormFieldsForm(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\" data-hx-trigger=\"end\" data-hx-swap=\"outerHTML\" data-hx-target=\"#form-fields-form\" data-hx-indidcator=\"#ind\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, field := range sortFields(form.Fields) { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if field.Required { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1232,16 +1232,16 @@ func FormFieldsForm(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1266,11 +1266,11 @@ func requiredFieldIndicator() templ.Component { templ_7745c5c3_Var54 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("*") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "*") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1328,12 +1328,12 @@ func builderColumnRight(form frm.Form) templ.Component { templ_7745c5c3_Var55 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Add field
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "
Add field
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for i, fieldType := range types.FormFieldTypeValues() { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1393,11 +1393,11 @@ func builderColumnRight(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1436,7 +1436,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component { templ_7745c5c3_Var59 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "\" data-hx-swap=\"none\" data-hx-swap-oob=\"true\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, field := range sortFields(form.Fields) { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "\" class=\"hidden\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1488,7 +1488,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "\" class=\"border-b pb-4\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1521,7 +1521,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1529,7 +1529,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1537,16 +1537,16 @@ func FormFieldConfigurator(form frm.Form) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -1571,7 +1571,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp templ_7745c5c3_Var64 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1835,7 +1835,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Required
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -1983,11 +1983,11 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -2012,7 +2012,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone templ_7745c5c3_Var91 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "\" data-hx-on:htmx:config-request=\"event.detail.parameters['id'] = event.detail.triggeringEvent.detail.value\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2079,7 +2079,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2094,7 +2094,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2117,7 +2117,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Choose an action

Choose an action

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "\">Show this field
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -2250,7 +2250,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel return templ_7745c5c3_Err } case types.FormFieldTypeTextSingle, types.FormFieldTypeTextMultiple: - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - return templ_7745c5c3_Err + return nil }) } @@ -2393,7 +2393,7 @@ func formFieldTypeLabel(fieldType types.FormFieldType) templ.Component { templ_7745c5c3_Var106 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2401,42 +2401,42 @@ func formFieldTypeLabel(fieldType types.FormFieldType) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -2461,7 +2461,7 @@ func fieldLabel(field types.FormField) templ.Component { templ_7745c5c3_Var107 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -2551,7 +2551,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component { templ_7745c5c3_Var110 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "\">

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2577,12 +2577,12 @@ func FormView(form frm.Form, isPreview bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if sc := shortCode(ctx); sc != nil { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } for _, field := range sortFields(form.Fields) { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "\" class=\"text-red-400\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2652,7 +2652,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "\" class=\"flex-1 appearance-none border border-gray-300 dark:border-gray-600 w-full text-gray-700 dark:bg-notion-dark-light dark:text-gray-300 dark:placeholder-gray-500 placeholder-gray-400 shadow-sm focus:outline-none focus:ring-2 focus:border-2 focus:ring-opacity-100 px-4 py-2 text-base resize-y block rounded-xl bg-sky-50\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2713,7 +2713,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "\" rows=\"3\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2787,12 +2787,12 @@ func FormView(form frm.Form, isPreview bool) templ.Component { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -2812,11 +2812,11 @@ func FormView(form frm.Form, isPreview bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } @@ -2853,17 +2853,17 @@ func ThankYou() templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Thank you!

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "

Thank you!

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = App("Form viewer").Render(templ.WithChildren(ctx, templ_7745c5c3_Var125), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/ui/common_templ.txt b/ui/common_templ.txt new file mode 100644 index 0000000..1f9b4ee --- /dev/null +++ b/ui/common_templ.txt @@ -0,0 +1,185 @@ + + +
+
+

+

+
+
+
+ + + + + +
+
+ +
+
+ + +
+
+
+
+
+
+
+
https://your-form-domain.com/form
+
+
+
+
+
+
+
+

+

+
+
+
+
+* +
Add field
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

Choose an action

+ +
+
+ +

+

+ +
+ + +
+
+
+

Thank you!

\ No newline at end of file diff --git a/ui/errors_templ.go b/ui/errors_templ.go index fdf76d2..03ffe05 100644 --- a/ui/errors_templ.go +++ b/ui/errors_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package ui //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -34,7 +34,7 @@ func Validation(allFields []string, errs types.ValidationErrors) templ.Component } ctx = templ.ClearChildren(ctx) for _, fieldID := range allFields { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" data-hx-swap-oob=\"true\" class=\"text-red-400\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -62,12 +62,12 @@ func Validation(allFields []string, errs types.ValidationErrors) templ.Component return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - return templ_7745c5c3_Err + return nil }) } diff --git a/ui/errors_templ.txt b/ui/errors_templ.txt new file mode 100644 index 0000000..23f922c --- /dev/null +++ b/ui/errors_templ.txt @@ -0,0 +1,3 @@ +
+
\ No newline at end of file diff --git a/ui/selector/selector_templ.go b/ui/selector/selector_templ.go index 65e4f57..dac10dc 100644 --- a/ui/selector/selector_templ.go +++ b/ui/selector/selector_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 // package selector provides a single and multi-slect HTML element powered by Choices.js package selector @@ -154,7 +154,7 @@ func Selector(args SelectArgs) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if len(args.OptionsContent) > 0 { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for item, component := range args.OptionsContent { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" class=\"hidden\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -356,21 +356,21 @@ func Selector(args SelectArgs) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/ui/selector/selector_templ.txt b/ui/selector/selector_templ.txt new file mode 100644 index 0000000..d24488b --- /dev/null +++ b/ui/selector/selector_templ.txt @@ -0,0 +1,25 @@ + +
+
+
+
+
+ \ No newline at end of file diff --git a/ui/trigger_rebuild.templ b/ui/trigger_rebuild.templ new file mode 100644 index 0000000..1851886 --- /dev/null +++ b/ui/trigger_rebuild.templ @@ -0,0 +1,2 @@ +package ui +templ TriggerReload() {
000164
} diff --git a/ui/trigger_rebuild_templ.go b/ui/trigger_rebuild_templ.go new file mode 100644 index 0000000..09abab2 --- /dev/null +++ b/ui/trigger_rebuild_templ.go @@ -0,0 +1,40 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.3.819 +package ui + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func TriggerReload() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "
000164
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return nil + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/ui/trigger_rebuild_templ.txt b/ui/trigger_rebuild_templ.txt new file mode 100644 index 0000000..e76b913 --- /dev/null +++ b/ui/trigger_rebuild_templ.txt @@ -0,0 +1 @@ +
000164
\ No newline at end of file