diff --git a/src/html/component/functions-editor/editor-tile/function-tile.ts b/src/html/component/functions-editor/editor-tile/function-tile.ts index 4f93879..96b772d 100644 --- a/src/html/component/functions-editor/editor-tile/function-tile.ts +++ b/src/html/component/functions-editor/editor-tile/function-tile.ts @@ -13,7 +13,7 @@ import { EditorTile } from './editor-tile' library.add(faTrash, faMagnifyingGlass) @customElement('function-tile') -class FunctionTile extends EditorTile { +export class FunctionTile extends EditorTile { varIndex = 0 constructor () { super() diff --git a/src/html/component/functions-editor/editor-tile/variable-tile.ts b/src/html/component/functions-editor/editor-tile/variable-tile.ts index 77755c5..88bb50d 100644 --- a/src/html/component/functions-editor/editor-tile/variable-tile.ts +++ b/src/html/component/functions-editor/editor-tile/variable-tile.ts @@ -12,7 +12,7 @@ import { EditorTile } from './editor-tile' library.add(faTrash, faMagnifyingGlass) @customElement('variable-tile') -class VariableTile extends EditorTile { +export class VariableTile extends EditorTile { @property() regulations: IRegulationData[] = [] @property() variables: IVariableData[] = [] diff --git a/src/html/component/functions-editor/functions-editor.ts b/src/html/component/functions-editor/functions-editor.ts index 0c24646..7f08d7e 100644 --- a/src/html/component/functions-editor/functions-editor.ts +++ b/src/html/component/functions-editor/functions-editor.ts @@ -11,7 +11,7 @@ import { getNextEssentiality, getNextMonotonicity } from '../../util/utilities' import { dialog } from '@tauri-apps/api' @customElement('functions-editor') -class FunctionsEditor extends LitElement { +export class FunctionsEditor extends LitElement { static styles = css`${unsafeCSS(style_less)}` @property() contentData: ContentData = ContentData.create() @state() functions: IFunctionData[] = [] diff --git a/src/html/component/observations-editor/edit-observation/edit-observation.ts b/src/html/component/observations-editor/edit-observation/edit-observation.ts index fa6f049..048063d 100644 --- a/src/html/component/observations-editor/edit-observation/edit-observation.ts +++ b/src/html/component/observations-editor/edit-observation/edit-observation.ts @@ -51,7 +51,7 @@ export default class EditObservation extends LitElement {
- +
` })} diff --git a/src/html/component/regulations-editor/regulations-editor.ts b/src/html/component/regulations-editor/regulations-editor.ts index 3abe967..6f6ba4a 100644 --- a/src/html/component/regulations-editor/regulations-editor.ts +++ b/src/html/component/regulations-editor/regulations-editor.ts @@ -12,7 +12,7 @@ import { type Event as TauriEvent } from '@tauri-apps/api/event' import { ContentData, ElementType, type IRegulationData, type IVariableData } from '../../util/data-interfaces' @customElement('regulations-editor') -export default class RegulationsEditor extends LitElement { +export class RegulationsEditor extends LitElement { static styles = css`${unsafeCSS(style_less)}` dialogs: Record = {} editorElement @@ -101,14 +101,15 @@ export default class RegulationsEditor extends LitElement { } private addEdge (event: Event): void { - this.cy?.nodes().deselect() + if (this.cy === undefined) return + this.cy.nodes().deselect() this.toggleMenu(ElementType.NONE) const variableId = (event as CustomEvent).detail.id // start attribute wrongly typed - added weird typecast to avoid tslint error this.edgeHandles?.start((this.cy?.$id(variableId) as unknown as string)) // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error + // @ts-expect-error renderer exists but its missing from the *.d.ts file this.cy.renderer().hoverData.capture = true } diff --git a/src/html/component/regulations-editor/rename-dialog/rename-dialog.ts b/src/html/component/regulations-editor/rename-dialog/rename-dialog.ts index fb8d99d..b49155d 100644 --- a/src/html/component/regulations-editor/rename-dialog/rename-dialog.ts +++ b/src/html/component/regulations-editor/rename-dialog/rename-dialog.ts @@ -5,7 +5,7 @@ import { emit, type Event as TauriEvent, once } from '@tauri-apps/api/event' import { appWindow, LogicalSize } from '@tauri-apps/api/window' @customElement('rename-dialog') -class RenameDialog extends LitElement { +export class RenameDialog extends LitElement { static styles = css`${unsafeCSS(style_less)}` @query('#node-name') nameField: HTMLInputElement | undefined @query('#node-id') variableIdField: HTMLInputElement | undefined