Skip to content

Commit

Permalink
Deploy preview for PR 1581 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
clepski committed Oct 24, 2024
1 parent 290af29 commit 79820ac
Show file tree
Hide file tree
Showing 721 changed files with 1,927 additions and 1,855 deletions.
34 changes: 29 additions & 5 deletions pr-preview/pr-1581/openscd/dist/addons/Layout.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-preview/pr-1581/openscd/dist/addons/Layout.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pr-preview/pr-1581/openscd/dist/open-scd.js.map

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions pr-preview/pr-1581/openscd/dist/plugins.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-preview/pr-1581/openscd/dist/plugins.js.map

Large diffs are not rendered by default.

30 changes: 25 additions & 5 deletions pr-preview/pr-1581/openscd/src/addons/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,28 @@ export let OscdLayout = class extends LitElement {
}
}
renderContent() {
if (!this.doc)
const hasActiveDoc = Boolean(this.doc);
const activeEditors = this.editors.filter((editor) => {
const doesNotRequireDoc = editor.requireDoc === false;
return doesNotRequireDoc || hasActiveDoc;
}).map(this.renderEditorTab);
const hasActiveEditors = activeEditors.length > 0;
if (!hasActiveEditors) {
return html``;
}
return html`
<mwc-tab-bar @MDCTabBar:activated=${(e) => this.activeTab = e.detail.index}>
${this.editors.map(this.renderEditorTab)}
${activeEditors}
</mwc-tab-bar>
${renderEditorContent(this.editors, this.activeTab)}
${renderEditorContent(this.editors, this.activeTab, this.doc)}
`;
function renderEditorContent(editors, activeTab) {
const content = editors[activeTab]?.content;
function renderEditorContent(editors, activeTab, doc) {
const editor = editors[activeTab];
const requireDoc = editor?.requireDoc;
if (requireDoc && !doc) {
return html``;
}
const content = editor?.content;
if (!content) {
return html``;
}
Expand Down Expand Up @@ -458,6 +470,14 @@ export let OscdLayout = class extends LitElement {
class="${plugin.official ? "official" : "external"}"
value="${plugin.src}"
?selected=${plugin.installed}
@request-selected=${(e) => {
if (e.detail.source !== "interaction") {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
return false;
}
}}
hasMeta
left
>
Expand Down
42 changes: 28 additions & 14 deletions pr-preview/pr-1581/openscd/src/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,98 +14,112 @@ export const officialPlugins = [
src: generatePluginPath("plugins/src/editors/IED.js"),
icon: "developer_board",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Substation",
src: generatePluginPath("plugins/src/editors/Substation.js"),
icon: "margin",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Single Line Diagram",
src: generatePluginPath("plugins/src/editors/SingleLineDiagram.js"),
icon: "edit",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Message Binding (GOOSE)",
src: generatePluginPath("plugins/src/editors/GooseSubscriberMessageBinding.js"),
icon: "link",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Data Binding (GOOSE)",
src: generatePluginPath("plugins/src/editors/GooseSubscriberDataBinding.js"),
icon: "link",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Later Binding (GOOSE)",
src: generatePluginPath("plugins/src/editors/GooseSubscriberLaterBinding.js"),
icon: "link",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Message Binding (SMV)",
src: generatePluginPath("plugins/src/editors/SMVSubscriberMessageBinding.js"),
icon: "link",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Data Binding (SMV)",
src: generatePluginPath("plugins/src/editors/SMVSubscriberDataBinding.js"),
icon: "link",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Subscriber Later Binding (SMV)",
src: generatePluginPath("plugins/src/editors/SMVSubscriberLaterBinding.js"),
icon: "link",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Communication",
src: generatePluginPath("plugins/src/editors/Communication.js"),
icon: "settings_ethernet",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "104",
src: generatePluginPath("plugins/src/editors/Protocol104.js"),
icon: "settings_ethernet",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Templates",
src: generatePluginPath("plugins/src/editors/Templates.js"),
icon: "copy_all",
default: true,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Publisher",
src: generatePluginPath("plugins/src/editors/Publisher.js"),
icon: "publish",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Cleanup",
src: generatePluginPath("plugins/src/editors/Cleanup.js"),
icon: "cleaning_services",
default: false,
kind: "editor"
kind: "editor",
requireDoc: true
},
{
name: "Open project",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">default</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/a36c307/packages/plugins/src/editors/Cleanup.ts#L12">packages/plugins/src/editors/Cleanup.ts:12</a></li></ul></aside>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/93aab29/packages/plugins/src/editors/Cleanup.ts#L12">packages/plugins/src/editors/Cleanup.ts:12</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -885,7 +885,7 @@ <h3 class="tsd-anchor-link"><span>doc</span><a href="#doc" aria-label="Permalink
<div class="tsd-comment tsd-typography"><p>The document being edited as provided to plugins by [[<code>OpenSCD</code>]].</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/a36c307/packages/plugins/src/editors/Cleanup.ts#L15">packages/plugins/src/editors/Cleanup.ts:15</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/93aab29/packages/plugins/src/editors/Cleanup.ts#L15">packages/plugins/src/editors/Cleanup.ts:15</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="draggable" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>draggable</span><a href="#draggable" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">draggable<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources">
Expand All @@ -896,7 +896,7 @@ <h3 class="tsd-anchor-link"><span>draggable</span><a href="#draggable" aria-labe
<h3 class="tsd-anchor-link"><span>edit<wbr/>Count</span><a href="#editCount" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">edit<wbr/>Count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = -1</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/a36c307/packages/plugins/src/editors/Cleanup.ts#L17">packages/plugins/src/editors/Cleanup.ts:17</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/93aab29/packages/plugins/src/editors/Cleanup.ts#L17">packages/plugins/src/editors/Cleanup.ts:17</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="enterKeyHint" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>enter<wbr/>Key<wbr/>Hint</span><a href="#enterKeyHint" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">enter<wbr/>Key<wbr/>Hint<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
Expand Down Expand Up @@ -2095,7 +2095,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <s
<div class="tsd-signature">styles<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CSSResult</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
<p>Overrides LitElement.styles</p>
<ul>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/a36c307/packages/plugins/src/editors/Cleanup.ts#L29">packages/plugins/src/editors/Cleanup.ts:29</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/93aab29/packages/plugins/src/editors/Cleanup.ts#L29">packages/plugins/src/editors/Cleanup.ts:29</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class tsd-is-private tsd-is-inherited tsd-is-external"><a id="_hasRequestedUpdate" class="tsd-anchor"></a>
Expand Down Expand Up @@ -3384,7 +3384,7 @@ <h3 class="tsd-anchor-link"><span>render</span><a href="#render-1" aria-label="P
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">TemplateResult</span></h4><aside class="tsd-sources">
<p>Overrides LitElement.render</p>
<ul>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/a36c307/packages/plugins/src/editors/Cleanup.ts#L19">packages/plugins/src/editors/Cleanup.ts:19</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/openscd/open-scd/blob/93aab29/packages/plugins/src/editors/Cleanup.ts#L19">packages/plugins/src/editors/Cleanup.ts:19</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="replaceChild" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>replace<wbr/>Child</span><a href="#replaceChild" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external">
Expand Down
Loading

0 comments on commit 79820ac

Please sign in to comment.