@finos/legend-extension-assortment 0.0.82 → 0.0.84

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.
@@ -13,12 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { LegendStudioApplicationPlugin, type DSL_LegendStudioApplicationPlugin_Extension, type PureGrammarParserElementSnippetSuggestionsGetter, type PureGrammarParserKeywordSuggestionGetter, type ElementIconGetter } from '@finos/legend-application-studio';
16
+ import { LegendStudioApplicationPlugin, type DSL_LegendStudioApplicationPlugin_Extension, type PureGrammarParserElementSnippetSuggestionsGetter, type PureGrammarParserKeywordSuggestionGetter, type ElementIconGetter, type ElementEditorRenderer } from '@finos/legend-application-studio';
17
17
  export declare class DSL_SnowflakeApp_LegendStudioApplicationPlugin extends LegendStudioApplicationPlugin implements DSL_LegendStudioApplicationPlugin_Extension {
18
18
  constructor();
19
19
  getExtraElementIconGetters(): ElementIconGetter[];
20
20
  getExtraPureGrammarKeywords(): string[];
21
21
  getExtraPureGrammarParserKeywordSuggestionGetters(): PureGrammarParserKeywordSuggestionGetter[];
22
22
  getExtraPureGrammarParserElementSnippetSuggestionsGetters(): PureGrammarParserElementSnippetSuggestionsGetter[];
23
+ getExtraElementEditorRenderers(): ElementEditorRenderer[];
23
24
  }
24
25
  //# sourceMappingURL=DSL_SnowflakeApp_LegendStudioApplicationPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSL_SnowflakeApp_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSL_SnowflakeApp_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,6BAA6B,EAC7B,KAAK,2CAA2C,EAEhD,KAAK,gDAAgD,EACrD,KAAK,wCAAwC,EAC7C,KAAK,iBAAiB,EACvB,MAAM,kCAAkC,CAAC;AAW1C,qBAAa,8CACX,SAAQ,6BACR,YAAW,2CAA2C;;IAStD,0BAA0B,IAAI,iBAAiB,EAAE;IAkBjD,2BAA2B,IAAI,MAAM,EAAE;IAIvC,iDAAiD,IAAI,wCAAwC,EAAE;IAY/F,yDAAyD,IAAI,gDAAgD,EAAE;CAgBhH"}
