Skip to content

Commit 449dd8f

Browse files
Merge branch 'main' into Fetch_BTComponents
2 parents 9e40a80 + 117d51c commit 449dd8f

File tree

126 files changed

+2221
-668
lines changed

Some content is hidden

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

126 files changed

+2221
-668
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
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.33.0](https://github.com/openscd/open-scd/compare/v0.32.0...v0.33.0) (2023-06-22)
6+
7+
8+
### Features
9+
10+
* **openscd:** Move progress indicator beneath plugin tabs ([#1181](https://github.com/openscd/open-scd/issues/1181)) ([a7a7081](https://github.com/openscd/open-scd/commits/a7a7081a32ee14998d0ead75ffb89ba2726631f8)), closes [#1178](https://github.com/openscd/open-scd/issues/1178)
11+
12+
13+
### Bug Fixes
14+
15+
* **editing:** use editCount property for change propagation ([#1233](https://github.com/openscd/open-scd/issues/1233)) ([548f63b](https://github.com/openscd/open-scd/commits/548f63b5b35dac6772230004e6ca7859cf3337b8))
16+
* escaped symbols in regex patterns ([#1266](https://github.com/openscd/open-scd/issues/1266)) ([de2dd0d](https://github.com/openscd/open-scd/commits/de2dd0dc2351c8feb6a70da62e43640334df571b))
17+
* goose subscription reflects state incorrectly ([#1261](https://github.com/openscd/open-scd/issues/1261)) ([4440bff](https://github.com/openscd/open-scd/commits/4440bff63c0ebe816a9fdc25f8af6da1ca6645f4))
18+
519
## [0.31.0](https://github.com/openscd/open-scd/compare/v0.30.0...v0.31.0) (2023-05-02)
620

721

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.31.0"
43+
"version": "0.33.0"
4444
}

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-scd",
3-
"version": "0.31.0",
3+
"version": "0.33.0",
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": [
@@ -17,7 +17,6 @@
1717
"module": "open-scd.js",
1818
"type": "module",
1919
"dependencies": {
20-
"@material/mwc-circular-progress-four-color": "0.22.1",
2120
"@material/mwc-dialog": "0.22.1",
2221
"@material/mwc-drawer": "0.22.1",
2322
"@material/mwc-fab": "0.22.1",

public/js/plugins.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
export const officialPlugins = [
22
{
3-
name: 'Substation',
4-
src: '/src/editors/Substation.js',
5-
icon: 'margin',
3+
name: 'IED',
4+
src: '/src/editors/IED.js',
5+
icon: 'developer_board',
66
default: true,
77
kind: 'editor',
88
},
99
{
10-
name: 'IED',
11-
src: '/src/editors/IED.js',
12-
icon: 'developer_board',
10+
name: 'Substation',
11+
src: '/src/editors/Substation.js',
12+
icon: 'margin',
1313
default: true,
1414
kind: 'editor',
1515
},
@@ -24,14 +24,14 @@ export const officialPlugins = [
2424
name: 'Subscriber Message Binding (GOOSE)',
2525
src: '/src/editors/GooseSubscriberMessageBinding.js',
2626
icon: 'link',
27-
default: true,
27+
default: false,
2828
kind: 'editor',
2929
},
3030
{
3131
name: 'Subscriber Data Binding (GOOSE)',
3232
src: '/src/editors/GooseSubscriberDataBinding.js',
3333
icon: 'link',
34-
default: true,
34+
default: false,
3535
kind: 'editor',
3636
},
3737
{
@@ -45,14 +45,14 @@ export const officialPlugins = [
4545
name: 'Subscriber Message Binding (SMV)',
4646
src: '/src/editors/SMVSubscriberMessageBinding.js',
4747
icon: 'link',
48-
default: true,
48+
default: false,
4949
kind: 'editor',
5050
},
5151
{
5252
name: 'Subscriber Data Binding (SMV)',
5353
src: '/src/editors/SMVSubscriberDataBinding.js',
5454
icon: 'link',
55-
default: true,
55+
default: false,
5656
kind: 'editor',
5757
},
5858
{
@@ -168,10 +168,10 @@ export const officialPlugins = [
168168
position: 'top',
169169
},
170170
{
171-
name: 'Validate using OCL',
171+
name: '[WIP] Validate using OCL',
172172
src: '/src/validators/CompasValidateSchema.js',
173173
icon: 'rule_folder',
174-
default: true,
174+
default: false,
175175
kind: 'validator',
176176
},
177177
{
@@ -329,7 +329,7 @@ export const officialPlugins = [
329329
},
330330
{
331331
name: 'Autogen Substation',
332-
src: '/src/editors/substation/autogen-substation/autogen-substation.js',
332+
src: '/src/compas-editors/autogen-substation.js',
333333
icon: 'playlist_add_circle',
334334
default: true,
335335
kind: 'menu',

src/Editing.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,16 +424,6 @@ export function Editing<TBase extends LitElementConstructor>(Base: TBase) {
424424

425425
if (!this.doc) return;
426426

427-
const newDoc = document.implementation.createDocument(
428-
this.doc.lookupNamespaceURI(''),
429-
this.doc.documentElement.tagName,
430-
this.doc.doctype
431-
);
432-
433-
// change the document object reference to enable reactive updates
434-
newDoc.documentElement.replaceWith(this.doc.documentElement);
435-
this.doc = newDoc;
436-
437427
await this.updateComplete;
438428
this.dispatchEvent(newValidateEvent());
439429
}

src/Hosting.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ export function Hosting<
246246
renderMenuItem(me: MenuItem | 'divider'): TemplateResult {
247247
if (me === 'divider')
248248
return html`<li divider padded role="separator"></li>`;
249+
if (me.actionItem) return html``;
249250
return html`
250251
<mwc-list-item
251252
class="${me.kind}"
@@ -294,10 +295,12 @@ export function Hosting<
294295
wrapFocus
295296
@action=${(ae: CustomEvent<ActionDetail>) => {
296297
//FIXME: dirty hack to be fixed in open-scd-core
297-
// if clause not neccassary when oscd... compenents in open-scd not list
298+
// if clause not necessary when oscd... components in open-scd not list
298299
if (ae.target instanceof List)
299300
(<MenuItem>(
300-
this.menu.filter(item => item !== 'divider')[ae.detail.index]
301+
this.menu.filter(
302+
item => item !== 'divider' && !item.actionItem
303+
)[ae.detail.index]
301304
))?.action?.(ae);
302305
}}
303306
>

src/Logging.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getPluginName(src: string): string {
6363
* A mixin adding a `history` property to any `LitElement`, in which
6464
* incoming [[`LogEvent`]]s are logged.
6565
*
66-
* For [[`EditorAction`]] entries, also sets `currentAction` to the index of
66+
* For [[`EditorAction`]] entries, also sets `editCount` to the index of
6767
* the committed action, allowing the user to go to `previousAction` with
6868
* `undo()` if `canUndo` and to go to `nextAction` with `redo()` if `canRedo`.
6969
*
@@ -79,7 +79,7 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
7979
history: LogEntry[] = [];
8080
/** Index of the last [[`EditorAction`]] applied. */
8181
@property({ type: Number })
82-
currentAction = -1;
82+
editCount = -1;
8383
@property()
8484
diagnoses = new Map<string, IssueDetail[]>();
8585
@internalProperty()
@@ -93,7 +93,7 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
9393
@query('#issue') issueUI!: Snackbar;
9494

9595
get canUndo(): boolean {
96-
return this.currentAction >= 0;
96+
return this.editCount >= 0;
9797
}
9898
get canRedo(): boolean {
9999
return this.nextAction >= 0;
@@ -102,15 +102,15 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
102102
get previousAction(): number {
103103
if (!this.canUndo) return -1;
104104
return this.history
105-
.slice(0, this.currentAction)
105+
.slice(0, this.editCount)
106106
.map(entry => (entry.kind == 'action' ? true : false))
107107
.lastIndexOf(true);
108108
}
109109
get nextAction(): number {
110110
let index = this.history
111-
.slice(this.currentAction + 1)
111+
.slice(this.editCount + 1)
112112
.findIndex(entry => entry.kind == 'action');
113-
if (index >= 0) index += this.currentAction + 1;
113+
if (index >= 0) index += this.editCount + 1;
114114
return index;
115115
}
116116

@@ -129,25 +129,25 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
129129
if (!this.canUndo) return false;
130130
this.dispatchEvent(
131131
newActionEvent(
132-
invert((<CommitEntry>this.history[this.currentAction]).action)
132+
invert((<CommitEntry>this.history[this.editCount]).action)
133133
)
134134
);
135-
this.currentAction = this.previousAction;
135+
this.editCount = this.previousAction;
136136
return true;
137137
}
138138
redo(): boolean {
139139
if (!this.canRedo) return false;
140140
this.dispatchEvent(
141141
newActionEvent((<CommitEntry>this.history[this.nextAction]).action)
142142
);
143-
this.currentAction = this.nextAction;
143+
this.editCount = this.nextAction;
144144
return true;
145145
}
146146

147147
private onLog(le: LogEvent): void {
148148
if (le.detail.kind === 'reset') {
149149
this.history = [];
150-
this.currentAction = -1;
150+
this.editCount = -1;
151151
return;
152152
}
153153

@@ -160,7 +160,7 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
160160
if (entry.action.derived) return;
161161
entry.action.derived = true;
162162
if (this.nextAction !== -1) this.history.splice(this.nextAction);
163-
this.currentAction = this.history.length;
163+
this.editCount = this.history.length;
164164
}
165165

166166
this.history.push(entry);
@@ -210,7 +210,7 @@ export function Logging<TBase extends LitElementConstructor>(Base: TBase) {
210210
class="${entry.kind}"
211211
graphic="icon"
212212
?twoline=${!!entry.message}
213-
?activated=${this.currentAction == history.length - index - 1}
213+
?activated=${this.editCount == history.length - index - 1}
214214
>
215215
<span>
216216
<!-- FIXME: replace tt with mwc-chip asap -->

0 commit comments

Comments
 (0)