fileTree

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationKeyClickBranchExpandChildren = "branchExpandChildren"

	I18nLocalePrefixKey = "wb.content.pipeline.file.tree."
)

Variables

This section is empty.

Functions

func GetOrgIdByProjectId

func GetOrgIdByProjectId(CtxBdl protocol.ContextBundle, projectId string) (*apistructs.ProjectDTO, error)

func RenderCreator

func RenderCreator() protocol.CompRender

Types

type AddDefaultOperationData

type AddDefaultOperationData struct {
	Key string `json:"key"`
}

type AddDefaultOperations

type AddDefaultOperations struct {
	Key      string                  `json:"key"`
	Text     string                  `json:"text"`
	Reload   bool                    `json:"reload"`
	Show     bool                    `json:"show"`
	Meta     AddDefaultOperationData `json:"meta"`
	Disabled bool                    `json:"disabled"`
}

type AddNodeOperation

type AddNodeOperation struct {
	Key      string                  `json:"key"`
	Text     string                  `json:"text"`
	Reload   bool                    `json:"reload"`
	Command  AddNodeOperationCommand `json:"command"`
	Disabled bool                    `json:"disabled"`
}

type AddNodeOperationCommand

type AddNodeOperationCommand struct {
	Key    string                       `json:"key"`
	Target string                       `json:"target"`
	State  AddNodeOperationCommandState `json:"state"`
}

type AddNodeOperationCommandState

type AddNodeOperationCommandState struct {
	Visible  bool                                 `json:"visible"`
	FormData AddNodeOperationCommandStateFormData `json:"formData"`
	// NodeFormModal 传递的数据
	NodeFormModalAddNode NodeFormModalAddNode `json:"nodeFormModalAddNode"`
}

type AddNodeOperationCommandStateFormData

type AddNodeOperationCommandStateFormData struct {
	Branch    string `json:"branch"`
	Name      string `json:"name"`
	AddResult apistructs.UnifiedFileTreeNode
}

type ClickBranchNodeOperation

type ClickBranchNodeOperation struct {
	Key    string                       `json:"key"`
	Text   string                       `json:"text"`
	Reload bool                         `json:"reload"`
	Show   bool                         `json:"show"` // 是否在菜单里展示
	Meta   ClickBranchNodeOperationMeta `json:"meta"`
}

type ClickBranchNodeOperationMeta

type ClickBranchNodeOperationMeta struct {
	ParentKey string `json:"parentKey,omitempty"`
}

type ComponentFileTree

type ComponentFileTree struct {
	CtxBdl   protocol.ContextBundle
	Type     string                 `json:"type"`
	Props    map[string]interface{} `json:"props"`
	State    State                  `json:"state"`
	Data     []Data                 `json:"data"`
	Disabled bool
}

func (*ComponentFileTree) CheckUserPermission

func (ca *ComponentFileTree) CheckUserPermission() (bool, error)

GetUserPermission check Guest permission

func (*ComponentFileTree) Render

func (*ComponentFileTree) SetBundle

type ComponentNodeFormModal

type ComponentNodeFormModal struct {
	Type       string                 `json:"type"`
	Props      map[string]interface{} `json:"props"`
	State      map[string]interface{} `json:"state"`
	Operations map[string]interface{} `json:"operations"`
}

type Data

type Data struct {
	Key           string                 `json:"key"`
	Title         string                 `json:"title"`
	Icon          string                 `json:"icon"`
	IsLeaf        bool                   `json:"isLeaf"`
	ClickToExpand bool                   `json:"clickToExpand"` // always true, 该参数表示前端支持点击目录名进行折叠或展开; false 的话只有点击前面的小三角才能折叠或展开
	Selectable    bool                   `json:"selectable"`
	Operations    map[string]interface{} `json:"operations"`
	Children      []Data                 `json:"children"`
}

type DeleteOperation

type DeleteOperation struct {
	Key         string              `json:"key"`
	Text        string              `json:"text"`
	Confirm     string              `json:"confirm"`
	Reload      bool                `json:"reload"`
	Disabled    bool                `json:"disabled"`
	DisabledTip string              `json:"disabledTip"`
	Meta        DeleteOperationData `json:"meta"`
}

type DeleteOperationData

type DeleteOperationData struct {
	Key string `json:"key"`
}

type InParams

type InParams struct {
	AppId        string `json:"appId"`
	ProjectId    string `json:"projectId"`
	SelectedKeys string `json:"selectedKeys"`
}

type NodeFormModalAddNode

type NodeFormModalAddNode struct {
	Results apistructs.UnifiedFileTreeNode `json:"nodeFormModalAddNode"`
	Branch  string                         `json:"branch"`
}

type State

type State struct {
	ExpandedKeys         []string             `json:"expandedKeys"`
	SelectedKeys         []string             `json:"selectedKeys"`
	NodeFormModalAddNode NodeFormModalAddNode `json:"nodeFormModalAddNode"`
}

Jump to

Keyboard shortcuts

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