npm update + associated fixes

This commit is contained in:
JFH
2021-01-07 01:21:42 +01:00
parent 25b5a2d619
commit ad877e7882
36 changed files with 263 additions and 159 deletions

View File

@@ -31,6 +31,5 @@ src/editor/jspdf/underscore-min.js
src/editor/extensions/ext-mathjax/mathjax src/editor/extensions/ext-mathjax/mathjax
# jquery files # jquery files
src/editor/svgicons/jQuery.svgIcons.js
src/editor/jgraduate/jQuery.jPicker.js src/editor/jgraduate/jQuery.jPicker.js

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 47.22%</text><text class="high" x="5" y="14">Statements 47.22%</text><text class="shadow" x="125.5" y="15">Branches 34.88%</text><text class="high" x="125" y="14">Branches 34.88%</text><text class="shadow" x="234.5" y="15">Lines 48.21%</text><text class="high" x="234" y="14">Lines 48.21%</text><text class="shadow" x="321.5" y="15">Functions 54.19%</text><text class="high" x="321" y="14">Functions 54.19%</text></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 47.48%</text><text class="high" x="5" y="14">Statements 47.48%</text><text class="shadow" x="125.5" y="15">Branches 34.93%</text><text class="high" x="125" y="14">Branches 34.93%</text><text class="shadow" x="234.5" y="15">Lines 48.44%</text><text class="high" x="234" y="14">Lines 48.44%</text><text class="shadow" x="321.5" y="15">Functions 54.91%</text><text class="high" x="321" y="14">Functions 54.91%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#e05d44" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">141/143</text><text class="high" x="46" y="14">141/143</text></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="97" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="#696969" d="M0 0h41v20H0z"/><path fill="#e05d44" d="M41 0h56v20H41z"/><path fill="url(#smooth)" d="M0 0h97v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Tests</text><text class="high" x="5" y="14">Tests</text><text class="shadow" x="46.5" y="15">131/143</text><text class="high" x="46" y="14">131/143</text></g></svg>

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 823 B

View File

