@finos/legend-application 10.2.6 → 10.2.7

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,9 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type PackageableElement } from '@finos/legend-graph';
16
+ import { type PackageableElement, type PureModel } from '@finos/legend-graph';
17
17
  import type { PackageableElementOption } from '../../stores/shared/PackageableElementOption.js';
18
18
  export declare const getPackageableElementOptionFormatter: (props: {
19
19
  darkMode?: boolean;
20
+ pureModel: PureModel;
20
21
  }) => (option: PackageableElementOption<PackageableElement>) => React.ReactNode;
21
22
  //# sourceMappingURL=PackageableElementOptionLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackageableElementOptionLabel.d.ts","sourceRoot":"","sources":["../../../src/components/shared/PackageableElementOptionLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAsBhG,eAAO,MAAM,oCAAoC,UAAW;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,cACS,yBAAyB,kBAAkB,CAAC,KACjD,MAAM,SAyBR,CAAC"}
1
+ {"version":3,"file":"PackageableElementOptionLabel.d.ts","sourceRoot":"","sources":["../../../src/components/shared/PackageableElementOptionLabel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EAIvB,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AA0BhG,eAAO,MAAM,oCAAoC,UAAW;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;CACtB,cACS,yBAAyB,kBAAkB,CAAC,KACjD,MAAM,SAyBR,CAAC"}
@@ -15,26 +15,26 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  * limitations under the License.
16
16
  */
17
17
  import { isSystemElement, isGeneratedElement, isDependencyElement, } from '@finos/legend-graph';
18
- const getElementColorCode = (element) => isSystemElement(element)
18
+ const getElementColorCode = (element, pureModel) => isSystemElement(element)
19
19
  ? 'system'
20
20
  : isGeneratedElement(element)
21
21
  ? 'generated'
22
- : isDependencyElement(element)
22
+ : isDependencyElement(element, pureModel)
23
23
  ? 'dependency'
24
24
  : '';
25
- const generateOptionTooltipText = (element) => isSystemElement(element)
25
+ const generateOptionTooltipText = (element, pureModel) => isSystemElement(element)
26
26
  ? 'system element'
27
27
  : isGeneratedElement(element)
28
28
  ? 'generated element'
29
- : isDependencyElement(element)
29
+ : isDependencyElement(element, pureModel)
30
30
  ? 'dependency element'
31
31
  : undefined;
32
32
  export const getPackageableElementOptionFormatter = (props) => function PackageableElementOptionLabel(option) {
33
33
  const className = props.darkMode
34
34
  ? 'packageable-element-option-label--dark'
35
35
  : 'packageable-element-option-label';
36
- const colorCode = getElementColorCode(option.value);
37
- return (_jsxs("div", { className: className, children: [_jsx("div", { title: generateOptionTooltipText(option.value), className: `packageable-element-option-label__type ${colorCode
36
+ const colorCode = getElementColorCode(option.value, props.pureModel);
37
+ return (_jsxs("div", { className: className, children: [_jsx("div", { title: generateOptionTooltipText(option.value, props.pureModel), className: `packageable-element-option-label__type ${colorCode
38
38
  ? `packageable-element-option-label__type--${colorCode}`
39
39
  : ''} ` }), _jsx("div", { className: `${className}__name`, children: option.label }), option.value.package && (_jsx("div", { className: `${className}__tag`, children: option.value.path }))] }));
40
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PackageableElementOptionLabel.js","sourceRoot":"","sources":["../../../src/components/shared/PackageableElementOptionLabel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,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AS,EAAE,GAAG,SAAS,OAAO,YAAG,MAAM,CAAC,KAAK,CAAC,IAAI,GAAO,CAC/D,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"PackageableElementOptionLabel.js","sourceRoot":"","sources":["../../../src/components/shared/PackageableElementOptionLabel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,mBAAmB,GAAG,CAC1B,OAA2B,EAC3B,SAAoB,EACZ,EAAE,CACV,eAAe,CAAC,OAAO,CAAC;IACtB,CAAC,CAAC,QAAQ;IACV,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC;QAC7B,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC;YACzC,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,EAAE,CAAC;AAET,MAAM,yBAAyB,GAAG,CAChC,OAA2B,EAC3B,SAAoB,EACA,EAAE,CACtB,eAAe,CAAC,OAAO,CAAC;IACtB,CAAC,CAAC,gBAAgB;IAClB,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC;QAC7B,CAAC,CAAC,mBAAmB;QACrB,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC;YACzC,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,SAAS,CAAC;AAEhB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,KAGpD,EAEqB,EAAE,CACtB,SAAS,6BAA6B,CACpC,MAAoD;IAEpD,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ;QAC9B,CAAC,CAAC,wCAAwC;QAC1C,CAAC,CAAC,kCAAkC,CAAC;IACvC,MAAM,SAAS,GAAG,mBAAmB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAErE,OAAO,CACL,eAAK,SAAS,EAAE,SAAS,aACvB,cACE,KAAK,EAAE,yBAAyB,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,EAC/D,SAAS,EAAE,0CACT,SAAS;oBACP,CAAC,CAAC,2CAA2C,SAAS,EAAE;oBACxD,CAAC,CAAC,EACN,GAAG,GACE,EACP,cAAK,SAAS,EAAE,GAAG,SAAS,QAAQ,YAAG,MAAM,CAAC,KAAK,GAAO,EACzD,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,CACvB,cAAK,SAAS,EAAE,GAAG,SAAS,OAAO,YAAG,MAAM,CAAC,KAAK,CAAC,IAAI,GAAO,CAC/D,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-application v10.2.6
1
+ /** @license @finos/legend-application v10.2.7
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application",
3
- "version": "10.2.6",
3
+ "version": "10.2.7",
4
4
  "description": "Legend application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -43,12 +43,12 @@
43
43
  "test:watch": "jest --watch"
44
44
  },
45
45
  "dependencies": {
46
- "@finos/legend-art": "5.0.18",
47
- "@finos/legend-graph": "22.1.1",
48
- "@finos/legend-shared": "6.2.12",
46
+ "@finos/legend-art": "5.0.19",
47
+ "@finos/legend-graph": "22.2.0",
48
+ "@finos/legend-shared": "6.2.13",
49
49
  "@types/css-font-loading-module": "0.0.7",
50
50
  "@types/react": "18.0.26",
51
- "@types/react-dom": "18.0.9",
51
+ "@types/react-dom": "18.0.10",
52
52
  "@types/react-router-dom": "5.3.3",
53
53
  "history": "5.3.0",
54
54
  "mobx": "6.7.0",
@@ -62,13 +62,13 @@
62
62
  "react-router": "5.3.4",
63
63
  "react-router-dom": "5.3.4",
64
64
  "serializr": "3.0.2",
65
- "sql-formatter": "12.0.4"
65
+ "sql-formatter": "12.0.5"
66
66
  },
67
67
  "devDependencies": {
68
- "@finos/legend-dev-utils": "2.0.35",
68
+ "@finos/legend-dev-utils": "2.0.36",
69
69
  "@jest/globals": "29.3.1",
70
70
  "cross-env": "7.0.3",
71
- "eslint": "8.30.0",
71
+ "eslint": "8.31.0",
72
72
  "jest": "29.3.1",
73
73
  "npm-run-all": "4.1.5",
74
74
  "rimraf": "3.0.2",
@@ -19,31 +19,37 @@ import {
19
19
  isSystemElement,
20
20
  isGeneratedElement,
21
21
  isDependencyElement,
22
+ type PureModel,
22
23
  } from '@finos/legend-graph';
23
24
  import type { PackageableElementOption } from '../../stores/shared/PackageableElementOption.js';
24
25
 
25
- const getElementColorCode = (element: PackageableElement): string =>
26
+ const getElementColorCode = (
27
+ element: PackageableElement,
28
+ pureModel: PureModel,
29
+ ): string =>
26
30
  isSystemElement(element)
27
31
  ? 'system'
28
32
  : isGeneratedElement(element)
29
33
  ? 'generated'
30
- : isDependencyElement(element)
34
+ : isDependencyElement(element, pureModel)
31
35
  ? 'dependency'
32
36
  : '';
33
37
 
34
38
  const generateOptionTooltipText = (
35
39
  element: PackageableElement,
40
+ pureModel: PureModel,
36
41
  ): string | undefined =>
37
42
  isSystemElement(element)
38
43
  ? 'system element'
39
44
  : isGeneratedElement(element)
40
45
  ? 'generated element'
41
- : isDependencyElement(element)
46
+ : isDependencyElement(element, pureModel)
42
47
  ? 'dependency element'
43
48
  : undefined;
44
49
 
45
50
  export const getPackageableElementOptionFormatter = (props: {
46
51
  darkMode?: boolean;
52
+ pureModel: PureModel;
47
53
  }): ((
48
54
  option: PackageableElementOption<PackageableElement>,
49
55
  ) => React.ReactNode) =>
@@ -53,12 +59,12 @@ export const getPackageableElementOptionFormatter = (props: {
53
59
  const className = props.darkMode
54
60
  ? 'packageable-element-option-label--dark'
55
61
  : 'packageable-element-option-label';
56
- const colorCode = getElementColorCode(option.value);
62
+ const colorCode = getElementColorCode(option.value, props.pureModel);
57
63
 
58
64
  return (
59
65
  <div className={className}>
60
66
  <div
61
- title={generateOptionTooltipText(option.value)}
67
+ title={generateOptionTooltipText(option.value, props.pureModel)}
62
68
  className={`packageable-element-option-label__type ${
63
69
  colorCode
64
70
  ? `packageable-element-option-label__type--${colorCode}`