@equinor/fusion-framework-module-bookmark 4.1.1 → 4.1.3

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.
Files changed (87) hide show
  1. package/dist/esm/BookmarkClient.js +1 -1
  2. package/dist/esm/BookmarkClient.js.map +1 -1
  3. package/dist/esm/BookmarkFlowError.js +1 -1
  4. package/dist/esm/BookmarkFlowError.js.map +1 -1
  5. package/dist/esm/BookmarkModuleConfigurator.js +2 -2
  6. package/dist/esm/BookmarkModuleConfigurator.js.map +1 -1
  7. package/dist/esm/BookmarkProvider.js +16 -11
  8. package/dist/esm/BookmarkProvider.js.map +1 -1
  9. package/dist/esm/__tests__/BookmarkProvider.test.js +34 -0
  10. package/dist/esm/__tests__/BookmarkProvider.test.js.map +1 -0
  11. package/dist/esm/bookmark-config.schema.js +1 -1
  12. package/dist/esm/bookmark-config.schema.js.map +1 -1
  13. package/dist/esm/bookmark-flows/bookmark-api-flows.js +9 -9
  14. package/dist/esm/bookmark-flows/bookmark-api-flows.js.map +1 -1
  15. package/dist/esm/bookmark-flows/handle-add-bookmark-as-favorite.js +2 -2
  16. package/dist/esm/bookmark-flows/handle-add-bookmark-as-favorite.js.map +1 -1
  17. package/dist/esm/bookmark-flows/handle-create-bookmark.js +2 -2
  18. package/dist/esm/bookmark-flows/handle-create-bookmark.js.map +1 -1
  19. package/dist/esm/bookmark-flows/handle-delete-bookmark.js +2 -2
  20. package/dist/esm/bookmark-flows/handle-delete-bookmark.js.map +1 -1
  21. package/dist/esm/bookmark-flows/handle-fetch-all-bookmark.js +2 -2
  22. package/dist/esm/bookmark-flows/handle-fetch-all-bookmark.js.map +1 -1
  23. package/dist/esm/bookmark-flows/handle-fetch-bookmark-data.js +2 -2
  24. package/dist/esm/bookmark-flows/handle-fetch-bookmark-data.js.map +1 -1
  25. package/dist/esm/bookmark-flows/handle-fetch-bookmark.js +2 -2
  26. package/dist/esm/bookmark-flows/handle-fetch-bookmark.js.map +1 -1
  27. package/dist/esm/bookmark-flows/handle-remove-bookmark-from-favorites.js +2 -2
  28. package/dist/esm/bookmark-flows/handle-remove-bookmark-from-favorites.js.map +1 -1
  29. package/dist/esm/bookmark-flows/handle-remove-bookmark.js +1 -1
  30. package/dist/esm/bookmark-flows/handle-remove-bookmark.js.map +1 -1
  31. package/dist/esm/bookmark-flows/handle-update-bookmark.js +2 -2
  32. package/dist/esm/bookmark-flows/handle-update-bookmark.js.map +1 -1
  33. package/dist/esm/bookmark-flows/index.js +10 -10
  34. package/dist/esm/bookmark-flows/index.js.map +1 -1
  35. package/dist/esm/bookmark-module.js +3 -3
  36. package/dist/esm/bookmark-module.js.map +1 -1
  37. package/dist/esm/create-bookmark-reducer.js +1 -1
  38. package/dist/esm/create-bookmark-reducer.js.map +1 -1
  39. package/dist/esm/create-bookmark-store.js +2 -2
  40. package/dist/esm/create-bookmark-store.js.map +1 -1
  41. package/dist/esm/enable-bookmark.js +1 -1
  42. package/dist/esm/enable-bookmark.js.map +1 -1
  43. package/dist/esm/index.js +6 -6
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/mock/BookmarkMockConfigurator.js +2 -2
  46. package/dist/esm/mock/BookmarkMockConfigurator.js.map +1 -1
  47. package/dist/esm/mock/index.js +3 -3
  48. package/dist/esm/mock/index.js.map +1 -1
  49. package/dist/esm/mock/module.js +2 -2
  50. package/dist/esm/mock/module.js.map +1 -1
  51. package/dist/esm/version.js +1 -1
  52. package/dist/tsconfig.tsbuildinfo +1 -1
  53. package/dist/types/BookmarkClient.d.ts +2 -2
  54. package/dist/types/BookmarkClient.interface.d.ts +1 -1
  55. package/dist/types/BookmarkFlowError.d.ts +2 -2
  56. package/dist/types/BookmarkModuleConfigurator.d.ts +2 -2
  57. package/dist/types/BookmarkProvider.d.ts +12 -9
  58. package/dist/types/BookmarkProvider.events.d.ts +3 -3
  59. package/dist/types/BookmarkProvider.interface.d.ts +4 -4
  60. package/dist/types/BookmarkProvider.selectors.d.ts +3 -3
  61. package/dist/types/__tests__/BookmarkProvider.test.d.ts +1 -0
  62. package/dist/types/bookmark-actions.d.ts +3 -3
  63. package/dist/types/bookmark-config.schema.d.ts +3 -3
  64. package/dist/types/bookmark-flows/bookmark-api-flows.d.ts +3 -3
  65. package/dist/types/bookmark-flows/handle-add-bookmark-as-favorite.d.ts +2 -2
  66. package/dist/types/bookmark-flows/handle-create-bookmark.d.ts +2 -2
  67. package/dist/types/bookmark-flows/handle-delete-bookmark.d.ts +2 -2
  68. package/dist/types/bookmark-flows/handle-fetch-all-bookmark.d.ts +2 -2
  69. package/dist/types/bookmark-flows/handle-fetch-bookmark-data.d.ts +2 -2
  70. package/dist/types/bookmark-flows/handle-fetch-bookmark.d.ts +2 -2
  71. package/dist/types/bookmark-flows/handle-remove-bookmark-from-favorites.d.ts +2 -2
  72. package/dist/types/bookmark-flows/handle-remove-bookmark.d.ts +2 -2
  73. package/dist/types/bookmark-flows/handle-update-bookmark.d.ts +2 -2
  74. package/dist/types/bookmark-flows/index.d.ts +10 -10
  75. package/dist/types/bookmark-module.d.ts +2 -2
  76. package/dist/types/bookmark.schemas.d.ts +1 -1
  77. package/dist/types/create-bookmark-reducer.d.ts +11 -11
  78. package/dist/types/create-bookmark-store.d.ts +4 -4
  79. package/dist/types/enable-bookmark.d.ts +1 -1
  80. package/dist/types/index.d.ts +8 -8
  81. package/dist/types/mock/BookmarkMockClient.d.ts +2 -2
  82. package/dist/types/mock/BookmarkMockConfigurator.d.ts +2 -2
  83. package/dist/types/mock/index.d.ts +3 -3
  84. package/dist/types/mock/module.d.ts +2 -2
  85. package/dist/types/types.d.ts +2 -2
  86. package/dist/types/version.d.ts +1 -1
  87. package/package.json +14 -19
