@finos/legend-application 16.0.90 → 16.0.91
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/__lib__/LegendApplicationNavigation.d.ts +4 -0
- package/lib/__lib__/LegendApplicationNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendApplicationNavigation.js +4 -0
- package/lib/__lib__/LegendApplicationNavigation.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +3 -1
- package/lib/util/URLUtils.d.ts +2 -2
- package/lib/util/URLUtils.d.ts.map +1 -1
- package/lib/util/URLUtils.js +5 -5
- package/lib/util/URLUtils.js.map +1 -1
- package/package.json +3 -1
- package/src/__lib__/LegendApplicationNavigation.ts +10 -0
- package/src/util/URLUtils.ts +7 -7
|
@@ -24,4 +24,8 @@ export declare const EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewU
|
|
|
24
24
|
* @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle
|
|
25
25
|
*/
|
|
26
26
|
export declare const EXTERNAL_APPLICATION_NAVIGATION__generateNewDataCubeUrl: (dataCubeApplicationUrl: string, sourceData: object) => string;
|
|
27
|
+
/**
|
|
28
|
+
* @external_application_navigation This depends on Registry routing and is hardcoded so it's potentially brittle
|
|
29
|
+
*/
|
|
30
|
+
export declare const EXTERNAL_APPLICATION_NAVIGATION__generateRegistryLineageUrl: (registryApplicationUrl: string, dataProductName: string, accessPointName: string) => string;
|
|
27
31
|
//# sourceMappingURL=LegendApplicationNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplicationNavigation.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,oBAAY,8BAA8B;IACxC,mBAAmB,sBAAsB;CAC1C;AAED;;GAEG;AACH,eAAO,MAAM,6DAA6D,GACxE,sBAAsB,MAAM,EAC5B,SAAS,MAAM,EACf,YAAY,MAAM,EAClB,WAAW,MAAM,EACjB,YAAY,MAAM,GAAG,SAAS,KAC7B,MAK8C,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,uDAAuD,GAClE,wBAAwB,MAAM,EAC9B,YAAY,MAAM,KACjB,MAGE,CAAC"}
|
|
1
|
+
{"version":3,"file":"LegendApplicationNavigation.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,oBAAY,8BAA8B;IACxC,mBAAmB,sBAAsB;CAC1C;AAED;;GAEG;AACH,eAAO,MAAM,6DAA6D,GACxE,sBAAsB,MAAM,EAC5B,SAAS,MAAM,EACf,YAAY,MAAM,EAClB,WAAW,MAAM,EACjB,YAAY,MAAM,GAAG,SAAS,KAC7B,MAK8C,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,uDAAuD,GAClE,wBAAwB,MAAM,EAC9B,YAAY,MAAM,KACjB,MAGE,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,2DAA2D,GACtE,wBAAwB,MAAM,EAC9B,iBAAiB,MAAM,EACvB,iBAAiB,MAAM,KACtB,MACuI,CAAC"}
|
|
@@ -26,4 +26,8 @@ export const EXTERNAL_APPLICATION_NAVIGATION__generateStudioProjectViewUrl = (st
|
|
|
26
26
|
* @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle
|
|
27
27
|
*/
|
|
28
28
|
export const EXTERNAL_APPLICATION_NAVIGATION__generateNewDataCubeUrl = (dataCubeApplicationUrl, sourceData) => `${dataCubeApplicationUrl}?sourceData=${encodeURIComponent(btoa(JSON.stringify(sourceData)))}`;
|
|
29
|
+
/**
|
|
30
|
+
* @external_application_navigation This depends on Registry routing and is hardcoded so it's potentially brittle
|
|
31
|
+
*/
|
|
32
|
+
export const EXTERNAL_APPLICATION_NAVIGATION__generateRegistryLineageUrl = (registryApplicationUrl, dataProductName, accessPointName) => `${registryApplicationUrl}#/lineage/lakehouse/dataProduct/${dataProductName.toUpperCase()}/accessPoint/${accessPointName.toUpperCase()}`;
|
|
29
33
|
//# sourceMappingURL=LegendApplicationNavigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplicationNavigation.js","sourceRoot":"","sources":["../../src/__lib__/LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACxC,2EAAyC,CAAA;AAC3C,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6DAA6D,GAAG,CAC3E,oBAA4B,EAC5B,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,UAA8B,EACtB,EAAE,CACV,GAAG,oBAAoB,iBAAiB,sBAAsB,CAC5D,OAAO,EACP,UAAU,EACV,SAAS,CACV,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,uDAAuD,GAAG,CACrE,sBAA8B,EAC9B,UAAkB,EACV,EAAE,CACV,GAAG,sBAAsB,eAAe,kBAAkB,CACxD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CACjC,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"LegendApplicationNavigation.js","sourceRoot":"","sources":["../../src/__lib__/LegendApplicationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACxC,2EAAyC,CAAA;AAC3C,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6DAA6D,GAAG,CAC3E,oBAA4B,EAC5B,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,UAA8B,EACtB,EAAE,CACV,GAAG,oBAAoB,iBAAiB,sBAAsB,CAC5D,OAAO,EACP,UAAU,EACV,SAAS,CACV,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,uDAAuD,GAAG,CACrE,sBAA8B,EAC9B,UAAkB,EACV,EAAE,CACV,GAAG,sBAAsB,eAAe,kBAAkB,CACxD,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CACjC,EAAE,CAAC;AAEN;;GAEG;AACH,MAAM,CAAC,MAAM,2DAA2D,GAAG,CACzE,sBAA8B,EAC9B,eAAuB,EACvB,eAAuB,EACf,EAAE,CACV,GAAG,sBAAsB,mCAAmC,eAAe,CAAC,WAAW,EAAE,gBAAgB,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.91",
|
|
4
4
|
"description": "Legend application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@finos/legend-dev-utils": "workspace:*",
|
|
71
71
|
"@jest/globals": "29.7.0",
|
|
72
|
+
"@testing-library/dom": "10.4.0",
|
|
73
|
+
"@testing-library/react": "16.2.0",
|
|
72
74
|
"cross-env": "7.0.3",
|
|
73
75
|
"eslint": "9.22.0",
|
|
74
76
|
"jest": "29.7.0",
|
package/lib/util/URLUtils.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ import type { SetURLSearchParams } from 'react-router';
|
|
|
20
20
|
* @param stateVar the state variable to sync
|
|
21
21
|
* @param updateStateVar setter function to update the state variable (should be memoized with useCallback)
|
|
22
22
|
* @param searchParamKey the key of the URL search parameter to sync with
|
|
23
|
-
* @param
|
|
23
|
+
* @param searchParamValue the current URL search parameter value (i.e., from useSearchParams)
|
|
24
24
|
* @param setSearchParams function to update the URL search parameters (i.e., from useSearchParams)
|
|
25
25
|
* @param initializedCallback function to check if the underlying state is initialized and ready to sync with URL (should be memoized with useCallback)
|
|
26
26
|
*/
|
|
27
|
-
export declare const useSyncStateAndSearchParam: (stateVar: string | boolean | number | undefined, updateStateVar: (val: string |
|
|
27
|
+
export declare const useSyncStateAndSearchParam: (stateVar: string | boolean | number | null | undefined, updateStateVar: (val: string | null) => void, searchParamKey: string, searchParamValue: string | null, setSearchParams: SetURLSearchParams, initializedCallback: () => boolean) => void;
|
|
28
28
|
//# sourceMappingURL=URLUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URLUtils.d.ts","sourceRoot":"","sources":["../../src/util/URLUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GACrC,UAAU,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"URLUtils.d.ts","sourceRoot":"","sources":["../../src/util/URLUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GACrC,UAAU,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACtD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,EAC5C,gBAAgB,MAAM,EACtB,kBAAkB,MAAM,GAAG,IAAI,EAC/B,iBAAiB,kBAAkB,EACnC,qBAAqB,MAAM,OAAO,KACjC,IA6BF,CAAC"}
|
package/lib/util/URLUtils.js
CHANGED
|
@@ -20,19 +20,19 @@ import { useEffect } from 'react';
|
|
|
20
20
|
* @param stateVar the state variable to sync
|
|
21
21
|
* @param updateStateVar setter function to update the state variable (should be memoized with useCallback)
|
|
22
22
|
* @param searchParamKey the key of the URL search parameter to sync with
|
|
23
|
-
* @param
|
|
23
|
+
* @param searchParamValue the current URL search parameter value (i.e., from useSearchParams)
|
|
24
24
|
* @param setSearchParams function to update the URL search parameters (i.e., from useSearchParams)
|
|
25
25
|
* @param initializedCallback function to check if the underlying state is initialized and ready to sync with URL (should be memoized with useCallback)
|
|
26
26
|
*/
|
|
27
|
-
export const useSyncStateAndSearchParam = (stateVar, updateStateVar, searchParamKey,
|
|
27
|
+
export const useSyncStateAndSearchParam = (stateVar, updateStateVar, searchParamKey, searchParamValue, setSearchParams, initializedCallback) => {
|
|
28
28
|
// Sync state with URL search param
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
if (initializedCallback()) {
|
|
31
|
-
// On mount or when
|
|
32
|
-
const urlParamValue =
|
|
31
|
+
// On mount or when search param value changes, update state from URL
|
|
32
|
+
const urlParamValue = searchParamValue;
|
|
33
33
|
updateStateVar(urlParamValue);
|
|
34
34
|
}
|
|
35
|
-
}, [initializedCallback, searchParamKey,
|
|
35
|
+
}, [initializedCallback, searchParamKey, searchParamValue, updateStateVar]);
|
|
36
36
|
// Sync URL search param with state
|
|
37
37
|
useEffect(() => {
|
|
38
38
|
if (initializedCallback()) {
|
package/lib/util/URLUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URLUtils.js","sourceRoot":"","sources":["../../src/util/URLUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAE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,CAAC;oBACjC,OAAO,SAAS,CAAC;gBACnB,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.91",
|
|
4
4
|
"description": "Legend application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@finos/legend-dev-utils": "2.2.5",
|
|
71
71
|
"@jest/globals": "29.7.0",
|
|
72
|
+
"@testing-library/dom": "10.4.0",
|
|
73
|
+
"@testing-library/react": "16.2.0",
|
|
72
74
|
"cross-env": "7.0.3",
|
|
73
75
|
"eslint": "9.22.0",
|
|
74
76
|
"jest": "29.7.0",
|
|
@@ -46,3 +46,13 @@ export const EXTERNAL_APPLICATION_NAVIGATION__generateNewDataCubeUrl = (
|
|
|
46
46
|
`${dataCubeApplicationUrl}?sourceData=${encodeURIComponent(
|
|
47
47
|
btoa(JSON.stringify(sourceData)),
|
|
48
48
|
)}`;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @external_application_navigation This depends on Registry routing and is hardcoded so it's potentially brittle
|
|
52
|
+
*/
|
|
53
|
+
export const EXTERNAL_APPLICATION_NAVIGATION__generateRegistryLineageUrl = (
|
|
54
|
+
registryApplicationUrl: string,
|
|
55
|
+
dataProductName: string,
|
|
56
|
+
accessPointName: string,
|
|
57
|
+
): string =>
|
|
58
|
+
`${registryApplicationUrl}#/lineage/lakehouse/dataProduct/${dataProductName.toUpperCase()}/accessPoint/${accessPointName.toUpperCase()}`;
|
package/src/util/URLUtils.ts
CHANGED
|
@@ -23,26 +23,26 @@ import type { SetURLSearchParams } from 'react-router';
|
|
|
23
23
|
* @param stateVar the state variable to sync
|
|
24
24
|
* @param updateStateVar setter function to update the state variable (should be memoized with useCallback)
|
|
25
25
|
* @param searchParamKey the key of the URL search parameter to sync with
|
|
26
|
-
* @param
|
|
26
|
+
* @param searchParamValue the current URL search parameter value (i.e., from useSearchParams)
|
|
27
27
|
* @param setSearchParams function to update the URL search parameters (i.e., from useSearchParams)
|
|
28
28
|
* @param initializedCallback function to check if the underlying state is initialized and ready to sync with URL (should be memoized with useCallback)
|
|
29
29
|
*/
|
|
30
30
|
export const useSyncStateAndSearchParam = (
|
|
31
|
-
stateVar: string | boolean | number | undefined,
|
|
32
|
-
updateStateVar: (val: string |
|
|
31
|
+
stateVar: string | boolean | number | null | undefined,
|
|
32
|
+
updateStateVar: (val: string | null) => void,
|
|
33
33
|
searchParamKey: string,
|
|
34
|
-
|
|
34
|
+
searchParamValue: string | null,
|
|
35
35
|
setSearchParams: SetURLSearchParams,
|
|
36
36
|
initializedCallback: () => boolean,
|
|
37
37
|
): void => {
|
|
38
38
|
// Sync state with URL search param
|
|
39
39
|
useEffect(() => {
|
|
40
40
|
if (initializedCallback()) {
|
|
41
|
-
// On mount or when
|
|
42
|
-
const urlParamValue =
|
|
41
|
+
// On mount or when search param value changes, update state from URL
|
|
42
|
+
const urlParamValue = searchParamValue;
|
|
43
43
|
updateStateVar(urlParamValue);
|
|
44
44
|
}
|
|
45
|
-
}, [initializedCallback, searchParamKey,
|
|
45
|
+
}, [initializedCallback, searchParamKey, searchParamValue, updateStateVar]);
|
|
46
46
|
|
|
47
47
|
// Sync URL search param with state
|
|
48
48
|
useEffect(() => {
|