@equinor/fusion-framework-module-bookmark 1.0.17 → 1.1.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 +60 -46
- package/dist/esm/bookmark-config-builder.js.map +1 -1
- package/dist/esm/bookmark-provider.js.map +1 -1
- package/dist/esm/client/bookmarkClient.js +2 -1
- package/dist/esm/client/bookmarkClient.js.map +1 -1
- package/dist/esm/client/bookmarkFlows.js +1 -1
- package/dist/esm/client/bookmarkFlows.js.map +1 -1
- package/dist/esm/configurator.js +0 -3
- package/dist/esm/configurator.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client/bookmarkClient.d.ts +1 -1
- package/dist/types/client/bookmarkFlows.d.ts +1 -1
- package/dist/types/configurator.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +6 -6
- package/src/client/bookmarkClient.ts +3 -3
- package/src/client/bookmarkFlows.ts +2 -2
- package/src/configurator.ts +1 -5
- package/src/types.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -14,7 +14,7 @@ export type BookmarkClientConfig = {
|
|
|
14
14
|
export declare class BookmarkClient {
|
|
15
15
|
#private;
|
|
16
16
|
appRoute?(appKey: string): string;
|
|
17
|
-
constructor(config: BookmarkClientConfig, sourceSystem
|
|
17
|
+
constructor(config: BookmarkClientConfig, sourceSystem?: SourceSystem, event?: IEventModuleProvider);
|
|
18
18
|
get currentBookmark$(): Observable<Bookmark | undefined>;
|
|
19
19
|
get bookmarks$(): Observable<Bookmark[]>;
|
|
20
20
|
setCurrentBookmark<T>(idOrItem?: string | Bookmark<T>): Promise<void>;
|
|
@@ -4,7 +4,7 @@ import { Observable } from '@equinor/fusion-observable';
|
|
|
4
4
|
import { Query } from '@equinor/fusion-query';
|
|
5
5
|
import { GetAllBookmarksParameters, Bookmark } from '../types';
|
|
6
6
|
import { Actions } from './bookmarkActions';
|
|
7
|
-
export declare const handleBookmarkGetAll: (queryAllBookmarks: Query<Array<Bookmark<unknown>>, GetAllBookmarksParameters>, sourceSystemIdentifier
|
|
7
|
+
export declare const handleBookmarkGetAll: (queryAllBookmarks: Query<Array<Bookmark<unknown>>, GetAllBookmarksParameters>, sourceSystemIdentifier?: string) => (action$: Observable<Actions>) => Observable<{
|
|
8
8
|
payload: Bookmark<unknown>[];
|
|
9
9
|
type: "getAll::success";
|
|
10
10
|
}>;
|
|
@@ -8,7 +8,7 @@ import type { EventModule, IEventModuleProvider } from '@equinor/fusion-framewor
|
|
|
8
8
|
import type { IBookmarkModuleProvider } from './bookmark-provider';
|
|
9
9
|
import type { BookmarkClientConfig } from './client/bookmarkClient';
|
|
10
10
|
export interface BookmarkModuleConfig {
|
|
11
|
-
sourceSystem
|
|
11
|
+
sourceSystem?: SourceSystem;
|
|
12
12
|
clientConfiguration: BookmarkClientConfig;
|
|
13
13
|
getContextId: () => string | undefined;
|
|
14
14
|
getCurrentAppIdentification?(): string | undefined;
|
package/dist/types/types.d.ts
CHANGED
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.1.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-module-bookmark",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"rxjs": "^7.8.1",
|
|
38
38
|
"@equinor/fusion-framework-module": "^4.2.6",
|
|
39
|
-
"@equinor/fusion-observable": "^8.1.
|
|
40
|
-
"@equinor/fusion-query": "^4.0.
|
|
39
|
+
"@equinor/fusion-observable": "^8.1.5",
|
|
40
|
+
"@equinor/fusion-query": "^4.0.6"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"typescript": "^5.1.3",
|
|
44
|
-
"@equinor/fusion-framework-module-app": "^5.2.
|
|
45
|
-
"@equinor/fusion-framework-module-context": "^4.0.
|
|
44
|
+
"@equinor/fusion-framework-module-app": "^5.2.13",
|
|
45
|
+
"@equinor/fusion-framework-module-context": "^4.0.20",
|
|
46
46
|
"@equinor/fusion-framework-module-event": "^4.0.7",
|
|
47
|
-
"@equinor/fusion-framework-module-http": "^5.1.
|
|
47
|
+
"@equinor/fusion-framework-module-http": "^5.1.5",
|
|
48
48
|
"@equinor/fusion-framework-module-services": "^3.2.3"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
@@ -43,7 +43,7 @@ export class BookmarkClient {
|
|
|
43
43
|
|
|
44
44
|
#currentBookmark$: BehaviorSubject<Bookmark<unknown> | undefined>;
|
|
45
45
|
|
|
46
|
-
#sourceSystem
|
|
46
|
+
#sourceSystem?: SourceSystem;
|
|
47
47
|
#event?: IEventModuleProvider;
|
|
48
48
|
|
|
49
49
|
#state: FlowState<State, ActionBuilder>;
|
|
@@ -53,7 +53,7 @@ export class BookmarkClient {
|
|
|
53
53
|
|
|
54
54
|
constructor(
|
|
55
55
|
config: BookmarkClientConfig,
|
|
56
|
-
sourceSystem
|
|
56
|
+
sourceSystem?: SourceSystem,
|
|
57
57
|
event?: IEventModuleProvider,
|
|
58
58
|
) {
|
|
59
59
|
this.#currentBookmark$ = new BehaviorSubject<Bookmark<unknown> | undefined>(undefined);
|
|
@@ -293,7 +293,7 @@ export class BookmarkClient {
|
|
|
293
293
|
#addSubjectFlows() {
|
|
294
294
|
this.#subscriptions.add(
|
|
295
295
|
this.#state.subject.addFlow(
|
|
296
|
-
handleBookmarkGetAll(this.#queryAllBookmarks, this.#sourceSystem
|
|
296
|
+
handleBookmarkGetAll(this.#queryAllBookmarks, this.#sourceSystem?.identifier),
|
|
297
297
|
),
|
|
298
298
|
);
|
|
299
299
|
this.#subscriptions.add(
|
|
@@ -10,7 +10,7 @@ import { actions, Actions } from './bookmarkActions';
|
|
|
10
10
|
export const handleBookmarkGetAll =
|
|
11
11
|
(
|
|
12
12
|
queryAllBookmarks: Query<Array<Bookmark<unknown>>, GetAllBookmarksParameters>,
|
|
13
|
-
sourceSystemIdentifier
|
|
13
|
+
sourceSystemIdentifier?: string,
|
|
14
14
|
) =>
|
|
15
15
|
(action$: Observable<Actions>) =>
|
|
16
16
|
action$.pipe(
|
|
@@ -22,7 +22,7 @@ export const handleBookmarkGetAll =
|
|
|
22
22
|
actions.getAll.success(
|
|
23
23
|
bookmarks.value.filter(
|
|
24
24
|
(bookmark) =>
|
|
25
|
-
bookmark.sourceSystem
|
|
25
|
+
bookmark.sourceSystem?.identifier === sourceSystemIdentifier,
|
|
26
26
|
),
|
|
27
27
|
),
|
|
28
28
|
),
|
package/src/configurator.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface BookmarkModuleConfig {
|
|
|
16
16
|
* SourceSystem used when creating a new bookmark,
|
|
17
17
|
* used as the identifier for the current client. Only used in app shell / portal configuration.
|
|
18
18
|
*/
|
|
19
|
-
sourceSystem
|
|
19
|
+
sourceSystem?: SourceSystem;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* The clintConfiguration consist of both Api client configuration and query client configuration
|
|
@@ -121,10 +121,6 @@ export class BookmarkModuleConfigurator implements IBookmarkModuleConfigurator {
|
|
|
121
121
|
config.clientConfiguration,
|
|
122
122
|
);
|
|
123
123
|
|
|
124
|
-
if (!config.sourceSystem) {
|
|
125
|
-
throw Error('missing sourceSystem configuration');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
124
|
return config as BookmarkModuleConfig;
|
|
129
125
|
}
|
|
130
126
|
|
package/src/types.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '1.
|
|
2
|
+
export const version = '1.1.1';
|