@kalisio/kdk 1.4.2 → 1.6.0
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/.nyc_output/02a7a308-a8d7-4cc6-8e61-6066a0055a96.json +1 -0
- package/.nyc_output/1900d596-5e87-433a-8fd6-fb7f7ded35ec.json +1 -0
- package/.nyc_output/{2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json → 27401f21-8ccf-42fa-8230-4232189d86b3.json} +0 -0
- package/.nyc_output/{81d21e46-766a-46bc-b1b7-143ca577347a.json → 52278ef5-c337-4724-97be-e2e4416847c5.json} +0 -0
- package/.nyc_output/{aaf3ebbb-f895-4d7b-9255-bc5dee832570.json → 5dd49b8a-4c84-42f9-a3d5-712247a84775.json} +0 -0
- package/.nyc_output/{dbeb2602-0ac2-4e66-978b-0d29548359ca.json → 612b4859-9645-45c1-a41e-1fae420518c4.json} +0 -0
- package/.nyc_output/{e47d1e4c-2fff-4dcb-908f-d3081162547c.json → bab87fe9-d99a-4759-99e6-3fc4622eeca0.json} +0 -0
- package/.nyc_output/processinfo/02a7a308-a8d7-4cc6-8e61-6066a0055a96.json +1 -0
- package/.nyc_output/processinfo/1900d596-5e87-433a-8fd6-fb7f7ded35ec.json +1 -0
- package/.nyc_output/processinfo/27401f21-8ccf-42fa-8230-4232189d86b3.json +1 -0
- package/.nyc_output/processinfo/52278ef5-c337-4724-97be-e2e4416847c5.json +1 -0
- package/.nyc_output/processinfo/5dd49b8a-4c84-42f9-a3d5-712247a84775.json +1 -0
- package/.nyc_output/processinfo/612b4859-9645-45c1-a41e-1fae420518c4.json +1 -0
- package/.nyc_output/processinfo/bab87fe9-d99a-4759-99e6-3fc4622eeca0.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +69 -10
- package/coverage/core/api/application.js.html +500 -422
- package/coverage/core/api/authentication.js.html +119 -119
- package/coverage/core/api/db.js.html +172 -172
- package/coverage/core/api/hooks/hooks.account.js.html +45 -45
- package/coverage/core/api/hooks/hooks.authentication.js.html +71 -71
- package/coverage/core/api/hooks/hooks.authorisations.js.html +368 -353
- package/coverage/core/api/hooks/hooks.devices.js.html +49 -49
- package/coverage/core/api/hooks/hooks.groups.js.html +37 -37
- package/coverage/core/api/hooks/hooks.logger.js.html +27 -27
- package/coverage/core/api/hooks/hooks.model.js.html +269 -269
- package/coverage/core/api/hooks/hooks.organisations.js.html +190 -190
- package/coverage/core/api/hooks/hooks.pusher.js.html +114 -114
- package/coverage/core/api/hooks/hooks.query.js.html +277 -211
- package/coverage/core/api/hooks/hooks.service.js.html +82 -82
- package/coverage/core/api/hooks/hooks.storage.js.html +121 -121
- package/coverage/core/api/hooks/hooks.tags.js.html +232 -232
- package/coverage/core/api/hooks/hooks.users.js.html +263 -263
- package/coverage/core/api/hooks/index.html +172 -172
- package/coverage/core/api/hooks/index.js.html +24 -24
- package/coverage/core/api/index.html +76 -76
- package/coverage/core/api/index.js.html +30 -30
- package/coverage/core/api/marshall.js.html +57 -57
- package/coverage/core/api/models/groups.model.mongodb.js.html +20 -20
- package/coverage/core/api/models/index.html +50 -50
- package/coverage/core/api/models/organisations.model.mongodb.js.html +12 -12
- package/coverage/core/api/models/tags.model.mongodb.js.html +22 -22
- package/coverage/core/api/models/users.model.mongodb.js.html +20 -20
- package/coverage/core/api/oauth2-handler.js.html +18 -18
- package/coverage/core/api/oauth2-verifier.js.html +38 -38
- package/coverage/core/api/services/account/account.hooks.js.html +16 -16
- package/coverage/core/api/services/account/account.service.js.html +104 -104
- package/coverage/core/api/services/account/index.html +32 -32
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +9 -9
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +156 -132
- package/coverage/core/api/services/authorisations/index.html +28 -28
- package/coverage/core/api/services/databases/databases.hooks.js.html +9 -9
- package/coverage/core/api/services/databases/databases.service.js.html +12 -12
- package/coverage/core/api/services/databases/index.html +24 -24
- package/coverage/core/api/services/devices/devices.hooks.js.html +9 -9
- package/coverage/core/api/services/devices/devices.service.js.html +121 -121
- package/coverage/core/api/services/devices/index.html +28 -28
- package/coverage/core/api/services/groups/groups.hooks.js.html +9 -9
- package/coverage/core/api/services/groups/index.html +13 -13
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +118 -118
- package/coverage/core/api/services/mailer/index.html +24 -24
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +9 -9
- package/coverage/core/api/services/mailer/mailer.service.js.html +19 -19
- package/coverage/core/api/services/organisations/index.html +24 -24
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +8 -8
- package/coverage/core/api/services/organisations/organisations.service.js.html +67 -67
- package/coverage/core/api/services/pusher/index.html +34 -34
- package/coverage/core/api/services/pusher/pusher.channels.js.html +8 -8
- package/coverage/core/api/services/pusher/pusher.hooks.js.html +10 -10
- package/coverage/core/api/services/pusher/pusher.service.js.html +414 -414
- package/coverage/core/api/services/storage/index.html +21 -21
- package/coverage/core/api/services/storage/storage.hooks.js.html +35 -35
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +25 -25
- package/coverage/core/api/services/users/index.html +21 -21
- package/coverage/core/api/services/users/users.hooks.js.html +33 -33
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +42 -27
- package/coverage/core/common/index.js.html +16 -16
- package/coverage/core/common/permissions.js.html +320 -290
- package/coverage/index.html +181 -181
- package/coverage/lcov-report/core/api/application.js.html +500 -422
- package/coverage/lcov-report/core/api/authentication.js.html +119 -119
- package/coverage/lcov-report/core/api/db.js.html +172 -172
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +45 -45
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +71 -71
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +368 -353
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +49 -49
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +37 -37
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +27 -27
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +269 -269
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +190 -190
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +114 -114
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +277 -211
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +82 -82
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +121 -121
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +232 -232
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +263 -263
- package/coverage/lcov-report/core/api/hooks/index.html +172 -172
- package/coverage/lcov-report/core/api/hooks/index.js.html +24 -24
- package/coverage/lcov-report/core/api/index.html +76 -76
- package/coverage/lcov-report/core/api/index.js.html +30 -30
- package/coverage/lcov-report/core/api/marshall.js.html +57 -57
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/core/api/models/index.html +50 -50
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +12 -12
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +22 -22
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +18 -18
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +38 -38
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +16 -16
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +104 -104
- package/coverage/lcov-report/core/api/services/account/index.html +32 -32
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +156 -132
- package/coverage/lcov-report/core/api/services/authorisations/index.html +28 -28
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +12 -12
- package/coverage/lcov-report/core/api/services/databases/index.html +24 -24
- package/coverage/lcov-report/core/api/services/devices/devices.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/devices/devices.service.js.html +121 -121
- package/coverage/lcov-report/core/api/services/devices/index.html +28 -28
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/groups/index.html +13 -13
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +118 -118
- package/coverage/lcov-report/core/api/services/mailer/index.html +24 -24
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +19 -19
- package/coverage/lcov-report/core/api/services/organisations/index.html +24 -24
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +8 -8
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +67 -67
- package/coverage/lcov-report/core/api/services/pusher/index.html +34 -34
- package/coverage/lcov-report/core/api/services/pusher/pusher.channels.js.html +8 -8
- package/coverage/lcov-report/core/api/services/pusher/pusher.hooks.js.html +10 -10
- package/coverage/lcov-report/core/api/services/pusher/pusher.service.js.html +414 -414
- package/coverage/lcov-report/core/api/services/storage/index.html +21 -21
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +35 -35
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +25 -25
- package/coverage/lcov-report/core/api/services/users/index.html +21 -21
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +33 -33
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +42 -27
- package/coverage/lcov-report/core/common/index.js.html +16 -16
- package/coverage/lcov-report/core/common/permissions.js.html +320 -290
- package/coverage/lcov-report/index.html +181 -181
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +25 -7
- package/coverage/lcov-report/map/api/hooks/index.html +7 -7
- package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/map/api/index.html +1 -1
- package/coverage/lcov-report/map/api/index.js.html +1 -1
- package/coverage/lcov-report/map/api/marshall.js.html +1 -1
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +14 -5
- package/coverage/lcov-report/map/api/models/index.html +7 -7
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/index.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/features/index.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/index.html +1 -1
- package/coverage/lcov-report/map/api/services/index.html +1 -1
- package/coverage/lcov-report/map/api/services/index.js.html +1 -1
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/errors.js.html +1 -1
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +1 -1
- package/coverage/lcov-report/map/common/index.js.html +1 -1
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/permissions.js.html +1 -1
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wfs-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wmts-utils.js.html +1 -1
- package/coverage/lcov.info +3683 -3825
- package/coverage/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +25 -7
- package/coverage/map/api/hooks/index.html +7 -7
- package/coverage/map/api/hooks/index.js.html +1 -1
- package/coverage/map/api/index.html +1 -1
- package/coverage/map/api/index.js.html +1 -1
- package/coverage/map/api/marshall.js.html +1 -1
- package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/catalog.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/features.model.mongodb.js.html +14 -5
- package/coverage/map/api/models/index.html +7 -7
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/map/api/services/alerts/index.html +1 -1
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +1 -1
- package/coverage/map/api/services/catalog/index.html +1 -1
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/map/api/services/daptiles/index.html +1 -1
- package/coverage/map/api/services/features/features.hooks.js.html +1 -1
- package/coverage/map/api/services/features/index.html +1 -1
- package/coverage/map/api/services/geocoder/geocoder.hooks.js.html +1 -1
- package/coverage/map/api/services/geocoder/geocoder.service.js.html +1 -1
- package/coverage/map/api/services/geocoder/index.html +1 -1
- package/coverage/map/api/services/index.html +1 -1
- package/coverage/map/api/services/index.js.html +1 -1
- package/coverage/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/map/common/errors.js.html +1 -1
- package/coverage/map/common/geotiff-grid-source.js.html +1 -1
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +1 -1
- package/coverage/map/common/index.js.html +1 -1
- package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/map/common/moment-utils.js.html +1 -1
- package/coverage/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/map/common/opendap-utils.js.html +1 -1
- package/coverage/map/common/permissions.js.html +1 -1
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +1 -1
- package/coverage/map/common/wcs-grid-source.js.html +1 -1
- package/coverage/map/common/wcs-utils.js.html +1 -1
- package/coverage/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/map/common/wfs-utils.js.html +1 -1
- package/coverage/map/common/wms-utils.js.html +1 -1
- package/coverage/map/common/wmts-utils.js.html +1 -1
- package/extras/tours/map/navigation-bar.js +49 -1
- package/lib/core/api/application.js +35 -9
- package/lib/core/api/application.js.map +1 -1
- package/lib/core/api/hooks/hooks.authorisations.js +8 -1
- package/lib/core/api/hooks/hooks.authorisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.query.js +135 -100
- package/lib/core/api/hooks/hooks.query.js.map +1 -1
- package/lib/core/api/services/authorisations/authorisations.service.js +13 -1
- package/lib/core/api/services/authorisations/authorisations.service.js.map +1 -1
- package/lib/core/api/services/pusher/pusher.service.js +40 -16
- package/lib/core/api/services/pusher/pusher.service.js.map +1 -1
- package/lib/core/client/components/collection/KColumn.vue +29 -28
- package/lib/core/client/components/collection/KFilter.vue +97 -72
- package/lib/core/client/components/editor/KModalEditor.vue +3 -4
- package/lib/core/client/components/editor/KSettingsEditor.vue +6 -2
- package/lib/core/client/components/form/KFileField.vue +14 -36
- package/lib/core/client/components/form/KRoleField.vue +5 -2
- package/lib/core/client/components/form/KTextField.vue +12 -2
- package/lib/core/client/components/form/KUnitField.vue +57 -0
- package/lib/core/client/components/form/KUrlField.vue +1 -1
- package/lib/core/client/components/frame/KAction.vue +1 -2
- package/lib/core/client/components/frame/KModal.vue +66 -20
- package/lib/core/client/components/frame/KScrollArea.vue +65 -0
- package/lib/core/client/components/frame/index.js +6 -1
- package/lib/core/client/components/frame/index.js.map +1 -1
- package/lib/core/client/components/input/KColorChooser.vue +3 -5
- package/lib/core/client/components/input/KIconChooser.vue +38 -40
- package/lib/core/client/components/input/KOptionsChooser.vue +2 -2
- package/lib/core/client/components/layout/KAbout.vue +47 -49
- package/lib/core/client/components/team/KAddMember.vue +1 -1
- package/lib/core/client/components/team/KChangeRole.vue +11 -14
- package/lib/core/client/components/team/KGroupCard.vue +12 -5
- package/lib/core/client/components/team/KGroupsActivity.vue +1 -1
- package/lib/core/client/components/team/KJoinGroup.vue +22 -22
- package/lib/core/client/components/team/KMemberCard.vue +19 -4
- package/lib/core/client/components/viewer/KModalViewer.vue +10 -9
- package/lib/core/client/i18n/core_en.json +72 -8
- package/lib/core/client/i18n/core_fr.json +66 -8
- package/lib/core/client/index.js +31 -0
- package/lib/core/client/index.js.map +1 -1
- package/lib/core/client/layout.js +8 -1
- package/lib/core/client/layout.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-widget.js +5 -3
- package/lib/core/client/mixins/mixin.base-widget.js.map +1 -1
- package/lib/core/client/reader.js +85 -0
- package/lib/core/client/reader.js.map +1 -0
- package/lib/core/client/readers/index.js +30 -0
- package/lib/core/client/readers/index.js.map +1 -0
- package/lib/core/client/readers/reader.csv.js +54 -0
- package/lib/core/client/readers/reader.csv.js.map +1 -0
- package/lib/core/client/readers/reader.json.js +49 -0
- package/lib/core/client/readers/reader.json.js.map +1 -0
- package/lib/core/client/services/index.js +14 -3
- package/lib/core/client/services/index.js.map +1 -1
- package/lib/core/client/services/local-settings.service.js +6 -4
- package/lib/core/client/services/local-settings.service.js.map +1 -1
- package/lib/core/client/time.js +4 -3
- package/lib/core/client/time.js.map +1 -1
- package/lib/core/client/units.js +195 -0
- package/lib/core/client/units.js.map +1 -0
- package/lib/core/common/permissions.js +44 -34
- package/lib/core/common/permissions.js.map +1 -1
- package/lib/core/common/schemas/settings.update.json +72 -0
- package/lib/map/api/hooks/hooks.query.js +7 -2
- package/lib/map/api/hooks/hooks.query.js.map +1 -1
- package/lib/map/api/models/features.model.mongodb.js +3 -0
- package/lib/map/api/models/features.model.mongodb.js.map +1 -1
- package/lib/map/client/components/KCaptureToolbar.vue +151 -0
- package/lib/map/client/components/KColorLegend.vue +16 -4
- package/lib/map/client/components/KFeaturesChart.vue +10 -11
- package/lib/map/client/components/KFeaturesFilter.vue +40 -39
- package/lib/map/client/components/KFeaturesTable.vue +15 -16
- package/lib/map/client/components/KLayerEditionToolbar.vue +19 -11
- package/lib/map/client/components/KLayerStyleEditor.vue +3 -2
- package/lib/map/client/components/KLayerStyleForm.vue +38 -27
- package/lib/map/client/components/KMeasureTool.vue +337 -0
- package/lib/map/client/components/KTimeline.vue +5 -9
- package/lib/map/client/components/catalog/KAddLayer.vue +3 -2
- package/lib/map/client/components/catalog/KCatalog.vue +26 -7
- package/lib/map/client/components/catalog/KImportLayer.vue +8 -35
- package/lib/map/client/components/catalog/KLayerCategories.vue +3 -2
- package/lib/map/client/components/catalog/KLayersSelector.vue +8 -6
- package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +1 -1
- package/lib/map/client/components/widget/KInformationBox.vue +8 -17
- package/lib/map/client/components/widget/KMapillaryViewer.vue +5 -1
- package/lib/map/client/components/widget/KTimeSeries.vue +92 -9
- package/lib/map/client/i18n/map_en.json +51 -20
- package/lib/map/client/i18n/map_fr.json +51 -20
- package/lib/map/client/init.js +7 -1
- package/lib/map/client/init.js.map +1 -1
- package/lib/map/client/leaflet/MaskLayer.js +9 -0
- package/lib/map/client/leaflet/MaskLayer.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.base-globe.js +3 -5
- package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js +16 -21
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.popup.js +7 -1
- package/lib/map/client/mixins/globe/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.tooltip.js +7 -1
- package/lib/map/client/mixins/globe/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.base-map.js +54 -9
- package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.canvas-layers.js +2 -0
- package/lib/map/client/mixins/map/mixin.canvas-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.file-layers.js +51 -97
- package/lib/map/client/mixins/map/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.geojson-layers.js +43 -11
- package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.popup.js +7 -1
- package/lib/map/client/mixins/map/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.style.js +1 -1
- package/lib/map/client/mixins/map/mixin.style.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tooltip.js +7 -1
- package/lib/map/client/mixins/map/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/mixin.activity.js +2 -0
- package/lib/map/client/mixins/mixin.activity.js.map +1 -1
- package/lib/map/client/mixins/mixin.context.js +26 -3
- package/lib/map/client/mixins/mixin.context.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-service.js +3 -3
- package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
- package/lib/map/client/mixins/mixin.infobox.js +4 -0
- package/lib/map/client/mixins/mixin.infobox.js.map +1 -1
- package/lib/map/client/mixins/mixin.weacast.js +7 -5
- package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
- package/lib/map/client/readers/index.js +54 -0
- package/lib/map/client/readers/index.js.map +1 -0
- package/lib/map/client/readers/reader.geojson.js +87 -0
- package/lib/map/client/readers/reader.geojson.js.map +1 -0
- package/lib/map/client/readers/reader.gpx.js +52 -0
- package/lib/map/client/readers/reader.gpx.js.map +1 -0
- package/lib/map/client/readers/reader.kml.js +52 -0
- package/lib/map/client/readers/reader.kml.js.map +1 -0
- package/lib/map/client/readers/reader.shp.js +116 -0
- package/lib/map/client/readers/reader.shp.js.map +1 -0
- package/lib/map/client/utils.js +0 -7
- package/lib/map/client/utils.js.map +1 -1
- package/lib/test/client/core/account.js +1 -1
- package/lib/test/client/core/account.js.map +1 -1
- package/lib/test/client/core/runner.js +1 -2
- package/lib/test/client/core/runner.js.map +1 -1
- package/lib/test/client/core/screens.js +1 -1
- package/lib/test/client/core/screens.js.map +1 -1
- package/lib/test/client/core/utils.js +2 -2
- package/lib/test/client/core/utils.js.map +1 -1
- package/lib/test/client/map/catalog.js +50 -49
- package/lib/test/client/map/catalog.js.map +1 -1
- package/package.json +3 -3
- package/.nyc_output/2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json +0 -1
- package/.nyc_output/a762cb58-70dc-4d39-ab69-928635affa98.json +0 -1
- package/.nyc_output/processinfo/2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json +0 -1
- package/.nyc_output/processinfo/2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json +0 -1
- package/.nyc_output/processinfo/81d21e46-766a-46bc-b1b7-143ca577347a.json +0 -1
- package/.nyc_output/processinfo/a762cb58-70dc-4d39-ab69-928635affa98.json +0 -1
- package/.nyc_output/processinfo/aaf3ebbb-f895-4d7b-9255-bc5dee832570.json +0 -1
- package/.nyc_output/processinfo/dbeb2602-0ac2-4e66-978b-0d29548359ca.json +0 -1
- package/.nyc_output/processinfo/e47d1e4c-2fff-4dcb-908f-d3081162547c.json +0 -1
- package/extras/testcafe/Dockerfile +0 -48
- package/extras/testcafe/docker-entrypoint.sh +0 -27
- package/extras/testcafe/page-models/core/account.js +0 -75
- package/extras/testcafe/page-models/core/base-collection.js +0 -41
- package/extras/testcafe/page-models/core/base-page.js +0 -25
- package/extras/testcafe/page-models/core/groups.js +0 -36
- package/extras/testcafe/page-models/core/index.js +0 -140
- package/extras/testcafe/page-models/core/layout.js +0 -145
- package/extras/testcafe/page-models/core/members.js +0 -98
- package/extras/testcafe/page-models/core/organisations.js +0 -76
- package/extras/testcafe/page-models/core/screens.js +0 -99
- package/extras/testcafe/page-models/core/tags.js +0 -21
- package/extras/testcafe/page-models/map/add-layer.js +0 -51
- package/extras/testcafe/page-models/map/catalog.js +0 -132
- package/extras/testcafe/page-models/map/index.js +0 -36
- package/extras/testcafe/page-models/map/map-activity.js +0 -42
- package/extras/testcafe/page-models/map/timeline.js +0 -67
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/109</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/62</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/14</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/98</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -270,30 +270,30 @@
|
|
|
270
270
|
<a name='L211'></a><a href='#L211'>211</a>
|
|
271
271
|
<a name='L212'></a><a href='#L212'>212</a>
|
|
272
272
|
<a name='L213'></a><a href='#L213'>213</a>
|
|
273
|
-
<a name='L214'></a><a href='#L214'>214</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
274
|
-
<span class="cline-any cline-yes">1x</span>
|
|
275
|
-
<span class="cline-any cline-yes">1x</span>
|
|
276
|
-
<span class="cline-any cline-yes">1x</span>
|
|
273
|
+
<a name='L214'></a><a href='#L214'>214</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
277
274
|
<span class="cline-any cline-neutral"> </span>
|
|
278
|
-
<span class="cline-any cline-yes">1x</span>
|
|
279
275
|
<span class="cline-any cline-neutral"> </span>
|
|
280
|
-
<span class="cline-any cline-yes">1x</span>
|
|
281
276
|
<span class="cline-any cline-neutral"> </span>
|
|
282
277
|
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-
|
|
278
|
+
<span class="cline-any cline-no"> </span>
|
|
279
|
+
<span class="cline-any cline-neutral"> </span>
|
|
284
280
|
<span class="cline-any cline-no"> </span>
|
|
285
281
|
<span class="cline-any cline-neutral"> </span>
|
|
286
282
|
<span class="cline-any cline-neutral"> </span>
|
|
283
|
+
<span class="cline-any cline-no"> </span>
|
|
284
|
+
<span class="cline-any cline-no"> </span>
|
|
287
285
|
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-yes">11x</span>
|
|
289
|
-
<span class="cline-any cline-yes">11x</span>
|
|
290
|
-
<span class="cline-any cline-yes">7x</span>
|
|
291
|
-
<span class="cline-any cline-yes">4x</span>
|
|
292
|
-
<span class="cline-any cline-yes">4x</span>
|
|
293
286
|
<span class="cline-any cline-neutral"> </span>
|
|
294
287
|
<span class="cline-any cline-neutral"> </span>
|
|
295
|
-
<span class="cline-any cline-
|
|
296
|
-
<span class="cline-any cline-
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
289
|
+
<span class="cline-any cline-no"> </span>
|
|
290
|
+
<span class="cline-any cline-no"> </span>
|
|
291
|
+
<span class="cline-any cline-no"> </span>
|
|
292
|
+
<span class="cline-any cline-no"> </span>
|
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
|
294
|
+
<span class="cline-any cline-neutral"> </span>
|
|
295
|
+
<span class="cline-any cline-no"> </span>
|
|
296
|
+
<span class="cline-any cline-no"> </span>
|
|
297
297
|
<span class="cline-any cline-neutral"> </span>
|
|
298
298
|
<span class="cline-any cline-neutral"> </span>
|
|
299
299
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -488,212 +488,212 @@ import _ from 'lodash'
|
|
|
488
488
|
import { getItems } from 'feathers-hooks-common'
|
|
489
489
|
import { populateObject } from './hooks.query'
|
|
490
490
|
|
|
491
|
-
const debug = makeDebug('kdk:core:pusher:hooks')
|
|
491
|
+
const debug = <span class="cstat-no" title="statement not covered" >makeDebug('kdk:core:pusher:hooks')</span>
|
|
492
492
|
|
|
493
|
-
const defaultTopicField = 'topics'
|
|
493
|
+
const defaultTopicField = <span class="cstat-no" title="statement not covered" >'topics'</span>
|
|
494
494
|
|
|
495
|
-
export function populatePushObject (hook) {
|
|
496
|
-
|
|
497
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
495
|
+
export function <span class="fstat-no" title="function not covered" >populatePushObject </span>(hook) {
|
|
496
|
+
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'before') {</span>
|
|
497
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('The \'populatePushObject\' hook should only be used as a \'before\' hook.')</span>
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
// This hook is only for some of the operations
|
|
501
|
-
let action = ''
|
|
502
|
-
if (hook.data) {
|
|
503
|
-
action = hook.data.action
|
|
504
|
-
} else <span class="
|
|
505
|
-
action = hook.params.query.action
|
|
501
|
+
let action = <span class="cstat-no" title="statement not covered" >''</span>
|
|
502
|
+
<span class="cstat-no" title="statement not covered" > if (hook.data) {</span>
|
|
503
|
+
<span class="cstat-no" title="statement not covered" > action = hook.data.action</span>
|
|
504
|
+
} else <span class="cstat-no" title="statement not covered" >if (hook.params && hook.params.query) {</span>
|
|
505
|
+
<span class="cstat-no" title="statement not covered" > action = hook.params.query.action</span>
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
if (action === 'device') return Promise.resolve(hook)
|
|
509
|
-
else return populateObject({ serviceField: 'pushObjectService', idField: 'pushObject', throwOnNotFound: true })(hook)
|
|
508
|
+
<span class="cstat-no" title="statement not covered" > if (action === 'device') <span class="cstat-no" title="statement not covered" >return Promise.resolve(hook)</span></span>
|
|
509
|
+
else <span class="cstat-no" title="statement not covered" >return populateObject({ serviceField: 'pushObjectService', idField: 'pushObject', throwOnNotFound: true })(hook)</span>
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
-
export function <span class="fstat-no" title="function not covered" >createTopic
|
|
513
|
-
<span class="cstat-no" title="statement not covered"
|
|
512
|
+
export function <span class="fstat-no" title="function not covered" >createTopic </span>(options) {
|
|
513
|
+
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >as</span>ync function (hook) {</span>
|
|
514
514
|
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'after') {</span>
|
|
515
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
515
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('The \'createTopic\' hook should only be used as a \'before\' hook.')</span>
|
|
516
516
|
}
|
|
517
|
-
const pusherService = <span class="cstat-no" title="statement not covered" >hook.
|
|
518
|
-
const topicField = <span class="cstat-no" title="statement not covered" >_.
|
|
519
|
-
<span class="cstat-no" title="statement not covered" > hook.
|
|
517
|
+
const pusherService = <span class="cstat-no" title="statement not covered" >hook.app.getService('pusher')</span>
|
|
518
|
+
const topicField = <span class="cstat-no" title="statement not covered" >_.get(options, 'topicField', defaultTopicField)</span>
|
|
519
|
+
<span class="cstat-no" title="statement not covered" > hook.result = await pusherService.create(</span>
|
|
520
520
|
{ action: 'topic', topicField }, {
|
|
521
521
|
pushObject: hook.result,
|
|
522
522
|
pushObjectService: hook.service
|
|
523
523
|
})
|
|
524
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
525
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
524
|
+
<span class="cstat-no" title="statement not covered" > debug('Added topic to object ' + hook.result._id.toString() + ' from service ' + hook.service.path)</span>
|
|
525
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
export function <span class="fstat-no" title="function not covered" >removeTopic
|
|
530
|
-
<span class="cstat-no" title="statement not covered"
|
|
529
|
+
export function <span class="fstat-no" title="function not covered" >removeTopic </span>(options) {
|
|
530
|
+
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >as</span>ync function (hook) {</span>
|
|
531
531
|
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'after') {</span>
|
|
532
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
532
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('The \'removeTopic\' hook should only be used as a \'after\' hook.')</span>
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
-
const pusherService = <span class="cstat-no" title="statement not covered" >hook.
|
|
536
|
-
const topicField = <span class="cstat-no" title="statement not covered" >_.
|
|
537
|
-
<span class="cstat-no" title="statement not covered" > await
|
|
535
|
+
const pusherService = <span class="cstat-no" title="statement not covered" >hook.app.getService('pusher')</span>
|
|
536
|
+
const topicField = <span class="cstat-no" title="statement not covered" >_.get(options, 'topicField', defaultTopicField)</span>
|
|
537
|
+
<span class="cstat-no" title="statement not covered" > await pusherService.remove(hook.result._id.toString(), {</span>
|
|
538
538
|
query: { action: 'topic', topicField },
|
|
539
539
|
pushObject: hook.result,
|
|
540
540
|
pushObjectService: hook.service,
|
|
541
541
|
patch: hook.method !== 'remove' // Do not patch object when it is deleted
|
|
542
542
|
})
|
|
543
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
544
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
543
|
+
<span class="cstat-no" title="statement not covered" > debug('Removed topic on object ' + hook.result._id.toString() + ' from service ' + hook.service.path)</span>
|
|
544
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
export <span class="fstat-no" title="function not covered" >
|
|
549
|
-
<span class="cstat-no" title="statement not covered" > if (!hook.params.resource || !hook.params.resource.topics) <span class="cstat-no" title="statement not covered" >return
|
|
548
|
+
export async function <span class="fstat-no" title="function not covered" >subscribeSubjectsToResourceTopic </span>(hook) {
|
|
549
|
+
<span class="cstat-no" title="statement not covered" > if (!hook.params.resource || !hook.params.resource.topics) <span class="cstat-no" title="statement not covered" >return Promise.resolve(hook)</span></span>
|
|
550
550
|
|
|
551
|
-
const pusherService = <span class="cstat-no" title="statement not covered" >hook.
|
|
552
|
-
const subscriptions = <span class="cstat-no" title="statement not covered" >await pusherService.
|
|
551
|
+
const pusherService = <span class="cstat-no" title="statement not covered" >hook.app.getService('pusher')</span>
|
|
552
|
+
const subscriptions = <span class="cstat-no" title="statement not covered" >await pusherService.create(</span>
|
|
553
553
|
{ action: 'subscriptions' }, {
|
|
554
554
|
pushObject: hook.params.resource,
|
|
555
555
|
pushObjectService: hook.params.resourcesService,
|
|
556
556
|
users: hook.params.subjects
|
|
557
557
|
})
|
|
558
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
559
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
558
|
+
<span class="cstat-no" title="statement not covered" > debug('Subscribed ' + subscriptions.length + ' users on topic object ' + hook.params.resource._id.toString() + ' from service ' + (hook.params.resourcesService.path || hook.params.resourcesService.name), hook.params.subjects)</span>
|
|
559
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
export <span class="fstat-no" title="function not covered" >
|
|
563
|
-
<span class="cstat-no" title="statement not covered" > if (!hook.params.resource || !hook.params.resource.topics) <span class="cstat-no" title="statement not covered" >return
|
|
562
|
+
export async function <span class="fstat-no" title="function not covered" >unsubscribeSubjectsFromResourceTopic </span>(hook) {
|
|
563
|
+
<span class="cstat-no" title="statement not covered" > if (!hook.params.resource || !hook.params.resource.topics) <span class="cstat-no" title="statement not covered" >return Promise.resolve(hook)</span></span>
|
|
564
564
|
|
|
565
|
-
const pusherService = <span class="cstat-no" title="statement not covered" >hook.
|
|
566
|
-
const unsubscriptions = <span class="cstat-no" title="statement not covered" >await pusherService.
|
|
565
|
+
const pusherService = <span class="cstat-no" title="statement not covered" >hook.app.getService('pusher')</span>
|
|
566
|
+
const unsubscriptions = <span class="cstat-no" title="statement not covered" >await pusherService.remove(hook.params.resource._id.toString(), {</span>
|
|
567
567
|
query: { action: 'subscriptions' },
|
|
568
568
|
pushObject: hook.params.resource,
|
|
569
569
|
pushObjectService: hook.params.resourcesService,
|
|
570
570
|
users: hook.params.subjects
|
|
571
571
|
})
|
|
572
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
573
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
572
|
+
<span class="cstat-no" title="statement not covered" > debug('Unsubscribed ' + unsubscriptions.length + ' users on topic object ' + hook.params.resource._id.toString() + ' from service ' + (hook.params.resourcesService.path || hook.params.resourcesService.name), hook.params.subjects)</span>
|
|
573
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
574
574
|
}
|
|
575
575
|
|
|
576
|
-
export function <span class="fstat-no" title="function not covered" >updateSubjectSubscriptions
|
|
577
|
-
<span class="cstat-no" title="statement not covered"
|
|
578
|
-
function <span class="fstat-no" title="function not covered" >isTopicObjectEqual
|
|
579
|
-
<span class="cstat-no" title="statement not covered" > return _
|
|
576
|
+
export function <span class="fstat-no" title="function not covered" >updateSubjectSubscriptions </span>(options) {
|
|
577
|
+
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >as</span>ync function (hook) {</span>
|
|
578
|
+
function <span class="fstat-no" title="function not covered" >isTopicObjectEqual </span>(object1, object2) {
|
|
579
|
+
<span class="cstat-no" title="statement not covered" > return _.isEqual(object1.topics, object2.topics)</span>
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
const item = <span class="cstat-no" title="statement not covered" >getItems(
|
|
582
|
+
const item = <span class="cstat-no" title="statement not covered" >getItems(hook)</span>
|
|
583
583
|
// Field might be on the service object or subject
|
|
584
584
|
let topics = (<span class="cstat-no" title="statement not covered" >options.subjectAsItem</span>
|
|
585
585
|
? _.get(item, options.field) : _.get(hook.params, 'user.' + options.field))
|
|
586
586
|
<span class="cstat-no" title="statement not covered" > if (!topics) {</span>
|
|
587
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
588
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
587
|
+
<span class="cstat-no" title="statement not covered" > debug('No subscriptions to update for object ', item)</span>
|
|
588
|
+
<span class="cstat-no" title="statement not covered" > return Promise.resolve(hook)</span>
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
// Service can be contextual, look for context on initiator service
|
|
592
|
-
const itemService = <span class="cstat-no" title="statement not covered" >hook.
|
|
593
|
-
const pusherService = <span class="cstat-no" title="statement not covered" >hook.
|
|
594
|
-
<span class="cstat-no" title="statement not covered" > topics = (
|
|
592
|
+
const itemService = <span class="cstat-no" title="statement not covered" >hook.app.getService(options.service, hook.service.context)</span>
|
|
593
|
+
const pusherService = <span class="cstat-no" title="statement not covered" >hook.app.getService('pusher')</span>
|
|
594
|
+
<span class="cstat-no" title="statement not covered" > topics = (Array.isArray(topics) ? topics : [topics])</span>
|
|
595
595
|
// Retrieve previous version of the item
|
|
596
|
-
let previousTopics = <span class="cstat-no" title="statement not covered" >_.
|
|
596
|
+
let previousTopics = <span class="cstat-no" title="statement not covered" >_.get(hook.params.previousItem, options.field)</span>
|
|
597
597
|
<span class="cstat-no" title="statement not covered" > if (previousTopics) {</span>
|
|
598
|
-
<span class="cstat-no" title="statement not covered" > previousTopics = (
|
|
598
|
+
<span class="cstat-no" title="statement not covered" > previousTopics = (Array.isArray(previousTopics) ? previousTopics : [previousTopics])</span>
|
|
599
599
|
// Find common topics
|
|
600
|
-
const commonTopics = <span class="cstat-no" title="statement not covered" >_.
|
|
600
|
+
const commonTopics = <span class="cstat-no" title="statement not covered" >_.intersectionWith(topics, previousTopics, isTopicObjectEqual)</span>
|
|
601
601
|
// Unsubscribe removed topics
|
|
602
|
-
let removedTopics = <span class="cstat-no" title="statement not covered" >_.
|
|
602
|
+
let removedTopics = <span class="cstat-no" title="statement not covered" >_.differenceWith(previousTopics, commonTopics, isTopicObjectEqual)</span>
|
|
603
603
|
// Apply filter if any
|
|
604
604
|
<span class="cstat-no" title="statement not covered" > if (typeof options.filter === 'function') {</span>
|
|
605
|
-
<span class="cstat-no" title="statement not covered" > removedTopics =
|
|
605
|
+
<span class="cstat-no" title="statement not covered" > removedTopics = options.filter('unsubscribe', removedTopics)</span>
|
|
606
606
|
}
|
|
607
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
608
|
-
const unsubscribePromises = <span class="cstat-no" title="statement not covered" >removedTopics.
|
|
607
|
+
<span class="cstat-no" title="statement not covered" > debug('Removing topic subscriptions for object ', item, removedTopics, hook.params.user)</span>
|
|
608
|
+
const unsubscribePromises = <span class="cstat-no" title="statement not covered" >removedTopics.map(<span class="fstat-no" title="function not covered" >to</span>pic => <span class="cstat-no" title="statement not covered" >pusherService.remove(topic._id.toString(), {</span></span>
|
|
609
609
|
query: { action: 'subscriptions' },
|
|
610
610
|
pushObject: topic,
|
|
611
611
|
pushObjectService: itemService,
|
|
612
612
|
users: [(options.subjectAsItem ? item : hook.params.user)]
|
|
613
613
|
}))
|
|
614
614
|
// And subscribe new ones
|
|
615
|
-
let addedTopics = <span class="cstat-no" title="statement not covered" >_.
|
|
615
|
+
let addedTopics = <span class="cstat-no" title="statement not covered" >_.differenceWith(topics, commonTopics, isTopicObjectEqual)</span>
|
|
616
616
|
// Apply filter if any
|
|
617
617
|
<span class="cstat-no" title="statement not covered" > if (typeof options.filter === 'function') {</span>
|
|
618
|
-
<span class="cstat-no" title="statement not covered" > addedTopics =
|
|
618
|
+
<span class="cstat-no" title="statement not covered" > addedTopics = options.filter('subscribe', addedTopics)</span>
|
|
619
619
|
}
|
|
620
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
621
|
-
const subscribePromises = <span class="cstat-no" title="statement not covered" >addedTopics.
|
|
620
|
+
<span class="cstat-no" title="statement not covered" > debug('Adding topic subscriptions for object ', item, addedTopics, hook.params.user)</span>
|
|
621
|
+
const subscribePromises = <span class="cstat-no" title="statement not covered" >addedTopics.map(<span class="fstat-no" title="function not covered" >to</span>pic => <span class="cstat-no" title="statement not covered" >pusherService.create(</span></span>
|
|
622
622
|
{ action: 'subscriptions' }, {
|
|
623
623
|
pushObject: topic,
|
|
624
624
|
pushObjectService: itemService,
|
|
625
625
|
users: [(options.subjectAsItem ? item : hook.params.user)]
|
|
626
626
|
}))
|
|
627
|
-
const results = <span class="cstat-no" title="statement not covered" >await Promise.
|
|
628
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0
|
|
629
|
-
const unsubscriptions = <span class="cstat-no" title="statement not covered" >results[0
|
|
630
|
-
const topic = <span class="cstat-no" title="statement not covered" >removedTopics[i</span>
|
|
627
|
+
const results = <span class="cstat-no" title="statement not covered" >await Promise.all([Promise.all(unsubscribePromises), Promise.all(subscribePromises)])</span>
|
|
628
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < results[0].length; i++) {</span>
|
|
629
|
+
const unsubscriptions = <span class="cstat-no" title="statement not covered" >results[0][i]</span>
|
|
630
|
+
const topic = <span class="cstat-no" title="statement not covered" >removedTopics[i]</span>
|
|
631
631
|
<span class="cstat-no" title="statement not covered" > if (unsubscriptions.length > 0) {</span>
|
|
632
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
632
|
+
<span class="cstat-no" title="statement not covered" > debug('Unsubscribed from topic ' + topic)</span>
|
|
633
633
|
} else {
|
|
634
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
634
|
+
<span class="cstat-no" title="statement not covered" > debug('No unsubscription on topic ' + topic)</span>
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0
|
|
638
|
-
const subscriptions = <span class="cstat-no" title="statement not covered" >results[1
|
|
639
|
-
const topic = <span class="cstat-no" title="statement not covered" >addedTopics[i</span>
|
|
637
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < results[1].length; i++) {</span>
|
|
638
|
+
const subscriptions = <span class="cstat-no" title="statement not covered" >results[1][i]</span>
|
|
639
|
+
const topic = <span class="cstat-no" title="statement not covered" >addedTopics[i]</span>
|
|
640
640
|
<span class="cstat-no" title="statement not covered" > if (subscriptions.length > 0) {</span>
|
|
641
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
641
|
+
<span class="cstat-no" title="statement not covered" > debug('Subscribed from topic ', topic)</span>
|
|
642
642
|
} else {
|
|
643
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
643
|
+
<span class="cstat-no" title="statement not covered" > debug('No subscription on topic ', topic)</span>
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
} else {
|
|
647
647
|
<span class="cstat-no" title="statement not covered" > if (hook.method !== 'remove') {</span>
|
|
648
648
|
// Subscribed new topics
|
|
649
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
649
|
+
<span class="cstat-no" title="statement not covered" > debug('Adding topic subscriptions for object ', item, topics, hook.params.user)</span>
|
|
650
650
|
// Apply filter if any
|
|
651
651
|
<span class="cstat-no" title="statement not covered" > if (typeof options.filter === 'function') {</span>
|
|
652
|
-
<span class="cstat-no" title="statement not covered" > topics =
|
|
652
|
+
<span class="cstat-no" title="statement not covered" > topics = options.filter('subscribe', topics)</span>
|
|
653
653
|
}
|
|
654
|
-
const subscribePromises = <span class="cstat-no" title="statement not covered" >topics.
|
|
654
|
+
const subscribePromises = <span class="cstat-no" title="statement not covered" >topics.map(<span class="fstat-no" title="function not covered" >to</span>pic => <span class="cstat-no" title="statement not covered" >pusherService.create(</span></span>
|
|
655
655
|
{ action: 'subscriptions' }, {
|
|
656
656
|
pushObject: topic,
|
|
657
657
|
pushObjectService: itemService,
|
|
658
658
|
users: [(options.subjectAsItem ? item : hook.params.user)]
|
|
659
659
|
}))
|
|
660
|
-
const results = <span class="cstat-no" title="statement not covered" >await Promise.
|
|
661
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0
|
|
662
|
-
const subscriptions = <span class="cstat-no" title="statement not covered" >results[i</span>
|
|
663
|
-
const topic = <span class="cstat-no" title="statement not covered" >topics[i</span>
|
|
660
|
+
const results = <span class="cstat-no" title="statement not covered" >await Promise.all(subscribePromises)</span>
|
|
661
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < results.length; i++) {</span>
|
|
662
|
+
const subscriptions = <span class="cstat-no" title="statement not covered" >results[i]</span>
|
|
663
|
+
const topic = <span class="cstat-no" title="statement not covered" >topics[i]</span>
|
|
664
664
|
<span class="cstat-no" title="statement not covered" > if (subscriptions.length > 0) {</span>
|
|
665
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
665
|
+
<span class="cstat-no" title="statement not covered" > debug('Subscribed from topic ', topic)</span>
|
|
666
666
|
} else {
|
|
667
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
667
|
+
<span class="cstat-no" title="statement not covered" > debug('No subscription on topic ', topic)</span>
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
} else {
|
|
671
671
|
// Subscribed new topics
|
|
672
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
672
|
+
<span class="cstat-no" title="statement not covered" > debug('Removing topic subscriptions for object ', item, topics, hook.params.user)</span>
|
|
673
673
|
// Apply filter if any
|
|
674
674
|
<span class="cstat-no" title="statement not covered" > if (typeof options.filter === 'function') {</span>
|
|
675
|
-
<span class="cstat-no" title="statement not covered" > topics =
|
|
675
|
+
<span class="cstat-no" title="statement not covered" > topics = options.filter('unsubscribe', topics)</span>
|
|
676
676
|
}
|
|
677
|
-
const unsubscribePromises = <span class="cstat-no" title="statement not covered" >topics.
|
|
677
|
+
const unsubscribePromises = <span class="cstat-no" title="statement not covered" >topics.map(<span class="fstat-no" title="function not covered" >to</span>pic => <span class="cstat-no" title="statement not covered" >pusherService.remove(topic._id.toString(), {</span></span>
|
|
678
678
|
query: { action: 'subscriptions' },
|
|
679
679
|
pushObject: topic,
|
|
680
680
|
pushObjectService: itemService,
|
|
681
681
|
users: [(options.subjectAsItem ? item : hook.params.user)]
|
|
682
682
|
}))
|
|
683
|
-
const results = <span class="cstat-no" title="statement not covered" >await Promise.
|
|
684
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0
|
|
685
|
-
const unsubscriptions = <span class="cstat-no" title="statement not covered" >results[i</span>
|
|
686
|
-
const topic = <span class="cstat-no" title="statement not covered" >topics[i</span>
|
|
683
|
+
const results = <span class="cstat-no" title="statement not covered" >await Promise.all(unsubscribePromises)</span>
|
|
684
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < results.length; i++) {</span>
|
|
685
|
+
const unsubscriptions = <span class="cstat-no" title="statement not covered" >results[i]</span>
|
|
686
|
+
const topic = <span class="cstat-no" title="statement not covered" >topics[i]</span>
|
|
687
687
|
<span class="cstat-no" title="statement not covered" > if (unsubscriptions.length > 0) {</span>
|
|
688
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
688
|
+
<span class="cstat-no" title="statement not covered" > debug('Unsubscribed from topic ', topic)</span>
|
|
689
689
|
} else {
|
|
690
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
690
|
+
<span class="cstat-no" title="statement not covered" > debug('No unsubscription on topic ', topic)</span>
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
696
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
</pre></td></tr></table></pre>
|
|
@@ -703,7 +703,7 @@ export function <span class="fstat-no" title="function not covered" >updateSubje
|
|
|
703
703
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
704
704
|
Code coverage generated by
|
|
705
705
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
706
|
-
at
|
|
706
|
+
at Thu Feb 17 2022 13:49:01 GMT+0100 (GMT+01:00)
|
|
707
707
|
</div>
|
|
708
708
|
</div>
|
|
709
709
|
<script src="../../../prettify.js"></script>
|