@equinor/fusion-framework-react 7.2.1 → 7.2.2-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
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/CHANGELOG.md +12 -0
- package/dist/esm/app/useApps.js +5 -9
- package/dist/esm/app/useApps.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/app/useApps.d.ts +11 -7
- package/package.json +11 -11
- package/src/app/useApps.ts +25 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 7.2.2-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
|
|
8
|
+
- @equinor/fusion-framework-module@4.3.5-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
9
|
+
- @equinor/fusion-framework-react-module-signalr@3.0.15-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
10
|
+
- @equinor/fusion-framework@7.2.7-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
11
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.9-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
12
|
+
- @equinor/fusion-framework-react-module-http@7.0.0-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
13
|
+
- @equinor/fusion-framework-react-module@3.1.6-alpha-afdec66178b3cac96597125945ba7e1b4ca2ca7e
|
|
14
|
+
|
|
3
15
|
## 7.2.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/esm/app/useApps.js
CHANGED
|
@@ -3,18 +3,14 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { useAppProvider } from './useAppProvider';
|
|
4
4
|
/**
|
|
5
5
|
* React Hook - Get apps from framework
|
|
6
|
-
* @param args Object with boolean
|
|
7
|
-
* @returns Object {apps, isLoading} where apps is Array of
|
|
6
|
+
* @param args Object with filterByCurrentUser: boolean
|
|
7
|
+
* @returns Object {apps, isLoading, error} where apps is Array of ApplicationManifest, isLoading is a boolean on observable complete
|
|
8
|
+
* @since 7.1.1
|
|
8
9
|
*/
|
|
9
10
|
export const useApps = (args) => {
|
|
10
11
|
const provider = useAppProvider();
|
|
11
|
-
const {
|
|
12
|
-
const apps = useMemo(() => {
|
|
13
|
-
if (manifests && !(args === null || args === void 0 ? void 0 : args.includeHidden)) {
|
|
14
|
-
return manifests.filter((app) => !app.hide);
|
|
15
|
-
}
|
|
16
|
-
return manifests;
|
|
17
|
-
}, [args, manifests]);
|
|
12
|
+
const { filterByCurrentUser } = args || {};
|
|
13
|
+
const { value: apps, complete, error, } = useObservableState(useMemo(() => provider.getAppManifests(filterByCurrentUser ? { filterByCurrentUser } : undefined), [provider, filterByCurrentUser]));
|
|
18
14
|
return { apps, isLoading: !complete, error };
|
|
19
15
|
};
|
|
20
16
|
export default useApps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApps.js","sourceRoot":"","sources":["../../../src/app/useApps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"useApps.js","sourceRoot":"","sources":["../../../src/app/useApps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASlD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CACnB,IAAkB,EAC6D,EAAE;IACjF,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IAElC,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAE3C,MAAM,EACF,KAAK,EAAE,IAAI,EACX,QAAQ,EACR,KAAK,GACR,GAAG,kBAAkB,CAClB,OAAO,CACH,GAAG,EAAE,CACD,QAAQ,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EACvF,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAClC,CACJ,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC;AACjD,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|