1
+ {"version":3,"file":"DSL_SnowflakeApp_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSL_SnowflakeApp_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,6BAA6B,EAC7B,KAAK,2CAA2C,EAEhD,KAAK,gDAAgD,EACrD,KAAK,wCAAwC,EAC7C,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAG3B,MAAM,kCAAkC,CAAC;AAQ1C,qBAAa,8CACX,SAAQ,6BACR,YAAW,2CAA2C;;IAStD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,2BAA2B,IAAI,MAAM,EAAE;IAIvC,iDAAiD,IAAI,wCAAwC,EAAE;IAY/F,yDAAyD,IAAI,gDAAgD,EAAE;IAiB/G,8BAA8B,IAAI,qBAAqB,EAAE;CAgB1D"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import packageJson from '../../../package.json' assert { type: 'json' };
3
- import { LegendStudioApplicationPlugin, } from '@finos/legend-application-studio';
3
+ import { LegendStudioApplicationPlugin, SnowflakeAppFunctionActivatorEditor, SnowflakeAppFunctionActivatorEdtiorState, } from '@finos/legend-application-studio';
4
4
  import { SNOWFLAKE_APP_CODE_SNIPPET } from '../../__lib__/studio/DSL_SnowflakeApp_LegendStudioCodeSnippet.js';
5
- import { INTERNAL__UnknownFunctionActivator, } from '@finos/legend-graph';
5
+ import {} from '@finos/legend-graph';
6
6
  import { Snowflake_BrandIcon } from '@finos/legend-art';
7
7
  const PURE_GRAMMAR_SNOWFLAKE_APP_PARSER_NAME = 'Snowflake';
8
8
  const PURE_GRAMMAR_SNOWFLAKE_APP_ELEMENT_TYPE_LABEL = 'SnowflakeApp';
@@ -14,8 +14,7 @@ export class DSL_SnowflakeApp_LegendStudioApplicationPlugin extends LegendStudio
14
14
  return [
15
15
  (type, element) => {
16
16
  // NOTE: this is temporary until we fully support snowflake app element
17
- if (element instanceof INTERNAL__UnknownFunctionActivator &&
18
- element.content._type === 'snowflakeApp') {
17
+ if (type === 'snowflakeApp') {
19
18
  return _jsx(Snowflake_BrandIcon, { className: "icon__snowflake-app" });
20
19
  }
21
20
  return undefined;
@@ -48,5 +47,15 @@ export class DSL_SnowflakeApp_LegendStudioApplicationPlugin extends LegendStudio
48
47
  : undefined,
49
48
  ];
50
49
  }
50
+ getExtraElementEditorRenderers() {
51
+ return [
52
+ (elementEditorState) => {
53
+ if (elementEditorState instanceof SnowflakeAppFunctionActivatorEdtiorState) {
54
+ return (_jsx(SnowflakeAppFunctionActivatorEditor, {}, elementEditorState.uuid));
55
+ }
56
+ return undefined;
57
+ },
58
+ ];
59
+ }
51
60
  }
52
61
  //# sourceMappingURL=DSL_SnowflakeApp_LegendStudioApplicationPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSL_SnowflakeApp_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSL_SnowflakeApp_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAiBA,OAAO,WAAW,MAAM,uBAAuB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EACL,6BAA6B,GAM9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EACL,kCAAkC,GAEnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,sCAAsC,GAAG,WAAW,CAAC;AAC3D,MAAM,6CAA6C,GAAG,cAAc,CAAC;AAErE,MAAM,OAAO,8CACX,SAAQ,6BAA6B;IAGrC;QACE,KAAK,CACH,WAAW,CAAC,UAAU,CAAC,yCAAyC,EAChE,WAAW,CAAC,OAAO,CACpB,CAAC;IACJ,CAAC;IAED,0BAA0B;QACxB,OAAO;YACL,CACE,IAAY,EACZ,OAAuC,EACV,EAAE;gBAC/B,uEAAuE;gBACvE,IACE,OAAO,YAAY,kCAAkC;oBACrD,OAAO,CAAC,OAAO,CAAC,KAAK,KAAK,cAAc,EACxC;oBACA,OAAO,KAAC,mBAAmB,IAAC,SAAS,EAAC,qBAAqB,GAAG,CAAC;iBAChE;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,2BAA2B;QACzB,OAAO,CAAC,6CAA6C,CAAC,CAAC;IACzD,CAAC;IAED,iDAAiD;QAC/C,OAAO;YACL,CAAC,WAAwB,EAA+B,EAAE,CAAC;gBACzD;oBACE,IAAI,EAAE,sCAAsC;oBAC5C,WAAW,EAAE,OAAO;oBACpB,UAAU,EAAE,sCAAsC;iBACnD;aACF;SACF,CAAC;IACJ,CAAC;IAED,yDAAyD;QACvD,OAAO;YACL,CACE,WAAwB,EACxB,aAAqB,EACoB,EAAE,CAC3C,aAAa,KAAK,sCAAsC;gBACtD,CAAC,CAAC;oBACE;wBACE,IAAI,EAAE,6CAA6C;wBACnD,UAAU,EAAE,0BAA0B;qBACvC;iBACF;gBACH,CAAC,CAAC,SAAS;SAChB,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"DSL_SnowflakeApp_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSL_SnowflakeApp_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAiBA,OAAO,WAAW,MAAM,uBAAuB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EACL,6BAA6B,EAQ7B,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,kCAAkC,CAAC;AAC1C,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,MAC7B,kBAAkB,CAAC,IAAI,CAC5B,CACH,CAAC;iBACH;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-extension-assortment v0.0.82
1
+ /** @license @finos/legend-extension-assortment v0.0.84
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-assortment",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "An assortment of Legend extensions",
5
5
  "keywords": [
6
6
  "legend",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-assortment",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "An assortment of Legend extensions",
5
5
  "keywords": [
6
6
  "legend",
@@ -42,11 +42,11 @@
42
42
  "test:watch": "jest --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@finos/legend-application": "15.0.51",
46
- "@finos/legend-application-studio": "28.12.1",
47
- "@finos/legend-art": "7.1.5",
48
- "@finos/legend-graph": "31.4.0",
49
- "@finos/legend-lego": "1.1.50",
45
+ "@finos/legend-application": "15.0.52",
46
+ "@finos/legend-application-studio": "28.13.1",
47
+ "@finos/legend-art": "7.1.6",
48
+ "@finos/legend-graph": "31.4.2",
49
+ "@finos/legend-lego": "1.1.52",
50
50
  "@finos/legend-shared": "10.0.28",
51
51
  "@types/react": "18.2.31",
52
52
  "mobx": "6.10.2",
@@ -23,12 +23,13 @@ import {
23
23
  type PureGrammarParserElementSnippetSuggestionsGetter,
24
24
  type PureGrammarParserKeywordSuggestionGetter,
25
25
  type ElementIconGetter,
26
+ type ElementEditorState,
27
+ type ElementEditorRenderer,
28
+ SnowflakeAppFunctionActivatorEditor,
29
+ SnowflakeAppFunctionActivatorEdtiorState,
26
30
  } from '@finos/legend-application-studio';
27
31
  import { SNOWFLAKE_APP_CODE_SNIPPET } from '../../__lib__/studio/DSL_SnowflakeApp_LegendStudioCodeSnippet.js';
28
- import {
29
- INTERNAL__UnknownFunctionActivator,
30
- type PackageableElement,
31
- } from '@finos/legend-graph';
32
+ import { type PackageableElement } from '@finos/legend-graph';
32
33
  import { Snowflake_BrandIcon } from '@finos/legend-art';
33
34
 
34
35
  const PURE_GRAMMAR_SNOWFLAKE_APP_PARSER_NAME = 'Snowflake';
@@ -52,10 +53,7 @@ export class DSL_SnowflakeApp_LegendStudioApplicationPlugin
52
53
  element: PackageableElement | undefined,
53
54
  ): React.ReactNode | undefined => {
54
55
  // NOTE: this is temporary until we fully support snowflake app element
55
- if (
56
- element instanceof INTERNAL__UnknownFunctionActivator &&
57
- element.content._type === 'snowflakeApp'
58
- ) {
56
+ if (type === 'snowflakeApp') {
59
57
  return <Snowflake_BrandIcon className="icon__snowflake-app" />;
60
58
  }
61
59
  return undefined;
@@ -95,4 +93,21 @@ export class DSL_SnowflakeApp_LegendStudioApplicationPlugin
95
93
  : undefined,
96
94
  ];
97
95
  }
96
+
97
+ getExtraElementEditorRenderers(): ElementEditorRenderer[] {
98
+ return [
99
+ (elementEditorState: ElementEditorState): React.ReactNode | undefined => {
100
+ if (
101
+ elementEditorState instanceof SnowflakeAppFunctionActivatorEdtiorState
102
+ ) {
103
+ return (
104
+ <SnowflakeAppFunctionActivatorEditor
105
+ key={elementEditorState.uuid}
106
+ />
107
+ );
108
+ }
109
+ return undefined;
110
+ },
111
+ ];
112
+ }
98
113
  }