itemselection

package
v0.0.0-...-cfe8827 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YAMLformat previewFormat = iota
	JSONformat
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailsPaneKeyMap

type DetailsPaneKeyMap struct {
	Zoom      key.Binding
	ToggleFmt key.Binding
	Copy      key.Binding
}

DetailsPaneKeyMap defines keybindings. It satisfies to the help.KeyMap interface, which is used to render the help menu.

func DefaultDetailsKeyMap

func DefaultDetailsKeyMap() *DetailsPaneKeyMap

DefaultDetailsKeyMap returns a default set of keybindings.

func (*DetailsPaneKeyMap) FullHelp

func (km *DetailsPaneKeyMap) FullHelp() [][]key.Binding

FullHelp implements the KeyMap interface.

func (*DetailsPaneKeyMap) ShortHelp

func (km *DetailsPaneKeyMap) ShortHelp() []key.Binding

ShortHelp implements the KeyMap interface.

type DialogKeyMaps

type DialogKeyMaps struct {
	ColumnVisibility key.Binding
	ColumnSorting    key.Binding
	ScanParams       key.Binding
	QueryParams      key.Binding
	Copy             key.Binding
}

DialogKeyMaps collects keys that toggle view-specific dailogs

type ItemPaneKeyMap

type ItemPaneKeyMap struct {
	Search          key.Binding
	Zoom            key.Binding
	Esc             key.Binding
	ChCols          key.Binding
	ToggleFmt       key.Binding
	Scan            key.Binding
	ScanParameters  key.Binding
	Query           key.Binding
	QueryParameters key.Binding
	Copy            key.Binding
	Browser         key.Binding
	ColVis          key.Binding
	ColSort         key.Binding
	Reload          key.Binding
}

ItemPaneKeyMap defines keybindings. It satisfies to the help.KeyMap interface, which is used to render the help menu.

func DefaultItemPaneKeyMap

func DefaultItemPaneKeyMap() *ItemPaneKeyMap

DefaultItemPaneKeyMap returns a default set of keybindings.

func (*ItemPaneKeyMap) FullHelp

func (km *ItemPaneKeyMap) FullHelp() [][]key.Binding

FullHelp implements the KeyMap interface.

func (*ItemPaneKeyMap) ShortHelp

func (km *ItemPaneKeyMap) ShortHelp() []key.Binding

ShortHelp implements the KeyMap interface.

type ItemSelection

type ItemSelection struct {
	KeyMap *ItemViewKeyMap

	// Additional Keys
	AddKeyMap keymaps.AdditionalKeys
	// contains filtered or unexported fields
}

func NewItemSelectionView

func NewItemSelectionView(ctx context.Context, config *appconfig.Config, opts ...Option) *ItemSelection

func (*ItemSelection) DialogKeyMaps

func (m *ItemSelection) DialogKeyMaps() DialogKeyMaps

func (*ItemSelection) FullHelp

func (m *ItemSelection) FullHelp() [][]key.Binding

VIEW

func (*ItemSelection) Init

func (m *ItemSelection) Init() tea.Cmd

func (*ItemSelection) ShortHelp

func (m *ItemSelection) ShortHelp() []key.Binding

VIEW

func (*ItemSelection) Update

func (m *ItemSelection) Update(msg tea.Msg) tea.Cmd

update handles the message and if it does not detect a keypress that it can map itself proceeds to forward the message to the model's children

func (*ItemSelection) View

func (m *ItemSelection) View() string

type ItemSelectionPane

type ItemSelectionPane struct {

	// key map
	KeyMap *ItemPaneKeyMap

	// Additional Keys
	AddKeyMap keymaps.AdditionalKeys
	// contains filtered or unexported fields
}

func (*ItemSelectionPane) ChangeQueryParameters

func (m *ItemSelectionPane) ChangeQueryParameters(msg messages.QueryParametersChanged) tea.Cmd

func (*ItemSelectionPane) ChangeScanIndex

func (m *ItemSelectionPane) ChangeScanIndex(msg messages.ScanIndexChanged) tea.Cmd

func (*ItemSelectionPane) FullHelp

func (m *ItemSelectionPane) FullHelp() [][]key.Binding

ITEM PANE

func (*ItemSelectionPane) Init

func (m *ItemSelectionPane) Init() tea.Cmd

func (*ItemSelectionPane) MaybePreviewItem

func (m *ItemSelectionPane) MaybePreviewItem(force bool) tea.Cmd

force is used on new pane initialization because lastPreviewItem could be 0

func (*ItemSelectionPane) PageNext

func (m *ItemSelectionPane) PageNext(init bool) tea.Cmd

func (*ItemSelectionPane) ProcessPage

func (m *ItemSelectionPane) ProcessPage(msg messages.PageReady) tea.Cmd

func (*ItemSelectionPane) Reload

func (m *ItemSelectionPane) Reload() tea.Cmd

func (*ItemSelectionPane) ShortHelp

func (m *ItemSelectionPane) ShortHelp() []key.Binding

ITEM PANE

func (*ItemSelectionPane) TableRowFieldDelegate

func (m *ItemSelectionPane) TableRowFieldDelegate(row table.Row, col table.Column, colIdx, rowIdx, colW, padL, padR int, selected bool) string

func (*ItemSelectionPane) ToggleJSONYAMLFormat

func (m *ItemSelectionPane) ToggleJSONYAMLFormat() tea.Cmd

func (*ItemSelectionPane) ToggleQueryParametersDialog

func (m *ItemSelectionPane) ToggleQueryParametersDialog() tea.Cmd

func (*ItemSelectionPane) ToggleScanParametersDialog

func (m *ItemSelectionPane) ToggleScanParametersDialog() tea.Cmd

func (*ItemSelectionPane) Update

func (m *ItemSelectionPane) Update(msg tea.Msg) (cmd tea.Cmd)

func (*ItemSelectionPane) UpdateColumnSorting

func (m *ItemSelectionPane) UpdateColumnSorting(msg messages.ColumnSortingUpdate) tea.Cmd

func (*ItemSelectionPane) UpdateColumnVisibility

func (m *ItemSelectionPane) UpdateColumnVisibility(msg messages.ColumnVisibilityUpdate) tea.Cmd

func (*ItemSelectionPane) View

func (m *ItemSelectionPane) View() string

func (*ItemSelectionPane) Zoom

func (m *ItemSelectionPane) Zoom() tea.Cmd

type ItemViewKeyMap

type ItemViewKeyMap struct {
	MoveFocus key.Binding
}

ItemViewKeyMap defines keybindings. It satisfies to the help.KeyMap interface, which is used to render the help menu.

func DefaultItemViewKeyMap

func DefaultItemViewKeyMap() *ItemViewKeyMap

DefaultItemViewKeyMap returns a default set of keybindings.

func (*ItemViewKeyMap) FullHelp

func (km *ItemViewKeyMap) FullHelp() [][]key.Binding

FullHelp implements the KeyMap interface.

func (*ItemViewKeyMap) ShortHelp

func (km *ItemViewKeyMap) ShortHelp() []key.Binding

ShortHelp implements the KeyMap interface.

type Option

type Option func(t *ItemSelection)

func WithAdditionalKeys

func WithAdditionalKeys(keys keymaps.AdditionalKeys) Option

type SessionData

type SessionData struct {
	// contains filtered or unexported fields
}

type TableStyles

type TableStyles struct {
	SelectedBackground    color.Color
	SearchMatchBackground color.Color
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL