@equinor/fusion-framework-react 7.2.0 → 7.2.2-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
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 +22 -0
- package/dist/esm/app/useApps.js +5 -9
- package/dist/esm/app/useApps.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/app/useApps.d.ts +11 -7
- package/dist/types/version.d.ts +1 -1
- package/package.json +12 -12
- package/src/app/useApps.ts +25 -15
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 7.2.2-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
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-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
9
|
+
- @equinor/fusion-framework-react-module-signalr@3.0.15-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
10
|
+
- @equinor/fusion-framework@7.2.7-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
11
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.9-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
12
|
+
- @equinor/fusion-framework-react-module-http@7.0.0-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
13
|
+
- @equinor/fusion-framework-react-module@3.1.6-alpha-17c4eed176e5b4a0fcf867ed245471d3863af237
|
|
14
|
+
|
|
15
|
+
## 7.2.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`f7c143d`](https://github.com/equinor/fusion-framework/commit/f7c143d44a88cc25c377d3ce8c3d1744114b891d)]:
|
|
20
|
+
- @equinor/fusion-observable@8.4.1
|
|
21
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.8
|
|
22
|
+
- @equinor/fusion-framework@7.2.6
|
|
23
|
+
- @equinor/fusion-framework-react-module-signalr@3.0.14
|
|
24
|
+
|
|
3
25
|
## 7.2.0
|
|
4
26
|
|
|
5
27
|
### Minor 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"}
|
package/dist/esm/version.js
CHANGED