Skip to content

Commit 0487707

Browse files
committed
wip
1 parent 8d76fda commit 0487707

File tree

344 files changed

+3314
-1453
lines changed

Some content is hidden

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

344 files changed

+3314
-1453
lines changed

package-lock.json

Lines changed: 1108 additions & 17 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"@commitlint/config-conventional": "^19.8.0",
2121
"husky": "^9.1.7",
2222
"lerna": "^7.1.4",
23-
"nx": "18.3.4"
23+
"nx": "18.3.4",
24+
"shiki": "^3.15.0"
2425
},
2526
"optionalDependencies": {
2627
"@nx/nx-linux-x64-gnu": "18.3.4"

packages/compas-open-scd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"type": "module",
2020
"dependencies": {
2121
"@compas-oscd/core": "^0.1.7",
22+
"@compas-oscd/open-scd": "^0.34.30",
2223
"@compas-oscd/xml": "^0.0.1",
2324
"@material/mwc-dialog": "0.22.1",
2425
"@material/mwc-drawer": "0.22.1",
@@ -39,7 +40,6 @@
3940
"@material/mwc-textfield": "0.22.1",
4041
"@material/mwc-top-app-bar-fixed": "0.22.1",
4142
"@openscd/addons": "*",
42-
"@openscd/open-scd": "*",
4343
"@openscd/plugins": "*",
4444
"ace-custom-element": "^1.6.5",
4545
"csv-stringify": "^6.2.0",
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,49 @@
1-
export default ({
1+
export default {
22
plugins: ['@snowpack/plugin-typescript'],
3-
packageOptions : {
3+
packageOptions: {
44
external: [
55
'@web/dev-server-core',
66
'@web/dev-server-esbuild',
77
'esbuild',
88
'crypto',
99
'@openscd/open-scd-core',
1010
'@openscd/oscd-scl',
11+
'@compas-oscd/core',
12+
'@compas-oscd/open-scd',
1113
],
1214
},
1315
exclude: [
14-
"**/node_modules/**/*",
15-
".editorconfig",
16-
".eslintrc.cjs",
17-
".travis.yml",
18-
"**/karma.conf.cjs",
19-
"**/Dockerfile",
20-
"**/package*",
21-
"**/tsconfig.json",
22-
"**/workbox-config.cjs",
23-
"**/*.@(spec|test).@(js|mjs)",
24-
"**/__snapshots__/**/*",
25-
"**/coverage/**/*",
26-
"**/out-tsc/**/*",
27-
"**/test/**/*",
28-
".gitignore",
29-
"**/.git/**",
30-
"**/.github/**",
31-
"**/.idea/**",
32-
"**/web-test-runner.config.mjs",
33-
"**/oscd-plugins/auto-doc/**/*",
16+
'**/node_modules/**/*',
17+
'.editorconfig',
18+
'.eslintrc.cjs',
19+
'.travis.yml',
20+
'**/karma.conf.cjs',
21+
'**/Dockerfile',
22+
'**/package*',
23+
'**/tsconfig.json',
24+
'**/workbox-config.cjs',
25+
'**/*.@(spec|test).@(js|mjs)',
26+
'**/__snapshots__/**/*',
27+
'**/coverage/**/*',
28+
'**/out-tsc/**/*',
29+
'**/test/**/*',
30+
'.gitignore',
31+
'**/.git/**',
32+
'**/.github/**',
33+
'**/.idea/**',
34+
'**/web-test-runner.config.mjs',
35+
'**/oscd-plugins/auto-doc/**/*',
3436
],
35-
workspaceRoot: "../../",
37+
workspaceRoot: '../../',
3638
mount: {
37-
'../openscd/': '/openscd/',
3839
'../plugins/': '/plugins/',
3940
'../external-plugins/': '/external-plugins/',
40-
"./": "/",
41+
'./': '/',
4142
},
4243
alias: {
43-
'@openscd/open-scd': '../openscd/',
4444
'@openscd/plugins': '../plugins/',
4545
},
4646
buildOptions: {
4747
htmlFragments: true,
48-
}
49-
});
50-
48+
},
49+
};

packages/compas-open-scd/src/addons/CompasHistory.ts

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
html,
3-
TemplateResult,
4-
customElement,
5-
} from 'lit-element';
1+
import { html, TemplateResult, customElement } from 'lit-element';
62

73
import '@material/mwc-button';
84
import '@material/mwc-dialog';
@@ -13,15 +9,16 @@ import '@material/mwc-list';
139
import '@material/mwc-list/mwc-list-item';
1410
import '@material/mwc-snackbar';
1511

16-
import '@openscd/open-scd/src/filtered-list.js';
12+
import '@compas-oscd/open-scd/filtered-list.js';
1713

18-
import {
19-
IssueDetail,
20-
} from '@compas-oscd/core/foundation/deprecated/history.js';
14+
import { IssueDetail } from '@compas-oscd/core/foundation/deprecated/history.js';
2115

22-
import { HistoryUIDetail, OscdHistory } from '@openscd/open-scd/src/addons/History.js';
16+
import {
17+
HistoryUIDetail,
18+
OscdHistory,
19+
} from '@compas-oscd/open-scd/addons/History.js';
2320
import { wizards } from '@openscd/plugins/src/wizards/wizard-library';
24-
import { newWizardEvent, SCLTag } from '@openscd/open-scd/src/foundation';
21+
import { newWizardEvent, SCLTag } from '@compas-oscd/open-scd/foundation';
2522
import { nothing } from 'lit-html';
2623

2724
export enum HistoryUIKind {
@@ -100,16 +97,15 @@ export class CompasHistory extends OscdHistory {
10097
<span> ${issue.title}</span>
10198
<span slot="secondary">${issue.message}</span>
10299
${this.hasEditWizard(issue.element)
103-
? html` <span slot="meta">
104-
<mwc-icon-button
105-
icon="edit"
106-
@click=${() => this.openEditWizard(issue.element)}
107-
></mwc-icon-button>
108-
</span>`
109-
: nothing}
100+
? html` <span slot="meta">
101+
<mwc-icon-button
102+
icon="edit"
103+
@click=${() => this.openEditWizard(issue.element)}
104+
></mwc-icon-button>
105+
</span>`
106+
: nothing}
110107
</mwc-list-item>
111-
</abbr
112-
>`;
108+
</abbr>`;
113109
}
114110
}
115111

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
import {
2-
customElement,
3-
html,
4-
property,
5-
TemplateResult,
6-
} from 'lit-element';
1+
import { customElement, html, property, TemplateResult } from 'lit-element';
72
import { get } from 'lit-translate';
83

