Skip to content

Commit

Permalink
Fixes to global imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorthiz committed Oct 13, 2024
1 parent 2ff1518 commit 2296bd7
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@parcel/transformer-inline-string": "^2.12.0",
"@parcel/transformer-vue": "^2.12.0",
"@types/dateformat": "^5.0.2",
"@types/js-yaml": "^4.0.9",
"assert": "^2.1.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/Components/UnsupportedBrowser.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import * as bowser from "bowser";
import bowser from "bowser";
import {ref} from "vue";
const localStorageRecord = localStorage.getItem("hideUnsupported") === "true";
Expand Down
8 changes: 4 additions & 4 deletions src/DataManipulation/CompilationModule/YamlParser.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as jsyaml from "js-yaml";
import {YamlFileInfo} from "./JsImporter";
import {load, CORE_SCHEMA, LoadOptions} from "js-yaml";

export class YamlParser {
public static parseIKsyFile(yamlInfo: YamlFileInfo): KsySchema.IKsyFile {
const options = {
schema: jsyaml.CORE_SCHEMA,
const options: LoadOptions = {
schema: CORE_SCHEMA,
filename: yamlInfo.filePath,
};
return jsyaml.load(yamlInfo.fileContent, options);
return load(yamlInfo.fileContent, options) as KsySchema.IKsyFile;
}
}
2 changes: 1 addition & 1 deletion src/v1/GoldenLayout/AceEditorComponent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import GoldenLayout from "golden-layout";
import * as Ace from "ace-builds";
import Ace from "ace-builds";
import "ace-builds/esm-resolver";
import "ace-builds/src-noconflict/theme-monokai";
import {LanguageProvider} from "ace-linters";
Expand Down
7 changes: 3 additions & 4 deletions src/v1/GoldenLayout/GoldenLayoutUI.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {GoldenLayoutWrapper} from "./GoldenLayoutWrapper";
import {GoldenLayoutUIConfig} from "./GoldenLayoutUIConfig";

// GoldenLayout imports, one is a types import, the second is a module!
import GoldenLayout, * as GoldenLayoutModule from "golden-layout";
import {Ace} from "ace-builds";
import GoldenLayout from "golden-layout";

export class GoldenLayoutUI {
layoutManager: GoldenLayoutWrapper<GoldenLayoutUI>;
Expand All @@ -13,7 +12,7 @@ export class GoldenLayoutUI {
errorWindow: GoldenLayout.Container;

constructor() {
const goldenLayout = new GoldenLayoutModule(GoldenLayoutUIConfig);
const goldenLayout = new GoldenLayout(GoldenLayoutUIConfig);
this.layoutManager = new GoldenLayoutWrapper(this, goldenLayout);
this.layoutManager.addAceCodeEditorTab("ksyEditor", {lang: "yaml"});
this.layoutManager.addAceCodeEditorTab("genCodeViewer", {lang: "javascript", isReadOnly: true});
Expand All @@ -22,13 +21,13 @@ export class GoldenLayoutUI {
this.layoutManager.addExistingDiv("hex-viewer");
this.layoutManager.addExistingDiv("parsedDataTree");
this.layoutManager.addExistingDiv("fileTreeNew");
this.layoutManager.addExistingDiv("converter-panel");

this.layoutManager.addComponent("errorWindow", cont => {
cont.getElement().append($("<div></div>"));
});

this.layoutManager.addExistingDiv("infoPanel");
this.layoutManager.addComponent("converterPanel", cont => cont.getElement().append($("#converter-panel")));

this.layoutManager.goldenLayout.init();
}
Expand Down
2 changes: 1 addition & 1 deletion src/v1/GoldenLayout/GoldenLayoutUIConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const GoldenLayoutUIConfig: GoldenLayout.Config = {
isClosable: false,
width: 40
},
{type: "component", componentName: "converterPanel", title: "converter", isClosable: false},
{type: "component", componentName: "converter-panel", title: "converter", isClosable: false},
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/v1/utils/LocalForageWrapper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {IFsItem} from "../FileSystems/FileSystemsTypes";
import * as localforage from "localforage";
import localforage from "localforage";

export class LocalForageWrapper {
public static getFsItem(ksyFsItemName: string): Promise<IFsItem> {
Expand Down

0 comments on commit 2296bd7

Please sign in to comment.