@@ -4,8 +4,8 @@ import { type ObservableInput } from 'rxjs';
4
4
  * These types are used to interact with the Fusion Bookmarks API and represent the API response entities.
5
5
  */
6
6
  import { type BookmarksApiClient } from '@equinor/fusion-framework-module-services/bookmarks';
7
- import type { IBookmarkClient, BookmarksFilter, BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface';
8
- import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types';
7
+ import type { IBookmarkClient, BookmarksFilter, BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface.js';
8
+ import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types.js';
9
9
  /**
10
10
  * Represents a client for interacting with the Fusion Bookmarks API.
11
11
  * This class provides methods for retrieving, creating, updating, and deleting bookmarks, as well as managing favorites.
@@ -1,5 +1,5 @@
1
1
  import type { ObservableInput } from 'rxjs';
2
- import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types';
2
+ import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types.js';
3
3
  /**
4
4
  * Defines the shape of a filter for querying bookmarks.
5
5
  * @property {string} [appKey] - The app key to filter bookmarks by.
@@ -1,5 +1,5 @@
1
1
  import type { ActionWithSuffix } from '@equinor/fusion-observable';
2
- import type { BookmarkActions } from './bookmark-actions';
2
+ import type { BookmarkActions } from './bookmark-actions.js';
3
3
  /**
4
4
  * Error thrown inside bookmark store flows (side-effect pipelines) when an
5
5
  * API call or observable chain fails.
@@ -28,4 +28,4 @@ export declare class BookmarkFlowError extends Error {
28
28
  * Distinct from {@link BookmarkFlowError}, which is scoped to internal
29
29
  * store flow pipelines.
30
30
  */
31
- export { BookmarkProviderError } from './BookmarkProviderError';
31
+ export { BookmarkProviderError } from './BookmarkProviderError.js';
@@ -1,7 +1,7 @@
1
1
  import { BaseConfigBuilder, type ConfigBuilderCallback, type ModulesInstanceType } from '@equinor/fusion-framework-module';
2
2
  import type { ILogger, LogLevel } from '@equinor/fusion-log';
3
- import type { BookmarkModule } from './bookmark-module';
4
- import type { BookmarkModuleConfig } from './types';
3
+ import type { BookmarkModule } from './bookmark-module.js';
4
+ import type { BookmarkModuleConfig } from './types.js';
5
5
  /**
6
6
  * Configurator for the bookmark module.
7
7
  *
@@ -1,13 +1,13 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { type FrameworkEventInitType } from '@equinor/fusion-framework-module-event';
3
3
  import { SemanticVersion } from '@equinor/fusion-framework-module';
4
- import type { Bookmark, BookmarkData, BookmarkWithoutData, Bookmarks, BookmarkModuleConfig } from './types';
5
- import type { BookmarkUpdate, IBookmarkClient } from './BookmarkClient.interface';
6
- import { type BookmarkActions } from './bookmark-actions';
7
- import { type BookmarkState } from './create-bookmark-store';
8
- import { type BookmarkFlowError } from './BookmarkFlowError';
9
- import type { BookmarkProviderEventMap } from './BookmarkProvider.events';
10
- import type { BookmarkCreateArgs, BookmarkPayloadGenerator, BookmarkUpdateOptions, IBookmarkProvider } from './BookmarkProvider.interface';
4
+ import type { Bookmark, BookmarkData, BookmarkWithoutData, Bookmarks, BookmarkModuleConfig } from './types.js';
5
+ import type { BookmarkUpdate, IBookmarkClient } from './BookmarkClient.interface.js';
6
+ import { type BookmarkActions } from './bookmark-actions.js';
7
+ import { type BookmarkState } from './create-bookmark-store.js';
8
+ import { type BookmarkFlowError } from './BookmarkFlowError.js';
9
+ import type { BookmarkProviderEventMap } from './BookmarkProvider.events.js';
10
+ import type { BookmarkCreateArgs, BookmarkPayloadGenerator, BookmarkUpdateOptions, IBookmarkProvider } from './BookmarkProvider.interface.js';
11
11
  /**
12
12
  * The `BookmarkProvider` class is responsible for managing bookmarks in the application.
13
13
  * It provides methods for creating, updating, and removing bookmarks, as well as managing the current bookmark and the list of bookmarks.
@@ -64,8 +64,11 @@ export declare class BookmarkProvider implements IBookmarkProvider {
64
64
  * @returns The semantic version of the bookmark provider.
65
65
  */
66
66
  get version(): SemanticVersion;
67
- /** @returns The configured bookmark filters. */
68
- get filters(): BookmarkModuleConfig['filters'];
67
+ /**
68
+ * Gets the immutable bookmark filters captured when the provider was created.
69
+ * @returns The configured bookmark filters, or `undefined` when filtering is not configured.
70
+ */
71
+ get filters(): Readonly<NonNullable<BookmarkModuleConfig['filters']>> | undefined;
69
72
  /**
70
73
  * Gets the `IBookmarkClient` instance used by this `BookmarkProvider`.
71
74
  * @returns The `IBookmarkClient` instance.
@@ -1,7 +1,7 @@
1
1
  import type { FrameworkEventInit, IFrameworkEvent } from '@equinor/fusion-framework-module-event';
2
- import type { Bookmark } from './types';
3
- import type { BookmarkPayloadGenerator, IBookmarkProvider } from './BookmarkProvider.interface';
4
- import type { BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface';
2
+ import type { Bookmark } from './types.js';
3
+ import type { BookmarkPayloadGenerator, IBookmarkProvider } from './BookmarkProvider.interface.js';
4
+ import type { BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface.js';
5
5
  export interface BookmarkProviderEventMap {
6
6
  /**
7
7
  * An event that is emitted before current bookmark is changed.
@@ -1,8 +1,8 @@
1
1
  import type { Observable, ObservableInput } from 'rxjs';
2
- import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types';
3
- import type { BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface';
4
- import type { BookmarkProviderEventMap } from './BookmarkProvider.events';
5
- import type { BookmarkState } from './create-bookmark-store';
2
+ import type { Bookmark, BookmarkData, BookmarkWithoutData } from './types.js';
3
+ import type { BookmarkNew, BookmarkUpdate } from './BookmarkClient.interface.js';
4
+ import type { BookmarkProviderEventMap } from './BookmarkProvider.events.js';
5
+ import type { BookmarkState } from './create-bookmark-store.js';
6
6
  /**
7
7
  * Arguments for creating a bookmark via {@link IBookmarkProvider.createBookmark}.
8
8
  *
@@ -1,6 +1,6 @@
1
- import type { BookmarkFlowError } from './BookmarkFlowError';
2
- import type { BookmarkState } from './create-bookmark-store';
3
- import type { Bookmark, BookmarkData } from './types';
1
+ import type { BookmarkFlowError } from './BookmarkFlowError.js';
2
+ import type { BookmarkState } from './create-bookmark-store.js';
3
+ import type { Bookmark, BookmarkData } from './types.js';
4
4
  /**
5
5
  * Selects all bookmarks from the store state as an array.
6
6
  *
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { type Action, type ActionTypes } from '@equinor/fusion-observable';
2
- import type { Bookmark, BookmarkData, BookmarkWithoutData, Bookmarks } from './types';
3
- import type { BookmarkNew, BookmarkUpdate, BookmarksFilter } from './BookmarkClient.interface';
4
- import type { BookmarkFlowError } from './BookmarkFlowError';
2
+ import type { Bookmark, BookmarkData, BookmarkWithoutData, Bookmarks } from './types.js';
3
+ import type { BookmarkNew, BookmarkUpdate, BookmarksFilter } from './BookmarkClient.interface.js';
4
+ import type { BookmarkFlowError } from './BookmarkFlowError.js';
5
5
  /**
6
6
  * Represents the metadata associated with a bookmark action.
7
7
  */
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { LogLevel, type ILogger } from '@equinor/fusion-log';
3
3
  import type { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
4
- import type { IBookmarkProvider } from './BookmarkProvider.interface';
5
- import type { IBookmarkClient } from './BookmarkClient.interface';
6
- import type { BookmarkModuleConfig } from './types';
4
+ import type { IBookmarkProvider } from './BookmarkProvider.interface.js';
5
+ import type { IBookmarkClient } from './BookmarkClient.interface.js';
6
+ import type { BookmarkModuleConfig } from './types.js';
7
7
  /**
8
8
  * Zod schema that validates the full {@link BookmarkModuleConfig} object.
9
9
  *
@@ -1,7 +1,7 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import type { BookmarkActions } from '../bookmark-actions';
3
- import type { BookmarkState } from '../create-bookmark-store';
4
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import type { BookmarkActions } from '../bookmark-actions.js';
3
+ import type { BookmarkState } from '../create-bookmark-store.js';
4
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
5
5
  /**
6
6
  * Defines a set of flows that handle various bookmark-related actions, such as fetching, creating, updating, and deleting bookmarks.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Handles the flow of adding a bookmark as a favorite.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a Flow for handling creating bookmarks.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a flow for handling deleting bookmarks.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a Flow for handling fetching users bookmarks.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a flow for handling fetching bookmark data.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Handles the fetch bookmark action by making an API request to get the bookmark by its ID.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a Flow for handling removing a bookmark from favorites.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import { type Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a flow for handling bookmark removal.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  import type { Flow } from '@equinor/fusion-observable';
2
- import { type BookmarkActions } from '../bookmark-actions';
3
- import type { IBookmarkClient } from '../BookmarkClient.interface';
2
+ import { type BookmarkActions } from '../bookmark-actions.js';
3
+ import type { IBookmarkClient } from '../BookmarkClient.interface.js';
4
4
  /**
5
5
  * Creates a Flow for handling updating bookmarks.
6
6
  *
@@ -1,10 +1,10 @@
1
- export { handleFetchBookmark } from './handle-fetch-bookmark';
2
- export { handleFetchBookmarkData } from './handle-fetch-bookmark-data';
3
- export { handleFetchAllBookmark } from './handle-fetch-all-bookmark';
4
- export { handleCreateBookmark } from './handle-create-bookmark';
5
- export { handleUpdateBookmark } from './handle-update-bookmark';
6
- export { handleDeleteBookmark } from './handle-delete-bookmark';
7
- export { handleRemoveBookmark } from './handle-remove-bookmark';
8
- export { handleRemoveBookmarkFromFavorites } from './handle-remove-bookmark-from-favorites';
9
- export { handleAddBookmarkAsFavorite } from './handle-add-bookmark-as-favorite';
10
- export { bookmarkApiFlows } from './bookmark-api-flows';
1
+ export { handleFetchBookmark } from './handle-fetch-bookmark.js';
2
+ export { handleFetchBookmarkData } from './handle-fetch-bookmark-data.js';
3
+ export { handleFetchAllBookmark } from './handle-fetch-all-bookmark.js';
4
+ export { handleCreateBookmark } from './handle-create-bookmark.js';
5
+ export { handleUpdateBookmark } from './handle-update-bookmark.js';
6
+ export { handleDeleteBookmark } from './handle-delete-bookmark.js';
7
+ export { handleRemoveBookmark } from './handle-remove-bookmark.js';
8
+ export { handleRemoveBookmarkFromFavorites } from './handle-remove-bookmark-from-favorites.js';
9
+ export { handleAddBookmarkAsFavorite } from './handle-add-bookmark-as-favorite.js';
10
+ export { bookmarkApiFlows } from './bookmark-api-flows.js';
@@ -3,8 +3,8 @@ import type { EventModule } from '@equinor/fusion-framework-module-event';
3
3
  import type { ServicesModule } from '@equinor/fusion-framework-module-services';
4
4
  import type { AppModule } from '@equinor/fusion-framework-module-app';
5
5
  import type { ContextModule } from '@equinor/fusion-framework-module-context';
6
- import { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator';
7
- import type { IBookmarkProvider } from './BookmarkProvider.interface';
6
+ import { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator.js';
7
+ import type { IBookmarkProvider } from './BookmarkProvider.interface.js';
8
8
  /** String literal key used to register the bookmark module in the framework. */
9
9
  export type BookmarkModuleKey = 'bookmark';
10
10
  /** The module key constant used to identify the bookmark module at runtime. */
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod';
2
- import type { Bookmark, BookmarkData } from './types';
2
+ import type { Bookmark, BookmarkData } from './types.js';
3
3
  /** Zod schema for validating {@link BookmarkUser} objects. */
4
4
  export declare const bookmarkUserSchema: z.ZodObject<{
5
5
  id: z.ZodString;
@@ -1,6 +1,6 @@
1
- import type { BookmarkState } from './create-bookmark-store';
2
- import type { BookmarkFlowError } from './BookmarkFlowError';
3
- import type { BookmarkWithoutData } from './types';
1
+ import type { BookmarkState } from './create-bookmark-store.js';
2
+ import type { BookmarkFlowError } from './BookmarkFlowError.js';
3
+ import type { BookmarkWithoutData } from './types.js';
4
4
  /**
5
5
  * Creates a reducer for managing the state of bookmarks.
6
6
  *
@@ -16,7 +16,7 @@ export declare const createBookmarkReducer: (initialState?: Partial<BookmarkStat
16
16
  payload: BookmarkWithoutData;
17
17
  type: "set_bookmark";
18
18
  } | {
19
- payload: import("./types").Bookmark<any> | null;
19
+ payload: import("./types.js").Bookmark<any> | null;
20
20
  type: "set_current_bookmark";
21
21
  } | import("@equinor/fusion-observable").PayloadAction<string, "add_favourite_bookmark::request", {
22
22
  ref: string;
@@ -36,9 +36,9 @@ export declare const createBookmarkReducer: (initialState?: Partial<BookmarkStat
36
36
  ref: string;
37
37
  }, never> | import("@equinor/fusion-observable").PayloadAction<string, "remove_favourite_bookmark::success", {
38
38
  ref: string;
39
- }, never> | import("@equinor/fusion-observable").PayloadAction<import("./types").Bookmark<any>, "create_bookmark::success", {
39
+ }, never> | import("@equinor/fusion-observable").PayloadAction<import("./types.js").Bookmark<any>, "create_bookmark::success", {
40
40
  ref: string;
41
- }, never> | import("@equinor/fusion-observable").PayloadAction<import("./types").Bookmark<any>, "set_bookmark::success", {
41
+ }, never> | import("@equinor/fusion-observable").PayloadAction<import("./types.js").Bookmark<any>, "set_bookmark::success", {
42
42
  ref: string;
43
43
  }, never> | import("@equinor/fusion-observable").PayloadAction<BookmarkFlowError, "add_favourite_bookmark::failure", {
44
44
  ref: string;
@@ -58,20 +58,20 @@ export declare const createBookmarkReducer: (initialState?: Partial<BookmarkStat
58
58
  ref: string;
59
59
  }, never> | import("@equinor/fusion-observable").PayloadAction<BookmarkFlowError, "set_bookmark::failure", {
60
60
  ref: string;
61
- }, never> | import("@equinor/fusion-observable").PayloadAction<import("./BookmarkClient.interface").BookmarkNew, "create_bookmark::request", {
61
+ }, never> | import("@equinor/fusion-observable").PayloadAction<import("./BookmarkClient.interface.js").BookmarkNew, "create_bookmark::request", {
62
62
  ref: string;
63
63
  }, never> | import("@equinor/fusion-observable").PayloadAction<BookmarkWithoutData, "fetch_bookmark::success", {
64
64
  ref: string;
65
- } | undefined, never> | import("@equinor/fusion-observable").PayloadAction<import("./types").Bookmarks, "fetch_bookmarks::success", {
65
+ } | undefined, never> | import("@equinor/fusion-observable").PayloadAction<import("./types.js").Bookmarks, "fetch_bookmarks::success", {
66
66
  ref: string;
67
67
  } | undefined, never> | import("@equinor/fusion-observable").PayloadAction<{
68
68
  bookmarkId: string;
69
- data: import("./types").BookmarkData;
69
+ data: import("./types.js").BookmarkData;
70
70
  }, "fetch_bookmark_payload::success", {
71
71
  ref: string;
72
72
  } | undefined, never> | import("@equinor/fusion-observable").PayloadAction<{
73
73
  bookmarkId: string;
74
- updates: import("./BookmarkClient.interface").BookmarkUpdate;
74
+ updates: import("./BookmarkClient.interface.js").BookmarkUpdate;
75
75
  }, "set_bookmark::request", {
76
76
  ref: string;
77
77
  }, never> | import("@equinor/fusion-observable").PayloadAction<{
@@ -79,6 +79,6 @@ export declare const createBookmarkReducer: (initialState?: Partial<BookmarkStat
79
79
  bookmarkId: string;
80
80
  }, "remove_bookmark::success", {
81
81
  ref: string;
82
- }, never> | import("@equinor/fusion-observable").PayloadAction<import("./BookmarkClient.interface").BookmarksFilter | undefined, "fetch_bookmarks::request", {
82
+ }, never> | import("@equinor/fusion-observable").PayloadAction<import("./BookmarkClient.interface.js").BookmarksFilter | undefined, "fetch_bookmarks::request", {
83
83
  ref: string;
84
84
  } | undefined, never>>;
@@ -1,8 +1,8 @@
1
1
  import { FlowSubject, type ActionBaseType } from '@equinor/fusion-observable';
2
- import type { BookmarkActions } from './bookmark-actions';
3
- import type { BookmarkFlowError } from './BookmarkFlowError';
4
- import type { IBookmarkClient } from './BookmarkClient.interface';
5
- import type { Bookmark, BookmarkWithoutData } from './types';
2
+ import type { BookmarkActions } from './bookmark-actions.js';
3
+ import type { BookmarkFlowError } from './BookmarkFlowError.js';
4
+ import type { IBookmarkClient } from './BookmarkClient.interface.js';
5
+ import type { Bookmark, BookmarkWithoutData } from './types.js';
6
6
  /**
7
7
  * Internal state shape managed by the bookmark store.
8
8
  *
@@ -1,5 +1,5 @@
1
1
  import type { IModulesConfigurator } from '@equinor/fusion-framework-module';
2
- import type { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator';
2
+ import type { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator.js';
3
3
  /**
4
4
  * Enables the bookmark module on a Fusion Framework module configurator.
5
5
  *
@@ -9,12 +9,12 @@
9
9
  *
10
10
  * @packageDocumentation
11
11
  */
12
- export { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator';
13
- export type { IBookmarkClient, BookmarkNew, BookmarkUpdate, BookmarksFilter, } from './BookmarkClient.interface';
14
- export { default, BookmarkModule, module as bookmarkModule, moduleKey as bookmarkModuleKey, } from './bookmark-module';
15
- export { BookmarkProvider } from './BookmarkProvider';
16
- export type { BookmarkCreateArgs, BookmarkUpdateOptions, IBookmarkProvider, BookmarkPayloadGenerator, } from './BookmarkProvider.interface';
12
+ export { BookmarkModuleConfigurator } from './BookmarkModuleConfigurator.js';
13
+ export type { IBookmarkClient, BookmarkNew, BookmarkUpdate, BookmarksFilter, } from './BookmarkClient.interface.js';
14
+ export { default, BookmarkModule, module as bookmarkModule, moduleKey as bookmarkModuleKey, } from './bookmark-module.js';
15
+ export { BookmarkProvider } from './BookmarkProvider.js';
16
+ export type { BookmarkCreateArgs, BookmarkUpdateOptions, IBookmarkProvider, BookmarkPayloadGenerator, } from './BookmarkProvider.interface.js';
17
17
  export type { BookmarkProviderEventMap as BookmarkProviderEvents } from './BookmarkProvider.events.js';
18
- export { enableBookmark } from './enable-bookmark';
19
- export * from './types';
20
- export { bookmarkWithDataSchema } from './bookmark.schemas';
18
+ export { enableBookmark } from './enable-bookmark.js';
19
+ export * from './types.js';
20
+ export { bookmarkWithDataSchema } from './bookmark.schemas.js';
@@ -1,6 +1,6 @@
1
1
  import { type ObservableInput } from 'rxjs';
2
- import type { BookmarkNew, BookmarksFilter, BookmarkUpdate, IBookmarkClient } from '../BookmarkClient.interface';
3
- import type { Bookmark, BookmarkData, BookmarkWithoutData } from '../types';
2
+ import type { BookmarkNew, BookmarksFilter, BookmarkUpdate, IBookmarkClient } from '../BookmarkClient.interface.js';
3
+ import type { Bookmark, BookmarkData, BookmarkWithoutData } from '../types.js';
4
4
  /**
5
5
  * In-memory {@link IBookmarkClient} backed by a `Map` of seeded bookmarks and a
6
6
  * `Set` of favorite ids.
@@ -1,6 +1,6 @@
1
1
  import type { ConfigBuilderCallbackArgs } from '@equinor/fusion-framework-module';
2
- import { BookmarkModuleConfigurator } from '../BookmarkModuleConfigurator';
3
- import type { Bookmark, BookmarkModuleConfig } from '../types';
2
+ import { BookmarkModuleConfigurator } from '../BookmarkModuleConfigurator.js';
3
+ import type { Bookmark, BookmarkModuleConfig } from '../types.js';
4
4
  /**
5
5
  * The real bookmark configurator, backed by an in-memory {@link BookmarkMockClient}.
6
6
  *
@@ -20,6 +20,6 @@
20
20
  *
21
21
  * @packageDocumentation
22
22
  */
23
- export { BookmarkMockClient } from './BookmarkMockClient';
24
- export { BookmarkMockConfigurator } from './BookmarkMockConfigurator';
25
- export { enableBookmarkMock, bookmarkMockModule, type BookmarkMockConfigFn } from './module';
23
+ export { BookmarkMockClient } from './BookmarkMockClient.js';
24
+ export { BookmarkMockConfigurator } from './BookmarkMockConfigurator.js';
25
+ export { enableBookmarkMock, bookmarkMockModule, type BookmarkMockConfigFn } from './module.js';
@@ -1,6 +1,6 @@
1
1
  import type { AnyModule, IModulesConfigurator } from '@equinor/fusion-framework-module';
2
- import { type BookmarkModule } from '../bookmark-module';
3
- import { BookmarkMockConfigurator } from './BookmarkMockConfigurator';
2
+ import { type BookmarkModule } from '../bookmark-module.js';
3
+ import { BookmarkMockConfigurator } from './BookmarkMockConfigurator.js';
4
4
  /**
5
5
  * The bookmark module with a mock, in-memory client instead of a live
6
6
  * `@equinor/fusion-framework-module-services` connection.
@@ -1,7 +1,7 @@
1
1
  import type { ILogger, LogLevel } from '@equinor/fusion-log';
2
2
  import type { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
3
- import type { IBookmarkProvider } from './BookmarkProvider.interface';
4
- import type { IBookmarkClient } from './BookmarkClient.interface';
3
+ import type { IBookmarkProvider } from './BookmarkProvider.interface.js';
4
+ import type { IBookmarkClient } from './BookmarkClient.interface.js';
5
5
  /**
6
6
  * Represents the source system for a bookmark.
7
7
  */
@@ -1 +1 @@
1
- export declare const version = "4.1.1";
1
+ export declare const version = "4.1.3";
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-module-bookmark",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "",
5
+ "type": "module",
5
6
  "main": "./dist/esm/index.js",
6
7
  "types": "./dist/types/index.d.ts",
7
8
  "exports": {
@@ -10,10 +11,6 @@
10
11
  "types": "./dist/types/index.d.ts"
11
12
  },
12
13
  "./package.json": "./package.json",
13
- "./utils": {
14
- "import": "./dist/esm/utils/index.js",
15
- "types": "./dist/types/utils/index.d.ts"
16
- },
17
14
  "./mock": {
18
15
  "import": "./dist/esm/mock/index.js",
19
16
  "types": "./dist/types/mock/index.d.ts"
@@ -24,9 +21,6 @@
24
21
  ".": [
25
22
  "dist/types/index.d.ts"
26
23
  ],
27
- "utils": [
28
- "dist/types/utils/index.d.ts"
29
- ],
30
24
  "mock": [
31
25
  "dist/types/mock/index.d.ts"
32
26
  ]
@@ -47,26 +41,27 @@
47
41
  "directory": "packages/modules/context"
48
42
  },
49
43
  "dependencies": {
44
+ "@equinor/fusion-framework-module": "^6.1.5",
45
+ "@equinor/fusion-log": "^2.0.6",
46
+ "@equinor/fusion-observable": "^9.2.4",
47
+ "@equinor/fusion-query": "^7.0.6",
50
48
  "fast-deep-equal": "^3.1.3",
51
49
  "immer": "^11.0.0",
52
50
  "rxjs": "^7.8.1",
53
- "uuid": "^14.0.0",
54
- "@equinor/fusion-framework-module": "^6.1.4",
55
- "@equinor/fusion-observable": "^9.2.2",
56
- "@equinor/fusion-query": "^7.0.5",
57
- "@equinor/fusion-log": "^2.0.4"
51
+ "uuid": "^14.0.0"
58
52
  },
59
53
  "devDependencies": {
54
+ "@equinor/fusion-framework-module-app": "^8.2.1",
55
+ "@equinor/fusion-framework-module-context": "^9.0.2",
56
+ "@equinor/fusion-framework-module-event": "^6.1.2",
57
+ "@equinor/fusion-framework-module-http": "^8.1.3",
58
+ "@equinor/fusion-framework-module-services": "^8.1.3",
60
59
  "typescript": "^7.0.2",
61
60
  "vitest": "^4.1.10",
62
- "zod": "^4.4.3",
63
- "@equinor/fusion-framework-module-app": "^8.1.1",
64
- "@equinor/fusion-framework-module-context": "^9.0.1",
65
- "@equinor/fusion-framework-module-event": "^6.1.1",
66
- "@equinor/fusion-framework-module-http": "^8.1.1",
67
- "@equinor/fusion-framework-module-services": "^8.1.2"
61
+ "zod": "^4.4.3"
68
62
  },
69
63
  "scripts": {
64
+ "prebuild": "node ../../../.github/scripts/generate-versions.mjs",
70
65
  "build": "tsc -b",
71
66
  "test": "vitest run"
72
67
  }