Documentation ¶
Index ¶
- Constants
- Variables
- func EditDeleteRowMenuItemFuncs(mi *ModelInfo, url string, editExtraParams url.Values) []vx.RowMenuItemFunc
- func InputWithDefaults[T inputElem](input T, obj any, field *FieldContext) T
- func IsInDialog(ctx context.Context) bool
- func RedirectSlashes(next http.Handler) http.Handler
- func ShowMessage(r *web.EventResponse, msg string, color string)
- type ActionBuilder
- func (b *ActionBuilder) ButtonColor(v string) (r *ActionBuilder)
- func (b *ActionBuilder) ButtonCompFunc(v ComponentFunc) (r *ActionBuilder)
- func (b *ActionBuilder) ComponentFunc(v ActionComponentFunc) (r *ActionBuilder)
- func (b *ActionBuilder) DialogWidth(v string) (r *ActionBuilder)
- func (b *ActionBuilder) Label(v string) (r *ActionBuilder)
- func (b *ActionBuilder) UpdateFunc(v ActionUpdateFunc) (r *ActionBuilder)
- type ActionComponentFunc
- type ActionUpdateFunc
- type AssetFunc
- type AutocompleteDataResult
- type AutocompleteDataSourceConfig
- type Builder
- func (b *Builder) AddMenuTopItemFunc(key string, v ComponentFunc) (r *Builder)
- func (b *Builder) AddWrapHandler(key string, f func(in http.Handler) (out http.Handler))
- func (b *Builder) AssetFunc(v AssetFunc) (r *Builder)
- func (b *Builder) BrandFunc(v ComponentFunc) (r *Builder)
- func (b *Builder) BrandProfileSwitchLanguageDisplayFuncFunc(f func(brand, profile, switchLanguage h.HTMLComponent) h.HTMLComponent) (r *Builder)
- func (b *Builder) BrandTitle(v string) (r *Builder)
- func (b *Builder) Builder(v *web.Builder) (r *Builder)
- func (b *Builder) DataOperator(v DataOperator) (r *Builder)
- func (b *Builder) ExtraAsset(path string, contentType string, body web.ComponentsPack, refTag ...string) (r *Builder)
- func (b *Builder) FieldDefaults(v FieldMode) (r *FieldDefaults)
- func (b *Builder) GetPermission() (r *perm.Builder)
- func (b *Builder) GetURIPrefix() string
- func (b *Builder) GetWebBuilder() (r *web.Builder)
- func (b *Builder) HomePageFunc(v web.PageFunc) (r *Builder)
- func (b *Builder) HomePageLayoutConfig(v *LayoutConfig) (r *Builder)
- func (b *Builder) I18n() (r *i18n.Builder)
- func (b *Builder) InjectAssets(ctx *web.EventContext)
- func (b *Builder) InjectExtraAssets(ctx *web.EventContext)
- func (b *Builder) LayoutFunc(v func(in web.PageFunc, cfg *LayoutConfig) (out web.PageFunc)) (r *Builder)
- func (b *Builder) Logger(v *zap.Logger) (r *Builder)
- func (b *Builder) MenuGroup(name string) *MenuGroupBuilder
- func (b *Builder) MenuOrder(items ...interface{})
- func (b *Builder) MessagesFunc(v MessagesFunc) (r *Builder)
- func (b *Builder) Model(v interface{}) (r *ModelBuilder)
- func (b *Builder) NewFieldsBuilder(v FieldMode) (r *FieldsBuilder)
- func (b *Builder) NotFoundFunc(v web.PageFunc) (r *Builder)
- func (b *Builder) NotFoundPageLayoutConfig(v *LayoutConfig) (r *Builder)
- func (b *Builder) NotificationFunc(contentFunc ComponentFunc, countFunc func(ctx *web.EventContext) int) (r *Builder)
- func (b *Builder) Permission(v *perm.Builder) (r *Builder)
- func (b *Builder) PlainLayout(in web.PageFunc) (out web.PageFunc)
- func (b *Builder) ProfileFunc(v ComponentFunc) (r *Builder)
- func (b *Builder) ProgressBarColor(v string) (r *Builder)
- func (b *Builder) RightDrawerWidth(v string) (r *Builder)
- func (b *Builder) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (b *Builder) SetI18n(v *i18n.Builder) (r *Builder)
- func (b *Builder) SwitchLanguageFunc(v ComponentFunc) (r *Builder)
- func (b *Builder) URIPrefix(v string) (r *Builder)
- func (b *Builder) VuetifyOptions(v string) (r *Builder)
- type BulkActionBuilder
- func (b *BulkActionBuilder) ButtonColor(v string) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) ButtonCompFunc(v ComponentFunc) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) ComponentFunc(v BulkActionComponentFunc) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) DialogWidth(v string) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) Label(v string) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) SelectedIdsProcessorFunc(v BulkActionSelectedIdsProcessorFunc) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) SelectedIdsProcessorNoticeFunc(v BulkActionSelectedIdsProcessorNoticeFunc) (r *BulkActionBuilder)
- func (b *BulkActionBuilder) UpdateFunc(v BulkActionUpdateFunc) (r *BulkActionBuilder)
- type BulkActionComponentFunc
- type BulkActionSelectedIdsProcessorFunc
- type BulkActionSelectedIdsProcessorNoticeFunc
- type BulkActionUpdateFunc
- type ColOrderBy
- type ComponentFunc
- type DataOperator
- type DeleteFunc
- type DetailingBuilder
- func (b *DetailingBuilder) Action(name string) (r *ActionBuilder)
- func (b *DetailingBuilder) AppendTabsPanelFunc(v ObjectComponentFunc) (r *DetailingBuilder)
- func (b *DetailingBuilder) Drawer(v bool) (r *DetailingBuilder)
- func (b *DetailingBuilder) FetchFunc(v FetchFunc) (r *DetailingBuilder)
- func (b *DetailingBuilder) GetPageFunc() web.PageFunc
- func (b *DetailingBuilder) Only(vs ...interface{}) (r *DetailingBuilder)
- func (b *DetailingBuilder) PageFunc(pf web.PageFunc) (r *DetailingBuilder)
- type DisplayFieldInSorter
- type EditingBuilder
- func (b *EditingBuilder) ActionsFunc(v ObjectComponentFunc) (r *EditingBuilder)
- func (b *EditingBuilder) AppendHiddenFunc(v ObjectComponentFunc) (r *EditingBuilder)
- func (b *EditingBuilder) AppendTabsPanelFunc(v ObjectComponentFunc) (r *EditingBuilder)
- func (b *EditingBuilder) Creating(vs ...interface{}) (r *EditingBuilder)
- func (b *EditingBuilder) DeleteFunc(v DeleteFunc) (r *EditingBuilder)
- func (b *EditingBuilder) EditingTitleFunc(v EditingTitleComponentFunc) (r *EditingBuilder)
- func (b *EditingBuilder) FetchAndUnmarshal(id string, removeDeletedAndSort bool, ctx *web.EventContext) (obj interface{}, vErr web.ValidationErrors)
- func (b *EditingBuilder) FetchFunc(v FetchFunc) (r *EditingBuilder)
- func (b *EditingBuilder) Only(vs ...interface{}) (r *EditingBuilder)
- func (b *EditingBuilder) RunSetterFunc(ctx *web.EventContext, removeDeletedAndSort bool, toObj interface{}) (vErr web.ValidationErrors)
- func (b *EditingBuilder) SaveFunc(v SaveFunc) (r *EditingBuilder)
- func (b *EditingBuilder) SaveOverlayContent(ctx *web.EventContext, r *web.EventResponse) (err error)
- func (b *EditingBuilder) SetterFunc(v SetterFunc) (r *EditingBuilder)
- func (b *EditingBuilder) SidePanelFunc(v ComponentFunc) (r *EditingBuilder)
- func (b *EditingBuilder) UpdateOverlayContent(ctx *web.EventContext, r *web.EventResponse, obj interface{}, ...)
- func (b *EditingBuilder) ValidateFunc(v ValidateFunc) (r *EditingBuilder)
- type EditingTitleComponentFunc
- type FetchFunc
- type FieldBuilder
- func (b *FieldBuilder) Clone() (r *FieldBuilder)
- func (b *FieldBuilder) ComponentFunc(v FieldComponentFunc) (r *FieldBuilder)
- func (b *FieldBuilder) Label(v string) (r *FieldBuilder)
- func (b *FieldBuilder) Nested(fb *FieldsBuilder, cfgs ...NestedConfig) (r *FieldBuilder)
- func (b *FieldBuilder) SetterFunc(v FieldSetterFunc) (r *FieldBuilder)
- func (b *FieldBuilder) WithContextValue(key interface{}, val interface{}) (r *FieldBuilder)
- type FieldComponentFunc
- type FieldContext
- type FieldDefaultBuilder
- type FieldDefaults
- type FieldMode
- type FieldSetterFunc
- type FieldsBuilder
- func (b *FieldsBuilder) Clone() (r *FieldsBuilder)
- func (b *FieldsBuilder) Defaults(v *FieldDefaults) (r *FieldsBuilder)
- func (b *FieldsBuilder) Except(patterns ...string) (r *FieldsBuilder)
- func (b *FieldsBuilder) Field(name string) (r *FieldBuilder)
- func (b *FieldsBuilder) Labels(vs ...string) (r *FieldsBuilder)
- func (b *FieldsBuilder) Model(v interface{}) (r *FieldsBuilder)
- func (b *FieldsBuilder) Only(vs ...interface{}) (r *FieldsBuilder)
- func (b *FieldsBuilder) SetObjectFields(fromObj interface{}, toObj interface{}, parent *FieldContext, ...) (vErr web.ValidationErrors)
- func (b *FieldsBuilder) String() (r string)
- func (b *FieldsBuilder) ToComponent(info *ModelInfo, obj interface{}, ctx *web.EventContext) h.HTMLComponent
- func (b *FieldsBuilder) ToComponentForEach(field *FieldContext, slice interface{}, ctx *web.EventContext, rowFunc RowFunc) h.HTMLComponent
- func (b *FieldsBuilder) Unmarshal(toObj interface{}, info *ModelInfo, removeDeletedAndSort bool, ...) (vErr web.ValidationErrors)
- type FieldsSection
- type FilterDataFunc
- type FilterTab
- type FilterTabsFunc
- type LayoutConfig
- type ListEditorBuilder
- type ListSorter
- type ListSorterItem
- type ListingBuilder
- func (b *ListingBuilder) Action(name string) (r *ActionBuilder)
- func (b *ListingBuilder) ActionsAsMenu(v bool) (r *ListingBuilder)
- func (b *ListingBuilder) BulkAction(name string) (r *BulkActionBuilder)
- func (b *ListingBuilder) CellWrapperFunc(cwf vx.CellWrapperFunc) (r *ListingBuilder)
- func (b *ListingBuilder) Conditions(v []*SQLCondition) (r *ListingBuilder)
- func (b *ListingBuilder) ConfigureAutocompleteDataSource(config *AutocompleteDataSourceConfig, name ...string) *vuetifyx.AutocompleteDataSource
- func (b *ListingBuilder) DialogHeight(v string) (r *ListingBuilder)
- func (b *ListingBuilder) DialogWidth(v string) (r *ListingBuilder)
- func (b *ListingBuilder) FilterDataFunc(v FilterDataFunc)
- func (b *ListingBuilder) FilterTabsFunc(v FilterTabsFunc)
- func (b *ListingBuilder) GetPageFunc() web.PageFunc
- func (b *ListingBuilder) NewButtonFunc(v ComponentFunc) (r *ListingBuilder)
- func (b *ListingBuilder) Only(vs ...string) (r *ListingBuilder)
- func (b *ListingBuilder) OrderBy(v string) (r *ListingBuilder)
- func (b *ListingBuilder) OrderableFields(v []*OrderableField) (r *ListingBuilder)
- func (b *ListingBuilder) PageFunc(pf web.PageFunc) (r *ListingBuilder)
- func (b *ListingBuilder) PerPage(v int64) (r *ListingBuilder)
- func (b *ListingBuilder) RowMenu(listings ...string) *RowMenuBuilder
- func (b *ListingBuilder) SearchColumns(vs ...string) (r *ListingBuilder)
- func (b *ListingBuilder) SearchFunc(v SearchFunc) (r *ListingBuilder)
- func (b *ListingBuilder) SelectableColumns(v bool) (r *ListingBuilder)
- func (b *ListingBuilder) TotalVisible(v int64) (r *ListingBuilder)
- type MenuGroupBuilder
- type MenuGroups
- type Messages
- func (msgr *Messages) BulkActionSelectedIdsProcessNotice(ids string) string
- func (msgr *Messages) CreatingObjectTitle(modelName string) string
- func (msgr *Messages) DeleteConfirmationText(id string) string
- func (msgr *Messages) DetailingObjectTitle(label string, name string) string
- func (msgr *Messages) EditingObjectTitle(label string, name string) string
- func (msgr *Messages) FilterBy(filter string) string
- func (msgr *Messages) ListingObjectTitle(label string) string
- type MessagesFunc
- type ModelBuilder
- func (mb *ModelBuilder) DefaultURLQueryFunc(v func(*http.Request) url.Values) (r *ModelBuilder)
- func (mb *ModelBuilder) Detailing(vs ...interface{}) (r *DetailingBuilder)
- func (mb *ModelBuilder) Editing(vs ...interface{}) (r *EditingBuilder)
- func (mb *ModelBuilder) InMenu(v bool) (r *ModelBuilder)
- func (mb *ModelBuilder) Info() (r *ModelInfo)
- func (mb *ModelBuilder) Label(v string) (r *ModelBuilder)
- func (mb *ModelBuilder) Labels(vs ...string) (r *ModelBuilder)
- func (mb *ModelBuilder) LayoutConfig(v *LayoutConfig) (r *ModelBuilder)
- func (mb *ModelBuilder) Link(v string) *ModelBuilder
- func (mb *ModelBuilder) Listing(vs ...string) (r *ListingBuilder)
- func (mb *ModelBuilder) MenuIcon(v string) (r *ModelBuilder)
- func (mb *ModelBuilder) NewModel() (r interface{})
- func (mb *ModelBuilder) NewModelSlice() (r interface{})
- func (mb *ModelBuilder) Placeholders(vs ...string) (r *ModelBuilder)
- func (mb *ModelBuilder) PrimaryField(v string) (r *ModelBuilder)
- func (mb *ModelBuilder) RightDrawerWidth(v string) *ModelBuilder
- func (mb *ModelBuilder) Singleton(v bool) (r *ModelBuilder)
- func (mb *ModelBuilder) URIName(v string) (r *ModelBuilder)
- type ModelInfo
- func (b ModelInfo) DetailingHref(id string) string
- func (b ModelInfo) DetailingInDrawer() bool
- func (b ModelInfo) EditingHref(id string) string
- func (b ModelInfo) HasDetailing() bool
- func (b ModelInfo) Label() string
- func (b ModelInfo) ListingHref() string
- func (b ModelInfo) PresetsPrefix() string
- func (b ModelInfo) URIName() string
- func (b ModelInfo) Verifier() *perm.Verifier
- type ModifiedIndexesBuilder
- func (b *ModifiedIndexesBuilder) AppendDeleted(sliceFormKey string, index int) (r *ModifiedIndexesBuilder)
- func (b *ModifiedIndexesBuilder) DeletedContains(sliceFormKey string, index int) (r bool)
- func (b *ModifiedIndexesBuilder) FromHidden(req *http.Request) (r *ModifiedIndexesBuilder)
- func (b *ModifiedIndexesBuilder) ReversedmodifiedIndexes(sliceFormKey string) (r []int)
- func (b *ModifiedIndexesBuilder) SetSorted(sliceFormKey string, indexes []string) (r *ModifiedIndexesBuilder)
- func (b *ModifiedIndexesBuilder) SortedForEach(slice interface{}, sliceFormKey string, f func(obj interface{}, i int))
- func (b *ModifiedIndexesBuilder) ToFormHidden() h.HTMLComponent
- type NameLabel
- type NestedConfig
- type ObjectComponentFunc
- type OptionItem
- type OrderableField
- type RowFunc
- type RowMenuBuilder
- type RowMenuItemBuilder
- type RowMenuItemClickFunc
- type SQLCondition
- type SaveFunc
- type SearchFunc
- type SearchParams
- type SetterFunc
- type SlugDecoder
- type SlugEncoder
- type ValidateFunc
Constants ¶
const ( PermModule = "presets" PermList = "presets:list" PermGet = "presets:get" PermCreate = "presets:create" PermUpdate = "presets:update" PermDelete = "presets:delete" PermActions = "actions" PermDoListingAction = "do_listing_action" PermBulkActions = "bulk_actions" )
const ( ParamID = "id" ParamAction = "action" ParamOverlay = "overlay" ParamOverlayAfterUpdateScript = "overlay_after_update_script" ParamOverlayUpdateID = "overlay_update_id" ParamBulkActionName = "bulk_action" ParamListingActionName = "listing_action" ParamSelectedIds = "selected_ids" ParamInDialog = "presets_in_dialog" ParamListingQueries = "presets_listing_queries" ParamAfterDeleteEvent = "presets_after_delete_event" // list editor ParamAddRowFormKey = "listEditor_AddRowFormKey" ParamRemoveRowFormKey = "listEditor_RemoveRowFormKey" ParamIsStartSort = "listEditor_IsStartSort" ParamSortSectionFormKey = "listEditor_SortSectionFormKey" ParamSortResultFormKey = "listEditor_SortResultFormKey" )
params
const ( ColorPrimary = "primary" ColorSecondary = "secondary" )
const ( CoreI18nModuleKey i18n.ModuleKey = "CoreI18nModuleKey" ModelsI18nModuleKey i18n.ModuleKey = "ModelsI18nModuleKey" )
const ( ConfirmDialogConfirmEvent = "presets_ConfirmDialog_ConfirmEvent" ConfirmDialogPromptText = "presets_ConfirmDialog_PromptText" ConfirmDialogDialogPortalName = "presets_ConfirmDialog_DialogPortalName" )
const ActiveFilterTabQueryKey = "active_filter_tab"
const CloseListingDialogVarScript = "vars.presetsListingDialog = false"
const DeleteConfirmPortalName = "deleteConfirm"
const DialogPortalName = "presets_DialogPortalName"
const NotificationCenterPortalName = "notification-center"
const (
OpenConfirmDialog = "presets_ConfirmDialog"
)
const RightDrawerPortalName = "presets_RightDrawerPortalName"
Variables ¶
var (
ErrRecordNotFound = errors.New("record not found")
)
var Messages_en_US = &Messages{
SuccessfullyUpdated: "Successfully Updated",
Search: "Search",
New: "New",
Update: "Update",
Delete: "Delete",
Edit: "Edit",
FormTitle: "Form",
OK: "OK",
Cancel: "Cancel",
Clear: "Clear",
Create: "Create",
DeleteConfirmationTextTemplate: "Are you sure you want to delete object with id: {id}?",
CreatingObjectTitleTemplate: "New {modelName}",
EditingObjectTitleTemplate: "Editing {modelName} {id}",
ListingObjectTitleTemplate: "Listing {modelName}",
DetailingObjectTitleTemplate: "{modelName} {id}",
FiltersClear: "Clear Filters",
FiltersAdd: "Add Filters",
FilterApply: "Apply",
FilterByTemplate: "Filter by {filter}",
FiltersDateInTheLast: "is in the last",
FiltersDateEquals: "is equal to",
FiltersDateBetween: "is between",
FiltersDateIsAfter: "is after",
FiltersDateIsAfterOrOn: "is on or after",
FiltersDateIsBefore: "is before",
FiltersDateIsBeforeOrOn: "is before or on",
FiltersDateDays: "days",
FiltersDateMonths: "months",
FiltersDateAnd: "and",
FiltersDateTo: "to",
FiltersNumberEquals: "is equal to",
FiltersNumberBetween: "between",
FiltersNumberGreaterThan: "is greater than",
FiltersNumberLessThan: "is less than",
FiltersNumberAnd: "and",
FiltersStringEquals: "is equal to",
FiltersStringContains: "contains",
FiltersMultipleSelectIn: "in",
FiltersMultipleSelectNotIn: "not in",
PaginationRowsPerPage: "Rows per page: ",
ListingNoRecordToShow: "No records to show",
ListingSelectedCountNotice: "{count} records are selected. ",
ListingClearSelection: "clear selection",
BulkActionNoAvailableRecords: "None of the selected records can be executed with this action.",
BulkActionSelectedIdsProcessNoticeTemplate: "Partially selected records cannot be executed with this action: {ids}.",
ConfirmDialogPromptText: "Are you sure?",
Language: "Language",
Colon: ":",
NotFoundPageNotice: "Sorry, the requested page cannot be found. Please check the URL.",
}
var Messages_ja_JP = &Messages{
SuccessfullyUpdated: "更新に成功しました",
Search: "検索する",
New: "新規",
Update: "更新する",
Delete: "削除する",
Edit: "編集する",
FormTitle: "フォーム",
OK: "OK",
Cancel: "キャンセル",
Create: "新規作成",
DeleteConfirmationTextTemplate: ": {id}を削除して本当によろしいですか?",
CreatingObjectTitleTemplate: "{modelName} を作る",
EditingObjectTitleTemplate: "{modelName} {id} を編集する",
ListingObjectTitleTemplate: "リスティング {modelName} ",
DetailingObjectTitleTemplate: "{modelName} {id} ",
FiltersClear: "フィルターをクリアする",
FiltersAdd: "フィルターを追加する",
FilterApply: "適用する",
FilterByTemplate: "{filter} でフィルターする",
FiltersDateInTheLast: "がサイト",
FiltersDateEquals: "と同等",
FiltersDateBetween: "の間",
FiltersDateIsAfter: "が後",
FiltersDateIsAfterOrOn: "が同時または後",
FiltersDateIsBefore: "が前",
FiltersDateIsBeforeOrOn: "が前または同時",
FiltersDateDays: "日間",
FiltersDateMonths: "月数",
FiltersDateAnd: "&",
FiltersDateTo: "から",
FiltersNumberEquals: "と同等",
FiltersNumberBetween: "間",
FiltersNumberGreaterThan: "より大きい",
FiltersNumberLessThan: "より少ない",
FiltersNumberAnd: "&",
FiltersStringEquals: "と同等",
FiltersStringContains: "を含む",
FiltersMultipleSelectIn: "中",
FiltersMultipleSelectNotIn: "以外",
PaginationRowsPerPage: "行 / ページ",
ListingNoRecordToShow: "表示できるデータはありません",
ListingSelectedCountNotice: "{count} レコードが選択されています",
ListingClearSelection: "選択をクリア",
BulkActionNoAvailableRecords: "この機能はご利用いただけません",
BulkActionSelectedIdsProcessNoticeTemplate: "この一部の機能はご利用いただけません: {ids}",
ConfirmDialogPromptText: "よろしいですか?",
Language: "言語",
Colon: ":",
NotFoundPageNotice: "申し訳ありませんが、リクエストされたページは見つかりませんでした。URLを確認してください。",
}
var Messages_zh_CN = &Messages{
SuccessfullyUpdated: "成功更新了",
Search: "搜索",
New: "新建",
Update: "更新",
Delete: "删除",
Edit: "编辑",
FormTitle: "表单",
OK: "确定",
Cancel: "取消",
Clear: "清空",
Create: "创建",
DeleteConfirmationTextTemplate: "你确定你要删除这个对象吗,对象ID: {id}?",
CreatingObjectTitleTemplate: "新建{modelName}",
EditingObjectTitleTemplate: "编辑{modelName} {id}",
ListingObjectTitleTemplate: "{modelName}列表",
DetailingObjectTitleTemplate: "{modelName} {id}",
FiltersClear: "清空筛选器",
FiltersAdd: "添加筛选器",
FilterApply: "应用",
FilterByTemplate: "按{filter}筛选",
FiltersDateInTheLast: "过去",
FiltersDateEquals: "等于",
FiltersDateBetween: "之间",
FiltersDateIsAfter: "之后",
FiltersDateIsAfterOrOn: "当天或之后",
FiltersDateIsBefore: "之前",
FiltersDateIsBeforeOrOn: "当天或之前",
FiltersDateDays: "天",
FiltersDateMonths: "月",
FiltersDateAnd: "和",
FiltersDateTo: "至",
FiltersNumberEquals: "等于",
FiltersNumberBetween: "之间",
FiltersNumberGreaterThan: "大于",
FiltersNumberLessThan: "小于",
FiltersNumberAnd: "和",
FiltersStringEquals: "等于",
FiltersStringContains: "包含",
FiltersMultipleSelectIn: "包含",
FiltersMultipleSelectNotIn: "不包含",
PaginationRowsPerPage: "每页: ",
ListingNoRecordToShow: "没有可显示的记录",
ListingSelectedCountNotice: "{count}条记录被选中。",
ListingClearSelection: "清除选择",
BulkActionNoAvailableRecords: "所有选中的记录均无法执行这个操作。",
BulkActionSelectedIdsProcessNoticeTemplate: "部分选中的记录无法被执行这个操作: {ids}。",
ConfirmDialogPromptText: "你确定吗?",
Language: "语言",
Colon: ":",
NotFoundPageNotice: "很抱歉,所请求的页面不存在,请检查URL。",
}
var (
PermRead = []string{PermList, PermGet}
)
Functions ¶
func InputWithDefaults ¶
func InputWithDefaults[T inputElem](input T, obj any, field *FieldContext) T
InputWithDefaults fills input element with name, value and label. For now, input must be h.Input, v.VSelect or v.VTextField. This function will be implemented using the FieldContext method when golang supports generic method and the current function will be deprecated.
func IsInDialog ¶
func ShowMessage ¶
func ShowMessage(r *web.EventResponse, msg string, color string)
Types ¶
type ActionBuilder ¶
type ActionBuilder struct { NameLabel // contains filtered or unexported fields }
func (*ActionBuilder) ButtonColor ¶
func (b *ActionBuilder) ButtonColor(v string) (r *ActionBuilder)
ButtonColor defines the color of default button if buttonCompFunc is not defined.
func (*ActionBuilder) ButtonCompFunc ¶
func (b *ActionBuilder) ButtonCompFunc(v ComponentFunc) (r *ActionBuilder)
ButtonCompFunc defines the components of the button area.
func (*ActionBuilder) ComponentFunc ¶
func (b *ActionBuilder) ComponentFunc(v ActionComponentFunc) (r *ActionBuilder)
ComponentFunc defines the components in dialog of button click.
func (*ActionBuilder) DialogWidth ¶
func (b *ActionBuilder) DialogWidth(v string) (r *ActionBuilder)
func (*ActionBuilder) Label ¶
func (b *ActionBuilder) Label(v string) (r *ActionBuilder)
func (*ActionBuilder) UpdateFunc ¶
func (b *ActionBuilder) UpdateFunc(v ActionUpdateFunc) (r *ActionBuilder)
UpdateFunc defines event when the button is clicked.
type ActionComponentFunc ¶
type ActionComponentFunc func(id string, ctx *web.EventContext) h.HTMLComponent
type ActionUpdateFunc ¶
type ActionUpdateFunc func(id string, ctx *web.EventContext) (err error)
type AssetFunc ¶
type AssetFunc func(ctx *web.EventContext)
type AutocompleteDataResult ¶
type AutocompleteDataResult struct { Items []OptionItem `json:"items"` Total int `json:"total"` Current int `json:"current"` Pages int `json:"pages"` }
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) AddMenuTopItemFunc ¶
func (b *Builder) AddMenuTopItemFunc(key string, v ComponentFunc) (r *Builder)
func (*Builder) AddWrapHandler ¶
func (*Builder) BrandFunc ¶
func (b *Builder) BrandFunc(v ComponentFunc) (r *Builder)
func (*Builder) BrandProfileSwitchLanguageDisplayFuncFunc ¶
func (b *Builder) BrandProfileSwitchLanguageDisplayFuncFunc(f func(brand, profile, switchLanguage h.HTMLComponent) h.HTMLComponent) (r *Builder)
func (*Builder) BrandTitle ¶
func (*Builder) DataOperator ¶
func (b *Builder) DataOperator(v DataOperator) (r *Builder)
func (*Builder) ExtraAsset ¶
func (*Builder) FieldDefaults ¶
func (b *Builder) FieldDefaults(v FieldMode) (r *FieldDefaults)
func (*Builder) GetPermission ¶
func (*Builder) GetURIPrefix ¶
func (*Builder) GetWebBuilder ¶
func (*Builder) HomePageLayoutConfig ¶
func (b *Builder) HomePageLayoutConfig(v *LayoutConfig) (r *Builder)
func (*Builder) InjectAssets ¶
func (b *Builder) InjectAssets(ctx *web.EventContext)
func (*Builder) InjectExtraAssets ¶
func (b *Builder) InjectExtraAssets(ctx *web.EventContext)
func (*Builder) LayoutFunc ¶
func (*Builder) MenuGroup ¶
func (b *Builder) MenuGroup(name string) *MenuGroupBuilder
func (*Builder) MenuOrder ¶
func (b *Builder) MenuOrder(items ...interface{})
item can be Slug name, model name, *MenuGroupBuilder the underlying logic is using Slug name, so if the Slug name is customized, item must be the Slug name example: b.MenuOrder(
b.MenuGroup("Product Management").SubItems( "products", "Variant", ), "customized-uri",
)
func (*Builder) MessagesFunc ¶
func (b *Builder) MessagesFunc(v MessagesFunc) (r *Builder)
func (*Builder) Model ¶
func (b *Builder) Model(v interface{}) (r *ModelBuilder)
func (*Builder) NewFieldsBuilder ¶
func (b *Builder) NewFieldsBuilder(v FieldMode) (r *FieldsBuilder)
func (*Builder) NotFoundPageLayoutConfig ¶
func (b *Builder) NotFoundPageLayoutConfig(v *LayoutConfig) (r *Builder)
func (*Builder) NotificationFunc ¶
func (b *Builder) NotificationFunc(contentFunc ComponentFunc, countFunc func(ctx *web.EventContext) int) (r *Builder)
func (*Builder) PlainLayout ¶
for pages outside the default presets layout
func (*Builder) ProfileFunc ¶
func (b *Builder) ProfileFunc(v ComponentFunc) (r *Builder)
func (*Builder) ProgressBarColor ¶
func (*Builder) RightDrawerWidth ¶
func (*Builder) SwitchLanguageFunc ¶
func (b *Builder) SwitchLanguageFunc(v ComponentFunc) (r *Builder)
func (*Builder) VuetifyOptions ¶
type BulkActionBuilder ¶
type BulkActionBuilder struct { NameLabel // contains filtered or unexported fields }
func (*BulkActionBuilder) ButtonColor ¶
func (b *BulkActionBuilder) ButtonColor(v string) (r *BulkActionBuilder)
func (*BulkActionBuilder) ButtonCompFunc ¶
func (b *BulkActionBuilder) ButtonCompFunc(v ComponentFunc) (r *BulkActionBuilder)
func (*BulkActionBuilder) ComponentFunc ¶
func (b *BulkActionBuilder) ComponentFunc(v BulkActionComponentFunc) (r *BulkActionBuilder)
func (*BulkActionBuilder) DialogWidth ¶
func (b *BulkActionBuilder) DialogWidth(v string) (r *BulkActionBuilder)
func (*BulkActionBuilder) Label ¶
func (b *BulkActionBuilder) Label(v string) (r *BulkActionBuilder)
func (*BulkActionBuilder) SelectedIdsProcessorFunc ¶
func (b *BulkActionBuilder) SelectedIdsProcessorFunc(v BulkActionSelectedIdsProcessorFunc) (r *BulkActionBuilder)
func (*BulkActionBuilder) SelectedIdsProcessorNoticeFunc ¶
func (b *BulkActionBuilder) SelectedIdsProcessorNoticeFunc(v BulkActionSelectedIdsProcessorNoticeFunc) (r *BulkActionBuilder)
func (*BulkActionBuilder) UpdateFunc ¶
func (b *BulkActionBuilder) UpdateFunc(v BulkActionUpdateFunc) (r *BulkActionBuilder)
type BulkActionComponentFunc ¶
type BulkActionComponentFunc func(selectedIds []string, ctx *web.EventContext) h.HTMLComponent
type BulkActionSelectedIdsProcessorFunc ¶
type BulkActionSelectedIdsProcessorFunc func(selectedIds []string, ctx *web.EventContext) (processedSelectedIds []string, err error)
type BulkActionUpdateFunc ¶
type BulkActionUpdateFunc func(selectedIds []string, ctx *web.EventContext) (err error)
type ColOrderBy ¶
func GetOrderBysFromQuery ¶
func GetOrderBysFromQuery(query url.Values) []*ColOrderBy
type ComponentFunc ¶
type ComponentFunc func(ctx *web.EventContext) h.HTMLComponent
type DataOperator ¶
type DataOperator interface { Search(obj interface{}, params *SearchParams, ctx *web.EventContext) (r interface{}, totalCount int, err error) // return ErrRecordNotFound if record not found Fetch(obj interface{}, id string, ctx *web.EventContext) (r interface{}, err error) Save(obj interface{}, id string, ctx *web.EventContext) (err error) Delete(obj interface{}, id string, ctx *web.EventContext) (err error) }
Data Layer
type DeleteFunc ¶
type DeleteFunc func(obj interface{}, id string, ctx *web.EventContext) (err error)
type DetailingBuilder ¶
type DetailingBuilder struct { FieldsBuilder // contains filtered or unexported fields }
func (*DetailingBuilder) Action ¶
func (b *DetailingBuilder) Action(name string) (r *ActionBuilder)
func (*DetailingBuilder) AppendTabsPanelFunc ¶
func (b *DetailingBuilder) AppendTabsPanelFunc(v ObjectComponentFunc) (r *DetailingBuilder)
func (*DetailingBuilder) Drawer ¶
func (b *DetailingBuilder) Drawer(v bool) (r *DetailingBuilder)
func (*DetailingBuilder) FetchFunc ¶
func (b *DetailingBuilder) FetchFunc(v FetchFunc) (r *DetailingBuilder)
func (*DetailingBuilder) GetPageFunc ¶
func (b *DetailingBuilder) GetPageFunc() web.PageFunc
func (*DetailingBuilder) Only ¶
func (b *DetailingBuilder) Only(vs ...interface{}) (r *DetailingBuilder)
string / []string / *FieldsSection
func (*DetailingBuilder) PageFunc ¶
func (b *DetailingBuilder) PageFunc(pf web.PageFunc) (r *DetailingBuilder)
type DisplayFieldInSorter ¶
type DisplayFieldInSorter struct {
Field string
}
type EditingBuilder ¶
type EditingBuilder struct { Fetcher FetchFunc Setter SetterFunc Saver SaveFunc Deleter DeleteFunc Validator ValidateFunc FieldsBuilder // contains filtered or unexported fields }
func (*EditingBuilder) ActionsFunc ¶
func (b *EditingBuilder) ActionsFunc(v ObjectComponentFunc) (r *EditingBuilder)
func (*EditingBuilder) AppendHiddenFunc ¶
func (b *EditingBuilder) AppendHiddenFunc(v ObjectComponentFunc) (r *EditingBuilder)
func (*EditingBuilder) AppendTabsPanelFunc ¶
func (b *EditingBuilder) AppendTabsPanelFunc(v ObjectComponentFunc) (r *EditingBuilder)
func (*EditingBuilder) Creating ¶
func (b *EditingBuilder) Creating(vs ...interface{}) (r *EditingBuilder)
func (*EditingBuilder) DeleteFunc ¶
func (b *EditingBuilder) DeleteFunc(v DeleteFunc) (r *EditingBuilder)
func (*EditingBuilder) EditingTitleFunc ¶
func (b *EditingBuilder) EditingTitleFunc(v EditingTitleComponentFunc) (r *EditingBuilder)
func (*EditingBuilder) FetchAndUnmarshal ¶
func (b *EditingBuilder) FetchAndUnmarshal(id string, removeDeletedAndSort bool, ctx *web.EventContext) (obj interface{}, vErr web.ValidationErrors)
func (*EditingBuilder) FetchFunc ¶
func (b *EditingBuilder) FetchFunc(v FetchFunc) (r *EditingBuilder)
func (*EditingBuilder) Only ¶
func (b *EditingBuilder) Only(vs ...interface{}) (r *EditingBuilder)
string / []string / *FieldsSection
func (*EditingBuilder) RunSetterFunc ¶
func (b *EditingBuilder) RunSetterFunc(ctx *web.EventContext, removeDeletedAndSort bool, toObj interface{}) (vErr web.ValidationErrors)
func (*EditingBuilder) SaveFunc ¶
func (b *EditingBuilder) SaveFunc(v SaveFunc) (r *EditingBuilder)
func (*EditingBuilder) SaveOverlayContent ¶
func (b *EditingBuilder) SaveOverlayContent( ctx *web.EventContext, r *web.EventResponse, ) (err error)
func (*EditingBuilder) SetterFunc ¶
func (b *EditingBuilder) SetterFunc(v SetterFunc) (r *EditingBuilder)
func (*EditingBuilder) SidePanelFunc ¶
func (b *EditingBuilder) SidePanelFunc(v ComponentFunc) (r *EditingBuilder)
func (*EditingBuilder) UpdateOverlayContent ¶
func (b *EditingBuilder) UpdateOverlayContent( ctx *web.EventContext, r *web.EventResponse, obj interface{}, successMessage string, err error, )
func (*EditingBuilder) ValidateFunc ¶
func (b *EditingBuilder) ValidateFunc(v ValidateFunc) (r *EditingBuilder)
type EditingTitleComponentFunc ¶
type EditingTitleComponentFunc func(obj interface{}, defaultTitle string, ctx *web.EventContext) h.HTMLComponent
type FetchFunc ¶
type FetchFunc func(obj interface{}, id string, ctx *web.EventContext) (r interface{}, err error)
type FieldBuilder ¶
type FieldBuilder struct { NameLabel // contains filtered or unexported fields }
func (*FieldBuilder) Clone ¶
func (b *FieldBuilder) Clone() (r *FieldBuilder)
func (*FieldBuilder) ComponentFunc ¶
func (b *FieldBuilder) ComponentFunc(v FieldComponentFunc) (r *FieldBuilder)
func (*FieldBuilder) Label ¶
func (b *FieldBuilder) Label(v string) (r *FieldBuilder)
func (*FieldBuilder) Nested ¶
func (b *FieldBuilder) Nested(fb *FieldsBuilder, cfgs ...NestedConfig) (r *FieldBuilder)
func (*FieldBuilder) SetterFunc ¶
func (b *FieldBuilder) SetterFunc(v FieldSetterFunc) (r *FieldBuilder)
func (*FieldBuilder) WithContextValue ¶
func (b *FieldBuilder) WithContextValue(key interface{}, val interface{}) (r *FieldBuilder)
type FieldComponentFunc ¶
type FieldComponentFunc func(obj interface{}, field *FieldContext, ctx *web.EventContext) h.HTMLComponent
type FieldContext ¶
type FieldContext struct { Name string FormKey string Label string Errors []string ModelInfo *ModelInfo NestedFieldsBuilder *FieldsBuilder Context context.Context Disabled bool }
func (*FieldContext) ContextValue ¶
func (fc *FieldContext) ContextValue(key interface{}) (r interface{})
func (*FieldContext) StringValue ¶
func (fc *FieldContext) StringValue(obj interface{}) (r string)
func (*FieldContext) Value ¶
func (fc *FieldContext) Value(obj interface{}) (r interface{})
type FieldDefaultBuilder ¶
type FieldDefaultBuilder struct {
// contains filtered or unexported fields
}
func NewFieldDefault ¶
func NewFieldDefault(t reflect.Type) (r *FieldDefaultBuilder)
func (*FieldDefaultBuilder) ComponentFunc ¶
func (b *FieldDefaultBuilder) ComponentFunc(v FieldComponentFunc) (r *FieldDefaultBuilder)
func (*FieldDefaultBuilder) SetterFunc ¶
func (b *FieldDefaultBuilder) SetterFunc(v FieldSetterFunc) (r *FieldDefaultBuilder)
type FieldDefaults ¶
type FieldDefaults struct {
// contains filtered or unexported fields
}
func NewFieldDefaults ¶
func NewFieldDefaults(t FieldMode) (r *FieldDefaults)
func (*FieldDefaults) Exclude ¶
func (b *FieldDefaults) Exclude(patterns ...string) (r *FieldDefaults)
func (*FieldDefaults) FieldType ¶
func (b *FieldDefaults) FieldType(v interface{}) (r *FieldDefaultBuilder)
func (*FieldDefaults) InspectFields ¶
func (b *FieldDefaults) InspectFields(val interface{}) (r *FieldsBuilder)
func (*FieldDefaults) String ¶
func (b *FieldDefaults) String() string
type FieldSetterFunc ¶
type FieldSetterFunc func(obj interface{}, field *FieldContext, ctx *web.EventContext) (err error)
type FieldsBuilder ¶
type FieldsBuilder struct {
// contains filtered or unexported fields
}
func NewFieldsBuilder ¶
func NewFieldsBuilder() *FieldsBuilder
func (*FieldsBuilder) Clone ¶
func (b *FieldsBuilder) Clone() (r *FieldsBuilder)
func (*FieldsBuilder) Defaults ¶
func (b *FieldsBuilder) Defaults(v *FieldDefaults) (r *FieldsBuilder)
func (*FieldsBuilder) Except ¶
func (b *FieldsBuilder) Except(patterns ...string) (r *FieldsBuilder)
func (*FieldsBuilder) Field ¶
func (b *FieldsBuilder) Field(name string) (r *FieldBuilder)
func (*FieldsBuilder) Labels ¶
func (b *FieldsBuilder) Labels(vs ...string) (r *FieldsBuilder)
func (*FieldsBuilder) Model ¶
func (b *FieldsBuilder) Model(v interface{}) (r *FieldsBuilder)
func (*FieldsBuilder) Only ¶
func (b *FieldsBuilder) Only(vs ...interface{}) (r *FieldsBuilder)
func (*FieldsBuilder) SetObjectFields ¶
func (b *FieldsBuilder) SetObjectFields(fromObj interface{}, toObj interface{}, parent *FieldContext, removeDeletedAndSort bool, modifiedIndexes *ModifiedIndexesBuilder, ctx *web.EventContext) (vErr web.ValidationErrors)
func (*FieldsBuilder) String ¶
func (b *FieldsBuilder) String() (r string)
func (*FieldsBuilder) ToComponent ¶
func (b *FieldsBuilder) ToComponent(info *ModelInfo, obj interface{}, ctx *web.EventContext) h.HTMLComponent
func (*FieldsBuilder) ToComponentForEach ¶
func (b *FieldsBuilder) ToComponentForEach(field *FieldContext, slice interface{}, ctx *web.EventContext, rowFunc RowFunc) h.HTMLComponent
func (*FieldsBuilder) Unmarshal ¶
func (b *FieldsBuilder) Unmarshal(toObj interface{}, info *ModelInfo, removeDeletedAndSort bool, ctx *web.EventContext) (vErr web.ValidationErrors)
type FieldsSection ¶
type FilterDataFunc ¶
type FilterDataFunc func(ctx *web.EventContext) vuetifyx.FilterData
type FilterTabsFunc ¶
type FilterTabsFunc func(ctx *web.EventContext) []*FilterTab
type LayoutConfig ¶
type ListEditorBuilder ¶
type ListEditorBuilder struct {
// contains filtered or unexported fields
}
func NewListEditor ¶
func NewListEditor(v *FieldContext) *ListEditorBuilder
func (*ListEditorBuilder) DisplayFieldInSorter ¶
func (b *ListEditorBuilder) DisplayFieldInSorter(v string) (r *ListEditorBuilder)
func (*ListEditorBuilder) MarshalHTML ¶
func (b *ListEditorBuilder) MarshalHTML(c context.Context) (r []byte, err error)
func (*ListEditorBuilder) Value ¶
func (b *ListEditorBuilder) Value(v interface{}) (r *ListEditorBuilder)
type ListSorter ¶
type ListSorter struct {
Items []ListSorterItem `json:"items"`
}
type ListSorterItem ¶
type ListingBuilder ¶
type ListingBuilder struct { Searcher SearchFunc FieldsBuilder // contains filtered or unexported fields }
func (*ListingBuilder) Action ¶
func (b *ListingBuilder) Action(name string) (r *ActionBuilder)
func (*ListingBuilder) ActionsAsMenu ¶
func (b *ListingBuilder) ActionsAsMenu(v bool) (r *ListingBuilder)
func (*ListingBuilder) BulkAction ¶
func (b *ListingBuilder) BulkAction(name string) (r *BulkActionBuilder)
func (*ListingBuilder) CellWrapperFunc ¶
func (b *ListingBuilder) CellWrapperFunc(cwf vx.CellWrapperFunc) (r *ListingBuilder)
func (*ListingBuilder) Conditions ¶
func (b *ListingBuilder) Conditions(v []*SQLCondition) (r *ListingBuilder)
func (*ListingBuilder) ConfigureAutocompleteDataSource ¶
func (b *ListingBuilder) ConfigureAutocompleteDataSource(config *AutocompleteDataSourceConfig, name ...string) *vuetifyx.AutocompleteDataSource
func (*ListingBuilder) DialogHeight ¶
func (b *ListingBuilder) DialogHeight(v string) (r *ListingBuilder)
func (*ListingBuilder) DialogWidth ¶
func (b *ListingBuilder) DialogWidth(v string) (r *ListingBuilder)
func (*ListingBuilder) FilterDataFunc ¶
func (b *ListingBuilder) FilterDataFunc(v FilterDataFunc)
func (*ListingBuilder) FilterTabsFunc ¶
func (b *ListingBuilder) FilterTabsFunc(v FilterTabsFunc)
func (*ListingBuilder) GetPageFunc ¶
func (b *ListingBuilder) GetPageFunc() web.PageFunc
func (*ListingBuilder) NewButtonFunc ¶
func (b *ListingBuilder) NewButtonFunc(v ComponentFunc) (r *ListingBuilder)
func (*ListingBuilder) Only ¶
func (b *ListingBuilder) Only(vs ...string) (r *ListingBuilder)
func (*ListingBuilder) OrderBy ¶
func (b *ListingBuilder) OrderBy(v string) (r *ListingBuilder)
func (*ListingBuilder) OrderableFields ¶
func (b *ListingBuilder) OrderableFields(v []*OrderableField) (r *ListingBuilder)
func (*ListingBuilder) PageFunc ¶
func (b *ListingBuilder) PageFunc(pf web.PageFunc) (r *ListingBuilder)
func (*ListingBuilder) PerPage ¶
func (b *ListingBuilder) PerPage(v int64) (r *ListingBuilder)
func (*ListingBuilder) RowMenu ¶
func (b *ListingBuilder) RowMenu(listings ...string) *RowMenuBuilder
func (*ListingBuilder) SearchColumns ¶
func (b *ListingBuilder) SearchColumns(vs ...string) (r *ListingBuilder)
func (*ListingBuilder) SearchFunc ¶
func (b *ListingBuilder) SearchFunc(v SearchFunc) (r *ListingBuilder)
func (*ListingBuilder) SelectableColumns ¶
func (b *ListingBuilder) SelectableColumns(v bool) (r *ListingBuilder)
func (*ListingBuilder) TotalVisible ¶
func (b *ListingBuilder) TotalVisible(v int64) (r *ListingBuilder)
type MenuGroupBuilder ¶
type MenuGroupBuilder struct {
// contains filtered or unexported fields
}
func (*MenuGroupBuilder) Icon ¶
func (b *MenuGroupBuilder) Icon(v string) (r *MenuGroupBuilder)
func (*MenuGroupBuilder) SubItems ¶
func (b *MenuGroupBuilder) SubItems(ss ...string) (r *MenuGroupBuilder)
type MenuGroups ¶
type MenuGroups struct {
// contains filtered or unexported fields
}
func (*MenuGroups) MenuGroup ¶
func (g *MenuGroups) MenuGroup(name string) (r *MenuGroupBuilder)
type Messages ¶
type Messages struct { SuccessfullyUpdated string Search string New string Update string Delete string Edit string FormTitle string OK string Cancel string Clear string Create string DeleteConfirmationTextTemplate string CreatingObjectTitleTemplate string EditingObjectTitleTemplate string ListingObjectTitleTemplate string DetailingObjectTitleTemplate string FiltersClear string FiltersAdd string FilterApply string FilterByTemplate string FiltersDateInTheLast string FiltersDateEquals string FiltersDateBetween string FiltersDateIsAfter string FiltersDateIsAfterOrOn string FiltersDateIsBefore string FiltersDateIsBeforeOrOn string FiltersDateDays string FiltersDateMonths string FiltersDateAnd string FiltersDateTo string FiltersNumberEquals string FiltersNumberBetween string FiltersNumberGreaterThan string FiltersNumberLessThan string FiltersNumberAnd string FiltersStringEquals string FiltersStringContains string FiltersMultipleSelectIn string FiltersMultipleSelectNotIn string PaginationRowsPerPage string ListingNoRecordToShow string ListingSelectedCountNotice string ListingClearSelection string BulkActionNoAvailableRecords string BulkActionSelectedIdsProcessNoticeTemplate string ConfirmDialogPromptText string Language string Colon string NotFoundPageNotice string }
func MustGetMessages ¶
func (*Messages) BulkActionSelectedIdsProcessNotice ¶
func (*Messages) CreatingObjectTitle ¶
func (*Messages) DeleteConfirmationText ¶
func (*Messages) DetailingObjectTitle ¶
func (*Messages) EditingObjectTitle ¶
func (*Messages) ListingObjectTitle ¶
type MessagesFunc ¶
type ModelBuilder ¶
func NewModelBuilder ¶
func NewModelBuilder(p *Builder, model interface{}) (mb *ModelBuilder)
func (*ModelBuilder) DefaultURLQueryFunc ¶
func (mb *ModelBuilder) DefaultURLQueryFunc(v func(*http.Request) url.Values) (r *ModelBuilder)
func (*ModelBuilder) Detailing ¶
func (mb *ModelBuilder) Detailing(vs ...interface{}) (r *DetailingBuilder)
string / []string / *FieldsSection
func (*ModelBuilder) Editing ¶
func (mb *ModelBuilder) Editing(vs ...interface{}) (r *EditingBuilder)
string / []string / *FieldsSection
func (*ModelBuilder) InMenu ¶
func (mb *ModelBuilder) InMenu(v bool) (r *ModelBuilder)
func (*ModelBuilder) Info ¶
func (mb *ModelBuilder) Info() (r *ModelInfo)
func (*ModelBuilder) Label ¶
func (mb *ModelBuilder) Label(v string) (r *ModelBuilder)
func (*ModelBuilder) Labels ¶
func (mb *ModelBuilder) Labels(vs ...string) (r *ModelBuilder)
func (*ModelBuilder) LayoutConfig ¶
func (mb *ModelBuilder) LayoutConfig(v *LayoutConfig) (r *ModelBuilder)
func (*ModelBuilder) Link ¶
func (mb *ModelBuilder) Link(v string) *ModelBuilder
func (*ModelBuilder) Listing ¶
func (mb *ModelBuilder) Listing(vs ...string) (r *ListingBuilder)
func (*ModelBuilder) MenuIcon ¶
func (mb *ModelBuilder) MenuIcon(v string) (r *ModelBuilder)
func (*ModelBuilder) NewModel ¶
func (mb *ModelBuilder) NewModel() (r interface{})
func (*ModelBuilder) NewModelSlice ¶
func (mb *ModelBuilder) NewModelSlice() (r interface{})
func (*ModelBuilder) Placeholders ¶
func (mb *ModelBuilder) Placeholders(vs ...string) (r *ModelBuilder)
func (*ModelBuilder) PrimaryField ¶
func (mb *ModelBuilder) PrimaryField(v string) (r *ModelBuilder)
func (*ModelBuilder) RightDrawerWidth ¶
func (mb *ModelBuilder) RightDrawerWidth(v string) *ModelBuilder
func (*ModelBuilder) Singleton ¶
func (mb *ModelBuilder) Singleton(v bool) (r *ModelBuilder)
func (*ModelBuilder) URIName ¶
func (mb *ModelBuilder) URIName(v string) (r *ModelBuilder)
type ModelInfo ¶
type ModelInfo struct {
// contains filtered or unexported fields
}
func (ModelInfo) DetailingHref ¶
func (ModelInfo) DetailingInDrawer ¶
func (ModelInfo) EditingHref ¶
func (ModelInfo) HasDetailing ¶
func (ModelInfo) ListingHref ¶
func (ModelInfo) PresetsPrefix ¶
type ModifiedIndexesBuilder ¶
type ModifiedIndexesBuilder struct {
// contains filtered or unexported fields
}
func ContextModifiedIndexesBuilder ¶
func ContextModifiedIndexesBuilder(ctx *web.EventContext) (r *ModifiedIndexesBuilder)
func (*ModifiedIndexesBuilder) AppendDeleted ¶
func (b *ModifiedIndexesBuilder) AppendDeleted(sliceFormKey string, index int) (r *ModifiedIndexesBuilder)
func (*ModifiedIndexesBuilder) DeletedContains ¶
func (b *ModifiedIndexesBuilder) DeletedContains(sliceFormKey string, index int) (r bool)
func (*ModifiedIndexesBuilder) FromHidden ¶
func (b *ModifiedIndexesBuilder) FromHidden(req *http.Request) (r *ModifiedIndexesBuilder)
func (*ModifiedIndexesBuilder) ReversedmodifiedIndexes ¶
func (b *ModifiedIndexesBuilder) ReversedmodifiedIndexes(sliceFormKey string) (r []int)
func (*ModifiedIndexesBuilder) SetSorted ¶
func (b *ModifiedIndexesBuilder) SetSorted(sliceFormKey string, indexes []string) (r *ModifiedIndexesBuilder)
func (*ModifiedIndexesBuilder) SortedForEach ¶
func (b *ModifiedIndexesBuilder) SortedForEach(slice interface{}, sliceFormKey string, f func(obj interface{}, i int))
func (*ModifiedIndexesBuilder) ToFormHidden ¶
func (b *ModifiedIndexesBuilder) ToFormHidden() h.HTMLComponent
type NestedConfig ¶
type NestedConfig interface {
// contains filtered or unexported methods
}
type ObjectComponentFunc ¶
type ObjectComponentFunc func(obj interface{}, ctx *web.EventContext) h.HTMLComponent
type OptionItem ¶
type OrderableField ¶
type RowFunc ¶
type RowFunc func(obj interface{}, formKey string, content h.HTMLComponent, ctx *web.EventContext) h.HTMLComponent
type RowMenuBuilder ¶
type RowMenuBuilder struct {
// contains filtered or unexported fields
}
func (*RowMenuBuilder) Empty ¶
func (b *RowMenuBuilder) Empty()
func (*RowMenuBuilder) RowMenuItem ¶
func (b *RowMenuBuilder) RowMenuItem(name string) *RowMenuItemBuilder
type RowMenuItemBuilder ¶
type RowMenuItemBuilder struct {
// contains filtered or unexported fields
}
func (*RowMenuItemBuilder) ComponentFunc ¶
func (b *RowMenuItemBuilder) ComponentFunc(v vx.RowMenuItemFunc) *RowMenuItemBuilder
func (*RowMenuItemBuilder) Icon ¶
func (b *RowMenuItemBuilder) Icon(v string) *RowMenuItemBuilder
func (*RowMenuItemBuilder) OnClick ¶
func (b *RowMenuItemBuilder) OnClick(v RowMenuItemClickFunc) *RowMenuItemBuilder
func (*RowMenuItemBuilder) PermAction ¶
func (b *RowMenuItemBuilder) PermAction(v string) *RowMenuItemBuilder
type RowMenuItemClickFunc ¶
type RowMenuItemClickFunc func(ctx *web.EventContext, id string) (r web.EventResponse, err error)
type SQLCondition ¶
type SQLCondition struct { Query string Args []interface{} }
type SearchFunc ¶
type SearchFunc func(model interface{}, params *SearchParams, ctx *web.EventContext) (r interface{}, totalCount int, err error)
type SearchParams ¶
type SetterFunc ¶
type SetterFunc func(obj interface{}, ctx *web.EventContext)
type SlugDecoder ¶
type SlugEncoder ¶
type SlugEncoder interface {
PrimarySlug() string
}
type ValidateFunc ¶
type ValidateFunc func(obj interface{}, ctx *web.EventContext) (err web.ValidationErrors)