forked from openscd/open-scd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editors/communication): add GSE and SMV editor type elements (op…
- Loading branch information
1 parent
984652a
commit 81487c1
Showing
17 changed files
with
1,031 additions
and
511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
LitElement, | ||
TemplateResult, | ||
html, | ||
customElement, | ||
property, | ||
state, | ||
} from 'lit-element'; | ||
|
||
import '@material/mwc-icon'; | ||
|
||
import '../../action-icon.js'; | ||
import { sizableGooseIcon } from '../../icons/icons.js'; | ||
|
||
@customElement('gse-editor') | ||
export class GseEditor extends LitElement { | ||
@property({ attribute: false }) | ||
doc!: XMLDocument; | ||
|
||
@property({ attribute: false }) | ||
element!: Element; | ||
|
||
@state() | ||
get label(): string { | ||
return ( | ||
this.element.getAttribute('ldInst') + | ||
'/' + | ||
this.element.getAttribute('cbName') | ||
); | ||
} | ||
|
||
render(): TemplateResult { | ||
return html`<action-icon label="${this.label}" | ||
><mwc-icon slot="icon">${sizableGooseIcon}</mwc-icon></action-icon | ||
>`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
LitElement, | ||
TemplateResult, | ||
html, | ||
customElement, | ||
property, | ||
state, | ||
} from 'lit-element'; | ||
|
||
import '@material/mwc-icon'; | ||
|
||
import '../../action-icon.js'; | ||
import { sizableSmvIcon } from '../../icons/icons.js'; | ||
|
||
@customElement('smv-editor') | ||
export class SmvEditor extends LitElement { | ||
@property({ attribute: false }) | ||
doc!: XMLDocument; | ||
|
||
@property({ attribute: false }) | ||
element!: Element; | ||
|
||
@state() | ||
get label(): string { | ||
return ( | ||
this.element.getAttribute('ldInst') + | ||
'/' + | ||
this.element.getAttribute('cbName') | ||
); | ||
} | ||
|
||
render(): TemplateResult { | ||
return html`<action-icon label="${this.label}" | ||
><mwc-icon slot="icon">${sizableSmvIcon}</mwc-icon> | ||
</action-icon>`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.