Moving Modules to separate directory
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a4e9ad7f5a
commit
c66d08b352
33 changed files with 77 additions and 79 deletions
|
@ -17,11 +17,11 @@
|
|||
*/
|
||||
|
||||
// Loading modules in order
|
||||
import * as Objects from "./objects.mjs"
|
||||
import * as ExprParser from "./lib/expr-eval/integration.mjs"
|
||||
import * as Objects from "./module/objects.mjs"
|
||||
import * as ExprParser from "./module/expreval.mjs"
|
||||
import * as ObjsAutoload from "./objs/autoload.mjs"
|
||||
import * as Latex from "./math/latex.mjs"
|
||||
import * as HistoryCommon from "./history/common.mjs"
|
||||
import * as CanvasAPI from "./canvas.mjs"
|
||||
import * as IOAPI from "./io.mjs"
|
||||
import * as PreferencesAPI from "./preferences.mjs"
|
||||
import * as Latex from "./module/latex.mjs"
|
||||
import * as History from "./module/history.mjs"
|
||||
import * as CanvasAPI from "./module/canvas.mjs"
|
||||
import * as IOAPI from "./module/io.mjs"
|
||||
import * as PreferencesAPI from "./module/preferences.mjs"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import EditedProperty from "editproperty.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
export default class ColorChanged extends EditedProperty {
|
||||
// Action used everytime when an object's color is changed
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import History from "./module.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import History from "../module/history.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
export class Action {
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import { Action } from "common.mjs"
|
||||
|
||||
export default class CreateNewObject extends Action {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import CreateNewObject from "create.mjs"
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import * as MathLib from "../mathlib.mjs"
|
||||
import { Action } from "common.mjs"
|
||||
import { DrawableObject } from "../objs/common.mjs"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import EditedProperty from "editproperty.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
|
||||
export default class NameChanged extends EditedProperty {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import * as MathLib from "../mathlib.mjs"
|
||||
import { escapeHTML } from "../utils.mjs"
|
||||
import { Action } from "common.mjs"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import EditedProperty from "editproperty.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
|
||||
export default class EditedVisibility extends EditedProperty {
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
*/
|
||||
|
||||
|
||||
import Latex from "latex.mjs"
|
||||
import * as Utils from "../utils.mjs"
|
||||
import ExprParser from "../lib/expr-eval/integration.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import ExprParser from "../module/expreval.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
/**
|
||||
* Represents any kind of x-based or non variable based expression.
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
import * as Expr from "expression.mjs"
|
||||
import * as Utils from "../utils.mjs"
|
||||
import Latex from "./latex.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import ExprParser from "../lib/expr-eval/integration.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import ExprParser from "../module/expreval.mjs"
|
||||
|
||||
/**
|
||||
* Represents mathematical object for sequences.
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from "./modules.mjs"
|
||||
import { textsup } from "./utils.mjs"
|
||||
import { Expression } from "./mathlib.mjs"
|
||||
import Latex from "./math/latex.mjs"
|
||||
import { Module } from "./common.mjs"
|
||||
import { textsup } from "../utils.mjs"
|
||||
import { Expression } from "../mathlib.mjs"
|
||||
import Latex from "./latex.mjs"
|
||||
import Objects from "./objects.mjs"
|
||||
import History from "./history/module.mjs"
|
||||
import History from "./history.mjs"
|
||||
|
||||
|
||||
class CanvasAPI extends Module {
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from "../../modules.mjs"
|
||||
import { Parser } from "./parser.mjs"
|
||||
import { Module } from "./common.mjs"
|
||||
import { Parser } from "../lib/expr-eval/parser.mjs"
|
||||
|
||||
const evalVariables = {
|
||||
// Variables not provided by expr-eval.js, needs to be provided manually
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from "../modules.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import { Module } from "./common.mjs"
|
||||
import Latex from "./latex.mjs"
|
||||
|
||||
|
||||
class HistoryAPI extends Module {
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from "./modules.mjs"
|
||||
import { Module } from "./common.mjs"
|
||||
import Objects from "./objects.mjs"
|
||||
import History from "./history/module.mjs"
|
||||
import History from "./history.mjs"
|
||||
import Canvas from "./canvas.mjs"
|
||||
|
||||
class IOAPI extends Module {
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from "../modules.mjs"
|
||||
import { Module } from "./common.mjs"
|
||||
import * as Instruction from "../lib/expr-eval/instruction.mjs"
|
||||
import { escapeValue } from "../lib/expr-eval/expression.mjs"
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Module } from './modules.mjs'
|
||||
import { textsub } from './utils.mjs'
|
||||
import { Module } from './common.mjs'
|
||||
import { textsub } from '../utils.mjs'
|
||||
|
||||
class ObjectsAPI extends Module {
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Module} from "modules.mjs"
|
||||
import General from "preferences/general.mjs"
|
||||
import Editor from "preferences/expression.mjs"
|
||||
import DefaultGraph from "preferences/default.mjs"
|
||||
import {Module} from "./common.mjs"
|
||||
import General from "../preferences/general.mjs"
|
||||
import Editor from "../preferences/expression.mjs"
|
||||
import DefaultGraph from "../preferences/default.mjs"
|
||||
|
||||
class PreferencesAPI extends Module {
|
||||
constructor() {
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import { DrawableObject } from "common.mjs"
|
||||
import Point from "point.mjs"
|
||||
import Text from "text.mjs"
|
||||
|
|
|
@ -17,17 +17,15 @@
|
|||
*/
|
||||
|
||||
import { parseDomain, executeExpression, Expression, EmptySet, Domain } from "../mathlib.mjs"
|
||||
import { CreateNewObject } from "../historylib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
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 { API as HistoryAPI } from "../history/common.mjs"
|
||||
import { CreateNewObject } from "../historylib.mjs"
|
||||
|
||||
|
||||
export default class BodeMagnitude extends ExecutableObject {
|
||||
static type(){return 'Gain Bode'}
|
||||
static displayType(){return qsTranslate("bodemagnitude", 'Bode Magnitude')}
|
||||
|
@ -52,7 +50,7 @@ export default class BodeMagnitude extends ExecutableObject {
|
|||
if(om_0 == null) {
|
||||
// Create new point
|
||||
om_0 = Objects.createNewRegisteredObject('Point', [Objects.getNewName('ω'), true, this.color, 'name'])
|
||||
HistoryAPI.addToHistory(new CreateNewObject(om_0.name, 'Point', om_0.export()))
|
||||
History.addToHistory(new CreateNewObject(om_0.name, 'Point', om_0.export()))
|
||||
om_0.update()
|
||||
labelPosition = 'below'
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { Range, Expression, Domain } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
import Function from "function.mjs"
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
*/
|
||||
|
||||
import { executeExpression, Expression } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import { API as HistoryAPI } from "../history/common.mjs"
|
||||
import { CreateNewObject } from "../historylib.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import History from "../module/history.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
|
||||
|
@ -52,7 +52,7 @@ export default class BodePhase extends ExecutableObject {
|
|||
// Create new point
|
||||
om_0 = Objects.createNewRegisteredObject('Point', [Objects.getNewName('ω'), this.color, 'name'])
|
||||
om_0.labelPosition = this.phase.execute() >= 0 ? 'above' : 'below'
|
||||
HistoryAPI.history.addToHistory(new CreateNewObject(om_0.name, 'Point', om_0.export()))
|
||||
History.history.addToHistory(new CreateNewObject(om_0.name, 'Point', om_0.export()))
|
||||
labelPosition = 'below'
|
||||
}
|
||||
om_0.requiredBy.push(this)
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { executeExpression, Expression } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
import { getRandomColor, textsub } from "../utils.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import {ensureTypeSafety, serializesByPropertyType} from "../parameters.mjs"
|
||||
|
||||
// This file contains the default data to be imported from all other objects
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
*/
|
||||
|
||||
import { textsub } from "../utils.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
import { parseDomain, Expression, SpecialDomain } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
|
||||
export default class Function extends ExecutableObject {
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { Expression } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { DrawableObject } from "common.mjs"
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { Sequence as MathSequence, Domain } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
import { ExecutableObject } from "common.mjs"
|
||||
import Function from "function.mjs"
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { Expression } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
|
||||
import { DrawableObject } from "common.mjs"
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { Expression } from "../mathlib.mjs"
|
||||
import * as P from "../parameters.mjs"
|
||||
import Latex from "../math/latex.mjs"
|
||||
import Objects from "../objects.mjs"
|
||||
import Latex from "../module/latex.mjs"
|
||||
import Objects from "../module/objects.mjs"
|
||||
|
||||
import { DrawableObject } from "common.mjs"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {parseDomain, Expression as Expr, Domain} from "./mathlib.mjs"
|
||||
import { Objects } from "./objects.mjs"
|
||||
import Objects from "./module/objects.mjs"
|
||||
|
||||
const NONE = class Empty {}
|
||||
|
||||
|
@ -175,15 +175,15 @@ export class List extends PropertyType {
|
|||
parse(value) {
|
||||
let result = NONE
|
||||
if(typeof value == 'object' && value.__proto__ === Array) {
|
||||
let list = []
|
||||
let valid = 0
|
||||
for(let v of value) {
|
||||
if (this.format.test(v)) {
|
||||
v = stringValuesValidators[this.valueType][0](v)
|
||||
if(stringValuesValidators[this.valueType][1](v))
|
||||
list.append(v)
|
||||
valid++
|
||||
}
|
||||
}
|
||||
if(list.length === value.length)
|
||||
if(valid === value.length) // Ensure every value is valid.
|
||||
result = value
|
||||
}
|
||||
return result
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
import {BoolSetting} from "common.mjs"
|
||||
import Canvas from "../canvas.mjs"
|
||||
import LatexAPI from "../math/latex.mjs"
|
||||
import Canvas from "../module/canvas.mjs"
|
||||
import LatexAPI from "../module/latex.mjs"
|
||||
|
||||
const CHECK_FOR_UPDATES = new BoolSetting(
|
||||
qsTranslate("general", "Check for updates on startup"),
|
||||
|
|
Loading…
Reference in a new issue