@limetech/lime-web-components-interfaces
Advanced tools
Comparing version 1.4.1 to 2.0.0
@@ -6,2 +6,21 @@ # Change Log | ||
# [2.0.0](https://github.com/Lundalogik/lime-web-components/compare/v1.4.1...v2.0.0) (2019-07-04) | ||
### Code Refactoring | ||
* **platform:** add get method in favor of public properties ([5d0c903](https://github.com/Lundalogik/lime-web-components/commit/5d0c903)) | ||
### BREAKING CHANGES | ||
* **platform:** Removed all public properties, services are now retrieved with the `get` method. | ||
New services can be registered with the `register` method which can also be used by 3rd parties to | ||
register new services on the platform. Core platform service names are exposed in the | ||
`PlatformServiceName` enum. | ||
## [1.4.1](https://github.com/Lundalogik/lime-web-components/compare/v1.4.0...v1.4.1) (2019-06-28) | ||
@@ -8,0 +27,0 @@ |
@@ -7,3 +7,4 @@ "use strict"; | ||
__export(require("./limetype.interface")); | ||
__export(require("./lime-web-component-platform.interface")); | ||
__export(require("./query.interface")); | ||
__export(require("./service/index")); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var PlatformServiceName; | ||
(function (PlatformServiceName) { | ||
PlatformServiceName["Translate"] = "translate"; | ||
PlatformServiceName["Http"] = "http"; | ||
PlatformServiceName["Route"] = "route"; | ||
PlatformServiceName["Notification"] = "notifications"; | ||
PlatformServiceName["Query"] = "query"; | ||
PlatformServiceName["CommandBus"] = "commandBus"; | ||
PlatformServiceName["Dialog"] = "dialog"; | ||
PlatformServiceName["EventDispatcher"] = "eventDispatcher"; | ||
PlatformServiceName["LimetypesState"] = "state.limetypes"; | ||
PlatformServiceName["LimeobjectsState"] = "state.limeobjects"; | ||
PlatformServiceName["ApplicationState"] = "state.application"; | ||
PlatformServiceName["ConfigsState"] = "state.configs"; | ||
PlatformServiceName["FiltersState"] = "state.filters"; | ||
PlatformServiceName["DeviceState"] = "state.device"; | ||
PlatformServiceName["TaskState"] = "state.tasks"; | ||
})(PlatformServiceName = exports.PlatformServiceName || (exports.PlatformServiceName = {})); |
export * from './limetype.interface'; | ||
export * from './lime-web-component-platform.interface'; | ||
export * from './query.interface'; | ||
export * from './service/index'; |
@@ -1,26 +0,48 @@ | ||
import { HttpService } from './service/http-service.interface'; | ||
import { CommandBusService, DialogService, EventDispatcherService, QueryService, StateService, TaskService } from './service/index'; | ||
import { NotificationService } from './service/notification-service.interface'; | ||
import { RouteService } from './service/route-service.interface'; | ||
import { LimeobjectsStateService } from './service/state/limeobjects-service.interface'; | ||
import { TranslateService } from './service/translate-service.interface'; | ||
/** | ||
* Service container for the Lime CRM platform | ||
*/ | ||
export interface LimeWebComponentPlatform { | ||
type: 'LimeCRMWebClient' | 'LimeCRMDesktopClient'; | ||
state: { | ||
limetypes: StateService; | ||
limeobjects: LimeobjectsStateService; | ||
application: StateService; | ||
configs: StateService; | ||
filters: StateService; | ||
device: StateService; | ||
tasks: TaskService; | ||
}; | ||
translate: TranslateService; | ||
http: HttpService; | ||
route: RouteService; | ||
notifications: NotificationService; | ||
query: QueryService; | ||
commandBus: CommandBusService; | ||
dialog: DialogService; | ||
eventDispatcher: EventDispatcherService; | ||
/** | ||
* Get a service | ||
* | ||
* @param name the name of the service | ||
*/ | ||
get(name: PlatformServiceName | string): any; | ||
/** | ||
* Check if a service is currently registered on the platform | ||
* | ||
* @param name the name of the service | ||
*/ | ||
has(name: PlatformServiceName | string): boolean; | ||
/** | ||
* Register a service on the platform | ||
* | ||
* Core platform service names are defined by the enum `PlatformServiceName`. Third parties that wants to register | ||
* a service should add a prefix to the service name, e.g. the plugin name. | ||
* | ||
* @param name the name of the service | ||
* @param service the service | ||
*/ | ||
register(name: PlatformServiceName | string, service: any): void; | ||
} | ||
/** | ||
* Core platform service names | ||
*/ | ||
export declare enum PlatformServiceName { | ||
Translate = "translate", | ||
Http = "http", | ||
Route = "route", | ||
Notification = "notifications", | ||
Query = "query", | ||
CommandBus = "commandBus", | ||
Dialog = "dialog", | ||
EventDispatcher = "eventDispatcher", | ||
LimetypesState = "state.limetypes", | ||
LimeobjectsState = "state.limeobjects", | ||
ApplicationState = "state.application", | ||
ConfigsState = "state.configs", | ||
FiltersState = "state.filters", | ||
DeviceState = "state.device", | ||
TaskState = "state.tasks" | ||
} |
{ | ||
"name": "@limetech/lime-web-components-interfaces", | ||
"version": "1.4.1", | ||
"version": "2.0.0", | ||
"author": "Lime Technologies", | ||
@@ -33,3 +33,3 @@ "homepage": "https://github.com/Lundalogik/lime-web-components", | ||
}, | ||
"gitHead": "766768577eb4b1284fb6fe61512700dbca50414a" | ||
"gitHead": "a8bb04e61ba61ade9ffc644585ff0a3f31092870" | ||
} |
36481
1019