@limetech/lime-web-components 5.46.0 → 6.0.0-beta.2
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 +46 -0
- package/dist/action/action.d.ts +4 -4
- package/dist/application/repository.d.ts +1 -1
- package/dist/application/session.d.ts +0 -5
- package/dist/application/session.d.ts.map +1 -1
- package/dist/commandbus/commandbus.d.ts +4 -4
- package/dist/conditionregistry/conditionregistry.d.ts +6 -6
- package/dist/config/repository.d.ts +1 -2
- package/dist/config/repository.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/metadata.d.ts +2 -2
- package/dist/core/platform.d.ts +2 -7
- package/dist/core/platform.d.ts.map +1 -1
- package/dist/datetimeformatter/datetimeformatter.d.ts +4 -4
- package/dist/index.cjs.js +4 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +956 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/limeobject/commands/bulk-create-dialog.d.ts +0 -14
- package/dist/limeobject/commands/bulk-create-dialog.d.ts.map +1 -1
- package/dist/limeobject/commands/create-dialog.d.ts +0 -2
- package/dist/limeobject/commands/create-dialog.d.ts.map +1 -1
- package/dist/limeobject/commands/delete-object.d.ts +0 -9
- package/dist/limeobject/commands/delete-object.d.ts.map +1 -1
- package/dist/limeobject/commands/object-access.d.ts +0 -9
- package/dist/limeobject/commands/object-access.d.ts.map +1 -1
- package/dist/limeobject/commands/save-object.d.ts +1 -1
- package/dist/limeobject/file.d.ts +4 -2
- package/dist/limeobject/file.d.ts.map +1 -1
- package/dist/limeobject/limeobject.d.ts +1 -2
- package/dist/limeobject/limeobject.d.ts.map +1 -1
- package/dist/limeobject/repository.d.ts +4 -6
- package/dist/limeobject/repository.d.ts.map +1 -1
- package/dist/limetype/fixture.d.ts +4 -0
- package/dist/limetype/fixture.d.ts.map +1 -0
- package/dist/limetype/repository.d.ts +1 -1
- package/dist/navigator/command.d.ts +1 -1
- package/dist/navigator/decorator.d.ts +2 -2
- package/dist/navigator/navigator.d.ts +7 -7
- package/dist/navigator/types.d.ts +0 -3
- package/dist/navigator/types.d.ts.map +1 -1
- package/dist/notification-service/notification.d.ts +2 -2
- package/dist/notification-service/repository.d.ts +4 -4
- package/dist/query/query.d.ts +59 -8
- package/dist/query/query.d.ts.map +1 -1
- package/dist/routeregistry/registry.d.ts +3 -3
- package/dist/routeregistry/types.d.ts +0 -3
- package/dist/routeregistry/types.d.ts.map +1 -1
- package/dist/userpreferences/repository.d.ts +1 -1
- package/dist/view/registry.d.ts +2 -2
- package/dist/view/types.d.ts +2 -2
- package/dist/webcomponent/registry.d.ts +2 -2
- package/package.json +15 -8
- package/dist/action/action.js +0 -1
- package/dist/action/index.js +0 -1
- package/dist/application/decorators/application.js +0 -20
- package/dist/application/decorators/index.js +0 -3
- package/dist/application/decorators/session.js +0 -20
- package/dist/application/decorators/user.js +0 -20
- package/dist/application/index.js +0 -5
- package/dist/application/repository.js +0 -1
- package/dist/application/session.js +0 -1
- package/dist/application/types.js +0 -3
- package/dist/application/user.js +0 -1
- package/dist/commandbus/commandbus.js +0 -95
- package/dist/commandbus/commandbus.spec.js +0 -55
- package/dist/commandbus/index.js +0 -2
- package/dist/commandbus/types.js +0 -3
- package/dist/conditionregistry/conditionregistry.js +0 -18
- package/dist/conditionregistry/index.js +0 -2
- package/dist/conditionregistry/types.js +0 -3
- package/dist/config/decorator.js +0 -16
- package/dist/config/index.js +0 -3
- package/dist/config/repository.js +0 -1
- package/dist/config/types.js +0 -3
- package/dist/core/context.js +0 -1
- package/dist/core/decorators/factory.js +0 -243
- package/dist/core/decorators/factory.spec.js +0 -327
- package/dist/core/decorators/index.js +0 -1
- package/dist/core/idle.js +0 -7
- package/dist/core/index.js +0 -8
- package/dist/core/lime-web-component.js +0 -1
- package/dist/core/metadata.js +0 -1
- package/dist/core/platform.js +0 -8
- package/dist/core/plugin-loader.js +0 -1
- package/dist/core/state.js +0 -1
- package/dist/datetimeformatter/datetimeformatter.js +0 -1
- package/dist/datetimeformatter/index.js +0 -2
- package/dist/datetimeformatter/types.js +0 -3
- package/dist/device/decorator.js +0 -18
- package/dist/device/device.js +0 -1
- package/dist/device/index.js +0 -3
- package/dist/device/types.js +0 -3
- package/dist/dialog/dialog.js +0 -1
- package/dist/dialog/index.js +0 -2
- package/dist/dialog/types.js +0 -3
- package/dist/es5/action/action.js +0 -2
- package/dist/es5/action/index.js +0 -4
- package/dist/es5/application/decorators/application.js +0 -18
- package/dist/es5/application/decorators/index.js +0 -6
- package/dist/es5/application/decorators/session.js +0 -18
- package/dist/es5/application/decorators/user.js +0 -18
- package/dist/es5/application/index.js +0 -8
- package/dist/es5/application/repository.js +0 -2
- package/dist/es5/application/session.js +0 -2
- package/dist/es5/application/types.js +0 -5
- package/dist/es5/application/user.js +0 -2
- package/dist/es5/commandbus/commandbus.js +0 -51
- package/dist/es5/commandbus/commandbus.spec.js +0 -67
- package/dist/es5/commandbus/index.js +0 -5
- package/dist/es5/commandbus/types.js +0 -5
- package/dist/es5/conditionregistry/conditionregistry.js +0 -11
- package/dist/es5/conditionregistry/index.js +0 -5
- package/dist/es5/conditionregistry/types.js +0 -5
- package/dist/es5/config/decorator.js +0 -12
- package/dist/es5/config/index.js +0 -6
- package/dist/es5/config/repository.js +0 -2
- package/dist/es5/config/types.js +0 -5
- package/dist/es5/core/context.js +0 -2
- package/dist/es5/core/decorators/factory.js +0 -202
- package/dist/es5/core/decorators/factory.spec.js +0 -479
- package/dist/es5/core/decorators/index.js +0 -2
- package/dist/es5/core/idle.js +0 -4
- package/dist/es5/core/index.js +0 -11
- package/dist/es5/core/lime-web-component.js +0 -2
- package/dist/es5/core/metadata.js +0 -2
- package/dist/es5/core/platform.js +0 -6
- package/dist/es5/core/plugin-loader.js +0 -2
- package/dist/es5/core/state.js +0 -2
- package/dist/es5/datetimeformatter/datetimeformatter.js +0 -2
- package/dist/es5/datetimeformatter/index.js +0 -5
- package/dist/es5/datetimeformatter/types.js +0 -5
- package/dist/es5/device/decorator.js +0 -13
- package/dist/es5/device/device.js +0 -2
- package/dist/es5/device/index.js +0 -6
- package/dist/es5/device/types.js +0 -5
- package/dist/es5/dialog/dialog.js +0 -2
- package/dist/es5/dialog/index.js +0 -5
- package/dist/es5/dialog/types.js +0 -5
- package/dist/es5/eventdispatcher/eventdispatcher.js +0 -2
- package/dist/es5/eventdispatcher/index.js +0 -5
- package/dist/es5/eventdispatcher/types.js +0 -5
- package/dist/es5/filter/decorator.js +0 -13
- package/dist/es5/filter/index.js +0 -6
- package/dist/es5/filter/repository.js +0 -2
- package/dist/es5/filter/types.js +0 -5
- package/dist/es5/http/http.js +0 -10
- package/dist/es5/http/index.js +0 -5
- package/dist/es5/http/types.js +0 -5
- package/dist/es5/index.js +0 -30
- package/dist/es5/keybindings/index.js +0 -5
- package/dist/es5/keybindings/registry.js +0 -2
- package/dist/es5/keybindings/types.js +0 -5
- package/dist/es5/limeobject/commands/bulk-create-dialog.js +0 -17
- package/dist/es5/limeobject/commands/create-dialog.js +0 -17
- package/dist/es5/limeobject/commands/delete-object.js +0 -16
- package/dist/es5/limeobject/commands/index.js +0 -8
- package/dist/es5/limeobject/commands/object-access.js +0 -16
- package/dist/es5/limeobject/commands/save-object.js +0 -17
- package/dist/es5/limeobject/decorator.js +0 -38
- package/dist/es5/limeobject/error.js +0 -2
- package/dist/es5/limeobject/file.js +0 -2
- package/dist/es5/limeobject/index.js +0 -10
- package/dist/es5/limeobject/limeobject.js +0 -2
- package/dist/es5/limeobject/repository.js +0 -2
- package/dist/es5/limeobject/types.js +0 -5
- package/dist/es5/limetype/acl.js +0 -2
- package/dist/es5/limetype/decorator.js +0 -28
- package/dist/es5/limetype/find-limetype-by-label.js +0 -8
- package/dist/es5/limetype/find-limetype-by-label.spec.js +0 -47
- package/dist/es5/limetype/get-properties-by-type.js +0 -7
- package/dist/es5/limetype/get-properties-by-type.spec.js +0 -36
- package/dist/es5/limetype/get-property-by-label.js +0 -8
- package/dist/es5/limetype/get-property-by-label.spec.js +0 -33
- package/dist/es5/limetype/get-property-by-name.js +0 -7
- package/dist/es5/limetype/get-property-by-name.spec.js +0 -31
- package/dist/es5/limetype/has-label.js +0 -7
- package/dist/es5/limetype/has-label.spec.js +0 -30
- package/dist/es5/limetype/index.js +0 -14
- package/dist/es5/limetype/limetype.js +0 -2
- package/dist/es5/limetype/property.js +0 -40
- package/dist/es5/limetype/repository.js +0 -2
- package/dist/es5/limetype/types.js +0 -5
- package/dist/es5/navigator/command.js +0 -16
- package/dist/es5/navigator/decorator.js +0 -13
- package/dist/es5/navigator/index.js +0 -7
- package/dist/es5/navigator/navigator.js +0 -2
- package/dist/es5/navigator/types.js +0 -5
- package/dist/es5/notification-service/index.js +0 -6
- package/dist/es5/notification-service/notification.js +0 -2
- package/dist/es5/notification-service/repository.js +0 -2
- package/dist/es5/notification-service/types.js +0 -5
- package/dist/es5/notifications/index.js +0 -5
- package/dist/es5/notifications/notifications.js +0 -2
- package/dist/es5/notifications/types.js +0 -5
- package/dist/es5/poller/factory.js +0 -2
- package/dist/es5/poller/index.js +0 -6
- package/dist/es5/poller/poller.js +0 -2
- package/dist/es5/poller/types.js +0 -5
- package/dist/es5/query/index.js +0 -6
- package/dist/es5/query/query.js +0 -26
- package/dist/es5/query/service.js +0 -2
- package/dist/es5/query/types.js +0 -5
- package/dist/es5/routeregistry/index.js +0 -5
- package/dist/es5/routeregistry/registry.js +0 -2
- package/dist/es5/routeregistry/types.js +0 -5
- package/dist/es5/task/index.js +0 -5
- package/dist/es5/task/repository.js +0 -17
- package/dist/es5/task/types.js +0 -5
- package/dist/es5/testing/component-testing.js +0 -109
- package/dist/es5/testing/component-testing.spec.js +0 -88
- package/dist/es5/testing/index.js +0 -11
- package/dist/es5/testing/limeobjects/company.js +0 -660
- package/dist/es5/testing/limeobjects/coworker.js +0 -110
- package/dist/es5/testing/limeobjects/deal.js +0 -447
- package/dist/es5/testing/limeobjects/document.js +0 -82
- package/dist/es5/testing/limeobjects/index.js +0 -56
- package/dist/es5/testing/limeobjects/person.js +0 -1162
- package/dist/es5/testing/limeobjects/todo.js +0 -106
- package/dist/es5/testing/limetypes/campaign.js +0 -486
- package/dist/es5/testing/limetypes/company.js +0 -621
- package/dist/es5/testing/limetypes/consent.js +0 -237
- package/dist/es5/testing/limetypes/consenttype.js +0 -194
- package/dist/es5/testing/limetypes/coworker.js +0 -579
- package/dist/es5/testing/limetypes/deal.js +0 -422
- package/dist/es5/testing/limetypes/document.js +0 -343
- package/dist/es5/testing/limetypes/helpdesk.js +0 -426
- package/dist/es5/testing/limetypes/helpdesktype.js +0 -142
- package/dist/es5/testing/limetypes/history.js +0 -349
- package/dist/es5/testing/limetypes/index.js +0 -69
- package/dist/es5/testing/limetypes/infotiles.js +0 -514
- package/dist/es5/testing/limetypes/localize.js +0 -287
- package/dist/es5/testing/limetypes/mailing.js +0 -218
- package/dist/es5/testing/limetypes/office.js +0 -388
- package/dist/es5/testing/limetypes/participant.js +0 -195
- package/dist/es5/testing/limetypes/person.js +0 -535
- package/dist/es5/testing/limetypes/recipient.js +0 -175
- package/dist/es5/testing/limetypes/solutionimprovement.js +0 -353
- package/dist/es5/testing/limetypes/successplan.js +0 -215
- package/dist/es5/testing/limetypes/target.js +0 -181
- package/dist/es5/testing/limetypes/todo.js +0 -429
- package/dist/es5/testing/platform/index.js +0 -53
- package/dist/es5/testing/platform/platform.spec.js +0 -44
- package/dist/es5/testing/services/datetimeformatter.js +0 -12
- package/dist/es5/testing/services/index.js +0 -5
- package/dist/es5/testing/services/translator.js +0 -9
- package/dist/es5/translator/index.js +0 -5
- package/dist/es5/translator/translator.js +0 -2
- package/dist/es5/translator/types.js +0 -5
- package/dist/es5/userdata/decorator.js +0 -13
- package/dist/es5/userdata/index.js +0 -6
- package/dist/es5/userdata/repository.js +0 -2
- package/dist/es5/userdata/types.js +0 -5
- package/dist/es5/userpreferences/index.js +0 -5
- package/dist/es5/userpreferences/repository.js +0 -2
- package/dist/es5/userpreferences/types.js +0 -5
- package/dist/es5/view/index.js +0 -6
- package/dist/es5/view/layout.js +0 -2
- package/dist/es5/view/registry.js +0 -2
- package/dist/es5/view/types.js +0 -5
- package/dist/es5/webcomponent/index.js +0 -5
- package/dist/es5/webcomponent/registry.js +0 -2
- package/dist/es5/webcomponent/types.js +0 -5
- package/dist/eventdispatcher/eventdispatcher.js +0 -1
- package/dist/eventdispatcher/index.js +0 -2
- package/dist/eventdispatcher/types.js +0 -3
- package/dist/filter/decorator.js +0 -16
- package/dist/filter/index.js +0 -3
- package/dist/filter/repository.js +0 -1
- package/dist/filter/types.js +0 -3
- package/dist/http/http.js +0 -13
- package/dist/http/index.js +0 -2
- package/dist/http/types.js +0 -3
- package/dist/index.js +0 -49
- package/dist/keybindings/index.js +0 -2
- package/dist/keybindings/registry.js +0 -1
- package/dist/keybindings/types.js +0 -3
- package/dist/limeobject/commands/bulk-create-dialog.js +0 -53
- package/dist/limeobject/commands/create-dialog.js +0 -28
- package/dist/limeobject/commands/delete-object.js +0 -17
- package/dist/limeobject/commands/index.js +0 -5
- package/dist/limeobject/commands/object-access.js +0 -17
- package/dist/limeobject/commands/save-object.js +0 -23
- package/dist/limeobject/decorator.js +0 -46
- package/dist/limeobject/error.js +0 -1
- package/dist/limeobject/file.js +0 -1
- package/dist/limeobject/index.js +0 -7
- package/dist/limeobject/limeobject.js +0 -1
- package/dist/limeobject/repository.js +0 -1
- package/dist/limeobject/types.js +0 -3
- package/dist/limetype/acl.js +0 -1
- package/dist/limetype/decorator.js +0 -36
- package/dist/limetype/find-limetype-by-label.js +0 -43
- package/dist/limetype/find-limetype-by-label.spec.js +0 -44
- package/dist/limetype/get-properties-by-type.js +0 -16
- package/dist/limetype/get-properties-by-type.spec.js +0 -31
- package/dist/limetype/get-property-by-label.js +0 -17
- package/dist/limetype/get-property-by-label.spec.js +0 -26
- package/dist/limetype/get-property-by-name.js +0 -17
- package/dist/limetype/get-property-by-name.spec.js +0 -26
- package/dist/limetype/has-label.js +0 -29
- package/dist/limetype/has-label.spec.js +0 -31
- package/dist/limetype/index.js +0 -11
- package/dist/limetype/limetype.js +0 -1
- package/dist/limetype/property.js +0 -52
- package/dist/limetype/repository.js +0 -1
- package/dist/limetype/types.js +0 -3
- package/dist/navigator/command.js +0 -17
- package/dist/navigator/decorator.js +0 -16
- package/dist/navigator/index.js +0 -4
- package/dist/navigator/navigator.js +0 -1
- package/dist/navigator/types.js +0 -3
- package/dist/notification-service/index.js +0 -3
- package/dist/notification-service/notification.js +0 -1
- package/dist/notification-service/repository.js +0 -1
- package/dist/notification-service/types.js +0 -3
- package/dist/notifications/index.js +0 -2
- package/dist/notifications/notifications.js +0 -1
- package/dist/notifications/types.js +0 -3
- package/dist/poller/factory.js +0 -1
- package/dist/poller/index.js +0 -3
- package/dist/poller/poller.js +0 -1
- package/dist/poller/types.js +0 -3
- package/dist/query/index.js +0 -3
- package/dist/query/query.js +0 -31
- package/dist/query/service.js +0 -1
- package/dist/query/types.js +0 -3
- package/dist/routeregistry/index.js +0 -2
- package/dist/routeregistry/registry.js +0 -1
- package/dist/routeregistry/types.js +0 -3
- package/dist/task/index.js +0 -2
- package/dist/task/repository.js +0 -53
- package/dist/task/types.js +0 -3
- package/dist/testing/component-testing.d.ts +0 -74
- package/dist/testing/component-testing.d.ts.map +0 -1
- package/dist/testing/component-testing.js +0 -177
- package/dist/testing/component-testing.spec.d.ts +0 -11
- package/dist/testing/component-testing.spec.d.ts.map +0 -1
- package/dist/testing/component-testing.spec.js +0 -71
- package/dist/testing/index.d.ts +0 -6
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -5
- package/dist/testing/limeobjects/company.d.ts +0 -56
- package/dist/testing/limeobjects/company.d.ts.map +0 -1
- package/dist/testing/limeobjects/company.js +0 -656
- package/dist/testing/limeobjects/coworker.d.ts +0 -23
- package/dist/testing/limeobjects/coworker.d.ts.map +0 -1
- package/dist/testing/limeobjects/coworker.js +0 -106
- package/dist/testing/limeobjects/deal.d.ts +0 -42
- package/dist/testing/limeobjects/deal.d.ts.map +0 -1
- package/dist/testing/limeobjects/deal.js +0 -443
- package/dist/testing/limeobjects/document.d.ts +0 -21
- package/dist/testing/limeobjects/document.d.ts.map +0 -1
- package/dist/testing/limeobjects/document.js +0 -78
- package/dist/testing/limeobjects/index.d.ts +0 -207
- package/dist/testing/limeobjects/index.d.ts.map +0 -1
- package/dist/testing/limeobjects/index.js +0 -55
- package/dist/testing/limeobjects/person.d.ts +0 -21
- package/dist/testing/limeobjects/person.d.ts.map +0 -1
- package/dist/testing/limeobjects/person.js +0 -1158
- package/dist/testing/limeobjects/todo.d.ts +0 -27
- package/dist/testing/limeobjects/todo.d.ts.map +0 -1
- package/dist/testing/limeobjects/todo.js +0 -102
- package/dist/testing/limetypes/campaign.d.ts +0 -418
- package/dist/testing/limetypes/campaign.d.ts.map +0 -1
- package/dist/testing/limetypes/campaign.js +0 -477
- package/dist/testing/limetypes/company.d.ts +0 -592
- package/dist/testing/limetypes/company.d.ts.map +0 -1
- package/dist/testing/limetypes/company.js +0 -614
- package/dist/testing/limetypes/consent.d.ts +0 -200
- package/dist/testing/limetypes/consent.d.ts.map +0 -1
- package/dist/testing/limetypes/consent.js +0 -232
- package/dist/testing/limetypes/consenttype.d.ts +0 -189
- package/dist/testing/limetypes/consenttype.d.ts.map +0 -1
- package/dist/testing/limetypes/consenttype.js +0 -189
- package/dist/testing/limetypes/coworker.d.ts +0 -564
- package/dist/testing/limetypes/coworker.d.ts.map +0 -1
- package/dist/testing/limetypes/coworker.js +0 -564
- package/dist/testing/limetypes/deal.d.ts +0 -392
- package/dist/testing/limetypes/deal.d.ts.map +0 -1
- package/dist/testing/limetypes/deal.js +0 -419
- package/dist/testing/limetypes/document.d.ts +0 -310
- package/dist/testing/limetypes/document.d.ts.map +0 -1
- package/dist/testing/limetypes/document.js +0 -332
- package/dist/testing/limetypes/helpdesk.d.ts +0 -395
- package/dist/testing/limetypes/helpdesk.d.ts.map +0 -1
- package/dist/testing/limetypes/helpdesk.js +0 -417
- package/dist/testing/limetypes/helpdesktype.d.ts +0 -137
- package/dist/testing/limetypes/helpdesktype.d.ts.map +0 -1
- package/dist/testing/limetypes/helpdesktype.js +0 -137
- package/dist/testing/limetypes/history.d.ts +0 -309
- package/dist/testing/limetypes/history.d.ts.map +0 -1
- package/dist/testing/limetypes/history.js +0 -346
- package/dist/testing/limetypes/index.d.ts +0 -10
- package/dist/testing/limetypes/index.d.ts.map +0 -1
- package/dist/testing/limetypes/index.js +0 -67
- package/dist/testing/limetypes/infotiles.d.ts +0 -388
- package/dist/testing/limetypes/infotiles.d.ts.map +0 -1
- package/dist/testing/limetypes/infotiles.js +0 -509
- package/dist/testing/limetypes/localize.d.ts +0 -284
- package/dist/testing/limetypes/localize.d.ts.map +0 -1
- package/dist/testing/limetypes/localize.js +0 -284
- package/dist/testing/limetypes/mailing.d.ts +0 -213
- package/dist/testing/limetypes/mailing.d.ts.map +0 -1
- package/dist/testing/limetypes/mailing.js +0 -213
- package/dist/testing/limetypes/office.d.ts +0 -385
- package/dist/testing/limetypes/office.d.ts.map +0 -1
- package/dist/testing/limetypes/office.js +0 -385
- package/dist/testing/limetypes/participant.d.ts +0 -166
- package/dist/testing/limetypes/participant.d.ts.map +0 -1
- package/dist/testing/limetypes/participant.js +0 -188
- package/dist/testing/limetypes/person.d.ts +0 -473
- package/dist/testing/limetypes/person.d.ts.map +0 -1
- package/dist/testing/limetypes/person.js +0 -530
- package/dist/testing/limetypes/recipient.d.ts +0 -148
- package/dist/testing/limetypes/recipient.d.ts.map +0 -1
- package/dist/testing/limetypes/recipient.js +0 -170
- package/dist/testing/limetypes/solutionimprovement.d.ts +0 -303
- package/dist/testing/limetypes/solutionimprovement.d.ts.map +0 -1
- package/dist/testing/limetypes/solutionimprovement.js +0 -344
- package/dist/testing/limetypes/successplan.d.ts +0 -210
- package/dist/testing/limetypes/successplan.d.ts.map +0 -1
- package/dist/testing/limetypes/successplan.js +0 -210
- package/dist/testing/limetypes/target.d.ts +0 -161
- package/dist/testing/limetypes/target.d.ts.map +0 -1
- package/dist/testing/limetypes/target.js +0 -178
- package/dist/testing/limetypes/todo.d.ts +0 -387
- package/dist/testing/limetypes/todo.d.ts.map +0 -1
- package/dist/testing/limetypes/todo.js +0 -426
- package/dist/testing/platform/index.d.ts +0 -10
- package/dist/testing/platform/index.d.ts.map +0 -1
- package/dist/testing/platform/index.js +0 -62
- package/dist/testing/platform/platform.spec.d.ts +0 -2
- package/dist/testing/platform/platform.spec.d.ts.map +0 -1
- package/dist/testing/platform/platform.spec.js +0 -41
- package/dist/testing/services/datetimeformatter.d.ts +0 -7
- package/dist/testing/services/datetimeformatter.d.ts.map +0 -1
- package/dist/testing/services/datetimeformatter.js +0 -10
- package/dist/testing/services/index.d.ts +0 -3
- package/dist/testing/services/index.d.ts.map +0 -1
- package/dist/testing/services/index.js +0 -2
- package/dist/testing/services/translator.d.ts +0 -7
- package/dist/testing/services/translator.d.ts.map +0 -1
- package/dist/testing/services/translator.js +0 -9
- package/dist/translator/index.js +0 -2
- package/dist/translator/translator.js +0 -1
- package/dist/translator/types.js +0 -3
- package/dist/userdata/decorator.js +0 -16
- package/dist/userdata/index.js +0 -3
- package/dist/userdata/repository.js +0 -1
- package/dist/userdata/types.js +0 -3
- package/dist/userpreferences/index.js +0 -2
- package/dist/userpreferences/repository.js +0 -1
- package/dist/userpreferences/types.js +0 -3
- package/dist/view/index.js +0 -3
- package/dist/view/layout.js +0 -1
- package/dist/view/registry.js +0 -1
- package/dist/view/types.js +0 -3
- package/dist/webcomponent/index.js +0 -2
- package/dist/webcomponent/registry.js +0 -1
- package/dist/webcomponent/types.js +0 -3
- package/testing/package.json +0 -14
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
/* eslint-disable max-classes-per-file */
|
|
3
|
-
const getElement = (component) => component.el || (component.el = new LimeWebComponentElement(component));
|
|
4
|
-
jest.mock('@stencil/core', () => {
|
|
5
|
-
const original = jest.requireActual('@stencil/core');
|
|
6
|
-
return Object.assign(Object.assign({}, original), { getElement: getElement });
|
|
7
|
-
});
|
|
8
|
-
import { createStateDecorator } from './factory';
|
|
9
|
-
import { Subject, firstValueFrom } from 'rxjs';
|
|
10
|
-
describe('createStateDecorator', () => {
|
|
11
|
-
let platform;
|
|
12
|
-
let context;
|
|
13
|
-
let service;
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
service = new TestService();
|
|
16
|
-
const services = {
|
|
17
|
-
test: service,
|
|
18
|
-
};
|
|
19
|
-
platform = {
|
|
20
|
-
has: jest.fn((name) => name in services),
|
|
21
|
-
get: jest.fn((name) => services[name]),
|
|
22
|
-
};
|
|
23
|
-
context = {};
|
|
24
|
-
});
|
|
25
|
-
describe('when using a state decorator on a property', () => {
|
|
26
|
-
it('adds required lifecycle hooks on the component', () => {
|
|
27
|
-
const Decorator = () => createStateDecorator({}, { name: 'test' });
|
|
28
|
-
class MyComponent {
|
|
29
|
-
}
|
|
30
|
-
__decorate([
|
|
31
|
-
Decorator()
|
|
32
|
-
], MyComponent.prototype, "foo", void 0);
|
|
33
|
-
const component = new MyComponent();
|
|
34
|
-
expect(typeof component.connectedCallback).toEqual('function');
|
|
35
|
-
expect(typeof component.componentWillLoad).toEqual('function');
|
|
36
|
-
expect(typeof component.componentDidUnload).toEqual('function');
|
|
37
|
-
expect(typeof component.disconnectedCallback).toEqual('function');
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe('when more than one property is decorated', () => {
|
|
41
|
-
it('only extends the lifecycle methods once', () => {
|
|
42
|
-
const Decorator = () => createStateDecorator({}, { name: 'test' });
|
|
43
|
-
class MyComponent {
|
|
44
|
-
}
|
|
45
|
-
__decorate([
|
|
46
|
-
Decorator()
|
|
47
|
-
], MyComponent.prototype, "foo", void 0);
|
|
48
|
-
const component = new MyComponent();
|
|
49
|
-
const connectedCallback = component.connectedCallback;
|
|
50
|
-
const componentWillLoad = component.componentWillLoad;
|
|
51
|
-
const componentDidUnload = component.componentDidUnload;
|
|
52
|
-
const disconnectedCallback = component.disconnectedCallback;
|
|
53
|
-
Decorator()(MyComponent.prototype, 'bar');
|
|
54
|
-
expect(component.connectedCallback).toEqual(connectedCallback);
|
|
55
|
-
expect(component.componentWillLoad).toEqual(componentWillLoad);
|
|
56
|
-
expect(component.componentDidUnload).toEqual(componentDidUnload);
|
|
57
|
-
expect(component.disconnectedCallback).toEqual(disconnectedCallback);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe('when lifecycle hooks already exist', () => {
|
|
61
|
-
it('overwrites the lifecycle hooks', () => {
|
|
62
|
-
const Decorator = () => createStateDecorator({}, { name: 'test' });
|
|
63
|
-
class MyComponent {
|
|
64
|
-
connectedCallback() { }
|
|
65
|
-
componentWillLoad() { }
|
|
66
|
-
componentDidUnload() { }
|
|
67
|
-
disconnectedCallback() { }
|
|
68
|
-
}
|
|
69
|
-
const component = new MyComponent();
|
|
70
|
-
const connectedCallback = component.connectedCallback;
|
|
71
|
-
const componentWillLoad = component.componentWillLoad;
|
|
72
|
-
const componentDidUnload = component.componentDidUnload;
|
|
73
|
-
const disconnectedCallback = component.disconnectedCallback;
|
|
74
|
-
Decorator()(MyComponent.prototype, 'foo');
|
|
75
|
-
expect(component.connectedCallback).not.toEqual(connectedCallback);
|
|
76
|
-
expect(component.componentWillLoad).not.toEqual(componentWillLoad);
|
|
77
|
-
expect(component.componentDidUnload).not.toEqual(componentDidUnload);
|
|
78
|
-
expect(component.disconnectedCallback).not.toEqual(disconnectedCallback);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('when invoking connectedCallback without required properties', () => {
|
|
82
|
-
let component;
|
|
83
|
-
let element;
|
|
84
|
-
beforeEach(() => {
|
|
85
|
-
const Decorator = () => createStateDecorator({}, { name: 'test' });
|
|
86
|
-
class MyComponent {
|
|
87
|
-
}
|
|
88
|
-
__decorate([
|
|
89
|
-
Decorator()
|
|
90
|
-
], MyComponent.prototype, "foo", void 0);
|
|
91
|
-
component = new MyComponent();
|
|
92
|
-
element = getElement(component);
|
|
93
|
-
});
|
|
94
|
-
it('returns a promise that does not resolve', () => {
|
|
95
|
-
expect.assertions(0);
|
|
96
|
-
component.connectedCallback().then(() => {
|
|
97
|
-
expect(false).toBeTruthy();
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
it('returns a promise that resolves when platform and context has been set', () => {
|
|
101
|
-
expect.assertions(1);
|
|
102
|
-
component.connectedCallback().then(() => {
|
|
103
|
-
expect(true).toBeTruthy();
|
|
104
|
-
});
|
|
105
|
-
component.platform = platform;
|
|
106
|
-
component.context = context;
|
|
107
|
-
element.platform = platform;
|
|
108
|
-
element.context = context;
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
describe('when invoking componentWillLoad without required properties', () => {
|
|
112
|
-
let component;
|
|
113
|
-
let element;
|
|
114
|
-
let spy;
|
|
115
|
-
beforeEach(() => {
|
|
116
|
-
spy = jest.fn(() => { });
|
|
117
|
-
const Decorator = () => createStateDecorator({}, { name: 'test' });
|
|
118
|
-
class MyComponent {
|
|
119
|
-
componentWillLoad() {
|
|
120
|
-
spy();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
__decorate([
|
|
124
|
-
Decorator()
|
|
125
|
-
], MyComponent.prototype, "foo", void 0);
|
|
126
|
-
component = new MyComponent();
|
|
127
|
-
element = getElement(component);
|
|
128
|
-
});
|
|
129
|
-
it('returns a promise that does not resolve', () => {
|
|
130
|
-
expect.assertions(0);
|
|
131
|
-
component.connectedCallback();
|
|
132
|
-
component.componentWillLoad().then(() => {
|
|
133
|
-
expect(false).toBeTruthy();
|
|
134
|
-
expect(spy).not.toHaveBeenCalled();
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
it('returns a promise that resolves when platform and context has been set', () => {
|
|
138
|
-
expect.assertions(3);
|
|
139
|
-
component.connectedCallback();
|
|
140
|
-
component.componentWillLoad().then(() => {
|
|
141
|
-
expect(true).toBeTruthy();
|
|
142
|
-
expect(spy).toHaveBeenCalledTimes(1);
|
|
143
|
-
});
|
|
144
|
-
expect(spy).toHaveBeenCalledTimes(0);
|
|
145
|
-
component.platform = platform;
|
|
146
|
-
component.context = context;
|
|
147
|
-
element.platform = platform;
|
|
148
|
-
element.context = context;
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
describe('when invoking connectedCallback or componentWillLoad with required properties', () => {
|
|
152
|
-
let component;
|
|
153
|
-
beforeEach(() => {
|
|
154
|
-
component = createComponent();
|
|
155
|
-
});
|
|
156
|
-
it('creates a subscription on the service', async () => {
|
|
157
|
-
await component.connectedCallback();
|
|
158
|
-
expect(service.getSubscriptions().length).toEqual(1);
|
|
159
|
-
});
|
|
160
|
-
it('creates a subscription on the service', async () => {
|
|
161
|
-
await component.componentWillLoad();
|
|
162
|
-
expect(service.getSubscriptions().length).toEqual(1);
|
|
163
|
-
});
|
|
164
|
-
describe('when invoking both connectedCallback and componentWillLoad', () => {
|
|
165
|
-
it('creates only one subscription on the service', async () => {
|
|
166
|
-
await component.connectedCallback();
|
|
167
|
-
await component.componentWillLoad();
|
|
168
|
-
expect(service.getSubscriptions().length).toEqual(1);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
describe('when multiple properties are decorated', () => {
|
|
173
|
-
let component;
|
|
174
|
-
beforeEach(() => {
|
|
175
|
-
component = createComponent({ foo: true, bar: true });
|
|
176
|
-
});
|
|
177
|
-
it('connectedCallback creates a subscription for each property', async () => {
|
|
178
|
-
await component.connectedCallback();
|
|
179
|
-
expect(service.getSubscriptions().length).toEqual(2);
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
describe('when invoking disconnectedCallback', () => {
|
|
183
|
-
let component;
|
|
184
|
-
beforeEach(async () => {
|
|
185
|
-
component = createComponent({ foo: true, bar: true });
|
|
186
|
-
await component.connectedCallback();
|
|
187
|
-
});
|
|
188
|
-
it('removes the subscriptions', () => {
|
|
189
|
-
expect(service.getSubscriptions().length).toEqual(2);
|
|
190
|
-
component.disconnectedCallback();
|
|
191
|
-
expect(service.getSubscriptions().length).toEqual(0);
|
|
192
|
-
});
|
|
193
|
-
describe('when invoked multiple times', () => {
|
|
194
|
-
it('does not crash', async () => {
|
|
195
|
-
expect(service.getSubscriptions().length).toEqual(2);
|
|
196
|
-
component.disconnectedCallback();
|
|
197
|
-
expect(service.getSubscriptions().length).toEqual(0);
|
|
198
|
-
expect(() => component.disconnectedCallback()).not.toThrow();
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
describe('when a component is inserted in the DOM again after being removed', () => {
|
|
202
|
-
it('creates a subscription on the service again', async () => {
|
|
203
|
-
expect(service.getSubscriptions().length).toEqual(2);
|
|
204
|
-
component.disconnectedCallback();
|
|
205
|
-
expect(service.getSubscriptions().length).toEqual(0);
|
|
206
|
-
await component.connectedCallback();
|
|
207
|
-
expect(service.getSubscriptions().length).toEqual(2);
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
describe('when context is set on options', () => {
|
|
212
|
-
let component;
|
|
213
|
-
let options;
|
|
214
|
-
beforeEach(async () => {
|
|
215
|
-
options = { context: null };
|
|
216
|
-
component = createComponent({ foo: true, bar: true }, options);
|
|
217
|
-
await component.connectedCallback();
|
|
218
|
-
});
|
|
219
|
-
it('sets the context option to an observable', () => {
|
|
220
|
-
expect(options.context).toBeInstanceOf(Subject);
|
|
221
|
-
});
|
|
222
|
-
it('emits a value on the observable when property is changed', async () => {
|
|
223
|
-
const spy = jest.spyOn(options.context, 'next');
|
|
224
|
-
getElement(component).context = 'new context';
|
|
225
|
-
expect(spy).toHaveBeenCalled();
|
|
226
|
-
const value = await firstValueFrom(options.context);
|
|
227
|
-
expect(value).toEqual('new context');
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
describe('when component has lifecycle methods', () => {
|
|
231
|
-
let component;
|
|
232
|
-
let options;
|
|
233
|
-
let methods;
|
|
234
|
-
beforeEach(async () => {
|
|
235
|
-
options = { context: null };
|
|
236
|
-
methods = {
|
|
237
|
-
connectedCallback: jest.fn(),
|
|
238
|
-
componentWillLoad: jest.fn(),
|
|
239
|
-
componentDidUnload: jest.fn(),
|
|
240
|
-
disconnectedCallback: jest.fn(),
|
|
241
|
-
};
|
|
242
|
-
component = createComponent({ foo: true, bar: true }, options, methods);
|
|
243
|
-
});
|
|
244
|
-
it('connectedCallback invokes the original connectedCallback', async () => {
|
|
245
|
-
expect(methods.connectedCallback).toHaveBeenCalledTimes(0);
|
|
246
|
-
expect(component.connectedCallback).not.toEqual(methods.connectedCallback);
|
|
247
|
-
await component.connectedCallback();
|
|
248
|
-
expect(methods.connectedCallback).toHaveBeenCalledTimes(1);
|
|
249
|
-
});
|
|
250
|
-
it('componentWillLoad invokes the original componentWillLoad', async () => {
|
|
251
|
-
expect(methods.componentWillLoad).toHaveBeenCalledTimes(0);
|
|
252
|
-
expect(component.componentWillLoad).not.toEqual(methods.componentWillLoad);
|
|
253
|
-
await component.componentWillLoad();
|
|
254
|
-
expect(methods.componentWillLoad).toHaveBeenCalledTimes(1);
|
|
255
|
-
});
|
|
256
|
-
describe('when connectedCallback is invoked first', () => {
|
|
257
|
-
it('componentWillLoad invkoes the original componentWillLoad', async () => {
|
|
258
|
-
expect(methods.componentWillLoad).toHaveBeenCalledTimes(0);
|
|
259
|
-
expect(component.componentWillLoad).not.toEqual(methods.componentWillLoad);
|
|
260
|
-
await component.connectedCallback();
|
|
261
|
-
await component.componentWillLoad();
|
|
262
|
-
expect(methods.componentWillLoad).toHaveBeenCalledTimes(1);
|
|
263
|
-
});
|
|
264
|
-
});
|
|
265
|
-
it('componentDidUnload invokes the original componentDidUnload', async () => {
|
|
266
|
-
expect(methods.componentDidUnload).toHaveBeenCalledTimes(0);
|
|
267
|
-
expect(component.componentDidUnload).not.toEqual(methods.componentDidUnload);
|
|
268
|
-
await component.connectedCallback();
|
|
269
|
-
component.componentDidUnload();
|
|
270
|
-
expect(methods.componentDidUnload).toHaveBeenCalledTimes(1);
|
|
271
|
-
});
|
|
272
|
-
it('disconnectedCallback invokes the original disconnectedCallback', async () => {
|
|
273
|
-
expect(methods.disconnectedCallback).toHaveBeenCalledTimes(0);
|
|
274
|
-
expect(component.disconnectedCallback).not.toEqual(methods.disconnectedCallback);
|
|
275
|
-
await component.connectedCallback();
|
|
276
|
-
component.disconnectedCallback();
|
|
277
|
-
expect(methods.disconnectedCallback).toHaveBeenCalledTimes(1);
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
function createComponent(props = { foo: 'bar' }, options = {}, methods = {}) {
|
|
281
|
-
const Decorator = (o) => createStateDecorator(o, { name: 'test' });
|
|
282
|
-
class MyComponent {
|
|
283
|
-
}
|
|
284
|
-
Object.keys(methods).forEach((method) => {
|
|
285
|
-
MyComponent.prototype[method] = methods[method];
|
|
286
|
-
});
|
|
287
|
-
const component = new MyComponent();
|
|
288
|
-
component.platform = platform;
|
|
289
|
-
component.context = context;
|
|
290
|
-
Object.keys(props).forEach((key) => {
|
|
291
|
-
Decorator(options)(MyComponent.prototype, key);
|
|
292
|
-
});
|
|
293
|
-
return component;
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
class TestService {
|
|
297
|
-
constructor() {
|
|
298
|
-
this.subscriptions = [];
|
|
299
|
-
}
|
|
300
|
-
subscribe(...args) {
|
|
301
|
-
this.subscriptions.push(args);
|
|
302
|
-
return () => {
|
|
303
|
-
this.subscriptions = this.subscriptions.filter((item) => item !== args);
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
getSubscriptions() {
|
|
307
|
-
return this.subscriptions;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
class LimeWebComponentElement extends HTMLElement {
|
|
311
|
-
constructor(component) {
|
|
312
|
-
super();
|
|
313
|
-
this.component = component;
|
|
314
|
-
}
|
|
315
|
-
get platform() {
|
|
316
|
-
return this.component.platform;
|
|
317
|
-
}
|
|
318
|
-
set platform(value) {
|
|
319
|
-
this.component.platform = value;
|
|
320
|
-
}
|
|
321
|
-
get context() {
|
|
322
|
-
return this.component.context;
|
|
323
|
-
}
|
|
324
|
-
set context(value) {
|
|
325
|
-
this.component.context = value;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/core/idle.js
DELETED
package/dist/core/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/core/metadata.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/core/platform.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/core/state.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/device/decorator.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PlatformServiceName, } from '../core';
|
|
2
|
-
import { createStateDecorator } from '../core/decorators/factory';
|
|
3
|
-
/**
|
|
4
|
-
* Get the current device type
|
|
5
|
-
*
|
|
6
|
-
* The device will only indicate roughly how big the viewport is, not what actual device is being used
|
|
7
|
-
*
|
|
8
|
-
* @param options - state decorator options
|
|
9
|
-
* @returns state decorator
|
|
10
|
-
* @public
|
|
11
|
-
* @group Device
|
|
12
|
-
*/
|
|
13
|
-
export function SelectDevice(options = {}) {
|
|
14
|
-
const config = {
|
|
15
|
-
name: PlatformServiceName.Device,
|
|
16
|
-
};
|
|
17
|
-
return createStateDecorator(options, config);
|
|
18
|
-
}
|
package/dist/device/device.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/device/index.js
DELETED
package/dist/device/types.js
DELETED
package/dist/dialog/dialog.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/dialog/index.js
DELETED
package/dist/dialog/types.js
DELETED
package/dist/es5/action/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectApplicationName = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var core_1 = require("../../core");
|
|
6
|
-
var factory_1 = require("../../core/decorators/factory");
|
|
7
|
-
function SelectApplicationName(options) {
|
|
8
|
-
if (options === void 0) { options = {}; }
|
|
9
|
-
var config = {
|
|
10
|
-
name: core_1.PlatformServiceName.Application,
|
|
11
|
-
};
|
|
12
|
-
options.map = tslib_1.__spreadArray([getApplicationName], (options.map || []), true);
|
|
13
|
-
return (0, factory_1.createStateDecorator)(options, config);
|
|
14
|
-
}
|
|
15
|
-
exports.SelectApplicationName = SelectApplicationName;
|
|
16
|
-
function getApplicationName(applicationData) {
|
|
17
|
-
return applicationData.applicationName;
|
|
18
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./application"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./user"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./session"), exports);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectSession = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var core_1 = require("../../core");
|
|
6
|
-
var factory_1 = require("../../core/decorators/factory");
|
|
7
|
-
function SelectSession(options) {
|
|
8
|
-
if (options === void 0) { options = {}; }
|
|
9
|
-
var config = {
|
|
10
|
-
name: core_1.PlatformServiceName.Application,
|
|
11
|
-
};
|
|
12
|
-
options.map = tslib_1.__spreadArray([getSession], (options.map || []), true);
|
|
13
|
-
return (0, factory_1.createStateDecorator)(options, config);
|
|
14
|
-
}
|
|
15
|
-
exports.SelectSession = SelectSession;
|
|
16
|
-
function getSession(applicationData) {
|
|
17
|
-
return applicationData.session;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectCurrentUser = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var core_1 = require("../../core");
|
|
6
|
-
var factory_1 = require("../../core/decorators/factory");
|
|
7
|
-
function SelectCurrentUser(options) {
|
|
8
|
-
if (options === void 0) { options = {}; }
|
|
9
|
-
var config = {
|
|
10
|
-
name: core_1.PlatformServiceName.Application,
|
|
11
|
-
};
|
|
12
|
-
options.map = tslib_1.__spreadArray([getCurrentUser], (options.map || []), true);
|
|
13
|
-
return (0, factory_1.createStateDecorator)(options, config);
|
|
14
|
-
}
|
|
15
|
-
exports.SelectCurrentUser = SelectCurrentUser;
|
|
16
|
-
function getCurrentUser(applicationData) {
|
|
17
|
-
return applicationData.currentUser;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./types"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./decorators"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./repository"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./session"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./user"), exports);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCommandIds = exports.getCommandId = exports.Command = exports.CommandEventName = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var CommandEventName;
|
|
6
|
-
(function (CommandEventName) {
|
|
7
|
-
CommandEventName["Received"] = "command.received";
|
|
8
|
-
CommandEventName["Handled"] = "command.handled";
|
|
9
|
-
CommandEventName["Failed"] = "command.failed";
|
|
10
|
-
})(CommandEventName = exports.CommandEventName || (exports.CommandEventName = {}));
|
|
11
|
-
function Command(options) {
|
|
12
|
-
return function (commandClass) {
|
|
13
|
-
setCommandId(commandClass, options.id);
|
|
14
|
-
setHasInstance(commandClass, options.id);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
exports.Command = Command;
|
|
18
|
-
function setCommandId(commandClass, id) {
|
|
19
|
-
commandClass['commandId'] = id;
|
|
20
|
-
}
|
|
21
|
-
function setHasInstance(commandClass, id) {
|
|
22
|
-
Object.defineProperty(commandClass, Symbol.hasInstance, {
|
|
23
|
-
value: function (instance) {
|
|
24
|
-
return getCommandIds(instance).includes(id);
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function getCommandId(value) {
|
|
29
|
-
if (typeof value === 'string') {
|
|
30
|
-
return value;
|
|
31
|
-
}
|
|
32
|
-
if (value && value.constructor && value.constructor['commandId']) {
|
|
33
|
-
return value.constructor['commandId'];
|
|
34
|
-
}
|
|
35
|
-
if (value && value['commandId']) {
|
|
36
|
-
return value['commandId'];
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
exports.getCommandId = getCommandId;
|
|
41
|
-
function getCommandIds(value) {
|
|
42
|
-
var ids = [];
|
|
43
|
-
var id;
|
|
44
|
-
var commandClass = value;
|
|
45
|
-
while ((id = getCommandId(commandClass))) {
|
|
46
|
-
ids = tslib_1.__spreadArray(tslib_1.__spreadArray([], ids, true), [id], false);
|
|
47
|
-
commandClass = Object.getPrototypeOf(commandClass);
|
|
48
|
-
}
|
|
49
|
-
return Array.from(new Set(ids));
|
|
50
|
-
}
|
|
51
|
-
exports.getCommandIds = getCommandIds;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var commandbus_1 = require("./commandbus");
|
|
5
|
-
var Webclient;
|
|
6
|
-
(function (Webclient) {
|
|
7
|
-
var TestCommand = (function () {
|
|
8
|
-
function TestCommand() {
|
|
9
|
-
}
|
|
10
|
-
TestCommand = tslib_1.__decorate([
|
|
11
|
-
(0, commandbus_1.Command)({
|
|
12
|
-
id: 'test',
|
|
13
|
-
})
|
|
14
|
-
], TestCommand);
|
|
15
|
-
return TestCommand;
|
|
16
|
-
}());
|
|
17
|
-
Webclient.TestCommand = TestCommand;
|
|
18
|
-
var MyTestCommand = (function (_super) {
|
|
19
|
-
tslib_1.__extends(MyTestCommand, _super);
|
|
20
|
-
function MyTestCommand() {
|
|
21
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
-
}
|
|
23
|
-
MyTestCommand = tslib_1.__decorate([
|
|
24
|
-
(0, commandbus_1.Command)({
|
|
25
|
-
id: 'my-test',
|
|
26
|
-
})
|
|
27
|
-
], MyTestCommand);
|
|
28
|
-
return MyTestCommand;
|
|
29
|
-
}(TestCommand));
|
|
30
|
-
Webclient.MyTestCommand = MyTestCommand;
|
|
31
|
-
})(Webclient || (Webclient = {}));
|
|
32
|
-
var Addon;
|
|
33
|
-
(function (Addon) {
|
|
34
|
-
var TestCommand = (function () {
|
|
35
|
-
function TestCommand() {
|
|
36
|
-
}
|
|
37
|
-
TestCommand = tslib_1.__decorate([
|
|
38
|
-
(0, commandbus_1.Command)({
|
|
39
|
-
id: 'test',
|
|
40
|
-
})
|
|
41
|
-
], TestCommand);
|
|
42
|
-
return TestCommand;
|
|
43
|
-
}());
|
|
44
|
-
Addon.TestCommand = TestCommand;
|
|
45
|
-
})(Addon || (Addon = {}));
|
|
46
|
-
test.each([
|
|
47
|
-
[new Webclient.TestCommand(), ['test']],
|
|
48
|
-
[new Webclient.MyTestCommand(), ['my-test', 'test']],
|
|
49
|
-
['test', ['test']],
|
|
50
|
-
[null, []],
|
|
51
|
-
])('getCommandIds() with instance %s returns %j', function (value, result) {
|
|
52
|
-
expect((0, commandbus_1.getCommandIds)(value)).toEqual(result);
|
|
53
|
-
});
|
|
54
|
-
test.each([
|
|
55
|
-
[Webclient.TestCommand, ['test']],
|
|
56
|
-
[Webclient.MyTestCommand, ['my-test', 'test']],
|
|
57
|
-
])('getCommandIds() with class %p returns %j', function (value, result) {
|
|
58
|
-
expect((0, commandbus_1.getCommandIds)(value)).toEqual(result);
|
|
59
|
-
});
|
|
60
|
-
test('instanceof returns true when class from another namespace has same command ID', function () {
|
|
61
|
-
var command = new Webclient.TestCommand();
|
|
62
|
-
expect(command).toBeInstanceOf(Addon.TestCommand);
|
|
63
|
-
});
|
|
64
|
-
test('instanceof returns true when sub-class from another namespace has same command ID', function () {
|
|
65
|
-
var command = new Webclient.MyTestCommand();
|
|
66
|
-
expect(command).toBeInstanceOf(Addon.TestCommand);
|
|
67
|
-
});
|