@finos/legend-extension-dsl-text 6.0.187 → 6.0.188
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { prettyCONSTName } from '@finos/legend-shared';
|
20
20
|
import { useEditorStore } from '@finos/legend-application-studio';
|
21
21
|
import { TextEditorState } from '../../stores/studio/TextEditorState.js';
|
22
|
-
import { OpenPreviewIcon, LockIcon, CaretDownIcon,
|
22
|
+
import { OpenPreviewIcon, LockIcon, CaretDownIcon, ControlledDropdownMenu, MenuContent, MenuContentItem, MarkdownTextViewer, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, } from '@finos/legend-art';
|
23
23
|
import { useApplicationNavigationContext } from '@finos/legend-application';
|
24
24
|
import { text_setContent, text_setType, } from '../../stores/studio/DSL_Text_GraphModifierHelper.js';
|
25
25
|
import { TEXT_TYPE } from '../../graph/helpers/DSL_Text_Helper.js';
|
@@ -53,7 +53,7 @@ export const TextElementEditor = observer(() => {
|
|
53
53
|
}
|
54
54
|
}, [isReadOnly]);
|
55
55
|
useApplicationNavigationContext(DSL_TEXT_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.TEXT_EDITOR);
|
56
|
-
return (_jsxs("div", { className: "panel text-element-editor", children: [_jsx("div", { className: "panel__header text-element-editor__header", children: _jsxs("div", { className: "text-element-editor__header__configs", children: [isReadOnly && (_jsx("div", { className: "text-element-editor__header__lock", children: _jsx(LockIcon, {}) })), _jsxs(
|
56
|
+
return (_jsxs("div", { className: "panel text-element-editor", children: [_jsx("div", { className: "panel__header text-element-editor__header", children: _jsxs("div", { className: "text-element-editor__header__configs", children: [isReadOnly && (_jsx("div", { className: "text-element-editor__header__lock", children: _jsx(LockIcon, {}) })), _jsxs(ControlledDropdownMenu, { className: "text-element-editor__header__configs__type", disabled: isReadOnly, content: _jsx(MenuContent, { children: Object.values(TEXT_TYPE).map((mode) => (_jsx(MenuContentItem, { className: "text-element-editor__header__configs__option", onClick: changeType(mode), children: prettyCONSTName(mode) }, mode))) }), menuProps: {
|
57
57
|
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
58
58
|
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
59
59
|
}, children: [_jsx("div", { className: "text-element-editor__header__configs__type__label", children: prettyCONSTName(textElement.type) }), _jsx("div", { className: "text-element-editor__header__configs__type__icon", children: _jsx(CaretDownIcon, {}) })] }), isPreviewSupported ? (_jsx("button", { title: showPreview ? `Hide Preview` : `Show Preview`, className: `text-element-editor__preview-btn ${showPreview ? `text-element-editor__preview-btn__active` : ''}`, onClick: () => changePreview(!showPreview), children: _jsx(OpenPreviewIcon, {}) })) : null] }) }), _jsx("div", { className: "panel__content", children: isPreviewSupported ? (_jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { minSize: 300, children: _jsx("div", { className: "text-element-editor__editor", children: _jsx(CodeEditor, { language: getTextElementEditorLanguage(textElement.type), inputValue: textElement.content, updateInput: changeContent, hidePadding: true }) }) }), showPreview && _jsx(ResizablePanelSplitter, {}), showPreview && (_jsx(ResizablePanel, { minSize: 300, children: _jsx("div", { className: "text-element-editor__preview", children: _jsx(MarkdownTextViewer, { value: { value: textElement.content }, className: "text-element-editor__preview__markdown" }) }) }))] })) : (_jsx("div", { className: "text-element-editor__editor", children: _jsx(CodeEditor, { language: getTextElementEditorLanguage(textElement.type), inputValue: textElement.content, updateInput: changeContent, hidePadding: true }) })) })] }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TextElementEditor.js","sourceRoot":"","sources":["../../../src/components/studio/TextElementEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EACL,eAAe,EACf,QAAQ,EACR,aAAa,EACb,
|
1
|
+
{"version":3,"file":"TextElementEditor.js","sourceRoot":"","sources":["../../../src/components/studio/TextElementEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EACL,eAAe,EACf,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,YAAY,GACb,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,yDAAyD,EAAE,MAAM,2EAA2E,CAAC;AACtJ,OAAO,EACL,oBAAoB,EACpB,UAAU,GACX,MAAM,gCAAgC,CAAC;AAExC,MAAM,4BAA4B,GAAG,CACnC,IAAwB,EACF,EAAE;IACxB,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS,CAAC,QAAQ;YACrB,OAAO,oBAAoB,CAAC,QAAQ,CAAC;QACvC,KAAK,SAAS,CAAC,UAAU,CAAC;QAC1B;YACE,OAAO,oBAAoB,CAAC,IAAI,CAAC;IACrC,CAAC;AACH,CAA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AAU,IACT,QAAQ,EAAE,4BAA4B,CAAC,WAAW,CAAC,IAAI,CAAC,EACxD,UAAU,EAAE,WAAW,CAAC,OAAO,EAC/B,WAAW,EAAE,aAAa,EAC1B,WAAW,EAAE,IAAI,GACjB,GACE,GACS,EAChB,WAAW,IAAI,KAAC,sBAAsB,KAAG,EACzC,WAAW,IAAI,CACd,KAAC,cAAc,IAAC,OAAO,EAAE,GAAG,YAC1B,cAAK,SAAS,EAAC,8BAA8B,YAC3C,KAAC,kBAAkB,IACjB,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,EAAE,EACrC,SAAS,EAAC,wCAAwC,GAClD,GACE,GACS,CAClB,IACmB,CACvB,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,6BAA6B,YAC1C,KAAC,UAAU,IACT,QAAQ,EAAE,4BAA4B,CAAC,WAAW,CAAC,IAAI,CAAC,EACxD,UAAU,EAAE,WAAW,CAAC,OAAO,EAC/B,WAAW,EAAE,aAAa,EAC1B,WAAW,EAAE,IAAI,GACjB,GACE,CACP,GACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-text",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.188",
|
4
4
|
"description": "Legend extension for Text DSL",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"@finos/legend-shared": "workspace:*",
|
53
53
|
"@finos/legend-storage": "workspace:*",
|
54
54
|
"@types/react": "18.3.3",
|
55
|
-
"mobx": "6.12.
|
55
|
+
"mobx": "6.12.5",
|
56
56
|
"mobx-react-lite": "4.0.7",
|
57
57
|
"react": "18.3.1",
|
58
58
|
"serializr": "3.0.2"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-text",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.188",
|
4
4
|
"description": "Legend extension for Text DSL",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -44,21 +44,21 @@
|
|
44
44
|
"test:watch": "jest --watch"
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
|
-
"@finos/legend-application": "15.1.
|
48
|
-
"@finos/legend-application-studio": "28.17.
|
49
|
-
"@finos/legend-art": "7.1.
|
50
|
-
"@finos/legend-graph": "31.10.
|
51
|
-
"@finos/legend-lego": "1.2.
|
52
|
-
"@finos/legend-shared": "10.0.
|
53
|
-
"@finos/legend-storage": "3.0.
|
47
|
+
"@finos/legend-application": "15.1.13",
|
48
|
+
"@finos/legend-application-studio": "28.17.17",
|
49
|
+
"@finos/legend-art": "7.1.41",
|
50
|
+
"@finos/legend-graph": "31.10.8",
|
51
|
+
"@finos/legend-lego": "1.2.44",
|
52
|
+
"@finos/legend-shared": "10.0.43",
|
53
|
+
"@finos/legend-storage": "3.0.93",
|
54
54
|
"@types/react": "18.3.3",
|
55
|
-
"mobx": "6.12.
|
55
|
+
"mobx": "6.12.5",
|
56
56
|
"mobx-react-lite": "4.0.7",
|
57
57
|
"react": "18.3.1",
|
58
58
|
"serializr": "3.0.2"
|
59
59
|
},
|
60
60
|
"devDependencies": {
|
61
|
-
"@finos/legend-dev-utils": "2.1.
|
61
|
+
"@finos/legend-dev-utils": "2.1.11",
|
62
62
|
"@jest/globals": "29.7.0",
|
63
63
|
"cross-env": "7.0.3",
|
64
64
|
"eslint": "8.57.0",
|
@@ -23,7 +23,7 @@ import {
|
|
23
23
|
OpenPreviewIcon,
|
24
24
|
LockIcon,
|
25
25
|
CaretDownIcon,
|
26
|
-
|
26
|
+
ControlledDropdownMenu,
|
27
27
|
MenuContent,
|
28
28
|
MenuContentItem,
|
29
29
|
MarkdownTextViewer,
|
@@ -93,7 +93,7 @@ export const TextElementEditor = observer(() => {
|
|
93
93
|
<LockIcon />
|
94
94
|
</div>
|
95
95
|
)}
|
96
|
-
<
|
96
|
+
<ControlledDropdownMenu
|
97
97
|
className="text-element-editor__header__configs__type"
|
98
98
|
disabled={isReadOnly}
|
99
99
|
content={
|
@@ -121,7 +121,7 @@ export const TextElementEditor = observer(() => {
|
|
121
121
|
<div className="text-element-editor__header__configs__type__icon">
|
122
122
|
<CaretDownIcon />
|
123
123
|
</div>
|
124
|
-
</
|
124
|
+
</ControlledDropdownMenu>
|
125
125
|
{isPreviewSupported ? (
|
126
126
|
<button
|
127
127
|
title={showPreview ? `Hide Preview` : `Show Preview`}
|