Working mjs building

This commit is contained in:
Adsooi 2024-09-24 05:23:12 +02:00
parent 6a1f01ba1f
commit 937cb07d0b
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
30 changed files with 832 additions and 44 deletions

View file

@ -23,7 +23,7 @@ import QtQuick.Layouts 1.12
import QtQuick
// Auto loading all modules.
import "js/autoload.mjs" as ModulesAutoload
import "js/index.mjs" as ModulesAutoload
import eu.ad5001.LogarithmPlotter.History 1.0
import eu.ad5001.LogarithmPlotter.ObjectLists 1.0

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import EditedProperty from "editproperty.mjs"
import EditedProperty from "./editproperty.mjs"
import Objects from "../module/objects.mjs"
export default class ColorChanged extends EditedProperty {

View file

@ -17,7 +17,7 @@
*/
import Objects from "../module/objects.mjs"
import { Action } from "common.mjs"
import { Action } from "./common.mjs"
export default class CreateNewObject extends Action {
// Action used for the creation of an object

View file

@ -17,7 +17,7 @@
*/
import Objects from "../module/objects.mjs"
import CreateNewObject from "create.mjs"
import CreateNewObject from "./create.mjs"
export default class DeleteObject extends CreateNewObject {

View file

@ -19,7 +19,7 @@
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import * as MathLib from "../math/index.mjs"
import { Action } from "common.mjs"
import { Action } from "./common.mjs"
import { DrawableObject } from "../objs/common.mjs"
export default class EditedProperty extends Action {

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import EditedProperty from "editproperty.mjs"
import EditedProperty from "./editproperty.mjs"
import Objects from "../module/objects.mjs"

View file

@ -20,7 +20,7 @@ import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import * as MathLib from "../math/index.mjs"
import { escapeHTML } from "../utils.mjs"
import { Action } from "common.mjs"
import { Action } from "./common.mjs"
import { DrawableObject } from "../objs/common.mjs"
export default class EditedPosition extends Action {

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import EditedProperty from "editproperty.mjs"
import EditedProperty from "./editproperty.mjs"
import Objects from "../module/objects.mjs"

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Expression, executeExpression } from "expression.mjs"
import { Expression, executeExpression } from "./expression.mjs"
/**
* Main abstract domain class

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import * as Expr from "expression.mjs"
import * as Expr from "./expression.mjs"
import * as Utils from "../utils.mjs"
import Latex from "../module/latex.mjs"
import Objects from "../module/objects.mjs"

View file

@ -38,7 +38,6 @@ export class Interface {
const toCheckName = classToCheck.constructor.name
for(const [property, value] of Object.entries(properties))
if(property !== "implement") {
console.log(classToCheck[property], value)
if(!classToCheck.hasOwnProperty(property))
// Check if the property exist
throw new Error(`Property '${property}' (${typeof value}) is present in interface ${interfaceName}, but not in implementation ${toCheckName}.`)
@ -127,4 +126,4 @@ export class HistoryInterface extends Interface {
this.unserialize = FUNCTION
this.serialize = FUNCTION
}
}
}

View file

@ -17,17 +17,17 @@
*/
import Objects from "../module/objects.mjs"
import { DrawableObject } from "common.mjs"
import Point from "point.mjs"
import Text from "text.mjs"
import Function from "function.mjs"
import BodeMagnitude from "bodemagnitude.mjs"
import BodePhase from "bodephase.mjs"
import BodeMagnitudeSum from "bodemagnitudesum.mjs"
import BodePhaseSum from "bodephasesum.mjs"
import XCursor from "xcursor.mjs"
import Sequence from "sequence.mjs"
import DistributionFunction from "distribution.mjs"
import { DrawableObject } from "./common.mjs"
import Point from "./point.mjs"
import Text from "./text.mjs"
import Function from "./function.mjs"
import BodeMagnitude from "./bodemagnitude.mjs"
import BodePhase from "./bodephase.mjs"
import BodeMagnitudeSum from "./bodemagnitudesum.mjs"
import BodePhaseSum from "./bodephasesum.mjs"
import XCursor from "./xcursor.mjs"
import Sequence from "./sequence.mjs"
import DistributionFunction from "./distribution.mjs"
/**
* Registers the object obj in the object list.

View file

@ -23,8 +23,8 @@ import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import History from "../module/history.mjs"
import { ExecutableObject } from "common.mjs"
import Function from "function.mjs"
import { ExecutableObject } from "./common.mjs"
import Function from "./function.mjs"
export default class BodeMagnitude extends ExecutableObject {
static type(){return 'Gain Bode'}

View file

@ -21,8 +21,8 @@ import * as P from "../parameters.mjs"
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import { ExecutableObject } from "common.mjs"
import Function from "function.mjs"
import { ExecutableObject } from "./common.mjs"
import Function from "./function.mjs"
export default class BodeMagnitudeSum extends ExecutableObject {

View file

@ -23,7 +23,7 @@ import Objects from "../module/objects.mjs"
import History from "../module/history.mjs"
import Latex from "../module/latex.mjs"
import { ExecutableObject } from "common.mjs"
import { ExecutableObject } from "./common.mjs"
export default class BodePhase extends ExecutableObject {

View file

@ -21,7 +21,7 @@ import * as P from "../parameters.mjs"
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import { ExecutableObject } from "common.mjs"
import { ExecutableObject } from "./common.mjs"
export default class BodePhaseSum extends ExecutableObject {
static type(){return 'Somme phases Bode'}

View file

@ -20,7 +20,7 @@ import * as P from "../parameters.mjs"
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import { ExecutableObject } from "common.mjs"
import { ExecutableObject } from "./common.mjs"
export default class DistributionFunction extends ExecutableObject {

View file

@ -18,7 +18,7 @@
import { textsub } from "../utils.mjs"
import Objects from "../module/objects.mjs"
import { ExecutableObject } from "common.mjs"
import { ExecutableObject } from "./common.mjs"
import { parseDomain, Expression, SpecialDomain } from "../math/index.mjs"
import * as P from "../parameters.mjs"
import Latex from "../module/latex.mjs"

View file

@ -21,7 +21,7 @@ import * as P from "../parameters.mjs"
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import { DrawableObject } from "common.mjs"
import { DrawableObject } from "./common.mjs"
export default class Point extends DrawableObject {

View file

@ -21,8 +21,8 @@ import * as P from "../parameters.mjs"
import Latex from "../module/latex.mjs"
import Objects from "../module/objects.mjs"
import { ExecutableObject } from "common.mjs"
import Function from "function.mjs"
import { ExecutableObject } from "./common.mjs"
import Function from "./function.mjs"
export default class Sequence extends ExecutableObject {

View file

@ -21,7 +21,7 @@ import * as P from "../parameters.mjs"
import Objects from "../module/objects.mjs"
import Latex from "../module/latex.mjs"
import { DrawableObject } from "common.mjs"
import { DrawableObject } from "./common.mjs"
export default class Text extends DrawableObject {

View file

@ -21,7 +21,7 @@ import * as P from "../parameters.mjs"
import Latex from "../module/latex.mjs"
import Objects from "../module/objects.mjs"
import { DrawableObject } from "common.mjs"
import { DrawableObject } from "./common.mjs"
export default class XCursor extends DrawableObject {

View file

@ -18,7 +18,7 @@
import * as Reference from "reference.mjs"
import * as T from "./tokenizer.mjs"
import InputExpression from "common.mjs"
import InputExpression from "./common.mjs"
export const Input = InputExpression
export const TokenType = T.TokenType

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {BoolSetting, ExpressionSetting, NumberSetting, StringSetting} from "common.mjs"
import {BoolSetting, ExpressionSetting, NumberSetting, StringSetting} from "./common.mjs"
const XZOOM = new NumberSetting(

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {BoolSetting, EnumIntSetting} from "common.mjs"
import {BoolSetting, EnumIntSetting} from "./common.mjs"
const AUTOCLOSE_FORMULA = new BoolSetting(
qsTranslate("expression", "Automatically close parenthesises and brackets"),

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {BoolSetting} from "common.mjs"
import {BoolSetting} from "./common.mjs"
import Canvas from "../module/canvas.mjs"
import LatexAPI from "../module/latex.mjs"