diff --git a/.eslintcache b/.eslintcache new file mode 100644 index 00000000..713ce843 --- /dev/null +++ b/.eslintcache @@ -0,0 +1 @@ +[{"/Users/pveiga/repos/wisemapping-react/src/Footer.js":"1","/Users/pveiga/repos/wisemapping-react/src/Header.js":"2","/Users/pveiga/repos/wisemapping-react/src/index.js":"3","/Users/pveiga/repos/wisemapping-react/src/LoginPage.js":"4","/Users/pveiga/repos/wisemapping-react/src/RegistrationPage.js":"5"},{"size":1609,"mtime":1607011308675,"results":"6","hashOfConfig":"7"},{"size":1924,"mtime":1607015196109,"results":"8","hashOfConfig":"7"},{"size":1385,"mtime":1607144319143,"results":"9","hashOfConfig":"7"},{"size":3345,"mtime":1607147386381,"results":"10","hashOfConfig":"7"},{"size":4573,"mtime":1607143971378,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xegajf",{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/pveiga/repos/wisemapping-react/src/Footer.js",[],"/Users/pveiga/repos/wisemapping-react/src/Header.js",[],"/Users/pveiga/repos/wisemapping-react/src/index.js",[],"/Users/pveiga/repos/wisemapping-react/src/LoginPage.js",[],"/Users/pveiga/repos/wisemapping-react/src/RegistrationPage.js",[]] \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index cfb05505..01ee5e2a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,15 +1,29 @@ { "env": { "browser": true, - "commonjs": true, "es2021": true }, "extends": [ - "airbnb-base" + "eslint:recommended", + "prettier", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended" ], + "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 12 + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" }, + "plugins": [ + "react", + "@typescript-eslint" + ], "rules": { + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/explicit-module-boundary-types": "error", + "@typescript-eslint/no-unused-vars": "error" } } diff --git a/package.json b/package.json index 7da60306..11b7c14c 100644 --- a/package.json +++ b/package.json @@ -40,5 +40,15 @@ }, "homepage": "http://localhost:8080/react", "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", - + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "pre-push": "yarn lint && yarn test" + } + }, + "lint-staged": { + "**/*.{ts,tsx}": [ + "prettier --write" + ] + } } diff --git a/packages/web2d/.eslintrc.json b/packages/web2d/.eslintrc.json deleted file mode 100644 index 78f2aadb..00000000 --- a/packages/web2d/.eslintrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "env": { - "browser": true, - "commonjs": true, - "es2021": true - }, - "extends": [ - "airbnb-base" - ], - "parserOptions": { - "ecmaVersion": 12 - }, - "rules": { - "max-len": [0, 200], - "no-underscore-dangle": "off", - "no-restricted-syntax": "off", - "guard-for-in": "off", - "no-plusplus": "off" - }, - "plugins": ["only-warn"] - -} \ No newline at end of file diff --git a/packages/web2d/lib/components/Arrow.js b/packages/web2d/lib/components/Arrow.js index eaa38bff..842c55f1 100644 --- a/packages/web2d/lib/components/Arrow.js +++ b/packages/web2d/lib/components/Arrow.js @@ -20,44 +20,44 @@ const Element = require('./Element').default; const Toolkit = require('./Toolkit').default; const Arrow = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createArrow(); - const defaultAttributes = { - strokeColor: 'black', - strokeWidth: 1, - strokeStyle: 'solid', - strokeOpacity: 1, - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, + Extends: Element, + initialize: function (attributes) { + var peer = Toolkit.createArrow(); + var defaultAttributes = { + strokeColor: 'black', + strokeWidth: 1, + strokeStyle: 'solid', + strokeOpacity: 1, + }; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, - getType() { - return 'Arrow'; - }, + getType: function () { + return 'Arrow'; + }, - setFrom(x, y) { - this._peer.setFrom(x, y); - }, + setFrom: function (x, y) { + this._peer.setFrom(x, y); + }, - setControlPoint(point) { - this._peer.setControlPoint(point); - }, + setControlPoint: function (point) { + this._peer.setControlPoint(point); + }, - setStrokeColor(color) { - this._peer.setStrokeColor(color); - }, + setStrokeColor: function (color) { + this._peer.setStrokeColor(color); + }, - setStrokeWidth(width) { - this._peer.setStrokeWidth(width); - }, + setStrokeWidth: function (width) { + this._peer.setStrokeWidth(width); + }, - setDashed(isDashed, length, spacing) { - this._peer.setDashed(isDashed, length, spacing); - }, + setDashed: function (isDashed, length, spacing) { + this._peer.setDashed(isDashed, length, spacing); + }, }); -export default Arrow; +export default Arrow diff --git a/packages/web2d/lib/components/CurvedLine.js b/packages/web2d/lib/components/CurvedLine.js index 174c562e..f02689a8 100644 --- a/packages/web2d/lib/components/CurvedLine.js +++ b/packages/web2d/lib/components/CurvedLine.js @@ -19,103 +19,102 @@ const Element = require('./Element').default; const Toolkit = require('./Toolkit').default; const CurvedLine = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createCurvedLine(); - const defaultAttributes = { - strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1, - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; + Extends: Element, + initialize: function(attributes) { + var peer = Toolkit.createCurvedLine(); + var defaultAttributes = {strokeColor:'blue',strokeWidth:1,strokeStyle:'solid',strokeOpacity:1}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + getType : function() { + return "CurvedLine"; + }, + + setFrom : function(x, y) { + $assert(!isNaN(x), "x must be defined"); + $assert(!isNaN(y), "y must be defined"); + + this._peer.setFrom(x, y); + }, + + setTo : function(x, y) { + $assert(!isNaN(x), "x must be defined"); + $assert(!isNaN(y), "y must be defined"); + + this._peer.setTo(x, y); + }, + + getFrom : function() { + return this._peer.getFrom(); + }, + + getTo : function() { + return this._peer.getTo(); + }, + + setShowEndArrow : function(visible) { + this._peer.setShowEndArrow(visible); + }, + + isShowEndArrow : function() { + return this._peer.isShowEndArrow(); + }, + + setShowStartArrow : function(visible) { + this._peer.setShowStartArrow(visible); + }, + + isShowStartArrow : function() { + return this._peer.isShowStartArrow(); + }, + + setSrcControlPoint : function(control) { + this._peer.setSrcControlPoint(control); + }, + + setDestControlPoint : function(control) { + this._peer.setDestControlPoint(control); + }, + + getControlPoints : function() { + return this._peer.getControlPoints(); + }, + + isSrcControlPointCustom : function() { + return this._peer.isSrcControlPointCustom(); + }, + + isDestControlPointCustom : function() { + return this._peer.isDestControlPointCustom(); + }, + + setIsSrcControlPointCustom : function(isCustom) { + this._peer.setIsSrcControlPointCustom(isCustom); + }, + + setIsDestControlPointCustom : function(isCustom) { + this._peer.setIsDestControlPointCustom(isCustom); + }, + + updateLine : function(avoidControlPointFix) { + return this._peer.updateLine(avoidControlPointFix); + }, + + setStyle : function(style) { + this._peer.setLineStyle(style); + + }, + + getStyle : function() { + return this._peer.getLineStyle(); + }, + + setDashed : function(length, spacing) { + this._peer.setDashed(length, spacing); } - this.parent(peer, defaultAttributes); - }, - - getType() { - return 'CurvedLine'; - }, - - setFrom(x, y) { - $assert(!isNaN(x), 'x must be defined'); - $assert(!isNaN(y), 'y must be defined'); - - this._peer.setFrom(x, y); - }, - - setTo(x, y) { - $assert(!isNaN(x), 'x must be defined'); - $assert(!isNaN(y), 'y must be defined'); - - this._peer.setTo(x, y); - }, - - getFrom() { - return this._peer.getFrom(); - }, - - getTo() { - return this._peer.getTo(); - }, - - setShowEndArrow(visible) { - this._peer.setShowEndArrow(visible); - }, - - isShowEndArrow() { - return this._peer.isShowEndArrow(); - }, - - setShowStartArrow(visible) { - this._peer.setShowStartArrow(visible); - }, - - isShowStartArrow() { - return this._peer.isShowStartArrow(); - }, - - setSrcControlPoint(control) { - this._peer.setSrcControlPoint(control); - }, - - setDestControlPoint(control) { - this._peer.setDestControlPoint(control); - }, - - getControlPoints() { - return this._peer.getControlPoints(); - }, - - isSrcControlPointCustom() { - return this._peer.isSrcControlPointCustom(); - }, - - isDestControlPointCustom() { - return this._peer.isDestControlPointCustom(); - }, - - setIsSrcControlPointCustom(isCustom) { - this._peer.setIsSrcControlPointCustom(isCustom); - }, - - setIsDestControlPointCustom(isCustom) { - this._peer.setIsDestControlPointCustom(isCustom); - }, - - updateLine(avoidControlPointFix) { - return this._peer.updateLine(avoidControlPointFix); - }, - - setStyle(style) { - this._peer.setLineStyle(style); - }, - - getStyle() { - return this._peer.getLineStyle(); - }, - - setDashed(length, spacing) { - this._peer.setDashed(length, spacing); - }, }); CurvedLine.SIMPLE_LINE = false; diff --git a/packages/web2d/lib/components/Element.js b/packages/web2d/lib/components/Element.js index c6587e1e..a409d949 100644 --- a/packages/web2d/lib/components/Element.js +++ b/packages/web2d/lib/components/Element.js @@ -16,58 +16,58 @@ * limitations under the License. */ -const Element = new Class({ // eslint-disable-line no-undef - initialize(peer, attributes) { - this._peer = peer; - if (peer == null) { - throw new Error('Element peer can not be null'); - } +const Element = new Class({ //eslint-disable-line no-undef + initialize: function (peer, attributes) { + this._peer = peer; + if (peer == null) { + throw new Error('Element peer can not be null'); + } - if ($defined(attributes)) { // eslint-disable-line no-undef - this._initialize(attributes); - } - }, + if ($defined(attributes)) { //eslint-disable-line no-undef + this._initialize(attributes); + } + }, - _initialize(attributes) { - const batchExecute = {}; + _initialize: function (attributes) { + var batchExecute = {}; - // Collect arguments ... - for (var key in attributes) { - const funcName = this._attributeNameToFuncName(key, 'set'); - let funcArgs = batchExecute[funcName]; - if (!$defined(funcArgs)) { // eslint-disable-line no-undef - funcArgs = []; - } + // Collect arguments ... + for (var key in attributes) { + var funcName = this._attributeNameToFuncName(key, 'set'); + var funcArgs = batchExecute[funcName]; + if (!$defined(funcArgs)) { //eslint-disable-line no-undef + funcArgs = []; + } - const signature = Element._propertyNameToSignature[key]; - const argPositions = signature[1]; - if (argPositions != Element._SIGNATURE_MULTIPLE_ARGUMENTS) { - funcArgs[argPositions] = attributes[key]; - } else { - funcArgs = attributes[key].split(' '); - } - batchExecute[funcName] = funcArgs; - } + var signature = Element._propertyNameToSignature[key]; + var argPositions = signature[1]; + if (argPositions != Element._SIGNATURE_MULTIPLE_ARGUMENTS) { + funcArgs[argPositions] = attributes[key]; + } else { + funcArgs = attributes[key].split(' '); + } + batchExecute[funcName] = funcArgs; + } - // Call functions ... - for (var key in batchExecute) { // eslint-disable-line no-redeclare - const func = this[key]; - if (!$defined(func)) { // eslint-disable-line no-undef - throw new Error(`Could not find function: ${key}`); - } - func.apply(this, batchExecute[key]); - } - }, + // Call functions ... + for (var key in batchExecute) { //eslint-disable-line no-redeclare + var func = this[key]; + if (!$defined(func)) { //eslint-disable-line no-undef + throw new Error('Could not find function: ' + key); + } + func.apply(this, batchExecute[key]); + } + }, - setSize(width, height) { - this._peer.setSize(width, height); - }, + setSize: function (width, height) { + this._peer.setSize(width, height); + }, - setPosition(cx, cy) { - this._peer.setPosition(cx, cy); - }, + setPosition: function (cx, cy) { + this._peer.setPosition(cx, cy); + }, - /** + /** * Allows the registration of event listeners on the event target. * type * A string representing the event type to listen for. @@ -77,18 +77,18 @@ const Element = new Class({ // eslint-disable-line no-undef * The following events types are supported: * */ - addEvent(type, listener) { - this._peer.addEvent(type, listener); - }, + addEvent: function (type, listener) { + this._peer.addEvent(type, listener); + }, - trigger(type, event) { - this._peer.trigger(type, event); - }, + trigger: function (type, event) { + this._peer.trigger(type, event); + }, - cloneEvents(from) { - this._peer.cloneEvents(from); - }, - /** + cloneEvents: function (from) { + this._peer.cloneEvents(from); + }, + /** * * Allows the removal of event listeners from the event target. * @@ -99,221 +99,221 @@ const Element = new Class({ // eslint-disable-line no-undef * The listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs. * This interace will be invoked passing an event as argument and the 'this' referece in the function will be the element. */ - removeEvent(type, listener) { - this._peer.removeEvent(type, listener); - }, + removeEvent: function (type, listener) { + this._peer.removeEvent(type, listener); + }, - /** + /** * /* * Returns element type name. */ - getType() { - throw new Error( - 'Not implemeneted yet. This method must be implemented by all the inherited objects.', - ); - }, + getType: function () { + throw new Error( + 'Not implemeneted yet. This method must be implemented by all the inherited objects.' + ); + }, - /** + /** * Todo: Doc */ - getFill() { - return this._peer.getFill(); - }, + getFill: function () { + return this._peer.getFill(); + }, - /** + /** * Used to define the fill element color and element opacity. * color: Fill color * opacity: Opacity of the fill. It must be less than 1. */ - setFill(color, opacity) { - this._peer.setFill(color, opacity); - }, + setFill: function (color, opacity) { + this._peer.setFill(color, opacity); + }, - getPosition() { - return this._peer.getPosition(); - }, + getPosition: function () { + return this._peer.getPosition(); + }, - getNativePosition() { - return this._peer.getNativePosition(); - }, + getNativePosition: function () { + return this._peer.getNativePosition(); + }, - /* + /* * Defines the element stroke properties. * width: stroke width * style: "solid|dot|dash|dashdot|longdash". * color: stroke color * opacity: stroke visibility */ - setStroke(width, style, color, opacity) { - if ( - style != null - && style != undefined - && style != 'dash' - && style != 'dot' - && style != 'solid' - && style != 'longdash' - && style != 'dashdot' - ) { - throw new Error(`Unsupported stroke style: '${style}'`); - } - this._peer.setStroke(width, style, color, opacity); - }, + setStroke: function (width, style, color, opacity) { + if ( + style != null && + style != undefined && + style != 'dash' && + style != 'dot' && + style != 'solid' && + style != 'longdash' && + style != 'dashdot' + ) { + throw new Error("Unsupported stroke style: '" + style + "'"); + } + this._peer.setStroke(width, style, color, opacity); + }, - _attributeNameToFuncName(attributeKey, prefix) { - const signature = Element._propertyNameToSignature[attributeKey]; - if (!$defined(signature)) { // eslint-disable-line no-undef - throw `Unsupported attribute: ${attributeKey}`; - } + _attributeNameToFuncName: function (attributeKey, prefix) { + var signature = Element._propertyNameToSignature[attributeKey]; + if (!$defined(signature)) { //eslint-disable-line no-undef + throw 'Unsupported attribute: ' + attributeKey; + } - const firstLetter = signature[0].charAt(0); - return prefix + firstLetter.toUpperCase() + signature[0].substring(1); - }, + var firstLetter = signature[0].charAt(0); + return prefix + firstLetter.toUpperCase() + signature[0].substring(1); + }, - /** + /** * All element properties can be setted using either a method invocation or attribute invocation. * key: size, width, height, position, x, y, stroke, strokeWidth, strokeStyle, strokeColor, strokeOpacity, * fill, fillColor, fillOpacity, coordSize, coordSizeWidth, coordSizeHeight, coordOrigin, coordOriginX, coordOrigiY */ - setAttribute(key, value) { - const funcName = this._attributeNameToFuncName(key, 'set'); + setAttribute: function (key, value) { + var funcName = this._attributeNameToFuncName(key, 'set'); - const signature = Element._propertyNameToSignature[key]; - if (signature == null) { - throw `Could not find the signature for:${key}`; - } + var signature = Element._propertyNameToSignature[key]; + if (signature == null) { + throw 'Could not find the signature for:' + key; + } - // Parse arguments .. - const argPositions = signature[1]; - let args = []; - if (argPositions !== this._SIGNATURE_MULTIPLE_ARGUMENTS) { - args[argPositions] = value; - } else if (typeof value === 'array') { // eslint-disable-line valid-typeof - args = value; - } else { - const strValue = String(value); - args = strValue.split(' '); - } + // Parse arguments .. + var argPositions = signature[1]; + var args = []; + if (argPositions !== this._SIGNATURE_MULTIPLE_ARGUMENTS) { + args[argPositions] = value; + } else if (typeof value == 'array') { //eslint-disable-line valid-typeof + args = value; + } else { + var strValue = String(value); + args = strValue.split(' '); + } - // Look up method ... - const setter = this[funcName]; - if (setter == null) { - throw `Could not find the function name:${funcName}`; - } - setter.apply(this, args); - }, + // Look up method ... + var setter = this[funcName]; + if (setter == null) { + throw 'Could not find the function name:' + funcName; + } + setter.apply(this, args); + }, - getAttribute(key) { - const funcName = this._attributeNameToFuncName(key, 'get'); + getAttribute: function (key) { + var funcName = this._attributeNameToFuncName(key, 'get'); - const signature = Element._propertyNameToSignature[key]; - if (signature == null) { - throw `Could not find the signature for:${key}`; - } + var signature = Element._propertyNameToSignature[key]; + if (signature == null) { + throw 'Could not find the signature for:' + key; + } - const getter = this[funcName]; - if (getter == null) { - throw `Could not find the function name:${funcName}`; - } + var getter = this[funcName]; + if (getter == null) { + throw 'Could not find the function name:' + funcName; + } - const getterResult = getter.apply(this, []); - const attibuteName = signature[2]; - if (!$defined(attibuteName)) { // eslint-disable-line no-undef - throw `Could not find attribute mapping for:${key}`; - } + var getterResult = getter.apply(this, []); + var attibuteName = signature[2]; + if (!$defined(attibuteName)) { //eslint-disable-line no-undef + throw 'Could not find attribute mapping for:' + key; + } - const result = getterResult[attibuteName]; - if (!$defined(result)) { // eslint-disable-line no-undef - throw `Could not find attribute with name:${attibuteName}`; - } + var result = getterResult[attibuteName]; + if (!$defined(result)) { //eslint-disable-line no-undef + throw 'Could not find attribute with name:' + attibuteName; + } - return result; - }, + return result; + }, - /** + /** * Defines the element opacity. * Parameters: * opacity: A value between 0 and 1. */ - setOpacity(opacity) { - this._peer.setStroke(null, null, null, opacity); - this._peer.setFill(null, opacity); - }, + setOpacity: function (opacity) { + this._peer.setStroke(null, null, null, opacity); + this._peer.setFill(null, opacity); + }, - setVisibility(isVisible) { - this._peer.setVisibility(isVisible); - }, + setVisibility: function (isVisible) { + this._peer.setVisibility(isVisible); + }, - isVisible() { - return this._peer.isVisible(); - }, + isVisible: function () { + return this._peer.isVisible(); + }, - /** + /** * Move the element to the front */ - moveToFront() { - this._peer.moveToFront(); - }, + moveToFront: function () { + this._peer.moveToFront(); + }, - /** + /** * Move the element to the back */ - moveToBack() { - this._peer.moveToBack(); - }, + moveToBack: function () { + this._peer.moveToBack(); + }, - getStroke() { - return this._peer.getStroke(); - }, + getStroke: function () { + return this._peer.getStroke(); + }, - setCursor(type) { - this._peer.setCursor(type); - }, + setCursor: function (type) { + this._peer.setCursor(type); + }, - getParent() { - return this._peer.getParent(); - }, + getParent: function () { + return this._peer.getParent(); + }, }); Element._SIGNATURE_MULTIPLE_ARGUMENTS = -1; Element._supportedEvents = [ - 'click', - 'dblclick', - 'mousemove', - 'mouseout', - 'mouseover', - 'mousedown', - 'mouseup', + 'click', + 'dblclick', + 'mousemove', + 'mouseout', + 'mouseover', + 'mousedown', + 'mouseup', ]; Element._propertyNameToSignature = { - // Format: [attribute name, argument position on setter, attribute name on getter] - size: ['size', -1], - width: ['size', 0, 'width'], - height: ['size', 1, 'height'], + // Format: [attribute name, argument position on setter, attribute name on getter] + size: ['size', -1], + width: ['size', 0, 'width'], + height: ['size', 1, 'height'], - position: ['position', -1], - x: ['position', 0, 'x'], - y: ['position', 1, 'y'], + position: ['position', -1], + x: ['position', 0, 'x'], + y: ['position', 1, 'y'], - stroke: ['stroke', -1], - strokeWidth: ['stroke', 0, 'width'], - strokeStyle: ['stroke', 1, 'style'], - strokeColor: ['stroke', 2, 'color'], - strokeOpacity: ['stroke', 3, 'opacity'], + stroke: ['stroke', -1], + strokeWidth: ['stroke', 0, 'width'], + strokeStyle: ['stroke', 1, 'style'], + strokeColor: ['stroke', 2, 'color'], + strokeOpacity: ['stroke', 3, 'opacity'], - fill: ['fill', -1], - fillColor: ['fill', 0, 'color'], - fillOpacity: ['fill', 1, 'opacity'], + fill: ['fill', -1], + fillColor: ['fill', 0, 'color'], + fillOpacity: ['fill', 1, 'opacity'], - coordSize: ['coordSize', -1], - coordSizeWidth: ['coordSize', 0, 'width'], - coordSizeHeight: ['coordSize', 1, 'height'], + coordSize: ['coordSize', -1], + coordSizeWidth: ['coordSize', 0, 'width'], + coordSizeHeight: ['coordSize', 1, 'height'], - coordOrigin: ['coordOrigin', -1], - coordOriginX: ['coordOrigin', 0, 'x'], - coordOriginY: ['coordOrigin', 1, 'y'], + coordOrigin: ['coordOrigin', -1], + coordOriginX: ['coordOrigin', 0, 'x'], + coordOriginY: ['coordOrigin', 1, 'y'], - visibility: ['visibility', 0], - opacity: ['opacity', 0], + visibility: ['visibility', 0], + opacity: ['opacity', 0], }; export default Element; diff --git a/packages/web2d/lib/components/Elipse.js b/packages/web2d/lib/components/Elipse.js index 905182d1..89d0e721 100644 --- a/packages/web2d/lib/components/Elipse.js +++ b/packages/web2d/lib/components/Elipse.js @@ -1,43 +1,41 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit').default; - -const Elipse = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createElipse(); - const defaultAttributes = { - width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'blue', - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, - - getType() { - return 'Elipse'; - }, - - getSize() { - return this._peer.getSize(); - }, -}); - -export default Elipse; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit').default; + +const Elipse = new Class({ + Extends: Element, + initialize: function(attributes) { + var peer = Toolkit.createElipse(); + var defaultAttributes = {width:40, height:40, x:5, y:5,stroke:'1 solid black',fillColor:'blue'}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + getType : function() { + return "Elipse"; + }, + + getSize : function() { + return this._peer.getSize(); + } +}); + +export default Elipse; diff --git a/packages/web2d/lib/components/Font.js b/packages/web2d/lib/components/Font.js index d9b60fab..8c36e9bb 100644 --- a/packages/web2d/lib/components/Font.js +++ b/packages/web2d/lib/components/Font.js @@ -1,84 +1,84 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Toolkit = require('./Toolkit'); -const TransformUtil = require('./peer/utils/TransformUtils').default; - -const Font = new Class({ - initialize(fontFamily, textPeer) { - const font = `Toolkit.default.create${fontFamily}Font();`; - this._peer = eval(font); - this._textPeer = textPeer; - }, - - getHtmlSize() { - const scale = TransformUtil.workoutScale(this._textPeer); - return this._peer.getHtmlSize(scale); - }, - - getGraphSize() { - const scale = TransformUtil.workoutScale(this._textPeer); - return this._peer.getGraphSize(scale); - }, - - getFontScale() { - return TransformUtil.workoutScale(this._textPeer).height; - }, - - getSize() { - return this._peer.getSize(); - }, - - getStyle() { - return this._peer.getStyle(); - }, - - getWeight() { - return this._peer.getWeight(); - }, - - getFontFamily() { - return this._peer.getFontFamily(); - }, - - setSize(size) { - return this._peer.setSize(size); - }, - - setStyle(style) { - return this._peer.setStyle(style); - }, - - setWeight(weight) { - return this._peer.setWeight(weight); - }, - - getFont() { - return this._peer.getFont(); - }, - - getWidthMargin() { - return this._peer.getWidthMargin(); - }, -}); - -Font.ARIAL = 'Arial'; -Font.TIMES = 'Times'; -Font.TAHOMA = 'Tahoma'; -Font.VERDANA = 'Verdana'; - -export default Font; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Toolkit = require('./Toolkit'); +const TransformUtil = require('./peer/utils/TransformUtils').default; + +const Font = new Class({ + initialize: function (fontFamily, textPeer) { + var font = 'Toolkit.default.create' + fontFamily + 'Font();'; + this._peer = eval(font); + this._textPeer = textPeer; + }, + + getHtmlSize: function () { + var scale = TransformUtil.workoutScale(this._textPeer); + return this._peer.getHtmlSize(scale); + }, + + getGraphSize: function () { + var scale = TransformUtil.workoutScale(this._textPeer); + return this._peer.getGraphSize(scale); + }, + + getFontScale: function () { + return TransformUtil.workoutScale(this._textPeer).height; + }, + + getSize: function () { + return this._peer.getSize(); + }, + + getStyle: function () { + return this._peer.getStyle(); + }, + + getWeight: function () { + return this._peer.getWeight(); + }, + + getFontFamily: function () { + return this._peer.getFontFamily(); + }, + + setSize: function (size) { + return this._peer.setSize(size); + }, + + setStyle: function (style) { + return this._peer.setStyle(style); + }, + + setWeight: function (weight) { + return this._peer.setWeight(weight); + }, + + getFont: function () { + return this._peer.getFont(); + }, + + getWidthMargin: function () { + return this._peer.getWidthMargin(); + }, +}); + +Font.ARIAL = 'Arial'; +Font.TIMES = 'Times'; +Font.TAHOMA = 'Tahoma'; +Font.VERDANA = 'Verdana'; + +export default Font; diff --git a/packages/web2d/lib/components/Group.js b/packages/web2d/lib/components/Group.js index 5efafb5f..9de77f0c 100644 --- a/packages/web2d/lib/components/Group.js +++ b/packages/web2d/lib/components/Group.js @@ -1,137 +1,136 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit').default; - -/** - * A group object can be used to collect shapes. - */ -const Group = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createGroup(); - const defaultAttributes = { - width: 50, height: 50, x: 50, y: 50, coordOrigin: '0 0', coordSize: '50 50', - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, - - /** - * Remove an element as a child to the object. - */ - removeChild(element) { - if (!$defined(element)) { - throw 'Child element can not be null'; - } - - if (element == this) { - throw "It's not possible to add the group as a child of itself"; - } - - const elementType = element.getType(); - if (elementType == null) { - throw `It seems not to be an element ->${element}`; - } - - this._peer.removeChild(element._peer); - }, - - /** - * Appends an element as a child to the object. - */ - append(element) { - if (!$defined(element)) { - throw 'Child element can not be null'; - } - - if (element == this) { - throw "It's not posible to add the group as a child of itself"; - } - - const elementType = element.getType(); - if (elementType == null) { - throw `It seems not to be an element ->${element}`; - } - - if (elementType == 'Workspace') { - throw 'A group can not have a workspace as a child'; - } - - this._peer.append(element._peer); - }, - - getType() { - return 'Group'; - }, - - /** - * The group element is a containing blocks for this content - they define a CSS2 "block level box". - * Inside the containing block a local coordinate system is defined for any sub-elements using the coordsize and coordorigin attributes. - * All CSS2 positioning information is expressed in terms of this local coordinate space. - * Consequently CSS2 position attributes (left, top, width, height and so on) have no unit specifier - - * they are simple numbers, not CSS length quantities. - */ - setCoordSize(width, height) { - this._peer.setCoordSize(width, height); - }, - - setCoordOrigin(x, y) { - this._peer.setCoordOrigin(x, y); - }, - - getCoordOrigin() { - return this._peer.getCoordOrigin(); - }, - getSize() { - return this._peer.getSize(); - }, - - setFill(color, opacity) { - throw 'Unsupported operation. Fill can not be set to a group'; - }, - - setStroke(width, style, color, opacity) { - throw 'Unsupported operation. Stroke can not be set to a group'; - }, - - getCoordSize() { - return this._peer.getCoordSize(); - }, - - appendDomChild(DomElement) { - if (!$defined(DomElement)) { - throw 'Child element can not be null'; - } - - if (DomElement == this) { - throw "It's not possible to add the group as a child of itself"; - } - - this._peer._native.append(DomElement); - }, - - setOpacity(value) { - this._peer.setOpacity(value); - }, - -}); - -export default Group; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit').default; + +/** + * A group object can be used to collect shapes. + */ +const Group = new Class({ + Extends: Element, + initialize: function (attributes) { + var peer = Toolkit.createGroup(); + var defaultAttributes = {width: 50, height: 50, x: 50, y: 50, coordOrigin: '0 0', coordSize: '50 50'}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + /** + * Remove an element as a child to the object. + */ + removeChild: function (element) { + if (!$defined(element)) { + throw "Child element can not be null"; + } + + if (element == this) { + throw "It's not possible to add the group as a child of itself"; + } + + var elementType = element.getType(); + if (elementType == null) { + throw "It seems not to be an element ->" + element; + } + + this._peer.removeChild(element._peer); + }, + + /** + * Appends an element as a child to the object. + */ + append: function (element) { + if (!$defined(element)) { + throw "Child element can not be null"; + } + + if (element == this) { + throw "It's not posible to add the group as a child of itself"; + } + + var elementType = element.getType(); + if (elementType == null) { + throw "It seems not to be an element ->" + element; + } + + if (elementType == "Workspace") { + throw "A group can not have a workspace as a child"; + } + + this._peer.append(element._peer); + }, + + + getType: function () { + return "Group"; + }, + + /** + * The group element is a containing blocks for this content - they define a CSS2 "block level box". + * Inside the containing block a local coordinate system is defined for any sub-elements using the coordsize and coordorigin attributes. + * All CSS2 positioning information is expressed in terms of this local coordinate space. + * Consequently CSS2 position attributes (left, top, width, height and so on) have no unit specifier - + * they are simple numbers, not CSS length quantities. + */ + setCoordSize: function (width, height) { + this._peer.setCoordSize(width, height); + }, + + setCoordOrigin: function (x, y) { + this._peer.setCoordOrigin(x, y); + }, + + getCoordOrigin: function () { + return this._peer.getCoordOrigin(); + }, + getSize: function () { + return this._peer.getSize(); + }, + + setFill: function (color, opacity) { + throw "Unsupported operation. Fill can not be set to a group"; + }, + + setStroke: function (width, style, color, opacity) { + throw "Unsupported operation. Stroke can not be set to a group"; + }, + + getCoordSize: function () { + return this._peer.getCoordSize(); + }, + + appendDomChild: function (DomElement) { + if (!$defined(DomElement)) { + throw "Child element can not be null"; + } + + if (DomElement == this) { + throw "It's not possible to add the group as a child of itself"; + } + + this._peer._native.append(DomElement); + }, + + setOpacity: function (value) { + this._peer.setOpacity(value); + } + +}); + +export default Group; diff --git a/packages/web2d/lib/components/Image.js b/packages/web2d/lib/components/Image.js index 1e1b13f2..462b31eb 100644 --- a/packages/web2d/lib/components/Image.js +++ b/packages/web2d/lib/components/Image.js @@ -19,27 +19,27 @@ const Element = require('./Element').default; const Toolkit = require('./Toolkit').default; const Image = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createImage(); - this.parent(peer, attributes); - }, + Extends: Element, + initialize : function(attributes) { + var peer = Toolkit.createImage(); + this.parent(peer, attributes); + }, - getType() { - return 'Image'; - }, + getType : function() { + return "Image"; + }, - setHref(href) { - this._peer.setHref(href); - }, + setHref : function(href) { + this._peer.setHref(href); + }, - getHref() { - return this._peer.getHref(); - }, + getHref : function() { + return this._peer.getHref(); + }, - getSize() { - return this._peer.getSize(); - }, + getSize : function() { + return this._peer.getSize(); + } }); export default Image; diff --git a/packages/web2d/lib/components/Line.js b/packages/web2d/lib/components/Line.js index ced21080..01ba5b5e 100644 --- a/packages/web2d/lib/components/Line.js +++ b/packages/web2d/lib/components/Line.js @@ -1,73 +1,73 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit').default; - -const Line = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.createLine(); - const defaultAttributes = { strokeColor: '#495879', strokeWidth: 1, strokeOpacity: 1 }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, - - getType() { - return 'Line'; - }, - - setFrom(x, y) { - this._peer.setFrom(x, y); - }, - - setTo(x, y) { - this._peer.setTo(x, y); - }, - - getFrom() { - return this._peer.getFrom(); - }, - - getTo() { - return this._peer.getTo(); - }, - - /** - * Defines the start and the end line arrow style. - * Can have values "none | block | classic | diamond | oval | open | chevron | doublechevron" - * */ - setArrowStyle(startStyle, endStyle) { - this._peer.setArrowStyle(startStyle, endStyle); - }, - - setPosition(cx, cy) { - throw 'Unsupported operation'; - }, - - setSize(width, height) { - throw 'Unsupported operation'; - }, - - setFill(color, opacity) { - throw 'Unsupported operation'; - }, -}); - -export default Line; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit').default; + +const Line = new Class({ + Extends: Element, + initialize: function(attributes) { + var peer = Toolkit.createLine(); + var defaultAttributes = {strokeColor:'#495879',strokeWidth:1, strokeOpacity:1}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + getType : function() { + return "Line"; + }, + + setFrom : function(x, y) { + this._peer.setFrom(x, y); + }, + + setTo : function(x, y) { + this._peer.setTo(x, y); + }, + + getFrom : function() { + return this._peer.getFrom(); + }, + + getTo : function() { + return this._peer.getTo(); + }, + + /** + * Defines the start and the end line arrow style. + * Can have values "none | block | classic | diamond | oval | open | chevron | doublechevron" + **/ + setArrowStyle : function(startStyle, endStyle) { + this._peer.setArrowStyle(startStyle, endStyle); + }, + + setPosition : function(cx, cy) { + throw "Unsupported operation"; + }, + + setSize : function(width, height) { + throw "Unsupported operation"; + }, + + setFill : function(color, opacity) { + throw "Unsupported operation"; + } +}); + +export default Line; diff --git a/packages/web2d/lib/components/Point.js b/packages/web2d/lib/components/Point.js index 25528134..98b14d13 100644 --- a/packages/web2d/lib/components/Point.js +++ b/packages/web2d/lib/components/Point.js @@ -1,52 +1,53 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -core.Point = new Class({ - /** - * @constructs - * @param {Number} x coordinate - * @param {Number} y coordinate - */ - initialize(x, y) { - this.x = x; - this.y = y; - }, - - /** - * @param {Number} x coordinate - * @param {Number} y coordinate - */ - setValue(x, y) { - this.x = x; - this.y = y; - }, - - inspect() { - return `{x:${this.x},y:${this.y}}`; - }, - - clone() { - return new core.Point(this.x, this.y); - }, - -}); - -core.Point.fromString = function (point) { - const values = point.split(','); - return new core.Point(values[0], values[1]); -}; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +core.Point = new Class({ + /** + * @constructs + * @param {Number} x coordinate + * @param {Number} y coordinate + */ + initialize: function (x, y) { + this.x = x; + this.y = y; + }, + + /** + * @param {Number} x coordinate + * @param {Number} y coordinate + */ + setValue: function (x, y) { + this.x = x; + this.y = y; + }, + + inspect: function () { + return "{x:" + this.x + ",y:" + this.y + "}"; + }, + + clone: function () { + return new core.Point(this.x, this.y); + } + +}); + +core.Point.fromString = function (point) { + var values = point.split(','); + return new core.Point(values[0], values[1]); + +}; \ No newline at end of file diff --git a/packages/web2d/lib/components/PolyLine.js b/packages/web2d/lib/components/PolyLine.js index 5a0e66c1..3b0c9292 100644 --- a/packages/web2d/lib/components/PolyLine.js +++ b/packages/web2d/lib/components/PolyLine.js @@ -1,81 +1,79 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit'); - -const PolyLine = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.default.createPolyLine(); - const defaultAttributes = { - strokeColor: 'blue', strokeWidth: 1, strokeStyle: 'solid', strokeOpacity: 1, - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, - - getType() { - return 'PolyLine'; - }, - - setFrom(x, y) { - this._peer.setFrom(x, y); - }, - - setTo(x, y) { - this._peer.setTo(x, y); - }, - - setStyle(style) { - this._peer.setStyle(style); - }, - - getStyle() { - return this._peer.getStyle(); - }, - - buildCurvedPath(dist, x1, y1, x2, y2) { - let signx = 1; - let signy = 1; - if (x2 < x1) { - signx = -1; - } - if (y2 < y1) { - signy = -1; - } - - let path; - if (Math.abs(y1 - y2) > 2) { - const middlex = x1 + ((x2 - x1 > 0) ? dist : -dist); - path = `${x1.toFixed(1)}, ${y1.toFixed(1)} ${middlex.toFixed(1)}, ${y1.toFixed(1)} ${middlex.toFixed(1)}, ${(y2 - 5 * signy).toFixed(1)} ${(middlex + 5 * signx).toFixed(1)}, ${y2.toFixed(1)} ${x2.toFixed(1)}, ${y2.toFixed(1)}`; - } else { - path = `${x1.toFixed(1)}, ${y1.toFixed(1)} ${x2.toFixed(1)}, ${y2.toFixed(1)}`; - } - - return path; - }, - - buildStraightPath(dist, x1, y1, x2, y2) { - const middlex = x1 + ((x2 - x1 > 0) ? dist : -dist); - return `${x1}, ${y1} ${middlex}, ${y1} ${middlex}, ${y2} ${x2}, ${y2}`; - }, -}); - -export default PolyLine; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit'); + +const PolyLine = new Class({ + Extends: Element, + initialize:function(attributes) { + var peer = Toolkit.default.createPolyLine(); + var defaultAttributes = {strokeColor:'blue',strokeWidth:1,strokeStyle:'solid',strokeOpacity:1}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + getType : function() { + return "PolyLine"; + }, + + setFrom : function(x, y) { + this._peer.setFrom(x, y); + }, + + setTo : function(x, y) { + this._peer.setTo(x, y); + }, + + setStyle : function(style) { + this._peer.setStyle(style); + }, + + getStyle : function() { + return this._peer.getStyle(); + }, + + buildCurvedPath : function(dist, x1, y1, x2, y2) { + var signx = 1; + var signy = 1; + if (x2 < x1) { + signx = -1; + } + if (y2 < y1) { + signy = -1; + } + + var path; + if (Math.abs(y1 - y2) > 2) { + var middlex = x1 + ((x2 - x1 > 0) ? dist : -dist); + path = x1.toFixed(1) + ", " + y1.toFixed(1) + " " + middlex.toFixed(1) + ", " + y1.toFixed(1) + " " + middlex.toFixed(1) + ", " + (y2 - 5 * signy).toFixed(1) + " " + (middlex + 5 * signx).toFixed(1) + ", " + y2.toFixed(1) + " " + x2.toFixed(1) + ", " + y2.toFixed(1); + } else { + path = x1.toFixed(1) + ", " + y1.toFixed(1) + " " + x2.toFixed(1) + ", " + y2.toFixed(1); + } + + return path; + }, + + buildStraightPath : function(dist, x1, y1, x2, y2) { + var middlex = x1 + ((x2 - x1 > 0) ? dist : -dist); + return x1 + ", " + y1 + " " + middlex + ", " + y1 + " " + middlex + ", " + y2 + " " + x2 + ", " + y2; + } +}); + +export default PolyLine; diff --git a/packages/web2d/lib/components/Rect.js b/packages/web2d/lib/components/Rect.js index 635b6b4e..74d37ab7 100644 --- a/packages/web2d/lib/components/Rect.js +++ b/packages/web2d/lib/components/Rect.js @@ -1,57 +1,55 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit').default; - -/** - * Create a rectangle and variations of a rectangle shape. - * arc must be specified to create rounded rectangles. - * arc = "" - * For rounded rectangles, radius of the ellipse used to round off the corners of the rectangle. - */ -const Rect = new Class({ - Extends: Element, - initialize(arc, attributes) { - if (arc && arc > 1) { - throw 'Arc must be 0<=arc<=1'; - } - if (arguments.length <= 0) { - const rx = 0; - const ry = 0; - } - - const peer = Toolkit.createRect(arc); - const defaultAttributes = { - width: 40, height: 40, x: 5, y: 5, stroke: '1 solid black', fillColor: 'green', - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - }, - - getType() { - return 'Rect'; - }, - - getSize() { - return this._peer.getSize(); - }, -}); - -export default Rect; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit').default; + +/** + * Create a rectangle and variations of a rectangle shape. + * arc must be specified to create rounded rectangles. + * arc = "" + * For rounded rectangles, radius of the ellipse used to round off the corners of the rectangle. + */ +const Rect = new Class({ + Extends: Element, + initialize : function(arc, attributes) { + if (arc && arc > 1) { + throw "Arc must be 0<=arc<=1"; + } + if (arguments.length <= 0) { + var rx = 0; + var ry = 0; + } + + var peer = Toolkit.createRect(arc); + var defaultAttributes = {width:40, height:40, x:5, y:5,stroke:'1 solid black',fillColor:'green'}; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + }, + + getType : function() { + return "Rect"; + }, + + getSize : function() { + return this._peer.getSize(); + } +}); + +export default Rect; diff --git a/packages/web2d/lib/components/Text.js b/packages/web2d/lib/components/Text.js index 9bd9c273..cf5b27bb 100644 --- a/packages/web2d/lib/components/Text.js +++ b/packages/web2d/lib/components/Text.js @@ -1,99 +1,99 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit'); - -const Text = new Class({ - Extends: Element, - initialize(attributes) { - const peer = Toolkit.default.createText(); - this.parent(peer, attributes); - }, - - getType() { - return 'Text'; - }, - - setText(text) { - this._peer.setText(text); - }, - - setTextAlignment(align) { - $assert(align, 'align can not be null'); - this._peer.setTextAlignment(align); - }, - - setTextSize(width, height) { - this._peer.setContentSize(width, height); - }, - - getText() { - return this._peer.getText(); - }, - - setFont(font, size, style, weight) { - this._peer.setFont(font, size, style, weight); - }, - - setColor(color) { - this._peer.setColor(color); - }, - - getColor() { - return this._peer.getColor(); - }, - - setStyle(style) { - this._peer.setStyle(style); - }, - - setWeight(weight) { - this._peer.setWeight(weight); - }, - - setFontFamily(family) { - this._peer.setFontFamily(family); - }, - - getFont() { - return this._peer.getFont(); - }, - - setSize(size) { - this._peer.setSize(size); - }, - - getHtmlFontSize() { - return this._peer.getHtmlFontSize(); - }, - - getWidth() { - return this._peer.getWidth(); - }, - - getHeight() { - return parseInt(this._peer.getHeight()); - }, - - getFontHeight() { - const lines = this._peer.getText().split('\n').length; - return Math.round(this.getHeight() / lines); - }, -}); - -export default Text; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit'); + +const Text = new Class({ + Extends: Element, + initialize:function(attributes) { + var peer = Toolkit.default.createText(); + this.parent(peer, attributes); + }, + + getType : function() { + return "Text"; + }, + + setText : function(text) { + this._peer.setText(text); + }, + + setTextAlignment : function(align) { + $assert(align, "align can not be null"); + this._peer.setTextAlignment(align); + }, + + setTextSize : function(width, height) { + this._peer.setContentSize(width, height); + }, + + getText : function() { + return this._peer.getText(); + }, + + setFont : function(font, size, style, weight) { + this._peer.setFont(font, size, style, weight); + }, + + setColor : function(color) { + this._peer.setColor(color); + }, + + getColor : function() { + return this._peer.getColor(); + }, + + setStyle : function(style) { + this._peer.setStyle(style); + }, + + setWeight : function(weight) { + this._peer.setWeight(weight); + }, + + setFontFamily : function(family) { + this._peer.setFontFamily(family); + }, + + getFont : function() { + return this._peer.getFont(); + }, + + setSize : function(size) { + this._peer.setSize(size); + }, + + getHtmlFontSize : function() { + return this._peer.getHtmlFontSize(); + }, + + getWidth : function() { + return this._peer.getWidth(); + }, + + getHeight : function() { + return parseInt(this._peer.getHeight()); + }, + + getFontHeight : function() { + var lines = this._peer.getText().split('\n').length; + return Math.round(this.getHeight() / lines); + } +}); + +export default Text; diff --git a/packages/web2d/lib/components/Toolkit.js b/packages/web2d/lib/components/Toolkit.js index fa52e461..d806e347 100644 --- a/packages/web2d/lib/components/Toolkit.js +++ b/packages/web2d/lib/components/Toolkit.js @@ -1,81 +1,97 @@ -/* -* Copyright [2015] [wisemapping] -* -* Licensed under WiseMapping Public License, Version 1.0 (the "License"). -* It is basically the Apache License, Version 2.0 (the "License") plus the -* "powered by wisemapping" text requirement on every single page; -* you may not use this file except in compliance with the License. -* You may obtain a copy of the license at -* -* http://www.wisemapping.org/license -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ -const WorkspacePeer = require('./peer/svg/WorkspacePeer').default; -const GroupPeer = require('./peer/svg/GroupPeer').default; -const ElipsePeer = require('./peer/svg/ElipsePeer').default; -const LinePeer = require('./peer/svg/LinePeer').default; -const PolyLinePeer = require('./peer/svg/PolyLinePeer').default; -const CurvedLinePeer = require('./peer/svg/CurvedLinePeer').default; -const ArrowPeer = require('./peer/svg/ArrowPeer').default; -const TextPeer = require('./peer/svg/TextPeer').default; -const ImagePeer = require('./peer/svg/ImagePeer').default; -const RectPeer = require('./peer/svg/RectPeer').default; -const ArialFont = require('./peer/svg/ArialFont').default; -const TimesFont = require('./peer/svg/TimesFont').default; -const VerdanaFont = require('./peer/svg/VerdanaFont').default; -const TahomaFont = require('./peer/svg/TahomaFont').default; - -const ToolkitSVG = { - init() { - }, - createWorkspace(element) { - return new WorkspacePeer(element); - }, - createGroup(element) { - return new GroupPeer(); - }, - createElipse() { - return new ElipsePeer(); - }, - createLine() { - return new LinePeer(); - }, - createPolyLine() { - return new PolyLinePeer(); - }, - createCurvedLine() { - return new CurvedLinePeer(); - }, - createArrow() { - return new ArrowPeer(); - }, - createText() { - return new TextPeer(); - }, - createImage() { - return new ImagePeer(); - }, - createRect(arc) { - return new RectPeer(arc); - }, - createArialFont() { - return new ArialFont(); - }, - createTimesFont() { - return new TimesFont(); - }, - createVerdanaFont() { - return new VerdanaFont(); - }, - createTahomaFont() { - return new TahomaFont(); - }, -}; - -const Toolkit = ToolkitSVG; -export default Toolkit; +/* +* Copyright [2015] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. + */ +const WorkspacePeer = require('./peer/svg/WorkspacePeer').default +const GroupPeer = require('./peer/svg/GroupPeer').default +const ElipsePeer = require('./peer/svg/ElipsePeer').default +const LinePeer = require('./peer/svg/LinePeer').default +const PolyLinePeer = require('./peer/svg/PolyLinePeer').default +const CurvedLinePeer = require('./peer/svg/CurvedLinePeer').default +const ArrowPeer = require('./peer/svg/ArrowPeer').default +const TextPeer = require('./peer/svg/TextPeer').default +const ImagePeer = require('./peer/svg/ImagePeer').default +const RectPeer = require('./peer/svg/RectPeer').default +const ArialFont = require('./peer/svg/ArialFont').default +const TimesFont = require('./peer/svg/TimesFont').default +const VerdanaFont = require('./peer/svg/VerdanaFont').default +const TahomaFont = require('./peer/svg/TahomaFont').default + +const ToolkitSVG = +{ + init: function() + { + }, + createWorkspace: function(element) + { + return new WorkspacePeer(element); + }, + createGroup: function(element) + { + return new GroupPeer(); + }, + createElipse: function() + { + return new ElipsePeer(); + }, + createLine: function() + { + return new LinePeer(); + }, + createPolyLine: function() + { + return new PolyLinePeer(); + }, + createCurvedLine: function() + { + return new CurvedLinePeer(); + }, + createArrow: function() + { + return new ArrowPeer(); + }, + createText: function () + { + return new TextPeer(); + }, + createImage: function () + { + return new ImagePeer(); + }, + createRect: function(arc) + { + return new RectPeer(arc); + }, + createArialFont: function() + { + return new ArialFont(); + }, + createTimesFont: function() + { + return new TimesFont(); + }, + createVerdanaFont: function() + { + return new VerdanaFont(); + }, + createTahomaFont: function() + { + return new TahomaFont(); + } +}; + +const Toolkit = ToolkitSVG; +export default Toolkit; diff --git a/packages/web2d/lib/components/Workspace.js b/packages/web2d/lib/components/Workspace.js index 082924f1..e6aed5b6 100644 --- a/packages/web2d/lib/components/Workspace.js +++ b/packages/web2d/lib/components/Workspace.js @@ -1,200 +1,200 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Element = require('./Element').default; -const Toolkit = require('./Toolkit').default; - -const Workspace = new Class({ - Extends: Element, - initialize(attributes) { - this._htmlContainer = this._createDivContainer(); - - const peer = Toolkit.createWorkspace(this._htmlContainer); - const defaultAttributes = { - width: '200px', - height: '200px', - stroke: '1px solid #edf1be', - fillColor: 'white', - coordOrigin: '0 0', - coordSize: '200 200', - }; - for (const key in attributes) { - defaultAttributes[key] = attributes[key]; - } - this.parent(peer, defaultAttributes); - this._htmlContainer.append(this._peer._native); - }, - - getType() { - return 'Workspace'; - }, - - /** - * Appends an element as a child to the object. - */ - append(element) { - if (!$defined(element)) { - throw 'Child element can not be null'; - } - const elementType = element.getType(); - if (elementType == null) { - throw `It seems not to be an element ->${element}`; - } - - if (elementType == 'Workspace') { - throw 'A workspace can not have a workspace as a child'; - } - - this._peer.append(element._peer); - }, - - addItAsChildTo(element) { - if (!$defined(element)) { - throw 'Workspace div container can not be null'; - } - element.append(this._htmlContainer); - }, - - /** - * Create a new div element that will be responsible for containing the workspace elements. - */ - _createDivContainer() { - const container = window.document.createElement('div'); - container.id = 'workspaceContainer'; - // container.style.overflow = "hidden"; - container.style.position = 'relative'; - container.style.top = '0px'; - container.style.left = '0px'; - container.style.height = '688px'; - container.style.border = '1px solid red'; - - return $(container); - }, - - /** - * Set the workspace area size. It can be defined using different units: - * in (inches; 1in=2.54cm) - * cm (centimeters; 1cm=10mm) - * mm (millimeters) - * pt (points; 1pt=1/72in) - * pc (picas; 1pc=12pt) - */ - setSize(width, height) { - // HTML container must have the size of the group element. - if ($defined(width)) { - this._htmlContainer.css('width', width); - } - - if ($defined(height)) { - this._htmlContainer.css('height', height); - } - this._peer.setSize(width, height); - }, - - /** - * The workspace element is a containing blocks for this content - they define a CSS2 "block level box". - * Inside the containing block a local coordinate system is defined for any sub-elements using the coordsize and coordorigin attributes. - * All CSS2 positioning information is expressed in terms of this local coordinate space. - * Consequently CSS2 position attributes (left, top, width, height and so on) have no unit specifier - - * they are simple numbers, not CSS length quantities. - */ - setCoordSize(width, height) { - this._peer.setCoordSize(width, height); - }, - - /** - * @Todo: Complete Doc - */ - setCoordOrigin(x, y) { - this._peer.setCoordOrigin(x, y); - }, - - /** - * @Todo: Complete Doc - */ - getCoordOrigin() { - return this._peer.getCoordOrigin(); - }, - - // Private method declaration area - /** - * All the SVG elements will be children of this HTML element. - */ - _getHtmlContainer() { - return this._htmlContainer; - }, - - setFill(color, opacity) { - this._htmlContainer.css('background-color', color); - if (opacity || opacity === 0) { - throw 'Unsupported operation. Opacity not supported.'; - } - }, - - getFill() { - const color = this._htmlContainer.css('background-color'); - return { color }; - }, - - getSize() { - const width = this._htmlContainer.css('width'); - const height = this._htmlContainer.css('height'); - return { width, height }; - }, - - setStroke(width, style, color, opacity) { - if (style != 'solid') { - throw `Not supported style stroke style:${style}`; - } - this._htmlContainer.css('border', `${width} ${style} ${color}`); - - if (opacity || opacity === 0) { - throw 'Unsupported operation. Opacity not supported.'; - } - }, - - getCoordSize() { - return this._peer.getCoordSize(); - }, - - /** - * Remove an element as a child to the object. - */ - removeChild(element) { - if (!$defined(element)) { - throw 'Child element can not be null'; - } - - if (element == this) { - throw "It's not possible to add the group as a child of itself"; - } - - const elementType = element.getType(); - if (elementType == null) { - throw `It seems not to be an element ->${element}`; - } - - this._peer.removeChild(element._peer); - }, - - dumpNativeChart() { - const elem = this._htmlContainer; - return elem.innerHTML; - }, -}); - -export default Workspace; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Element = require('./Element').default; +const Toolkit = require('./Toolkit').default; + +const Workspace = new Class({ + Extends: Element, + initialize: function (attributes) { + this._htmlContainer = this._createDivContainer(); + + var peer = Toolkit.createWorkspace(this._htmlContainer); + var defaultAttributes = { + width: '200px', + height: '200px', + stroke: '1px solid #edf1be', + fillColor: 'white', + coordOrigin: '0 0', + coordSize: '200 200', + }; + for (var key in attributes) { + defaultAttributes[key] = attributes[key]; + } + this.parent(peer, defaultAttributes); + this._htmlContainer.append(this._peer._native); + }, + + getType: function () { + return 'Workspace'; + }, + + /** + * Appends an element as a child to the object. + */ + append: function (element) { + if (!$defined(element)) { + throw 'Child element can not be null'; + } + var elementType = element.getType(); + if (elementType == null) { + throw 'It seems not to be an element ->' + element; + } + + if (elementType == 'Workspace') { + throw 'A workspace can not have a workspace as a child'; + } + + this._peer.append(element._peer); + }, + + addItAsChildTo: function (element) { + if (!$defined(element)) { + throw 'Workspace div container can not be null'; + } + element.append(this._htmlContainer); + }, + + /** + * Create a new div element that will be responsible for containing the workspace elements. + */ + _createDivContainer: function () { + var container = window.document.createElement('div'); + container.id = 'workspaceContainer'; + // container.style.overflow = "hidden"; + container.style.position = 'relative'; + container.style.top = '0px'; + container.style.left = '0px'; + container.style.height = '688px'; + container.style.border = '1px solid red'; + + return $(container); + }, + + /** + * Set the workspace area size. It can be defined using different units: + * in (inches; 1in=2.54cm) + * cm (centimeters; 1cm=10mm) + * mm (millimeters) + * pt (points; 1pt=1/72in) + * pc (picas; 1pc=12pt) + */ + setSize: function (width, height) { + // HTML container must have the size of the group element. + if ($defined(width)) { + this._htmlContainer.css('width', width); + } + + if ($defined(height)) { + this._htmlContainer.css('height', height); + } + this._peer.setSize(width, height); + }, + + /** + * The workspace element is a containing blocks for this content - they define a CSS2 "block level box". + * Inside the containing block a local coordinate system is defined for any sub-elements using the coordsize and coordorigin attributes. + * All CSS2 positioning information is expressed in terms of this local coordinate space. + * Consequently CSS2 position attributes (left, top, width, height and so on) have no unit specifier - + * they are simple numbers, not CSS length quantities. + */ + setCoordSize: function (width, height) { + this._peer.setCoordSize(width, height); + }, + + /** + * @Todo: Complete Doc + */ + setCoordOrigin: function (x, y) { + this._peer.setCoordOrigin(x, y); + }, + + /** + * @Todo: Complete Doc + */ + getCoordOrigin: function () { + return this._peer.getCoordOrigin(); + }, + + // Private method declaration area + /** + * All the SVG elements will be children of this HTML element. + */ + _getHtmlContainer: function () { + return this._htmlContainer; + }, + + setFill: function (color, opacity) { + this._htmlContainer.css('background-color', color); + if (opacity || opacity === 0) { + throw 'Unsupported operation. Opacity not supported.'; + } + }, + + getFill: function () { + var color = this._htmlContainer.css('background-color'); + return { color: color }; + }, + + getSize: function () { + var width = this._htmlContainer.css('width'); + var height = this._htmlContainer.css('height'); + return { width: width, height: height }; + }, + + setStroke: function (width, style, color, opacity) { + if (style != 'solid') { + throw 'Not supported style stroke style:' + style; + } + this._htmlContainer.css('border', width + ' ' + style + ' ' + color); + + if (opacity || opacity === 0) { + throw 'Unsupported operation. Opacity not supported.'; + } + }, + + getCoordSize: function () { + return this._peer.getCoordSize(); + }, + + /** + * Remove an element as a child to the object. + */ + removeChild: function (element) { + if (!$defined(element)) { + throw 'Child element can not be null'; + } + + if (element == this) { + throw "It's not possible to add the group as a child of itself"; + } + + var elementType = element.getType(); + if (elementType == null) { + throw 'It seems not to be an element ->' + element; + } + + this._peer.removeChild(element._peer); + }, + + dumpNativeChart: function () { + var elem = this._htmlContainer; + return elem.innerHTML; + }, +}); + +export default Workspace; diff --git a/packages/web2d/lib/components/header.js b/packages/web2d/lib/components/header.js new file mode 100644 index 00000000..5c258da2 --- /dev/null +++ b/packages/web2d/lib/components/header.js @@ -0,0 +1,24 @@ +/* +* Copyright [2015] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +var web2d = {}; +web2d.peer = +{ +svg: {} +}; +web2d.peer.utils = {}; diff --git a/packages/web2d/lib/components/peer/svg/ArialFont.js b/packages/web2d/lib/components/peer/svg/ArialFont.js index 49ab4b29..7719ebee 100644 --- a/packages/web2d/lib/components/peer/svg/ArialFont.js +++ b/packages/web2d/lib/components/peer/svg/ArialFont.js @@ -1,36 +1,36 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Font = require('./Font').default; - -const ArialFont = new Class({ - Extends: Font, - initialize() { - this.parent(); - this._fontFamily = 'Arial'; - }, - - getFontFamily() { - return this._fontFamily; - }, - - getFont() { - return Font.ARIAL; - }, -}); - -export default ArialFont; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Font = require('./Font').default + +const ArialFont = new Class({ + Extends: Font, + initialize :function() { + this.parent(); + this._fontFamily = "Arial"; + }, + + getFontFamily : function () { + return this._fontFamily; + }, + + getFont : function () { + return Font.ARIAL; + } +}); + +export default ArialFont diff --git a/packages/web2d/lib/components/peer/svg/ArrowPeer.js b/packages/web2d/lib/components/peer/svg/ArrowPeer.js index c5ee82ae..76865408 100644 --- a/packages/web2d/lib/components/peer/svg/ArrowPeer.js +++ b/packages/web2d/lib/components/peer/svg/ArrowPeer.js @@ -16,83 +16,85 @@ * limitations under the License. */ -const ElementPeer = require('./ElementPeer').default; +const ElementPeer = require('./ElementPeer').default const ArrowPeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'path'); - this.parent(svgElement); - this._style = {}; - this._controlPoint = new core.Point(); - this._fromPoint = new core.Point(); - }, + Extends: ElementPeer, + initialize : function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'path'); + this.parent(svgElement); + this._style = {}; + this._controlPoint = new core.Point(); + this._fromPoint = new core.Point(); + }, - setFrom(x, y) { - this._fromPoint.x = x; - this._fromPoint.y = y; - this._redraw(); - }, + setFrom : function(x, y) { + this._fromPoint.x = x; + this._fromPoint.y = y; + this._redraw(); + }, - setControlPoint(point) { - this._controlPoint = point; - this._redraw(); - }, + setControlPoint : function (point) { + this._controlPoint = point; + this._redraw(); + }, - setStrokeColor(color) { - this.setStroke(null, null, color, null); - }, + setStrokeColor : function (color) { + this.setStroke(null, null, color, null); + }, - setStrokeWidth(width) { - this.setStroke(width); - }, + setStrokeWidth : function(width) { + this.setStroke(width); + }, - setDashed(isDashed, length, spacing) { - if ($defined(isDashed) && isDashed && $defined(length) && $defined(spacing)) { - this._native.setAttribute('stroke-dasharray', `${length},${spacing}`); - } else { - this._native.setAttribute('stroke-dasharray', ''); + setDashed : function(isDashed, length, spacing) { + if ($defined(isDashed) && isDashed && $defined(length) && $defined(spacing)) { + this._native.setAttribute("stroke-dasharray", length + "," + spacing); + } else { + this._native.setAttribute("stroke-dasharray", ""); + } + }, + + _updateStyle : function() { + var style = ""; + for (var key in this._style) { + style += key + ":" + this._style[key] + " "; + } + this._native.setAttribute("style", style); + }, + + _redraw : function() { + var x,y, xp, yp; + if ($defined(this._fromPoint.x) && $defined(this._fromPoint.y) && $defined(this._controlPoint.x) && $defined(this._controlPoint.y)) { + + if (this._controlPoint.y == 0) + this._controlPoint.y = 1; + + var y0 = this._controlPoint.y; + var x0 = this._controlPoint.x; + var x2 = x0 + y0; + var y2 = y0 - x0; + var x3 = x0 - y0; + var y3 = y0 + x0; + var m = y2 / x2; + var mp = y3 / x3; + var l = 6; + var pow = Math.pow; + x = (x2 == 0 ? 0 : Math.sqrt(pow(l, 2) / (1 + pow(m, 2)))); + x *= Math.sign(x2); + y = (x2 == 0 ? l * Math.sign(y2) : m * x); + xp = (x3 == 0 ? 0 : Math.sqrt(pow(l, 2) / (1 + pow(mp, 2)))); + xp *= Math.sign(x3); + yp = (x3 == 0 ? l * Math.sign(y3) : mp * xp); + + var path = "M" + this._fromPoint.x + "," + this._fromPoint.y + " " + + "L" + (x + this._fromPoint.x) + "," + (y + this._fromPoint.y) + + "M" + this._fromPoint.x + "," + this._fromPoint.y + " " + + "L" + (xp + this._fromPoint.x) + "," + (yp + this._fromPoint.y) + ; + this._native.setAttribute("d", path); + } } - }, - - _updateStyle() { - let style = ''; - for (const key in this._style) { - style += `${key}:${this._style[key]} `; - } - this._native.setAttribute('style', style); - }, - - _redraw() { - let x; let y; let xp; let - yp; - if ($defined(this._fromPoint.x) && $defined(this._fromPoint.y) && $defined(this._controlPoint.x) && $defined(this._controlPoint.y)) { - if (this._controlPoint.y == 0) this._controlPoint.y = 1; - - const y0 = this._controlPoint.y; - const x0 = this._controlPoint.x; - const x2 = x0 + y0; - const y2 = y0 - x0; - const x3 = x0 - y0; - const y3 = y0 + x0; - const m = y2 / x2; - const mp = y3 / x3; - const l = 6; - const { pow } = Math; - x = (x2 == 0 ? 0 : Math.sqrt(pow(l, 2) / (1 + pow(m, 2)))); - x *= Math.sign(x2); - y = (x2 == 0 ? l * Math.sign(y2) : m * x); - xp = (x3 == 0 ? 0 : Math.sqrt(pow(l, 2) / (1 + pow(mp, 2)))); - xp *= Math.sign(x3); - yp = (x3 == 0 ? l * Math.sign(y3) : mp * xp); - - const path = `M${this._fromPoint.x},${this._fromPoint.y} ` - + `L${x + this._fromPoint.x},${y + this._fromPoint.y - }M${this._fromPoint.x},${this._fromPoint.y} ` - + `L${xp + this._fromPoint.x},${yp + this._fromPoint.y}`; - this._native.setAttribute('d', path); - } - }, }); export default ArrowPeer; diff --git a/packages/web2d/lib/components/peer/svg/CurvedLinePeer.js b/packages/web2d/lib/components/peer/svg/CurvedLinePeer.js index c1f7fcf9..c62a3594 100644 --- a/packages/web2d/lib/components/peer/svg/CurvedLinePeer.js +++ b/packages/web2d/lib/components/peer/svg/CurvedLinePeer.js @@ -19,176 +19,186 @@ const Shape = require('@wisemapping/mindplot/lib/components/util/Shape').default const ElementPeer = require('./ElementPeer').default; const CurvedLinePeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'path'); - this.parent(svgElement); - this._style = { fill: '#495879' }; - this._updateStyle(); - this._customControlPoint_1 = false; - this._customControlPoint_2 = false; - this._control1 = new core.Point(); - this._control2 = new core.Point(); - this._lineStyle = true; - }, + Extends: ElementPeer, + initialize :function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'path'); + this.parent(svgElement); + this._style = {fill:'#495879'}; + this._updateStyle(); + this._customControlPoint_1 = false; + this._customControlPoint_2 = false; + this._control1 = new core.Point(); + this._control2 = new core.Point(); + this._lineStyle = true; + }, + + + setSrcControlPoint : function(control) { + this._customControlPoint_1 = true; + var change = this._control1.x != control.x || this._control1.y != control.y; + if ($defined(control.x)) { + this._control1 = control; + this._control1.x = parseInt(this._control1.x); + this._control1.y = parseInt(this._control1.y) + } + if (change) + this._updatePath(); + }, + + setDestControlPoint : function(control) { + this._customControlPoint_2 = true; + var change = this._control2.x != control.x || this._control2.y != control.y; + if ($defined(control.x)) { + this._control2 = control; + this._control2.x = parseInt(this._control2.x); + this._control2.y = parseInt(this._control2.y) + } + if (change) + this._updatePath(); + }, + + isSrcControlPointCustom : function() { + return this._customControlPoint_1; + }, + + isDestControlPointCustom : function() { + return this._customControlPoint_2; + }, + + setIsSrcControlPointCustom : function(isCustom) { + this._customControlPoint_1 = isCustom; + }, + + setIsDestControlPointCustom : function(isCustom) { + this._customControlPoint_2 = isCustom; + }, + + + getControlPoints : function() { + return [this._control1, this._control2]; + }, + + setFrom : function(x1, y1) { + var change = this._x1 != parseInt(x1) || this._y1 != parseInt(y1); + this._x1 = parseInt(x1); + this._y1 = parseInt(y1); + if (change) + this._updatePath(); + }, + + setTo : function(x2, y2) { + var change = this._x2 != parseInt(x2) || this._y2 != parseInt(y2); + this._x2 = parseInt(x2); + this._y2 = parseInt(y2); + if (change) + this._updatePath(); + }, + + getFrom : function() { + return new core.Point(this._x1, this._y1); + }, + + getTo : function() { + return new core.Point(this._x2, this._y2); + }, + + setStrokeWidth : function(width) { + this._style['stroke-width'] = width; + this._updateStyle(); + }, + + setColor : function(color) { + this._style['stroke'] = color; + this._style['fill'] = color; + this._updateStyle(); + }, + + updateLine : function(avoidControlPointFix) { + this._updatePath(avoidControlPointFix); + }, + + setLineStyle : function (style) { + this._lineStyle = style; + if (this._lineStyle) { + this._style['fill'] = this._fill; + } else { + this._fill = this._style['fill']; + this._style['fill'] = 'none'; + } + this._updateStyle(); + this.updateLine(); + }, + + getLineStyle : function () { + return this._lineStyle; + }, + + + setShowEndArrow : function(visible) { + this._showEndArrow = visible; + this.updateLine(); + }, + + isShowEndArrow : function() { + return this._showEndArrow; + }, + + setShowStartArrow : function(visible) { + this._showStartArrow = visible; + this.updateLine(); + }, + + isShowStartArrow : function() { + return this._showStartArrow; + }, + + + _updatePath : function(avoidControlPointFix) { + if ($defined(this._x1) && $defined(this._y1) && $defined(this._x2) && $defined(this._y2)) { + this._calculateAutoControlPoints(avoidControlPointFix); + var path = "M" + this._x1 + "," + this._y1 + + " C" + (this._control1.x + this._x1) + "," + (this._control1.y + this._y1) + " " + + (this._control2.x + this._x2) + "," + (this._control2.y + this._y2) + " " + + this._x2 + "," + this._y2 + + (this._lineStyle ? " " + + (this._control2.x + this._x2) + "," + (this._control2.y + this._y2 + 3) + " " + + (this._control1.x + this._x1) + "," + (this._control1.y + this._y1 + 5) + " " + + this._x1 + "," + (this._y1 + 7) + " Z" + : "" + ); + this._native.setAttribute("d", path); + } + }, + + _updateStyle : function() { + var style = ""; + for (var key in this._style) { + style += key + ":" + this._style[key] + " "; + } + this._native.setAttribute("style", style); + }, + + _calculateAutoControlPoints : function(avoidControlPointFix) { + //Both points available, calculate real points + var defaultpoints = Shape.calculateDefaultControlPoints(new core.Point(this._x1, this._y1), new core.Point(this._x2, this._y2)); + if (!this._customControlPoint_1 && !($defined(avoidControlPointFix) && avoidControlPointFix == 0)) { + this._control1.x = defaultpoints[0].x; + this._control1.y = defaultpoints[0].y; + } + if (!this._customControlPoint_2 && !($defined(avoidControlPointFix) && avoidControlPointFix == 1)) { + this._control2.x = defaultpoints[1].x; + this._control2.y = defaultpoints[1].y; + } + }, + + setDashed : function(length, spacing) { + if ($defined(length) && $defined(spacing)) { + this._native.setAttribute("stroke-dasharray", length + "," + spacing); + } else { + this._native.setAttribute("stroke-dasharray", ""); + } - setSrcControlPoint(control) { - this._customControlPoint_1 = true; - const change = this._control1.x != control.x || this._control1.y != control.y; - if ($defined(control.x)) { - this._control1 = control; - this._control1.x = parseInt(this._control1.x); - this._control1.y = parseInt(this._control1.y); } - if (change) this._updatePath(); - }, - - setDestControlPoint(control) { - this._customControlPoint_2 = true; - const change = this._control2.x != control.x || this._control2.y != control.y; - if ($defined(control.x)) { - this._control2 = control; - this._control2.x = parseInt(this._control2.x); - this._control2.y = parseInt(this._control2.y); - } - if (change) this._updatePath(); - }, - - isSrcControlPointCustom() { - return this._customControlPoint_1; - }, - - isDestControlPointCustom() { - return this._customControlPoint_2; - }, - - setIsSrcControlPointCustom(isCustom) { - this._customControlPoint_1 = isCustom; - }, - - setIsDestControlPointCustom(isCustom) { - this._customControlPoint_2 = isCustom; - }, - - getControlPoints() { - return [this._control1, this._control2]; - }, - - setFrom(x1, y1) { - const change = this._x1 != parseInt(x1) || this._y1 != parseInt(y1); - this._x1 = parseInt(x1); - this._y1 = parseInt(y1); - if (change) this._updatePath(); - }, - - setTo(x2, y2) { - const change = this._x2 != parseInt(x2) || this._y2 != parseInt(y2); - this._x2 = parseInt(x2); - this._y2 = parseInt(y2); - if (change) this._updatePath(); - }, - - getFrom() { - return new core.Point(this._x1, this._y1); - }, - - getTo() { - return new core.Point(this._x2, this._y2); - }, - - setStrokeWidth(width) { - this._style['stroke-width'] = width; - this._updateStyle(); - }, - - setColor(color) { - this._style.stroke = color; - this._style.fill = color; - this._updateStyle(); - }, - - updateLine(avoidControlPointFix) { - this._updatePath(avoidControlPointFix); - }, - - setLineStyle(style) { - this._lineStyle = style; - if (this._lineStyle) { - this._style.fill = this._fill; - } else { - this._fill = this._style.fill; - this._style.fill = 'none'; - } - this._updateStyle(); - this.updateLine(); - }, - - getLineStyle() { - return this._lineStyle; - }, - - setShowEndArrow(visible) { - this._showEndArrow = visible; - this.updateLine(); - }, - - isShowEndArrow() { - return this._showEndArrow; - }, - - setShowStartArrow(visible) { - this._showStartArrow = visible; - this.updateLine(); - }, - - isShowStartArrow() { - return this._showStartArrow; - }, - - _updatePath(avoidControlPointFix) { - if ($defined(this._x1) && $defined(this._y1) && $defined(this._x2) && $defined(this._y2)) { - this._calculateAutoControlPoints(avoidControlPointFix); - const path = `M${this._x1},${this._y1 - } C${this._control1.x + this._x1},${this._control1.y + this._y1} ${ - this._control2.x + this._x2},${this._control2.y + this._y2} ${ - this._x2},${this._y2 - }${this._lineStyle ? ` ${ - this._control2.x + this._x2},${this._control2.y + this._y2 + 3} ${ - this._control1.x + this._x1},${this._control1.y + this._y1 + 5} ${ - this._x1},${this._y1 + 7} Z` - : ''}`; - this._native.setAttribute('d', path); - } - }, - - _updateStyle() { - let style = ''; - for (const key in this._style) { - style += `${key}:${this._style[key]} `; - } - this._native.setAttribute('style', style); - }, - - _calculateAutoControlPoints(avoidControlPointFix) { - // Both points available, calculate real points - const defaultpoints = Shape.calculateDefaultControlPoints(new core.Point(this._x1, this._y1), new core.Point(this._x2, this._y2)); - if (!this._customControlPoint_1 && !($defined(avoidControlPointFix) && avoidControlPointFix == 0)) { - this._control1.x = defaultpoints[0].x; - this._control1.y = defaultpoints[0].y; - } - if (!this._customControlPoint_2 && !($defined(avoidControlPointFix) && avoidControlPointFix == 1)) { - this._control2.x = defaultpoints[1].x; - this._control2.y = defaultpoints[1].y; - } - }, - - setDashed(length, spacing) { - if ($defined(length) && $defined(spacing)) { - this._native.setAttribute('stroke-dasharray', `${length},${spacing}`); - } else { - this._native.setAttribute('stroke-dasharray', ''); - } - }, }); export default CurvedLinePeer; diff --git a/packages/web2d/lib/components/peer/svg/ElementPeer.js b/packages/web2d/lib/components/peer/svg/ElementPeer.js index 2c4b64de..c6afd490 100644 --- a/packages/web2d/lib/components/peer/svg/ElementPeer.js +++ b/packages/web2d/lib/components/peer/svg/ElementPeer.js @@ -1,250 +1,248 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ const EventUtils = require('../utils/EventUtils').default; //eslint-disable-line const TransformUtil = require('../utils/TransformUtils').default; //eslint-disable-line const Element = require('../../Element').default; //eslint-disable-line - + const ElementPeer = new Class({ //eslint-disable-line - initialize(svgElement) { - this._native = svgElement; - if (!this._native.addEvent) { - // Hack bug: https://bugzilla.mozilla.org/show_bug.cgi?id=740811 - for (const key in Element) { - this._native[key] = Element.prototype[key]; - } - } - - this._size = { width: 1, height: 1 }; - this._changeListeners = {}; - // http://support.adobe.com/devsup/devsup.nsf/docs/50493.htm - }, - - setChildren(children) { - this._children = children; - }, - - getChildren() { - let result = this._children; + initialize: function (svgElement) { + this._native = svgElement; + if (!this._native.addEvent) { + // Hack bug: https://bugzilla.mozilla.org/show_bug.cgi?id=740811 + for (var key in Element) { + this._native[key] = Element.prototype[key]; + } + } + + this._size = { width: 1, height: 1 }; + this._changeListeners = {}; + // http://support.adobe.com/devsup/devsup.nsf/docs/50493.htm + }, + + setChildren: function (children) { + this._children = children; + }, + + getChildren: function () { + var result = this._children; if (!$defined(result)) { //eslint-disable-line - result = []; - this._children = result; - } - return result; - }, - - getParent() { - return this._parent; - }, - - setParent(parent) { - this._parent = parent; - }, - - append(elementPeer) { - // Store parent and child relationship. - elementPeer.setParent(this); - const children = this.getChildren(); - children.include(elementPeer); - - // Append element as a child. - this._native.appendChild(elementPeer._native); - - // Broadcast events ... - EventUtils.broadcastChangeEvent(this, 'strokeStyle'); - }, - - removeChild(elementPeer) { - // Store parent and child relationship. - elementPeer.setParent(null); - const children = this.getChildren(); - - // Remove from children array ... - const oldLength = children.length; - - children.erase(elementPeer); + result = []; + this._children = result; + } + return result; + }, + + getParent: function () { + return this._parent; + }, + + setParent: function (parent) { + this._parent = parent; + }, + + append: function (elementPeer) { + // Store parent and child relationship. + elementPeer.setParent(this); + var children = this.getChildren(); + children.include(elementPeer); + + // Append element as a child. + this._native.appendChild(elementPeer._native); + + // Broadcast events ... + EventUtils.broadcastChangeEvent(this, 'strokeStyle'); + }, + + removeChild: function (elementPeer) { + // Store parent and child relationship. + elementPeer.setParent(null); + var children = this.getChildren(); + + // Remove from children array ... + var oldLength = children.length; + + children.erase(elementPeer); $assert(children.length < oldLength, 'element could not be removed:' + elementPeer); //eslint-disable-line - - // Append element as a child. - this._native.removeChild(elementPeer._native); - }, - - /** - * http://www.w3.org/TR/DOM-Level-3-Events/events.html - * http://developer.mozilla.org/en/docs/addEvent - */ - addEvent(type, listener) { + + // Append element as a child. + this._native.removeChild(elementPeer._native); + }, + + /** + * http://www.w3.org/TR/DOM-Level-3-Events/events.html + * http://developer.mozilla.org/en/docs/addEvent + */ + addEvent: function (type, listener) { $(this._native).bind(type, listener); //eslint-disable-line - }, - - trigger(type, event) { + }, + + trigger: function (type, event) { $(this._native).trigger(type, event); //eslint-disable-line - }, - - cloneEvents(from) { - this._native.cloneEvents(from); - }, - - removeEvent(type, listener) { + }, + + cloneEvents: function (from) { + this._native.cloneEvents(from); + }, + + removeEvent: function (type, listener) { $(this._native).unbind(type, listener); //eslint-disable-line - }, - - setSize(width, height) { + }, + + setSize: function (width, height) { if ($defined(width) && this._size.width != parseInt(width)) { //eslint-disable-line - this._size.width = parseInt(width); - this._native.setAttribute('width', parseInt(width)); - } - + this._size.width = parseInt(width); + this._native.setAttribute('width', parseInt(width)); + } + if ($defined(height) && this._size.height != parseInt(height)) { //eslint-disable-line - this._size.height = parseInt(height); - this._native.setAttribute('height', parseInt(height)); - } - - EventUtils.broadcastChangeEvent(this, 'strokeStyle'); - }, - - getSize() { - return { width: this._size.width, height: this._size.height }; - }, - - setFill(color, opacity) { + this._size.height = parseInt(height); + this._native.setAttribute('height', parseInt(height)); + } + + EventUtils.broadcastChangeEvent(this, 'strokeStyle'); + }, + + getSize: function () { + return { width: this._size.width, height: this._size.height }; + }, + + setFill: function (color, opacity) { if ($defined(color)) { //eslint-disable-line - this._native.setAttribute('fill', color); - } + this._native.setAttribute('fill', color); + } if ($defined(opacity)) { //eslint-disable-line - this._native.setAttribute('fill-opacity', opacity); - } - }, - - getFill() { - const color = this._native.getAttribute('fill'); - const opacity = this._native.getAttribute('fill-opacity'); - return { color, opacity: Number(opacity) }; - }, - - getStroke() { - const vmlStroke = this._native; - const color = vmlStroke.getAttribute('stroke'); - const dashstyle = this._stokeStyle; - const opacity = vmlStroke.getAttribute('stroke-opacity'); - const width = vmlStroke.getAttribute('stroke-width'); - return { - color, style: dashstyle, opacity, width, - }; - }, - - setStroke(width, style, color, opacity) { + this._native.setAttribute('fill-opacity', opacity); + } + }, + + getFill: function () { + var color = this._native.getAttribute('fill'); + var opacity = this._native.getAttribute('fill-opacity'); + return { color: color, opacity: Number(opacity) }; + }, + + getStroke: function () { + var vmlStroke = this._native; + var color = vmlStroke.getAttribute('stroke'); + var dashstyle = this._stokeStyle; + var opacity = vmlStroke.getAttribute('stroke-opacity'); + var width = vmlStroke.getAttribute('stroke-width'); + return { color: color, style: dashstyle, opacity: opacity, width: width }; + }, + + setStroke: function (width, style, color, opacity) { if ($defined(width)) { //eslint-disable-line - this._native.setAttribute('stroke-width', `${width}px`); - } + this._native.setAttribute('stroke-width', width + 'px'); + } if ($defined(color)) { //eslint-disable-line - this._native.setAttribute('stroke', color); - } + this._native.setAttribute('stroke', color); + } if ($defined(style)) { //eslint-disable-line - // Scale the dash array in order to be equal to VML. In VML, stroke style doesn't scale. - const dashArrayPoints = this.__stokeStyleToStrokDasharray[style]; - const scale = 1 / TransformUtil.workoutScale(this).width; - - let strokeWidth = this._native.getAttribute('stroke-width'); - strokeWidth = parseFloat(strokeWidth); - - const scaledPoints = []; - for (let i = 0; i < dashArrayPoints.length; i++) { - // VML scale the stroke based on the stroke width. - scaledPoints[i] = dashArrayPoints[i] * strokeWidth; - - // Scale the points based on the scale. - scaledPoints[i] = `${scaledPoints[i] * scale}px`; - } - - // this._native.setAttribute('stroke-dasharray', scaledPoints); - this._stokeStyle = style; - } - + // Scale the dash array in order to be equal to VML. In VML, stroke style doesn't scale. + var dashArrayPoints = this.__stokeStyleToStrokDasharray[style]; + var scale = 1 / TransformUtil.workoutScale(this).width; + + var strokeWidth = this._native.getAttribute('stroke-width'); + strokeWidth = parseFloat(strokeWidth); + + var scaledPoints = []; + for (var i = 0; i < dashArrayPoints.length; i++) { + // VML scale the stroke based on the stroke width. + scaledPoints[i] = dashArrayPoints[i] * strokeWidth; + + // Scale the points based on the scale. + scaledPoints[i] = scaledPoints[i] * scale + 'px'; + } + + // this._native.setAttribute('stroke-dasharray', scaledPoints); + this._stokeStyle = style; + } + if ($defined(opacity)) { //eslint-disable-line - this._native.setAttribute('stroke-opacity', opacity); - } - }, - - /* - * style='visibility: visible' - */ - setVisibility(isVisible) { - this._native.setAttribute('visibility', isVisible ? 'visible' : 'hidden'); - }, - - isVisible() { - const visibility = this._native.getAttribute('visibility'); - return !(visibility == 'hidden'); - }, - - updateStrokeStyle() { - const strokeStyle = this._stokeStyle; - if (this.getParent()) { - if (strokeStyle && strokeStyle != 'solid') { - this.setStroke(null, strokeStyle); - } - } - }, - - attachChangeEventListener(type, listener) { - const listeners = this.getChangeEventListeners(type); + this._native.setAttribute('stroke-opacity', opacity); + } + }, + + /* + * style='visibility: visible' + */ + setVisibility: function (isVisible) { + this._native.setAttribute('visibility', isVisible ? 'visible' : 'hidden'); + }, + + isVisible: function () { + var visibility = this._native.getAttribute('visibility'); + return !(visibility == 'hidden'); + }, + + updateStrokeStyle: function () { + var strokeStyle = this._stokeStyle; + if (this.getParent()) { + if (strokeStyle && strokeStyle != 'solid') { + this.setStroke(null, strokeStyle); + } + } + }, + + attachChangeEventListener: function (type, listener) { + var listeners = this.getChangeEventListeners(type); if (!$defined(listener)) { //eslint-disable-line - throw 'Listener can not be null'; - } - listeners.push(listener); - }, - - getChangeEventListeners(type) { - let listeners = this._changeListeners[type]; + throw 'Listener can not be null'; + } + listeners.push(listener); + }, + + getChangeEventListeners: function (type) { + var listeners = this._changeListeners[type]; if (!$defined(listeners)) { //eslint-disable-line - listeners = []; - this._changeListeners[type] = listeners; - } - return listeners; - }, - - /** - * Move element to the front - */ - moveToFront() { - this._native.parentNode.appendChild(this._native); - }, - - /** - * Move element to the back - */ - moveToBack() { - this._native.parentNode.insertBefore(this._native, this._native.parentNode.firstChild); - }, - - setCursor(type) { - this._native.style.cursor = type; - }, -}); - -ElementPeer.prototype.svgNamespace = 'http://www.w3.org/2000/svg'; -ElementPeer.prototype.linkNamespace = 'http://www.w3.org/1999/xlink'; -ElementPeer.prototype.__stokeStyleToStrokDasharray = { - solid: [], - dot: [1, 3], - dash: [4, 3], - longdash: [10, 2], - dashdot: [5, 3, 1, 3], -}; - + listeners = []; + this._changeListeners[type] = listeners; + } + return listeners; + }, + + /** + * Move element to the front + */ + moveToFront: function () { + this._native.parentNode.appendChild(this._native); + }, + + /** + * Move element to the back + */ + moveToBack: function () { + this._native.parentNode.insertBefore(this._native, this._native.parentNode.firstChild); + }, + + setCursor: function (type) { + this._native.style.cursor = type; + }, +}); + +ElementPeer.prototype.svgNamespace = 'http://www.w3.org/2000/svg'; +ElementPeer.prototype.linkNamespace = 'http://www.w3.org/1999/xlink'; +ElementPeer.prototype.__stokeStyleToStrokDasharray = { + solid: [], + dot: [1, 3], + dash: [4, 3], + longdash: [10, 2], + dashdot: [5, 3, 1, 3], +}; + export default ElementPeer; //eslint-disable-line diff --git a/packages/web2d/lib/components/peer/svg/ElipsePeer.js b/packages/web2d/lib/components/peer/svg/ElipsePeer.js index 303d4dce..0baeeef1 100644 --- a/packages/web2d/lib/components/peer/svg/ElipsePeer.js +++ b/packages/web2d/lib/components/peer/svg/ElipsePeer.js @@ -1,61 +1,61 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; - -const ElipsePeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'ellipse'); - this.parent(svgElement); - this.attachChangeEventListener('strokeStyle', ElementPeer.prototype.updateStrokeStyle); - this._position = { x: 0, y: 0 }; - }, - - setSize(width, height) { - this.parent(width, height); - if ($defined(width)) { - this._native.setAttribute('rx', width / 2); - } - - if ($defined(height)) { - this._native.setAttribute('ry', height / 2); - } - - const pos = this.getPosition(); - this.setPosition(pos.x, pos.y); - }, - - setPosition(cx, cy) { - const size = this.getSize(); - cx += size.width / 2; - cy += size.height / 2; - if ($defined(cx)) { - this._native.setAttribute('cx', cx); - } - - if ($defined(cy)) { - this._native.setAttribute('cy', cy); - } - }, - - getPosition() { - return this._position; - }, -}); - -export default ElipsePeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default + +const ElipsePeer = new Class({ + Extends: ElementPeer, + initialize : function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'ellipse'); + this.parent(svgElement); + this.attachChangeEventListener("strokeStyle", ElementPeer.prototype.updateStrokeStyle); + this._position = {x:0, y:0}; + }, + + setSize : function(width, height) { + this.parent(width, height); + if ($defined(width)) { + this._native.setAttribute('rx', width / 2); + } + + if ($defined(height)) { + this._native.setAttribute('ry', height / 2); + } + + var pos = this.getPosition(); + this.setPosition(pos.x, pos.y); + }, + + setPosition : function(cx, cy) { + var size = this.getSize(); + cx = cx + size.width / 2; + cy = cy + size.height / 2; + if ($defined(cx)) { + this._native.setAttribute('cx', cx); + } + + if ($defined(cy)) { + this._native.setAttribute('cy', cy); + } + }, + + getPosition : function() { + return this._position; + } +}); + +export default ElipsePeer; diff --git a/packages/web2d/lib/components/peer/svg/Font.js b/packages/web2d/lib/components/peer/svg/Font.js index 4243f31c..a34d631a 100644 --- a/packages/web2d/lib/components/peer/svg/Font.js +++ b/packages/web2d/lib/components/peer/svg/Font.js @@ -1,91 +1,93 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const Font = new Class({ - initialize() { - this._size = 10; - this._style = 'normal'; - this._weight = 'normal'; - }, - - init(args) { - if ($defined(args.size)) { - this._size = parseInt(args.size); - } - if ($defined(args.style)) { - this._style = args.style; - } - if ($defined(args.weight)) { - this._weight = args.weight; - } - }, - - getHtmlSize(scale) { - let result = 0; - if (this._size == 6) { - result = this._size * scale.height * 43 / 32; - } - if (this._size == 8) { - result = this._size * scale.height * 42 / 32; - } else if (this._size == 10) { - result = this._size * scale.height * 42 / 32; - } else if (this._size == 15) { - result = this._size * scale.height * 42 / 32; - } - - return result; - }, - - getGraphSize() { - return this._size * 43 / 32; - }, - - getSize() { - return parseInt(this._size); - }, - - getStyle() { - return this._style; - }, - - getWeight() { - return this._weight; - }, - - setSize(size) { - this._size = size; - }, - - setStyle(style) { - this._style = style; - }, - - setWeight(weight) { - this._weight = weight; - }, - - getWidthMargin() { - let result = 0; - if (this._size == 10 || this._size == 6) { - result = 4; - } - return result; - }, -}); - -export default Font; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const Font = new Class({ + initialize : function() { + this._size = 10; + this._style = "normal"; + this._weight = "normal"; + }, + + init : function(args) { + if ($defined(args.size)) { + this._size = parseInt(args.size); + } + if ($defined(args.style)) { + this._style = args.style; + } + if ($defined(args.weight)) { + this._weight = args.weight; + } + }, + + getHtmlSize : function (scale) { + var result = 0; + if (this._size == 6) { + result = this._size * scale.height * 43 / 32; + } + if (this._size == 8) { + result = this._size * scale.height * 42 / 32; + } + else if (this._size == 10) { + result = this._size * scale.height * 42 / 32; + } + else if (this._size == 15) { + result = this._size * scale.height * 42 / 32; + } + + return result; + }, + + getGraphSize : function () { + return this._size * 43 / 32; + }, + + getSize : function () { + return parseInt(this._size); + }, + + getStyle : function () { + return this._style; + }, + + getWeight : function () { + return this._weight; + }, + + setSize : function (size) { + this._size = size; + }, + + setStyle : function (style) { + this._style = style; + }, + + setWeight : function (weight) { + this._weight = weight; + }, + + getWidthMargin : function () { + var result = 0; + if (this._size == 10 || this._size == 6) { + result = 4; + } + return result; + } +}); + +export default Font; diff --git a/packages/web2d/lib/components/peer/svg/GroupPeer.js b/packages/web2d/lib/components/peer/svg/GroupPeer.js index 42f8d54d..552138c5 100644 --- a/packages/web2d/lib/components/peer/svg/GroupPeer.js +++ b/packages/web2d/lib/components/peer/svg/GroupPeer.js @@ -1,131 +1,135 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; -const EventUtils = require('../utils/EventUtils').default; - -const GroupPeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'g'); - this.parent(svgElement); - this._native.setAttribute('preserveAspectRatio', 'none'); - this._coordSize = { width: 1, height: 1 }; - this._native.setAttribute('focusable', 'true'); - this._position = { x: 0, y: 0 }; - this._coordOrigin = { x: 0, y: 0 }; - }, - - setCoordSize(width, height) { - const change = this._coordSize.width != width || this._coordSize.height != height; - this._coordSize.width = width; - this._coordSize.height = height; - - if (change) { this.updateTransform(); } - EventUtils.broadcastChangeEvent(this, 'strokeStyle'); - }, - - getCoordSize() { - return { width: this._coordSize.width, height: this._coordSize.height }; - }, - - /** - * http://www.w3.org/TR/SVG/coords.html#TransformAttribute - * 7.6 The transform attribute - * - * The value of the transform attribute is a , which is defined as a list of transform definitions, which are applied in the order provided. The individual transform definitions are separated by whitespace and/or a comma. The available types of transform definitions include: - * - * * matrix( ), which specifies a transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]. - * - * * translate( []), which specifies a translation by tx and ty. If is not provided, it is assumed to be zero. - * - * * scale( []), which specifies a scale operation by sx and sy. If is not provided, it is assumed to be equal to . - * - * * rotate( [ ]), which specifies a rotation by degrees about a given point. - * If optional parameters and are not supplied, the rotate is about the origin of the current user coordinate system. The operation corresponds to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0]. - * If optional parameters and are supplied, the rotate is about the point (, ). The operation represents the equivalent of the following specification: translate(, ) rotate() translate(-, -). - * - * * skewX(), which specifies a skew transformation along the x-axis. - * - * * skewY(), which specifies a skew transformation along the y-axis. - * */ - - updateTransform() { - let sx = this._size.width / this._coordSize.width; - let sy = this._size.height / this._coordSize.height; - - let cx = this._position.x - this._coordOrigin.x * sx; - let cy = this._position.y - this._coordOrigin.y * sy; - - // FIXME: are we sure of this values? - cx = isNaN(cx) ? 0 : cx; - cy = isNaN(cy) ? 0 : cy; - sx = isNaN(sx) ? 0 : sx; - sy = isNaN(sy) ? 0 : sy; - - this._native.setAttribute('transform', `translate(${cx},${cy}) scale(${sx},${sy})`); - }, - - setOpacity(value) { - this._native.setAttribute('opacity', value); - }, - - setCoordOrigin(x, y) { - const change = x != this._coordOrigin.x || y != this._coordOrigin.y; - if ($defined(x)) { - this._coordOrigin.x = x; - } - - if ($defined(y)) { - this._coordOrigin.y = y; - } - if (change) { this.updateTransform(); } - }, - - setSize(width, height) { - const change = width != this._size.width || height != this._size.height; - this.parent(width, height); - if (change) { this.updateTransform(); } - }, - - setPosition(x, y) { - const change = x != this._position.x || y != this._position.y; - if ($defined(x)) { - this._position.x = parseInt(x); - } - - if ($defined(y)) { - this._position.y = parseInt(y); - } - if (change) { this.updateTransform(); } - }, - - getPosition() { - return { x: this._position.x, y: this._position.y }; - }, - - append(child) { - this.parent(child); - EventUtils.broadcastChangeEvent(child, 'onChangeCoordSize'); - }, - - getCoordOrigin() { - return { x: this._coordOrigin.x, y: this._coordOrigin.y }; - }, -}); - -export default GroupPeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default; +const EventUtils = require('../utils/EventUtils').default; + +const GroupPeer = new Class({ + Extends: ElementPeer, + initialize: function () { + var svgElement = window.document.createElementNS(this.svgNamespace, 'g'); + this.parent(svgElement); + this._native.setAttribute("preserveAspectRatio", "none"); + this._coordSize = {width: 1, height: 1}; + this._native.setAttribute("focusable", "true"); + this._position = {x: 0, y: 0}; + this._coordOrigin = {x: 0, y: 0}; + }, + + setCoordSize: function (width, height) { + var change = this._coordSize.width != width || this._coordSize.height != height; + this._coordSize.width = width; + this._coordSize.height = height; + + if (change) + this.updateTransform(); + EventUtils.broadcastChangeEvent(this, "strokeStyle"); + }, + + getCoordSize: function () { + return {width: this._coordSize.width, height: this._coordSize.height}; + }, + + /** + * http://www.w3.org/TR/SVG/coords.html#TransformAttribute + * 7.6 The transform attribute + * + * The value of the transform attribute is a , which is defined as a list of transform definitions, which are applied in the order provided. The individual transform definitions are separated by whitespace and/or a comma. The available types of transform definitions include: + * + * * matrix( ), which specifies a transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]. + * + * * translate( []), which specifies a translation by tx and ty. If is not provided, it is assumed to be zero. + * + * * scale( []), which specifies a scale operation by sx and sy. If is not provided, it is assumed to be equal to . + * + * * rotate( [ ]), which specifies a rotation by degrees about a given point. + * If optional parameters and are not supplied, the rotate is about the origin of the current user coordinate system. The operation corresponds to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0]. + * If optional parameters and are supplied, the rotate is about the point (, ). The operation represents the equivalent of the following specification: translate(, ) rotate() translate(-, -). + * + * * skewX(), which specifies a skew transformation along the x-axis. + * + * * skewY(), which specifies a skew transformation along the y-axis. + **/ + + updateTransform: function () { + var sx = this._size.width / this._coordSize.width; + var sy = this._size.height / this._coordSize.height; + + var cx = this._position.x - this._coordOrigin.x * sx; + var cy = this._position.y - this._coordOrigin.y * sy; + + //FIXME: are we sure of this values? + cx = isNaN(cx) ? 0 : cx; + cy = isNaN(cy) ? 0 : cy; + sx = isNaN(sx) ? 0 : sx; + sy = isNaN(sy) ? 0 : sy; + + this._native.setAttribute("transform", "translate(" + cx + "," + cy + ") scale(" + sx + "," + sy + ")"); + }, + + setOpacity: function (value) { + this._native.setAttribute("opacity", value); + }, + + setCoordOrigin: function (x, y) { + var change = x != this._coordOrigin.x || y != this._coordOrigin.y; + if ($defined(x)) { + this._coordOrigin.x = x; + } + + if ($defined(y)) { + this._coordOrigin.y = y; + } + if (change) + this.updateTransform(); + }, + + setSize: function (width, height) { + var change = width != this._size.width || height != this._size.height; + this.parent(width, height); + if (change) + this.updateTransform(); + }, + + setPosition: function (x, y) { + var change = x != this._position.x || y != this._position.y; + if ($defined(x)) { + this._position.x = parseInt(x); + } + + if ($defined(y)) { + this._position.y = parseInt(y); + } + if (change) + this.updateTransform(); + }, + + getPosition: function () { + return {x: this._position.x, y: this._position.y}; + }, + + append: function (child) { + this.parent(child); + EventUtils.broadcastChangeEvent(child, "onChangeCoordSize"); + }, + + getCoordOrigin: function () { + return {x: this._coordOrigin.x, y: this._coordOrigin.y}; + } +}); + +export default GroupPeer; diff --git a/packages/web2d/lib/components/peer/svg/ImagePeer.js b/packages/web2d/lib/components/peer/svg/ImagePeer.js index 93639160..4c370446 100644 --- a/packages/web2d/lib/components/peer/svg/ImagePeer.js +++ b/packages/web2d/lib/components/peer/svg/ImagePeer.js @@ -15,36 +15,36 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const ElementPeer = require('./ElementPeer').default; +const ElementPeer = require('./ElementPeer').default const ImagePeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'image'); - this.parent(svgElement); - this._position = { x: 0, y: 0 }; - this._href = ''; - this._native.setAttribute('preserveAspectRatio', 'none'); - }, + Extends: ElementPeer, + initialize : function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'image'); + this.parent(svgElement); + this._position = {x:0,y:0}; + this._href = ""; + this._native.setAttribute("preserveAspectRatio", "none"); + }, - setPosition(x, y) { - this._position = { x, y }; - this._native.setAttribute('y', y); - this._native.setAttribute('x', x); - }, + setPosition : function(x, y) { + this._position = {x:x, y:y}; + this._native.setAttribute('y', y); + this._native.setAttribute('x', x); + }, - getPosition() { - return this._position; - }, + getPosition : function() { + return this._position; + }, - setHref(url) { - this._native.setAttributeNS(this.linkNamespace, 'href', url); - this._href = url; - }, + setHref : function(url) { + this._native.setAttributeNS(this.linkNamespace, "href", url); + this._href = url; + }, - getHref() { - return this._href; - }, + getHref : function() { + return this._href; + } }); export default ImagePeer; diff --git a/packages/web2d/lib/components/peer/svg/LinePeer.js b/packages/web2d/lib/components/peer/svg/LinePeer.js index d67fbd78..eafb5d5e 100644 --- a/packages/web2d/lib/components/peer/svg/LinePeer.js +++ b/packages/web2d/lib/components/peer/svg/LinePeer.js @@ -1,64 +1,64 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; - -const LinePeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'line'); - this.parent(svgElement); - this.attachChangeEventListener('strokeStyle', ElementPeer.prototype.updateStrokeStyle); - }, - - setFrom(x1, y1) { - this._x1 = x1; - this._y1 = y1; - this._native.setAttribute('x1', x1); - this._native.setAttribute('y1', y1); - }, - - setTo(x2, y2) { - this._x2 = x2; - this._y2 = y2; - this._native.setAttribute('x2', x2); - this._native.setAttribute('y2', y2); - }, - - getFrom() { - return new core.Point(this._x1, this._y1); - }, - - getTo() { - return new core.Point(this._x2, this._y2); - }, - - /* - * http://www.zvon.org/HowTo/Output/howto_jj_svg_27.html?at=marker-end - */ - setArrowStyle(startStyle, endStyle) { - if ($defined(startStyle)) { - // Todo: This must be implemented ... - } - - if ($defined(endStyle)) { - // Todo: This must be implemented ... - } - }, -}); - -export default LinePeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default + +const LinePeer = new Class({ + Extends: ElementPeer, + initialize : function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'line'); + this.parent(svgElement); + this.attachChangeEventListener("strokeStyle", ElementPeer.prototype.updateStrokeStyle); + }, + + setFrom : function(x1, y1) { + this._x1 = x1; + this._y1 = y1; + this._native.setAttribute('x1', x1); + this._native.setAttribute('y1', y1); + }, + + setTo : function(x2, y2) { + this._x2 = x2; + this._y2 = y2; + this._native.setAttribute('x2', x2); + this._native.setAttribute('y2', y2); + }, + + getFrom : function() { + return new core.Point(this._x1, this._y1); + }, + + getTo : function() { + return new core.Point(this._x2, this._y2); + }, + + /* + * http://www.zvon.org/HowTo/Output/howto_jj_svg_27.html?at=marker-end + */ + setArrowStyle : function(startStyle, endStyle) { + if ($defined(startStyle)) { + // Todo: This must be implemented ... + } + + if ($defined(endStyle)) { + // Todo: This must be implemented ... + } + } +}); + +export default LinePeer; diff --git a/packages/web2d/lib/components/peer/svg/PolyLinePeer.js b/packages/web2d/lib/components/peer/svg/PolyLinePeer.js index a84da4b4..31a5ea50 100644 --- a/packages/web2d/lib/components/peer/svg/PolyLinePeer.js +++ b/packages/web2d/lib/components/peer/svg/PolyLinePeer.js @@ -1,105 +1,107 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; -const PolyLine = require('../../PolyLine'); - -const PolyLinePeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'polyline'); - this.parent(svgElement); - this.setFill('none'); - this.breakDistance = 10; - }, - - setFrom(x1, y1) { - this._x1 = x1; - this._y1 = y1; - this._updatePath(); - }, - - setTo(x2, y2) { - this._x2 = x2; - this._y2 = y2; - this._updatePath(); - }, - - setStrokeWidth(width) { - this._native.setAttribute('stroke-width', width); - }, - - setColor(color) { - this._native.setAttribute('stroke', color); - }, - - setStyle(style) { - this._style = style; - this._updatePath(); - }, - - getStyle() { - return this._style; - }, - - _updatePath() { - if (this._style == 'Curved') { - this._updateMiddleCurvePath(); - } else if (this._style == 'Straight') { - this._updateStraightPath(); - } else { - this._updateCurvePath(); - } - }, - - _updateStraightPath() { - if ($defined(this._x1) && $defined(this._x2) && $defined(this._y1) && $defined(this._y2)) { - const path = PolyLine.default.prototype.buildStraightPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2); - this._native.setAttribute('points', path); - } - }, - - _updateMiddleCurvePath() { - const x1 = this._x1; - const y1 = this._y1; - const x2 = this._x2; - const y2 = this._y2; - if ($defined(x1) && $defined(x2) && $defined(y1) && $defined(y2)) { - const diff = x2 - x1; - const middlex = (diff / 2) + x1; - let signx = 1; - let signy = 1; - if (diff < 0) { - signx = -1; - } - if (y2 < y1) { - signy = -1; - } - const path = `${x1}, ${y1} ${middlex - 10 * signx}, ${y1} ${middlex}, ${y1 + 10 * signy} ${middlex}, ${y2 - 10 * signy} ${middlex + 10 * signx}, ${y2} ${x2}, ${y2}`; - this._native.setAttribute('points', path); - } - }, - - _updateCurvePath() { - if ($defined(this._x1) && $defined(this._x2) && $defined(this._y1) && $defined(this._y2)) { - const path = PolyLine.default.prototype.buildCurvedPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2); - this._native.setAttribute('points', path); - } - }, -}); - -export default PolyLinePeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default; +const PolyLine = require('../../PolyLine'); + +const PolyLinePeer = new Class({ + Extends: ElementPeer, + initialize : function() { + var svgElement = window.document.createElementNS(this.svgNamespace, 'polyline'); + this.parent(svgElement); + this.setFill("none"); + this.breakDistance = 10; + }, + + setFrom : function(x1, y1) { + this._x1 = x1; + this._y1 = y1; + this._updatePath(); + }, + + setTo : function(x2, y2) { + this._x2 = x2; + this._y2 = y2; + this._updatePath(); + }, + + setStrokeWidth : function(width) { + this._native.setAttribute('stroke-width', width); + }, + + setColor : function(color) { + this._native.setAttribute('stroke', color); + }, + + setStyle : function(style) { + this._style = style; + this._updatePath(); + }, + + getStyle : function() { + return this._style; + }, + + _updatePath : function() { + if (this._style == "Curved") { + this._updateMiddleCurvePath(); + } + else if (this._style == "Straight") { + this._updateStraightPath(); + } + else { + this._updateCurvePath(); + } + }, + + _updateStraightPath : function() { + if ($defined(this._x1) && $defined(this._x2) && $defined(this._y1) && $defined(this._y2)) { + var path = PolyLine.default.prototype.buildStraightPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2); + this._native.setAttribute('points', path); + } + }, + + _updateMiddleCurvePath : function() { + var x1 = this._x1; + var y1 = this._y1; + var x2 = this._x2; + var y2 = this._y2; + if ($defined(x1) && $defined(x2) && $defined(y1) && $defined(y2)) { + var diff = x2 - x1; + var middlex = (diff / 2) + x1; + var signx = 1; + var signy = 1; + if (diff < 0) { + signx = -1; + } + if (y2 < y1) { + signy = -1; + } + var path = x1 + ", " + y1 + " " + (middlex - 10 * signx) + ", " + y1 + " " + middlex + ", " + (y1 + 10 * signy) + " " + middlex + ", " + (y2 - 10 * signy) + " " + (middlex + 10 * signx) + ", " + y2 + " " + x2 + ", " + y2; + this._native.setAttribute('points', path); + } + }, + + _updateCurvePath : function() { + if ($defined(this._x1) && $defined(this._x2) && $defined(this._y1) && $defined(this._y2)) { + var path = PolyLine.default.prototype.buildCurvedPath(this.breakDistance, this._x1, this._y1, this._x2, this._y2); + this._native.setAttribute('points', path); + } + } +}); + +export default PolyLinePeer; diff --git a/packages/web2d/lib/components/peer/svg/RectPeer.js b/packages/web2d/lib/components/peer/svg/RectPeer.js index 1f8cb103..0e07e809 100644 --- a/packages/web2d/lib/components/peer/svg/RectPeer.js +++ b/packages/web2d/lib/components/peer/svg/RectPeer.js @@ -1,60 +1,60 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; - -/** - * http://www.w3.org/TR/SVG/shapes.html#RectElement - */ -const RectPeer = new Class({ - Extends: ElementPeer, - initialize(arc) { - const svgElement = window.document.createElementNS(this.svgNamespace, 'rect'); - this.parent(svgElement); - this._arc = arc; - this.attachChangeEventListener('strokeStyle', ElementPeer.prototype.updateStrokeStyle); - }, - - setPosition(x, y) { - if ($defined(x)) { - this._native.setAttribute('x', parseInt(x)); - } - if ($defined(y)) { - this._native.setAttribute('y', parseInt(y)); - } - }, - - getPosition() { - const x = this._native.getAttribute('x'); - const y = this._native.getAttribute('y'); - return { x: parseInt(x), y: parseInt(y) }; - }, - - setSize(width, height) { - this.parent(width, height); - - const min = width < height ? width : height; - if ($defined(this._arc)) { - // Transform percentages to SVG format. - const arc = (min / 2) * this._arc; - this._native.setAttribute('rx', arc); - this._native.setAttribute('ry', arc); - } - }, -}); - -export default RectPeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default + +/** + * http://www.w3.org/TR/SVG/shapes.html#RectElement + */ +const RectPeer = new Class({ + Extends: ElementPeer, + initialize : function(arc) { + var svgElement = window.document.createElementNS(this.svgNamespace, 'rect'); + this.parent(svgElement); + this._arc = arc; + this.attachChangeEventListener("strokeStyle", ElementPeer.prototype.updateStrokeStyle); + }, + + setPosition :function(x, y) { + if ($defined(x)) { + this._native.setAttribute('x', parseInt(x)); + } + if ($defined(y)) { + this._native.setAttribute('y', parseInt(y)); + } + }, + + getPosition :function() { + var x = this._native.getAttribute('x'); + var y = this._native.getAttribute('y'); + return {x:parseInt(x),y:parseInt(y)}; + }, + + setSize :function(width, height) { + this.parent(width, height); + + var min = width < height ? width : height; + if ($defined(this._arc)) { + // Transform percentages to SVG format. + var arc = (min / 2) * this._arc; + this._native.setAttribute('rx', arc); + this._native.setAttribute('ry', arc); + } + } +}); + +export default RectPeer; diff --git a/packages/web2d/lib/components/peer/svg/TahomaFont.js b/packages/web2d/lib/components/peer/svg/TahomaFont.js index d9e4a17e..cc64a00a 100644 --- a/packages/web2d/lib/components/peer/svg/TahomaFont.js +++ b/packages/web2d/lib/components/peer/svg/TahomaFont.js @@ -1,36 +1,36 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Font = require('./Font').default; - -const TahomaFont = new Class({ - Extends: Font, - initialize() { - this.parent(); - this._fontFamily = 'tahoma'; - }, - - getFontFamily() { - return this._fontFamily; - }, - - getFont() { - return Font.TAHOMA; - }, -}); - -export default TahomaFont; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Font = require('./Font').default + +const TahomaFont = new Class({ + Extends: Font, + initialize : function() { + this.parent(); + this._fontFamily = "tahoma"; + }, + + getFontFamily : function () { + return this._fontFamily; + }, + + getFont : function () { + return Font.TAHOMA; + } +}); + +export default TahomaFont; diff --git a/packages/web2d/lib/components/peer/svg/TextPeer.js b/packages/web2d/lib/components/peer/svg/TextPeer.js index 41b95ef3..51be47e5 100644 --- a/packages/web2d/lib/components/peer/svg/TextPeer.js +++ b/packages/web2d/lib/components/peer/svg/TextPeer.js @@ -1,193 +1,197 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; -const Font = require('../../Font').default; - -const TextPeer = new Class({ - Extends: ElementPeer, - initialize() { - const svgElement = window.document.createElementNS(this.svgNamespace, 'text'); - this.parent(svgElement); - this._position = { x: 0, y: 0 }; - this._font = new Font('Arial', this); - }, - - append(element) { - this._native.appendChild(element._native); - }, - - setTextAlignment(align) { - this._textAlign = align; - }, - - getTextAlignment() { - return $defined(this._textAlign) ? this._textAlign : 'left'; - }, - - setText(text) { - // Remove all previous nodes ... - while (this._native.firstChild) { - this._native.removeChild(this._native.firstChild); - } - - this._text = text; - if (text) { - const lines = text.split('\n'); - const me = this; - // FIXME: we could use underscorejs here - lines.forEach((line) => { - const tspan = window.document.createElementNS(me.svgNamespace, 'tspan'); - tspan.setAttribute('dy', '1em'); - tspan.setAttribute('x', me.getPosition().x); - - tspan.textContent = line.length == 0 ? ' ' : line; - me._native.appendChild(tspan); - }); - } - }, - - getText() { - return this._text; - }, - - setPosition(x, y) { - this._position = { x, y }; - this._native.setAttribute('y', y); - this._native.setAttribute('x', x); - - // tspan must be positioned manually. - $(this._native).children('tspan').attr('x', x); - }, - - getPosition() { - return this._position; - }, - - getNativePosition() { - return $(this._native).position(); - }, - - setFont(font, size, style, weight) { - if ($defined(font)) { - this._font = new Font(font, this); - } - if ($defined(style)) { - this._font.setStyle(style); - } - if ($defined(weight)) { - this._font.setWeight(weight); - } - if ($defined(size)) { - this._font.setSize(size); - } - this._updateFontStyle(); - }, - - _updateFontStyle() { - this._native.setAttribute('font-family', this._font.getFontFamily()); - this._native.setAttribute('font-size', this._font.getGraphSize()); - this._native.setAttribute('font-style', this._font.getStyle()); - this._native.setAttribute('font-weight', this._font.getWeight()); - }, - - setColor(color) { - this._native.setAttribute('fill', color); - }, - - getColor() { - return this._native.getAttribute('fill'); - }, - - setTextSize(size) { - this._font.setSize(size); - this._updateFontStyle(); - }, - - setContentSize(width, height) { - this._native.xTextSize = `${width.toFixed(1)},${height.toFixed(1)}`; - }, - - setStyle(style) { - this._font.setStyle(style); - this._updateFontStyle(); - }, - - setWeight(weight) { - this._font.setWeight(weight); - this._updateFontStyle(); - }, - - setFontFamily(family) { - const oldFont = this._font; - this._font = new Font(family, this); - this._font.setSize(oldFont.getSize()); - this._font.setStyle(oldFont.getStyle()); - this._font.setWeight(oldFont.getWeight()); - this._updateFontStyle(); - }, - - getFont() { - return { - font: this._font.getFont(), - size: parseInt(this._font.getSize()), - style: this._font.getStyle(), - weight: this._font.getWeight(), - }; - }, - - setSize(size) { - this._font.setSize(size); - this._updateFontStyle(); - }, - - getWidth() { - let computedWidth; - // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround - try { - computedWidth = this._native.getBBox().width; - // Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be - // caused when the element is hidden. I don't know why, but it works ... - if (computedWidth == 0) { - const bbox = this._native.getBBox(); - computedWidth = bbox.width; - } - } catch (e) { - computedWidth = 10; - } - - let width = parseInt(computedWidth); - width += this._font.getWidthMargin(); - return width; - }, - - getHeight() { - // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround - try { - var computedHeight = this._native.getBBox().height; - } catch (e) { - computedHeight = 10; - } - return parseInt(computedHeight); - }, - - getHtmlFontSize() { - return this._font.getHtmlSize(); - }, -}); - -export default TextPeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default +const Font = require('../../Font').default + +const TextPeer = new Class({ + Extends: ElementPeer, + initialize: function () { + var svgElement = window.document.createElementNS(this.svgNamespace, 'text'); + this.parent(svgElement); + this._position = {x: 0, y: 0}; + this._font = new Font("Arial", this); + }, + + append: function (element) { + this._native.appendChild(element._native); + }, + + setTextAlignment: function (align) { + this._textAlign = align; + }, + + + getTextAlignment: function () { + return $defined(this._textAlign) ? this._textAlign : 'left'; + }, + + setText: function (text) { + // Remove all previous nodes ... + while (this._native.firstChild) { + this._native.removeChild(this._native.firstChild); + } + + this._text = text; + if (text) { + var lines = text.split('\n'); + var me = this; + //FIXME: we could use underscorejs here + lines.forEach(function (line) { + var tspan = window.document.createElementNS(me.svgNamespace, 'tspan'); + tspan.setAttribute('dy', '1em'); + tspan.setAttribute('x', me.getPosition().x); + + tspan.textContent = line.length == 0 ? " " : line; + me._native.appendChild(tspan); + }); + } + }, + + getText: function () { + return this._text; + }, + + setPosition: function (x, y) { + this._position = {x: x, y: y}; + this._native.setAttribute('y', y); + this._native.setAttribute('x', x); + + // tspan must be positioned manually. + $(this._native).children('tspan').attr('x', x); + }, + + getPosition: function () { + return this._position; + }, + + getNativePosition: function() { + return $(this._native).position(); + }, + + setFont: function (font, size, style, weight) { + if ($defined(font)) { + this._font = new Font(font, this); + } + if ($defined(style)) { + this._font.setStyle(style); + } + if ($defined(weight)) { + this._font.setWeight(weight); + } + if ($defined(size)) { + this._font.setSize(size); + } + this._updateFontStyle(); + }, + + _updateFontStyle: function () { + this._native.setAttribute('font-family', this._font.getFontFamily()); + this._native.setAttribute('font-size', this._font.getGraphSize()); + this._native.setAttribute('font-style', this._font.getStyle()); + this._native.setAttribute('font-weight', this._font.getWeight()); + }, + + setColor: function (color) { + this._native.setAttribute('fill', color); + }, + + getColor: function () { + return this._native.getAttribute('fill'); + }, + + setTextSize: function (size) { + this._font.setSize(size); + this._updateFontStyle(); + }, + + setContentSize: function (width, height) { + this._native.xTextSize = width.toFixed(1) + "," + height.toFixed(1); + }, + + setStyle: function (style) { + this._font.setStyle(style); + this._updateFontStyle(); + }, + + setWeight: function (weight) { + this._font.setWeight(weight); + this._updateFontStyle(); + }, + + setFontFamily: function (family) { + var oldFont = this._font; + this._font = new Font(family, this); + this._font.setSize(oldFont.getSize()); + this._font.setStyle(oldFont.getStyle()); + this._font.setWeight(oldFont.getWeight()); + this._updateFontStyle(); + }, + + getFont: function () { + return { + font: this._font.getFont(), + size: parseInt(this._font.getSize()), + style: this._font.getStyle(), + weight: this._font.getWeight() + }; + }, + + setSize: function (size) { + this._font.setSize(size); + this._updateFontStyle(); + }, + + getWidth: function () { + var computedWidth; + // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround + try { + + computedWidth = this._native.getBBox().width; + // Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be + // caused when the element is hidden. I don't know why, but it works ... + if (computedWidth == 0) { + var bbox = this._native.getBBox(); + computedWidth = bbox.width; + } + + } catch (e) { + computedWidth = 10; + + } + + var width = parseInt(computedWidth); + width = width + this._font.getWidthMargin(); + return width; + }, + + getHeight: function () { + // Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround + try { + var computedHeight = this._native.getBBox().height; + } catch (e) { + computedHeight = 10; + } + return parseInt(computedHeight); + }, + + getHtmlFontSize: function () { + return this._font.getHtmlSize(); + } +}); + +export default TextPeer; diff --git a/packages/web2d/lib/components/peer/svg/TimesFont.js b/packages/web2d/lib/components/peer/svg/TimesFont.js index 80419956..443b2c02 100644 --- a/packages/web2d/lib/components/peer/svg/TimesFont.js +++ b/packages/web2d/lib/components/peer/svg/TimesFont.js @@ -1,36 +1,36 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Font = require('./Font').default; - -const TimesFont = new Class({ - Extends: Font, - initialize() { - this.parent(); - this._fontFamily = 'times'; - }, - - getFontFamily() { - return this._fontFamily; - }, - - getFont() { - return TIMES; - }, -}); - -export default TimesFont; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Font = require('./Font').default + +const TimesFont = new Class({ + Extends: Font, + initialize : function() { + this.parent(); + this._fontFamily = "times"; + }, + + getFontFamily :function () { + return this._fontFamily; + }, + + getFont : function () { + return TIMES; + } +}); + +export default TimesFont; diff --git a/packages/web2d/lib/components/peer/svg/VerdanaFont.js b/packages/web2d/lib/components/peer/svg/VerdanaFont.js index a35f1a8a..1361e981 100644 --- a/packages/web2d/lib/components/peer/svg/VerdanaFont.js +++ b/packages/web2d/lib/components/peer/svg/VerdanaFont.js @@ -1,36 +1,36 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Font = require('./Font').default; - -const VerdanaFont = new Class({ - Extends: Font, - initialize() { - this.parent(); - this._fontFamily = 'verdana'; - }, - - getFontFamily() { - return this._fontFamily; - }, - - getFont() { - return Font.VERDANA; - }, -}); - -export default VerdanaFont; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Font = require('./Font').default + +const VerdanaFont = new Class({ + Extends: Font, + initialize : function() { + this.parent(); + this._fontFamily = "verdana"; + }, + + getFontFamily : function () { + return this._fontFamily; + }, + + getFont : function () { + return Font.VERDANA; + } +}); + +export default VerdanaFont; diff --git a/packages/web2d/lib/components/peer/svg/WorkspacePeer.js b/packages/web2d/lib/components/peer/svg/WorkspacePeer.js index b243eae4..0739ba9c 100644 --- a/packages/web2d/lib/components/peer/svg/WorkspacePeer.js +++ b/packages/web2d/lib/components/peer/svg/WorkspacePeer.js @@ -1,111 +1,112 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ElementPeer = require('./ElementPeer').default; -const EventUtils = require('../utils/EventUtils').default; - -const WorkspacePeer = new Class({ - Extends: ElementPeer, - initialize(element) { - this._element = element; - const svgElement = window.document.createElementNS(this.svgNamespace, 'svg'); - this.parent(svgElement); - this._native.setAttribute('focusable', 'true'); - this._native.setAttribute('id', 'workspace'); - this._native.setAttribute('preserveAspectRatio', 'none'); - }, - - /** - * http://www.w3.org/TR/SVG/coords.html 7.7 The viewBox attribute - * It is often desirable to specify that a given set of graphics stretch to fit a particular container element. The viewBox attribute provides this capability. - * - * All elements that establish a new viewport (see elements that establish viewports), plus the 'marker', 'pattern' and 'view' elements have attribute viewBox. The value of the viewBox attribute is a list of four numbers , , and , separated by whitespace and/or a comma, which specify a rectangle in user space which should be mapped to the bounds of the viewport established by the given element, taking into account attribute preserveAspectRatio. If specified, an additional transformation is applied to all descendants of the given element to achieve the specified effect. - * - * A negative value for or is an error (see Error processing). A value of zero disables rendering of the element. - * - */ - - setCoordSize(width, height) { - const viewBox = this._native.getAttribute('viewBox'); - let coords = [0, 0, 0, 0]; - if (viewBox != null) { - coords = viewBox.split(/ /); - } - if ($defined(width)) { - coords[2] = width; - } - - if ($defined(height)) { - coords[3] = height; - } - - this._native.setAttribute('viewBox', coords.join(' ')); - this._native.setAttribute('preserveAspectRatio', 'none'); - EventUtils.broadcastChangeEvent(this, 'strokeStyle'); - }, - - getCoordSize() { - const viewBox = this._native.getAttribute('viewBox'); - let coords = [1, 1, 1, 1]; - if (viewBox != null) { - coords = viewBox.split(/ /); - } - return { width: coords[2], height: coords[3] }; - }, - - setCoordOrigin(x, y) { - const viewBox = this._native.getAttribute('viewBox'); - - // ViewBox min-x ,min-y by default initializated with 0 and 0. - let coords = [0, 0, 0, 0]; - if (viewBox != null) { - coords = viewBox.split(/ /); - } - - if ($defined(x)) { - coords[0] = x; - } - - if ($defined(y)) { - coords[1] = y; - } - - this._native.setAttribute('viewBox', coords.join(' ')); - }, - - append(child) { - this.parent(child); - EventUtils.broadcastChangeEvent(child, 'onChangeCoordSize'); - }, - - getCoordOrigin(child) { - const viewBox = this._native.getAttribute('viewBox'); - let coords = [1, 1, 1, 1]; - if (viewBox != null) { - coords = viewBox.split(/ /); - } - const x = parseFloat(coords[0]); - const y = parseFloat(coords[1]); - return { x, y }; - }, - - getPosition() { - return { x: 0, y: 0 }; - }, -}); - -export default WorkspacePeer; +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ElementPeer = require('./ElementPeer').default +const EventUtils = require('../utils/EventUtils').default; + +const WorkspacePeer = new Class({ + Extends: ElementPeer, + initialize: function (element) { + this._element = element; + var svgElement = window.document.createElementNS(this.svgNamespace, 'svg'); + this.parent(svgElement); + this._native.setAttribute("focusable", "true"); + this._native.setAttribute("id", "workspace"); + this._native.setAttribute("preserveAspectRatio", "none"); + + }, + + /** + * http://www.w3.org/TR/SVG/coords.html 7.7 The viewBox attribute + * It is often desirable to specify that a given set of graphics stretch to fit a particular container element. The viewBox attribute provides this capability. + * + * All elements that establish a new viewport (see elements that establish viewports), plus the 'marker', 'pattern' and 'view' elements have attribute viewBox. The value of the viewBox attribute is a list of four numbers , , and , separated by whitespace and/or a comma, which specify a rectangle in user space which should be mapped to the bounds of the viewport established by the given element, taking into account attribute preserveAspectRatio. If specified, an additional transformation is applied to all descendants of the given element to achieve the specified effect. + * + * A negative value for or is an error (see Error processing). A value of zero disables rendering of the element. + * + */ + + setCoordSize: function (width, height) { + var viewBox = this._native.getAttribute('viewBox'); + var coords = [0, 0, 0, 0]; + if (viewBox != null) { + coords = viewBox.split(/ /); + } + if ($defined(width)) { + coords[2] = width; + } + + if ($defined(height)) { + coords[3] = height; + } + + this._native.setAttribute('viewBox', coords.join(" ")); + this._native.setAttribute("preserveAspectRatio", "none"); + EventUtils.broadcastChangeEvent(this, "strokeStyle"); + }, + + getCoordSize: function () { + var viewBox = this._native.getAttribute('viewBox'); + var coords = [1, 1, 1, 1]; + if (viewBox != null) { + coords = viewBox.split(/ /); + } + return {width: coords[2], height: coords[3]}; + }, + + setCoordOrigin: function (x, y) { + var viewBox = this._native.getAttribute('viewBox'); + + // ViewBox min-x ,min-y by default initializated with 0 and 0. + var coords = [0, 0, 0, 0]; + if (viewBox != null) { + coords = viewBox.split(/ /); + } + + if ($defined(x)) { + coords[0] = x; + } + + if ($defined(y)) { + coords[1] = y; + } + + this._native.setAttribute('viewBox', coords.join(" ")); + }, + + append: function (child) { + this.parent(child); + EventUtils.broadcastChangeEvent(child, "onChangeCoordSize"); + }, + + getCoordOrigin: function (child) { + var viewBox = this._native.getAttribute('viewBox'); + var coords = [1, 1, 1, 1]; + if (viewBox != null) { + coords = viewBox.split(/ /); + } + var x = parseFloat(coords[0]); + var y = parseFloat(coords[1]); + return {x: x, y: y}; + }, + + getPosition: function () { + return {x: 0, y: 0}; + } +}); + +export default WorkspacePeer; diff --git a/packages/web2d/lib/components/peer/utils/EventUtils.js b/packages/web2d/lib/components/peer/utils/EventUtils.js index 6433d228..eae75513 100644 --- a/packages/web2d/lib/components/peer/utils/EventUtils.js +++ b/packages/web2d/lib/components/peer/utils/EventUtils.js @@ -1,37 +1,37 @@ -/* - * Copyright [2015] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const EventUtils = { +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const EventUtils = { broadcastChangeEvent: function (elementPeer, type) { //eslint-disable-line - const listeners = elementPeer.getChangeEventListeners(type); + var listeners = elementPeer.getChangeEventListeners(type); if ($defined(listeners)) { //eslint-disable-line - for (let i = 0; i < listeners.length; i++) { - const listener = listeners[i]; - listener.call(elementPeer, null); - } - } - - const children = elementPeer.getChildren(); - for (let j = 0; j < children.length; j++) { - const child = children[j]; - EventUtils.broadcastChangeEvent(child, type); - } - }, -}; - -export default EventUtils; + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener.call(elementPeer, null); + } + } + + var children = elementPeer.getChildren(); + for (var j = 0; j < children.length; j++) { + var child = children[j]; + EventUtils.broadcastChangeEvent(child, type); + } + }, +}; + +export default EventUtils; diff --git a/packages/web2d/lib/components/peer/utils/TransformUtils.js b/packages/web2d/lib/components/peer/utils/TransformUtils.js index 9ffa6af6..bb885d22 100644 --- a/packages/web2d/lib/components/peer/utils/TransformUtils.js +++ b/packages/web2d/lib/components/peer/utils/TransformUtils.js @@ -1,38 +1,39 @@ -/* -* Copyright [2015] [wisemapping] -* -* Licensed under WiseMapping Public License, Version 1.0 (the "License"). -* It is basically the Apache License, Version 2.0 (the "License") plus the -* "powered by wisemapping" text requirement on every single page; -* you may not use this file except in compliance with the License. -* You may obtain a copy of the license at -* -* http://www.wisemapping.org/license -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -const TransformUtil = { - +/* +* Copyright [2015] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +const TransformUtil = { + workoutScale: function(elementPeer) //eslint-disable-line - { - let current = elementPeer.getParent(); - let width = 1; - let height = 1; - while (current) { - const coordSize = current.getCoordSize(); - const size = current.getSize(); - - width *= (parseInt(size.width) / coordSize.width); - height *= (parseInt(size.height) / coordSize.height); - current = current.getParent(); - } - return { width, height }; - }, -}; - -export default TransformUtil; + { + var current = elementPeer.getParent(); + var width = 1; + var height = 1; + while (current) + { + var coordSize = current.getCoordSize(); + var size = current.getSize(); + + width = width * (parseInt(size.width) / coordSize.width); + height = height * (parseInt(size.height) / coordSize.height); + current = current.getParent(); + } + return {width:width,height:height}; + } +}; + +export default TransformUtil; diff --git a/packages/web2d/lib/web2d.js b/packages/web2d/lib/web2d.js index 79dc0bae..ee4b9c36 100644 --- a/packages/web2d/lib/web2d.js +++ b/packages/web2d/lib/web2d.js @@ -1,6 +1,8 @@ +'use strict'; + function web2D() { - global.$ = require('jquery'); - require('mootools'); + global.$ = require('jquery'); + require('mootools'); const coreJs = require('@wismapping/core-js'); //eslint-disable-line global.core = coreJs(); //eslint-disable-line @@ -35,38 +37,38 @@ function web2D() { const verdanaFont = require('./components/peer/svg/VerdanaFont').default; //eslint-disable-line const point = require('./components/Point').default; //eslint-disable-line - const web2d = { - ElementPeer: elementPeer, - Element: element, - Workspace: workspace, - WorkspacePeer: workspacePeer, - Toolkit: toolkit, - Elipse: elipse, - ElipsePeer: elipsePeer, - LinePeer: linePeer, - Line: line, - PolyLine: polyLine, - CurvedLine: curvedLine, - Arrow: arrow, - PolyLinePeer: polyLinePeer, - CurvedLinePeer: curvedLinePeer, - ArrowPeer: arrowPeer, - GroupPeer: groupPeer, - Group: group, - Rect: rect, - RectPeer: rectPeer, - Text: text, - TextPeer: textPeer, - TransformUtils: transformUtils, - EventUtils: eventUtils, - Font: font, - FontPeer: fontPeer, - TahomaFont: tahomaFont, - TimesFont: timesFont, - ArialFont: arialFont, - VerdanaFont: verdanaFont, - Point: point, - }; + const web2d = { + ElementPeer: elementPeer, + Element: element, + Workspace: workspace, + WorkspacePeer: workspacePeer, + Toolkit: toolkit, + Elipse: elipse, + ElipsePeer: elipsePeer, + LinePeer: linePeer, + Line: line, + PolyLine: polyLine, + CurvedLine: curvedLine, + Arrow: arrow, + PolyLinePeer: polyLinePeer, + CurvedLinePeer: curvedLinePeer, + ArrowPeer: arrowPeer, + GroupPeer: groupPeer, + Group: group, + Rect: rect, + RectPeer: rectPeer, + Text: text, + TextPeer: textPeer, + TransformUtils: transformUtils, + EventUtils: eventUtils, + Font: font, + FontPeer: fontPeer, + TahomaFont: tahomaFont, + TimesFont: timesFont, + ArialFont: arialFont, + VerdanaFont: verdanaFont, + Point: point, + }; return web2d; //eslint-disable-line } diff --git a/packages/web2d/package-lock.json b/packages/web2d/package-lock.json deleted file mode 100644 index b8a90c97..00000000 --- a/packages/web2d/package-lock.json +++ /dev/null @@ -1,2418 +0,0 @@ -{ - "name": "@wismapping/web2d", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", - "requires": { - "@babel/highlight": "^7.14.5" - } - }, - "@babel/generator": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", - "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", - "requires": { - "@babel/types": "^7.15.4", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", - "requires": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", - "requires": { - "@babel/types": "^7.15.4" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", - "requires": { - "@babel/types": "^7.15.4" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", - "requires": { - "@babel/types": "^7.15.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" - }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz", - "integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==" - }, - "@babel/runtime": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", - "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/runtime-corejs3": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.15.4.tgz", - "integrity": "sha512-lWcAqKeB624/twtTc3w6w/2o9RqJPaNBhPGK6DKLSiwuVWC7WFkypWyNg+CpZoyJH0jVzv1uMtXZ/5/lQOLtCg==", - "dev": true, - "requires": { - "core-js-pure": "^3.16.0", - "regenerator-runtime": "^0.13.4" - } - }, - "@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - } - }, - "@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", - "requires": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - } - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.32.0.tgz", - "integrity": "sha512-+OWTuWRSbWI1KDK8iEyG/6uK2rTm3kpS38wuVifGUTDB6kjEuNrzBI1MUtxnkneuWG/23QehABe2zHHrj+4yuA==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "4.32.0", - "@typescript-eslint/scope-manager": "4.32.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.32.0.tgz", - "integrity": "sha512-WLoXcc+cQufxRYjTWr4kFt0DyEv6hDgSaFqYhIzQZ05cF+kXfqXdUh+//kgquPJVUBbL3oQGKQxwPbLxHRqm6A==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.32.0", - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/typescript-estree": "4.32.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.32.0.tgz", - "integrity": "sha512-lhtYqQ2iEPV5JqV7K+uOVlPePjClj4dOw7K4/Z1F2yvjIUvyr13yJnDzkK6uon4BjHYuHy3EG0c2Z9jEhFk56w==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "4.32.0", - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/typescript-estree": "4.32.0", - "debug": "^4.3.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz", - "integrity": "sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/visitor-keys": "4.32.0" - } - }, - "@typescript-eslint/types": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.32.0.tgz", - "integrity": "sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz", - "integrity": "sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.32.0", - "@typescript-eslint/visitor-keys": "4.32.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz", - "integrity": "sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.32.0", - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - } - }, - "array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, - "array.prototype.flatmap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz", - "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, - "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "axe-core": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.3.tgz", - "integrity": "sha512-/lqqLAmuIPi79WYfRpy2i8z+x+vxU3zX2uAm0gs1q52qTuKwolOj1P8XbufpXcsydrpKx2yGn2wzAnxCMV86QA==", - "dev": true - }, - "axobject-query": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", - "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", - "dev": true - }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "confusing-browser-globals": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", - "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", - "dev": true - }, - "core-js-pure": { - "version": "3.18.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.18.1.tgz", - "integrity": "sha512-kmW/k8MaSuqpvA1xm2l3TVlBuvW+XBkcaOroFUpO3D4lsTGQWBTb/tBDCf/PNkkPLrwgrkQRIYNPB0CeqGJWGQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "damerau-levenshtein": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz", - "integrity": "sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw==", - "dev": true - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "eslint-config-airbnb": { - "version": "18.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", - "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", - "dev": true, - "requires": { - "eslint-config-airbnb-base": "^14.2.1", - "object.assign": "^4.1.2", - "object.entries": "^1.1.2" - } - }, - "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", - "dev": true, - "requires": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.2" - } - }, - "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "resolve": "^1.20.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-module-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", - "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-plugin-import": { - "version": "2.24.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz", - "integrity": "sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==", - "dev": true, - "requires": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", - "has": "^1.0.3", - "is-core-module": "^2.6.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.4", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "eslint-plugin-jsx-a11y": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", - "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.11.2", - "aria-query": "^4.2.2", - "array-includes": "^3.1.1", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.0.2", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.6", - "emoji-regex": "^9.0.0", - "has": "^1.0.3", - "jsx-ast-utils": "^3.1.0", - "language-tags": "^1.0.5" - }, - "dependencies": { - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - } - } - }, - "eslint-plugin-react": { - "version": "7.26.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.26.1.tgz", - "integrity": "sha512-Lug0+NOFXeOE+ORZ5pbsh6mSKjBKXDXItUD2sQoT+5Yl0eoT82DqnXeTMfUare4QVCn9QwXbfzO/dBLjLXwVjQ==", - "dev": true, - "requires": { - "array-includes": "^3.1.3", - "array.prototype.flatmap": "^1.2.4", - "doctrine": "^2.1.0", - "estraverse": "^5.2.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.0.4", - "object.entries": "^1.1.4", - "object.fromentries": "^2.0.4", - "object.hasown": "^1.0.0", - "object.values": "^1.1.4", - "prop-types": "^15.7.2", - "resolve": "^2.0.0-next.3", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.5" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - }, - "resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-react-hooks": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz", - "integrity": "sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" - }, - "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-core-module": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", - "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsx-ast-utils": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz", - "integrity": "sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA==", - "dev": true, - "requires": { - "array-includes": "^3.1.3", - "object.assign": "^4.1.2" - } - }, - "language-subtag-registry": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", - "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==", - "dev": true - }, - "language-tags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=", - "dev": true, - "requires": { - "language-subtag-registry": "~0.3.2" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "object.hasown": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.0.0.tgz", - "integrity": "sha512-qYMF2CLIjxxLGleeM0jrcB4kiv3loGVAjKQKvH8pSU/i2VcRRvUNmxbD+nEMmrXRfORhuVJuH8OtSYCZoue3zA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.1" - } - }, - "object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - } - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "string.prototype.matchall": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz", - "integrity": "sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2", - "get-intrinsic": "^1.1.1", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.3.1", - "side-channel": "^1.0.4" - } - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", - "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tsconfig-paths": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", - "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", - "dev": true, - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } -} diff --git a/packages/web2d/package.json b/packages/web2d/package.json index e28396b4..f56b9f2d 100644 --- a/packages/web2d/package.json +++ b/packages/web2d/package.json @@ -12,7 +12,6 @@ "files": [ "lib" ], - "type": "commonjs", "publishConfig": { "registry": "https://registry.yarnpkg.com" }, @@ -29,20 +28,9 @@ "@babel/core": "^7.14.6", "@babel/plugin-transform-modules-commonjs": "^7.14.5", "@babel/preset-env": "^7.14.7", - "@typescript-eslint/eslint-plugin": "^4.32.0", - "@typescript-eslint/parser": "^4.32.0", "babel-loader": "^8.2.2", "clean-webpack-plugin": "^4.0.0-alpha.0", "core-js": "^3.15.2", - "eslint": "^7.32.0", - "eslint-config-airbnb": "^18.2.1", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-loader": "^4.0.2", - "eslint-plugin-import": "^2.24.2", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-only-warn": "^1.0.3", - "eslint-plugin-react": "^7.26.1", - "eslint-plugin-react-hooks": "^4.2.0", "html-webpack-plugin": "^5.3.2", "nodemon": "^2.0.12", "webpack": "^5.44.0", @@ -53,7 +41,6 @@ "dependencies": { "@wisemapping/mindplot": "^0.0.1", "@wismapping/core-js": "^0.0.1", - "babel-eslint": "^10.1.0", "jquery": "2.1.0", "mootools": "1.4.5" } diff --git a/packages/web2d/webpack.common.js b/packages/web2d/webpack.common.js index a4d7637e..108e5fbd 100644 --- a/packages/web2d/webpack.common.js +++ b/packages/web2d/webpack.common.js @@ -12,15 +12,19 @@ module.exports = { module: { rules: [ { - use: ["babel-loader", "eslint-loader"], - test: /.js$/, + use: 'babel-loader', + test: /.(js|jsx)$/, exclude: /node_modules/, - } + }, + { + type: 'asset', + test: /\.(png|svg|jpg|jpeg|gif)$/i, + }, ], }, target: 'web', resolve: { - extensions: ['.js', '.json'], + extensions: ['.js', '.jsx', '.json'], }, plugins: [new CleanWebpackPlugin()], }; diff --git a/yarn.lock b/yarn.lock index 8c83ce9b..cdd8fcd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -228,7 +228,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5", "@babel/parser@^7.7.0": +"@babel/parser@^7.15.0", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae" @@ -748,7 +748,7 @@ core-js-pure "^3.16.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" dependencies: @@ -762,7 +762,7 @@ "@babel/parser" "^7.15.4" "@babel/types" "^7.15.4" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": +"@babel/traverse@^7.13.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.4.5": version "7.15.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" dependencies: @@ -776,7 +776,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.4.4", "@babel/types@^7.7.0": +"@babel/types@^7.15.4", "@babel/types@^7.15.6", "@babel/types@^7.4.4": version "7.15.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" dependencies: @@ -1989,10 +1989,6 @@ version "1.0.33" resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.33.tgz#099b0712d824d15e2660c20e1c16e6a8381f308c" -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - "@types/lodash@^4.14.150": version "4.14.175" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45" @@ -2140,7 +2136,7 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4.31.0", "@typescript-eslint/eslint-plugin@^4.32.0", "@typescript-eslint/eslint-plugin@^4.8.1": +"@typescript-eslint/eslint-plugin@^4.31.0", "@typescript-eslint/eslint-plugin@^4.8.1": version "4.32.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.32.0.tgz#46d2370ae9311092f2a6f7246d28357daf2d4e89" dependencies: @@ -2164,7 +2160,7 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.31.0", "@typescript-eslint/parser@^4.32.0", "@typescript-eslint/parser@^4.8.1": +"@typescript-eslint/parser@^4.31.0", "@typescript-eslint/parser@^4.8.1": version "4.32.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.32.0.tgz#751ecca0e2fecd3d44484a9b3049ffc1871616e5" dependencies: @@ -2634,7 +2630,7 @@ array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" -array-includes@^3.1.1, array-includes@^3.1.3: +array-includes@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" dependencies: @@ -2662,14 +2658,6 @@ array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" -array.prototype.flat@^1.2.4: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - array.prototype.flatmap@^1.2.4: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz#908dc82d8a406930fdf38598d51e7411d18d4446" @@ -2700,10 +2688,6 @@ assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" -ast-types-flow@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" - astral-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" @@ -2754,31 +2738,12 @@ aws4@^1.8.0: version "1.11.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" -axe-core@^4.0.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.3.tgz#b55cd8e8ddf659fe89b064680e1c6a4dceab0325" - axios@^0.21.0, axios@^0.21.1: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" dependencies: follow-redirects "^1.14.0" -axobject-query@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" - -babel-eslint@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - babel-loader@^8.2.2: version "8.2.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" @@ -3611,10 +3576,6 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -confusing-browser-globals@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" - connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -4040,10 +4001,6 @@ cypress@^6.5.0: url "^0.11.0" yauzl "^2.10.0" -damerau-levenshtein@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz#64368003512a1a6992593741a09a9d31a836f55d" - dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" @@ -4098,7 +4055,7 @@ debug@3.1.0: version "0.8.1" resolved "https://registry.yarnpkg.com/debug/-/debug-0.8.1.tgz#20ff4d26f5e422cb68a1bacbbb61039ad8c1c130" -debug@^3.1.0, debug@^3.1.1, debug@^3.2.6, debug@^3.2.7: +debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" dependencies: @@ -4402,10 +4359,6 @@ emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" -emoji-regex@^9.0.0: - version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" - emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" @@ -4504,31 +4457,6 @@ es-abstract@^1.18.0-next.2, es-abstract@^1.18.1, es-abstract@^1.18.2, es-abstrac string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-abstract@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.1" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" - is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - es-module-lexer@^0.9.0: version "0.9.2" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.2.tgz#d0a8c72c5d904014111fac7fab4c92b9ac545564" @@ -4575,95 +4503,15 @@ escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" -eslint-config-airbnb-base@^14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.2" - -eslint-config-airbnb@^18.2.1: - version "18.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9" - dependencies: - eslint-config-airbnb-base "^14.2.1" - object.assign "^4.1.2" - object.entries "^1.1.2" - eslint-config-prettier@^8.0.0: version "8.3.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - dependencies: - debug "^3.2.7" - resolve "^1.20.0" - -eslint-loader@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-4.0.2.tgz#386a1e21bcb613b3cf2d252a3b708023ccfb41ec" - dependencies: - find-cache-dir "^3.3.1" - fs-extra "^8.1.0" - loader-utils "^2.0.0" - object-hash "^2.0.3" - schema-utils "^2.6.5" - -eslint-module-utils@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534" - dependencies: - debug "^3.2.7" - pkg-dir "^2.0.0" - -eslint-plugin-import@^2.24.2: - version "2.24.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da" - dependencies: - array-includes "^3.1.3" - array.prototype.flat "^1.2.4" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.6.2" - find-up "^2.0.0" - has "^1.0.3" - is-core-module "^2.6.0" - minimatch "^3.0.4" - object.values "^1.1.4" - pkg-up "^2.0.0" - read-pkg-up "^3.0.0" - resolve "^1.20.0" - tsconfig-paths "^3.11.0" - -eslint-plugin-jsx-a11y@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd" - dependencies: - "@babel/runtime" "^7.11.2" - aria-query "^4.2.2" - array-includes "^3.1.1" - ast-types-flow "^0.0.7" - axe-core "^4.0.2" - axobject-query "^2.2.0" - damerau-levenshtein "^1.0.6" - emoji-regex "^9.0.0" - has "^1.0.3" - jsx-ast-utils "^3.1.0" - language-tags "^1.0.5" - -eslint-plugin-only-warn@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-only-warn/-/eslint-plugin-only-warn-1.0.3.tgz#a75f3a9ded7f03e9808e75ec27f22b644084506e" - eslint-plugin-react-hooks@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" -eslint-plugin-react@^7.21.5, eslint-plugin-react@^7.26.1: +eslint-plugin-react@^7.21.5: version "7.26.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.26.1.tgz#41bcfe3e39e6a5ac040971c1af94437c80daa40e" dependencies: @@ -4701,7 +4549,7 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" @@ -4709,7 +4557,7 @@ eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" -eslint@^7.14.0, eslint@^7.32.0: +eslint@^7.14.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" dependencies: @@ -5177,7 +5025,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -6195,7 +6043,7 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" -is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.6.0: +is-core-module@^2.2.0, is-core-module@^2.5.0: version "2.7.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" dependencies: @@ -6676,7 +6524,7 @@ jss@10.8.0, jss@^10.5.1: is-in-browser "^1.1.3" tiny-warning "^1.0.2" -"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.1.0: +"jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.2.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz#720b97bfe7d901b927d87c3773637ae8ea48781b" dependencies: @@ -6721,16 +6569,6 @@ klona@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" -language-subtag-registry@~0.3.2: - version "0.3.21" - resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a" - -language-tags@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" - dependencies: - language-subtag-registry "~0.3.2" - latest-version@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -7788,10 +7626,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^2.0.3: - version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" - object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -7822,14 +7656,6 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - object.entries@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.4.tgz#43ccf9a50bc5fd5b649d45ab1a579f24e088cafd" @@ -8296,12 +8122,6 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" - pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -8320,12 +8140,6 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - dependencies: - find-up "^2.1.0" - please-upgrade-node@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" @@ -9130,7 +8944,7 @@ resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.9.0: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.9.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" dependencies: @@ -10297,15 +10111,6 @@ ts-node@^9.0.0: source-map-support "^0.5.17" yn "3.1.1" -tsconfig-paths@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"