@@ -12,7 +12,11 @@ import '@material/mwc-icon';
12
12
import '@material/mwc-list' ;
13
13
import '@material/mwc-list/mwc-list-item' ;
14
14
15
- import { getNameAttribute , newWizardEvent } from '../../../foundation.js' ;
15
+ import {
16
+ getNameAttribute ,
17
+ identity ,
18
+ newWizardEvent ,
19
+ } from '../../../foundation.js' ;
16
20
import { newSmvSelectEvent } from './foundation.js' ;
17
21
import { smvIcon } from '../../../icons/icons.js' ;
18
22
import { getOrderedIeds , styles } from '../foundation.js' ;
@@ -31,7 +35,7 @@ addEventListener('open-doc', onOpenDocResetSelectedSmvMsg);
31
35
/** An sub element for showing all Sampled Values per IED. */
32
36
@customElement ( 'smv-list' )
33
37
export class SmvPublisherList extends LitElement {
34
- @property ( )
38
+ @property ( { attribute : false } )
35
39
doc ! : XMLDocument ;
36
40
37
41
private onSelect ( smvControl : Element ) {
@@ -64,6 +68,7 @@ export class SmvPublisherList extends LitElement {
64
68
@click = ${ ( ) => this . onSelect ( smvControl ) }
65
69
graphic= "large"
66
70
hasMeta
71
+ value = "${ identity ( smvControl ) } "
67
72
>
68
73
<mwc- icon slot= "graphic" > ${ smvIcon } </ mwc- icon>
69
74
<span> ${ smvControl . getAttribute ( 'name' ) } </ span>
@@ -85,7 +90,16 @@ export class SmvPublisherList extends LitElement {
85
90
${ getOrderedIeds ( this . doc ) . map (
86
91
ied =>
87
92
html `
88
- <mwc- lis t- item noninteractive graphic= "icon" >
93
+ <mwc- lis t- item
94
+ noninteractive
95
+ graphic= "icon"
96
+ value = "${ Array . from ( ied . querySelectorAll ( 'SampledValueControl' ) )
97
+ . map ( element => {
98
+ const id = identity ( element ) as string ;
99
+ return typeof id === 'string' ? id : '' ;
100
+ } )
101
+ . join ( ' ' ) } "
102
+ >
89
103
<span> ${ getNameAttribute ( ied ) } </ span>
90
104
<mwc- icon slot= "graphic" > developer_board </ mwc- icon>
91
105
</ mwc- lis t- item>
@@ -111,5 +125,9 @@ export class SmvPublisherList extends LitElement {
111
125
mwc-icon-button .hidden {
112
126
display : none;
113
127
}
128
+
129
+ mwc-list-item .hidden [noninteractive ] + li [divider ] {
130
+ display : none;
131
+ }
114
132
` ;
115
133
}
0 commit comments