1717 :disable-collapse =" COMPONENT_TYPES_ROOT.has(component.type)"
1818 :no-nested-space =" COMPONENT_TYPES_ROOT.has(component.type)"
1919 :collapsed =" isOutsideActivePage"
20- :right-click-options =" rightClickDropdownOptions"
21- :dropdown-options ="
22- component?.type === 'blueprints_blueprint' &&
23- isDeleteAllowed(props.componentId)
24- ? rightClickDropdownOptions
25- : undefined
26- "
2720 @select =" select"
28- @dropdown-select =" handleDropdownSelect($event)"
2921 @dragover =" handleDragOver"
3022 @dragstart =" handleDragStart"
3123 @dragend =" handleDragEnd"
@@ -91,7 +83,6 @@ import {
9183 COMPONENT_TYPES_TOP_LEVEL ,
9284} from " @/constants/component" ;
9385import WdsIcon from " @/wds/WdsIcon.vue" ;
94- import type { WdsDropdownMenuOption } from " @/wds/WdsDropdownMenu.vue" ;
9586
9687const props = defineProps ({
9788 componentId: { type: String , required: true },
@@ -100,9 +91,6 @@ const props = defineProps({
10091
10192const treeBranch = ref <ComponentPublicInstance <typeof BuilderTree >>();
10293
103- const rightClickDropdownOptions: WdsDropdownMenuOption [] = [
104- { label: " Delete" , value: " delete" , icon: " trash-2" },
105- ];
10694const wf = inject (injectionKeys .core );
10795const wfbm = inject (injectionKeys .builderManager );
10896const selected = computed (() => wfbm .isComponentIdSelected (props .componentId ));
@@ -113,12 +101,11 @@ const {
113101 moveComponent,
114102 goToComponentParentPage,
115103 isDraggingAllowed,
116- isDeleteAllowed,
117104} = useComponentActions (wf , wfbm , tracking );
118105const { getComponentInfoFromDrag, removeInsertionCandidacy, isParentSuitable } =
119106 useDragDropComponent (wf );
120107const { isComponentVisible } = useEvaluator (wf );
121- const emits = defineEmits ([" expandBranch" , " delete " ]);
108+ const emit = defineEmits ([" expandBranch" ]);
122109
123110const q = computed (() => props .query ?.toLocaleLowerCase () ?? " " );
124111
@@ -158,7 +145,7 @@ async function select(ev: MouseEvent | KeyboardEvent) {
158145function expand() {
159146 if (! treeBranch .value ) return ;
160147 treeBranch .value .expand ();
161- emits (" expandBranch" );
148+ emit (" expandBranch" );
162149}
163150
164151function scrollToShow() {
@@ -214,10 +201,6 @@ function handleDrop(ev: DragEvent) {
214201 removeInsertionCandidacy (ev );
215202}
216203
217- function handleDropdownSelect(action : string ) {
218- if (action === " delete" ) emits (" delete" );
219- }
220-
221204const isOutsideActivePage = computed (() => {
222205 if (! wf .activePageId .value ) return false ;
223206
0 commit comments