@finos/legend-application 0.0.13 → 0.2.1
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/CHANGELOG.md +27 -0
- package/lib/components/ActionAlert.d.ts.map +1 -1
- package/lib/components/ActionAlert.js +5 -8
- package/lib/components/ActionAlert.js.map +1 -1
- package/lib/components/AppHeader.d.ts +20 -0
- package/lib/components/AppHeader.d.ts.map +1 -0
- package/lib/components/AppHeader.js +26 -0
- package/lib/components/AppHeader.js.map +1 -0
- package/lib/components/ApplicationStoreProvider.js +1 -1
- package/lib/components/ApplicationStoreProvider.js.map +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.js +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.js.map +1 -1
- package/lib/components/BlockingAlert.js +2 -2
- package/lib/components/BlockingAlert.js.map +1 -1
- package/lib/components/LambdaEditor.d.ts.map +1 -1
- package/lib/components/LambdaEditor.js +18 -19
- package/lib/components/LambdaEditor.js.map +1 -1
- package/lib/components/NotificationSnackbar.d.ts.map +1 -1
- package/lib/components/NotificationSnackbar.js +22 -12
- package/lib/components/NotificationSnackbar.js.map +1 -1
- package/lib/components/TextInputEditor.d.ts.map +1 -1
- package/lib/components/TextInputEditor.js +16 -7
- package/lib/components/TextInputEditor.js.map +1 -1
- package/lib/components/WebApplicationNavigatorProvider.d.ts.map +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/stores/ApplicationStore.d.ts +1 -1
- package/lib/stores/ApplicationStore.d.ts.map +1 -1
- package/lib/stores/ApplicationStore.js +9 -12
- package/lib/stores/ApplicationStore.js.map +1 -1
- package/lib/stores/WebApplicationNavigator.d.ts +18 -1
- package/lib/stores/WebApplicationNavigator.d.ts.map +1 -1
- package/lib/stores/WebApplicationNavigator.js +5 -2
- package/lib/stores/WebApplicationNavigator.js.map +1 -1
- package/package.json +20 -20
- package/src/components/ActionAlert.tsx +1 -4
- package/src/components/AppHeader.tsx +47 -0
- package/src/components/LambdaEditor.tsx +11 -10
- package/src/components/NotificationSnackbar.tsx +28 -3
- package/src/components/TextInputEditor.tsx +17 -5
- package/src/components/WebApplicationNavigatorProvider.tsx +2 -1
- package/src/index.ts +1 -0
- package/src/stores/ApplicationStore.ts +8 -20
- package/src/stores/WebApplicationNavigator.ts +22 -2
- package/tsconfig.json +2 -5
- package/tsconfig.package.json +0 -40
|
@@ -17,7 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
17
|
import { useState, useRef, useEffect } from 'react';
|
|
18
18
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
|
19
19
|
import { useResizeDetector } from 'react-resize-detector';
|
|
20
|
-
import { disposeEditor, disableEditorHotKeys, baseTextEditorSettings, resetLineNumberGutterWidth, } from '@finos/legend-art';
|
|
20
|
+
import { disposeEditor, disableEditorHotKeys, baseTextEditorSettings, resetLineNumberGutterWidth, getEditorValue, normalizeLineEnding, } from '@finos/legend-art';
|
|
21
21
|
import { EDITOR_THEME, TAB_SIZE } from '../const';
|
|
22
22
|
import { useApplicationStore } from './ApplicationStoreProvider';
|
|
23
23
|
export const TextInputEditor = (props) => {
|
|
@@ -26,6 +26,15 @@ export const TextInputEditor = (props) => {
|
|
|
26
26
|
const [editor, setEditor] = useState();
|
|
27
27
|
const onKeyDownEventDisposer = useRef(undefined);
|
|
28
28
|
const onDidChangeModelContentEventDisposer = useRef(undefined);
|
|
29
|
+
/**
|
|
30
|
+
* NOTE: we want to normalize line ending here since if the original
|
|
31
|
+
* input value includes CR '\r' character, it will get normalized, calling
|
|
32
|
+
* the updateInput method and cause a rerender. With the way we setup
|
|
33
|
+
* `onChange` method, React will warn about `setState` being called in
|
|
34
|
+
* `render` method.
|
|
35
|
+
* See https://github.com/finos/legend-studio/issues/608
|
|
36
|
+
*/
|
|
37
|
+
const value = normalizeLineEnding(inputValue);
|
|
29
38
|
const textInputRef = useRef(null);
|
|
30
39
|
const { ref, width, height } = useResizeDetector();
|
|
31
40
|
useEffect(() => {
|
|
@@ -61,8 +70,8 @@ export const TextInputEditor = (props) => {
|
|
|
61
70
|
onDidChangeModelContentEventDisposer.current?.dispose();
|
|
62
71
|
onDidChangeModelContentEventDisposer.current =
|
|
63
72
|
editor.onDidChangeModelContent(() => {
|
|
64
|
-
const currentVal = editor
|
|
65
|
-
if (currentVal !==
|
|
73
|
+
const currentVal = getEditorValue(editor);
|
|
74
|
+
if (currentVal !== value) {
|
|
66
75
|
updateInput?.(currentVal);
|
|
67
76
|
}
|
|
68
77
|
});
|
|
@@ -79,9 +88,9 @@ export const TextInputEditor = (props) => {
|
|
|
79
88
|
});
|
|
80
89
|
});
|
|
81
90
|
// Set the text value and editor options
|
|
82
|
-
const currentValue = editor
|
|
83
|
-
if (currentValue !==
|
|
84
|
-
editor.setValue(
|
|
91
|
+
const currentValue = getEditorValue(editor);
|
|
92
|
+
if (currentValue !== value) {
|
|
93
|
+
editor.setValue(value);
|
|
85
94
|
}
|
|
86
95
|
editor.updateOptions({
|
|
87
96
|
readOnly: Boolean(isReadOnly),
|
|
@@ -107,6 +116,6 @@ export const TextInputEditor = (props) => {
|
|
|
107
116
|
disposeEditor(editor);
|
|
108
117
|
}
|
|
109
118
|
}, [editor]); // dispose editor
|
|
110
|
-
return (_jsx("div",
|
|
119
|
+
return (_jsx("div", { ref: ref, className: "text-editor__container", children: _jsx("div", { className: "text-editor__body", ref: textInputRef }, void 0) }, void 0));
|
|
111
120
|
};
|
|
112
121
|
//# sourceMappingURL=TextInputEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputEditor.js","sourceRoot":"","sources":["../../src/components/TextInputEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;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;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,WAAI,WACpD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigatorProvider.d.ts","sourceRoot":"","sources":["../../src/components/WebApplicationNavigatorProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigatorProvider.d.ts","sourceRoot":"","sources":["../../src/components/WebApplicationNavigatorProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAM5E,eAAO,MAAM,+BAA+B;cAGhC,MAAM,SAAS;MACvB,MAAM,YAUT,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAO,uBAI3C,CAAC"}
|
|
@@ -23,7 +23,7 @@ const WebApplicationNavigatorContext = createContext(undefined);
|
|
|
23
23
|
export const WebApplicationNavigatorProvider = ({ children, }) => {
|
|
24
24
|
const history = useHistory();
|
|
25
25
|
const navigator = useLocalObservable(() => new WebApplicationNavigator(history));
|
|
26
|
-
return (_jsx(WebApplicationNavigatorContext.Provider,
|
|
26
|
+
return (_jsx(WebApplicationNavigatorContext.Provider, { value: navigator, children: children }, void 0));
|
|
27
27
|
};
|
|
28
28
|
export const useWebApplicationNavigator = () => guaranteeNonNullable(useContext(WebApplicationNavigatorContext), `Can't find web application navigator in context`);
|
|
29
29
|
//# sourceMappingURL=WebApplicationNavigatorProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigatorProvider.js","sourceRoot":"","sources":["../../src/components/WebApplicationNavigatorProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigatorProvider.js","sourceRoot":"","sources":["../../src/components/WebApplicationNavigatorProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,MAAM,8BAA8B,GAAG,aAAa,CAElD,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,QAAQ,GAGT,EAAsB,EAAE;IACvB,MAAM,OAAO,GAAG,UAAU,EAAa,CAAC;IACxC,MAAM,SAAS,GAAG,kBAAkB,CAClC,GAAG,EAAE,CAAC,IAAI,uBAAuB,CAAC,OAAO,CAAC,CAC3C,CAAC;IACF,OAAO,CACL,KAAC,8BAA8B,CAAC,QAAQ,IAAC,KAAK,EAAE,SAAS,YACtD,QAAQ,WAC+B,CAC3C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAA4B,EAAE,CACtE,oBAAoB,CAClB,UAAU,CAAC,8BAA8B,CAAC,EAC1C,iDAAiD,CAClD,CAAC"}
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license @finos/legend-application v0.
|
|
1
|
+
/** @license @finos/legend-application v0.2.1
|
|
2
2
|
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
:root{--color-primitive: var(--color-light-blue-200);--color-enum-value: var(--color-green-100);--color-enumeration: var(--color-medium-green-100);--color-measure: var(--color-medium-green-100);--color-unit: var(--color-medium-green-100);--color-class: var(--color-purple-100);--color-mapping: var(--color-teal-50);--color-function: var(--color-light-blue-20);--color-profile: var(--color-lime-75);--color-generated: var(--color-pink-200);--color-system: var(--color-light-blue-50);--color-dependency: var(--color-lime-50);--color-config: var(--color-orange-100);--color-flat-data: var(--color-orange-100);--color-relational: var(--color-blue-500);--color-file-generation: var(--color-blue-50);--color-database: var(--color-orange-100);--color-schema: var(--color-medium-green-500);--color-table: var(--color-light-blue-200);--color-association: var(--color-light-grey-400);--color-service: var(--color-blue-40);--color-runtime: var(--color-red-180);--color-connection: var(--color-yellow-100)}.color--class{color:var(--color-class)}.color--enumeration{color:var(--color-enumeration)}.color--unit{color:var(--color-unit)}.color--measure{color:var(--color-measure)}.color--association{color:var(--color-association)}.color--primitive{color:var(--color-primitive)}.color--enum-value{color:var(--color-enum-value)}.color--mapping{color:var(--color-mapping)}.color--function{color:var(--color-function)}.color--file-generation{color:var(--color-file-generation)}.color--profile{color:var(--color-profile)}.color--generated{color:var(--color-generated)}.color--system{color:var(--color-system)}.color--dependency{color:var(--color-dependency)}.color--config{color:var(--color-config)}.color--flat-data{color:var(--color-flat-data)}.color--database{color:var(--color-database)}.color--table{color:var(--color-table)}.color--schema{color:var(--color-schema)}.color--service{color:var(--color-service)}.color--connection{color:var(--color-connection)}.color--runtime{color:var(--color-runtime)}.background--pureinstance,.background--class{background:var(--color-class)}.background--enumeration{background:var(--color-enumeration)}.background--unit{background:var(--color-unit)}.background--measure{background:var(--color-measure)}.background--association{background:var(--color-association)}.background--primitive{background:var(--color-primitive)}.background--enum-value{background:var(--color-enum-value)}.background--mapping{background:var(--color-mapping)}.background--profile{background:var(--color-profile)}.background--flat-data{background:var(--color-flat-data)}.background--database{background:var(--color-database)}.background--service{background:var(--color-service)}.background--connection{background:var(--color-connection)}.background--runtime{background:var(--color-runtime)}.background--relational{background:var(--color-relational)}.blocking-alert{padding:0}.blocking-alert__root-container{margin-top:0 !important}.blocking-alert__container{align-items:center !important}.blocking-alert .btn{display:flex;align-items:center;justify-content:center;height:2.8rem;border-radius:.1rem;border:none;color:var(--color-light-grey-50)}.blocking-alert .modal__body{line-height:2.2rem;cursor:default;text-align:justify}.blocking-alert__message{text-align:center}.blocking-alert__message__prompt{text-align:center;font-size:1.2rem;color:var(--color-blue-150);font-weight:500}.blocking-alert__summary-text{color:var(--color-light-grey-400);font-weight:500}.blocking-alert__prompt-text{color:var(--color-blue-50);font-size:1.3rem;margin-top:1rem;font-weight:500}.blocking-alert--standard{border:.1rem solid var(--color-blue-200)}.blocking-alert--caution{border:.1rem solid var(--color-pink-400)}.blocking-alert--caution .mode__header{background:var(--color-pink-400)}.blocking-alert--caution .blocking-alert__prompt-text{color:var(--color-pink-300)}.backdrop{background:var(--color-dark-shade-230) !important;z-index:100 !important}.backdrop__element{z-index:100;position:relative;box-shadow:var(--color-dark-shade-280) 0 .1rem .3rem .1rem}.lambda-editor{display:flex;align-items:center;height:2.8rem;flex:1 0 auto;min-width:0;border-radius:.2rem;background:var(--color-dark-grey-300)}.lambda-editor .monaco-editor .margin,.lambda-editor .monaco-editor .monaco-editor-background{background:var(--color-dark-grey-300) !important}.lambda-editor .monaco-editor .decorationsOverviewRuler{display:none}.lambda-editor__editor__input{position:relative;height:100%;width:100%}.lambda-editor__editor__input__compressed .scroll-decoration{box-shadow:none}.lambda-editor__editor__input__compressed .selected-text,.lambda-editor__editor__input__compressed .selectionHighlight{height:2.6rem !important}.lambda-editor__editor__input__compressed .cursors-layer .cursor{top:.3rem !important;height:2rem !important}.lambda-editor__editor__input__compressed .view-line{display:flex;align-items:center;height:2.6rem !important}.lambda-editor__editor__info{display:flex;align-items:center;height:100%;padding:0 .5rem;border:.1rem solid var(--color-dark-grey-300);border-right:none;border-left:none;background:var(--color-dark-grey-300)}.lambda-editor__editor__expected-return-type{display:flex;align-items:center;justify-content:center;height:100%;height:1.8rem;border-radius:.2rem;padding:0 .5rem;color:var(--color-dark-grey-400);background:var(--color-light-grey-0);border:.1rem solid var(--color-light-grey-0);font-size:1.1rem;cursor:default}.lambda-editor__editor__expected-return-type--clickable{cursor:pointer}.lambda-editor__editor__expected-return-type--highlighted{border-color:var(--color-yellow-0);background:var(--color-yellow-0);color:var(--color-dark-grey-0)}.lambda-editor__editor__expand-btn{display:flex;align-items:center;justify-content:center;height:100%;width:1.6rem;background:var(--color-dark-grey-280);border:.1rem solid var(--color-dark-grey-280);color:var(--color-light-grey-100);border-radius:0 .2rem .2rem 0;cursor:pointer}.lambda-editor__editor__expand-btn[disabled]{color:var(--color-dark-grey-400);cursor:not-allowed}.lambda-editor__expanded{height:28rem !important}.lambda-editor__expanded .lambda-editor__editor__info{align-items:flex-start;padding:.4rem .5rem}.lambda-editor__expanded .lambda-editor__editor__expand-btn{background:var(--color-dark-grey-280);border-color:var(--color-dark-grey-280)}.lambda-editor--dnd-match .lambda-editor__editor__expected-return-type{background:var(--color-yellow-0);border-color:var(--color-yellow-0);color:var(--color-dark-grey-0)}.lambda-editor__action{width:2.8rem;min-width:2.8rem;background:var(--color-dark-grey-250);height:2.8rem;border-left:.1rem solid var(--color-dark-shade-300)}.lambda-editor__action svg{color:var(--color-light-grey-200)}.lambda-editor__error-feedback{width:100%;margin-top:.5rem;background:var(--color-red-100);color:var(--color-light-grey-0);border-radius:.2rem;cursor:default}.lambda-editor__error-feedback__error__message{display:inline-flex;line-height:1.6rem;padding:.5rem}.lambda-editor__error-feedback__parsing-error__content{display:flex;justify-content:space-between;border-top:.1rem solid var(--color-dark-shade-230);padding:.5rem}.lambda-editor__error-feedback__parsing-error__discard-changes-btn{cursor:pointer;font-size:1.2rem;height:1.8rem;background:var(--color-dark-shade-230);white-space:nowrap;border-radius:.2rem;padding:0 .5rem;color:var(--color-light-grey-50)}.lambda-editor__popup__modal__content{width:100%;height:100%;background:var(--color-dark-grey-50)}.lambda-editor__popup__modal--has-error{border:.1rem solid var(--color-red-200) !important}.lambda-editor__popup__modal--has-error .modal__header{background:var(--color-red-200)}.lambda-editor__popup__modal--has-error .modal__title__error-badge{display:flex;align-items:center;justify-content:center;margin-right:1rem;background:var(--color-red-400);height:2.2rem;border-radius:.2rem;padding:.5rem;font-size:1.2rem;user-select:none}.lambda-editor__popup__content{height:100% !important;background:var(--color-dark-grey-50);padding-top:1rem}.lambda-editor__popup__content .monaco-editor .margin,.lambda-editor__popup__content .monaco-editor .monaco-editor-background{background:var(--color-dark-grey-50) !important}.notification__position{bottom:3rem !important;right:1rem !important}.notification__content{background-color:var(--color-dark-grey-200) !important;color:var(--color-light-grey-150) !important;border-radius:.3rem !important;align-items:flex-start !important}.notification__message__content{display:flex;align-items:flex-start}.notification__message__content__icon{padding-top:.2rem;padding-right:1rem}.notification__message__content__icon svg{font-size:1.6rem}.notification__message__content__icon--info{color:var(--color-light-grey-200)}.notification__message__content__icon--error{color:var(--color-red-100)}.notification__message__content__icon--warning{color:var(--color-yellow-200)}.notification__message__content__icon--success{color:var(--color-green-100)}.notification__message__content__text{max-height:10rem;max-width:60rem;overflow:auto}.notification__actions{padding:.8rem 0 .8rem 1rem !important}.notification__action{display:flex;align-items:center;justify-content:center;width:2rem;color:var(--color-dark-grey-400) !important}.notification__action:hover{color:var(--color-light-grey-400) !important}.text-editor__container{height:100%;width:100%;background:var(--color-dark-grey-50)}.text-editor__body{height:100%;width:100%;position:absolute;top:0;left:0}/*# sourceMappingURL=index.css.map */
|
|
17
|
+
:root{--color-primitive: var(--color-light-blue-200);--color-enum-value: var(--color-green-100);--color-enumeration: var(--color-medium-green-100);--color-measure: var(--color-medium-green-100);--color-unit: var(--color-medium-green-100);--color-class: var(--color-purple-100);--color-mapping: var(--color-teal-50);--color-function: var(--color-light-blue-20);--color-profile: var(--color-lime-75);--color-generated: var(--color-pink-200);--color-system: var(--color-light-blue-50);--color-dependency: var(--color-lime-50);--color-config: var(--color-orange-100);--color-flat-data: var(--color-orange-100);--color-relational: var(--color-blue-500);--color-file-generation: var(--color-blue-50);--color-database: var(--color-orange-100);--color-schema: var(--color-medium-green-500);--color-table: var(--color-light-blue-200);--color-association: var(--color-light-grey-400);--color-service: var(--color-blue-40);--color-runtime: var(--color-red-180);--color-connection: var(--color-yellow-100)}.color--class{color:var(--color-class)}.color--enumeration{color:var(--color-enumeration)}.color--unit{color:var(--color-unit)}.color--measure{color:var(--color-measure)}.color--association{color:var(--color-association)}.color--primitive{color:var(--color-primitive)}.color--enum-value{color:var(--color-enum-value)}.color--mapping{color:var(--color-mapping)}.color--function{color:var(--color-function)}.color--file-generation{color:var(--color-file-generation)}.color--profile{color:var(--color-profile)}.color--generated{color:var(--color-generated)}.color--system{color:var(--color-system)}.color--dependency{color:var(--color-dependency)}.color--config{color:var(--color-config)}.color--flat-data{color:var(--color-flat-data)}.color--database{color:var(--color-database)}.color--table{color:var(--color-table)}.color--schema{color:var(--color-schema)}.color--service{color:var(--color-service)}.color--connection{color:var(--color-connection)}.color--runtime{color:var(--color-runtime)}.background--pureinstance,.background--class{background:var(--color-class)}.background--enumeration{background:var(--color-enumeration)}.background--unit{background:var(--color-unit)}.background--measure{background:var(--color-measure)}.background--association{background:var(--color-association)}.background--primitive{background:var(--color-primitive)}.background--enum-value{background:var(--color-enum-value)}.background--mapping{background:var(--color-mapping)}.background--profile{background:var(--color-profile)}.background--flat-data{background:var(--color-flat-data)}.background--database{background:var(--color-database)}.background--service{background:var(--color-service)}.background--connection{background:var(--color-connection)}.background--runtime{background:var(--color-runtime)}.background--relational{background:var(--color-relational)}.app{height:100%}.app__page{height:100%}.app__header{display:flex;justify-content:space-between;width:100%;background:var(--color-dark-grey-200);height:4.8rem}.app__header__content{display:flex;justify-content:space-between;width:100%;left:0;right:0;margin:0 auto;height:4.8rem;padding:0}.app__header__title{display:flex;align-items:center;justify-content:left;flex-direction:row;font-weight:300;font-size:1.3rem;padding-right:1rem;white-space:nowrap;overflow:hidden !important;text-overflow:ellipsis}.app__header__logo{display:flex;align-items:center;justify-content:center;fill:var(--color-text-label);width:4.8rem;height:4.8rem;cursor:pointer}.app__header__logo svg{display:none;font-size:2rem;color:var(--color-light-grey-100)}.app__header__tag{display:inline-flex;align-items:center;margin-left:1rem;background:var(--color-dark-grey-300);padding:0 .5rem;border-radius:.3rem;height:2.4rem;font-size:1.8rem;font-family:"Roboto Condensed",sans-serif;font-weight:400;color:var(--color-text-label);cursor:default}.app__header__tag__name{padding:0 .7rem;font-size:1.6rem;background:var(--color-dark-grey-300);color:var(--color-light-grey-200);font-weight:400;border-radius:.3rem 0 0 .3rem}.app__header__tag__value{padding:0 .7rem;font-size:1.6rem;margin-left:0;color:var(--color-light-grey-100);font-weight:400;background:var(--color-blue-200);border-radius:0 .3rem .3rem 0}.app__header__actions{display:flex;align-items:center}.app__header__action{display:flex;align-items:center;justify-content:center;width:4.8rem;height:100%}.app__header__action svg{color:var(--color-light-grey-400);cursor:pointer}.app__header__menu{width:15rem}.app__header__menu__item{display:flex;align-items:center;justify-content:center}.app__header__menu-btn svg{font-size:2rem}.app__content{background:var(--color-dark-grey-50);height:calc(100% - 4.8rem)}.blocking-alert{padding:0}.blocking-alert__root-container{margin-top:0 !important}.blocking-alert__container{align-items:center !important}.blocking-alert .btn{display:flex;align-items:center;justify-content:center;height:2.8rem;border-radius:.1rem;border:none;color:var(--color-light-grey-50)}.blocking-alert .modal__body{line-height:2.2rem;cursor:default;text-align:justify}.blocking-alert__message{text-align:center}.blocking-alert__message__prompt{text-align:center;font-size:1.2rem;color:var(--color-blue-150);font-weight:500}.blocking-alert__summary-text{color:var(--color-light-grey-400);font-weight:500}.blocking-alert__prompt-text{color:var(--color-blue-50);font-size:1.3rem;margin-top:1rem;font-weight:500}.blocking-alert--standard{border:.1rem solid var(--color-blue-200)}.blocking-alert--caution{border:.1rem solid var(--color-pink-400)}.blocking-alert--caution .mode__header{background:var(--color-pink-400)}.blocking-alert--caution .blocking-alert__prompt-text{color:var(--color-pink-300)}.backdrop{background:var(--color-dark-shade-230) !important;z-index:100 !important}.backdrop__element{z-index:100;position:relative;box-shadow:var(--color-dark-shade-280) 0 .1rem .3rem .1rem}.lambda-editor{display:flex;align-items:center;height:2.8rem;flex:1 0 auto;min-width:0;border-radius:.2rem;background:var(--color-dark-grey-300)}.lambda-editor .monaco-editor .margin,.lambda-editor .monaco-editor .monaco-editor-background{background:var(--color-dark-grey-300) !important}.lambda-editor .monaco-editor .decorationsOverviewRuler{display:none}.lambda-editor__editor__input{position:relative;height:100%;width:100%}.lambda-editor__editor__input__compressed .scroll-decoration{box-shadow:none}.lambda-editor__editor__input__compressed .selected-text,.lambda-editor__editor__input__compressed .selectionHighlight{height:2.6rem !important}.lambda-editor__editor__input__compressed .cursors-layer .cursor{top:.3rem !important;height:2rem !important}.lambda-editor__editor__input__compressed .view-line{display:flex;align-items:center;height:2.6rem !important}.lambda-editor__editor__info{display:flex;align-items:center;height:100%;padding:0 .5rem;border:.1rem solid var(--color-dark-grey-300);border-right:none;border-left:none;background:var(--color-dark-grey-300)}.lambda-editor__editor__expected-return-type{display:flex;align-items:center;justify-content:center;height:100%;height:1.8rem;border-radius:.2rem;padding:0 .5rem;color:var(--color-dark-grey-400);background:var(--color-light-grey-0);border:.1rem solid var(--color-light-grey-0);font-size:1.1rem;cursor:default}.lambda-editor__editor__expected-return-type--clickable{cursor:pointer}.lambda-editor__editor__expected-return-type--highlighted{border-color:var(--color-yellow-0);background:var(--color-yellow-0);color:var(--color-dark-grey-0)}.lambda-editor__editor__expand-btn{display:flex;align-items:center;justify-content:center;height:100%;width:1.6rem;background:var(--color-dark-grey-280);border:.1rem solid var(--color-dark-grey-280);color:var(--color-light-grey-100);border-radius:0 .2rem .2rem 0;cursor:pointer}.lambda-editor__editor__expand-btn[disabled]{color:var(--color-dark-grey-400);cursor:not-allowed}.lambda-editor__expanded{height:28rem !important}.lambda-editor__expanded .lambda-editor__editor__info{align-items:flex-start;padding:.4rem .5rem}.lambda-editor__expanded .lambda-editor__editor__expand-btn{background:var(--color-dark-grey-280);border-color:var(--color-dark-grey-280)}.lambda-editor--dnd-match .lambda-editor__editor__expected-return-type{background:var(--color-yellow-0);border-color:var(--color-yellow-0);color:var(--color-dark-grey-0)}.lambda-editor__action{width:2.8rem;min-width:2.8rem;background:var(--color-dark-grey-250);height:2.8rem;border-left:.1rem solid var(--color-dark-shade-300)}.lambda-editor__action svg{color:var(--color-light-grey-200)}.lambda-editor__error-feedback{width:100%;margin-top:.5rem;background:var(--color-red-100);color:var(--color-light-grey-0);border-radius:.2rem;cursor:default}.lambda-editor__error-feedback__error__message{display:inline-flex;line-height:1.6rem;padding:.5rem}.lambda-editor__error-feedback__parsing-error__content{display:flex;justify-content:space-between;border-top:.1rem solid var(--color-dark-shade-230);padding:.5rem}.lambda-editor__error-feedback__parsing-error__discard-changes-btn{cursor:pointer;font-size:1.2rem;height:1.8rem;background:var(--color-dark-shade-230);white-space:nowrap;border-radius:.2rem;padding:0 .5rem;color:var(--color-light-grey-50)}.lambda-editor__popup__modal__content{width:100%;height:100%;background:var(--color-dark-grey-50)}.lambda-editor__popup__modal--has-error{border:.1rem solid var(--color-red-200) !important}.lambda-editor__popup__modal--has-error .modal__header{background:var(--color-red-200)}.lambda-editor__popup__modal--has-error .modal__title__error-badge{display:flex;align-items:center;justify-content:center;margin-right:1rem;background:var(--color-red-400);height:2.2rem;border-radius:.2rem;padding:.5rem;font-size:1.2rem;user-select:none}.lambda-editor__popup__content{height:100% !important;background:var(--color-dark-grey-50);padding-top:1rem}.lambda-editor__popup__content .monaco-editor .margin,.lambda-editor__popup__content .monaco-editor .monaco-editor-background{background:var(--color-dark-grey-50) !important}.notification__position{bottom:3rem !important;right:1rem !important}.notification__content{background-color:var(--color-dark-grey-200) !important;color:var(--color-light-grey-150) !important;border-radius:.3rem !important;align-items:flex-start !important}.notification__message__content{display:flex;align-items:flex-start;cursor:pointer}.notification__message__content:active{background:var(--color-dark-grey-100)}.notification__message__content__icon{padding-top:.2rem;padding-right:1rem}.notification__message__content__icon svg{font-size:1.6rem}.notification__message__content__icon--info{color:var(--color-light-grey-200)}.notification__message__content__icon--error{color:var(--color-red-100)}.notification__message__content__icon--warning{color:var(--color-yellow-200)}.notification__message__content__icon--success{color:var(--color-green-100)}.notification__message__content__text{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-word;text-align:left;max-height:20rem;max-width:60rem}.notification__message__content__text--expanded{overflow:auto;white-space:pre-line;width:60rem}.notification__actions{padding:.8rem 0 .8rem 1rem !important}.notification__action{display:flex;align-items:center;justify-content:center;width:2rem;color:var(--color-dark-grey-400) !important}.notification__action:hover{color:var(--color-light-grey-400) !important}.text-editor__container{height:100%;width:100%;background:var(--color-dark-grey-50)}.text-editor__body{height:100%;width:100%;position:absolute;top:0;left:0}/*# sourceMappingURL=index.css.map */
|
package/lib/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../style/_extensions.scss","../style/components/
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/_extensions.scss","../style/components/_app.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss","../style/components/_blocking-alert.scss","../style/components/_backdrop.scss","../style/components/_lambda-editor.scss","../style/components/_notification.scss","../style/components/_text-editor.scss"],"names":[],"mappings":"AAgBA,MACE,+CACA,2CAEA,mDACA,+CACA,4CACA,uCACA,sCACA,6CACA,sCACA,yCACA,2CACA,yCACA,wCACA,2CACA,0CACA,8CACA,0CACA,8CACA,2CACA,iDACA,sCACA,sCACA,4CAIA,cACE,yBAGF,oBACE,+BAGF,aACE,wBAGF,gBACE,2BAGF,oBACE,+BAGF,kBACE,6BAGF,mBACE,8BAGF,gBACE,2BAGF,iBACE,4BAGF,wBACE,mCAGF,gBACE,2BAGF,kBACE,6BAGF,eACE,0BAGF,mBACE,8BAGF,eACE,0BAGF,kBACE,6BAGF,iBACE,4BAGF,cACE,yBAGF,eACE,0BAGF,gBACE,2BAGF,mBACE,8BAGF,gBACE,2BAKF,6CAEE,8BAGF,yBACE,oCAGF,kBACE,6BAGF,qBACE,gCAGF,yBACE,oCAGF,uBACE,kCAGF,wBACE,mCAGF,qBACE,gCAGF,qBACE,gCAGF,uBACE,kCAGF,sBACE,iCAGF,qBACE,gCAGF,wBACE,mCAGF,qBACE,gCAGF,wBACE,mCC9KJ,KACE,YAEA,WACE,YAGF,aCuBA,aACA,8BDrBE,WACA,sCACA,cAEA,sBCgBF,aACA,8BDdI,WACA,OACA,QACA,cACA,cACA,UAGF,oBCbF,aACA,mBDeI,qBACA,mBACA,gBACA,iBACA,mBACA,mBACA,2BACA,uBAGF,mBChCF,aACA,mBACA,uBDiCI,6BACA,aACA,cACA,eAEA,uBACE,aACA,eACA,kCAIJ,kBACE,oBACA,mBACA,iBACA,sCACA,gBACA,oBACA,cACA,iBACA,0CACA,gBACA,8BACA,eAGF,wBACE,gBACA,iBACA,sCACA,kCACA,gBACA,8BAGF,yBACE,gBACA,iBACA,cACA,kCACA,gBACA,iCACA,8BAGF,sBC3EF,aACA,mBD8EE,qBCrFF,aACA,mBACA,uBDsFI,aACA,YAEA,yBACE,kCACA,eAIJ,mBACE,YAGF,yBCrGF,aACA,mBACA,uBDuGE,2BACE,eAIJ,cACE,qCACA,2BEtHJ,gBACE,UAEA,gCACE,wBAGF,2BACE,8BAGF,qBDLA,aACA,mBACA,uBCME,cACA,oBACA,YACA,iCAGF,6BACE,mBACA,eACA,mBAGF,yBACE,kBAGF,iCACE,kBACA,iBACA,4BACA,gBAGF,8BACE,kCACA,gBAGF,6BACE,2BACA,iBACA,gBACA,gBAGF,0BACE,yCAGF,yBACE,yCAEA,uCACE,iCAGF,sDACE,4BC/DN,UACE,kDACA,uBAEA,mBACE,YACA,kBACA,2DCLJ,eHYE,aACA,mBGVA,cACA,cACA,YACA,oBACA,sCAKE,8FAEE,iDAGF,wDACE,aAIJ,8BACE,kBACA,YACA,WAIA,6DACE,gBAIF,uHAEE,yBAGF,iEACE,qBACA,uBAGF,qDHhCF,aACA,mBGkCI,yBAIJ,6BHvCA,aACA,mBGyCE,YACA,gBACA,8CACA,kBACA,iBACA,sCAGF,6CHxDA,aACA,mBACA,uBGyDE,YACA,cACA,oBACA,gBACA,iCACA,qCACA,6CACA,iBACA,eAGF,wDACE,eAGF,0DACE,mCACA,iCACA,+BAGF,mCHhFA,aACA,mBACA,uBGiFE,YACA,aACA,sCACA,8CACA,kCACA,8BACA,eAGF,6CACE,iCACA,mBAGF,yBACE,wBAGF,sDACE,uBACA,oBAGF,4DACE,sCACA,wCAGF,uEACE,iCACA,mCACA,+BAGF,uBACE,aACA,iBACA,sCACA,cACA,oDAEA,2BACE,kCAKN,+BACE,WACA,iBACA,gCACA,gCACA,oBACA,eAEA,+CACE,oBACA,mBACA,cAGF,uDHxHA,aACA,8BG0HE,mDACA,cAGF,mEACE,eACA,iBACA,cACA,uCACA,mBACA,oBACA,gBACA,iCAMA,sCACE,WACA,YACA,qCAIJ,wCACE,mDAEA,uDACE,gCAGF,mEHnLF,aACA,mBACA,uBGoLI,kBACA,gCACA,cACA,oBACA,cACA,iBACA,iBAIJ,+BACE,uBACA,qCACA,iBAGE,8HAEE,gDC7MN,wBACE,uBACA,sBAGF,uBACE,uDACA,6CACA,+BACA,kCAGF,gCACE,aACA,uBACA,eAEA,uCACE,sCAIJ,sCACE,kBACA,mBAGF,0CACE,iBAGF,4CACE,kCAGF,6CACE,2BAGF,+CACE,8BAGF,+CACE,6BAGF,sCJ1BA,mBACA,uBACA,gBACA,sBACA,gBIyBE,iBACA,gBAEA,gDACE,cAIA,qBACA,YAIJ,uBACE,sCAGF,sBJ9DA,aACA,mBACA,uBI+DE,WACA,4CAGF,4BACE,6CC7EF,wBACE,YACA,WACA,qCAGF,mBACE,YACA,WACA,kBACA,MACA","file":"index.css"}
|
package/lib/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './components/ApplicationStoreProvider';
|
|
|
19
19
|
export * from './components/WebApplicationNavigatorProvider';
|
|
20
20
|
export * from './components/ApplicationStoreProviderTestUtils';
|
|
21
21
|
export * from './components/WebApplicationNavigatorProviderTestUtils';
|
|
22
|
+
export { AppHeader } from './components/AppHeader';
|
|
22
23
|
export { BlockingAlert } from './components/BlockingAlert';
|
|
23
24
|
export { ActionAlert } from './components/ActionAlert';
|
|
24
25
|
export { NotificationSnackbar } from './components/NotificationSnackbar';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,SAAS,CAAC;AAExB,cAAc,iCAAiC,CAAC;AAEhD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8CAA8C,CAAC;AAE7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;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,4BAA4B,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAElD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,cAAc,oCAAoC,CAAC;AAEnD,cAAc,0BAA0B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export * from './components/ApplicationStoreProvider';
|
|
|
19
19
|
export * from './components/WebApplicationNavigatorProvider';
|
|
20
20
|
export * from './components/ApplicationStoreProviderTestUtils';
|
|
21
21
|
export * from './components/WebApplicationNavigatorProviderTestUtils';
|
|
22
|
+
export { AppHeader } from './components/AppHeader';
|
|
22
23
|
export { BlockingAlert } from './components/BlockingAlert';
|
|
23
24
|
export { ActionAlert } from './components/ActionAlert';
|
|
24
25
|
export { NotificationSnackbar } from './components/NotificationSnackbar';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,SAAS,CAAC;AAExB,cAAc,iCAAiC,CAAC;AAEhD,cAAc,uCAAuC,CAAC;AACtD,cAAc,8CAA8C,CAAC;AAE7D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,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+80,7 @@ export declare class ApplicationStore<T extends LegendApplicationConfig> {
|
|
|
80
80
|
notifySuccess(message: string, actions?: NotificationAction[], autoHideDuration?: number | null): void;
|
|
81
81
|
notifyWarning(content: string | Error, actions?: NotificationAction[], autoHideDuration?: number | null): void;
|
|
82
82
|
notifyIllegalState(message: string, actions?: NotificationAction[], autoHideDuration?: number | null): void;
|
|
83
|
-
notifyError(content:
|
|
83
|
+
notifyError(content: Error | string, actions?: NotificationAction[]): void;
|
|
84
84
|
/**
|
|
85
85
|
* This function creates a more user-friendly way to throw error in the UI. Rather than crashing the whole app, we will
|
|
86
86
|
* just notify and replacing the value should get with an alternative (e.g. `undefined`). A good use-case for this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStore.d.ts","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStore.d.ts","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAUtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,qBAAqB;IAC/B,QAAQ,aAAa;IACrB,oBAAoB,yBAAyB;IAC7C,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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BAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BtD,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAGpD"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { LogEvent, assertErrorThrown, isString, ApplicationError, } from '@finos/legend-shared';
|
|
16
|
+
import { assertTrue, LogEvent, assertErrorThrown, isString, ApplicationError, } from '@finos/legend-shared';
|
|
17
17
|
import { makeAutoObservable, action } from 'mobx';
|
|
18
18
|
import { APPLICATION_LOG_EVENT } from './ApplicationLogEvent';
|
|
19
19
|
export var ActionAlertType;
|
|
@@ -104,23 +104,20 @@ export class ApplicationStore {
|
|
|
104
104
|
? undefined
|
|
105
105
|
: autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));
|
|
106
106
|
}
|
|
107
|
-
notifyError(content, actions
|
|
107
|
+
notifyError(content, actions) {
|
|
108
108
|
let message;
|
|
109
|
-
if (content instanceof
|
|
110
|
-
message = content.
|
|
109
|
+
if (content instanceof ApplicationError) {
|
|
110
|
+
message = content.getFullErrorMessage();
|
|
111
111
|
}
|
|
112
|
-
else if (
|
|
113
|
-
message = content;
|
|
112
|
+
else if (content instanceof Error) {
|
|
113
|
+
message = content.message;
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.notifyIllegalState('Unable to display error');
|
|
116
|
+
assertTrue(isString(content), `Can't display error`);
|
|
117
|
+
message = content;
|
|
119
118
|
}
|
|
120
119
|
if (message) {
|
|
121
|
-
this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [],
|
|
122
|
-
? undefined
|
|
123
|
-
: autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));
|
|
120
|
+
this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined));
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStore.js","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,sEAA6C,CAAA;IAC7C,4CAAmB,CAAA;AACrB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAuBD,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,CAAC,KAAK;AACzD,MAAM,CAAC,MAAM,oCAAoC,GAAG,KAAK,CAAC,CAAC,KAAK;AAEhE,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,qDAA6B,CAAA;IAC7B,uCAAe,CAAA;IACf,2CAAmB,CAAA;IACnB,2CAAmB,CAAA;IACnB,qCAAa,CAAA;AACf,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAOD,MAAM,OAAO,YAAY;IACvB,QAAQ,CAAuB;IAC/B,OAAO,CAAS;IAChB,OAAO,CAAuB;IAC9B,gBAAgB,CAAsB;IAEtC,YACE,QAA8B,EAC9B,OAAe,EACf,OAA6B,EAC7B,gBAAoC;QAEpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;Q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OAAO,IAAI,EAAE,EACb,gBAAgB,KAAK,IAAI;YACvB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gBAAgB,IAAI,8BAA8B,CACvD,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CACX,OAAe,EACf,OAA8B,EAC9B,gBAAgC;QAEhC,IAAI,CAAC,eAAe,CAClB,IAAI,YAAY,CACd,oBAAoB,CAAC,OAAO,EAC5B,OAAO,EACP,OAAO,IAAI,EAAE,EACb,gBAAgB,KAAK,IAAI;YACvB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gBAAgB,IAAI,8BAA8B,CACvD,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CACX,OAAuB,EACvB,OAA8B,EAC9B,gBAAgC;QAEhC,IAAI,CAAC,eAAe,CAClB,IAAI,YAAY,CACd,oBAAoB,CAAC,OAAO,EAC5B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EACpD,OAAO,IAAI,EAAE,EACb,gBAAgB,KAAK,IAAI;YACvB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gBAAgB,IAAI,8BAA8B,CACvD,CACF,CAAC;IACJ,CAAC;IAED,kBAAkB,CAChB,OAAe,EACf,OAA8B,EAC9B,gBAAgC;QAEhC,IAAI,CAAC,eAAe,CAClB,IAAI,YAAY,CACd,oBAAoB,CAAC,YAAY,EACjC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,6BAA6B,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,EACpE,OAAO,IAAI,EAAE,EACb,gBAAgB,KAAK,IAAI;YACvB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,gBAAgB,IAAI,8BAA8B,CACvD,CACF,CAAC;IACJ,CAAC;IAED,WAAW,
|
|
1
|
+
{"version":3,"file":"ApplicationStore.js","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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CAAC,CAAC,CAAC;YACH,OAAO;SACR;QACD,oFAAoF;QACpF,IAAI,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YACnD,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YAChC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;YAC5B,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YAC9C,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;YACrB,OAAO,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI;gBACF,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;aAC9B;YAAC,OAAO,KAAK,EAAE;gBACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBACzB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aACzB;oBAAS;gBACR,OAAO,CAAC,MAAM,EAAE,CAAC;aAClB;YACD,OAAO;SACR;QACD,IAAI,CAAC,WAAW,CAAC,kDAAkD,CAAC,CAAC;IACvE,CAAC;IAED,wBAAwB,CAAC,WAAmB;QAC1C,IAAI,CAAC,aAAa,CAAC,wBAAwB,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -17,6 +17,20 @@ import type { History } from 'history';
|
|
|
17
17
|
/**
|
|
18
18
|
* This is an initial attempt to try to generalize the application
|
|
19
19
|
* to other platforms. But regardless, this is more convenient for testing.
|
|
20
|
+
*
|
|
21
|
+
* FIXME: this is not the right way to do this. Our intention here is to make
|
|
22
|
+
* app navigator something generic enough so we are somewhat platform-agnostic
|
|
23
|
+
* i.e. browser, electron, PC, UNIX, etc.
|
|
24
|
+
*
|
|
25
|
+
* Parameterize on the type of the location might not be the best thing to do.
|
|
26
|
+
* Because typing wise, this forces us to also parameterize consumers of this,
|
|
27
|
+
* which is `ApplicationStore`. It means that we must dictate in the source
|
|
28
|
+
* code the platform the app depends on, clearly for web browser, `string` is the
|
|
29
|
+
* easy option, but if we do so, it defeats the purpose of this abstraction in the
|
|
30
|
+
* first place.
|
|
31
|
+
*
|
|
32
|
+
* As such, instead, we should design a more generic concept `Location` to pass around.
|
|
33
|
+
* We would need to flesh out the details, but this is the rough idea.
|
|
20
34
|
*/
|
|
21
35
|
interface ApplicationNavigator<T> {
|
|
22
36
|
reload(): void;
|
|
@@ -24,6 +38,8 @@ interface ApplicationNavigator<T> {
|
|
|
24
38
|
jumpTo(location: T): void;
|
|
25
39
|
openNewWindow(location: T): void;
|
|
26
40
|
getCurrentLocation(): T;
|
|
41
|
+
getCurrentLocationPath(): T;
|
|
42
|
+
generateLocation(locationPath: T): T;
|
|
27
43
|
}
|
|
28
44
|
export declare class WebApplicationNavigator implements ApplicationNavigator<string> {
|
|
29
45
|
private readonly historyAPI;
|
|
@@ -34,7 +50,8 @@ export declare class WebApplicationNavigator implements ApplicationNavigator<str
|
|
|
34
50
|
jumpTo(location: string): void;
|
|
35
51
|
openNewWindow(location: string): void;
|
|
36
52
|
getCurrentLocation(): string;
|
|
37
|
-
|
|
53
|
+
getCurrentLocationPath(): string;
|
|
54
|
+
generateLocation(locationPath: string): string;
|
|
38
55
|
}
|
|
39
56
|
export {};
|
|
40
57
|
//# sourceMappingURL=WebApplicationNavigator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigator.d.ts","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigator.d.ts","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC;;;;;;;;;;;;;;;;;GAiBG;AACH,UAAU,oBAAoB,CAAC,CAAC;IAC9B,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IACjC,kBAAkB,IAAI,CAAC,CAAC;IACxB,sBAAsB,IAAI,CAAC,CAAC;IAC5B,gBAAgB,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC;CACtC;AAED,qBAAa,uBAAwB,YAAW,oBAAoB,CAAC,MAAM,CAAC;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;IAErC,OAAO,KAAK,MAAM,GAKjB;gBAEW,gBAAgB,EAAE,OAAO;IAIrC,MAAM,IAAI,IAAI;IAId,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI5B,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI9B,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIrC,kBAAkB,IAAI,MAAM;IAI5B,sBAAsB,IAAI,MAAM;IAIhC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;CAM/C"}
|
|
@@ -37,9 +37,12 @@ export class WebApplicationNavigator {
|
|
|
37
37
|
getCurrentLocation() {
|
|
38
38
|
return this.window.location.href;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
getCurrentLocationPath() {
|
|
41
|
+
return this.historyAPI.location.pathname;
|
|
42
|
+
}
|
|
43
|
+
generateLocation(locationPath) {
|
|
41
44
|
return (window.location.origin +
|
|
42
|
-
this.historyAPI.createHref({ pathname:
|
|
45
|
+
this.historyAPI.createHref({ pathname: locationPath }));
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
//# sourceMappingURL=WebApplicationNavigator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigator.js","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigator.js","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AA8B5D,MAAM,OAAO,uBAAuB;IACjB,UAAU,CAAU;IAErC,IAAY,MAAM;QAChB,OAAO,oBAAoB,CACzB,MAAM,EACN,uDAAuD,CACxD,CAAC;IACJ,CAAC;IAED,YAAY,gBAAyB;QACnC,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC;IACrC,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,QAAgB;QACrB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvC,CAAC;IAED,aAAa,CAAC,QAAgB;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IACnC,CAAC;IAED,sBAAsB;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAED,gBAAgB,CAAC,YAAoB;QACnC,OAAO,CACL,MAAM,CAAC,QAAQ,CAAC,MAAM;YACtB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CACvD,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Legend application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"types": "lib/index.d.ts",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && yarn build:sass && yarn build:tsc",
|
|
28
|
-
"build:sass": "cross-env INIT_CWD=$INIT_CWD
|
|
28
|
+
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
|
|
29
29
|
"build:tsc": "tsc --project ./tsconfig.build.json",
|
|
30
30
|
"clean": "rimraf \"lib\" \"build\"",
|
|
31
31
|
"dev": "npm-run-all --parallel dev:sass dev:tsc",
|
|
32
|
-
"dev:sass": "sass
|
|
32
|
+
"dev:sass": "sass style lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
|
|
33
33
|
"dev:tsc": "tsc --watch --preserveWatchOutput",
|
|
34
34
|
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
|
|
35
35
|
"publish:prepare": "node ../../scripts/release/preparePublishContent.js",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"test:watch": "jest --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@finos/legend-art": "0.
|
|
42
|
-
"@finos/legend-graph": "0.
|
|
43
|
-
"@finos/legend-shared": "0.0.
|
|
41
|
+
"@finos/legend-art": "0.1.2",
|
|
42
|
+
"@finos/legend-graph": "0.2.4",
|
|
43
|
+
"@finos/legend-shared": "0.0.9",
|
|
44
44
|
"@material-ui/core": "4.12.3",
|
|
45
45
|
"@testing-library/react": "12.1.2",
|
|
46
|
-
"@types/css-font-loading-module": "0.0.
|
|
47
|
-
"@types/react": "17.0.
|
|
48
|
-
"@types/react-dom": "17.0.
|
|
49
|
-
"@types/react-router-dom": "5.3.
|
|
50
|
-
"history": "5.0
|
|
51
|
-
"mobx": "6.3.
|
|
52
|
-
"mobx-react-lite": "3.2.
|
|
53
|
-
"monaco-editor": "0.
|
|
46
|
+
"@types/css-font-loading-module": "0.0.7",
|
|
47
|
+
"@types/react": "17.0.36",
|
|
48
|
+
"@types/react-dom": "17.0.11",
|
|
49
|
+
"@types/react-router-dom": "5.3.2",
|
|
50
|
+
"history": "5.1.0",
|
|
51
|
+
"mobx": "6.3.7",
|
|
52
|
+
"mobx-react-lite": "3.2.2",
|
|
53
|
+
"monaco-editor": "0.30.1",
|
|
54
54
|
"react": "17.0.2",
|
|
55
55
|
"react-dom": "17.0.2",
|
|
56
56
|
"react-icons": "4.3.1",
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"serializr": "2.0.5"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@finos/legend-dev-utils": "0.
|
|
64
|
-
"@testing-library/dom": "8.
|
|
63
|
+
"@finos/legend-dev-utils": "0.2.1",
|
|
64
|
+
"@testing-library/dom": "8.11.1",
|
|
65
65
|
"cross-env": "7.0.3",
|
|
66
|
-
"eslint": "8.
|
|
67
|
-
"jest": "27.
|
|
66
|
+
"eslint": "8.3.0",
|
|
67
|
+
"jest": "27.3.1",
|
|
68
68
|
"npm-run-all": "4.1.5",
|
|
69
69
|
"rimraf": "3.0.2",
|
|
70
|
-
"sass": "1.
|
|
71
|
-
"typescript": "4.
|
|
70
|
+
"sass": "1.43.4",
|
|
71
|
+
"typescript": "4.5.2"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"react": "^17.0.0"
|
|
@@ -45,10 +45,7 @@ const ActionAlertInner = observer((props: { info: ActionAlertInfo }) => {
|
|
|
45
45
|
};
|
|
46
46
|
const handleEnter = (): void => onEnter?.();
|
|
47
47
|
const handleSubmit = (): void => {
|
|
48
|
-
|
|
49
|
-
if (proceedActions.length) {
|
|
50
|
-
proceedActions[0].handler?.();
|
|
51
|
-
}
|
|
48
|
+
actions.find((action) => action.default)?.handler?.();
|
|
52
49
|
handleClose();
|
|
53
50
|
};
|
|
54
51
|
const onSubmit = (event: React.FormEvent<HTMLFormElement>): void => {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Link } from 'react-router-dom';
|
|
18
|
+
import { LegendLogo } from '@finos/legend-art';
|
|
19
|
+
import { useApplicationStore } from './ApplicationStoreProvider';
|
|
20
|
+
|
|
21
|
+
export const AppHeader: React.FC<{
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}> = (props) => {
|
|
24
|
+
const { children } = props;
|
|
25
|
+
const applicationStore = useApplicationStore();
|
|
26
|
+
const config = applicationStore.config;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="app__header">
|
|
30
|
+
<div className="app__header__content">
|
|
31
|
+
<div className="app__header__title">
|
|
32
|
+
<Link to="/">
|
|
33
|
+
<LegendLogo className="app__header__logo" />
|
|
34
|
+
</Link>
|
|
35
|
+
<div className="app__header__tag app__header__app-name">
|
|
36
|
+
{config.appName.toUpperCase()}
|
|
37
|
+
</div>
|
|
38
|
+
<div className="app__header__tag app__header__tag__name">env</div>
|
|
39
|
+
<div className="app__header__tag app__header__tag__value app__header__env">
|
|
40
|
+
{config.env ? config.env.toUpperCase() : 'UNKNOWN'}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="app__header__actions">{children}</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -25,6 +25,8 @@ import {
|
|
|
25
25
|
disposeEditor,
|
|
26
26
|
disableEditorHotKeys,
|
|
27
27
|
baseTextEditorSettings,
|
|
28
|
+
getEditorValue,
|
|
29
|
+
normalizeLineEnding,
|
|
28
30
|
} from '@finos/legend-art';
|
|
29
31
|
import {
|
|
30
32
|
FaLongArrowAltDown,
|
|
@@ -118,7 +120,7 @@ const LambdaEditorInline = observer(
|
|
|
118
120
|
IDisposable | undefined
|
|
119
121
|
>(undefined);
|
|
120
122
|
const onKeyDownEventDisposer = useRef<IDisposable | undefined>(undefined);
|
|
121
|
-
const value = lambdaEditorState.lambdaString;
|
|
123
|
+
const value = normalizeLineEnding(lambdaEditorState.lambdaString);
|
|
122
124
|
const parserError = lambdaEditorState.parserError;
|
|
123
125
|
const compilationError = lambdaEditorState.compilationError;
|
|
124
126
|
const selectTypeLabel = (): void => onExpectedTypeLabelSelect?.();
|
|
@@ -203,7 +205,7 @@ const LambdaEditorInline = observer(
|
|
|
203
205
|
},
|
|
204
206
|
);
|
|
205
207
|
// set the value here so we don't lose the error when toggling between expand/collape modes
|
|
206
|
-
const currentValue = editor
|
|
208
|
+
const currentValue = getEditorValue(editor);
|
|
207
209
|
editor.setValue(currentValue);
|
|
208
210
|
}
|
|
209
211
|
}
|
|
@@ -238,14 +240,14 @@ const LambdaEditorInline = observer(
|
|
|
238
240
|
onDidChangeModelContentEventDisposer.current?.dispose();
|
|
239
241
|
onDidChangeModelContentEventDisposer.current =
|
|
240
242
|
editor.onDidChangeModelContent(() => {
|
|
241
|
-
const currentVal = editor
|
|
243
|
+
const currentVal = getEditorValue(editor);
|
|
242
244
|
/**
|
|
243
245
|
* Avoid unecessary setting of lambda string. Also, this prevents clearing the non-parser error on first render.
|
|
244
246
|
* Since this method is guaranteed to be called one time during the first rendering when we first set the
|
|
245
247
|
* value for the lambda editor, we do not want to clear any existing non-parser error in case it is set by methods
|
|
246
248
|
* like reveal error in each editor
|
|
247
249
|
*/
|
|
248
|
-
if (currentVal !==
|
|
250
|
+
if (currentVal !== value) {
|
|
249
251
|
lambdaEditorState.setLambdaString(currentVal);
|
|
250
252
|
/**
|
|
251
253
|
* Here we clear the error as user changes the input
|
|
@@ -300,7 +302,7 @@ const LambdaEditorInline = observer(
|
|
|
300
302
|
});
|
|
301
303
|
|
|
302
304
|
// Set the text value
|
|
303
|
-
const currentValue = editor
|
|
305
|
+
const currentValue = getEditorValue(editor);
|
|
304
306
|
const editorModel = editor.getModel();
|
|
305
307
|
const currentConfig = editor.getRawOptions();
|
|
306
308
|
if (currentValue !== value) {
|
|
@@ -443,10 +445,9 @@ const LambdaEditorPopUp = observer(
|
|
|
443
445
|
const onDidChangeModelContentEventDisposer = useRef<
|
|
444
446
|
IDisposable | undefined
|
|
445
447
|
>(undefined);
|
|
446
|
-
const value = lambdaEditorState.lambdaString;
|
|
448
|
+
const value = normalizeLineEnding(lambdaEditorState.lambdaString);
|
|
447
449
|
const parserError = lambdaEditorState.parserError;
|
|
448
450
|
const compilationError = lambdaEditorState.compilationError;
|
|
449
|
-
// const selectTypeLabel = (): void => onExpectedTypeLabelSelect?.();
|
|
450
451
|
const [editor, setEditor] = useState<
|
|
451
452
|
monacoEditorAPI.IStandaloneCodeEditor | undefined
|
|
452
453
|
>();
|
|
@@ -497,14 +498,14 @@ const LambdaEditorPopUp = observer(
|
|
|
497
498
|
onDidChangeModelContentEventDisposer.current?.dispose();
|
|
498
499
|
onDidChangeModelContentEventDisposer.current =
|
|
499
500
|
editor.onDidChangeModelContent(() => {
|
|
500
|
-
const currentVal = editor
|
|
501
|
+
const currentVal = getEditorValue(editor);
|
|
501
502
|
/**
|
|
502
503
|
* Avoid unecessary setting of lambda string. Also, this prevents clearing the non-parser error on first render.
|
|
503
504
|
* Since this method is guaranteed to be called one time during the first rendering when we first set the
|
|
504
505
|
* value for the lambda editor, we do not want to clear any existing non-parser error in case it is set by methods
|
|
505
506
|
* like reveal error in each editor
|
|
506
507
|
*/
|
|
507
|
-
if (currentVal !==
|
|
508
|
+
if (currentVal !== value) {
|
|
508
509
|
lambdaEditorState.setLambdaString(currentVal);
|
|
509
510
|
/**
|
|
510
511
|
* Here we clear the error as user changes the input
|
|
@@ -559,7 +560,7 @@ const LambdaEditorPopUp = observer(
|
|
|
559
560
|
});
|
|
560
561
|
|
|
561
562
|
// Set the text value
|
|
562
|
-
const currentValue = editor
|
|
563
|
+
const currentValue = getEditorValue(editor);
|
|
563
564
|
const editorModel = editor.getModel();
|
|
564
565
|
const currentConfig = editor.getRawOptions();
|
|
565
566
|
if (currentValue !== value) {
|