@equinor/workspace-core
Advanced tools
Comparing version 0.0.9 to 0.1.0
var _WorkspaceMediator_destructors, _WorkspaceMediator_appendDestructor; | ||
import { __classPrivateFieldGet } from "tslib"; | ||
import { createEventService } from '../utils/services/eventService'; | ||
import { createErrorService, createDataService, createSelectionService, createBookmarksService, createUrlService, createContextService, } from '../utils'; | ||
@@ -26,2 +27,3 @@ /** | ||
this.selectionService = createSelectionService(__classPrivateFieldGet(this, _WorkspaceMediator_appendDestructor, "f")); | ||
this.sidesheetService = createEventService(__classPrivateFieldGet(this, _WorkspaceMediator_appendDestructor, "f")); | ||
this.dataService = createDataService(__classPrivateFieldGet(this, _WorkspaceMediator_appendDestructor, "f")); | ||
@@ -28,0 +30,0 @@ this.errorService = createErrorService(__classPrivateFieldGet(this, _WorkspaceMediator_appendDestructor, "f")); |
export * from './callback'; | ||
export * from './objectType'; | ||
export * from './compare'; | ||
export * from './event'; |
@@ -1,2 +0,2 @@ | ||
import { ObjectType } from '../types'; | ||
import { ObjectType, BaseEvent } from '../types'; | ||
/** | ||
@@ -7,3 +7,3 @@ * Class to act as a mediator in the workspace | ||
*/ | ||
export declare class WorkspaceMediator<TData, TNode, TError extends ObjectType<TError> = ObjectType<unknown>, TBookmarkState extends Record<PropertyKey, unknown> = ObjectType<unknown>, TContext extends Record<PropertyKey, unknown> = never> { | ||
export declare class WorkspaceMediator<TData, TNode, TSidesheetEvents extends BaseEvent, TError extends ObjectType<TError> = ObjectType<unknown>, TBookmarkState extends Record<PropertyKey, unknown> = ObjectType<unknown>, TContext extends Record<PropertyKey, unknown> = never> { | ||
#private; | ||
@@ -28,2 +28,7 @@ /** | ||
}>; | ||
sidesheetService: { | ||
sendEvent: (ev: TSidesheetEvents) => void; | ||
subscribe: (key: TSidesheetEvents["type"], handler: (ev: TSidesheetEvents) => void) => () => void; | ||
subscribeAll: (handler: (ev: TSidesheetEvents) => void) => () => void; | ||
}; | ||
dataService: import("@equinor/workspace-observable-proxy").ObservableProxy<{ | ||
@@ -30,0 +35,0 @@ data: TData[] | undefined; |
@@ -1,3 +0,3 @@ | ||
export declare type BaseEvent<TType extends string> = { | ||
type: TType; | ||
export declare type BaseEvent = { | ||
type: string; | ||
}; |
export * from './callback'; | ||
export * from './objectType'; | ||
export * from './compare'; | ||
export * from './event'; |
import { ServiceCtor } from '../../types/serviceCtor'; | ||
import { BaseEvent } from '../../types/event'; | ||
declare type EventBus<TEvents extends BaseEvent<string>> = { | ||
declare type EventBus<TEvents extends BaseEvent> = { | ||
sendEvent: (ev: TEvents) => void; | ||
@@ -8,3 +8,3 @@ subscribe: (key: TEvents['type'], handler: (ev: TEvents) => void) => () => void; | ||
}; | ||
export declare const createEventService: <TEvents extends BaseEvent<string>>(destroy: ServiceCtor) => EventBus<TEvents>; | ||
export declare const createEventService: <TEvents extends BaseEvent>(destroy: ServiceCtor) => EventBus<TEvents>; | ||
export {}; |
{ | ||
"name": "@equinor/workspace-core", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
90756
376