@equinor/fusion-framework-react-app 5.2.12 → 5.3.1

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @equinor/fusion-framework-app@9.1.14
9
+ - @equinor/fusion-framework-react@7.3.3
10
+ - @equinor/fusion-framework-module-app@6.0.3
11
+
12
+ ## 5.3.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#2410](https://github.com/equinor/fusion-framework/pull/2410) [`9d1cb90`](https://github.com/equinor/fusion-framework/commit/9d1cb9003fa10e7ccaa95c20ef86f0a618034641) Thanks [@odinr](https://github.com/odinr)! - Updated bookmark namespace in `@equinor/fusion-react-app` to include new hooks and updated `useCurrentBookmark` hook.
17
+
18
+ - Updated `index.ts` to re-export everything from `@equinor/fusion-framework-react-module-bookmark` instead of individual exports.
19
+ - Marked `useBookmark` as deprecated in `useBookmark.ts`.
20
+ - Enhanced `useCurrentBookmark` in `useCurrentBookmark.ts` to accept a `BookmarkPayloadGenerator` and use the `BookmarkModule` from `useAppModule`.
21
+
22
+ **NOTE**: This change is backwards compatible and should not require any changes in consuming applications.
23
+ **NOTE**: `useBookmark` will be removed in the next major version. Please use providers and hooks from `@equinor/fusion-framework-react-module-bookmark` instead.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies []:
28
+ - @equinor/fusion-framework-app@9.1.13
29
+ - @equinor/fusion-framework-react@7.3.2
30
+
3
31
  ## 5.2.12
4
32
 
5
33
  ### Patch Changes
@@ -1,3 +1,4 @@
1
- export { default, useCurrentBookmark } from './useCurrentBookmark';
1
+ export { enableBookmark } from '@equinor/fusion-framework-react-module-bookmark';
2
+ export { useCurrentBookmark } from './useCurrentBookmark';
2
3
  export { useBookmark } from './useBookmark';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bookmark/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bookmark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { useBookmark as _useBookmark } from '@equinor/fusion-framework-react-module-bookmark';
2
2
  /**
3
+ * @deprecated Use useBookmark from @equinor/fusion-framework-react-module-bookmark
3
4
  * For application development the useCurrentBookmark should be sufficient enough
4
5
  *
5
6
  * Functionality provided here is:
@@ -15,6 +16,7 @@ import { useBookmark as _useBookmark } from '@equinor/fusion-framework-react-mod
15
16
  * @template TData - Current applications bookmark type
16
17
  * @return {*} {Bookmarks<TData>} the full api fro handling bookmarks
17
18
  */
19
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
20
  export const useBookmark = () => _useBookmark();
19
21
  export default useBookmark;
20
22
  //# sourceMappingURL=useBookmark.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useBookmark.js","sourceRoot":"","sources":["../../../src/bookmark/useBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE9F;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAU,EAAE,CAAC,YAAY,EAAS,CAAC;AAE9D,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"useBookmark.js","sourceRoot":"","sources":["../../../src/bookmark/useBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE9F;;;;;;;;;;;;;;;;GAgBG;AACH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAG,GAAU,EAAE,CAAC,YAAY,EAAE,CAAC;AAEvD,eAAe,WAAW,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { useCurrentBookmark as _useCurrentBookmark, } from '@equinor/fusion-framework-react-module-bookmark';
2
+ import { useFrameworkModule } from '@equinor/fusion-framework-react';
3
+ import useAppModules from '../useAppModules';
2
4
  /**
3
5
  * By providing a CreateBookMarkFn bookmarks is enabled for the current application.
4
6
  *
@@ -11,6 +13,16 @@ import { useCurrentBookmark as _useCurrentBookmark, } from '@equinor/fusion-fram
11
13
  * ```
12
14
  * @return {*} {CurrentBookmark<TData>}
13
15
  */
14
- export const useCurrentBookmark = (createBookmarkState) => _useCurrentBookmark(createBookmarkState);
16
+ export const useCurrentBookmark = (payloadGenerator) => {
17
+ const appBookmarkProvider = useAppModules().bookmark;
18
+ const frameworkBookmarkProvider = useFrameworkModule('bookmark');
19
+ if (!appBookmarkProvider) {
20
+ console.warn('@deprecation', 'application has not enabled bookmarks, this will not work in the future');
21
+ }
22
+ return _useCurrentBookmark({
23
+ provider: appBookmarkProvider !== null && appBookmarkProvider !== void 0 ? appBookmarkProvider : frameworkBookmarkProvider,
24
+ payloadGenerator,
25
+ });
26
+ };
15
27
  export default useCurrentBookmark;
16
28
  //# sourceMappingURL=useCurrentBookmark.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrentBookmark.js","sourceRoot":"","sources":["../../../src/bookmark/useCurrentBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,kBAAkB,IAAI,mBAAmB,GAC5C,MAAM,iDAAiD,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAQ,mBAA6C,EAAE,EAAE,CACvF,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AAE7C,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"useCurrentBookmark.js","sourceRoot":"","sources":["../../../src/bookmark/useCurrentBookmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,kBAAkB,IAAI,mBAAmB,GAC5C,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,gBAAkD,EACpD,EAAE;IACA,MAAM,mBAAmB,GAAG,aAAa,EAAoB,CAAC,QAAQ,CAAC;IACvE,MAAM,yBAAyB,GAAG,kBAAkB,CAAiB,UAAU,CAAC,CAAC;IACjF,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CACR,cAAc,EACd,yEAAyE,CAC5E,CAAC;IACN,CAAC;IACD,OAAO,mBAAmB,CAAQ;QAC9B,QAAQ,EAAE,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,yBAAyB;QAC1D,gBAAgB;KACnB,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '5.2.12';
2
+ export const version = '5.3.1';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}