94
import type { UserInfoEvent } from '../compas/foundation';
105

11-
import { OscdLayout } from '@openscd/open-scd/src/addons/Layout.js';
12-
6+
import { OscdLayout } from '@compas-oscd/open-scd/addons/Layout.js';
137

148
@customElement('compas-layout')
159
export class CompasLayout extends OscdLayout {
@@ -29,16 +23,16 @@ export class CompasLayout extends OscdLayout {
2923
protected renderActionItems(): TemplateResult {
3024
return html`
3125
${this.username != undefined
32-
? html`<span
33-
id="userField"
34-
slot="actionItems"
35-
style="font-family:Roboto"
36-
>${get('userinfo.loggedInAs', {
37-
name: this.username,
38-
})}</span
39-
>`
40-
: ``}
41-
${this.menu.map(this.renderActionItem)}
26+
? html`<span
27+
id="userField"
28+
slot="actionItems"
29+
style="font-family:Roboto"
30+
>${get('userinfo.loggedInAs', {
31+
name: this.username,
32+
})}</span
33+
>`
34+
: ``}
35+
${this.menu.map(this.renderActionItem)}
4236
`;
4337
}
4438
}

packages/compas-open-scd/src/compas-editors/CompasVersions.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ import '@material/mwc-list/mwc-check-list-item';
2121
import { Dialog } from '@material/mwc-dialog';
2222
import { MultiSelectedEvent } from '@material/mwc-list/mwc-list-foundation';
2323

24-
import '@openscd/open-scd/src/plain-compare-list.js';
24+
import '@compas-oscd/open-scd/plain-compare-list.js';
2525

26-
import { newLogEvent } from "@compas-oscd/core/foundation/deprecated/history.js";
27-
import { newOpenDocEvent } from "@compas-oscd/core/foundation/deprecated/open-event.js";
26+
import { newLogEvent } from '@compas-oscd/core/foundation/deprecated/history.js';
27+
import { newOpenDocEvent } from '@compas-oscd/core/foundation/deprecated/open-event.js';
2828

29-
import {
30-
newWizardEvent,
31-
Wizard,
32-
} from '@openscd/open-scd/src/foundation.js';
29+
import { newWizardEvent, Wizard } from '@compas-oscd/open-scd/foundation.js';
3330

3431
import {
3532
CompasSclDataService,
@@ -43,7 +40,7 @@ import {
4340
} from '../compas/foundation.js';
4441
import { addVersionToCompasWizard } from '../compas/CompasUploadVersion.js';
4542
import { getElementByName, styles } from './foundation.js';
46-
import { editCompasSCLWizard } from "../compas-wizards/scl.js";
43+
import { editCompasSCLWizard } from '../compas-wizards/scl.js';
4744

4845
/** An editor [[`plugin`]] for selecting the `Substation` section. */
4946
export default class CompasVersionsPlugin extends LitElement {

packages/compas-open-scd/src/compas-editors/Sitipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { css, html, LitElement, property, TemplateResult } from 'lit-element';
22
import { translate } from 'lit-translate';
33

44
import './sitipe/sitipe-substation.js';
5-
import { isPublic } from '@openscd/open-scd/src/foundation.js';
5+
import { isPublic } from '@compas-oscd/open-scd/foundation.js';
66

77
/** An editor [[`plugin`]] for Sitipe based configuration */
88
export default class SitipePlugin extends LitElement {

packages/compas-open-scd/src/compas-editors/sitipe/sitipe-bay.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ import '@material/mwc-icon-button';
1717

1818
import { IconButton } from '@material/mwc-icon-button';
1919

20-
import { isPublic } from '@openscd/open-scd/src/foundation.js';
20+
import { isPublic } from '@compas-oscd/open-scd/foundation.js';
2121
import { newActionEvent } from '@compas-oscd/core/foundation/deprecated/editor.js';
2222
import { createElement } from '@compas-oscd/xml';
2323
import { newLogEvent } from '@compas-oscd/core/foundation/deprecated/history.js';
2424

25-
import { ComplexAction, SimpleAction } from "@compas-oscd/core/foundation/deprecated/editor.js";
25+
import {
26+
ComplexAction,
27+
SimpleAction,
28+
} from '@compas-oscd/core/foundation/deprecated/editor.js';
2629

27-
import '@openscd/open-scd/src/action-pane.js';
28-
import '@openscd/open-scd/src/action-icon.js';
30+
import '@compas-oscd/open-scd/action-pane.js';
31+
import '@compas-oscd/open-scd/action-icon.js';
2932

3033
import {
3134
SIEMENS_SITIPE_IED_REF,

packages/compas-open-scd/src/compas-editors/sitipe/sitipe-substation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import '@material/mwc-list';
1313
import '@material/mwc-icon';
1414
import '@material/mwc-icon-button';
1515

16-
import '@openscd/open-scd/src/action-pane.js';
17-
import '@openscd/open-scd/src/action-icon.js';
16+
import '@compas-oscd/open-scd/action-pane.js';
17+
import '@compas-oscd/open-scd/action-icon.js';
1818

1919
import './sitipe-bay.js';
2020

0 commit comments

Comments
 (0)