Documentation
¶
Index ¶
- func UpdateTreeSelection(m *BubbleTeaSeedablesPrompter, msg tea.Msg) (tea.Model, tea.Cmd)
- type BubbleTeaSeedablesPrompter
- func (m *BubbleTeaSeedablesPrompter) Confirmation(msg string) (result bool, err error)
- func (m *BubbleTeaSeedablesPrompter) ConfirmationView() string
- func (m *BubbleTeaSeedablesPrompter) Init() tea.Cmd
- func (m *BubbleTeaSeedablesPrompter) MultiChooseTree(msg string, choices []PromptTreeElement) (selected []PromptTreeElement, err error)
- func (m *BubbleTeaSeedablesPrompter) PropagateCounterIndexToTree(total int, tree []PromptTreeElement) (int, []PromptTreeElement)
- func (m *BubbleTeaSeedablesPrompter) TreeSelectionView(level int, message string, breadcrump []string, choices []PromptTreeElement, ...) string
- func (m *BubbleTeaSeedablesPrompter) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *BubbleTeaSeedablesPrompter) UpdateConfirmation(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *BubbleTeaSeedablesPrompter) View() string
- type PromptTreeElement
- type Prompter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateTreeSelection ¶
Types ¶
type BubbleTeaSeedablesPrompter ¶
type BubbleTeaSeedablesPrompter struct {
Logger logger.ILogger
Message string
TreeChoices []PromptTreeElement
Breadcrump []string
FullySelectedTreeChar string // the character to display when a tree element is fully selected
SemiSelectedTreeChar string // the character to display when a tree element is partially selected
UnselectedTreeChar string // the character to display when a tree element is not selected
ElementsCount int
IsTreeChoices bool
IsConfirmation bool
ConfirmationResult bool
UserInputText string
// contains filtered or unexported fields
}
func (*BubbleTeaSeedablesPrompter) Confirmation ¶
func (m *BubbleTeaSeedablesPrompter) Confirmation(msg string) (result bool, err error)
func (*BubbleTeaSeedablesPrompter) ConfirmationView ¶
func (m *BubbleTeaSeedablesPrompter) ConfirmationView() string
func (*BubbleTeaSeedablesPrompter) Init ¶
func (m *BubbleTeaSeedablesPrompter) Init() tea.Cmd
func (*BubbleTeaSeedablesPrompter) MultiChooseTree ¶
func (m *BubbleTeaSeedablesPrompter) MultiChooseTree(msg string, choices []PromptTreeElement) (selected []PromptTreeElement, err error)
func (*BubbleTeaSeedablesPrompter) PropagateCounterIndexToTree ¶
func (m *BubbleTeaSeedablesPrompter) PropagateCounterIndexToTree(total int, tree []PromptTreeElement) (int, []PromptTreeElement)
func (*BubbleTeaSeedablesPrompter) TreeSelectionView ¶
func (m *BubbleTeaSeedablesPrompter) TreeSelectionView(level int, message string, breadcrump []string, choices []PromptTreeElement, finishMessage string) string
func (*BubbleTeaSeedablesPrompter) UpdateConfirmation ¶
func (*BubbleTeaSeedablesPrompter) View ¶
func (m *BubbleTeaSeedablesPrompter) View() string
type PromptTreeElement ¶
type PromptTreeElement struct {
Title string
Selected bool
Level int
CounterIndex int
SubElements []PromptTreeElement
}
func ToggleSelectedTreeElement ¶
func ToggleSelectedTreeElement(targetindex int, tree []PromptTreeElement) (result []PromptTreeElement, found bool)
type Prompter ¶
type Prompter interface {
MultiChooseTree(msg string, choices []PromptTreeElement) (selected []PromptTreeElement, err error)
Confirmation(msg string) (bool, error)
}
Click to show internal directories.
Click to hide internal directories.