@finos/legend-application 10.0.7 → 10.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/shared/TextInputEditor.d.ts +1 -6
- package/lib/components/shared/TextInputEditor.d.ts.map +1 -1
- package/lib/components/shared/TextInputEditor.js +1 -16
- package/lib/components/shared/TextInputEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/stores/LegendApplicationDocumentation.d.ts +2 -1
- package/lib/stores/LegendApplicationDocumentation.d.ts.map +1 -1
- package/lib/stores/LegendApplicationDocumentation.js +1 -0
- package/lib/stores/LegendApplicationDocumentation.js.map +1 -1
- package/package.json +13 -13
- package/src/components/shared/TextInputEditor.tsx +1 -21
- package/src/stores/LegendApplicationDocumentation.ts +1 -0
|
@@ -14,13 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
-
import {
|
|
17
|
+
import { editor as monacoEditorAPI } from 'monaco-editor';
|
|
18
18
|
import { type EDITOR_LANGUAGE } from '../../const.js';
|
|
19
|
-
/**
|
|
20
|
-
* NOTE: `monaco-editor` does not bubble `keydown` event in natural order, we will
|
|
21
|
-
* have to manually do this in order to take advantage of application keyboard shortcuts service
|
|
22
|
-
*/
|
|
23
|
-
export declare const createPassThroughOnKeyHandler: () => (event: IKeyboardEvent) => void;
|
|
24
19
|
export declare const TextInputEditor: React.FC<{
|
|
25
20
|
inputValue: string;
|
|
26
21
|
isReadOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputEditor.d.ts","sourceRoot":"","sources":["../../../src/components/shared/TextInputEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"TextInputEditor.d.ts","sourceRoot":"","sources":["../../../src/components/shared/TextInputEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAGH,OAAO,EAAoB,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAS5E,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,gBAAgB,CAAC;AAG9E,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,kBAAkB,CAAC,EACf,CAAC,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,oBAAoB,CAAC,GACvE,SAAS,CAAC;IACd,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACnD,CAgHA,CAAC"}
|
|
@@ -15,18 +15,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { useState, useRef, useEffect } from 'react';
|
|
18
|
-
import { editor as monacoEditorAPI
|
|
18
|
+
import { editor as monacoEditorAPI } from 'monaco-editor';
|
|
19
19
|
import { disposeEditor, getBaseTextEditorOptions, resetLineNumberGutterWidth, getEditorValue, normalizeLineEnding, useResizeDetector, } from '@finos/legend-art';
|
|
20
20
|
import { EDITOR_THEME, TAB_SIZE } from '../../const.js';
|
|
21
21
|
import { useApplicationStore } from '../ApplicationStoreProvider.js';
|
|
22
|
-
import { forceDispatchKeyboardEvent } from '../LegendApplicationComponentFrameworkProvider.js';
|
|
23
|
-
/**
|
|
24
|
-
* NOTE: `monaco-editor` does not bubble `keydown` event in natural order, we will
|
|
25
|
-
* have to manually do this in order to take advantage of application keyboard shortcuts service
|
|
26
|
-
*/
|
|
27
|
-
export const createPassThroughOnKeyHandler = () => (event) => {
|
|
28
|
-
forceDispatchKeyboardEvent(event.browserEvent);
|
|
29
|
-
};
|
|
30
22
|
export const TextInputEditor = (props) => {
|
|
31
23
|
const { inputValue, updateInput, language, isReadOnly, showMiniMap, hideGutter, extraEditorOptions, } = props;
|
|
32
24
|
const applicationStore = useApplicationStore();
|
|
@@ -59,13 +51,6 @@ export const TextInputEditor = (props) => {
|
|
|
59
51
|
formatOnType: true,
|
|
60
52
|
formatOnPaste: true,
|
|
61
53
|
});
|
|
62
|
-
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
|
63
|
-
// else, we could risk triggering these hotkeys command multiple times
|
|
64
|
-
// e.g.
|
|
65
|
-
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
|
66
|
-
// onKeyDownEventDisposer.current?.dispose();
|
|
67
|
-
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
|
68
|
-
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
|
69
54
|
setEditor(_editor);
|
|
70
55
|
}
|
|
71
56
|
}, [applicationStore, editor]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputEditor.js","sourceRoot":"","sources":["../../../src/components/shared/TextInputEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"TextInputEditor.js","sourceRoot":"","sources":["../../../src/components/shared/TextInputEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,cAA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,uDAAuD;YACvD,GAAG,CAAC,UAAU;gBACZ,CAAC,CAAC;oBACE,WAAW,EAAE,KAAK;oBAClB,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,KAAK;oBAClB,oBAAoB,EAAE,EAAE;oBACxB,mBAAmB,EAAE,CAAC;iBACvB;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC;SAC9B,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAChC,KAAK,EAAE,aAAa,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;KAC7C;IAED,SAAS,CACP,GAAG,EAAE,CAAC,GAAS,EAAE;QACf,IAAI,MAAM,EAAE;YACV,aAAa,CAAC,MAAM,CAAC,CAAC;SACvB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC,CAAC,iBAAiB;IAEpB,OAAO,CACL,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAC,wBAAwB,YAC/C,cAAK,SAAS,EAAC,mBAAmB,EAAC,GAAG,EAAE,YAAY,GAAI,GACpD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export declare enum LEGEND_APPLICATION_DOCUMENTATION_KEY {
|
|
17
17
|
QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX = "question.how-to-use-advanced-search-syntax",
|
|
18
|
-
QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS = "question.when-to-configure-project-platform-dependencies-versions"
|
|
18
|
+
QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS = "question.when-to-configure-project-platform-dependencies-versions",
|
|
19
|
+
QUESTION_HOW_TO_WRITE_A_SERVICE_TEST = "question.how-to-write-a-service-test"
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=LegendApplicationDocumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplicationDocumentation.d.ts","sourceRoot":"","sources":["../../src/stores/LegendApplicationDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,oCAAoC;IAC9C,0CAA0C,+CAA+C;IACzF,4CAA4C,sEAAsE;
|
|
1
|
+
{"version":3,"file":"LegendApplicationDocumentation.d.ts","sourceRoot":"","sources":["../../src/stores/LegendApplicationDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,oCAAoC;IAC9C,0CAA0C,+CAA+C;IACzF,4CAA4C,sEAAsE;IAClH,oCAAoC,yCAAyC;CAC9E"}
|
|
@@ -17,5 +17,6 @@ export var LEGEND_APPLICATION_DOCUMENTATION_KEY;
|
|
|
17
17
|
(function (LEGEND_APPLICATION_DOCUMENTATION_KEY) {
|
|
18
18
|
LEGEND_APPLICATION_DOCUMENTATION_KEY["QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX"] = "question.how-to-use-advanced-search-syntax";
|
|
19
19
|
LEGEND_APPLICATION_DOCUMENTATION_KEY["QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS"] = "question.when-to-configure-project-platform-dependencies-versions";
|
|
20
|
+
LEGEND_APPLICATION_DOCUMENTATION_KEY["QUESTION_HOW_TO_WRITE_A_SERVICE_TEST"] = "question.how-to-write-a-service-test";
|
|
20
21
|
})(LEGEND_APPLICATION_DOCUMENTATION_KEY = LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));
|
|
21
22
|
//# sourceMappingURL=LegendApplicationDocumentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplicationDocumentation.js","sourceRoot":"","sources":["../../src/stores/LegendApplicationDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"LegendApplicationDocumentation.js","sourceRoot":"","sources":["../../src/stores/LegendApplicationDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,oCAIX;AAJD,WAAY,oCAAoC;IAC9C,iIAAyF,CAAA;IACzF,0JAAkH,CAAA;IAClH,qHAA6E,CAAA;AAC/E,CAAC,EAJW,oCAAoC,GAApC,oCAAoC,KAApC,oCAAoC,QAI/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.9",
|
|
4
4
|
"description": "Legend application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@finos/legend-art": "5.0.
|
|
47
|
-
"@finos/legend-graph": "20.0
|
|
48
|
-
"@finos/legend-shared": "6.2.
|
|
46
|
+
"@finos/legend-art": "5.0.6",
|
|
47
|
+
"@finos/legend-graph": "20.1.0",
|
|
48
|
+
"@finos/legend-shared": "6.2.3",
|
|
49
49
|
"@types/css-font-loading-module": "0.0.7",
|
|
50
|
-
"@types/react": "18.0.
|
|
51
|
-
"@types/react-dom": "18.0.
|
|
50
|
+
"@types/react": "18.0.25",
|
|
51
|
+
"@types/react-dom": "18.0.9",
|
|
52
52
|
"@types/react-router-dom": "5.3.3",
|
|
53
53
|
"history": "5.3.0",
|
|
54
|
-
"mobx": "6.
|
|
54
|
+
"mobx": "6.7.0",
|
|
55
55
|
"mobx-react-lite": "3.4.0",
|
|
56
56
|
"monaco-editor": "0.34.1",
|
|
57
57
|
"react": "18.2.0",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"react-router": "5.3.4",
|
|
64
64
|
"react-router-dom": "5.3.4",
|
|
65
65
|
"serializr": "3.0.1",
|
|
66
|
-
"sql-formatter": "
|
|
66
|
+
"sql-formatter": "12.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@finos/legend-dev-utils": "2.0.
|
|
70
|
-
"@jest/globals": "29.
|
|
69
|
+
"@finos/legend-dev-utils": "2.0.26",
|
|
70
|
+
"@jest/globals": "29.3.1",
|
|
71
71
|
"cross-env": "7.0.3",
|
|
72
|
-
"eslint": "8.
|
|
73
|
-
"jest": "29.
|
|
72
|
+
"eslint": "8.27.0",
|
|
73
|
+
"jest": "29.3.1",
|
|
74
74
|
"npm-run-all": "4.1.5",
|
|
75
75
|
"rimraf": "3.0.2",
|
|
76
|
-
"sass": "1.
|
|
76
|
+
"sass": "1.56.1",
|
|
77
77
|
"typescript": "4.8.4"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -15,11 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { useState, useRef, useEffect } from 'react';
|
|
18
|
-
import {
|
|
19
|
-
type IDisposable,
|
|
20
|
-
type IKeyboardEvent,
|
|
21
|
-
editor as monacoEditorAPI,
|
|
22
|
-
} from 'monaco-editor';
|
|
18
|
+
import { type IDisposable, editor as monacoEditorAPI } from 'monaco-editor';
|
|
23
19
|
import {
|
|
24
20
|
disposeEditor,
|
|
25
21
|
getBaseTextEditorOptions,
|
|
@@ -30,15 +26,6 @@ import {
|
|
|
30
26
|
} from '@finos/legend-art';
|
|
31
27
|
import { type EDITOR_LANGUAGE, EDITOR_THEME, TAB_SIZE } from '../../const.js';
|
|
32
28
|
import { useApplicationStore } from '../ApplicationStoreProvider.js';
|
|
33
|
-
import { forceDispatchKeyboardEvent } from '../LegendApplicationComponentFrameworkProvider.js';
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* NOTE: `monaco-editor` does not bubble `keydown` event in natural order, we will
|
|
37
|
-
* have to manually do this in order to take advantage of application keyboard shortcuts service
|
|
38
|
-
*/
|
|
39
|
-
export const createPassThroughOnKeyHandler = () => (event: IKeyboardEvent) => {
|
|
40
|
-
forceDispatchKeyboardEvent(event.browserEvent);
|
|
41
|
-
};
|
|
42
29
|
|
|
43
30
|
export const TextInputEditor: React.FC<{
|
|
44
31
|
inputValue: string;
|
|
@@ -97,13 +84,6 @@ export const TextInputEditor: React.FC<{
|
|
|
97
84
|
formatOnType: true,
|
|
98
85
|
formatOnPaste: true,
|
|
99
86
|
});
|
|
100
|
-
// NOTE: if we ever set any hotkey explicitly, we would like to use the disposer partern instead
|
|
101
|
-
// else, we could risk triggering these hotkeys command multiple times
|
|
102
|
-
// e.g.
|
|
103
|
-
// const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
|
104
|
-
// onKeyDownEventDisposer.current?.dispose();
|
|
105
|
-
// onKeyDownEventDisposer.current = editor.onKeyDown(() => ...)
|
|
106
|
-
_editor.onKeyDown(() => createPassThroughOnKeyHandler());
|
|
107
87
|
setEditor(_editor);
|
|
108
88
|
}
|
|
109
89
|
}, [applicationStore, editor]);
|
|
@@ -17,4 +17,5 @@
|
|
|
17
17
|
export enum LEGEND_APPLICATION_DOCUMENTATION_KEY {
|
|
18
18
|
QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX = 'question.how-to-use-advanced-search-syntax',
|
|
19
19
|
QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS = 'question.when-to-configure-project-platform-dependencies-versions',
|
|
20
|
+
QUESTION_HOW_TO_WRITE_A_SERVICE_TEST = 'question.how-to-write-a-service-test',
|
|
20
21
|
}
|