diff --git a/geppetto-showcase/.eslintrc.js b/geppetto-showcase/.eslintrc.js index 7177cdb43..1af9acd52 100644 --- a/geppetto-showcase/.eslintrc.js +++ b/geppetto-showcase/.eslintrc.js @@ -97,7 +97,6 @@ module.exports = { "stackViewerRequest": true, "_": true, "labelsInTV": true, - "Backbone": true, "registeredEvents": true, "Handlebars": true, "ActiveXObject": true, diff --git a/geppetto.js/geppetto-client/eslint.config.mjs b/geppetto.js/geppetto-client/eslint.config.mjs index 0f5898f7f..fd0079083 100644 --- a/geppetto.js/geppetto-client/eslint.config.mjs +++ b/geppetto.js/geppetto-client/eslint.config.mjs @@ -64,7 +64,6 @@ const jsConfig = { stackViewerRequest: true, _: true, labelsInTV: true, - Backbone: true, registeredEvents: true, Handlebars: true, ActiveXObject: true, diff --git a/geppetto.js/geppetto-client/src/communication/geppettoJupyter/PythonControlledCapability.js b/geppetto.js/geppetto-client/src/communication/geppettoJupyter/PythonControlledCapability.js index 267b64d5b..b85769817 100644 --- a/geppetto.js/geppetto-client/src/communication/geppettoJupyter/PythonControlledCapability.js +++ b/geppetto.js/geppetto-client/src/communication/geppettoJupyter/PythonControlledCapability.js @@ -8,7 +8,7 @@ import React from 'react'; import Utils from './GeppettoJupyterUtils'; -export function createPythonControlledComponent(WrappedComponent) { +export default function createPythonControlledComponent(WrappedComponent) { if (typeof WrappedComponent !== 'function') { class Wrapper extends React.Component { render() { @@ -73,7 +73,7 @@ export function createPythonControlledComponent(WrappedComponent) { return PythonControlledComponent; } -export function createPythonControlledControl(WrappedComponent) { +export default function createPythonControlledControl(WrappedComponent) { var PythonControlledComponent = this.createPythonControlledComponent(WrappedComponent); class PythonControlledControl extends PythonControlledComponent { @@ -316,7 +316,7 @@ export function createPythonControlledControl(WrappedComponent) { return PythonControlledControl; } -export function createPythonControlledControlWithPythonDataFetch(WrappedComponent) { +export default function createPythonControlledControlWithPythonDataFetch(WrappedComponent) { var PythonControlledComponent = this.createPythonControlledComponent(WrappedComponent); class PythonControlledControlWithPythonDataFetch extends PythonControlledComponent { @@ -458,12 +458,6 @@ export function createPythonControlledControlWithPythonDataFetch(WrappedComponen return PythonControlledControlWithPythonDataFetch; } -export default { - createPythonControlledComponent, - createPythonControlledControl, - createPythonControlledControlWithPythonDataFetch -}; - function getNameFromWrappedComponent(WrappedComponent) { return WrappedComponent.name || WrappedComponent.displayName || WrappedComponent.Naked.render.name; } \ No newline at end of file diff --git a/geppetto.js/geppetto-core/eslint.config.mjs b/geppetto.js/geppetto-core/eslint.config.mjs index 0f5898f7f..fd0079083 100644 --- a/geppetto.js/geppetto-core/eslint.config.mjs +++ b/geppetto.js/geppetto-core/eslint.config.mjs @@ -64,7 +64,6 @@ const jsConfig = { stackViewerRequest: true, _: true, labelsInTV: true, - Backbone: true, registeredEvents: true, Handlebars: true, ActiveXObject: true, diff --git a/geppetto.js/geppetto-core/src/model/Node.js b/geppetto.js/geppetto-core/src/model/Node.js index 5cb98a7a9..e2f496e89 100644 --- a/geppetto.js/geppetto-core/src/model/Node.js +++ b/geppetto.js/geppetto-core/src/model/Node.js @@ -5,17 +5,19 @@ * @author Jesus R. Martinez (jesus@metacell.us) */ -import Backbone from 'backbone'; - -const Model = Backbone.Model.extend({ - name: "", - instancePath: "", - id: "", - domainType: "", - _metaType: "", - aspectNode: null, - parent: null, - tags: null, + +class Model { + + constructor() { + this.name = ""; + this.instancePath = ""; + this.id = ""; + this.domainType = ""; + this._metaType = ""; + this.aspectNode = null; + this.parent = null; + this.tags = null; + } /** * Gets the instance path of the node @@ -25,7 +27,7 @@ const Model = Backbone.Model.extend({ */ getInstancePath() { return this.instancePath; - }, + } /** * Gets the name of the node @@ -35,11 +37,11 @@ const Model = Backbone.Model.extend({ */ getName() { return this.name; - }, + } getAspectNode() { return this.aspectNode; - }, + } /** * Sets the name of the node @@ -48,7 +50,7 @@ const Model = Backbone.Model.extend({ */ setName(newname) { this.name = newname; - }, + } /** * Get the id associated with node @@ -58,23 +60,23 @@ const Model = Backbone.Model.extend({ */ getId() { return this.id; - }, + } getDomainType() { return this.domainType; - }, + } setDomainType(newDomainType) { this.domainType = newDomainType; - }, + } setParent(parent) { this.parent = parent; - }, + } getParent() { return this.parent; - }, + } /** * Recursively collects all nodes matching the given predicate. @@ -94,7 +96,7 @@ const Model = Backbone.Model.extend({ } return matches; - }, + } /** * Search inside a node for all the nodes of a specific domain type. @@ -104,7 +106,7 @@ const Model = Backbone.Model.extend({ */ getSubNodesOfDomainType(domainType) { return this._all((n) => n.domainType === domainType); - }, + } /** * Search inside a node for all the nodes of a specific meta type. @@ -114,9 +116,7 @@ const Model = Backbone.Model.extend({ */ getSubNodesOfMetaType(metaType) { return this._all((n) => n._metaType === metaType); - }, -}); + } +}; -export default { - Model, -}; \ No newline at end of file +export default Model; \ No newline at end of file diff --git a/geppetto.js/geppetto-ui/eslint.config.mjs b/geppetto.js/geppetto-ui/eslint.config.mjs index 0f5898f7f..fd0079083 100644 --- a/geppetto.js/geppetto-ui/eslint.config.mjs +++ b/geppetto.js/geppetto-ui/eslint.config.mjs @@ -64,7 +64,6 @@ const jsConfig = { stackViewerRequest: true, _: true, labelsInTV: true, - Backbone: true, registeredEvents: true, Handlebars: true, ActiveXObject: true,