@@ -37,13 +37,13 @@ describe('select', function () {
element: 'svg', element: 'svg',
attr: {id: 'svgroot'} attr: {id: 'svgroot'}
}); });
svgcontent = svgroot.appendChild( svgcontent = mockFactory.createSVGElement({
mockFactory.createSVGElement({ element: 'svg',
element: 'svg', attr: {id: 'svgcontent'}
attr: {id: 'svgcontent'} });
})
); svgroot.append(svgcontent);
/* const rect = */ svgcontent.appendChild( /* const rect = */ svgcontent.append(
mockFactory.createSVGElement({ mockFactory.createSVGElement({
element: 'rect', element: 'rect',
attr: { attr: {

View File

@@ -26,10 +26,13 @@ describe('svgtransformlist', function () {
svgroot.style.visibility = 'hidden'; svgroot.style.visibility = 'hidden';
document.body.append(svgroot); document.body.append(svgroot);
svgcontent = svgroot.appendChild(document.createElementNS(NS.SVG, 'svg')); svgcontent = document.createElementNS(NS.SVG, 'svg');
rect = svgcontent.appendChild(document.createElementNS(NS.SVG, 'rect')); svgroot.append(svgcontent);
rect = document.createElementNS(NS.SVG, 'rect');
svgcontent.append(rect);
rect.id = 'r'; rect.id = 'r';
circle = svgcontent.appendChild(document.createElementNS(NS.SVG, 'circle')); circle = document.createElementNS(NS.SVG, 'circle');
svgcontent.append(circle);
circle.id = 'c'; circle.id = 'c';
}); });

237
package-lock.json generated
View File

@@ -2180,9 +2180,9 @@
} }
}, },
"@cypress/code-coverage": { "@cypress/code-coverage": {
"version": "3.8.8", "version": "3.9.0",
"resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.8.8.tgz", "resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.9.0.tgz",
"integrity": "sha512-QgO7mcy39dhoin1yzHF6YT+gC4u4+/3+xd0aJiWfNWElrQ+DVk3TKLC06Sk1c8BwhCXP/GYXs+CRFZH2lQpMzA==", "integrity": "sha512-rwMoHZVZum8ACNxVM5PmfUT4RxN1HCeT0mmhMdM2XqFL3FB6yvPag0vVOupZtYj5xPdYML2q3G+6OyBtCIHAlw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/browserify-preprocessor": "3.0.1", "@cypress/browserify-preprocessor": "3.0.1",
@@ -2615,9 +2615,9 @@
"dev": true "dev": true
}, },
"import-fresh": { "import-fresh": {
"version": "3.2.2", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true, "dev": true,
"requires": { "requires": {
"parent-module": "^1.0.0", "parent-module": "^1.0.0",
@@ -7354,9 +7354,9 @@
"dev": true "dev": true
}, },
"copyfiles": { "copyfiles": {
"version": "2.4.0", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.0.tgz", "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
"integrity": "sha512-yGjpR3yjQdxccW8EcJ4a7ZCA6wGER6/Q2Y+b7bXbVxGeSHBf93i9d7MzTsx+VV1CpMKQa3v4ThZfXBcltMzl0w==", "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==",
"dev": true, "dev": true,
"requires": { "requires": {
"glob": "^7.0.5", "glob": "^7.0.5",
@@ -7365,14 +7365,93 @@
"noms": "0.0.0", "noms": "0.0.0",
"through2": "^2.0.1", "through2": "^2.0.1",
"untildify": "^4.0.0", "untildify": "^4.0.0",
"yargs": "^15.3.1" "yargs": "^16.1.0"
}, },
"dependencies": { "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"
}
},
"cliui": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
"dev": true,
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.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
},
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"dev": true
},
"mkdirp": { "mkdirp": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true "dev": true
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}
},
"y18n": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz",
"integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==",
"dev": true
},
"yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
"requires": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
}
},
"yargs-parser": {
"version": "20.2.4",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
"integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
"dev": true
} }
} }
}, },
@@ -7870,9 +7949,9 @@
} }
}, },
"cypress": { "cypress": {
"version": "6.2.0", "version": "6.2.1",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-6.2.0.tgz", "resolved": "https://registry.npmjs.org/cypress/-/cypress-6.2.1.tgz",
"integrity": "sha512-m/rkcogYM9MTy8rbsZgyS5wT2L/J+B5V2bY2ztkDNMyqhk/oZgUF4KTWVLzkW2I+scg0iAddca95tLlt7XnAtw==", "integrity": "sha512-OYkSgzA4J4Q7eMjZvNf5qWpBLR4RXrkqjL3UZ1UzGGLAskO0nFTi/RomNTG6TKvL3Zp4tw4zFY1gp5MtmkCZrA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/listr-verbose-renderer": "^0.4.1", "@cypress/listr-verbose-renderer": "^0.4.1",
@@ -8507,9 +8586,9 @@
} }
}, },
"dompurify": { "dompurify": {
"version": "2.0.12", "version": "2.2.6",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz",
"integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg==", "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==",
"optional": true "optional": true
}, },
"domutils": { "domutils": {
@@ -8586,9 +8665,9 @@
"dev": true "dev": true
}, },
"elix": { "elix": {
"version": "14.1.1", "version": "14.1.2",
"resolved": "https://registry.npmjs.org/elix/-/elix-14.1.1.tgz", "resolved": "https://registry.npmjs.org/elix/-/elix-14.1.2.tgz",
"integrity": "sha512-o+6YAp1qhn0Itz2LzEAQtzi9se43eiXdrdSVvXpTrj3bsp4p/c1bY6VVeYfdaJy9a8QRnMkH9WrLGdFbRcFsuA==", "integrity": "sha512-j+zHVrw/1G5UVdS5qFwCFlgr6j35FvNpiBDv3OriT5GYWoJrC/Srb4pL8IN9KaJfrb/ZxSbSAldmUkFTUkLD+A==",
"dev": true "dev": true
}, },
"elliptic": { "elliptic": {
@@ -8916,9 +8995,9 @@
} }
}, },
"eslint": { "eslint": {
"version": "7.16.0", "version": "7.17.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz",
"integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==", "integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
@@ -9109,9 +9188,9 @@
"dev": true "dev": true
}, },
"import-fresh": { "import-fresh": {
"version": "3.2.2", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true, "dev": true,
"requires": { "requires": {
"parent-module": "^1.0.0", "parent-module": "^1.0.0",
@@ -9227,9 +9306,9 @@
} }
}, },
"eslint-config-ash-nazg": { "eslint-config-ash-nazg": {
"version": "22.10.0", "version": "23.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-22.10.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-23.0.0.tgz",
"integrity": "sha512-eZJBH1/9DXR8JbsobnzmhLzmcAl86bo5facsAxwY3F4sR+kniUDXqkHvVrOgF8C0PDrszyXGXIoXLMrBt0FAQw==", "integrity": "sha512-05125LmboFzeF5/TdpK2VrF4AShSDNq4b7Ikljkykzec0vKL9GoQhOUyL58IMYBzIdALn8nWQDSjp4ps1Gor9g==",
"dev": true "dev": true
}, },
"eslint-config-standard": { "eslint-config-standard": {
@@ -9492,9 +9571,9 @@
} }
}, },
"eslint-plugin-jsdoc": { "eslint-plugin-jsdoc": {
"version": "30.7.9", "version": "30.7.13",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.9.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.13.tgz",
"integrity": "sha512-qMM0fNx7/6OCnIh3jRpIrEBAhTG1THNXXbr3yfJ8yqLrDbzJR98xsstX25xt9GCPlrjNc/bBpTHfJQOvn7nVMA==", "integrity": "sha512-YM4WIsmurrp0rHX6XiXQppqKB8Ne5ATiZLJe2+/fkp9l9ExXFr43BbAbjZaVrpCT+tuPYOZ8k1MICARHnURUNQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"comment-parser": "^0.7.6", "comment-parser": "^0.7.6",
@@ -9693,9 +9772,9 @@
"dev": true "dev": true
}, },
"eslint-plugin-unicorn": { "eslint-plugin-unicorn": {
"version": "24.0.0", "version": "25.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.1.tgz",
"integrity": "sha512-NfLjIZas/ZUwc3S+pUtbTRqgCkODxPEkJBJ5ZR8wIu90BmX4jmXp10hoOZMScR2CR1NYTtrx0OX4BQvBnbzZzA==", "integrity": "sha512-MEyEWoyou/qhJH6rEER9YHACtCsQT+eewc6Fdxbi2eiTvsGrBR8JZMA6qaeof3oMQeRxOpaERoBKzU7R5c4A/w==",
"dev": true, "dev": true,
"requires": { "requires": {
"ci-info": "^2.0.0", "ci-info": "^2.0.0",
@@ -9901,15 +9980,23 @@
} }
}, },
"eslint-template-visitor": { "eslint-template-visitor": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.1.tgz", "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.2.tgz",
"integrity": "sha512-q3SxoBXz0XjPGkUpwGVAwIwIPIxzCAJX1uwfVc8tW3v7u/zS7WXNH3I2Mu2MDz2NgSITAyKLRaQFPHu/iyKxDQ==", "integrity": "sha512-SkcLjzKw3JjKTWHacRDeLBa2gxb600zbCKTkXj/V97QnZ9yxkknoPL8vc8PFueqbFXP7mYNTQzjCjcMpTRdRaA==",
"dev": true, "dev": true,
"requires": { "requires": {
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint-visitor-keys": "^1.3.0", "eslint-visitor-keys": "^2.0.0",
"esquery": "^1.3.1", "esquery": "^1.3.1",
"multimap": "^1.1.0" "multimap": "^1.1.0"
},
"dependencies": {
"eslint-visitor-keys": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
"dev": true
}
} }
}, },
"eslint-utils": { "eslint-utils": {
@@ -10527,9 +10614,9 @@
"dev": true "dev": true
}, },
"font-family-papandreou": { "font-family-papandreou": {
"version": "0.2.0-patch1", "version": "0.2.0-patch2",
"resolved": "https://registry.npmjs.org/font-family-papandreou/-/font-family-papandreou-0.2.0-patch1.tgz", "resolved": "https://registry.npmjs.org/font-family-papandreou/-/font-family-papandreou-0.2.0-patch2.tgz",
"integrity": "sha512-l6WMbeh7+Zd4TTu3yUUPR5KOepiuGLd/QAPfTIoX8ipTko0IF7PU6dsM4YM2zCDToEPIPSyCBKEJnKlSdYMgaA==" "integrity": "sha512-l/YiRdBSH/eWv6OF3sLGkwErL+n0MqCICi9mppTZBOCL5vixWGDqCYvRcuxB2h7RGCTzaTKOHT2caHvCXQPRlw=="
}, },
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
@@ -11757,9 +11844,9 @@
"dev": true "dev": true
}, },
"import-modules": { "import-modules": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz", "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz",
"integrity": "sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==", "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==",
"dev": true "dev": true
}, },
"imurmurhash": { "imurmurhash": {
@@ -12858,16 +12945,17 @@
"dev": true "dev": true
}, },
"jspdf": { "jspdf": {
"version": "2.1.1", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.1.1.tgz", "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.2.0.tgz",
"integrity": "sha512-aEZmTr8SgR7Dy2zjFLu6pbg93urA7nZdbS3MIAXs8PSXn1ee7LSpm0JVMYZ+0qS6ZIUI5NriFSTdpVI4QArAXQ==", "integrity": "sha512-kz6blXdM+wQ0vWMDJsa7GW9Ya79DHQBWQL14urVsbr6mk9nsJCSqZuIgE1CPZ78i5Yih2uW4tqOTiLf5xSpT9Q==",
"requires": { "requires": {
"atob": "^2.1.2", "atob": "^2.1.2",
"btoa": "^1.2.1", "btoa": "^1.2.1",
"canvg": "^3.0.6", "canvg": "^3.0.6",
"core-js": "^3.6.0", "core-js": "^3.6.0",
"dompurify": "^2.0.12", "dompurify": "^2.2.0",
"html2canvas": "^1.0.0-rc.5" "html2canvas": "^1.0.0-rc.5",
"pako": "^1.0.11"
} }
}, },
"jsprim": { "jsprim": {
@@ -16569,8 +16657,7 @@
"pako": { "pako": {
"version": "1.0.11", "version": "1.0.11",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
"dev": true
}, },
"parent-module": { "parent-module": {
"version": "1.0.1", "version": "1.0.1",
@@ -17777,6 +17864,12 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true "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
},
"require-main-filename": { "require-main-filename": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
@@ -17933,9 +18026,9 @@
} }
}, },
"rollup": { "rollup": {
"version": "2.35.1", "version": "2.36.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.35.1.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.36.1.tgz",
"integrity": "sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA==", "integrity": "sha512-eAfqho8dyzuVvrGqpR0ITgEdq0zG2QJeWYh+HeuTbpcaXk8vNFc48B7bJa1xYosTCKx0CuW+447oQOW8HgBIZQ==",
"requires": { "requires": {
"fsevents": "~2.1.2" "fsevents": "~2.1.2"
}, },
@@ -19212,9 +19305,9 @@
"integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow==" "integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow=="
}, },
"svg2pdf.js": { "svg2pdf.js": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/svg2pdf.js/-/svg2pdf.js-2.0.0.tgz", "resolved": "https://registry.npmjs.org/svg2pdf.js/-/svg2pdf.js-2.1.0.tgz",
"integrity": "sha512-UjcCVMdem0apsq1QePJXUrSxBB5xTxPNjUeU9KmOLSScsi5f0fhsiRj27LC5Uqpwl1yXzen+1iKoGVv4jyMrQw==", "integrity": "sha512-jai/P6F1IsMcoVUx9Rlnua9YHzaIjo/2enxJ+Xb5e8/m3UF5YDsFSyqIbTVoUZXgmmSI5wZWAtEz1QY4XzSPew==",
"requires": { "requires": {
"cssesc": "^3.0.0", "cssesc": "^3.0.0",
"font-family-papandreou": "^0.2.0-patch1", "font-family-papandreou": "^0.2.0-patch1",
@@ -19270,32 +19363,32 @@
} }
}, },
"systemjs": { "systemjs": {
"version": "6.8.2", "version": "6.8.3",
"resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.8.2.tgz", "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.8.3.tgz",
"integrity": "sha512-YknH4S+Xq7Rlwdnvyj4QKHWm5YQGPJnnkVXFQLC/Wl/O21nZ+NrV9IjwUQQ0Pl0Jh0Wgf91IeGzSHGELsv5kkA==", "integrity": "sha512-UcTY+FEA1B7e+bpJk1TI+a9Na6LG7wFEqW7ED16cLqLuQfI/9Ri0rsXm3tKlIgNoHyLHZycjdAOijzNbzelgwA==",
"dev": true "dev": true
}, },
"table": { "table": {
"version": "6.0.4", "version": "6.0.7",
"resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz", "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
"integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==", "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^6.12.4", "ajv": "^7.0.2",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"slice-ansi": "^4.0.0", "slice-ansi": "^4.0.0",
"string-width": "^4.2.0" "string-width": "^4.2.0"
}, },
"dependencies": { "dependencies": {
"ajv": { "ajv": {
"version": "6.12.6", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^1.0.0",
"json-schema-traverse": "^0.4.1", "require-from-string": "^2.0.2",
"uri-js": "^4.2.2" "uri-js": "^4.2.2"
} }
}, },
@@ -19323,6 +19416,12 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true "dev": true
}, },
"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
},
"lodash": { "lodash": {
"version": "4.17.20", "version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",

View File

@@ -138,18 +138,18 @@
"@web/dev-server-rollup": "0.3.1", "@web/dev-server-rollup": "0.3.1",
"canvg": "3.0.7", "canvg": "3.0.7",
"core-js": "3.8.2", "core-js": "3.8.2",
"jspdf": "2.1.1", "jspdf": "2.2.0",
"pathseg": "1.2.0", "pathseg": "1.2.0",
"regenerator-runtime": "0.13.7", "regenerator-runtime": "0.13.7",
"rollup-plugin-polyfill-node": "^0.4.1", "rollup-plugin-polyfill-node": "^0.4.1",
"svg2pdf.js": "2.0.0" "svg2pdf.js": "2.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.12.10", "@babel/core": "7.12.10",
"@babel/preset-env": "7.12.11", "@babel/preset-env": "7.12.11",
"@babel/register": "7.12.10", "@babel/register": "7.12.10",
"@babel/runtime-corejs3": "7.12.5", "@babel/runtime-corejs3": "7.12.5",
"@cypress/code-coverage": "3.8.8", "@cypress/code-coverage": "3.9.0",
"@cypress/fiddle": "1.19.0", "@cypress/fiddle": "1.19.0",
"@fintechstudios/eslint-plugin-chai-as-promised": "3.0.2", "@fintechstudios/eslint-plugin-chai-as-promised": "3.0.2",
"@hkdobrev/run-if-changed": "0.3.1", "@hkdobrev/run-if-changed": "0.3.1",
@@ -163,19 +163,19 @@
"@web/dev-server": "0.1.3", "@web/dev-server": "0.1.3",
"axe-core": "4.1.1", "axe-core": "4.1.1",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.0", "copyfiles": "2.4.1",
"core-js-bundle": "3.8.2", "core-js-bundle": "3.8.2",
"coveradge": "0.6.0", "coveradge": "0.6.0",
"cp-cli": "2.0.0", "cp-cli": "2.0.0",
"cross-var": "1.1.0", "cross-var": "1.1.0",
"cypress": "6.2.0", "cypress": "6.2.1",
"cypress-axe": "0.12.0", "cypress-axe": "0.12.0",
"cypress-multi-reporters": "1.4.0", "cypress-multi-reporters": "1.4.0",
"cypress-plugin-snapshots": "1.4.4", "cypress-plugin-snapshots": "1.4.4",
"deparam": "git+https://github.com/brettz9/deparam.git#updates", "deparam": "git+https://github.com/brettz9/deparam.git#updates",
"elix": "^14.1.1", "elix": "^14.1.2",
"eslint": "7.16.0", "eslint": "7.17.0",
"eslint-config-ash-nazg": "22.10.0", "eslint-config-ash-nazg": "23.0.0",
"eslint-config-standard": "16.0.2", "eslint-config-standard": "16.0.2",
"eslint-plugin-array-func": "3.1.7", "eslint-plugin-array-func": "3.1.7",
"eslint-plugin-chai-expect": "2.2.0", "eslint-plugin-chai-expect": "2.2.0",
@@ -186,7 +186,7 @@
"eslint-plugin-eslint-comments": "3.2.0", "eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "6.1.1", "eslint-plugin-html": "6.1.1",
"eslint-plugin-import": "2.22.1", "eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.9", "eslint-plugin-jsdoc": "30.7.13",
"eslint-plugin-markdown": "1.0.2", "eslint-plugin-markdown": "1.0.2",
"eslint-plugin-mocha": "8.0.0", "eslint-plugin-mocha": "8.0.0",
"eslint-plugin-mocha-cleanup": "1.9.1", "eslint-plugin-mocha-cleanup": "1.9.1",
@@ -196,7 +196,7 @@
"eslint-plugin-promise": "4.2.1", "eslint-plugin-promise": "4.2.1",
"eslint-plugin-sonarjs": "0.5.0", "eslint-plugin-sonarjs": "0.5.0",
"eslint-plugin-standard": "4.1.0", "eslint-plugin-standard": "4.1.0",
"eslint-plugin-unicorn": "24.0.0", "eslint-plugin-unicorn": "25.0.1",
"husky": "4.3.6", "husky": "4.3.6",
"imageoptim-cli": "3.0.2", "imageoptim-cli": "3.0.2",
"jamilih": "0.53.2", "jamilih": "0.53.2",
@@ -219,7 +219,7 @@
"remark-lint-ordered-list-marker-value": "2.0.1", "remark-lint-ordered-list-marker-value": "2.0.1",
"requirejs": "2.3.6", "requirejs": "2.3.6",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rollup": "2.35.1", "rollup": "2.36.1",
"rollup-plugin-copy": "3.3.0", "rollup-plugin-copy": "3.3.0",
"rollup-plugin-filesize": "9.1.0", "rollup-plugin-filesize": "9.1.0",
"rollup-plugin-node-polyfills": "0.2.1", "rollup-plugin-node-polyfills": "0.2.1",
@@ -227,7 +227,7 @@
"rollup-plugin-re": "1.0.7", "rollup-plugin-re": "1.0.7",
"rollup-plugin-terser": "7.0.2", "rollup-plugin-terser": "7.0.2",
"stackblur-canvas": "2.4.0", "stackblur-canvas": "2.4.0",
"systemjs": "6.8.2", "systemjs": "6.8.3",
"typescript": "4.1.3", "typescript": "4.1.3",
"underscore": "1.12.0" "underscore": "1.12.0"
} }

