1010 @dragleave.stop =" removeHoverClass" >
1111
1212 <div class =" d-flex align-items-center" >
13+ <div class =" horizontal-dashes" v-if =" treeViewItem.parentId && hideGuideLines !== false" />
1314 <span class =" chevron-right" v-if =" treeViewItem.children && treeViewItem.children.length > 0" @click =" toggleVisiblity(treeViewItem.id, $event)" ></span >
1415 <div class =" icon-area" >
1516 <slot name =" icon" v-bind =" treeViewItem" >
2021 :customisations =" getItemCustomisation(treeViewItem.type)" />
2122 </div >
2223
23- <div class =" node-child hide" >
24+ <div class =" node-child hide" :class = " {'hide-guidelines': hideGuideLines} " >
2425 <tree-view :treeViewItems =" treeViewItem.children" nested
2526 v-if =" treeViewItem.children && treeViewItem.children.length > 0" >
2627 <template v-for =" (_ , slot ) of $scopedSlots " v-slot :[slot ]=" props " >
3334</template >
3435
3536<script lang='ts'>
36- import {Vue , Component , Prop } from ' vue-property-decorator' ;
37- import { TreeViewViewModel } from ' @/businessLogic/treviewViewModel/treeViewViewModel'
38- import { CheckedState , Customisations , ItemCheckedChangedEvent , TreeViewCreatedEventPayload , TreeViewItem } from ' @/businessLogic/contracts/types' ;
37+ import {Vue , Component , Prop , Watch } from ' vue-property-decorator' ;
38+ import { TreeViewModel } from ' @/businessLogic/treviewViewModel/treeViewViewModel'
39+ import { CheckedState , Customisations , ItemCheckedChangedEvent , SelectionMode , TreeViewCreatedEventPayload , TreeViewItem } from ' @/businessLogic/contracts/types' ;
3940import { ItemCustomisations } from " @/businessLogic/itemCustomisations/itemCustomisations" ;
4041import { eventManager } from ' @/businessLogic/eventHub/explorerEventPublisher' ;
4142
4243@Component
4344export default class TreeView extends Vue {
4445 @Prop ({ default : () => { return [] }}) treeViewItems! : TreeViewItem [];
45- viewModel = TreeViewViewModel ;
4646 @Prop ({ default: ' Multiple' }) selectionMode! : SelectionMode ;
47+ @Prop ({ default: false }) hideGuideLines! : boolean ;
48+ @Prop ({ default: true }) showSearch! : boolean ;
49+
50+ viewModel = TreeViewModel ;
4751 itemCustomisations = ItemCustomisations ;
4852
4953 created(): void {
5054 const payload: TreeViewCreatedEventPayload = {
5155 itemCustomisations: this .itemCustomisations ,
5256 eventManager
5357 };
54-
5558 this .$emit (" created" , payload );
5659 }
5760
@@ -156,7 +159,12 @@ ul {
156159
157160.icon-area {
158161 width : 16px ;
159- margin-right : .7em ;
162+ margin-right : 0.3em ;
163+ }
164+
165+ .horizontal-dashes {
166+ width : 1em ;
167+ border-top : 1px dashed rgb (192 , 192 , 192 );
160168}
161169
162170.node-name {
165173}
166174
167175.node-child {
168- margin-left : 32px !important ;
169- padding-left : 10px ;
176+ margin-left : 35px !important ;
170177 border-left : 1px dashed rgb (192 , 192 , 192 );
171178 display : block ;
172179}
@@ -175,6 +182,10 @@ ul {
175182 display : none ;
176183}
177184
185+ .hide-guidelines {
186+ border-left : none !important ;
187+ }
188+
178189.chevron-right {
179190 box-sizing : border-box ;
180191 position : relative ;
202213 border-right : 2px solid ;
203214 transform : rotate (-45deg );
204215 right : 6px ;
205- top : 4 px
216+ top : 5 px
206217}
207218 </style >
0 commit comments