diff --git a/angular.json b/angular.json index d9535f656cd2..815c38a3f705 100644 --- a/angular.json +++ b/angular.json @@ -20,37 +20,40 @@ "build": { "builder": "@angular-devkit/build-angular:application", "options": { - "allowedCommonJsDependencies": [ - "clone-deep", - "crypto-js", - "crypto", - "dagre", - "dayjs/locale/de", - "dompurify", - "export-to-csv", - "hoist-non-react-statics", - "interactjs", - "is-mobile", - "js-video-url-parser", - "jszip", - "localforage", - "mobile-drag-drop", - "papaparse", - "pepjs", - "prop-types", - "react", - "react-dom", - "react-dom/client", - "react-is", - "rfdc", - "shallowequal", - "markdown-it-class", - "smoothscroll-polyfill", - "sockjs-client", - "use-sync-external-store/shim", - "use-sync-external-store/shim/with-selector", - "webcola", - "webstomp-client" + "allowedCommonJsDependencies": [ + "@vscode/markdown-it-katex", + "clone-deep", + "crypto-js", + "crypto", + "dagre", + "dayjs/locale/de", + "dompurify", + "emoji-js", + "export-to-csv", + "hoist-non-react-statics", + "interactjs", + "is-mobile", + "js-video-url-parser", + "jszip", + "localforage", + "markdown-it-highlightjs", + "mobile-drag-drop", + "papaparse", + "pepjs", + "prop-types", + "react", + "react-dom", + "react-dom/client", + "react-is", + "rfdc", + "shallowequal", + "markdown-it-class", + "smoothscroll-polyfill", + "sockjs-client", + "use-sync-external-store/shim", + "use-sync-external-store/shim/with-selector", + "webcola", + "webstomp-client" ], "outputPath": { "base": "build/resources/main/static/", diff --git a/jest.config.js b/jest.config.js index f19a6c392563..79e40bdb3162 100644 --- a/jest.config.js +++ b/jest.config.js @@ -102,10 +102,10 @@ module.exports = { coverageThreshold: { global: { // TODO: in the future, the following values should increase to at least 90% - statements: 87.53, + statements: 87.52, branches: 73.62, - functions: 82.13, - lines: 87.58, + functions: 82.12, + lines: 87.57, }, }, coverageReporters: ['clover', 'json', 'lcov', 'text-summary'], diff --git a/package-lock.json b/package-lock.json index 7279ee91a64a..5f2c0c279049 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,6 @@ "@siemens/ngx-datatable": "22.4.1", "@swimlane/ngx-charts": "20.5.0", "@swimlane/ngx-graph": "8.4.0", - "@types/emoji-js": "^3.5.2", "@vscode/codicons": "0.0.36", "@vscode/markdown-it-katex": "1.1.0", "bootstrap": "5.3.3", @@ -47,7 +46,7 @@ "dayjs": "1.11.13", "diff-match-patch-typescript": "1.1.0", "dompurify": "3.1.7", - "emoji-js": "^3.8.0", + "emoji-js": "3.8.0", "export-to-csv": "1.4.0", "fast-json-patch": "3.1.1", "franc-min": "6.2.0", @@ -95,6 +94,7 @@ "@types/crypto-js": "4.2.2", "@types/d3-shape": "3.1.6", "@types/dompurify": "3.0.5", + "@types/emoji-js": "3.5.2", "@types/jest": "29.5.14", "@types/lodash-es": "4.17.12", "@types/markdown-it": "14.1.2", @@ -7199,7 +7199,8 @@ "node_modules/@types/emoji-js": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/@types/emoji-js/-/emoji-js-3.5.2.tgz", - "integrity": "sha512-qPR85yjSPk2UEbdjYYNHfcOjVod7DCARSrJlPcL+cwaDFwdnmOFhPyYUvP5GaW0YZEy8mU93ZjTNgsVWz1zzlg==" + "integrity": "sha512-qPR85yjSPk2UEbdjYYNHfcOjVod7DCARSrJlPcL+cwaDFwdnmOFhPyYUvP5GaW0YZEy8mU93ZjTNgsVWz1zzlg==", + "dev": true }, "node_modules/@types/estree": { "version": "1.0.6", diff --git a/package.json b/package.json index 3ef1c0cf2744..ffeb9a9418be 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@siemens/ngx-datatable": "22.4.1", "@swimlane/ngx-charts": "20.5.0", "@swimlane/ngx-graph": "8.4.0", - "@types/emoji-js": "^3.5.2", "@vscode/codicons": "0.0.36", "@vscode/markdown-it-katex": "1.1.0", "bootstrap": "5.3.3", @@ -50,7 +49,7 @@ "dayjs": "1.11.13", "diff-match-patch-typescript": "1.1.0", "dompurify": "3.1.7", - "emoji-js": "^3.8.0", + "emoji-js": "3.8.0", "export-to-csv": "1.4.0", "fast-json-patch": "3.1.1", "franc-min": "6.2.0", @@ -132,6 +131,7 @@ "@types/crypto-js": "4.2.2", "@types/d3-shape": "3.1.6", "@types/dompurify": "3.0.5", + "@types/emoji-js": "3.5.2", "@types/jest": "29.5.14", "@types/lodash-es": "4.17.12", "@types/markdown-it": "14.1.2", diff --git a/src/main/webapp/app/shared/monaco-editor/monaco-editor.component.ts b/src/main/webapp/app/shared/monaco-editor/monaco-editor.component.ts index bd2f0a1aa7e7..32889aef0f45 100644 --- a/src/main/webapp/app/shared/monaco-editor/monaco-editor.component.ts +++ b/src/main/webapp/app/shared/monaco-editor/monaco-editor.component.ts @@ -13,7 +13,7 @@ import { MonacoTextEditorAdapter } from 'app/shared/monaco-editor/model/actions/ import { MonacoEditorService } from 'app/shared/monaco-editor/monaco-editor.service'; import { getOS } from 'app/shared/util/os-detector.util'; -import EmojiConvertor from 'emoji-js'; +import { EmojiConvertor } from 'emoji-js'; export const MAX_TAB_SIZE = 8; @@ -36,7 +36,7 @@ export class MonacoEditorComponent implements OnInit, OnDestroy { private readonly _editor: monaco.editor.IStandaloneCodeEditor; private readonly textEditorAdapter: MonacoTextEditorAdapter; private readonly monacoEditorContainerElement: HTMLElement; - private emojiConvertor: EmojiConvertor; + private readonly emojiConvertor = new EmojiConvertor(); /* * Elements, models, and actions of the editor. @@ -89,7 +89,6 @@ export class MonacoEditorComponent implements OnInit, OnDestroy { this.textEditorAdapter = new MonacoTextEditorAdapter(this._editor); this.renderer.appendChild(this.elementRef.nativeElement, this.monacoEditorContainerElement); - this.emojiConvertor = new EmojiConvertor(); this.emojiConvertor.replace_mode = 'unified'; this.emojiConvertor.allow_native = true;