Skip to content

Commit f1baa21

Browse files
author
Flurb
committed
Merge
Signed-off-by: Flurb <[email protected]>
2 parents 9aa9e96 + 6d38202 commit f1baa21

File tree

131 files changed

+9405
-2627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+9405
-2627
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [0.8.2](https://github.com/openscd/open-scd/compare/v0.8.1...v0.8.2) (2022-01-15)
6+
7+
8+
### Bug Fixes
9+
10+
* **Help:** hot-fix incorrect import statement ([c3baa84](https://github.com/openscd/open-scd/commits/c3baa847e1446bf4f2d3b2ad74834228dfc96d08))
11+
12+
### [0.8.1](https://github.com/openscd/open-scd/compare/v0.8.0...v0.8.1) (2022-01-15)
13+
14+
15+
### Features
16+
17+
* **editors/ied:** add read only data model structure ([#423](https://github.com/openscd/open-scd/issues/423)) ([fa15c7a](https://github.com/openscd/open-scd/commits/fa15c7a598f92c2af7237c3e9e1060d453b2162d)), closes [#454](https://github.com/openscd/open-scd/issues/454)
18+
* **editors/ied:** Add toggle for LDevice child elements ([#484](https://github.com/openscd/open-scd/issues/484)) ([9385506](https://github.com/openscd/open-scd/commits/9385506d3f5356bf0523eb3678c13d6b38c17ba9))
19+
* **editors/ied:** Changed icon of IED Editor ([#481](https://github.com/openscd/open-scd/issues/481)) ([be4c8ca](https://github.com/openscd/open-scd/commits/be4c8ca60e6817739094a92a77ef82c1c3911f2c))
20+
* **editors/SingleLineDiagram:** allow selecting the Substation element ([#449](https://github.com/openscd/open-scd/issues/449)) ([d09efec](https://github.com/openscd/open-scd/commits/d09efec1eccdf2363ed1db22c2558b9cc25b9395))
21+
* **editors/SingleLineDiagram:** allow updating X/Y coordinates in SLD for Busbar/ConductingEquipment/PowerTransformer ([#455](https://github.com/openscd/open-scd/issues/455)) ([dfae9b0](https://github.com/openscd/open-scd/commits/dfae9b0deda74cd12785b0a55a9298e91ec21b01))
22+
* **foundation:** allow dynamic wizards ([#471](https://github.com/openscd/open-scd/issues/471)) ([64a27d5](https://github.com/openscd/open-scd/commits/64a27d5875d2362b1796e811f909e13af7995c33))
23+
* **UpdateDescriptionSEL:** add menu type plugin for SEL specific IEDs ([#424](https://github.com/openscd/open-scd/issues/424)) ([12c9123](https://github.com/openscd/open-scd/commits/12c912301f8a918f27ef55b702a0334f76e96a45))
24+
* **zeroline:** show SampledValueControl for IED and whole project ([#477](https://github.com/openscd/open-scd/issues/477)) ([0253adc](https://github.com/openscd/open-scd/commits/0253adc3d696cd806eff23534114c122d27bb979))
25+
26+
27+
### Bug Fixes
28+
29+
* **editors/template/lnodetype:** fix incorrect pattern for lnClass ([#469](https://github.com/openscd/open-scd/issues/469)) ([55e0c7e](https://github.com/openscd/open-scd/commits/55e0c7e999536bbd58b574be1ab93237974dfb87))
30+
* **wizards/fcda:** remove incorrect iedName from FCDA ([#446](https://github.com/openscd/open-scd/issues/446)) ([eae9f6e](https://github.com/openscd/open-scd/commits/eae9f6edc313bf293caa31ed3f82d5261a9ef5f3))
31+
532
## [0.8.0](https://github.com/openscd/open-scd/compare/v0.7.1...v0.8.0) (2021-12-10)
633

734

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@
4040
"purpose": "maskable"
4141
}
4242
],
43-
"version": "0.8.0"
43+
"version": "0.8.2"
4444
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-scd",
3-
"version": "0.8.0",
3+
"version": "0.8.2",
44
"repository": "https://github.com/openscd/open-scd.git",
55
"description": "A bottom-up substation configuration designer for projects described using SCL `IEC 61850-6` Edition 2 or greater.",
66
"keywords": [
@@ -40,7 +40,7 @@
4040
"lit-element": "2.5.1",
4141
"lit-html": "1.4.1",
4242
"lit-translate": "^1.2.1",
43-
"marked": "^3.0.0",
43+
"marked": "^4.0.10",
4444
"panzoom": "^9.4.2"
4545
},
4646
"scripts": {

public/js/plugins.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ export const officialPlugins = [
66
default: true,
77
kind: 'editor',
88
},
9+
{
10+
name: 'IED',
11+
src: '/src/editors/IED.js',
12+
icon: 'developer_board',
13+
default: false,
14+
kind: 'editor',
15+
},
916
{
1017
name: 'Single Line Diagram',
1118
src: '/src/editors/SingleLineDiagram.js',
@@ -109,6 +116,14 @@ export const officialPlugins = [
109116
requireDoc: true,
110117
position: 'middle'
111118
},
119+
{
120+
name: 'Update desc (SEL)',
121+
src: '/src/menu/UpdateDescriptionSEL.js',
122+
default: false,
123+
kind: 'menu',
124+
requireDoc: true,
125+
position: 'middle'
126+
},
112127
{
113128
name: 'Merge Project',
114129
src: '/src/menu/CompasMerge.js',

src/Wizarding.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
ifImplemented,
44
LitElementConstructor,
55
Mixin,
6-
Wizard,
76
WizardEvent,
7+
WizardFactory,
88
} from './foundation.js';
99

1010
import './wizard-dialog.js';
@@ -18,13 +18,12 @@ export function Wizarding<TBase extends LitElementConstructor>(Base: TBase) {
1818
class WizardingElement extends Base {
1919
/** FIFO queue of [[`Wizard`]]s to display. */
2020
@internalProperty()
21-
workflow: Wizard[] = [];
21+
workflow: WizardFactory[] = [];
2222

2323
@query('wizard-dialog') wizardUI!: WizardDialog;
2424

2525
private onWizard(we: WizardEvent) {
2626
const wizard = we.detail.wizard;
27-
if (wizard?.length === 0) return;
2827
if (wizard === null) this.workflow.shift();
2928
else if (we.detail.subwizard) this.workflow.unshift(wizard);
3029
else this.workflow.push(wizard);
@@ -49,7 +48,7 @@ export function Wizarding<TBase extends LitElementConstructor>(Base: TBase) {
4948

5049
render(): TemplateResult {
5150
return html`${ifImplemented(super.render())}
52-
<wizard-dialog .wizard=${this.workflow[0] ?? []}></wizard-dialog>`;
51+
<wizard-dialog .wizard=${this.workflow[0]?.() ?? []}></wizard-dialog>`;
5352
}
5453
}
5554

src/action-icon.ts

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
import {
2+
css,
3+
customElement,
4+
html,
5+
LitElement,
6+
property,
7+
TemplateResult,
8+
} from 'lit-element';
9+
import { nothing } from 'lit-html';
10+
11+
import '@material/mwc-icon';
12+
13+
/**
14+
* A responsive container rendering actions in a header.
15+
*
16+
* The "action" slot may contain up to eight icon buttons.
17+
* The "icon" slot, if filled overrides the icon property.
18+
* The default slot will be rendered into the pane body in a single column.
19+
*/
20+
@customElement('action-icon')
21+
export class ActionIcon extends LitElement {
22+
/** caption text, displayed in the header */
23+
@property({ type: String })
24+
label?: string;
25+
/** icon name, displayed unless the "icon" slot is filled */
26+
@property({ type: String })
27+
icon?: string;
28+
/** color header with secondary theme color while focus is within */
29+
@property({ type: Boolean })
30+
secondary = false;
31+
/** highlight pane with dotted outline */
32+
@property({ type: Boolean })
33+
highlighted = false;
34+
35+
async firstUpdated(): Promise<void> {
36+
this.tabIndex = 0;
37+
}
38+
39+
private renderIcon(): TemplateResult {
40+
return html`<span>
41+
<slot name="icon"
42+
>${this.icon ? html`<mwc-icon>${this.icon}</mwc-icon>` : nothing}</slot
43+
></span
44+
> `;
45+
}
46+
47+
render(): TemplateResult {
48+
return html`<header>${this.label ?? nothing}</header>
49+
<section>${this.renderIcon()}<slot name="action"></slot></section>
50+
<footer>${this.label ?? nothing}</footer>`;
51+
}
52+
53+
static styles = css`
54+
:host {
55+
display: flex;
56+
flex-direction: column;
57+
outline: none;
58+
}
59+
60+
section {
61+
align-self: center;
62+
}
63+
64+
::slotted([slot='icon']),
65+
mwc-icon {
66+
display: block;
67+
color: var(--mdc-theme-on-surface);
68+
transition: transform 150ms linear, box-shadow 200ms linear;
69+
outline-color: var(--mdc-theme-primary);
70+
outline-style: solid;
71+
margin: 0px;
72+
outline-width: 0px;
73+
width: 64px;
74+
height: 64px;
75+
--mdc-icon-size: 64px;
76+
}
77+
78+
:host(:focus-within) ::slotted([slot='icon']),
79+
:host(:focus-within) mwc-icon {
80+
outline-style: solid;
81+
outline-width: 4px;
82+
transform: scale(0.8);
83+
transition: all 250ms linear;
84+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
85+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
86+
}
87+
88+
:host([secondary]) ::slotted([slot='icon']),
89+
:host([secondary]) mwc-icon {
90+
outline-color: var(--mdc-theme-secondary);
91+
}
92+
93+
:host([highlighted]) ::slotted([slot='icon']),
94+
:host([highlighted]) mwc-icon {
95+
outline-style: dotted;
96+
outline-width: 2px;
97+
}
98+
99+
::slotted([slot='icon']:hover),
100+
mwc-icon:hover {
101+
outline-style: dashed;
102+
outline-width: 2px;
103+
transition: transform 200ms linear, box-shadow 250ms linear;
104+
}
105+
106+
::slotted([slot='action']) {
107+
color: var(--mdc-theme-on-surface);
108+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
109+
opacity 200ms linear;
110+
position: absolute;
111+
pointer-events: none;
112+
z-index: 1;
113+
opacity: 0;
114+
margin-top: -56px;
115+
margin-left: 8px;
116+
}
117+
118+
:host(:focus-within) ::slotted([slot='action']) {
119+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
120+
opacity 250ms linear;
121+
pointer-events: auto;
122+
opacity: 1;
123+
}
124+
125+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(1)) {
126+
transform: translate(0px, -52px);
127+
}
128+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(2)) {
129+
transform: translate(0px, 52px);
130+
}
131+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(3)) {
132+
transform: translate(52px, 0px);
133+
}
134+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(4)) {
135+
transform: translate(-52px, 0px);
136+
}
137+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(5)) {
138+
transform: translate(52px, -52px);
139+
}
140+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(6)) {
141+
transform: translate(-52px, 52px);
142+
}
143+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(7)) {
144+
transform: translate(-52px, -52px);
145+
}
146+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(8)) {
147+
transform: translate(52px, 52px);
148+
}
149+
150+
footer {
151+
color: var(--mdc-theme-on-surface);
152+
font-family: 'Roboto', sans-serif;
153+
font-weight: 300;
154+
overflow: hidden;
155+
white-space: nowrap;
156+
text-overflow: ellipsis;
157+
margin: 0px;
158+
text-align: center;
159+
align-self: center;
160+
max-width: 100%;
161+
direction: rtl;
162+
}
163+
164+
header {
165+
color: var(--mdc-theme-on-primary);
166+
background-color: var(--mdc-theme-primary);
167+
font-family: 'Roboto', sans-serif;
168+
font-weight: 500;
169+
font-size: 1.2em;
170+
position: absolute;
171+
text-align: center;
172+
align-self: center;
173+
max-width: 100vw;
174+
padding: 4px 8px;
175+
border-radius: 4px;
176+
opacity: 0;
177+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
178+
opacity 200ms linear;
179+
}
180+
181+
:host(:hover) header {
182+
position: absolute;
183+
opacity: 1;
184+
transform: translate(0, -40px);
185+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
186+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
187+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
188+
opacity 250ms linear;
189+
}
190+
191+
:host(:focus-within) header {
192+
position: absolute;
193+
opacity: 1;
194+
transform: translate(0, -80px);
195+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
196+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
197+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
198+
opacity 250ms linear;
199+
}
200+
`;
201+
}

0 commit comments

Comments
 (0)