@equinor/fusion-framework-module-context
Advanced tools
Comparing version 4.0.7 to 4.0.8
# Change Log | ||
## 4.0.8 | ||
### Patch Changes | ||
- [#898](https://github.com/equinor/fusion-framework/pull/898) [`4551142e`](https://github.com/equinor/fusion-framework/commit/4551142ededdb2f1bf74eae552da26d28cd23057) Thanks [@odinr](https://github.com/odinr)! - feat(module-context): add config option for connection to parent context | ||
- add attribute to config interface | ||
- add setter on config builder | ||
- add check for connecting to parent when creating provider | ||
All notable changes to this project will be documented in this file. | ||
@@ -4,0 +14,0 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. |
@@ -28,2 +28,5 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
} | ||
connectParentContext(connect) { | ||
this.config.connectParentContext = connect; | ||
} | ||
setContextParameterFn(fn) { | ||
@@ -30,0 +33,0 @@ this.config.contextParameterFn = fn; |
@@ -42,3 +42,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
complete: () => { | ||
provider.connectParentContext(parentProvider); | ||
if (config.connectParentContext !== false && parentProvider) { | ||
provider.connectParentContext(parentProvider); | ||
} | ||
subscriber.complete(); | ||
@@ -45,0 +47,0 @@ }, |
@@ -18,2 +18,3 @@ import { ObservableInput } from 'rxjs'; | ||
contextFilter?: ContextFilterFn; | ||
connectParentContext?: boolean; | ||
skipInitialContext?: boolean; | ||
@@ -20,0 +21,0 @@ contextParameterFn?: (args: { |
@@ -15,2 +15,3 @@ import type { AnyModule, ModuleInitializerArgs, Modules, ModuleType } from '@equinor/fusion-framework-module'; | ||
setContextFilter(filter: ContextModuleConfig['contextFilter']): void; | ||
connectParentContext(connect: ContextModuleConfig['connectParentContext']): void; | ||
setContextParameterFn(fn: ContextModuleConfig['contextParameterFn']): void; | ||
@@ -17,0 +18,0 @@ setValidateContext(fn: ContextModuleConfig['validateContext']): void; |
{ | ||
"name": "@equinor/fusion-framework-module-context", | ||
"version": "4.0.7", | ||
"version": "4.0.8", | ||
"description": "", | ||
@@ -51,4 +51,3 @@ "main": "./dist/esm/index.js", | ||
"rxjs": "^7.5.7" | ||
}, | ||
"gitHead": "753d04a18764d5a16d9491ec189df90089534879" | ||
} | ||
} |
@@ -33,2 +33,9 @@ import { ObservableInput } from 'rxjs'; | ||
/** | ||
* connect context module to paren context module. | ||
* | ||
* _default: `true`_ | ||
*/ | ||
connectParentContext?: boolean; | ||
/** set initial context from parent, will await resolve */ | ||
@@ -35,0 +42,0 @@ skipInitialContext?: boolean; |
@@ -56,2 +56,6 @@ import type { | ||
connectParentContext(connect: ContextModuleConfig['connectParentContext']) { | ||
this.config.connectParentContext = connect; | ||
} | ||
setContextParameterFn(fn: ContextModuleConfig['contextParameterFn']) { | ||
@@ -58,0 +62,0 @@ this.config.contextParameterFn = fn; |
@@ -70,4 +70,5 @@ import { catchError, EMPTY, from, Observable, switchMap, filter, Subscription } from 'rxjs'; | ||
complete: () => { | ||
// TODO - do we need to check first? | ||
provider.connectParentContext(parentProvider); | ||
if (config.connectParentContext !== false && parentProvider) { | ||
provider.connectParentContext(parentProvider); | ||
} | ||
subscriber.complete(); | ||
@@ -74,0 +75,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
276474
0
1993
52