Merged in bugfix/build-fix (pull request #28)

CI build fix (lint + snapshots)

* update snapshots

* Add lint to TS + lint fixes


Approved-by: Paulo Veiga
This commit is contained in:
Matias Arriola 2022-01-13 16:13:05 +00:00 committed by Paulo Veiga
parent f3eaed07b2
commit 516e9b4ded
65 changed files with 553 additions and 432 deletions

View File

@ -1,4 +1,5 @@
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"commonjs": true,
@ -6,7 +7,9 @@
},
"extends": [
"airbnb-base",
"plugin:cypress/recommended"
"plugin:cypress/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 11
@ -15,6 +18,9 @@
// designer is a global currently used as a hack. Remove this when fixing the hack.
"designer": true
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-underscore-dangle": "off",
"no-plusplus": "off",
@ -22,8 +28,17 @@
"max-len": [1,300],
"class-methods-use-this": "off",
"no-console" : "off",
"no-unused-vars": ["error", { "args": "none" }]
"no-unused-vars": ["error", { "args": "none" }],
"import/extensions": ["error", {
"ts": "never"
}],
// codebase contains many this aliases, fix in the future?
"@typescript-eslint/no-this-alias": "off",
// no-unused-vars already used
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-empty-function": "warn",
"import/no-extraneous-dependencies": ["warn", {"packageDir": "./", "devDependencies": false, "optionalDependencies": false, "peerDependencies": false}]
},
"settings": {
"import/resolver": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -23,7 +23,7 @@
"scripts": {
"build": "webpack --config webpack.prod.js",
"dev": "webpack serve --config webpack.dev.js",
"lint": "eslint src",
"lint": "eslint src --ext js,ts",
"playground": "webpack serve --config webpack.playground.js",
"cy:run": "cypress run",
"test:unit": "jest ./test/unit/export/*.ts ./test/unit/layout/*.js",
@ -45,6 +45,8 @@
"@babel/preset-typescript": "^7.16.5",
"@babel/register": "^7.16.0",
"@types/jest": "^27.0.3",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"babel-loader": "^8.2.2",
"blob-polyfill": "^6.0.20211015",
"clean-webpack-plugin": "^4.0.0-alpha.0",
@ -58,7 +60,7 @@
"eslint-config-standard": "^16.0.3",
"eslint-nibble": "^8.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-import": "^2.25.4",
"html-webpack-plugin": "^5.3.2",
"jest-diff": "^27.4.2",
"jest-webpack": "^0.5.1",

View File

@ -16,6 +16,7 @@
* limitations under the License.
*/
import { $assert, $defined } from '@wisemapping/core-js';
import Point from '@wisemapping/web2d';
import Messages, { $msg } from './Messages';
import Events from './Events';
@ -50,25 +51,32 @@ import { $notify } from './widget/ToolbarNotifier';
import ImageExpoterFactory from './export/ImageExporterFactory';
import TextExporterFactory from './export/TextExporterFactory';
import RelationshipModel from './model/RelationshipModel';
import { Mindmap } from '..';
import Mindmap from './model/Mindmap';
import NodeModel from './model/NodeModel';
import Topic from './Topic';
import Point from '@wisemapping/web2d';
import { DesignerOptions } from './DesignerOptionsBuilder';
import MainTopic from './MainTopic';
import DragTopic from './DragTopic';
import NodeGraph from './NodeGraph';
class Designer extends Events {
private _mindmap: Mindmap;
private _options: DesignerOptions;
private _actionDispatcher: StandaloneActionDispatcher;
private _model: DesignerModel;
private _workspace: Workspace;
private _eventBussDispatcher: EventBusDispatcher;
private _dragManager: DragManager;
private _relPivot: RelationshipPivot;
private _clipboard: any[];
private _cleanScreen: any;
constructor(options: DesignerOptions, divElement: JQuery) {
@ -124,7 +132,6 @@ class Designer extends Events {
// Hack: There are static reference to designer variable. Needs to be reviewed.
global.designer = this;
}
private _registerWheelEvents(): void {
@ -140,6 +147,7 @@ class Designer extends Events {
}
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-types
addEvent(type: string, listener: Function): void {
if (type === TopicEvent.EDIT || type === TopicEvent.CLICK) {
const editor = TopicEventDispatcher.getInstance();
@ -323,7 +331,7 @@ class Designer extends Events {
this._workspace.setZoom(1, true);
}
zoomOut(factor: number = 1.2) {
zoomOut(factor = 1.2) {
const model = this.getModel();
const scale = model.getZoom() * factor;
if (scale <= 1.9) {
@ -334,7 +342,7 @@ class Designer extends Events {
}
}
export(formatType: 'png' | 'svg' | 'jpg' | 'wxml'): Promise<String> {
export(formatType: 'png' | 'svg' | 'jpg' | 'wxml'): Promise<string> {
const workspace = this._workspace;
const svgElement = workspace.getSVGElement();
const size = workspace.getSize();
@ -358,8 +366,7 @@ class Designer extends Events {
return exporter.export();
}
zoomIn(factor: number = 1.2): void {
zoomIn(factor = 1.2): void {
const model = this.getModel();
const scale = model.getZoom() / factor;

View File

@ -75,3 +75,4 @@ export function buildDesigner(options: DesignerOptions): Designer {
return designer;
}
export default buildDesigner;

View File

@ -25,7 +25,9 @@ import { $notify } from './widget/ToolbarNotifier';
class DesignerModel extends Events {
_zoom: number;
_topics: Topic[];
_relationships: Relationship[];
constructor(options: DesignerOptions) {
@ -109,7 +111,7 @@ class DesignerModel extends Events {
const topics = this.filterSelectedTopics();
let isValid = true;
topics.forEach(topic => {
topics.forEach((topic) => {
if ($defined(validate)) {
isValid = validate(topic);
}
@ -130,7 +132,7 @@ class DesignerModel extends Events {
return (topics.length > 0) ? topics[0] : null;
}
findTopicById(id: Number): Topic {
findTopicById(id: number): Topic {
let result = null;
for (let i = 0; i < this._topics.length; i++) {
const topic = this._topics[i];

View File

@ -34,21 +34,21 @@ class OptionsBuilder {
static buildOptions(options: DesignerOptions): DesignerOptions {
$assert(options.persistenceManager, 'persistence must be defined');
let containerSize = options.containerSize;
let { containerSize } = options;
if (options.containerSize == null) {
// If it has not been defined, use browser size ...
containerSize = {
width: window.screen.width,
height: window.screen.height,
}
console.log("height:"+containerSize.height);
};
console.log(`height:${containerSize.height}`);
}
const defaultOptions: DesignerOptions = {
readOnly: false,
zoom: 0.85,
saveOnLoad: true,
containerSize: containerSize,
containerSize,
container: 'mindplot',
locale: 'en',
};

View File

@ -20,7 +20,6 @@ import { Point, CurvedLine, Rect } from '@wisemapping/web2d';
import DragTopicConfig from './DragTopicConfig';
import Shape from './util/Shape';
import INodeModel from './model/INodeModel';
class DragPivot {
constructor() {

View File

@ -18,10 +18,10 @@
// eslint-disable-next-line max-classes-per-file
import {
$assert,
$defined
$defined,
} from '@wisemapping/core-js';
import {
Group
Group,
} from '@wisemapping/web2d';
import IconGroupRemoveTip from './IconGroupRemoveTip';

View File

@ -2,7 +2,6 @@ import { $assert } from '@wisemapping/core-js';
import CentralTopic from './CentralTopic';
import MainTopic from './MainTopic';
import INodeModel from './model/INodeModel';
/**
* creates a new topic from the given node model

View File

@ -21,8 +21,6 @@ import { $assert, $defined } from '@wisemapping/core-js';
import ConnectionLine from './ConnectionLine';
import ControlPoint from './ControlPoint';
import INodeModel from './model/INodeModel';
import Shape from './util/Shape';
class Relationship extends ConnectionLine {

View File

@ -18,7 +18,6 @@
import { CurvedLine, Arrow, Point } from '@wisemapping/web2d';
import { $assert } from '@wisemapping/core-js';
import Relationship from './Relationship';
import INodeModel from './model/INodeModel';
import Shape from './util/Shape';
class RelationshipPivot {

View File

@ -20,8 +20,11 @@ import { Point } from '@wisemapping/web2d';
class ScreenManager {
private _divContainer: JQuery;
private _padding: { x: number; y: number; };
private _clickEvents: ((event: UIEvent)=>void)[];
private _scale: number;
constructor(divElement: JQuery) {
@ -48,7 +51,7 @@ class ScreenManager {
return {
width: window.innerWidth,
height: window.innerHeight - Number.parseInt(this._divContainer.css('top'), 10),
}
};
}
setScale(scale: number) {
@ -140,8 +143,8 @@ class ScreenManager {
// Adjust the deviation of the container positioning ...
const containerPosition = this.getContainer().position();
x = x - containerPosition.left;
y = y - containerPosition.top;
x -= containerPosition.left;
y -= containerPosition.top;
// Scale coordinate in order to be relative to the workspace. That's coordSize/size;
x *= this._scale;

View File

@ -16,18 +16,23 @@
* limitations under the License.
*/
import { $assert, $defined } from '@wisemapping/core-js';
import { Workspace as Workspace2D } from '@wisemapping/web2d';
import { ElementClass as Element2D} from '@wisemapping/web2d';
import { Workspace as Workspace2D, ElementClass as Element2D } from '@wisemapping/web2d';
import ScreenManager from './ScreenManager';
import { Size } from './Size';
class Workspace {
private _zoom: number;
private _screenManager: ScreenManager;
private _isReadOnly: boolean;
private _containerSize: Size;
private _workspace: Workspace2D;
private _eventsEnabled: boolean;
private _visibleAreaSize: Size;
constructor(screenManager: ScreenManager, zoom: number, isReadOnly: boolean) {
@ -42,8 +47,8 @@ class Workspace {
const divContainer = screenManager.getContainer();
this._containerSize = {
width: Number.parseInt(divContainer.css('width'), 10),
height: Number.parseInt(divContainer.css('height'), 10)
}
height: Number.parseInt(divContainer.css('height'), 10),
};
// Initialize web2d workspace.
const workspace = this._createWorkspace();
this._workspace = workspace;
@ -122,7 +127,7 @@ class Workspace {
return this._workspace.getCoordSize();
}
setZoom(zoom: number, center: boolean = false): void {
setZoom(zoom: number, center = false): void {
this._zoom = zoom;
const workspace = this._workspace;
const newVisibleAreaSize = this._screenManager.getVisibleBrowserSize();
@ -137,9 +142,7 @@ class Workspace {
// Center and define a new center of coordinates ...
coordOriginX = -(newVisibleAreaSize.width / 2) * zoom;
coordOriginY = -(newVisibleAreaSize.height / 2) * zoom;
} else {
const oldCoordOrigin = workspace.getCoordOrigin();
// Next coordSize is always centered in the middle of the visible area ...

View File

@ -15,17 +15,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import Exporter from "./Exporter";
import SVGExporter from "./SVGExporter";
import { Mindmap } from '../..';
import Exporter from './Exporter';
import SVGExporter from './SVGExporter';
/**
* Based on https://mybyways.com/blog/convert-svg-to-png-using-your-browser
*/
class BinaryImageExporter implements Exporter {
svgElement: Element;
mindmap: Mindmap;
width: number;
height: number;
imgFormat: string;
constructor(mindmap: Mindmap, svgElement: Element, width: number, height: number, imgFormat: 'image/png' | 'image/jpeg') {
@ -36,6 +40,7 @@ class BinaryImageExporter implements Exporter {
this.width = width;
this.height = height;
}
extension(): string {
return this.imgFormat.split['/'][0];
}
@ -55,7 +60,6 @@ class BinaryImageExporter implements Exporter {
// Render the image and wait for the response ...
const img = new Image();
const result = new Promise<string>((resolve, reject) => {
img.onload = () => {
const ctx = canvas.getContext('2d');
// Scale for retina ...
@ -68,7 +72,7 @@ class BinaryImageExporter implements Exporter {
URL.revokeObjectURL(svgUrl);
resolve(imgDataUri);
}
};
});
img.src = svgUrl;
return result;

View File

@ -15,14 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import BinaryImageExporter from "./BinaryImageExporter";
import Exporter from "./Exporter";
import SVGExporter from "./SVGExporter";
import { Mindmap } from '../..';
import BinaryImageExporter from './BinaryImageExporter';
import Exporter from './Exporter';
import SVGExporter from './SVGExporter';
type type = 'svg' | 'png' | 'jpg';
type imageType = 'svg' | 'png' | 'jpg';
class ImageExpoterFactory {
static create(type: type, mindmap: Mindmap, svgElement: Element, width: number, height: number, isCenter: boolean = false): Exporter {
static create(type: imageType, mindmap: Mindmap, svgElement: Element, width: number, height: number, isCenter = false): Exporter {
let result;
switch (type) {
case 'svg': {
@ -43,4 +43,4 @@ class ImageExpoterFactory {
return result;
}
}
export default ImageExpoterFactory
export default ImageExpoterFactory;

View File

@ -15,16 +15,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import IconModel from "../model/IconModel";
import INodeModel from "../model/INodeModel";
import LinkModel from "../model/LinkModel";
import NoteModel from "../model/NoteModel";
import Exporter from "./Exporter";
import { Mindmap } from '../..';
import INodeModel from '../model/INodeModel';
import LinkModel from '../model/LinkModel';
import NoteModel from '../model/NoteModel';
import Exporter from './Exporter';
class MDExporter implements Exporter {
private mindmap: Mindmap;
private footNotes = []
private footNotes = [];
constructor(mindmap: Mindmap) {
this.mindmap = mindmap;
@ -40,14 +40,13 @@ class MDExporter implements Exporter {
export(): Promise<string> {
this.footNotes = [];
const mindmap = this.mindmap;
// Add cental node as text ...
const centralTopic = this.mindmap.getCentralTopic();
const centralText = this.normalizeText(centralTopic.getText());
// Traverse all the branches ...
let result = `# ${centralText}\n\n`
let result = `# ${centralText}\n\n`;
result += this.traverseBranch('', centralTopic.getChildren());
// White footnotes:
@ -65,18 +64,18 @@ class MDExporter implements Exporter {
private traverseBranch(prefix: string, branches: Array<INodeModel>) {
let result = '';
branches.forEach((node) => {
result = result + `${prefix}- ${node.getText()}`;
result = `${result}${prefix}- ${node.getText()}`;
node.getFeatures().forEach((f) => {
const type = f.getType();
// Dump all features ...
if (type === 'link') {
result = result + ` ( [link](${(f as LinkModel).getUrl()}) )`
result = `${result} ( [link](${(f as LinkModel).getUrl()}) )`;
}
if (type === 'note') {
const note = f as NoteModel;
this.footNotes.push(note.getText());
result = result + `[^${this.footNotes.length}] `
result = `${result}[^${this.footNotes.length}] `;
}
// if(type === 'icon'){
@ -84,15 +83,13 @@ class MDExporter implements Exporter {
// result = result + ` ![${icon.getIconType().replace('_','')}!](https://app.wisemapping.com/images/${icon.getIconType()}.svg )`
// }
});
result = result + '\n';
result = `${result}\n`;
if (node.getChildren().length > 0) {
result = result + this.traverseBranch(`${prefix}\t`, node.getChildren());
result += this.traverseBranch(`${prefix}\t`, node.getChildren());
}
});
return result;
}
}
export default MDExporter;

View File

@ -1,4 +1,3 @@
/*
* Copyright [2021] [wisemapping]
*
@ -16,16 +15,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import Exporter from "./Exporter";
import { Mindmap } from '../..';
import Exporter from './Exporter';
class SVGExporter implements Exporter {
private svgElement: Element;
private prolog: string = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n';
constructor(mindmap: Mindmap, svgElement: Element, centerImgage: boolean = false) {
private prolog = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n';
constructor(mindmap: Mindmap, svgElement: Element, centerImgage = false) {
this.svgElement = svgElement;
}
extension(): string {
return 'svg';
}
@ -38,7 +39,7 @@ class SVGExporter implements Exporter {
// Are namespace declared ?. Otherwise, force the declaration ...
if (svgTxt.indexOf('xmlns:xlink=') === -1) {
svgTxt = svgTxt.replace('<svg ', '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
svgTxt = svgTxt.replace('<svg ', '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ');
}
// Add white background. This is mainly for PNG export ...
@ -58,13 +59,13 @@ class SVGExporter implements Exporter {
const xmlDoc = parser.parseFromString(xmlStr, mimeType);
// Is there any parsing error ?.
if (xmlDoc.getElementsByTagName("parsererror").length > 0) {
if (xmlDoc.getElementsByTagName('parsererror').length > 0) {
const xmmStr = new XMLSerializer().serializeToString(xmlDoc);
console.log(xmmStr);
throw new Error(`Unexpected error parsing: ${xmlStr}. Error: ${xmmStr}`);
}
return xmlDoc;
}
};
}
export default SVGExporter;

View File

@ -15,16 +15,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import Exporter from "./Exporter";
import MDExporter from "./MDExporter";
import TxtExporter from "./TxtExporter";
import WiseXMLExporter from "./WiseXMLExporter";
import { Mindmap } from '../..';
import Exporter from './Exporter';
import MDExporter from './MDExporter';
import TxtExporter from './TxtExporter';
import WiseXMLExporter from './WiseXMLExporter';
type type = 'wxml' | 'txt' | 'mm' | 'csv' | 'md';
type textType = 'wxml' | 'txt' | 'mm' | 'csv' | 'md';
class TextExporterFactory {
static create(type: type, mindmap: Mindmap): Exporter {
static create(type: textType, mindmap: Mindmap): Exporter {
let result: Exporter;
switch (type) {
case 'wxml':
@ -40,7 +40,6 @@ class TextExporterFactory {
throw new Error(`Unsupported type ${type}`);
}
return result;
}
}
export default TextExporterFactory;

View File

@ -15,10 +15,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import INodeModel from "../model/INodeModel";
import LinkModel from "../model/LinkModel";
import Exporter from "./Exporter";
import { Mindmap } from '../..';
import INodeModel from '../model/INodeModel';
import LinkModel from '../model/LinkModel';
import Exporter from './Exporter';
class TxtExporter implements Exporter {
private mindmap: Mindmap;
@ -32,7 +32,7 @@ class TxtExporter implements Exporter {
}
export(): Promise<string> {
const mindmap = this.mindmap;
const { mindmap } = this;
const branches = mindmap.getBranches();
const retult = this.traverseBranch('', branches);
@ -42,22 +42,20 @@ class TxtExporter implements Exporter {
private traverseBranch(prefix: string, branches: Array<INodeModel>) {
let result = '';
branches.forEach((node, index) => {
result = result + `${prefix}${index+1} ${node.getText()}`;
result = `${result}${prefix}${index + 1} ${node.getText()}`;
node.getFeatures().forEach((f) => {
const type = f.getType();
if (type === 'link') {
result = result + ` [link: ${(f as LinkModel).getUrl()}]`
result = `${result} [link: ${(f as LinkModel).getUrl()}]`;
}
});
result = result + '\n';
result = `${result}\n`;
if (node.getChildren().length > 0) {
result = result + this.traverseBranch(`\t${prefix}${index+1}.`, node.getChildren());
result += this.traverseBranch(`\t${prefix}${index + 1}.`, node.getChildren());
}
});
return result;
}
}
export default TxtExporter;

View File

@ -15,12 +15,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Mindmap } from "../..";
import XMLSerializerFactory from "../persistence/XMLSerializerFactory";
import Exporter from "./Exporter";
import { Mindmap } from '../..';
import XMLSerializerFactory from '../persistence/XMLSerializerFactory';
import Exporter from './Exporter';
class WiseXMLExporter implements Exporter {
mindmap: Mindmap;
constructor(mindmap: Mindmap) {
this.mindmap = mindmap;
}
@ -30,18 +31,16 @@ class WiseXMLExporter implements Exporter {
}
export(): Promise<string> {
const mindmap = this.mindmap;
const { mindmap } = this;
const serializer = XMLSerializerFactory
.createInstanceFromMindmap(mindmap);
const document: Document = serializer.toXML(mindmap);
const xmlStr: string = new XMLSerializer()
.serializeToString(document)
.serializeToString(document);
const blob = new Blob([xmlStr], { type: 'application/xml' });
const result = URL.createObjectURL(blob);
return Promise.resolve(result);
}
}
export default WiseXMLExporter;

View File

@ -21,9 +21,12 @@ export type FeatureType = 'note' | 'link' | 'icon';
class FeatureModel {
static _next_id = 0;
private _id: number;
private _type: FeatureType;
private _attributes: {};
private _attributes: Record<string, unknown>;
/**
* @constructs
@ -58,7 +61,7 @@ class FeatureModel {
});
}
setAttribute(key: string, value: any) {
setAttribute(key: string, value: unknown) {
$assert(key, 'key id can not be null');
this._attributes[key] = value;
}

View File

@ -4,7 +4,6 @@ import LinkModel from './LinkModel';
import NoteModel from './NoteModel';
import FeatureModel, { FeatureType } from './FeatureModel';
interface NodeById {
id: FeatureType,
model: typeof FeatureModel;
@ -30,6 +29,7 @@ class FeatureModelFactory {
.filter((elem) => elem.id === type)[0];
return new Model(attributes);
}
/**
* @param id the feature metadata id
* @return {Boolean} returns true if the given id is contained in the metadata array
@ -37,6 +37,6 @@ class FeatureModelFactory {
static isSupported(type: string): boolean {
return FeatureModelFactory.modelById.some((elem) => elem.id === type);
}
};
}
export default FeatureModelFactory;

View File

@ -21,12 +21,15 @@ import FeatureModel from './FeatureModel';
import IMindmap from './IMindmap';
import Mindmap from './Mindmap';
export type NodeModelType = 'CentralTopic' | 'MainTopic';
// regex taken from https://stackoverflow.com/a/34763398/58128
const parseJsObject = (str: string) => JSON.parse(str.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?:/g, '"$2": '));
abstract class INodeModel {
static MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE: number = 220;
static _next_uuid: number = 0;
static MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE = 220;
static _next_uuid = 0;
protected _mindmap: Mindmap;
@ -38,6 +41,7 @@ abstract class INodeModel {
getId(): number {
return this.getProperty('id');
}
abstract getFeatures(): FeatureModel[];
/** */
@ -360,7 +364,7 @@ abstract class INodeModel {
static _nextUUID(): number {
INodeModel._next_uuid += 1;
return INodeModel._next_uuid;
};
}
}
const TopicShape = {
@ -371,8 +375,6 @@ const TopicShape = {
IMAGE: 'image',
};
export type NodeModelType = 'CentralTopic' | 'MainTopic';
/**
* @todo: This method must be implemented. (unascribed)
*/

View File

@ -25,7 +25,7 @@ class IconModel extends FeatureModel {
}
getIconType(): string {
return this.getAttribute('id');
return this.getAttribute('id') as string;
}
setIconType(iconType: string):void {

View File

@ -25,7 +25,7 @@ class LinkModel extends FeatureModel {
}
getUrl(): string {
return this.getAttribute('url');
return this.getAttribute('url') as string;
}
setUrl(url: string): void {

View File

@ -24,9 +24,13 @@ import ModelCodeName from '../persistence/ModelCodeName';
class Mindmap extends IMindmap {
private _description: string;
private _version: string;
private _id: string;
private _branches: Array<NodeModel>;
private _relationships: Array<RelationshipModel>;
constructor(id: string, version: string = ModelCodeName.TANGO) {
@ -104,7 +108,6 @@ class Mindmap extends IMindmap {
return this._relationships;
}
hasAlreadyAdded(node: NodeModel): boolean {
let result = false;

View File

@ -23,9 +23,14 @@ import FeatureModel, { FeatureType } from './FeatureModel';
import Mindmap from './Mindmap';
class NodeModel extends INodeModel {
private _properties: {};
private _properties: Record<string, string | number | boolean>;
// eslint-disable-next-line no-use-before-define
private _children: NodeModel[];
private _features: FeatureModel[];
// eslint-disable-next-line no-use-before-define
private _parent: NodeModel;
constructor(type: NodeModelType, mindmap: Mindmap, id: number) {
@ -150,7 +155,7 @@ class NodeModel extends INodeModel {
});
const id = result.getId();
result._properties = Object.assign({}, this._properties);
result._properties = { ...this._properties };
result.setId(id);
result._features = cloneDeep(this._features);
@ -189,7 +194,6 @@ class NodeModel extends INodeModel {
$assert(parent !== this, 'The same node can not be parent and child if itself.');
this._parent = parent;
}
}
export default NodeModel;

View File

@ -27,7 +27,7 @@ class NoteModel extends FeatureModel {
/** */
getText():string {
return this.getAttribute('text');
return this.getAttribute('text') as string;
}
/** */

View File

@ -20,14 +20,22 @@ import Point from '@wisemapping/web2d';
import ConnectionLine from '../ConnectionLine';
class RelationshipModel {
static _next_uuid: number = 0;
static _next_uuid = 0;
private _id: number;
private _sourceTargetId: number;
private _targetTopicId: number;
private _lineType: number;
private _srcCtrlPoint: Point;
private _destCtrlPoint: Point;
private _endArrow: boolean;
private _startArrow: boolean;
constructor(sourceTopicId: number, targetTopicId: number) {
@ -130,5 +138,4 @@ class RelationshipModel {
}
}
export default RelationshipModel;

View File

@ -24,7 +24,9 @@ import XMLSerializerPela from './XMLSerializerPela';
class Beta2PelaMigrator implements XMLMindmapSerializer {
private _betaSerializer: XMLMindmapSerializer;
private _pelaSerializer: XMLSerializerPela;
constructor(betaSerializer: XMLSerializerPela) {
this._betaSerializer = betaSerializer;
this._pelaSerializer = new XMLSerializerPela();

View File

@ -24,7 +24,9 @@ import NodeModel from '../model/NodeModel';
class Pela2TangoMigrator implements XMLMindmapSerializer {
private _pelaSerializer: XMLMindmapSerializer;
private _tangoSerializer: XMLSerializer;
constructor(pelaSerializer: XMLMindmapSerializer) {
this._pelaSerializer = pelaSerializer;
this._tangoSerializer = new XMLSerializer();

View File

@ -16,8 +16,7 @@
* limitations under the License.
*/
import Mindmap from "../model/Mindmap";
import Mindmap from '../model/Mindmap';
interface XMLMindmapSerializer {
toXML(mindmap: Mindmap): Document;

View File

@ -54,7 +54,7 @@ class XMLSerializerBeta implements XMLMindmapSerializer {
// Set topic attributes...
if (topic.getType() === 'CentralTopic') {
parentTopic.setAttribute('central', new Boolean(true).toString());
parentTopic.setAttribute('central', true.toString());
} else {
const parent = topic.getParent();
if (parent == null || parent.getType() === 'CentralTopic') {
@ -77,7 +77,7 @@ class XMLSerializerBeta implements XMLMindmapSerializer {
}
if (topic.areChildrenShrunken()) {
parentTopic.setAttribute('shrink', new Boolean(true).toString());
parentTopic.setAttribute('shrink', true.toString());
}
// Font properties ...
@ -127,7 +127,7 @@ class XMLSerializerBeta implements XMLMindmapSerializer {
// LINKS
const links = topic.findFeatureByType('links');
icons.forEach((link) => {
links.forEach((link) => {
const linkDom = this._linkToXML(document, link);
parentTopic.append(linkDom);
});
@ -316,5 +316,4 @@ class XMLSerializerBeta implements XMLMindmapSerializer {
}
}
export default XMLSerializerBeta;

View File

@ -22,7 +22,7 @@ import Pela2TangoMigrator from './Pela2TangoMigrator';
import XMLSerializerBeta from './XMLSerializerBeta';
import XMLSerializerPela from './XMLSerializerPela';
import XMLSerializerTango from './XMLSerializerTango';
import { Mindmap } from '../..';
import Mindmap from '../model/Mindmap';
import XMLMindmapSerializer from './XMLMindmapSerializer';
const codeToSerializer = [

View File

@ -28,7 +28,8 @@ import XMLMindmapSerializer from './XMLMindmapSerializer';
class XMLSerializerPela implements XMLMindmapSerializer {
private static MAP_ROOT_NODE = 'map';
private _idsMap: {};
private _idsMap: Record<number, Element>;
toXML(mindmap: Mindmap): Document {
$assert(mindmap, 'Can not save a null mindmap');
@ -251,8 +252,8 @@ class XMLSerializerPela implements XMLMindmapSerializer {
// Add all the topics nodes ...
const childNodes = Array.from(rootElem.childNodes);
const topicsNodes = childNodes.
filter((child: ChildNode) => (child.nodeType === 1 && (child as Element).tagName === 'topic'))
const topicsNodes = childNodes
.filter((child: ChildNode) => (child.nodeType === 1 && (child as Element).tagName === 'topic'))
.map((c) => c as Element);
topicsNodes.forEach((child) => {
const topic = this._deserializeNode(child, mindmap);
@ -260,8 +261,8 @@ class XMLSerializerPela implements XMLMindmapSerializer {
});
// Then all relationshops, they are connected to topics ...
const relationshipsNodes = childNodes.
filter((child: ChildNode) => (child.nodeType === 1 && (child as Element).tagName === 'relationship'))
const relationshipsNodes = childNodes
.filter((child: ChildNode) => (child.nodeType === 1 && (child as Element).tagName === 'relationship'))
.map((c) => c as Element);
relationshipsNodes.forEach((child) => {
try {
@ -284,7 +285,7 @@ class XMLSerializerPela implements XMLMindmapSerializer {
: 'MainTopic';
// Load attributes...
let id = null;
let id: number | null = null;
if ($defined(domElem.getAttribute('id'))) {
id = Number.parseInt(domElem.getAttribute('id'), 10);
}
@ -368,7 +369,7 @@ class XMLSerializerPela implements XMLMindmapSerializer {
const position = domElem.getAttribute('position');
if ($defined(position)) {
const pos = position.split(',');
topic.setPosition(Number.parseInt(pos[0]), Number.parseInt(pos[1]));
topic.setPosition(Number.parseInt(pos[0], 10), Number.parseInt(pos[1], 10));
}
const metadata = domElem.getAttribute('metadata');
@ -387,7 +388,7 @@ class XMLSerializerPela implements XMLMindmapSerializer {
} else if (FeatureModelFactory.isSupported(elem.tagName)) {
// Load attributes ...
const namedNodeMap = elem.attributes;
const attributes = {};
const attributes: Record<string, string> = {};
for (let j = 0; j < namedNodeMap.length; j++) {
const attribute = namedNodeMap.item(j);
@ -397,7 +398,7 @@ class XMLSerializerPela implements XMLMindmapSerializer {
// Has text node ?.
const textAttr = XMLSerializerPela._deserializeTextAttr(elem);
if (textAttr) {
attributes['text'] = textAttr;
attributes.text = textAttr;
}
// Create a new element ....
@ -511,5 +512,4 @@ class XMLSerializerPela implements XMLMindmapSerializer {
}
}
export default XMLSerializerPela;

View File

@ -1,3 +1,4 @@
/* eslint-disable no-new */
/*
* Copyright [2021] [wisemapping]
*
@ -29,10 +30,9 @@ import KeyboardShortcutTooltip from './KeyboardShortcutTooltip';
import KeyboardShortcutDialog from './KeyboardShortcutDialog';
import AccountSettingsPanel from './AccountSettingsPanel';
import Designer from '../Designer';
import Topic from '../Topic';
class Menu extends IMenu {
constructor(designer: Designer, containerId: string, mapId: string, readOnly: boolean = false, baseUrl:string = '') {
constructor(designer: Designer, containerId: string, mapId: string, readOnly = false, baseUrl = '') {
super(designer, containerId, mapId);
const saveElem = $('#save');
@ -265,7 +265,6 @@ class Menu extends IMenu {
});
Menu._registerTooltip('position', $msg('CENTER_POSITION'));
const undoButton = this._addButton('undoEdition', false, false, () => {
designer.undo();
});
@ -361,7 +360,7 @@ class Menu extends IMenu {
}
const discardElem = $('#discard');
if (discardElem.length!=0) {
if (discardElem.length !== 0) {
this._addButton('discard', false, false, () => {
this.discardChanges(designer);
});
@ -369,9 +368,9 @@ class Menu extends IMenu {
}
const shareElem = $('#shareIt');
if (shareElem.length!=0) {
if (shareElem.length !== 0) {
this._addButton('shareIt', false, false, () => {
const dialog = new BootstrapDialogRequest(`c/maps/${mapId}/sharef`, $msg('COLLABORATE'), {
new BootstrapDialogRequest(`c/maps/${mapId}/sharef`, $msg('COLLABORATE'), {
closeButton: true,
cancelButton: true,
});
@ -381,9 +380,9 @@ class Menu extends IMenu {
}
const publishElem = $('#publishIt');
if (publishElem.length!=0) {
if (publishElem.length !== 0) {
this._addButton('publishIt', false, false, () => {
const dialog = new BootstrapDialogRequest(`c/maps/${mapId}/publishf`, $msg('PUBLISH'), {
new BootstrapDialogRequest(`c/maps/${mapId}/publishf`, $msg('PUBLISH'), {
closeButton: true,
cancelButton: true,
});
@ -393,9 +392,9 @@ class Menu extends IMenu {
}
const historyElem = $('#history');
if (historyElem.length!=0) {
if (historyElem.length !== 0) {
this._addButton('history', false, false, () => {
const dialog = new BootstrapDialogRequest(`c/maps/${mapId}/historyf`, $msg('HISTORY'), {
new BootstrapDialogRequest(`c/maps/${mapId}/historyf`, $msg('HISTORY'), {
closeButton: true,
cancelButton: true,
});
@ -406,9 +405,9 @@ class Menu extends IMenu {
// Keyboard Shortcuts Action ...
const keyboardShortcut = $('#keyboardShortcuts');
if (keyboardShortcut) {
if (keyboardShortcut.length !== 0) {
keyboardShortcut.bind('click', (event) => {
const dialog = new KeyboardShortcutDialog();
new KeyboardShortcutDialog();
designer.onObjectFocusEvent();
event.preventDefault();
});
@ -416,7 +415,7 @@ class Menu extends IMenu {
}
const backTolist = $('#backToList');
if (backTolist) {
if (backTolist.length !== 0) {
backTolist.bind('click', (event) => {
event.stopPropagation();
window.location.href = '/c/maps/';
@ -427,7 +426,7 @@ class Menu extends IMenu {
// Account dialog ...
const accountSettings = $('#account');
if (accountSettings.length!=0) {
if (accountSettings.length !== 0) {
accountSettings.bind('click', (event) => {
event.preventDefault();
});

View File

@ -30,7 +30,6 @@ import PersistenceManager from './components/PersistenceManager';
import LocalStorageManager from './components/LocalStorageManager';
import DesignerOptionsBuilder from './components/DesignerOptionsBuilder';
// This hack is required to initialize Bootstrap. In future, this should be removed.
// @ts-ignore
global.jQuery = jquery;
@ -62,7 +61,8 @@ const options = DesignerOptionsBuilder.buildOptions(
container: 'mindplot',
zoom: zoomParam || global.userOptions.zoom,
locale: global.locale,
});
},
);
// Build designer ...
const designer = buildDesigner(options);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

209
yarn.lock
View File

@ -2783,6 +2783,21 @@
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/eslint-plugin@^5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.1.tgz#e5a86d7e1f9dc0b3df1e6d94feaf20dd838d066c"
integrity sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==
dependencies:
"@typescript-eslint/experimental-utils" "5.9.1"
"@typescript-eslint/scope-manager" "5.9.1"
"@typescript-eslint/type-utils" "5.9.1"
debug "^4.3.2"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
regexpp "^3.2.0"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/experimental-utils@4.33.0":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd"
@ -2795,6 +2810,18 @@
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/experimental-utils@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.1.tgz#8c407c4dd5ffe522329df6e4c9c2b52206d5f7f1"
integrity sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.9.1"
"@typescript-eslint/types" "5.9.1"
"@typescript-eslint/typescript-estree" "5.9.1"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/parser@^4.8.1":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899"
@ -2805,6 +2832,16 @@
"@typescript-eslint/typescript-estree" "4.33.0"
debug "^4.3.1"
"@typescript-eslint/parser@^5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.9.1.tgz#b114011010a87e17b3265ca715e16c76a9834cef"
integrity sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==
dependencies:
"@typescript-eslint/scope-manager" "5.9.1"
"@typescript-eslint/types" "5.9.1"
"@typescript-eslint/typescript-estree" "5.9.1"
debug "^4.3.2"
"@typescript-eslint/scope-manager@4.33.0":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3"
@ -2813,11 +2850,33 @@
"@typescript-eslint/types" "4.33.0"
"@typescript-eslint/visitor-keys" "4.33.0"
"@typescript-eslint/scope-manager@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz#6c27be89f1a9409f284d95dfa08ee3400166fe69"
integrity sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==
dependencies:
"@typescript-eslint/types" "5.9.1"
"@typescript-eslint/visitor-keys" "5.9.1"
"@typescript-eslint/type-utils@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.9.1.tgz#c6832ffe655b9b1fec642d36db1a262d721193de"
integrity sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg==
dependencies:
"@typescript-eslint/experimental-utils" "5.9.1"
debug "^4.3.2"
tsutils "^3.21.0"
"@typescript-eslint/types@4.33.0":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72"
integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==
"@typescript-eslint/types@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.9.1.tgz#1bef8f238a2fb32ebc6ff6d75020d9f47a1593c6"
integrity sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==
"@typescript-eslint/typescript-estree@4.33.0":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609"
@ -2831,6 +2890,19 @@
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/typescript-estree@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz#d5b996f49476495070d2b8dd354861cf33c005d6"
integrity sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==
dependencies:
"@typescript-eslint/types" "5.9.1"
"@typescript-eslint/visitor-keys" "5.9.1"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/visitor-keys@4.33.0":
version "4.33.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd"
@ -2839,6 +2911,14 @@
"@typescript-eslint/types" "4.33.0"
eslint-visitor-keys "^2.0.0"
"@typescript-eslint/visitor-keys@5.9.1":
version "5.9.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz#f52206f38128dd4f675cf28070a41596eee985b7"
integrity sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==
dependencies:
"@typescript-eslint/types" "5.9.1"
eslint-visitor-keys "^3.0.0"
"@ungap/promise-all-settled@1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
@ -4725,13 +4805,6 @@ cookie@0.4.0:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
copy-anything@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.3.tgz#842407ba02466b0df844819bbe3baebbe5d45d87"
integrity sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==
dependencies:
is-what "^3.12.0"
copy-concurrently@^1.0.0:
version "1.0.5"
resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
@ -5609,7 +5682,7 @@ err-code@^1.0.0:
resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960"
integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=
errno@^0.1.1, errno@^0.1.3:
errno@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==
@ -5788,6 +5861,14 @@ eslint-module-utils@^2.7.1:
find-up "^2.1.0"
pkg-dir "^2.0.0"
eslint-module-utils@^2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129"
integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==
dependencies:
debug "^3.2.7"
find-up "^2.1.0"
eslint-nibble@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/eslint-nibble/-/eslint-nibble-8.0.0.tgz#667e1f9b64492c90058c1f9b2236a97682d83924"
@ -5808,7 +5889,7 @@ eslint-plugin-cypress@^2.12.1:
dependencies:
globals "^11.12.0"
eslint-plugin-import@^2.24.2, eslint-plugin-import@^2.25.3:
eslint-plugin-import@^2.25.3:
version "2.25.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766"
integrity sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==
@ -5827,6 +5908,25 @@ eslint-plugin-import@^2.24.2, eslint-plugin-import@^2.25.3:
resolve "^1.20.0"
tsconfig-paths "^3.11.0"
eslint-plugin-import@^2.25.4:
version "2.25.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1"
integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==
dependencies:
array-includes "^3.1.4"
array.prototype.flat "^1.2.5"
debug "^2.6.9"
doctrine "^2.1.0"
eslint-import-resolver-node "^0.3.6"
eslint-module-utils "^2.7.2"
has "^1.0.3"
is-core-module "^2.8.0"
is-glob "^4.0.3"
minimatch "^3.0.4"
object.values "^1.1.5"
resolve "^1.20.0"
tsconfig-paths "^3.12.0"
eslint-plugin-react-hooks@^4.2.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
@ -5915,7 +6015,7 @@ eslint-visitor-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
eslint-visitor-keys@^3.1.0:
eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2"
integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==
@ -6389,6 +6489,17 @@ fast-glob@^3.1.1, fast-glob@^3.2.4, fast-glob@^3.2.7:
merge2 "^1.3.0"
micromatch "^4.0.4"
fast-glob@^3.2.9:
version "3.2.10"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.10.tgz#2734f83baa7f43b7fd41e13bc34438f4ffe284ee"
integrity sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==
dependencies:
"@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@2.x, fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
@ -7033,6 +7144,18 @@ globby@^11.0.1, globby@^11.0.3:
merge2 "^1.3.0"
slash "^3.0.0"
globby@^11.0.4:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
dependencies:
array-union "^2.1.0"
dir-glob "^3.0.1"
fast-glob "^3.2.9"
ignore "^5.2.0"
merge2 "^1.4.1"
slash "^3.0.0"
globby@^12.0.2:
version "12.0.2"
resolved "https://registry.yarnpkg.com/globby/-/globby-12.0.2.tgz#53788b2adf235602ed4cabfea5c70a1139e1ab11"
@ -7491,7 +7614,7 @@ hyphenate-style-name@^1.0.3:
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d"
integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@ -7542,6 +7665,11 @@ ignore@^5.1.4, ignore@^5.1.8:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb"
integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==
ignore@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
iltorb@^2.0.1:
version "2.4.5"
resolved "https://registry.yarnpkg.com/iltorb/-/iltorb-2.4.5.tgz#d64434b527099125c6839ed48b666247a172ef87"
@ -7553,11 +7681,6 @@ iltorb@^2.0.1:
prebuild-install "^5.3.3"
which-pm-runs "^1.0.0"
image-size@~0.5.0:
version "0.5.5"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
immer@^9.0.6:
version "9.0.7"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.7.tgz#b6156bd7db55db7abc73fd2fdadf4e579a701075"
@ -8163,11 +8286,6 @@ is-weakref@^1.0.1:
dependencies:
call-bind "^1.0.0"
is-what@^3.12.0:
version "3.14.1"
resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1"
integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==
is-windows@^1.0.0, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@ -9091,30 +9209,6 @@ lerna@^3.16.4:
import-local "^2.0.0"
npmlog "^4.1.2"
less-loader@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-10.2.0.tgz#97286d8797dc3dc05b1d16b0ecec5f968bdd4e32"
integrity sha512-AV5KHWvCezW27GT90WATaDnfXBv99llDbtaj4bshq6DvAihMdNjaPDcUMa6EXKLRF+P2opFenJp89BXg91XLYg==
dependencies:
klona "^2.0.4"
less@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/less/-/less-4.1.2.tgz#6099ee584999750c2624b65f80145f8674e4b4b0"
integrity sha512-EoQp/Et7OSOVu0aJknJOtlXZsnr8XE8KwuzTHOLeVSEx8pVWUICc8Q0VYRHgzyjX78nMEyC/oztWFbgyhtNfDA==
dependencies:
copy-anything "^2.0.1"
parse-node-version "^1.0.1"
tslib "^2.3.0"
optionalDependencies:
errno "^0.1.1"
graceful-fs "^4.1.2"
image-size "~0.5.0"
make-dir "^2.1.0"
mime "^1.4.1"
needle "^2.5.2"
source-map "~0.6.0"
leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
@ -9679,7 +9773,7 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19,
dependencies:
mime-db "1.51.0"
mime@1.6.0, mime@^1.4.1:
mime@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
@ -9982,15 +10076,6 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
needle@^2.5.2:
version "2.9.1"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.9.1.tgz#22d1dffbe3490c2b83e301f7709b6736cd8f2684"
integrity sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==
dependencies:
debug "^3.2.6"
iconv-lite "^0.4.4"
sax "^1.2.4"
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
@ -10686,11 +10771,6 @@ parse-json@^5.0.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
parse-node-version@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b"
integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==
parse-path@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf"
@ -12025,11 +12105,6 @@ sass-loader@^10.1.0:
schema-utils "^3.0.0"
semver "^7.3.2"
sax@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
saxes@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
@ -13305,7 +13380,7 @@ ts-node@^9.0.0:
source-map-support "^0.5.17"
yn "3.1.1"
tsconfig-paths@^3.11.0:
tsconfig-paths@^3.11.0, tsconfig-paths@^3.12.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b"
integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==
@ -13320,7 +13395,7 @@ tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.3.0:
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==