@finos/legend-extension-dsl-text 3.0.3 → 3.0.4
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/studio/DSLText_CodeSnippets.d.ts +1 -1
- package/lib/components/studio/DSLText_CodeSnippets.d.ts.map +1 -1
- package/lib/components/studio/DSLText_CodeSnippets.js +0 -1
- package/lib/components/studio/DSLText_CodeSnippets.js.map +1 -1
- package/lib/components/studio/DSLText_LegendStudioDocumentation.d.ts +0 -2
- package/lib/components/studio/DSLText_LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/components/studio/DSLText_LegendStudioDocumentation.js +0 -14
- package/lib/components/studio/DSLText_LegendStudioDocumentation.js.map +1 -1
- package/lib/components/studio/DSLText_LegendStudioPlugin.d.ts +1 -2
- package/lib/components/studio/DSLText_LegendStudioPlugin.d.ts.map +1 -1
- package/lib/components/studio/DSLText_LegendStudioPlugin.js +6 -4
- package/lib/components/studio/DSLText_LegendStudioPlugin.js.map +1 -1
- package/lib/components/studio/TextElementEditor.d.ts.map +1 -1
- package/lib/components/studio/TextElementEditor.js +1 -1
- package/lib/components/studio/TextElementEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/text/DSLText_Text.d.ts +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/text/DSLText_Text.d.ts.map +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/text/DSLText_Text.js +1 -1
- package/lib/models/metamodels/pure/model/packageableElements/text/DSLText_Text.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.js.map +1 -1
- package/lib/package.json +3 -3
- package/package.json +10 -10
- package/src/components/studio/DSLText_CodeSnippets.ts +0 -1
- package/src/components/studio/DSLText_LegendStudioDocumentation.ts +0 -20
- package/src/components/studio/DSLText_LegendStudioPlugin.tsx +7 -13
- package/src/components/studio/TextElementEditor.tsx +3 -2
- package/src/models/metamodels/pure/model/packageableElements/text/DSLText_Text.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.ts +2 -2
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PLAIN_TEXT_SNIPPET = "Text ${1:model::NewText}\n{\n
|
|
16
|
+
export declare const PLAIN_TEXT_SNIPPET = "Text ${1:model::NewText}\n{\n content: '${2:}';\n}";
|
|
17
17
|
export declare const MARKDOWN_TEXT_SNIPPET = "Text ${1:model::NewText}\n{\n type: markdown;\n content: '${2:}';\n}";
|
|
18
18
|
//# sourceMappingURL=DSLText_CodeSnippets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_CodeSnippets.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"DSLText_CodeSnippets.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,kBAAkB,wDAG7B,CAAC;AAEH,eAAO,MAAM,qBAAqB,2EAIhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_CodeSnippets.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG
|
|
1
|
+
{"version":3,"file":"DSLText_CodeSnippets.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;EAGhC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;EAInC,CAAC"}
|
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { LegendApplicationDocumentationEntryConfig } from '@finos/legend-application';
|
|
17
16
|
export declare enum DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY {
|
|
18
17
|
GRAMMAR_PARSER = "dsl-text.grammar.parser",
|
|
19
18
|
GRAMMAR_ELEMENT_TEXT = "dsl-text.grammar.element.text"
|
|
20
19
|
}
|
|
21
|
-
export declare const DSL_TEXT_DOCUMENTATION_ENTRIES: Record<string, LegendApplicationDocumentationEntryConfig>;
|
|
22
20
|
//# sourceMappingURL=DSLText_LegendStudioDocumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_LegendStudioDocumentation.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,
|
|
1
|
+
{"version":3,"file":"DSLText_LegendStudioDocumentation.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,wCAAwC;IAClD,cAAc,4BAA4B;IAC1C,oBAAoB,kCAAkC;CACvD"}
|
|
@@ -18,18 +18,4 @@ export var DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY;
|
|
|
18
18
|
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY["GRAMMAR_PARSER"] = "dsl-text.grammar.parser";
|
|
19
19
|
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY["GRAMMAR_ELEMENT_TEXT"] = "dsl-text.grammar.element.text";
|
|
20
20
|
})(DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY = DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY || (DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY = {}));
|
|
21
|
-
export const DSL_TEXT_DOCUMENTATION_ENTRIES = {
|
|
22
|
-
[DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
|
|
23
|
-
title: 'What is Text DSL about?',
|
|
24
|
-
markdownText: {
|
|
25
|
-
value: `\`Text DSL\` (corresponding to header \`###DataSpace\` section in \`Pure\`) concerns with storing data in plain-text`,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
[DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_TEXT]: {
|
|
29
|
-
title: 'What is a text element?',
|
|
30
|
-
markdownText: {
|
|
31
|
-
value: `A \`Text\` element stores plain-text content with a specified content-type, which can be used for formatting, syntax-highlighting`,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
21
|
//# sourceMappingURL=DSLText_LegendStudioDocumentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_LegendStudioDocumentation.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DSLText_LegendStudioDocumentation.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,wCAGX;AAHD,WAAY,wCAAwC;IAClD,sFAA0C,CAAA;IAC1C,kGAAsD,CAAA;AACxD,CAAC,EAHW,wCAAwC,GAAxC,wCAAwC,KAAxC,wCAAwC,QAGnD"}
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { LegendStudioPlugin, type NewElementFromStateCreator, type ElementEditorStateCreator, type ElementTypeGetter, type ElementProjectExplorerDnDTypeGetter, type ElementIconGetter, type ElementEditorRenderer, type DSL_LegendStudioPlugin_Extension, type PureGrammarParserDocumentationGetter, type PureGrammarParserKeywordSuggestionGetter, type PureGrammarParserElementSnippetSuggestionsGetter, type PureGrammarParserElementDocumentationGetter } from '@finos/legend-studio';
|
|
17
|
-
import { type LegendApplicationKeyedDocumentationEntry } from '@finos/legend-application';
|
|
18
17
|
export declare class DSLText_LegendStudioPlugin extends LegendStudioPlugin implements DSL_LegendStudioPlugin_Extension {
|
|
19
18
|
constructor();
|
|
20
|
-
|
|
19
|
+
getExtraRequiredDocumentationKeys(): string[];
|
|
21
20
|
getExtraSupportedElementTypes(): string[];
|
|
22
21
|
getExtraElementTypeGetters(): ElementTypeGetter[];
|
|
23
22
|
getExtraElementIconGetters(): ElementIconGetter[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_LegendStudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,kBAAkB,EAClB,KAAK,0BAA0B,EAG/B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EAErC,KAAK,oCAAoC,EACzC,KAAK,wCAAwC,EAE7C,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EACjD,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"DSLText_LegendStudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,kBAAkB,EAClB,KAAK,0BAA0B,EAG/B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EAErC,KAAK,oCAAoC,EACzC,KAAK,wCAAwC,EAE7C,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EACjD,MAAM,sBAAsB,CAAC;AAqB9B,qBAAa,0BACX,SAAQ,kBACR,YAAW,gCAAgC;;IAMlC,iCAAiC,IAAI,MAAM,EAAE;IAOtD,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,8BAA8B,IAAI,qBAAqB,EAAE;IAWzD,mCAAmC,IAAI,0BAA0B,EAAE;IAenE,kCAAkC,IAAI,yBAAyB,EAAE;IAcjE,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,qCAAqC,IAAI,MAAM,EAAE;IAIjD,oDAAoD,IAAI,2CAA2C,EAAE;IAmBrG,6CAA6C,IAAI,oCAAoC,EAAE;IAgBvF,iDAAiD,IAAI,wCAAwC,EAAE;IAgB/F,yDAAyD,IAAI,gDAAgD,EAAE;CAsBhH"}
|
|
@@ -20,8 +20,7 @@ import { FileIcon } from '@finos/legend-art';
|
|
|
20
20
|
import { TextEditorState } from '../../stores/studio/TextEditorState.js';
|
|
21
21
|
import { TextElementEditor } from './TextElementEditor.js';
|
|
22
22
|
import { Text } from '../../models/metamodels/pure/model/packageableElements/text/DSLText_Text.js';
|
|
23
|
-
import {
|
|
24
|
-
import { DSL_TEXT_DOCUMENTATION_ENTRIES, DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY, } from './DSLText_LegendStudioDocumentation.js';
|
|
23
|
+
import { DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY } from './DSLText_LegendStudioDocumentation.js';
|
|
25
24
|
import { PURE_GRAMMAR_TEXT_ELEMENT_TYPE_LABEL, PURE_GRAMMAR_TEXT_PARSER_NAME, } from '../../graphManager/DSLText_PureGraphManagerPlugin.js';
|
|
26
25
|
import { MARKDOWN_TEXT_SNIPPET, PLAIN_TEXT_SNIPPET, } from './DSLText_CodeSnippets.js';
|
|
27
26
|
import { create_TextElement } from '../../helper/DSLText_Helper.js';
|
|
@@ -31,8 +30,11 @@ export class DSLText_LegendStudioPlugin extends LegendStudioPlugin {
|
|
|
31
30
|
constructor() {
|
|
32
31
|
super(packageJson.extensions.studioPlugin, packageJson.version);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
return
|
|
33
|
+
getExtraRequiredDocumentationKeys() {
|
|
34
|
+
return [
|
|
35
|
+
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_TEXT,
|
|
36
|
+
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
|
37
|
+
];
|
|
36
38
|
}
|
|
37
39
|
getExtraSupportedElementTypes() {
|
|
38
40
|
return [TEXT_ELEMENT_TYPE];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_LegendStudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,kBAAkB,GAgBnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,6EAA6E,CAAC;AACnG,OAAO,
|
|
1
|
+
{"version":3,"file":"DSLText_LegendStudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLText_LegendStudioPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,kBAAkB,GAgBnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,6EAA6E,CAAC;AACnG,OAAO,EAAE,wCAAwC,EAAE,MAAM,wCAAwC,CAAC;AAClG,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,sCAAsC,GAAG,uBAAuB,CAAC;AAEvE,MAAM,OAAO,0BACX,SAAQ,kBAAkB;IAG1B;QACE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAEQ,iCAAiC;QACxC,OAAO;YACL,wCAAwC,CAAC,oBAAoB;YAC7D,wCAAwC,CAAC,cAAc;SACxD,CAAC;IACJ,CAAC;IAED,6BAA6B;QAC3B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC7B,CAAC;IAED,0BAA0B;QACxB,OAAO;YACL,CAAC,OAA2B,EAAsB,EAAE;gBAClD,IAAI,OAAO,YAAY,IAAI,EAAE;oBAC3B,OAAO,iBAAiB,CAAC;iBAC1B;gBAC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AC,CAAC,SAAS;SAChB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElementEditor.d.ts","sourceRoot":"","sources":["../../../src/components/studio/TextElementEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"TextElementEditor.d.ts","sourceRoot":"","sources":["../../../src/components/studio/TextElementEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAiCH,eAAO,MAAM,iBAAiB;;CAsE5B,CAAC"}
|
|
@@ -47,7 +47,7 @@ export const TextElementEditor = observer(() => {
|
|
|
47
47
|
typeNameRef.current?.focus();
|
|
48
48
|
}
|
|
49
49
|
}, [isReadOnly]);
|
|
50
|
-
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, {}) })), _jsx(DropdownMenu, { disabled: isReadOnly,
|
|
50
|
+
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, {}) })), _jsx(DropdownMenu, { 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: {
|
|
51
51
|
anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
|
|
52
52
|
transformOrigin: { vertical: 'top', horizontal: 'right' },
|
|
53
53
|
}, children: _jsxs("div", { className: "text-element-editor__header__configs__type", 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, {}) })] }) })] }) }), _jsx("div", { className: "panel__content text-element-editor__editor", children: _jsx(StudioTextInputEditor, { language: getTextElementEditorLanguage(textElement.type), inputValue: textElement.content, updateInput: changeContent }) })] }));
|
|
@@ -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,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EACL,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,WAAW,EACX,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,YAAY,GACb,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,MAAM,4BAA4B,GAAG,
|
|
1
|
+
{"version":3,"file":"TextElementEditor.js","sourceRoot":"","sources":["../../../src/components/studio/TextElementEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA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|
|
17
17
|
import { type PackageableElementVisitor, PackageableElement } from '@finos/legend-graph';
|
|
18
18
|
export declare class Text extends PackageableElement implements Hashable {
|
|
19
|
-
type
|
|
19
|
+
type?: string | undefined;
|
|
20
20
|
content: string;
|
|
21
21
|
protected get _elementHashCode(): string;
|
|
22
22
|
accept_PackageableElementVisitor<T>(visitor: PackageableElementVisitor<T>): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_Text.d.ts","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/model/packageableElements/text/DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,IAAK,SAAQ,kBAAmB,YAAW,QAAQ;IAC9D,IAAI,
|
|
1
|
+
{"version":3,"file":"DSLText_Text.d.ts","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/model/packageableElements/text/DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,IAAK,SAAQ,kBAAmB,YAAW,QAAQ;IAC9D,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAG,MAAM,CAAC;IAEjB,cAAuB,gBAAgB,IAAI,MAAM,CAOhD;IAED,gCAAgC,CAAC,CAAC,EAChC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,CAAC;CAGL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSLText_Text.js","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/model/packageableElements/text/DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAEL,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,IAAK,SAAQ,kBAAkB;IAC1C,IAAI,
|
|
1
|
+
{"version":3,"file":"DSLText_Text.js","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/model/packageableElements/text/DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAEL,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,IAAK,SAAQ,kBAAkB;IAC1C,IAAI,CAAsB;IAC1B,OAAO,CAAU;IAEjB,IAAuB,gBAAgB;QACrC,OAAO,SAAS,CAAC;YACf,mBAAmB,CAAC,IAAI;YACxB,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,IAAI,IAAI,EAAE;YACf,IAAI,CAAC,OAAO;SACb,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC,CAC9B,OAAqC;QAErC,OAAO,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { type Hashable } from '@finos/legend-shared';
|
|
17
17
|
import { type V1_PackageableElementVisitor, V1_PackageableElement } from '@finos/legend-graph';
|
|
18
18
|
export declare class V1_Text extends V1_PackageableElement implements Hashable {
|
|
19
|
-
type
|
|
19
|
+
type?: string | undefined;
|
|
20
20
|
content: string;
|
|
21
21
|
get hashCode(): string;
|
|
22
22
|
accept_PackageableElementVisitor<T>(visitor: V1_PackageableElementVisitor<T>): T;
|
package/lib/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_DSLText_Text.d.ts","sourceRoot":"","sources":["../../../../../../../../src/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,KAAK,4BAA4B,EACjC,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,OAAQ,SAAQ,qBAAsB,YAAW,QAAQ;IACpE,IAAI,
|
|
1
|
+
{"version":3,"file":"V1_DSLText_Text.d.ts","sourceRoot":"","sources":["../../../../../../../../src/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EACL,KAAK,4BAA4B,EACjC,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,OAAQ,SAAQ,qBAAsB,YAAW,QAAQ;IACpE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,EAAG,MAAM,CAAC;IAEjB,IAAa,QAAQ,IAAI,MAAM,CAO9B;IAED,gCAAgC,CAAC,CAAC,EAChC,OAAO,EAAE,4BAA4B,CAAC,CAAC,CAAC,GACvC,CAAC;CAGL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1_DSLText_Text.js","sourceRoot":"","sources":["../../../../../../../../src/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,OAAQ,SAAQ,qBAAqB;IAChD,IAAI,
|
|
1
|
+
{"version":3,"file":"V1_DSLText_Text.js","sourceRoot":"","sources":["../../../../../../../../src/models/protocols/pure/v1/model/packageableElements/text/V1_DSLText_Text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,OAAQ,SAAQ,qBAAqB;IAChD,IAAI,CAAsB;IAC1B,OAAO,CAAU;IAEjB,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,mBAAmB,CAAC,IAAI;YACxB,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,IAAI,IAAI,EAAE;YACf,IAAI,CAAC,OAAO;SACb,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC,CAC9B,OAAwC;QAExC,OAAO,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-text",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Legend extension for Text DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@finos/legend-shared": "workspace:*",
|
|
51
51
|
"@finos/legend-studio": "workspace:*",
|
|
52
52
|
"@types/react": "18.0.14",
|
|
53
|
-
"mobx": "6.6.
|
|
53
|
+
"mobx": "6.6.1",
|
|
54
54
|
"mobx-react-lite": "3.4.0",
|
|
55
55
|
"react": "18.2.0",
|
|
56
56
|
"serializr": "2.0.5"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"jest": "28.1.1",
|
|
64
64
|
"npm-run-all": "4.1.5",
|
|
65
65
|
"rimraf": "3.0.2",
|
|
66
|
-
"sass": "1.
|
|
66
|
+
"sass": "1.53.0",
|
|
67
67
|
"typescript": "4.7.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-text",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Legend extension for Text DSL",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,27 +43,27 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@finos/legend-application": "
|
|
47
|
-
"@finos/legend-art": "2.0.
|
|
48
|
-
"@finos/legend-graph": "
|
|
49
|
-
"@finos/legend-model-storage": "2.0.
|
|
50
|
-
"@finos/legend-shared": "
|
|
51
|
-
"@finos/legend-studio": "10.
|
|
46
|
+
"@finos/legend-application": "5.0.0",
|
|
47
|
+
"@finos/legend-art": "2.0.3",
|
|
48
|
+
"@finos/legend-graph": "9.0.0",
|
|
49
|
+
"@finos/legend-model-storage": "2.0.3",
|
|
50
|
+
"@finos/legend-shared": "4.0.0",
|
|
51
|
+
"@finos/legend-studio": "10.2.0",
|
|
52
52
|
"@types/react": "18.0.14",
|
|
53
|
-
"mobx": "6.6.
|
|
53
|
+
"mobx": "6.6.1",
|
|
54
54
|
"mobx-react-lite": "3.4.0",
|
|
55
55
|
"react": "18.2.0",
|
|
56
56
|
"serializr": "2.0.5"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@finos/legend-dev-utils": "2.0.
|
|
59
|
+
"@finos/legend-dev-utils": "2.0.2",
|
|
60
60
|
"@jest/globals": "28.1.1",
|
|
61
61
|
"cross-env": "7.0.3",
|
|
62
62
|
"eslint": "8.18.0",
|
|
63
63
|
"jest": "28.1.1",
|
|
64
64
|
"npm-run-all": "4.1.5",
|
|
65
65
|
"rimraf": "3.0.2",
|
|
66
|
-
"sass": "1.
|
|
66
|
+
"sass": "1.53.0",
|
|
67
67
|
"typescript": "4.7.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
@@ -14,27 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { LegendApplicationDocumentationEntryConfig } from '@finos/legend-application';
|
|
18
|
-
|
|
19
17
|
export enum DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY {
|
|
20
18
|
GRAMMAR_PARSER = 'dsl-text.grammar.parser',
|
|
21
19
|
GRAMMAR_ELEMENT_TEXT = 'dsl-text.grammar.element.text',
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
export const DSL_TEXT_DOCUMENTATION_ENTRIES: Record<
|
|
25
|
-
string,
|
|
26
|
-
LegendApplicationDocumentationEntryConfig
|
|
27
|
-
> = {
|
|
28
|
-
[DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
|
|
29
|
-
title: 'What is Text DSL about?',
|
|
30
|
-
markdownText: {
|
|
31
|
-
value: `\`Text DSL\` (corresponding to header \`###DataSpace\` section in \`Pure\`) concerns with storing data in plain-text`,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
[DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_TEXT]: {
|
|
35
|
-
title: 'What is a text element?',
|
|
36
|
-
markdownText: {
|
|
37
|
-
value: `A \`Text\` element stores plain-text content with a specified content-type, which can be used for formatting, syntax-highlighting`,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
@@ -38,15 +38,7 @@ import { TextEditorState } from '../../stores/studio/TextEditorState.js';
|
|
|
38
38
|
import { TextElementEditor } from './TextElementEditor.js';
|
|
39
39
|
import type { PackageableElement } from '@finos/legend-graph';
|
|
40
40
|
import { Text } from '../../models/metamodels/pure/model/packageableElements/text/DSLText_Text.js';
|
|
41
|
-
import {
|
|
42
|
-
collectKeyedDocumnetationEntriesFromConfig,
|
|
43
|
-
type LegendApplicationDocumentationEntry,
|
|
44
|
-
type LegendApplicationKeyedDocumentationEntry,
|
|
45
|
-
} from '@finos/legend-application';
|
|
46
|
-
import {
|
|
47
|
-
DSL_TEXT_DOCUMENTATION_ENTRIES,
|
|
48
|
-
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY,
|
|
49
|
-
} from './DSLText_LegendStudioDocumentation.js';
|
|
41
|
+
import { DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY } from './DSLText_LegendStudioDocumentation.js';
|
|
50
42
|
import {
|
|
51
43
|
PURE_GRAMMAR_TEXT_ELEMENT_TYPE_LABEL,
|
|
52
44
|
PURE_GRAMMAR_TEXT_PARSER_NAME,
|
|
@@ -56,6 +48,7 @@ import {
|
|
|
56
48
|
PLAIN_TEXT_SNIPPET,
|
|
57
49
|
} from './DSLText_CodeSnippets.js';
|
|
58
50
|
import { create_TextElement } from '../../helper/DSLText_Helper.js';
|
|
51
|
+
import type { LegendApplicationDocumentationEntry } from '@finos/legend-application';
|
|
59
52
|
|
|
60
53
|
const TEXT_ELEMENT_TYPE = 'TEXT';
|
|
61
54
|
const TEXT_ELEMENT_PROJECT_EXPLORER_DND_TYPE = 'PROJECT_EXPLORER_TEXT';
|
|
@@ -68,10 +61,11 @@ export class DSLText_LegendStudioPlugin
|
|
|
68
61
|
super(packageJson.extensions.studioPlugin, packageJson.version);
|
|
69
62
|
}
|
|
70
63
|
|
|
71
|
-
override
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
override getExtraRequiredDocumentationKeys(): string[] {
|
|
65
|
+
return [
|
|
66
|
+
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_TEXT,
|
|
67
|
+
DSL_TEXT_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
|
68
|
+
];
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
getExtraSupportedElementTypes(): string[] {
|
|
@@ -33,7 +33,9 @@ import {
|
|
|
33
33
|
} from '../../stores/studio/DSLText_GraphModifierHelper.js';
|
|
34
34
|
import { TEXT_TYPE } from '../../helper/DSLText_Helper.js';
|
|
35
35
|
|
|
36
|
-
const getTextElementEditorLanguage = (
|
|
36
|
+
const getTextElementEditorLanguage = (
|
|
37
|
+
type: string | undefined,
|
|
38
|
+
): EDITOR_LANGUAGE => {
|
|
37
39
|
switch (type) {
|
|
38
40
|
case TEXT_TYPE.MARKDOWN:
|
|
39
41
|
return EDITOR_LANGUAGE.MARKDOWN;
|
|
@@ -74,7 +76,6 @@ export const TextElementEditor = observer(() => {
|
|
|
74
76
|
)}
|
|
75
77
|
<DropdownMenu
|
|
76
78
|
disabled={isReadOnly}
|
|
77
|
-
className="edit-panel__element-view"
|
|
78
79
|
content={
|
|
79
80
|
<MenuContent>
|
|
80
81
|
{/* TODO: account for unknown types */}
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
} from '@finos/legend-graph';
|
|
23
23
|
|
|
24
24
|
export class Text extends PackageableElement implements Hashable {
|
|
25
|
-
type
|
|
25
|
+
type?: string | undefined;
|
|
26
26
|
content!: string;
|
|
27
27
|
|
|
28
28
|
protected override get _elementHashCode(): string {
|
|
29
29
|
return hashArray([
|
|
30
30
|
TEXT_HASH_STRUCTURE.TEXT,
|
|
31
31
|
this.path,
|
|
32
|
-
this.type,
|
|
32
|
+
this.type ?? '',
|
|
33
33
|
this.content,
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
} from '@finos/legend-graph';
|
|
23
23
|
|
|
24
24
|
export class V1_Text extends V1_PackageableElement implements Hashable {
|
|
25
|
-
type
|
|
25
|
+
type?: string | undefined;
|
|
26
26
|
content!: string;
|
|
27
27
|
|
|
28
28
|
override get hashCode(): string {
|
|
29
29
|
return hashArray([
|
|
30
30
|
TEXT_HASH_STRUCTURE.TEXT,
|
|
31
31
|
this.path,
|
|
32
|
-
this.type,
|
|
32
|
+
this.type ?? '',
|
|
33
33
|
this.content,
|
|
34
34
|
]);
|
|
35
35
|
}
|