Documentation
¶
Index ¶
- type Accordion
- type AccordionItem
- type Alert
- type Animation
- func (a *Animation) Animate(animType AnimationType, duration string)
- func (a *Animation) ChangeDuration(data interface{})
- func (a *Animation) ChangeIterations(data interface{})
- func (a *Animation) ChangeType(data interface{})
- func (a *Animation) GetDriver() liveview.LiveDriver
- func (a *Animation) GetTemplate() string
- func (a *Animation) Play(data interface{})
- func (a *Animation) SetContent(content string)
- func (a *Animation) Start()
- func (a *Animation) StartAnimation(data interface{})
- func (a *Animation) Stop(data interface{})
- type AnimationType
- type BoxType
- type Breadcrumb
- type BreadcrumbItem
- type Button
- type Calendar
- func (c *Calendar) GetCalendarDays() []CalendarDay
- func (c *Calendar) GetCurrentMonthYear() string
- func (c *Calendar) GetDriver() liveview.LiveDriver
- func (c *Calendar) GetSelectedDate() time.Time
- func (c *Calendar) GetTemplate() string
- func (c *Calendar) NextMonth(data interface{})
- func (c *Calendar) PrevMonth(data interface{})
- func (c *Calendar) SelectDate(data interface{})
- func (c *Calendar) SetSelectedDate(date time.Time)
- func (c *Calendar) Start()
- type CalendarDay
- type Card
- type CardAction
- type Chart
- func (c *Chart) AddAngles(a1, a2 float64) float64
- func (c *Chart) AddData(label string, value float64, color string)
- func (c *Chart) BarClick(data interface{})
- func (c *Chart) ClearData()
- func (c *Chart) GetAngle(value, total float64) float64
- func (c *Chart) GetBarHeight(value, maxValue float64) int
- func (c *Chart) GetBarLabelX(index int) int
- func (c *Chart) GetBarWidth() int
- func (c *Chart) GetBarX(index int) int
- func (c *Chart) GetBarY(value, maxValue float64) int
- func (c *Chart) GetCenterX() int
- func (c *Chart) GetCenterY() int
- func (c *Chart) GetDefaultColor(index int) string
- func (c *Chart) GetDriver() liveview.LiveDriver
- func (c *Chart) GetMaxValue() float64
- func (c *Chart) GetPieSlicePath(cx, cy, radius int, startAngle, sweepAngle float64) string
- func (c *Chart) GetRadius() int
- func (c *Chart) GetTemplate() string
- func (c *Chart) GetTotal() float64
- func (c *Chart) SliceClick(data interface{})
- func (c *Chart) Start()
- func (c *Chart) UpdateData(data []ChartData)
- type ChartData
- type ChartType
- type Clock
- type CollaborativeCanvas
- func (c *CollaborativeCanvas) ChangeFillColor(data interface{})
- func (c *CollaborativeCanvas) ChangeStrokeColor(data interface{})
- func (c *CollaborativeCanvas) ChangeStrokeWidth(data interface{})
- func (c *CollaborativeCanvas) Clear(data interface{})
- func (c *CollaborativeCanvas) Drawing(data interface{})
- func (c *CollaborativeCanvas) EndDrawing(data interface{})
- func (c *CollaborativeCanvas) Export(data interface{})
- func (c *CollaborativeCanvas) GetDriver() liveview.LiveDriver
- func (c *CollaborativeCanvas) GetTemplate() string
- func (c *CollaborativeCanvas) HandleRemoteUpdate(data interface{})
- func (c *CollaborativeCanvas) Import(data interface{})
- func (c *CollaborativeCanvas) Redo(data interface{})
- func (c *CollaborativeCanvas) SelectTool(data interface{})
- func (c *CollaborativeCanvas) Start()
- func (c *CollaborativeCanvas) StartDrawing(data interface{})
- func (c *CollaborativeCanvas) Undo(data interface{})
- func (c *CollaborativeCanvas) UpdateCursor(data interface{})
- type Column
- type Comment
- type CursorInfo
- type DragItem
- type Draggable
- func (d *Draggable) AddItem(id, content, group string, data interface{})
- func (d *Draggable) Drop(data interface{})
- func (d *Draggable) GetDriver() liveview.LiveDriver
- func (d *Draggable) GetItemsByGroup(group string) []DragItem
- func (d *Draggable) GetTemplate() string
- func (d *Draggable) MoveItem(itemID, toGroup string)
- func (d *Draggable) RemoveItem(id string)
- func (d *Draggable) Start()
- type Dropdown
- type DropdownOption
- type EdgeStyle
- type EdgeType
- type FileInfo
- type FileUpload
- func (f *FileUpload) Clear()
- func (f *FileUpload) DragLeave(data interface{})
- func (f *FileUpload) DragOver(data interface{})
- func (f *FileUpload) Drop(data interface{})
- func (f *FileUpload) GetDriver() liveview.LiveDriver
- func (f *FileUpload) GetFileData(index int) ([]byte, error)
- func (f *FileUpload) GetTemplate() string
- func (f *FileUpload) RemoveFile(data interface{})
- func (f *FileUpload) Select(data interface{})
- func (f *FileUpload) Start()
- func (f *FileUpload) Upload(data interface{})
- type FlowBox
- func (b *FlowBox) AddPort(port Port)
- func (b *FlowBox) EndDrag(data interface{})
- func (b *FlowBox) GetDriver() liveview.LiveDriver
- func (b *FlowBox) GetTemplate() string
- func (b *FlowBox) HandleClick(data interface{})
- func (b *FlowBox) HandleDrag(data interface{})
- func (b *FlowBox) HandlePortConnect(data interface{})
- func (b *FlowBox) HandlePortDisconnect(data interface{})
- func (b *FlowBox) MoveTo(x, y int)
- func (b *FlowBox) RemovePort(portID string)
- func (b *FlowBox) Resize(width, height int)
- func (b *FlowBox) SetSelected(selected bool)
- func (b *FlowBox) Start()
- func (b *FlowBox) StartDrag(data interface{})
- func (b *FlowBox) UpdateDescription(description string)
- func (b *FlowBox) UpdateLabel(label string)
- type FlowCanvas
- func (c *FlowCanvas) AddBox(box *FlowBox)
- func (c *FlowCanvas) AddEdge(edge *FlowEdge)
- func (c *FlowCanvas) Clear()
- func (c *FlowCanvas) ExportJSON() map[string]interface{}
- func (c *FlowCanvas) GetDriver() liveview.LiveDriver
- func (c *FlowCanvas) GetTemplate() string
- func (c *FlowCanvas) HandleAddBox(data interface{})
- func (c *FlowCanvas) HandleAddEdge(data interface{})
- func (c *FlowCanvas) HandleCancelConnection(data interface{})
- func (c *FlowCanvas) HandleCanvasClick(data interface{})
- func (c *FlowCanvas) HandleClear(data interface{})
- func (c *FlowCanvas) HandleCompleteConnection(data interface{})
- func (c *FlowCanvas) HandleMoveBox(data interface{})
- func (c *FlowCanvas) HandleRemoveBox(data interface{})
- func (c *FlowCanvas) HandleRemoveEdge(data interface{})
- func (c *FlowCanvas) HandleResetView(data interface{})
- func (c *FlowCanvas) HandleSelectBox(data interface{})
- func (c *FlowCanvas) HandleSelectEdge(data interface{})
- func (c *FlowCanvas) HandleStartConnection(data interface{})
- func (c *FlowCanvas) HandleToggleGrid(data interface{})
- func (c *FlowCanvas) HandleZoomIn(data interface{})
- func (c *FlowCanvas) HandleZoomOut(data interface{})
- func (c *FlowCanvas) RemoveBox(boxID string)
- func (c *FlowCanvas) RemoveEdge(edgeID string)
- func (c *FlowCanvas) Start()
- func (c *FlowCanvas) ZoomPercent() int
- type FlowEdge
- func (e *FlowEdge) CalculateBezierPath() string
- func (e *FlowEdge) CalculateCurvedPath() string
- func (e *FlowEdge) CalculateStepPath() string
- func (e *FlowEdge) GetDriver() liveview.LiveDriver
- func (e *FlowEdge) GetLabelTextY() int
- func (e *FlowEdge) GetLabelX() int
- func (e *FlowEdge) GetLabelY() int
- func (e *FlowEdge) GetLength() float64
- func (e *FlowEdge) GetMidX() int
- func (e *FlowEdge) GetMidY() int
- func (e *FlowEdge) GetRemoveTextY() int
- func (e *FlowEdge) GetRemoveY() int
- func (e *FlowEdge) GetTemplate() string
- func (e *FlowEdge) HandleClick(data interface{})
- func (e *FlowEdge) HandleRemove(data interface{})
- func (e *FlowEdge) SetAnimated(animated bool)
- func (e *FlowEdge) SetEdgeStyle(style EdgeStyle)
- func (e *FlowEdge) SetSelected(selected bool)
- func (e *FlowEdge) SetType(edgeType EdgeType)
- func (e *FlowEdge) Start()
- func (e *FlowEdge) UpdatePosition(fromX, fromY, toX, toY int)
- type Form
- func (f *Form) AddField(field FormField) *Form
- func (f *Form) ClearErrors() *Form
- func (f *Form) GetDriver() liveview.LiveDriver
- func (f *Form) GetField(name string) *FormField
- func (f *Form) GetTemplate() string
- func (f *Form) GetValues() map[string]string
- func (f *Form) Input(data interface{})
- func (f *Form) Reset() *Form
- func (f *Form) SetField(name string, value string) *Form
- func (f *Form) SetValues(values map[string]string) *Form
- func (f *Form) Start()
- func (f *Form) Submit(data interface{})
- func (f *Form) Validate(data interface{})
- func (f *Form) ValidateEmail(email string) bool
- func (f *Form) ValidatePhone(phone string) bool
- type FormField
- type GridSize
- type Header
- type HeaderMenuItem
- type InputText
- func (t *InputText) Change(data interface{})
- func (t *InputText) GetDriver() liveview.LiveDriver
- func (t *InputText) GetTemplate() string
- func (t *InputText) KeyPress(data interface{})
- func (t *InputText) KeyUp(data interface{})
- func (t *InputText) SetKeyUp(fx func(c *InputText, data interface{})) *InputText
- func (t *InputText) Start()
- type KanbanBoard
- func (k *KanbanBoard) AddCard(data interface{})
- func (k *KanbanBoard) AddComment(data interface{})
- func (k *KanbanBoard) ExportBoard(data interface{})
- func (k *KanbanBoard) FilterBy(data interface{})
- func (k *KanbanBoard) GetCardCount(columnID string) int
- func (k *KanbanBoard) GetCardsForColumn(columnID string) []KanbanCard
- func (k *KanbanBoard) GetDriver() liveview.LiveDriver
- func (k *KanbanBoard) GetLabel(labelID string) *KanbanLabel
- func (k *KanbanBoard) GetTemplate() string
- func (k *KanbanBoard) HandleCollaborationMessage(data interface{})
- func (k *KanbanBoard) HandleRemoteUpdate(data interface{})
- func (k *KanbanBoard) ImportBoard(data interface{})
- func (k *KanbanBoard) MoveCard(data interface{})
- func (k *KanbanBoard) Search(data interface{})
- func (k *KanbanBoard) SelectCard(data interface{})
- func (k *KanbanBoard) Start()
- func (k *KanbanBoard) StartDrag(data interface{})
- func (k *KanbanBoard) UpdateCard(data interface{})
- type KanbanCard
- type KanbanColumn
- type KanbanLabel
- type Modal
- func (m *Modal) Cancel(data interface{})
- func (m *Modal) Close(data interface{})
- func (m *Modal) GetDriver() liveview.LiveDriver
- func (m *Modal) GetTemplate() string
- func (m *Modal) Hide()
- func (m *Modal) Ok(data interface{})
- func (m *Modal) Open()
- func (m *Modal) OverlayClick(data interface{})
- func (m *Modal) SetContent(content string)
- func (m *Modal) SetTitle(title string)
- func (m *Modal) Show(title, content string)
- func (m *Modal) Start()
- func (m *Modal) Toggle()
- type Notification
- type NotificationSystem
- func (n *NotificationSystem) Clear()
- func (n *NotificationSystem) Close(data interface{})
- func (n *NotificationSystem) Error(title, message string)
- func (n *NotificationSystem) GetDriver() liveview.LiveDriver
- func (n *NotificationSystem) GetProgressColor(notifType NotificationType) string
- func (n *NotificationSystem) GetTemplate() string
- func (n *NotificationSystem) GetVisibleNotifications() []Notification
- func (n *NotificationSystem) Info(title, message string)
- func (n *NotificationSystem) SetPosition(position string)
- func (n *NotificationSystem) Show(notifType NotificationType, title, message string, duration int)
- func (n *NotificationSystem) Start()
- func (n *NotificationSystem) Success(title, message string)
- func (n *NotificationSystem) Warning(title, message string)
- type NotificationType
- type Pagination
- func (p *Pagination) EndItem() int
- func (p *Pagination) First(data interface{})
- func (p *Pagination) GetDriver() liveview.LiveDriver
- func (p *Pagination) GetTemplate() string
- func (p *Pagination) GoToPage(data interface{})
- func (p *Pagination) Last(data interface{})
- func (p *Pagination) Next(data interface{})
- func (p *Pagination) PageNumbers() []int
- func (p *Pagination) Previous(data interface{})
- func (p *Pagination) Start()
- func (p *Pagination) StartItem() int
- func (p *Pagination) UpdateTotal(totalItems int)
- type Point
- type Port
- type RichEditor
- func (r *RichEditor) Change(data interface{})
- func (r *RichEditor) Clear()
- func (r *RichEditor) Format(data interface{})
- func (r *RichEditor) GetContent() string
- func (r *RichEditor) GetDriver() liveview.LiveDriver
- func (r *RichEditor) GetTemplate() string
- func (r *RichEditor) SetContent(content string)
- func (r *RichEditor) Start()
- type Row
- type SearchBox
- func (s *SearchBox) ClearSearch(data interface{})
- func (s *SearchBox) GetDriver() liveview.LiveDriver
- func (s *SearchBox) GetTemplate() string
- func (s *SearchBox) HideResults(data interface{})
- func (s *SearchBox) SelectResult(data interface{})
- func (s *SearchBox) SetResults(results []SearchResult)
- func (s *SearchBox) ShowLoading(show bool)
- func (s *SearchBox) Start()
- func (s *SearchBox) UpdateQuery(data interface{})
- type SearchResult
- type Shape
- type Sidebar
- type SidebarItem
- type Step
- type Stepper
- func (s *Stepper) CompleteCurrentStep()
- func (s *Stepper) GetDriver() liveview.LiveDriver
- func (s *Stepper) GetTemplate() string
- func (s *Stepper) GoToStep(data interface{})
- func (s *Stepper) NextStep(data interface{})
- func (s *Stepper) PreviousStep(data interface{})
- func (s *Stepper) Reset()
- func (s *Stepper) SetStepError(stepIndex int, hasError bool)
- func (s *Stepper) Start()
- type Tab
- type Table
- func (t *Table) ClearSelection()
- func (t *Table) Filter(data interface{})
- func (t *Table) GetDriver() liveview.LiveDriver
- func (t *Table) GetEndIndex() int
- func (t *Table) GetPageNumbers() []int
- func (t *Table) GetPageRows() []Row
- func (t *Table) GetSelectedRows() []Row
- func (t *Table) GetStartIndex() int
- func (t *Table) GetTemplate() string
- func (t *Table) Page(data interface{})
- func (t *Table) RowClick(data interface{})
- func (t *Table) SelectAll(data interface{})
- func (t *Table) SelectRow(data interface{})
- func (t *Table) Sort(data interface{})
- func (t *Table) Start()
- func (t *Table) UpdateData(rows []Row)
- type Tabs
- type UserActivity
- type ValidationRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accordion ¶
type Accordion struct {
*liveview.ComponentDriver[*Accordion]
Items []AccordionItem
}
func NewAccordion ¶
func NewAccordion(items []AccordionItem) *Accordion
func (*Accordion) GetDriver ¶
func (a *Accordion) GetDriver() liveview.LiveDriver
func (*Accordion) GetTemplate ¶
type AccordionItem ¶
type Alert ¶
type Alert struct {
*liveview.ComponentDriver[*Alert]
Message string
Type string // info, success, warning, error
Title string
Dismissible bool
Visible bool
Icon bool
}
func (*Alert) GetDriver ¶
func (a *Alert) GetDriver() liveview.LiveDriver
func (*Alert) GetTemplate ¶
type Animation ¶
type Animation struct {
*liveview.ComponentDriver[*Animation]
Content string
Type AnimationType
Duration string
Delay string
IterationCount string
IsPlaying bool
}
func (*Animation) Animate ¶
func (a *Animation) Animate(animType AnimationType, duration string)
func (*Animation) ChangeDuration ¶
func (a *Animation) ChangeDuration(data interface{})
func (*Animation) ChangeIterations ¶
func (a *Animation) ChangeIterations(data interface{})
func (*Animation) ChangeType ¶
func (a *Animation) ChangeType(data interface{})
func (*Animation) GetDriver ¶
func (a *Animation) GetDriver() liveview.LiveDriver
func (*Animation) GetTemplate ¶
func (*Animation) SetContent ¶
func (*Animation) StartAnimation ¶
func (a *Animation) StartAnimation(data interface{})
type AnimationType ¶
type AnimationType string
const ( AnimationFadeIn AnimationType = "fadeIn" AnimationFadeOut AnimationType = "fadeOut" AnimationSlideIn AnimationType = "slideIn" AnimationSlideOut AnimationType = "slideOut" AnimationBounce AnimationType = "bounce" AnimationRotate AnimationType = "rotate" AnimationPulse AnimationType = "pulse" AnimationShake AnimationType = "shake" )
type Breadcrumb ¶
type Breadcrumb struct {
*liveview.ComponentDriver[*Breadcrumb]
Items []BreadcrumbItem
Separator string
}
func NewBreadcrumb ¶
func NewBreadcrumb(items []BreadcrumbItem) *Breadcrumb
func (*Breadcrumb) AddItem ¶
func (b *Breadcrumb) AddItem(label, href string)
func (*Breadcrumb) GetDriver ¶
func (b *Breadcrumb) GetDriver() liveview.LiveDriver
func (*Breadcrumb) GetTemplate ¶
func (b *Breadcrumb) GetTemplate() string
func (*Breadcrumb) Navigate ¶
func (b *Breadcrumb) Navigate(data interface{})
func (*Breadcrumb) Start ¶
func (b *Breadcrumb) Start()
type BreadcrumbItem ¶
type Button ¶
type Button struct {
*liveview.ComponentDriver[*Button]
I int
Caption string
}
func (*Button) GetDriver ¶
func (t *Button) GetDriver() liveview.LiveDriver
func (*Button) GetTemplate ¶
type Calendar ¶
type Calendar struct {
*liveview.ComponentDriver[*Calendar]
SelectedDate time.Time
CurrentMonth time.Time
MinDate time.Time
MaxDate time.Time
OnSelect func(date time.Time)
}
func (*Calendar) GetCalendarDays ¶
func (c *Calendar) GetCalendarDays() []CalendarDay
func (*Calendar) GetCurrentMonthYear ¶
func (*Calendar) GetDriver ¶
func (c *Calendar) GetDriver() liveview.LiveDriver
func (*Calendar) GetSelectedDate ¶
func (*Calendar) GetTemplate ¶
func (*Calendar) SelectDate ¶
func (c *Calendar) SelectDate(data interface{})
func (*Calendar) SetSelectedDate ¶
type Card ¶
type Card struct {
*liveview.ComponentDriver[*Card]
Title string
Subtitle string
Content string
ImageURL string
Actions []CardAction
Width string
Elevated bool
Hoverable bool
}
func (*Card) GetDriver ¶
func (c *Card) GetDriver() liveview.LiveDriver
func (*Card) GetTemplate ¶
type CardAction ¶
type Chart ¶
type Chart struct {
*liveview.ComponentDriver[*Chart]
Type ChartType
Data []ChartData
Width int
Height int
Title string
}
func (*Chart) GetBarHeight ¶
func (*Chart) GetBarLabelX ¶
func (*Chart) GetBarWidth ¶
func (*Chart) GetCenterX ¶
func (*Chart) GetCenterY ¶
func (*Chart) GetDefaultColor ¶
func (*Chart) GetDriver ¶
func (c *Chart) GetDriver() liveview.LiveDriver
func (*Chart) GetMaxValue ¶
func (*Chart) GetPieSlicePath ¶
func (*Chart) GetTemplate ¶
func (*Chart) SliceClick ¶
func (c *Chart) SliceClick(data interface{})
func (*Chart) UpdateData ¶
type Clock ¶
type Clock struct {
*liveview.ComponentDriver[*Clock]
ActualTime string
}
func (*Clock) GetDriver ¶
func (t *Clock) GetDriver() liveview.LiveDriver
func (*Clock) GetTemplate ¶
type CollaborativeCanvas ¶
type CollaborativeCanvas struct {
*liveview.ComponentDriver[*CollaborativeCanvas]
*liveview.CollaborativeComponent
// Canvas properties
Width int `json:"width"`
Height int `json:"height"`
Background string `json:"background"`
// Drawing state
Shapes []Shape `json:"shapes"`
CurrentTool string `json:"current_tool"`
StrokeColor string `json:"stroke_color"`
FillColor string `json:"fill_color"`
StrokeWidth int `json:"stroke_width"`
// Collaboration
Cursors map[string]*CursorInfo `json:"cursors"`
Selections map[string][]string `json:"selections"` // user -> selected shape IDs
}
CollaborativeCanvas provides real-time collaborative drawing
func (*CollaborativeCanvas) ChangeFillColor ¶
func (c *CollaborativeCanvas) ChangeFillColor(data interface{})
ChangeFillColor updates fill color
func (*CollaborativeCanvas) ChangeStrokeColor ¶
func (c *CollaborativeCanvas) ChangeStrokeColor(data interface{})
ChangeStrokeColor updates stroke color
func (*CollaborativeCanvas) ChangeStrokeWidth ¶
func (c *CollaborativeCanvas) ChangeStrokeWidth(data interface{})
ChangeStrokeWidth updates stroke width
func (*CollaborativeCanvas) Clear ¶
func (c *CollaborativeCanvas) Clear(data interface{})
Clear removes all shapes
func (*CollaborativeCanvas) Drawing ¶
func (c *CollaborativeCanvas) Drawing(data interface{})
Drawing handles ongoing drawing
func (*CollaborativeCanvas) EndDrawing ¶
func (c *CollaborativeCanvas) EndDrawing(data interface{})
EndDrawing completes a shape
func (*CollaborativeCanvas) Export ¶
func (c *CollaborativeCanvas) Export(data interface{})
Export exports canvas as JSON
func (*CollaborativeCanvas) GetDriver ¶
func (c *CollaborativeCanvas) GetDriver() liveview.LiveDriver
GetDriver returns the component driver
func (*CollaborativeCanvas) GetTemplate ¶
func (c *CollaborativeCanvas) GetTemplate() string
GetTemplate returns the canvas HTML template
func (*CollaborativeCanvas) HandleRemoteUpdate ¶
func (c *CollaborativeCanvas) HandleRemoteUpdate(data interface{})
HandleRemoteUpdate processes updates from other users
func (*CollaborativeCanvas) Import ¶
func (c *CollaborativeCanvas) Import(data interface{})
Import imports canvas from JSON
func (*CollaborativeCanvas) Redo ¶
func (c *CollaborativeCanvas) Redo(data interface{})
Redo re-adds a removed shape
func (*CollaborativeCanvas) SelectTool ¶
func (c *CollaborativeCanvas) SelectTool(data interface{})
SelectTool changes the current drawing tool
func (*CollaborativeCanvas) Start ¶
func (c *CollaborativeCanvas) Start()
Start initializes the canvas
func (*CollaborativeCanvas) StartDrawing ¶
func (c *CollaborativeCanvas) StartDrawing(data interface{})
StartDrawing begins a new shape
func (*CollaborativeCanvas) Undo ¶
func (c *CollaborativeCanvas) Undo(data interface{})
Undo removes the last shape
func (*CollaborativeCanvas) UpdateCursor ¶
func (c *CollaborativeCanvas) UpdateCursor(data interface{})
UpdateCursor updates cursor position for collaboration
type Comment ¶
type Comment struct {
ID string `json:"id"`
UserID string `json:"user_id"`
UserName string `json:"user_name"`
Text string `json:"text"`
CreatedAt time.Time `json:"created_at"`
}
Comment on a card
type CursorInfo ¶
type CursorInfo struct {
X float64 `json:"x"`
Y float64 `json:"y"`
Color string `json:"color"`
Name string `json:"name"`
Active bool `json:"active"`
}
CursorInfo tracks cursor information
type Draggable ¶
type Draggable struct {
*liveview.ComponentDriver[*Draggable]
Items []DragItem
Containers []string
OnDrop func(itemID, fromContainer, toContainer string)
OnReorder func(items []DragItem)
}
func (*Draggable) GetDriver ¶
func (d *Draggable) GetDriver() liveview.LiveDriver
func (*Draggable) GetItemsByGroup ¶
func (*Draggable) GetTemplate ¶
func (*Draggable) RemoveItem ¶
type Dropdown ¶
type Dropdown struct {
*liveview.ComponentDriver[*Dropdown]
Options []DropdownOption
Selected string
Placeholder string
IsOpen bool
Width string
}
func NewDropdown ¶
func NewDropdown(options []DropdownOption, placeholder string) *Dropdown
func (*Dropdown) GetDriver ¶
func (d *Dropdown) GetDriver() liveview.LiveDriver
func (*Dropdown) GetSelectedLabel ¶
func (*Dropdown) GetTemplate ¶
type DropdownOption ¶
type FileUpload ¶
type FileUpload struct {
*liveview.ComponentDriver[*FileUpload]
Multiple bool
Accept string
MaxSize int64
MaxFiles int
Files []FileInfo
DragActive bool
UploadProgress int
Label string
OnUpload func(files []FileInfo) error
}
func (*FileUpload) Clear ¶
func (f *FileUpload) Clear()
func (*FileUpload) DragLeave ¶
func (f *FileUpload) DragLeave(data interface{})
func (*FileUpload) DragOver ¶
func (f *FileUpload) DragOver(data interface{})
func (*FileUpload) Drop ¶
func (f *FileUpload) Drop(data interface{})
func (*FileUpload) GetDriver ¶
func (f *FileUpload) GetDriver() liveview.LiveDriver
func (*FileUpload) GetFileData ¶
func (f *FileUpload) GetFileData(index int) ([]byte, error)
func (*FileUpload) GetTemplate ¶
func (f *FileUpload) GetTemplate() string
func (*FileUpload) RemoveFile ¶
func (f *FileUpload) RemoveFile(data interface{})
func (*FileUpload) Select ¶
func (f *FileUpload) Select(data interface{})
func (*FileUpload) Start ¶
func (f *FileUpload) Start()
func (*FileUpload) Upload ¶
func (f *FileUpload) Upload(data interface{})
type FlowBox ¶
type FlowBox struct {
*liveview.ComponentDriver[*FlowBox]
ID string
Label string
Description string
Type BoxType
X int
Y int
Width int
Height int
Selected bool
Dragging bool
Color string
Icon string
Ports []Port
Data map[string]interface{}
OnClick func(boxID string)
OnConnect func(fromBox, fromPort, toBox, toPort string)
}
func (*FlowBox) GetDriver ¶
func (b *FlowBox) GetDriver() liveview.LiveDriver
func (*FlowBox) GetTemplate ¶
func (*FlowBox) HandleClick ¶
func (b *FlowBox) HandleClick(data interface{})
func (*FlowBox) HandleDrag ¶
func (b *FlowBox) HandleDrag(data interface{})
func (*FlowBox) HandlePortConnect ¶
func (b *FlowBox) HandlePortConnect(data interface{})
func (*FlowBox) HandlePortDisconnect ¶
func (b *FlowBox) HandlePortDisconnect(data interface{})
func (*FlowBox) RemovePort ¶
func (*FlowBox) SetSelected ¶
func (*FlowBox) UpdateDescription ¶
func (*FlowBox) UpdateLabel ¶
type FlowCanvas ¶
type FlowCanvas struct {
*liveview.ComponentDriver[*FlowCanvas]
ID string
Width int
Height int
Boxes map[string]*FlowBox
Edges map[string]*FlowEdge
GridSize GridSize
ShowGrid bool
Zoom float64
PanX int
PanY int
SelectedBox string
SelectedEdge string
ConnectingFrom string
ConnectingPort string
IsConnecting bool
ReadOnly bool
OnBoxClick func(boxID string)
OnEdgeClick func(edgeID string)
OnConnection func(fromBox, fromPort, toBox, toPort string)
OnBoxMove func(boxID string, x, y int)
OnCanvasClick func(x, y int)
}
func NewFlowCanvas ¶
func NewFlowCanvas(id string, width, height int) *FlowCanvas
func (*FlowCanvas) AddBox ¶
func (c *FlowCanvas) AddBox(box *FlowBox)
func (*FlowCanvas) AddEdge ¶
func (c *FlowCanvas) AddEdge(edge *FlowEdge)
func (*FlowCanvas) Clear ¶
func (c *FlowCanvas) Clear()
func (*FlowCanvas) ExportJSON ¶
func (c *FlowCanvas) ExportJSON() map[string]interface{}
func (*FlowCanvas) GetDriver ¶
func (c *FlowCanvas) GetDriver() liveview.LiveDriver
func (*FlowCanvas) GetTemplate ¶
func (c *FlowCanvas) GetTemplate() string
func (*FlowCanvas) HandleAddBox ¶
func (c *FlowCanvas) HandleAddBox(data interface{})
func (*FlowCanvas) HandleAddEdge ¶
func (c *FlowCanvas) HandleAddEdge(data interface{})
func (*FlowCanvas) HandleCancelConnection ¶
func (c *FlowCanvas) HandleCancelConnection(data interface{})
func (*FlowCanvas) HandleCanvasClick ¶
func (c *FlowCanvas) HandleCanvasClick(data interface{})
func (*FlowCanvas) HandleClear ¶
func (c *FlowCanvas) HandleClear(data interface{})
func (*FlowCanvas) HandleCompleteConnection ¶
func (c *FlowCanvas) HandleCompleteConnection(data interface{})
func (*FlowCanvas) HandleMoveBox ¶
func (c *FlowCanvas) HandleMoveBox(data interface{})
func (*FlowCanvas) HandleRemoveBox ¶
func (c *FlowCanvas) HandleRemoveBox(data interface{})
func (*FlowCanvas) HandleRemoveEdge ¶
func (c *FlowCanvas) HandleRemoveEdge(data interface{})
func (*FlowCanvas) HandleResetView ¶
func (c *FlowCanvas) HandleResetView(data interface{})
func (*FlowCanvas) HandleSelectBox ¶
func (c *FlowCanvas) HandleSelectBox(data interface{})
func (*FlowCanvas) HandleSelectEdge ¶
func (c *FlowCanvas) HandleSelectEdge(data interface{})
func (*FlowCanvas) HandleStartConnection ¶
func (c *FlowCanvas) HandleStartConnection(data interface{})
func (*FlowCanvas) HandleToggleGrid ¶
func (c *FlowCanvas) HandleToggleGrid(data interface{})
func (*FlowCanvas) HandleZoomIn ¶
func (c *FlowCanvas) HandleZoomIn(data interface{})
func (*FlowCanvas) HandleZoomOut ¶
func (c *FlowCanvas) HandleZoomOut(data interface{})
func (*FlowCanvas) RemoveBox ¶
func (c *FlowCanvas) RemoveBox(boxID string)
func (*FlowCanvas) RemoveEdge ¶
func (c *FlowCanvas) RemoveEdge(edgeID string)
func (*FlowCanvas) Start ¶
func (c *FlowCanvas) Start()
func (*FlowCanvas) ZoomPercent ¶
func (c *FlowCanvas) ZoomPercent() int
type FlowEdge ¶
type FlowEdge struct {
*liveview.ComponentDriver[*FlowEdge]
ID string
FromBox string
FromPort string
ToBox string
ToPort string
FromX int
FromY int
ToX int
ToY int
Type EdgeType
Style EdgeStyle
Color string
Width int
Label string
Selected bool
Animated bool
ArrowHead bool
Bidirectional bool
OnClick func(edgeID string)
}
func NewFlowEdge ¶
func (*FlowEdge) CalculateBezierPath ¶
func (*FlowEdge) CalculateCurvedPath ¶
func (*FlowEdge) CalculateStepPath ¶
func (*FlowEdge) GetDriver ¶
func (e *FlowEdge) GetDriver() liveview.LiveDriver
func (*FlowEdge) GetLabelTextY ¶
func (*FlowEdge) GetRemoveTextY ¶
func (*FlowEdge) GetRemoveY ¶
func (*FlowEdge) GetTemplate ¶
func (*FlowEdge) HandleClick ¶
func (e *FlowEdge) HandleClick(data interface{})
func (*FlowEdge) HandleRemove ¶
func (e *FlowEdge) HandleRemove(data interface{})
func (*FlowEdge) SetAnimated ¶
func (*FlowEdge) SetEdgeStyle ¶
func (*FlowEdge) SetSelected ¶
func (*FlowEdge) UpdatePosition ¶
type Form ¶
type Form struct {
*liveview.ComponentDriver[*Form]
Fields []FormField
SubmitLabel string
Errors map[string]string
IsValid bool
OnSubmit func(data map[string]string) error
}
func (*Form) ClearErrors ¶
func (*Form) GetDriver ¶
func (f *Form) GetDriver() liveview.LiveDriver
func (*Form) GetTemplate ¶
func (*Form) ValidateEmail ¶
func (*Form) ValidatePhone ¶
type Header ¶
type Header struct {
*liveview.ComponentDriver[*Header]
Title string
Logo string
MenuItems []HeaderMenuItem
Background string
Height string
ShowMenu bool
}
func NewHeader ¶
func NewHeader(title string, menuItems []HeaderMenuItem) *Header
func (*Header) GetDriver ¶
func (h *Header) GetDriver() liveview.LiveDriver
func (*Header) GetTemplate ¶
func (*Header) ToggleMenu ¶
func (h *Header) ToggleMenu(data interface{})
type HeaderMenuItem ¶
type InputText ¶
type InputText struct {
*liveview.ComponentDriver[*InputText]
}
func (*InputText) GetDriver ¶
func (t *InputText) GetDriver() liveview.LiveDriver
func (*InputText) GetTemplate ¶
type KanbanBoard ¶
type KanbanBoard struct {
*liveview.ComponentDriver[*KanbanBoard]
*liveview.CollaborativeComponent
// Board structure
Title string `json:"title"`
Description string `json:"description"`
Columns []KanbanColumn `json:"columns"`
Cards []KanbanCard `json:"cards"`
Labels []KanbanLabel `json:"labels"`
// UI state
DraggedCard *KanbanCard `json:"-"`
SelectedCard *KanbanCard `json:"-"`
ShowCardModal bool `json:"show_modal"`
EditingCard *KanbanCard `json:"editing_card"`
Filter string `json:"filter"`
SearchQuery string `json:"search_query"`
// Collaboration
ActiveUsers map[string]*UserActivity `json:"active_users"`
}
KanbanBoard provides a collaborative task management board
func (*KanbanBoard) AddCard ¶
func (k *KanbanBoard) AddCard(data interface{})
AddCard adds a new card to a column
func (*KanbanBoard) AddComment ¶
func (k *KanbanBoard) AddComment(data interface{})
AddComment adds a comment to a card
func (*KanbanBoard) ExportBoard ¶
func (k *KanbanBoard) ExportBoard(data interface{})
ExportBoard exports the board as JSON
func (*KanbanBoard) FilterBy ¶
func (k *KanbanBoard) FilterBy(data interface{})
FilterBy updates the filter
func (*KanbanBoard) GetCardCount ¶
func (k *KanbanBoard) GetCardCount(columnID string) int
GetCardCount returns the number of cards in a column
func (*KanbanBoard) GetCardsForColumn ¶
func (k *KanbanBoard) GetCardsForColumn(columnID string) []KanbanCard
GetCardsForColumn returns cards in a specific column
func (*KanbanBoard) GetDriver ¶
func (k *KanbanBoard) GetDriver() liveview.LiveDriver
GetDriver returns the component driver
func (*KanbanBoard) GetLabel ¶
func (k *KanbanBoard) GetLabel(labelID string) *KanbanLabel
GetLabel returns a label by ID
func (*KanbanBoard) GetTemplate ¶
func (k *KanbanBoard) GetTemplate() string
GetTemplate returns the Kanban board HTML
func (*KanbanBoard) HandleCollaborationMessage ¶
func (k *KanbanBoard) HandleCollaborationMessage(data interface{})
HandleCollaborationMessage handles incoming collaboration messages
func (*KanbanBoard) HandleRemoteUpdate ¶
func (k *KanbanBoard) HandleRemoteUpdate(data interface{})
HandleRemoteUpdate handles updates from other users
func (*KanbanBoard) ImportBoard ¶
func (k *KanbanBoard) ImportBoard(data interface{})
ImportBoard imports board data from JSON
func (*KanbanBoard) MoveCard ¶
func (k *KanbanBoard) MoveCard(data interface{})
MoveCard moves a card to a different column
func (*KanbanBoard) Search ¶
func (k *KanbanBoard) Search(data interface{})
Search updates the search query
func (*KanbanBoard) SelectCard ¶
func (k *KanbanBoard) SelectCard(data interface{})
SelectCard selects a card for viewing/editing
func (*KanbanBoard) StartDrag ¶
func (k *KanbanBoard) StartDrag(data interface{})
StartDrag handles drag start
func (*KanbanBoard) UpdateCard ¶
func (k *KanbanBoard) UpdateCard(data interface{})
UpdateCard updates card details
type KanbanCard ¶
type KanbanCard struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
ColumnID string `json:"column_id"`
AssigneeID string `json:"assignee_id"`
AssigneeName string `json:"assignee_name"`
Labels []string `json:"labels"`
DueDate *time.Time `json:"due_date,omitempty"`
Priority string `json:"priority"` // low, medium, high, urgent
Points int `json:"points"` // Story points
Order int `json:"order"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Comments []Comment `json:"comments"`
Attachments []string `json:"attachments"`
Completed bool `json:"completed"`
Blocked bool `json:"blocked"`
BlockReason string `json:"block_reason,omitempty"`
}
KanbanCard represents a task card
type KanbanColumn ¶
type KanbanColumn struct {
ID string `json:"id"`
Title string `json:"title"`
Color string `json:"color"`
Order int `json:"order"`
WIPLimit int `json:"wip_limit"` // Work in progress limit
Collapsed bool `json:"collapsed"`
}
KanbanColumn represents a column in the board
type KanbanLabel ¶
type KanbanLabel struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color"`
}
KanbanLabel for categorizing cards
type Modal ¶
type Modal struct {
*liveview.ComponentDriver[*Modal]
IsOpen bool
Title string
Content string
Size string
Closable bool
OkText string
CancelText string
OnOk func()
OnCancel func()
OnClose func()
}
func (*Modal) GetDriver ¶
func (m *Modal) GetDriver() liveview.LiveDriver
func (*Modal) GetTemplate ¶
func (*Modal) OverlayClick ¶
func (m *Modal) OverlayClick(data interface{})
func (*Modal) SetContent ¶
type Notification ¶
type NotificationSystem ¶
type NotificationSystem struct {
*liveview.ComponentDriver[*NotificationSystem]
Notifications []Notification
Position string
MaxVisible int
}
func (*NotificationSystem) Clear ¶
func (n *NotificationSystem) Clear()
func (*NotificationSystem) Close ¶
func (n *NotificationSystem) Close(data interface{})
func (*NotificationSystem) Error ¶
func (n *NotificationSystem) Error(title, message string)
func (*NotificationSystem) GetDriver ¶
func (n *NotificationSystem) GetDriver() liveview.LiveDriver
func (*NotificationSystem) GetProgressColor ¶
func (n *NotificationSystem) GetProgressColor(notifType NotificationType) string
func (*NotificationSystem) GetTemplate ¶
func (n *NotificationSystem) GetTemplate() string
func (*NotificationSystem) GetVisibleNotifications ¶
func (n *NotificationSystem) GetVisibleNotifications() []Notification
func (*NotificationSystem) Info ¶
func (n *NotificationSystem) Info(title, message string)
func (*NotificationSystem) SetPosition ¶
func (n *NotificationSystem) SetPosition(position string)
func (*NotificationSystem) Show ¶
func (n *NotificationSystem) Show(notifType NotificationType, title, message string, duration int)
func (*NotificationSystem) Start ¶
func (n *NotificationSystem) Start()
func (*NotificationSystem) Success ¶
func (n *NotificationSystem) Success(title, message string)
func (*NotificationSystem) Warning ¶
func (n *NotificationSystem) Warning(title, message string)
type NotificationType ¶
type NotificationType string
const ( NotificationSuccess NotificationType = "success" NotificationError NotificationType = "error" NotificationWarning NotificationType = "warning" NotificationInfo NotificationType = "info" )
type Pagination ¶
type Pagination struct {
*liveview.ComponentDriver[*Pagination]
CurrentPage int
TotalPages int
TotalItems int
ItemsPerPage int
MaxButtons int
OnPageChange func(page int)
}
func NewPagination ¶
func NewPagination(id string, totalItems, itemsPerPage, currentPage int) *Pagination
func (*Pagination) EndItem ¶
func (p *Pagination) EndItem() int
func (*Pagination) First ¶
func (p *Pagination) First(data interface{})
func (*Pagination) GetDriver ¶
func (p *Pagination) GetDriver() liveview.LiveDriver
func (*Pagination) GetTemplate ¶
func (p *Pagination) GetTemplate() string
func (*Pagination) GoToPage ¶
func (p *Pagination) GoToPage(data interface{})
func (*Pagination) Last ¶
func (p *Pagination) Last(data interface{})
func (*Pagination) Next ¶
func (p *Pagination) Next(data interface{})
func (*Pagination) PageNumbers ¶
func (p *Pagination) PageNumbers() []int
func (*Pagination) Previous ¶
func (p *Pagination) Previous(data interface{})
func (*Pagination) Start ¶
func (p *Pagination) Start()
func (*Pagination) StartItem ¶
func (p *Pagination) StartItem() int
func (*Pagination) UpdateTotal ¶
func (p *Pagination) UpdateTotal(totalItems int)
type RichEditor ¶
type RichEditor struct {
*liveview.ComponentDriver[*RichEditor]
Content string
Placeholder string
Height string
OnChange func(content string)
}
func (*RichEditor) Change ¶
func (r *RichEditor) Change(data interface{})
func (*RichEditor) Clear ¶
func (r *RichEditor) Clear()
func (*RichEditor) Format ¶
func (r *RichEditor) Format(data interface{})
func (*RichEditor) GetContent ¶
func (r *RichEditor) GetContent() string
func (*RichEditor) GetDriver ¶
func (r *RichEditor) GetDriver() liveview.LiveDriver
func (*RichEditor) GetTemplate ¶
func (r *RichEditor) GetTemplate() string
func (*RichEditor) SetContent ¶
func (r *RichEditor) SetContent(content string)
func (*RichEditor) Start ¶
func (r *RichEditor) Start()
type SearchBox ¶
type SearchBox struct {
*liveview.ComponentDriver[*SearchBox]
Query string
Results []SearchResult
ShowResults bool
IsLoading bool
Placeholder string
MinChars int
DebounceMs int
MaxResults int
OnSearch func(query string) []SearchResult
OnSelect func(result SearchResult)
// contains filtered or unexported fields
}
func NewSearchBox ¶
func (*SearchBox) ClearSearch ¶
func (s *SearchBox) ClearSearch(data interface{})
func (*SearchBox) GetDriver ¶
func (s *SearchBox) GetDriver() liveview.LiveDriver
func (*SearchBox) GetTemplate ¶
func (*SearchBox) HideResults ¶
func (s *SearchBox) HideResults(data interface{})
func (*SearchBox) SelectResult ¶
func (s *SearchBox) SelectResult(data interface{})
func (*SearchBox) SetResults ¶
func (s *SearchBox) SetResults(results []SearchResult)
func (*SearchBox) ShowLoading ¶
func (*SearchBox) UpdateQuery ¶
func (s *SearchBox) UpdateQuery(data interface{})
type SearchResult ¶
type Shape ¶
type Shape struct {
ID string `json:"id"`
Type string `json:"type"` // line, rect, circle, path, text
X float64 `json:"x"`
Y float64 `json:"y"`
Width float64 `json:"width,omitempty"`
Height float64 `json:"height,omitempty"`
Radius float64 `json:"radius,omitempty"`
Points []Point `json:"points,omitempty"`
Text string `json:"text,omitempty"`
StrokeColor string `json:"stroke_color"`
FillColor string `json:"fill_color"`
StrokeWidth int `json:"stroke_width"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Locked bool `json:"locked"`
Layer int `json:"layer"`
}
Shape represents a drawable shape
type Sidebar ¶
type Sidebar struct {
*liveview.ComponentDriver[*Sidebar]
Items []SidebarItem
Collapsed bool
Width string
Background string
}
func NewSidebar ¶
func NewSidebar(items []SidebarItem) *Sidebar
func (*Sidebar) GetDriver ¶
func (s *Sidebar) GetDriver() liveview.LiveDriver
func (*Sidebar) GetTemplate ¶
type SidebarItem ¶
type Stepper ¶
type Stepper struct {
*liveview.ComponentDriver[*Stepper]
Steps []Step
CurrentStep int
Orientation string
AllowSkip bool
OnStepChange func(stepIndex int)
}
func NewStepper ¶
func (*Stepper) CompleteCurrentStep ¶
func (s *Stepper) CompleteCurrentStep()
func (*Stepper) GetDriver ¶
func (s *Stepper) GetDriver() liveview.LiveDriver
func (*Stepper) GetTemplate ¶
func (*Stepper) PreviousStep ¶
func (s *Stepper) PreviousStep(data interface{})
func (*Stepper) SetStepError ¶
type Table ¶
type Table struct {
*liveview.ComponentDriver[*Table]
Columns []Column
Rows []Row
FilteredRows []Row
CurrentPage int
PageSize int
TotalPages int
SortColumn string
SortDirection string
FilterText string
Selectable bool
SelectedRows map[int]bool
OnRowClick func(row Row, index int)
OnSort func(column string, direction string)
ShowPagination bool
}
func (*Table) ClearSelection ¶
func (t *Table) ClearSelection()
func (*Table) GetDriver ¶
func (t *Table) GetDriver() liveview.LiveDriver
func (*Table) GetEndIndex ¶
func (*Table) GetPageNumbers ¶
func (*Table) GetPageRows ¶
func (*Table) GetSelectedRows ¶
func (*Table) GetStartIndex ¶
func (*Table) GetTemplate ¶
func (*Table) UpdateData ¶
type Tabs ¶
type Tabs struct {
*liveview.ComponentDriver[*Tabs]
Tabs []Tab
ActiveTab string
OnTabChange func(tabID string)
}
func (*Tabs) GetDriver ¶
func (t *Tabs) GetDriver() liveview.LiveDriver
func (*Tabs) GetTemplate ¶
func (*Tabs) SetActiveTab ¶
type UserActivity ¶
type UserActivity struct {
UserID string `json:"user_id"`
UserName string `json:"user_name"`
CardID string `json:"card_id,omitempty"`
ColumnID string `json:"column_id,omitempty"`
Activity string `json:"activity"` // viewing, editing, dragging
LastActive time.Time `json:"last_active"`
Color string `json:"color"`
}
UserActivity tracks what users are doing
type ValidationRule ¶
Source Files
¶
- accordion.go
- alert.go
- animation.go
- breadcrumb.go
- button.go
- calendar.go
- card.go
- chart.go
- clock.go
- collaborative_canvas.go
- draggable.go
- dropdown.go
- fileupload.go
- flowbox.go
- flowcanvas.go
- flowedge.go
- form.go
- header.go
- input.go
- kanban_board.go
- modal.go
- notification.go
- pagination.go
- richeditor.go
- searchbox.go
- sidebar.go
- stepper.go
- table.go
- tabs.go