@limetech/lime-web-components 4.48.2 → 4.49.1-alpha.4
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 +145 -1
- package/README.md +1 -1
- package/dist/application/decorators/application.d.ts +8 -0
- package/dist/application/decorators/application.js +18 -0
- package/dist/application/decorators/index.d.ts +3 -0
- package/dist/application/decorators/index.js +3 -0
- package/dist/application/decorators/session.d.ts +8 -0
- package/dist/application/decorators/session.js +18 -0
- package/dist/application/decorators/user.d.ts +8 -0
- package/dist/application/decorators/user.js +18 -0
- package/dist/application/index.d.ts +4 -0
- package/dist/application/index.js +4 -0
- package/dist/application/session.d.ts +67 -0
- package/dist/application/session.js +1 -0
- package/dist/application/types.d.ts +14 -0
- package/dist/application/types.js +3 -0
- package/dist/application/user.d.ts +59 -0
- package/dist/application/user.js +1 -0
- package/dist/commandbus/commandbus.d.ts +112 -0
- package/dist/commandbus/commandbus.js +63 -0
- package/dist/commandbus/index.d.ts +2 -0
- package/dist/commandbus/index.js +2 -0
- package/dist/commandbus/types.d.ts +14 -0
- package/dist/commandbus/types.js +3 -0
- package/dist/config/decorator.d.ts +14 -0
- package/dist/config/decorator.js +14 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +3 -0
- package/dist/config/repository.d.ts +17 -0
- package/dist/config/repository.js +1 -0
- package/dist/config/types.d.ts +14 -0
- package/dist/config/types.js +3 -0
- package/dist/core/context.d.ts +17 -0
- package/dist/core/context.js +1 -0
- package/dist/core/decorators/factory.d.ts +29 -0
- package/dist/core/decorators/factory.js +243 -0
- package/dist/core/decorators/factory.spec.d.ts +1 -0
- package/dist/core/decorators/factory.spec.js +337 -0
- package/dist/core/decorators/index.d.ts +1 -0
- package/dist/core/decorators/index.js +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.js +6 -0
- package/dist/core/lime-web-component.d.ts +15 -0
- package/dist/core/lime-web-component.js +1 -0
- package/dist/core/platform.d.ts +38 -0
- package/dist/core/platform.js +6 -0
- package/dist/core/plugin-loader.d.ts +28 -0
- package/dist/core/plugin-loader.js +1 -0
- package/dist/core/state.d.ts +39 -0
- package/dist/core/state.js +1 -0
- package/dist/device/decorator.d.ts +16 -0
- package/dist/device/decorator.js +16 -0
- package/dist/device/device.d.ts +21 -0
- package/dist/device/device.js +1 -0
- package/dist/device/index.d.ts +3 -0
- package/dist/device/index.js +3 -0
- package/dist/device/types.d.ts +14 -0
- package/dist/device/types.js +3 -0
- package/dist/dialog/dialog.d.ts +41 -0
- package/dist/dialog/dialog.js +1 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/types.d.ts +14 -0
- package/dist/dialog/types.js +3 -0
- package/dist/es5/application/decorators/application.js +18 -0
- package/dist/es5/application/decorators/index.js +6 -0
- package/dist/es5/application/decorators/session.js +18 -0
- package/dist/es5/application/decorators/user.js +18 -0
- package/dist/es5/application/index.js +7 -0
- package/dist/es5/application/session.js +2 -0
- package/dist/es5/application/types.js +5 -0
- package/dist/es5/application/user.js +2 -0
- package/dist/es5/commandbus/commandbus.js +31 -0
- package/dist/es5/commandbus/index.js +5 -0
- package/dist/es5/commandbus/types.js +5 -0
- package/dist/es5/config/decorator.js +12 -0
- package/dist/es5/config/index.js +6 -0
- package/dist/es5/config/repository.js +2 -0
- package/dist/es5/config/types.js +5 -0
- package/dist/es5/core/context.js +2 -0
- package/dist/es5/core/decorators/factory.js +213 -0
- package/dist/es5/core/decorators/factory.spec.js +495 -0
- package/dist/es5/core/decorators/index.js +2 -0
- package/dist/es5/core/index.js +9 -0
- package/dist/es5/core/lime-web-component.js +2 -0
- package/dist/es5/core/platform.js +6 -0
- package/dist/es5/core/plugin-loader.js +2 -0
- package/dist/es5/core/state.js +2 -0
- package/dist/es5/device/decorator.js +13 -0
- package/dist/es5/device/device.js +2 -0
- package/dist/es5/device/index.js +6 -0
- package/dist/es5/device/types.js +5 -0
- package/dist/es5/dialog/dialog.js +2 -0
- package/dist/es5/dialog/index.js +5 -0
- package/dist/es5/dialog/types.js +5 -0
- package/dist/es5/eventdispatcher/eventdispatcher.js +2 -0
- package/dist/es5/eventdispatcher/index.js +5 -0
- package/dist/es5/eventdispatcher/types.js +5 -0
- package/dist/es5/filter/decorator.js +13 -0
- package/dist/es5/filter/index.js +6 -0
- package/dist/es5/filter/repository.js +2 -0
- package/dist/es5/filter/types.js +5 -0
- package/dist/es5/http/http.js +2 -0
- package/dist/es5/http/index.js +5 -0
- package/dist/es5/http/types.js +5 -0
- package/dist/es5/index.js +22 -0
- package/dist/es5/keybindings/index.js +5 -0
- package/dist/es5/keybindings/registry.js +2 -0
- package/dist/es5/keybindings/types.js +5 -0
- package/dist/es5/limeobject/commands/bulk-create-dialog.js +17 -0
- package/dist/es5/limeobject/commands/create-dialog.js +17 -0
- package/dist/es5/limeobject/commands/delete-object.js +16 -0
- package/dist/es5/limeobject/commands/index.js +8 -0
- package/dist/es5/limeobject/commands/object-access.js +16 -0
- package/dist/es5/limeobject/commands/save-object.js +17 -0
- package/dist/es5/limeobject/decorator.js +38 -0
- package/dist/es5/limeobject/error.js +2 -0
- package/dist/es5/limeobject/index.js +9 -0
- package/dist/es5/limeobject/limeobject.js +2 -0
- package/dist/es5/limeobject/repository.js +2 -0
- package/dist/es5/limeobject/types.js +5 -0
- package/dist/es5/limetype/acl.js +2 -0
- package/dist/es5/limetype/decorator.js +28 -0
- package/dist/es5/limetype/index.js +8 -0
- package/dist/es5/limetype/limetype.js +2 -0
- package/dist/es5/limetype/property.js +40 -0
- package/dist/es5/limetype/types.js +5 -0
- package/dist/es5/navigator/decorator.js +13 -0
- package/dist/es5/navigator/index.js +6 -0
- package/dist/es5/navigator/navigator.js +2 -0
- package/dist/es5/navigator/types.js +5 -0
- package/dist/es5/notifications/index.js +5 -0
- package/dist/es5/notifications/notifications.js +2 -0
- package/dist/es5/notifications/types.js +5 -0
- package/dist/es5/query/index.js +6 -0
- package/dist/es5/query/query.js +17 -0
- package/dist/es5/query/service.js +2 -0
- package/dist/es5/query/types.js +5 -0
- package/dist/es5/routeregistry/index.js +5 -0
- package/dist/es5/routeregistry/registry.js +2 -0
- package/dist/es5/routeregistry/types.js +5 -0
- package/dist/es5/task/index.js +5 -0
- package/dist/es5/task/repository.js +17 -0
- package/dist/es5/task/types.js +5 -0
- package/dist/es5/testing/component-testing.js +102 -0
- package/dist/es5/testing/index.js +10 -0
- package/dist/es5/testing/limeobjects/company.js +660 -0
- package/dist/es5/testing/limeobjects/coworker.js +110 -0
- package/dist/es5/testing/limeobjects/deal.js +447 -0
- package/dist/es5/testing/limeobjects/document.js +82 -0
- package/dist/es5/testing/limeobjects/index.js +55 -0
- package/dist/es5/testing/limeobjects/person.js +1162 -0
- package/dist/es5/testing/limetypes/campaign.js +486 -0
- package/dist/es5/testing/limetypes/company.js +621 -0
- package/dist/es5/testing/limetypes/consent.js +237 -0
- package/dist/es5/testing/limetypes/consenttype.js +194 -0
- package/dist/es5/testing/limetypes/coworker.js +579 -0
- package/dist/es5/testing/limetypes/deal.js +422 -0
- package/dist/es5/testing/limetypes/document.js +343 -0
- package/dist/es5/testing/limetypes/helpdesk.js +426 -0
- package/dist/es5/testing/limetypes/helpdesktype.js +142 -0
- package/dist/es5/testing/limetypes/history.js +349 -0
- package/dist/es5/testing/limetypes/index.js +69 -0
- package/dist/es5/testing/limetypes/infotiles.js +514 -0
- package/dist/es5/testing/limetypes/localize.js +287 -0
- package/dist/es5/testing/limetypes/mailing.js +218 -0
- package/dist/es5/testing/limetypes/office.js +388 -0
- package/dist/es5/testing/limetypes/participant.js +195 -0
- package/dist/es5/testing/limetypes/person.js +535 -0
- package/dist/es5/testing/limetypes/recipient.js +175 -0
- package/dist/es5/testing/limetypes/solutionimprovement.js +353 -0
- package/dist/es5/testing/limetypes/successplan.js +215 -0
- package/dist/es5/testing/limetypes/target.js +181 -0
- package/dist/es5/testing/limetypes/todo.js +429 -0
- package/dist/es5/testing/platform/index.js +53 -0
- package/dist/es5/testing/platform/platform.spec.js +44 -0
- package/dist/es5/translator/index.js +5 -0
- package/dist/es5/translator/translator.js +2 -0
- package/dist/es5/translator/types.js +5 -0
- package/dist/es5/userdata/decorator.js +13 -0
- package/dist/es5/userdata/index.js +6 -0
- package/dist/es5/userdata/repository.js +2 -0
- package/dist/es5/userdata/types.js +5 -0
- package/dist/eventdispatcher/eventdispatcher.d.ts +26 -0
- package/dist/eventdispatcher/eventdispatcher.js +1 -0
- package/dist/eventdispatcher/index.d.ts +2 -0
- package/dist/eventdispatcher/index.js +2 -0
- package/dist/eventdispatcher/types.d.ts +14 -0
- package/dist/eventdispatcher/types.js +3 -0
- package/dist/filter/decorator.d.ts +15 -0
- package/dist/filter/decorator.js +14 -0
- package/dist/filter/index.d.ts +3 -0
- package/dist/filter/index.js +3 -0
- package/dist/filter/repository.d.ts +18 -0
- package/dist/filter/repository.js +1 -0
- package/dist/filter/types.d.ts +14 -0
- package/dist/filter/types.js +3 -0
- package/dist/http/http.d.ts +72 -0
- package/dist/http/http.js +1 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +2 -0
- package/dist/http/types.d.ts +14 -0
- package/dist/http/types.js +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/keybindings/index.d.ts +2 -0
- package/dist/keybindings/index.js +2 -0
- package/dist/keybindings/registry.d.ts +79 -0
- package/dist/keybindings/registry.js +1 -0
- package/dist/keybindings/types.d.ts +17 -0
- package/dist/keybindings/types.js +3 -0
- package/dist/limeobject/commands/bulk-create-dialog.d.ts +49 -0
- package/dist/limeobject/commands/bulk-create-dialog.js +48 -0
- package/dist/limeobject/commands/create-dialog.d.ts +28 -0
- package/dist/limeobject/commands/create-dialog.js +26 -0
- package/dist/limeobject/commands/delete-object.d.ts +10 -0
- package/dist/limeobject/commands/delete-object.js +15 -0
- package/dist/limeobject/commands/index.d.ts +5 -0
- package/dist/limeobject/commands/index.js +5 -0
- package/dist/limeobject/commands/object-access.d.ts +10 -0
- package/dist/limeobject/commands/object-access.js +15 -0
- package/dist/limeobject/commands/save-object.d.ts +16 -0
- package/dist/limeobject/commands/save-object.js +21 -0
- package/dist/limeobject/decorator.d.ts +32 -0
- package/dist/limeobject/decorator.js +42 -0
- package/dist/limeobject/error.d.ts +4 -0
- package/dist/limeobject/error.js +1 -0
- package/dist/limeobject/index.d.ts +6 -0
- package/dist/limeobject/index.js +6 -0
- package/dist/limeobject/limeobject.d.ts +43 -0
- package/dist/limeobject/limeobject.js +1 -0
- package/dist/limeobject/repository.d.ts +113 -0
- package/dist/limeobject/repository.js +1 -0
- package/dist/limeobject/types.d.ts +14 -0
- package/dist/limeobject/types.js +3 -0
- package/dist/limetype/acl.d.ts +6 -0
- package/dist/limetype/acl.js +1 -0
- package/dist/limetype/decorator.d.ts +21 -0
- package/dist/limetype/decorator.js +32 -0
- package/dist/limetype/index.d.ts +5 -0
- package/dist/limetype/index.js +5 -0
- package/dist/limetype/limetype.d.ts +25 -0
- package/dist/limetype/limetype.js +1 -0
- package/dist/limetype/property.d.ts +32 -0
- package/dist/limetype/property.js +32 -0
- package/dist/limetype/types.d.ts +14 -0
- package/dist/limetype/types.js +3 -0
- package/dist/navigator/decorator.d.ts +18 -0
- package/dist/navigator/decorator.js +15 -0
- package/dist/navigator/index.d.ts +3 -0
- package/dist/navigator/index.js +3 -0
- package/dist/navigator/navigator.d.ts +158 -0
- package/dist/navigator/navigator.js +1 -0
- package/dist/navigator/types.d.ts +17 -0
- package/dist/navigator/types.js +3 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/notifications.d.ts +101 -0
- package/dist/notifications/notifications.js +1 -0
- package/dist/notifications/types.d.ts +14 -0
- package/dist/notifications/types.js +3 -0
- package/dist/query/index.d.ts +3 -0
- package/dist/query/index.js +3 -0
- package/dist/query/query.d.ts +46 -0
- package/dist/query/query.js +14 -0
- package/dist/query/service.d.ts +12 -0
- package/dist/query/service.js +1 -0
- package/dist/query/types.d.ts +14 -0
- package/dist/query/types.js +3 -0
- package/dist/routeregistry/index.d.ts +2 -0
- package/dist/routeregistry/index.js +2 -0
- package/dist/routeregistry/registry.d.ts +92 -0
- package/dist/routeregistry/registry.js +1 -0
- package/dist/routeregistry/types.d.ts +17 -0
- package/dist/routeregistry/types.js +3 -0
- package/dist/task/index.d.ts +2 -0
- package/dist/task/index.js +2 -0
- package/dist/task/repository.d.ts +82 -0
- package/dist/task/repository.js +49 -0
- package/dist/task/types.d.ts +14 -0
- package/dist/task/types.js +3 -0
- package/dist/testing/component-testing.d.ts +53 -0
- package/dist/testing/component-testing.js +162 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/limeobjects/company.d.ts +55 -0
- package/dist/testing/limeobjects/company.js +656 -0
- package/dist/testing/limeobjects/coworker.d.ts +22 -0
- package/dist/testing/limeobjects/coworker.js +106 -0
- package/dist/testing/limeobjects/deal.d.ts +41 -0
- package/dist/testing/limeobjects/deal.js +443 -0
- package/dist/testing/limeobjects/document.d.ts +20 -0
- package/dist/testing/limeobjects/document.js +78 -0
- package/dist/testing/limeobjects/index.d.ts +177 -0
- package/dist/testing/limeobjects/index.js +50 -0
- package/dist/testing/limeobjects/person.d.ts +20 -0
- package/dist/testing/limeobjects/person.js +1158 -0
- package/dist/testing/limetypes/campaign.d.ts +417 -0
- package/dist/testing/limetypes/campaign.js +477 -0
- package/dist/testing/limetypes/company.d.ts +591 -0
- package/dist/testing/limetypes/company.js +614 -0
- package/dist/testing/limetypes/consent.d.ts +199 -0
- package/dist/testing/limetypes/consent.js +232 -0
- package/dist/testing/limetypes/consenttype.d.ts +188 -0
- package/dist/testing/limetypes/consenttype.js +189 -0
- package/dist/testing/limetypes/coworker.d.ts +563 -0
- package/dist/testing/limetypes/coworker.js +564 -0
- package/dist/testing/limetypes/deal.d.ts +391 -0
- package/dist/testing/limetypes/deal.js +419 -0
- package/dist/testing/limetypes/document.d.ts +309 -0
- package/dist/testing/limetypes/document.js +332 -0
- package/dist/testing/limetypes/helpdesk.d.ts +394 -0
- package/dist/testing/limetypes/helpdesk.js +417 -0
- package/dist/testing/limetypes/helpdesktype.d.ts +136 -0
- package/dist/testing/limetypes/helpdesktype.js +137 -0
- package/dist/testing/limetypes/history.d.ts +308 -0
- package/dist/testing/limetypes/history.js +346 -0
- package/dist/testing/limetypes/index.d.ts +5 -0
- package/dist/testing/limetypes/index.js +63 -0
- package/dist/testing/limetypes/infotiles.d.ts +387 -0
- package/dist/testing/limetypes/infotiles.js +509 -0
- package/dist/testing/limetypes/localize.d.ts +283 -0
- package/dist/testing/limetypes/localize.js +284 -0
- package/dist/testing/limetypes/mailing.d.ts +212 -0
- package/dist/testing/limetypes/mailing.js +213 -0
- package/dist/testing/limetypes/office.d.ts +384 -0
- package/dist/testing/limetypes/office.js +385 -0
- package/dist/testing/limetypes/participant.d.ts +165 -0
- package/dist/testing/limetypes/participant.js +188 -0
- package/dist/testing/limetypes/person.d.ts +472 -0
- package/dist/testing/limetypes/person.js +530 -0
- package/dist/testing/limetypes/recipient.d.ts +147 -0
- package/dist/testing/limetypes/recipient.js +170 -0
- package/dist/testing/limetypes/solutionimprovement.d.ts +302 -0
- package/dist/testing/limetypes/solutionimprovement.js +344 -0
- package/dist/testing/limetypes/successplan.d.ts +209 -0
- package/dist/testing/limetypes/successplan.js +210 -0
- package/dist/testing/limetypes/target.d.ts +160 -0
- package/dist/testing/limetypes/target.js +178 -0
- package/dist/testing/limetypes/todo.d.ts +386 -0
- package/dist/testing/limetypes/todo.js +426 -0
- package/dist/testing/platform/index.d.ts +8 -0
- package/dist/testing/platform/index.js +61 -0
- package/dist/testing/platform/platform.spec.d.ts +1 -0
- package/dist/testing/platform/platform.spec.js +41 -0
- package/dist/translator/index.d.ts +2 -0
- package/dist/translator/index.js +2 -0
- package/dist/translator/translator.d.ts +13 -0
- package/dist/translator/translator.js +1 -0
- package/dist/translator/types.d.ts +14 -0
- package/dist/translator/types.js +3 -0
- package/dist/userdata/decorator.d.ts +17 -0
- package/dist/userdata/decorator.js +14 -0
- package/dist/userdata/index.d.ts +3 -0
- package/dist/userdata/index.js +3 -0
- package/dist/userdata/repository.d.ts +29 -0
- package/dist/userdata/repository.js +1 -0
- package/dist/userdata/types.d.ts +14 -0
- package/dist/userdata/types.js +3 -0
- package/package.json +11 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectUserData = void 0;
|
|
4
|
+
var core_1 = require("../core");
|
|
5
|
+
var factory_1 = require("../core/decorators/factory");
|
|
6
|
+
function SelectUserData(options) {
|
|
7
|
+
if (options === void 0) { options = {}; }
|
|
8
|
+
var config = {
|
|
9
|
+
name: core_1.PlatformServiceName.UserData,
|
|
10
|
+
};
|
|
11
|
+
return (0, factory_1.createStateDecorator)(options, config);
|
|
12
|
+
}
|
|
13
|
+
exports.SelectUserData = SelectUserData;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./repository"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./decorator"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for handling application level events
|
|
3
|
+
*/
|
|
4
|
+
export interface EventDispatcher {
|
|
5
|
+
/**
|
|
6
|
+
* Dispatch a new event
|
|
7
|
+
*
|
|
8
|
+
* @param {string} eventName name of the event to dispatch
|
|
9
|
+
* @param {T} data data attached to the event
|
|
10
|
+
*/
|
|
11
|
+
dispatch<T>(eventName: string, data: T): CustomEvent<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Add a new listener for a specific event
|
|
14
|
+
*
|
|
15
|
+
* @param {string} eventName name of the event to listen to
|
|
16
|
+
* @param {Function} listener listener to invoke when the event is dispatched
|
|
17
|
+
*/
|
|
18
|
+
addListener<T>(eventName: string, listener: (event: CustomEvent<T>) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* Stop listening for a specific event
|
|
21
|
+
*
|
|
22
|
+
* @param {string} eventName name of the event to stop listening to
|
|
23
|
+
* @param {Function} listener listener to remove from the dispatcher
|
|
24
|
+
*/
|
|
25
|
+
removeListener<T>(eventName: string, listener: (event: CustomEvent<T>) => void): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventDispatcher as Service } from './eventdispatcher';
|
|
2
|
+
declare const SERVICE_NAME = "eventDispatcher";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Service EventDispatcher}
|
|
7
|
+
*/
|
|
8
|
+
EventDispatcher: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceName['EventDispatcher']): Service;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StateOptions } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Config for the {@link SelectFilters} state decorator
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectFiltersOptions extends StateOptions {
|
|
6
|
+
id?: string;
|
|
7
|
+
limetype?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Gets a list of filters
|
|
11
|
+
*
|
|
12
|
+
* @param {StateOptions} [options] state decorator options
|
|
13
|
+
* @returns {Function} state decorator
|
|
14
|
+
*/
|
|
15
|
+
export declare function SelectFilters(options?: SelectFiltersOptions): PropertyDecorator;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PlatformServiceName, } from '../core';
|
|
2
|
+
import { createStateDecorator } from '../core/decorators/factory';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a list of filters
|
|
5
|
+
*
|
|
6
|
+
* @param {StateOptions} [options] state decorator options
|
|
7
|
+
* @returns {Function} state decorator
|
|
8
|
+
*/
|
|
9
|
+
export function SelectFilters(options = {}) {
|
|
10
|
+
const config = {
|
|
11
|
+
name: PlatformServiceName.FilterRepository,
|
|
12
|
+
};
|
|
13
|
+
return createStateDecorator(options, config);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Filter } from '../query';
|
|
2
|
+
import { StateRepository } from '../core';
|
|
3
|
+
export interface FilterRepository extends StateRepository {
|
|
4
|
+
/**
|
|
5
|
+
* Saves the new filter to the database
|
|
6
|
+
*
|
|
7
|
+
* @param filter a filter to save
|
|
8
|
+
* @returns {Promise<void>} a promise that will be resolved when the filter is saved
|
|
9
|
+
*/
|
|
10
|
+
save(filter: Filter): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Deletes the filter
|
|
13
|
+
*
|
|
14
|
+
* @param id a filter id to delete
|
|
15
|
+
* @returns {Promise<void>} a promise that will be resolved when the filter is deleted
|
|
16
|
+
*/
|
|
17
|
+
delete?(filter: Filter): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FilterRepository as Service } from './repository';
|
|
2
|
+
declare const SERVICE_NAME = "state.filters";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Service FilterRepository}
|
|
7
|
+
*/
|
|
8
|
+
FilterRepository: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceName['FilterRepository']): Service;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP service for sending requests to a given URL
|
|
3
|
+
*
|
|
4
|
+
* By default, the service will work with the JSON data format. If anything but JSON is returned from the endpoint,
|
|
5
|
+
* the `responseType` property in the `options` parameter needs to be set.
|
|
6
|
+
*/
|
|
7
|
+
export interface HttpClient {
|
|
8
|
+
/**
|
|
9
|
+
* Sends a get request.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} url - Url to resource (for instance my_addon/endpoint).
|
|
12
|
+
* @param {object} options - The HTTP options to send with the request.
|
|
13
|
+
* @returns {Promise}
|
|
14
|
+
*/
|
|
15
|
+
get(url: string, options?: HttpOptions): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Sends a post request.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} url - Url to resource (for instance my_addon/endpoint).
|
|
20
|
+
* @param {object} data - Payload to send to the server.
|
|
21
|
+
* @param {object} options - The HTTP options to send with the request.
|
|
22
|
+
* @returns {Promise}
|
|
23
|
+
*/
|
|
24
|
+
post(url: string, data?: {}, options?: HttpOptions): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Sends a patch request.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} url - Url to resource (for instance my_addon/endpoint).
|
|
29
|
+
* @param {object} data - Payload to send to the server.
|
|
30
|
+
* @param {object} options - The HTTP options to send with the request.
|
|
31
|
+
* @returns {Promise}
|
|
32
|
+
*/
|
|
33
|
+
patch(url: string, data?: {}, options?: HttpOptions): Promise<any>;
|
|
34
|
+
/**
|
|
35
|
+
* Sends a put request.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} url - Url to resource (for instance my_addon/endpoint).
|
|
38
|
+
* @param {object} data - Payload to send to the server.
|
|
39
|
+
* @param {object} options - The HTTP options to send with the request.
|
|
40
|
+
* @returns {Promise}
|
|
41
|
+
*/
|
|
42
|
+
put(url: string, data?: {}, options?: HttpOptions): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Sends a delete request.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} url - Url to resource (for instance my_addon/endpoint).
|
|
47
|
+
* @param {object} options - The HTTP options to send with the request.
|
|
48
|
+
* @returns {Promise}
|
|
49
|
+
*/
|
|
50
|
+
delete(url: string, options?: HttpOptions): Promise<any>;
|
|
51
|
+
}
|
|
52
|
+
export interface HttpOptions {
|
|
53
|
+
/**
|
|
54
|
+
* Query parameters to include in the request
|
|
55
|
+
*/
|
|
56
|
+
params?: HttpParams;
|
|
57
|
+
/**
|
|
58
|
+
* Additional HTTP-headers to send in the request
|
|
59
|
+
*/
|
|
60
|
+
headers?: HttpHeaders;
|
|
61
|
+
/**
|
|
62
|
+
* Type of the response that is returned. Defaults to `json`
|
|
63
|
+
*/
|
|
64
|
+
responseType?: HttpResponseType;
|
|
65
|
+
}
|
|
66
|
+
export interface HttpParams {
|
|
67
|
+
[param: string]: string | string[];
|
|
68
|
+
}
|
|
69
|
+
export interface HttpHeaders {
|
|
70
|
+
[header: string]: string | string[];
|
|
71
|
+
}
|
|
72
|
+
export declare type HttpResponseType = 'text' | 'json' | 'arraybuffer' | 'blob';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from './http';
|
|
2
|
+
declare const SERVICE_NAME = "http";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link HttpClient}
|
|
7
|
+
*/
|
|
8
|
+
Http: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceName['Http']): HttpClient;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './limetype';
|
|
3
|
+
export * from './limeobject';
|
|
4
|
+
export * from './query';
|
|
5
|
+
export * from './http';
|
|
6
|
+
export * from './commandbus';
|
|
7
|
+
export * from './eventdispatcher';
|
|
8
|
+
export * from './translator';
|
|
9
|
+
export * from './dialog';
|
|
10
|
+
export * from './keybindings';
|
|
11
|
+
export * from './navigator';
|
|
12
|
+
export * from './notifications';
|
|
13
|
+
export * from './routeregistry';
|
|
14
|
+
export * from './task';
|
|
15
|
+
export * from './config';
|
|
16
|
+
export * from './device';
|
|
17
|
+
export * from './filter';
|
|
18
|
+
export * from './userdata';
|
|
19
|
+
export * from './application';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './limetype';
|
|
3
|
+
export * from './limeobject';
|
|
4
|
+
export * from './query';
|
|
5
|
+
export * from './http';
|
|
6
|
+
export * from './commandbus';
|
|
7
|
+
export * from './eventdispatcher';
|
|
8
|
+
export * from './translator';
|
|
9
|
+
export * from './dialog';
|
|
10
|
+
export * from './keybindings';
|
|
11
|
+
export * from './navigator';
|
|
12
|
+
export * from './notifications';
|
|
13
|
+
export * from './routeregistry';
|
|
14
|
+
export * from './task';
|
|
15
|
+
export * from './config';
|
|
16
|
+
export * from './device';
|
|
17
|
+
export * from './filter';
|
|
18
|
+
export * from './userdata';
|
|
19
|
+
export * from './application';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for binding keyboard shortcuts to execute commands
|
|
3
|
+
*
|
|
4
|
+
* A keybinding is a sequence or key combination on a computer keyboard which
|
|
5
|
+
* invokes commands. This service supports key bindings as a way of responding
|
|
6
|
+
* to individual keys typed by a user. The key combination can be pressing a single
|
|
7
|
+
* key or a sequence of keys one after the other.
|
|
8
|
+
*
|
|
9
|
+
* The service works together with the `CommandBus` to execute the commands and
|
|
10
|
+
* a command needs to already be registered on the command bus in order to be
|
|
11
|
+
* bound as a keyboard shortcut.
|
|
12
|
+
*
|
|
13
|
+
* The following example registers the command `MyCommand` to be handled by
|
|
14
|
+
* `MyHandler` and creates a keybinding for it. The `bind` method takes the key
|
|
15
|
+
* combination and command object as input.
|
|
16
|
+
*
|
|
17
|
+
* Later, if the keybinding no longer is needed it can be removed with the
|
|
18
|
+
* `unbind` method.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // The command bus needs to have a handler registered for the command
|
|
22
|
+
* // before it can be bound to a key sequence
|
|
23
|
+
* const handler = new MyHandler();
|
|
24
|
+
* commandBus.register(MyCommand, handler);
|
|
25
|
+
*
|
|
26
|
+
* // Bind 'ctrl+s' to trigger the command
|
|
27
|
+
* const command = new MyCommand();
|
|
28
|
+
* keybindingRegistry.bind('ctrl+s', command);
|
|
29
|
+
*
|
|
30
|
+
* // Remove the binding when we no longer need it to trigger the command
|
|
31
|
+
* keybindingRegistry.unbind('ctrl+s')
|
|
32
|
+
* @note This service is work in progress
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
export interface KeybindingRegistry {
|
|
36
|
+
/**
|
|
37
|
+
* Bind a command to a specific key combination to add it to the registry
|
|
38
|
+
*
|
|
39
|
+
* @param {string} keys the string representation of keys
|
|
40
|
+
* @param {Object} command the command to trigger when keys are pressed
|
|
41
|
+
* @throws Will throw an error if the command is invalid or not registered
|
|
42
|
+
*/
|
|
43
|
+
bind: (keys: string, command: object) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Unbind a keybinding to remove it from the registry
|
|
46
|
+
*
|
|
47
|
+
* @param {string} keys the string representation of the key combination
|
|
48
|
+
* @param {Object} command the command connected to the key combination
|
|
49
|
+
*/
|
|
50
|
+
unbind: (keys: string, command: object) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Get a list of the key bindings that are currently in the registry
|
|
53
|
+
*
|
|
54
|
+
* @returns {Keybinding[]} the list of command and its specific key combination
|
|
55
|
+
*/
|
|
56
|
+
getKeybindings: () => Keybinding[];
|
|
57
|
+
/**
|
|
58
|
+
* Checks if a key combination or a specific keybinding is already bound
|
|
59
|
+
*
|
|
60
|
+
* @param {string} keys the string representation of a key combination
|
|
61
|
+
* @param {Object} command the command connected to the key combination
|
|
62
|
+
* @returns {boolean} true if key combination already exists, else false
|
|
63
|
+
*/
|
|
64
|
+
isBound: (keys: string, command?: object) => boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A key combination and its corresponding command that will be triggered when
|
|
68
|
+
* the key combination is pressed
|
|
69
|
+
*/
|
|
70
|
+
export interface Keybinding {
|
|
71
|
+
/**
|
|
72
|
+
* The string representation of key combination
|
|
73
|
+
*/
|
|
74
|
+
keys: string;
|
|
75
|
+
/**
|
|
76
|
+
* The command to trigger when the key combination is pressed
|
|
77
|
+
*/
|
|
78
|
+
command: object;
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KeybindingRegistry as Service } from './registry';
|
|
2
|
+
declare const SERVICE_NAME = "keybindingRegistry";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Service KeybindingRegistry}
|
|
7
|
+
*
|
|
8
|
+
* @note Work in progress, do not use!
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
KeybindingRegistry: typeof SERVICE_NAME;
|
|
12
|
+
}
|
|
13
|
+
interface LimeWebComponentPlatform {
|
|
14
|
+
get(name: PlatformServiceName['KeybindingRegistry']): Service;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Expression } from '../../query';
|
|
2
|
+
import { LimeType } from '../../limetype';
|
|
3
|
+
/**
|
|
4
|
+
* Open a dialog for bulk creating limeobjects
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* ### Flow example
|
|
8
|
+
* Let's have a look at the general flow by going through the concrete example of adding several persons to a marketing activity:
|
|
9
|
+
* - Go to the table view of persons.
|
|
10
|
+
* - Filter everyone who should be included in the marketing activity.
|
|
11
|
+
* - Select 'Bulk create objects' form the action menu.
|
|
12
|
+
* - Select marketing activity as type of content.
|
|
13
|
+
* - Fill out the rest of the form and click 'create'.
|
|
14
|
+
* - A toast message appears and gives you 5 seconds to undo the action before it creates the corresponding task.
|
|
15
|
+
* - Another toast message will inform you after the task is completed.
|
|
16
|
+
* - If the task ended successful you can go to the participant table view and check the result.
|
|
17
|
+
*
|
|
18
|
+
* ### Configuration
|
|
19
|
+
* In order to activate the feature go to a table configuration in lime-admin to the limetype you want to bulk create from
|
|
20
|
+
* and add the following configuration:
|
|
21
|
+
*
|
|
22
|
+
* ```json
|
|
23
|
+
* "actions": [
|
|
24
|
+
* {
|
|
25
|
+
* "id": "limeobject.bulk-create-dialog",
|
|
26
|
+
* "params": {
|
|
27
|
+
* "relations": [<LIST OF CREATABLE, RELATED FIELDS (AS STRINGS)>]
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ],
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @id `limeobject.bulk-create-dialog`
|
|
34
|
+
*/
|
|
35
|
+
export declare class BulkCreateDialogCommand {
|
|
36
|
+
/**
|
|
37
|
+
* The limetype of the objects to create new objects from
|
|
38
|
+
*/
|
|
39
|
+
limetype: LimeType;
|
|
40
|
+
/**
|
|
41
|
+
* A query describing what limeobjects to create new limeobjects from. Each object from the result will result in a
|
|
42
|
+
* new related limeobject to be created
|
|
43
|
+
*/
|
|
44
|
+
filter: Expression;
|
|
45
|
+
/**
|
|
46
|
+
* A list of relation names that are possible to create from the limetype
|
|
47
|
+
*/
|
|
48
|
+
relations: string[];
|
|
49
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Open a dialog for bulk creating limeobjects
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* ### Flow example
|
|
8
|
+
* Let's have a look at the general flow by going through the concrete example of adding several persons to a marketing activity:
|
|
9
|
+
* - Go to the table view of persons.
|
|
10
|
+
* - Filter everyone who should be included in the marketing activity.
|
|
11
|
+
* - Select 'Bulk create objects' form the action menu.
|
|
12
|
+
* - Select marketing activity as type of content.
|
|
13
|
+
* - Fill out the rest of the form and click 'create'.
|
|
14
|
+
* - A toast message appears and gives you 5 seconds to undo the action before it creates the corresponding task.
|
|
15
|
+
* - Another toast message will inform you after the task is completed.
|
|
16
|
+
* - If the task ended successful you can go to the participant table view and check the result.
|
|
17
|
+
*
|
|
18
|
+
* ### Configuration
|
|
19
|
+
* In order to activate the feature go to a table configuration in lime-admin to the limetype you want to bulk create from
|
|
20
|
+
* and add the following configuration:
|
|
21
|
+
*
|
|
22
|
+
* ```json
|
|
23
|
+
* "actions": [
|
|
24
|
+
* {
|
|
25
|
+
* "id": "limeobject.bulk-create-dialog",
|
|
26
|
+
* "params": {
|
|
27
|
+
* "relations": [<LIST OF CREATABLE, RELATED FIELDS (AS STRINGS)>]
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ],
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @id `limeobject.bulk-create-dialog`
|
|
34
|
+
*/
|
|
35
|
+
let BulkCreateDialogCommand = class BulkCreateDialogCommand {
|
|
36
|
+
constructor() {
|
|
37
|
+
/**
|
|
38
|
+
* A list of relation names that are possible to create from the limetype
|
|
39
|
+
*/
|
|
40
|
+
this.relations = [];
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
BulkCreateDialogCommand = __decorate([
|
|
44
|
+
Command({
|
|
45
|
+
id: 'limeobject.bulk-create-dialog',
|
|
46
|
+
})
|
|
47
|
+
], BulkCreateDialogCommand);
|
|
48
|
+
export { BulkCreateDialogCommand };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LimeWebComponentContext } from '../../core';
|
|
2
|
+
import { LimeType } from '../../limetype';
|
|
3
|
+
/**
|
|
4
|
+
* Open a dialog for creating a new limeobject or editing a specific limeobject
|
|
5
|
+
*
|
|
6
|
+
* The create dialog is implemented as a command so a plugin can easily replace the original dialog with a custom one.
|
|
7
|
+
* Check out the "Hello, Event!" tutorial for a detailed description on how to implement your own create dialog.
|
|
8
|
+
*
|
|
9
|
+
* This dialog also useful to edit a limeobject that already exists
|
|
10
|
+
*
|
|
11
|
+
* @id `limeobject.create-dialog`
|
|
12
|
+
*/
|
|
13
|
+
export declare class CreateLimeobjectDialogCommand {
|
|
14
|
+
/**
|
|
15
|
+
* The limetype of the object to create
|
|
16
|
+
*/
|
|
17
|
+
limetype: LimeType;
|
|
18
|
+
/**
|
|
19
|
+
* Default data to populate the form with
|
|
20
|
+
*/
|
|
21
|
+
limeobject?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies if routing to limeobject should be done after confirmation
|
|
24
|
+
*/
|
|
25
|
+
route?: boolean;
|
|
26
|
+
title?: string;
|
|
27
|
+
context?: LimeWebComponentContext;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Open a dialog for creating a new limeobject or editing a specific limeobject
|
|
5
|
+
*
|
|
6
|
+
* The create dialog is implemented as a command so a plugin can easily replace the original dialog with a custom one.
|
|
7
|
+
* Check out the "Hello, Event!" tutorial for a detailed description on how to implement your own create dialog.
|
|
8
|
+
*
|
|
9
|
+
* This dialog also useful to edit a limeobject that already exists
|
|
10
|
+
*
|
|
11
|
+
* @id `limeobject.create-dialog`
|
|
12
|
+
*/
|
|
13
|
+
let CreateLimeobjectDialogCommand = class CreateLimeobjectDialogCommand {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Specifies if routing to limeobject should be done after confirmation
|
|
17
|
+
*/
|
|
18
|
+
this.route = false;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
CreateLimeobjectDialogCommand = __decorate([
|
|
22
|
+
Command({
|
|
23
|
+
id: 'limeobject.create-dialog',
|
|
24
|
+
})
|
|
25
|
+
], CreateLimeobjectDialogCommand);
|
|
26
|
+
export { CreateLimeobjectDialogCommand };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Deletes the object from the database
|
|
5
|
+
*
|
|
6
|
+
* @id `limeobject.delete-object`
|
|
7
|
+
*/
|
|
8
|
+
let DeleteObjectCommand = class DeleteObjectCommand {
|
|
9
|
+
};
|
|
10
|
+
DeleteObjectCommand = __decorate([
|
|
11
|
+
Command({
|
|
12
|
+
id: 'limeobject.delete-object',
|
|
13
|
+
})
|
|
14
|
+
], DeleteObjectCommand);
|
|
15
|
+
export { DeleteObjectCommand };
|