View File

@@ -617,7 +617,7 @@ class EditorStartup {
* @param {Event} e * @param {Event} e
* @returns {void} * @returns {void}
*/ */
let editorObj = this; const editorObj = this;
const importImage = function (e) { const importImage = function (e) {
document.getElementById('se-prompt-dialog').title = editorObj.uiStrings.notification.loadingImage; document.getElementById('se-prompt-dialog').title = editorObj.uiStrings.notification.loadingImage;
e.stopPropagation(); e.stopPropagation();

View File

@@ -19,7 +19,8 @@ class PaintBox {
); );
let docElem = svgdocbox.documentElement; let docElem = svgdocbox.documentElement;
docElem = container.appendChild(document.importNode(docElem, true)); docElem = document.importNode(docElem, true);
container.append(docElem);
this.rect = docElem.firstElementChild; this.rect = docElem.firstElementChild;
this.defs = docElem.getElementsByTagName('defs')[0]; this.defs = docElem.getElementsByTagName('defs')[0];
@@ -46,7 +47,8 @@ class PaintBox {
case 'linearGradient': case 'linearGradient':
case 'radialGradient': { case 'radialGradient': {
this.grad.remove(); this.grad.remove();
this.grad = this.defs.appendChild(paint[ptype]); this.grad = paint[ptype];
this.defs.append(this.grad);
const id = this.grad.id = 'gradbox_' + this.type; const id = this.grad.id = 'gradbox_' + this.type;
fillAttr = 'url(#' + id + ')'; fillAttr = 'url(#' + id + ')';
break; break;

View File

@@ -1,3 +1,4 @@
/* eslint-disable unicorn/prefer-dom-node-append */
/** /**
* @file jGraduate 0.4 * @file jGraduate 0.4
* *

View File

@@ -54,7 +54,7 @@ export class ToolButton extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
// locate the component // locate the component
this.$div = this._shadowRoot.querySelector('div'); this.$div = this._shadowRoot.querySelector('div');
this.$img = this._shadowRoot.querySelector('img'); this.$img = this._shadowRoot.querySelector('img');

View File

@@ -59,7 +59,7 @@ export class SeColorPicker extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$logo = this._shadowRoot.getElementById('logo'); this.$logo = this._shadowRoot.getElementById('logo');
this.$label = this._shadowRoot.getElementById('label'); this.$label = this._shadowRoot.getElementById('label');
this.$block = this._shadowRoot.getElementById('block'); this.$block = this._shadowRoot.getElementById('block');

View File

@@ -109,7 +109,7 @@ export class ExplorerButton extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
// locate the component // locate the component
this.$button = this._shadowRoot.querySelector('.menu-button'); this.$button = this._shadowRoot.querySelector('.menu-button');
this.$overall = this._shadowRoot.querySelector('.overall'); this.$overall = this._shadowRoot.querySelector('.overall');

View File

@@ -91,7 +91,7 @@ export class FlyingButton extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
// locate the component // locate the component
this.$button = this._shadowRoot.querySelector('.menu-button'); this.$button = this._shadowRoot.querySelector('.menu-button');
this.$handle = this._shadowRoot.querySelector('.handle'); this.$handle = this._shadowRoot.querySelector('.handle');

View File

@@ -31,7 +31,7 @@ export class SEInput extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
// locate the component // locate the component
this.$img = this._shadowRoot.querySelector('img'); this.$img = this._shadowRoot.querySelector('img');
this.$label = this.shadowRoot.getElementById('label'); this.$label = this.shadowRoot.getElementById('label');

View File

@@ -32,7 +32,7 @@ export class SeList extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$dropdown = this._shadowRoot.querySelector('elix-dropdown-list'); this.$dropdown = this._shadowRoot.querySelector('elix-dropdown-list');
this.$label = this._shadowRoot.querySelector('label'); this.$label = this._shadowRoot.querySelector('label');
} }

View File

@@ -20,7 +20,7 @@ export class SeListItem extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$menuitem = this._shadowRoot.querySelector('elix-menu-item'); this.$menuitem = this._shadowRoot.querySelector('elix-menu-item');
} }
/** /**

View File

@@ -39,7 +39,7 @@ export class SeMenu extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$menu = this._shadowRoot.querySelector('elix-menu-button'); this.$menu = this._shadowRoot.querySelector('elix-menu-button');
this.$label = this.$menu.shadowRoot.querySelector('#popupToggle').shadowRoot; this.$label = this.$menu.shadowRoot.querySelector('#popupToggle').shadowRoot;
} }

View File

@@ -24,7 +24,7 @@ export class SeMenuItem extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$img = this._shadowRoot.querySelector('img'); this.$img = this._shadowRoot.querySelector('img');
this.$label = this._shadowRoot.querySelector('span'); this.$label = this._shadowRoot.querySelector('span');
this.$menuitem = this._shadowRoot.querySelector('elix-menu-item'); this.$menuitem = this._shadowRoot.querySelector('elix-menu-item');

View File

@@ -40,14 +40,14 @@ export class SEPalette extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$strip = this._shadowRoot.querySelector('elix-centered-strip'); this.$strip = this._shadowRoot.querySelector('elix-centered-strip');
palette.forEach((rgb) => { palette.forEach((rgb) => {
const newDiv = document.createElement('div'); const newDiv = document.createElement('div');
newDiv.classList.add('square'); newDiv.classList.add('square');
newDiv.style.backgroundColor = rgb; newDiv.style.backgroundColor = rgb;
newDiv.dataset.rgb = rgb; newDiv.dataset.rgb = rgb;
this.$strip.appendChild(newDiv); this.$strip.append(newDiv);
}); });
} }

View File

@@ -34,7 +34,7 @@ export class SESpinInput extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
// locate the component // locate the component
this.$img = this._shadowRoot.querySelector('img'); this.$img = this._shadowRoot.querySelector('img');
this.$label = this.shadowRoot.getElementById('label'); this.$label = this.shadowRoot.getElementById('label');

View File

@@ -128,7 +128,7 @@ export class SeCMenuDialog extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this._workarea = document.getElementById('workarea'); this._workarea = document.getElementById('workarea');
this.$dialog = this._shadowRoot.querySelector('#cmenu_canvas'); this.$dialog = this._shadowRoot.querySelector('#cmenu_canvas');
this.$copyLink = this._shadowRoot.querySelector('#se-copy'); this.$copyLink = this._shadowRoot.querySelector('#se-copy');

View File

@@ -81,7 +81,7 @@ export class SeCMenuLayerDialog extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.source = ''; this.source = '';
this._workarea = undefined; this._workarea = undefined;
this.$sidePanels = document.getElementById('sidepanels'); this.$sidePanels = document.getElementById('sidepanels');

View File

@@ -243,7 +243,7 @@ export class SeEditPrefsDialog extends HTMLElement {
// create the shadowDom and insert the template // create the shadowDom and insert the template
this.colorBlocks = ['#FFF', '#888', '#000', 'chessboard']; this.colorBlocks = ['#FFF', '#888', '#000', 'chessboard'];
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$dialog = this._shadowRoot.querySelector('#svg_prefs'); this.$dialog = this._shadowRoot.querySelector('#svg_prefs');
this.$saveBtn = this._shadowRoot.querySelector('#tool_prefs_save'); this.$saveBtn = this._shadowRoot.querySelector('#tool_prefs_save');
this.$cancelBtn = this._shadowRoot.querySelector('#tool_prefs_cancel'); this.$cancelBtn = this._shadowRoot.querySelector('#tool_prefs_cancel');

View File

@@ -129,7 +129,7 @@ export class SeImgPropDialog extends HTMLElement {
// create the shadowDom and insert the template // create the shadowDom and insert the template
this.eventlisten = false; this.eventlisten = false;
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$saveBtn = this._shadowRoot.querySelector('#tool_docprops_save'); this.$saveBtn = this._shadowRoot.querySelector('#tool_docprops_save');
this.$cancelBtn = this._shadowRoot.querySelector('#tool_docprops_cancel'); this.$cancelBtn = this._shadowRoot.querySelector('#tool_docprops_cancel');
this.$resolution = this._shadowRoot.querySelector('#resolution'); this.$resolution = this._shadowRoot.querySelector('#resolution');

View File

@@ -83,7 +83,7 @@ export class SeSvgSourceEditorDialog extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$dialog = this._shadowRoot.querySelector('#svg_source_editor'); this.$dialog = this._shadowRoot.querySelector('#svg_source_editor');
this.$copyBtn = this._shadowRoot.querySelector('#copy_save_done'); this.$copyBtn = this._shadowRoot.querySelector('#copy_save_done');
this.$saveBtn = this._shadowRoot.querySelector('#tool_source_save'); this.$saveBtn = this._shadowRoot.querySelector('#tool_source_save');

View File

@@ -28,8 +28,6 @@ export default {
const {$, svgroot} = S, const {$, svgroot} = S,
addElem = svgCanvas.addSVGElementFromJson, addElem = svgCanvas.addSVGElementFromJson,
selManager = S.selectorManager, selManager = S.selectorManager,
connSel = '.se_connector',
// connect_str = '-SE_CONNECT-',
elData = $.data; elData = $.data;
let startX, let startX,
@@ -191,7 +189,7 @@ export default {
* @returns {void} * @returns {void}
*/ */
function findConnectors (elems = selElems) { function findConnectors (elems = selElems) {
const connectors = $(svgcontent).find(connSel); const connectors = $(svgcontent).find('.se_connector');
connections = []; connections = [];
// Loop through connectors to see if one is connected to the element // Loop through connectors to see if one is connected to the element
@@ -310,7 +308,7 @@ export default {
const gse = svgCanvas.groupSelectedElements; const gse = svgCanvas.groupSelectedElements;
svgCanvas.groupSelectedElements = function (...args) { svgCanvas.groupSelectedElements = function (...args) {
svgCanvas.removeFromSelection($(connSel).toArray()); svgCanvas.removeFromSelection($('.se_connector').toArray());
return gse.apply(this, args); return gse.apply(this, args);
}; };
@@ -334,7 +332,7 @@ export default {
$(svgcontent).find('*').each(function () { $(svgcontent).find('*').each(function () {
const conn = this.getAttributeNS(seNs, 'connector'); const conn = this.getAttributeNS(seNs, 'connector');
if (conn) { if (conn) {
this.setAttribute('class', connSel.substr(1)); this.setAttribute('class', 'se_connector');
const connData = conn.split(' '); const connData = conn.split(' ');
const sbb = svgCanvas.getStrokedBBox([getElem(connData[0])]); const sbb = svgCanvas.getStrokedBBox([getElem(connData[0])]);
const ebb = svgCanvas.getStrokedBBox([getElem(connData[1])]); const ebb = svgCanvas.getStrokedBBox([getElem(connData[1])]);
@@ -500,7 +498,7 @@ export default {
const connStr = startId + ' ' + endId; const connStr = startId + ' ' + endId;
const altStr = endId + ' ' + startId; const altStr = endId + ' ' + startId;
// Don't create connector if one already exists // Don't create connector if one already exists
const dupe = $(svgcontent).find(connSel).filter(function () { const dupe = $(svgcontent).find('.se_connector').filter(function () {
const conn = this.getAttributeNS(seNs, 'connector'); const conn = this.getAttributeNS(seNs, 'connector');
if (conn === connStr || conn === altStr) { return true; } if (conn === connStr || conn === altStr) { return true; }
return false; return false;
@@ -524,7 +522,7 @@ export default {
.data('end_bb', bb); .data('end_bb', bb);
seNs = svgCanvas.getEditorNS(true); seNs = svgCanvas.getEditorNS(true);
curLine.setAttributeNS(seNs, 'se:connector', connStr); curLine.setAttributeNS(seNs, 'se:connector', connStr);
curLine.setAttribute('class', connSel.substr(1)); curLine.setAttribute('class', 'se_connector');
curLine.setAttribute('opacity', 1); curLine.setAttribute('opacity', 1);
svgCanvas.addToSelection([curLine]); svgCanvas.addToSelection([curLine]);
svgCanvas.moveToBottomSelectedElement(); svgCanvas.moveToBottomSelectedElement();
@@ -538,7 +536,7 @@ export default {
}, },
selectedChanged (opts) { selectedChanged (opts) {
// TODO: Find better way to skip operations if no connectors are in use // TODO: Find better way to skip operations if no connectors are in use
if (!$(svgcontent).find(connSel).length) { return; } if (!$(svgcontent).find('.se_connector').length) { return; }
if (svgCanvas.getMode() === 'connector') { if (svgCanvas.getMode() === 'connector') {
svgCanvas.setMode('select'); svgCanvas.setMode('select');
@@ -616,7 +614,7 @@ export default {
} }
} }
// Update line if it's a connector // Update line if it's a connector
if (elem.getAttribute('class') === connSel.substr(1)) { if (elem.getAttribute('class') === 'se_connector') {
const start = getElem(elData(elem, 'c_start')); const start = getElem(elData(elem, 'c_start'));
updateConnectors([start]); updateConnectors([start]);
} else { } else {

View File

@@ -238,7 +238,7 @@ export default {
case 's': case 's':
// Import one // Import one
if (svgStr) { if (svgStr) {
svgCanvas.importSvgString(response); svgEditor.svgCanvas.importSvgString(response);
} else if (imgStr) { } else if (imgStr) {
importImage(response); importImage(response);
} }

View File

@@ -88,7 +88,7 @@ export class SeStorageDialog extends HTMLElement {
super(); super();
// create the shadowDom and insert the template // create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'}); this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true)); this._shadowRoot.append(template.content.cloneNode(true));
this.$dialog = this._shadowRoot.querySelector('#dialog_box'); this.$dialog = this._shadowRoot.querySelector('#dialog_box');
this.$storage = this._shadowRoot.querySelector('#js-storage'); this.$storage = this._shadowRoot.querySelector('#js-storage');
this.$okBtn = this._shadowRoot.querySelector('#storage_ok'); this.$okBtn = this._shadowRoot.querySelector('#storage_ok');

View File

@@ -372,7 +372,8 @@ export const setGradientMethod = function (type) {
// no duplicate found, so import gradient into defs // no duplicate found, so import gradient into defs
if (!duplicateGrad) { if (!duplicateGrad) {
// const origGrad = grad; // const origGrad = grad;
grad = defs.appendChild(elemContext_.getDOMDocument().importNode(grad, true)); grad = elemContext_.getDOMDocument().importNode(grad, true);
defs.append(grad);
// get next id and set it on the grad // get next id and set it on the grad
grad.id = elemContext_.getCanvas().getNextId(); grad.id = elemContext_.getCanvas().getNextId();
} else { // use existing gradient } else { // use existing gradient
@@ -879,7 +880,7 @@ export const setBackgroundMethod = function (color, url) {
'R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjG+' + 'R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjG+' +
'gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7);' 'gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7);'
}); });
bgPattern.appendChild(div); bgPattern.append(div);
bg.append(bgPattern); bg.append(bgPattern);
} }
} else if (bgPattern) { } else if (bgPattern) {

View File

@@ -361,7 +361,7 @@ export const pathActionsMethod = (function () {
'stroke-width': '0.5', 'stroke-width': '0.5',
fill: 'none' fill: 'none'
}); });
stretchy = getElem('selectorParentGroup').appendChild(stretchy); getElem('selectorParentGroup').append(stretchy);
} }
stretchy.setAttribute('display', 'inline'); stretchy.setAttribute('display', 'inline');

View File

@@ -134,7 +134,8 @@ export const getGripContainerMethod = function () {
let c = getElem('pathpointgrip_container'); let c = getElem('pathpointgrip_container');
if (!c) { if (!c) {
const parentElement = getElem('selectorParentGroup'); const parentElement = getElem('selectorParentGroup');
c = parentElement.appendChild(document.createElementNS(NS.SVG, 'g')); c = document.createElementNS(NS.SVG, 'g');
parentElement.append(c);
c.id = 'pathpointgrip_container'; c.id = 'pathpointgrip_container';
} }
return c; return c;
@@ -171,7 +172,7 @@ export const addPointGripMethod = function (index, x, y) {
atts['xlink:title'] = uiStrings.pathNodeTooltip; atts['xlink:title'] = uiStrings.pathNodeTooltip;
} }
assignAttributes(pointGrip, atts); assignAttributes(pointGrip, atts);
pointGrip = pointGripContainer.appendChild(pointGrip); pointGripContainer.append(pointGrip);
const grip = $('#pathpointgrip_' + index); const grip = $('#pathpointgrip_' + index);
grip.dblclick(function () { grip.dblclick(function () {

View File

@@ -45,20 +45,19 @@ export class Selector {
}); });
// this holds a reference to the path rect // this holds a reference to the path rect
this.selectorRect = this.selectorGroup.appendChild( this.selectorRect = svgFactory_.createSVGElement({
svgFactory_.createSVGElement({ element: 'path',
element: 'path', attr: {
attr: { id: ('selectedBox' + this.id),
id: ('selectedBox' + this.id), fill: 'none',
fill: 'none', stroke: '#22C',
stroke: '#22C', 'stroke-width': '1',
'stroke-width': '1', 'stroke-dasharray': '5,5',
'stroke-dasharray': '5,5', // need to specify this so that the rect is not selectable
// need to specify this so that the rect is not selectable style: 'pointer-events:none'
style: 'pointer-events:none' }
} });
}) this.selectorGroup.append(this.selectorRect);
);
// this holds a reference to the grip coordinates for this selector // this holds a reference to the grip coordinates for this selector
this.gripCoords = { this.gripCoords = {
@@ -342,11 +341,12 @@ export class SelectorManager {
$.data(grip, 'dir', dir); $.data(grip, 'dir', dir);
$.data(grip, 'type', 'resize'); $.data(grip, 'type', 'resize');
this.selectorGrips[dir] = this.selectorGripsGroup.appendChild(grip); this.selectorGrips[dir] = grip;
this.selectorGripsGroup.append(grip);
}); });
// add rotator elems // add rotator elems
this.rotateGripConnector = this.selectorGripsGroup.appendChild( this.rotateGripConnector =
svgFactory_.createSVGElement({ svgFactory_.createSVGElement({
element: 'line', element: 'line',
attr: { attr: {
@@ -354,10 +354,10 @@ export class SelectorManager {
stroke: '#22C', stroke: '#22C',
'stroke-width': '1' 'stroke-width': '1'
} }
}) });
); this.selectorGripsGroup.append(this.rotateGripConnector);
this.rotateGrip = this.selectorGripsGroup.appendChild( this.rotateGrip =
svgFactory_.createSVGElement({ svgFactory_.createSVGElement({
element: 'circle', element: 'circle',
attr: { attr: {
@@ -368,8 +368,8 @@ export class SelectorManager {
'stroke-width': 2, 'stroke-width': 2,
style: 'cursor:url(' + config_.imgPath + 'rotate.svg) 12 12, auto;' style: 'cursor:url(' + config_.imgPath + 'rotate.svg) 12 12, auto;'
} }
}) });
); this.selectorGripsGroup.append(this.rotateGrip);
$.data(this.rotateGrip, 'type', 'rotate'); $.data(this.rotateGrip, 'type', 'rotate');
if ($('#canvasBackground').length) { return; } if ($('#canvasBackground').length) { return; }
@@ -477,7 +477,7 @@ export class SelectorManager {
*/ */
getRubberBandBox () { getRubberBandBox () {
if (!this.rubberBandBox) { if (!this.rubberBandBox) {
this.rubberBandBox = this.selectorParentGroup.appendChild( this.rubberBandBox =
svgFactory_.createSVGElement({ svgFactory_.createSVGElement({
element: 'rect', element: 'rect',
attr: { attr: {
@@ -489,8 +489,8 @@ export class SelectorManager {
display: 'none', display: 'none',
style: 'pointer-events:none' style: 'pointer-events:none'
} }
}) });
); this.selectorParentGroup.append(this.rubberBandBox);
} }
return this.rubberBandBox; return this.rubberBandBox;
} }

View File

@@ -53,10 +53,10 @@ export const init = function (elementContext) {
export const moveToTopSelectedElem = function () { export const moveToTopSelectedElem = function () {
const [selected] = elementContext_.getSelectedElements(); const [selected] = elementContext_.getSelectedElements();
if (!isNullish(selected)) { if (!isNullish(selected)) {
let t = selected; const t = selected;
const oldParent = t.parentNode; const oldParent = t.parentNode;
const oldNextSibling = t.nextSibling; const oldNextSibling = t.nextSibling;
t = t.parentNode.appendChild(t); t.parentNode.append(t);
// If the element actually moved position, add the command and fire the changed // If the element actually moved position, add the command and fire the changed
// event handler. // event handler.
if (oldNextSibling !== t.nextSibling) { if (oldNextSibling !== t.nextSibling) {
@@ -792,8 +792,7 @@ export const convertToGroup = function (elem) {
}); });
// Give ID for any visible element missing one // Give ID for any visible element missing one
const visElems = elementContext_.getVisElems(); $(g).find(elementContext_.getVisElems()).each(function () {
$(g).find(visElems).each(function () {
if (!this.id) { this.id = elementContext_.getNextId(); } if (!this.id) { this.id = elementContext_.getNextId(); }
}); });

View File

@@ -679,6 +679,7 @@ function getIssues () {
} }
$.each(issueList, function (sel, descr) { $.each(issueList, function (sel, descr) {
// eslint-disable-next-line unicorn/no-array-callback-reference
if (content.find(sel).length) { if (content.find(sel).length) {
issueCodes.push(sel); issueCodes.push(sel);
issues.push(descr); issues.push(descr);

View File

@@ -81,7 +81,7 @@ export const textActionsMethod = (function () {
stroke: '#333', stroke: '#333',
'stroke-width': 1 'stroke-width': 1
}); });
cursor = getElem('selectorParentGroup').appendChild(cursor); getElem('selectorParentGroup').append(cursor);
} }
if (!blinker) { if (!blinker) {