@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,15 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Open a dialog to view and edit object access information
|
|
5
|
+
*
|
|
6
|
+
* @id `limeobject.object-access`
|
|
7
|
+
*/
|
|
8
|
+
let OpenObjectAccessDialogCommand = class OpenObjectAccessDialogCommand {
|
|
9
|
+
};
|
|
10
|
+
OpenObjectAccessDialogCommand = __decorate([
|
|
11
|
+
Command({
|
|
12
|
+
id: 'limeobject.object-access',
|
|
13
|
+
})
|
|
14
|
+
], OpenObjectAccessDialogCommand);
|
|
15
|
+
export { OpenObjectAccessDialogCommand };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LimeObject } from '../../limeobject';
|
|
2
|
+
/**
|
|
3
|
+
* Saves the object to the database
|
|
4
|
+
*
|
|
5
|
+
* @id `limeobject.save-object`
|
|
6
|
+
*/
|
|
7
|
+
export declare class SaveLimeObjectCommand {
|
|
8
|
+
/**
|
|
9
|
+
* The limeobject to save
|
|
10
|
+
*/
|
|
11
|
+
limeobject: LimeObject;
|
|
12
|
+
/**
|
|
13
|
+
* Specifies if routing to limeobject should be done after confirmation
|
|
14
|
+
*/
|
|
15
|
+
route?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Saves the object to the database
|
|
5
|
+
*
|
|
6
|
+
* @id `limeobject.save-object`
|
|
7
|
+
*/
|
|
8
|
+
let SaveLimeObjectCommand = class SaveLimeObjectCommand {
|
|
9
|
+
constructor() {
|
|
10
|
+
/**
|
|
11
|
+
* Specifies if routing to limeobject should be done after confirmation
|
|
12
|
+
*/
|
|
13
|
+
this.route = false;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
SaveLimeObjectCommand = __decorate([
|
|
17
|
+
Command({
|
|
18
|
+
id: 'limeobject.save-object',
|
|
19
|
+
})
|
|
20
|
+
], SaveLimeObjectCommand);
|
|
21
|
+
export { SaveLimeObjectCommand };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StateOptions, LimeWebComponent, ContextAwareStateOptions } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Config for the {@link SelectLimeObjects} state decorator
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectLimeObjectsOptions extends StateOptions {
|
|
6
|
+
/**
|
|
7
|
+
* LimeType of the object
|
|
8
|
+
*/
|
|
9
|
+
limetype?: string;
|
|
10
|
+
/**
|
|
11
|
+
* A function to get the limetype
|
|
12
|
+
*/
|
|
13
|
+
getLimetype?: (component: LimeWebComponent) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Id of the limeobject
|
|
16
|
+
*/
|
|
17
|
+
id?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get a list of limeobjects
|
|
21
|
+
*
|
|
22
|
+
* @param {SelectLimeObjectsOptions} [options] state decorator options
|
|
23
|
+
* @returns {Function} state decorator
|
|
24
|
+
*/
|
|
25
|
+
export declare function SelectLimeObjects(options?: SelectLimeObjectsOptions): PropertyDecorator;
|
|
26
|
+
/**
|
|
27
|
+
* Get the limeobject for the current context
|
|
28
|
+
*
|
|
29
|
+
* @param {StateOptions} [options] state decorator options
|
|
30
|
+
* @returns {Function} state decorator
|
|
31
|
+
*/
|
|
32
|
+
export declare function SelectCurrentLimeObject(options?: ContextAwareStateOptions): PropertyDecorator;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PlatformServiceName, } from '../core';
|
|
2
|
+
import { createStateDecorator } from '../core/decorators/factory';
|
|
3
|
+
/**
|
|
4
|
+
* Get a list of limeobjects
|
|
5
|
+
*
|
|
6
|
+
* @param {SelectLimeObjectsOptions} [options] state decorator options
|
|
7
|
+
* @returns {Function} state decorator
|
|
8
|
+
*/
|
|
9
|
+
export function SelectLimeObjects(options = {}) {
|
|
10
|
+
const config = {
|
|
11
|
+
name: PlatformServiceName.LimeObjectRepository,
|
|
12
|
+
optionFactory: createOptions,
|
|
13
|
+
};
|
|
14
|
+
return createStateDecorator(options, config);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the limeobject for the current context
|
|
18
|
+
*
|
|
19
|
+
* @param {StateOptions} [options] state decorator options
|
|
20
|
+
* @returns {Function} state decorator
|
|
21
|
+
*/
|
|
22
|
+
export function SelectCurrentLimeObject(options = {}) {
|
|
23
|
+
const config = {
|
|
24
|
+
name: PlatformServiceName.LimeObjectRepository,
|
|
25
|
+
};
|
|
26
|
+
options.map = [currentLimeobject, ...(options.map || [])];
|
|
27
|
+
options.context = null;
|
|
28
|
+
return createStateDecorator(options, config);
|
|
29
|
+
}
|
|
30
|
+
function currentLimeobject(limeobjects) {
|
|
31
|
+
const { limetype, id } = this.context;
|
|
32
|
+
if (!limeobjects[limetype]) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
return limeobjects[limetype].find((object) => object.id === id);
|
|
36
|
+
}
|
|
37
|
+
function createOptions(options, component) {
|
|
38
|
+
if (options.getLimetype) {
|
|
39
|
+
options.limetype = options.getLimetype(component);
|
|
40
|
+
}
|
|
41
|
+
return options;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LimeType } from '../limetype';
|
|
2
|
+
/**
|
|
3
|
+
* A Lime object
|
|
4
|
+
*/
|
|
5
|
+
export interface LimeObject {
|
|
6
|
+
/**
|
|
7
|
+
* Id of the lime object
|
|
8
|
+
*/
|
|
9
|
+
id: number;
|
|
10
|
+
/**
|
|
11
|
+
* The created time of the limeobject
|
|
12
|
+
*/
|
|
13
|
+
createdtime: string;
|
|
14
|
+
/**
|
|
15
|
+
* The last time the limeobject updated
|
|
16
|
+
*/
|
|
17
|
+
timestamp: string;
|
|
18
|
+
/**
|
|
19
|
+
* Descriptive of the limeobject
|
|
20
|
+
*/
|
|
21
|
+
descriptive: string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the value of a property by name
|
|
24
|
+
*
|
|
25
|
+
* @param {string} name name of property to get the value of. Allows a path
|
|
26
|
+
* to be specified using dot notation to get the value of a related
|
|
27
|
+
* property
|
|
28
|
+
*
|
|
29
|
+
* @returns {any} the value of the specified property. If it is a relation,
|
|
30
|
+
* the related `LimeObject` will be returned
|
|
31
|
+
*/
|
|
32
|
+
getValue(name: string): any;
|
|
33
|
+
/**
|
|
34
|
+
* Get the limetype of the object
|
|
35
|
+
*
|
|
36
|
+
* @returns {Limetype} the limetype
|
|
37
|
+
*/
|
|
38
|
+
getLimetype(): LimeType;
|
|
39
|
+
/**
|
|
40
|
+
* Dynamic properties of the limeobject
|
|
41
|
+
*/
|
|
42
|
+
[property: string]: any;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Expression } from '../query';
|
|
2
|
+
import { StateRepository } from '../core';
|
|
3
|
+
export interface LimeObjectRepository extends StateRepository {
|
|
4
|
+
/**
|
|
5
|
+
* Load the specified limeobject into the state
|
|
6
|
+
*
|
|
7
|
+
* @param {string} limetype
|
|
8
|
+
* @param {number} id
|
|
9
|
+
*/
|
|
10
|
+
loadObject(limetype: string, id: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Load objects of the specified limetype into the state
|
|
13
|
+
*
|
|
14
|
+
* @param {string} limetype name of the limetype
|
|
15
|
+
* @param {LoadOptions} options options about the objects to load
|
|
16
|
+
* @returns {ObjectResponse} list of objects together with total count of objects
|
|
17
|
+
*/
|
|
18
|
+
loadObjects?(limetype: string, options?: LoadOptions): Promise<ObjectResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Load related objects into the state
|
|
21
|
+
*
|
|
22
|
+
* @param {string} limetype name of the limetype of the owning limeobject
|
|
23
|
+
* @param {number} id the id of the owning limeobject
|
|
24
|
+
* @param {string} property name of the property that contain the relations
|
|
25
|
+
* @param {LoadOptions} options options about the objects to load
|
|
26
|
+
* @returns {ObjectResponse} list of related objects together with total count of objects
|
|
27
|
+
*/
|
|
28
|
+
loadRelations(limetype: string, id: number, property: string, options?: LoadOptions): Promise<ObjectResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Loads a schema for the limetype.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} limetype name of the limetype of the owning limeobject
|
|
33
|
+
*/
|
|
34
|
+
loadSchema?(limetype: string): Promise<object>;
|
|
35
|
+
/**
|
|
36
|
+
* Reload the specified limeobject and update corresponding views in the webclient
|
|
37
|
+
*
|
|
38
|
+
* NOTE: This is just a temporary method that can be used to get around some quirks in the current version of the
|
|
39
|
+
* webclient. It is deprecated and code should not rely on its existance. Check if the method exists before using
|
|
40
|
+
* it to make code backwards compatible, e.g. `limeobjects.reload && limeobjects.reload('company', 1001)`
|
|
41
|
+
*
|
|
42
|
+
* Once the quirks in the webclient have been fixed, there should be no need for this method and objects should
|
|
43
|
+
* update themselves automatically.
|
|
44
|
+
*
|
|
45
|
+
* @deprecated
|
|
46
|
+
*/
|
|
47
|
+
reloadObject?(limetype: string, id: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* Delete the specified limeobject
|
|
50
|
+
*
|
|
51
|
+
* @param {string} limetype name of the limetype of the limeobject
|
|
52
|
+
* @param {number} id the id of the limeobject
|
|
53
|
+
*/
|
|
54
|
+
deleteObject?(limetype: string, id: number): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export interface LoadOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Maximum number of objects to load
|
|
59
|
+
*/
|
|
60
|
+
limit?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Offset of the objects to load
|
|
63
|
+
*/
|
|
64
|
+
offset?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Filter to apply to the objects
|
|
67
|
+
*/
|
|
68
|
+
filter?: Expression;
|
|
69
|
+
/**
|
|
70
|
+
* Order to sort the properties by
|
|
71
|
+
*/
|
|
72
|
+
order?: PropertyOrder[];
|
|
73
|
+
}
|
|
74
|
+
export interface PropertyOrder {
|
|
75
|
+
/**
|
|
76
|
+
* Name of the property to sort on
|
|
77
|
+
*/
|
|
78
|
+
name: string;
|
|
79
|
+
/**
|
|
80
|
+
* The direction to order the property by
|
|
81
|
+
*/
|
|
82
|
+
direction: 'ASC' | 'DESC';
|
|
83
|
+
}
|
|
84
|
+
export interface ObjectResponse {
|
|
85
|
+
/**
|
|
86
|
+
* The objects that matched the query
|
|
87
|
+
*/
|
|
88
|
+
objects: object[];
|
|
89
|
+
/**
|
|
90
|
+
* Total number of objects that exist matching the query
|
|
91
|
+
*/
|
|
92
|
+
totalCount: number;
|
|
93
|
+
/**
|
|
94
|
+
* Total number of objects that exist (without any filter applied)
|
|
95
|
+
*/
|
|
96
|
+
totalRelations?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Aggregated data
|
|
99
|
+
*/
|
|
100
|
+
aggregates?: AggregationGroups;
|
|
101
|
+
}
|
|
102
|
+
export interface AggregationGroups {
|
|
103
|
+
/**
|
|
104
|
+
* Name of the aggregation group along with a list of aggregations
|
|
105
|
+
*/
|
|
106
|
+
[name: string]: ObjectAggregation[];
|
|
107
|
+
}
|
|
108
|
+
export interface ObjectAggregation {
|
|
109
|
+
/**
|
|
110
|
+
* Name of the property being aggregated along with its aggregated value
|
|
111
|
+
*/
|
|
112
|
+
[property: string]: number | string;
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LimeObjectRepository as Service } from './repository';
|
|
2
|
+
declare const SERVICE_NAME = "state.limeobjects";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Service LimeObjectRepository}
|
|
7
|
+
*/
|
|
8
|
+
LimeObjectRepository: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceName['LimeObjectRepository']): Service;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StateOptions, ContextAwareStateOptions } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Config for the {@link SelectLimeTypes} state decorator
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectLimeTypesOptions extends StateOptions {
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Gets an object with all limetypes where name is used as key
|
|
10
|
+
*
|
|
11
|
+
* @param {SelectLimeTypesOptions} [options] state decorator options
|
|
12
|
+
* @returns {Function} state decorator
|
|
13
|
+
*/
|
|
14
|
+
export declare function SelectLimeTypes(options?: SelectLimeTypesOptions): PropertyDecorator;
|
|
15
|
+
/**
|
|
16
|
+
* Get the limetype for the current context
|
|
17
|
+
*
|
|
18
|
+
* @param {StateOptions} [options] state decorator options
|
|
19
|
+
* @returns {Function} state decorator
|
|
20
|
+
*/
|
|
21
|
+
export declare function SelectCurrentLimeType(options?: ContextAwareStateOptions): PropertyDecorator;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PlatformServiceName, } from '../core';
|
|
2
|
+
import { createStateDecorator } from '../core/decorators/factory';
|
|
3
|
+
/**
|
|
4
|
+
* Gets an object with all limetypes where name is used as key
|
|
5
|
+
*
|
|
6
|
+
* @param {SelectLimeTypesOptions} [options] state decorator options
|
|
7
|
+
* @returns {Function} state decorator
|
|
8
|
+
*/
|
|
9
|
+
export function SelectLimeTypes(options = {}) {
|
|
10
|
+
const config = {
|
|
11
|
+
name: PlatformServiceName.LimeTypeRepository,
|
|
12
|
+
};
|
|
13
|
+
return createStateDecorator(options, config);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the limetype for the current context
|
|
17
|
+
*
|
|
18
|
+
* @param {StateOptions} [options] state decorator options
|
|
19
|
+
* @returns {Function} state decorator
|
|
20
|
+
*/
|
|
21
|
+
export function SelectCurrentLimeType(options = {}) {
|
|
22
|
+
const config = {
|
|
23
|
+
name: PlatformServiceName.LimeTypeRepository,
|
|
24
|
+
};
|
|
25
|
+
options.map = [currentLimetype, ...(options.map || [])];
|
|
26
|
+
options.context = null;
|
|
27
|
+
return createStateDecorator(options, config);
|
|
28
|
+
}
|
|
29
|
+
function currentLimetype(limetypes) {
|
|
30
|
+
const { limetype } = this.context;
|
|
31
|
+
return limetypes[limetype];
|
|
32
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Acl } from './acl';
|
|
2
|
+
import { LimeProperty } from './property';
|
|
3
|
+
export interface LimeType {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
acl: Acl;
|
|
7
|
+
localname: {
|
|
8
|
+
singular: string;
|
|
9
|
+
plural: string;
|
|
10
|
+
};
|
|
11
|
+
properties: Record<string, LimeProperty>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a property by name
|
|
14
|
+
*
|
|
15
|
+
* @param {string} name name of property to get. Allows a path to be
|
|
16
|
+
* specified using dot notation to get properties of relations
|
|
17
|
+
*
|
|
18
|
+
* @throws Will throw an error containing the name of the missing property
|
|
19
|
+
* @returns {LimeProperty} the property specified by the name argument
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const phoneProperty = dealLimetype.getProperty('company.phone')
|
|
23
|
+
*/
|
|
24
|
+
getProperty(name: string): LimeProperty;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Acl } from './acl';
|
|
2
|
+
import { LimeType } from './limetype';
|
|
3
|
+
export interface LimeProperty {
|
|
4
|
+
acl: Acl;
|
|
5
|
+
defaultvalue: any;
|
|
6
|
+
fieldorder: number;
|
|
7
|
+
has_sql?: boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
length?: number;
|
|
10
|
+
localname: string;
|
|
11
|
+
name: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
type: PropertyType;
|
|
14
|
+
options?: Option[];
|
|
15
|
+
relation?: {
|
|
16
|
+
getLimetype: () => LimeType;
|
|
17
|
+
getBackreference: () => LimeProperty;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface Option {
|
|
21
|
+
key: string;
|
|
22
|
+
inactive: boolean;
|
|
23
|
+
text: string;
|
|
24
|
+
order?: number;
|
|
25
|
+
id?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare type PropertyType = 'string' | 'text' | 'phone' | 'integer' | 'decimal' | 'percent' | 'time' | 'timeofday' | 'date' | 'year' | 'quarter' | 'month' | 'yesno' | 'link' | 'user' | 'xml' | 'option' | 'set' | 'file' | 'hasone' | 'hasmany' | 'belongsto' | 'hasandbelongstomany' | 'system';
|
|
28
|
+
export declare function isRelation(property: LimeProperty): boolean;
|
|
29
|
+
export declare function isSingleRelation(property: LimeProperty): boolean;
|
|
30
|
+
export declare function isDate(property: LimeProperty): boolean;
|
|
31
|
+
export declare function isString(property: LimeProperty): boolean;
|
|
32
|
+
export declare function isFloat(property: LimeProperty): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function isRelation(property) {
|
|
2
|
+
const propTypes = [
|
|
3
|
+
'belongsto',
|
|
4
|
+
'hasone',
|
|
5
|
+
'hasmany',
|
|
6
|
+
'hasandbelongstomany',
|
|
7
|
+
];
|
|
8
|
+
return property && propTypes.includes(property.type);
|
|
9
|
+
}
|
|
10
|
+
export function isSingleRelation(property) {
|
|
11
|
+
const propTypes = ['belongsto', 'hasone'];
|
|
12
|
+
return property && propTypes.includes(property.type);
|
|
13
|
+
}
|
|
14
|
+
export function isDate(property) {
|
|
15
|
+
const propTypes = [
|
|
16
|
+
'time',
|
|
17
|
+
'timeofday',
|
|
18
|
+
'date',
|
|
19
|
+
'year',
|
|
20
|
+
'quarter',
|
|
21
|
+
'month',
|
|
22
|
+
];
|
|
23
|
+
return property && propTypes.includes(property.type);
|
|
24
|
+
}
|
|
25
|
+
export function isString(property) {
|
|
26
|
+
const propTypes = ['string', 'text', 'phone', 'link'];
|
|
27
|
+
return property && propTypes.includes(property.type);
|
|
28
|
+
}
|
|
29
|
+
export function isFloat(property) {
|
|
30
|
+
const propTypes = ['decimal', 'percent'];
|
|
31
|
+
return property && propTypes.includes(property.type);
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StateRepository } from '../core';
|
|
2
|
+
declare const SERVICE_NAME = "state.limetypes";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceName {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link StateRepository}
|
|
7
|
+
*/
|
|
8
|
+
LimeTypeRepository: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceName['LimeTypeRepository']): StateRepository;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ContextAwareStateOptions } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Config for the {@link SelectQueryParam} decorator
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectQueryParamOptions extends ContextAwareStateOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The query param to select
|
|
8
|
+
*/
|
|
9
|
+
selector: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Gets a named query param from the location
|
|
13
|
+
*
|
|
14
|
+
* @experimental
|
|
15
|
+
* @param {StateOptions} options state decorator options
|
|
16
|
+
* @returns {PropertyDecorator} state decorator
|
|
17
|
+
*/
|
|
18
|
+
export declare function SelectQueryParam(options: SelectQueryParamOptions): PropertyDecorator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PlatformServiceName } from '../core';
|
|
2
|
+
import { createStateDecorator, } from '../core/decorators/factory';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a named query param from the location
|
|
5
|
+
*
|
|
6
|
+
* @experimental
|
|
7
|
+
* @param {StateOptions} options state decorator options
|
|
8
|
+
* @returns {PropertyDecorator} state decorator
|
|
9
|
+
*/
|
|
10
|
+
export function SelectQueryParam(options) {
|
|
11
|
+
const config = {
|
|
12
|
+
name: PlatformServiceName.Navigator,
|
|
13
|
+
};
|
|
14
|
+
return createStateDecorator(Object.assign({ context: null }, options), config);
|
|
15
|
+
}
|