@kalisio/kdk 1.3.5 → 1.4.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/.nyc_output/2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json +1 -0
- package/.nyc_output/{0b8aa700-8daa-49ce-85e7-a8f8965d55f0.json → 2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json} +0 -0
- package/.nyc_output/{20df4355-911a-4b16-a8ab-d3392e9f0a7f.json → 81d21e46-766a-46bc-b1b7-143ca577347a.json} +0 -0
- package/.nyc_output/a762cb58-70dc-4d39-ab69-928635affa98.json +1 -0
- package/.nyc_output/{257af0bb-96c3-465a-b5ef-a1df60078d5f.json → aaf3ebbb-f895-4d7b-9255-bc5dee832570.json} +0 -0
- package/.nyc_output/{284aebfa-23fd-425f-9d72-e4b8904dc224.json → dbeb2602-0ac2-4e66-978b-0d29548359ca.json} +0 -0
- package/.nyc_output/{5cbee06e-be6e-468a-bd78-4793ee785fe4.json → e47d1e4c-2fff-4dcb-908f-d3081162547c.json} +0 -0
- package/.nyc_output/processinfo/{2bece194-92f7-4971-a688-10604044a7fa.json → 2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json} +1 -1
- package/.nyc_output/processinfo/2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json +1 -0
- package/.nyc_output/processinfo/81d21e46-766a-46bc-b1b7-143ca577347a.json +1 -0
- package/.nyc_output/processinfo/a762cb58-70dc-4d39-ab69-928635affa98.json +1 -0
- package/.nyc_output/processinfo/aaf3ebbb-f895-4d7b-9255-bc5dee832570.json +1 -0
- package/.nyc_output/processinfo/dbeb2602-0ac2-4e66-978b-0d29548359ca.json +1 -0
- package/.nyc_output/processinfo/e47d1e4c-2fff-4dcb-908f-d3081162547c.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +189 -67
- package/README.md +1 -1
- package/coverage/core/api/application.js.html +145 -145
- package/coverage/core/api/authentication.js.html +37 -37
- package/coverage/core/api/db.js.html +74 -74
- package/coverage/core/api/hooks/hooks.account.js.html +15 -15
- package/coverage/core/api/hooks/hooks.authentication.js.html +16 -16
- package/coverage/core/api/hooks/hooks.authorisations.js.html +112 -121
- package/coverage/core/api/hooks/hooks.devices.js.html +5 -5
- package/coverage/core/api/hooks/hooks.groups.js.html +3 -3
- package/coverage/core/api/hooks/hooks.logger.js.html +7 -7
- package/coverage/core/api/hooks/hooks.model.js.html +149 -149
- package/coverage/core/api/hooks/hooks.organisations.js.html +13 -61
- package/coverage/core/api/hooks/hooks.pusher.js.html +7 -7
- package/coverage/core/api/hooks/hooks.query.js.html +68 -32
- package/coverage/core/api/hooks/hooks.service.js.html +15 -15
- package/coverage/core/api/hooks/hooks.storage.js.html +5 -5
- package/coverage/core/api/hooks/hooks.tags.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +111 -63
- package/coverage/core/api/hooks/index.html +72 -72
- package/coverage/core/api/hooks/index.js.html +15 -15
- package/coverage/core/api/index.html +35 -35
- package/coverage/core/api/index.js.html +13 -13
- package/coverage/core/api/marshall.js.html +81 -81
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +7 -7
- package/coverage/core/api/oauth2-handler.js.html +3 -3
- package/coverage/core/api/oauth2-verifier.js.html +5 -5
- package/coverage/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/core/api/services/account/account.service.js.html +34 -34
- package/coverage/core/api/services/account/index.html +17 -17
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +3 -3
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +40 -37
- package/coverage/core/api/services/authorisations/index.html +17 -17
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/devices/devices.hooks.js.html +1 -1
- package/coverage/core/api/services/devices/devices.service.js.html +1 -1
- package/coverage/core/api/services/devices/index.html +1 -1
- package/coverage/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/index.html +5 -5
- package/coverage/core/api/services/index.js.html +40 -40
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/core/api/services/pusher/index.html +1 -1
- package/coverage/core/api/services/pusher/pusher.channels.js.html +1 -1
- package/coverage/core/api/services/pusher/pusher.hooks.js.html +1 -1
- package/coverage/core/api/services/pusher/pusher.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +1 -1
- package/coverage/core/api/services/storage/storage.hooks.js.html +4 -4
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +1 -1
- package/coverage/core/api/services/users/users.hooks.js.html +12 -12
- package/coverage/core/common/index.html +32 -32
- package/coverage/core/common/index.js.html +27 -27
- package/coverage/core/common/permissions.js.html +135 -75
- package/coverage/index.html +157 -157
- package/coverage/lcov-report/core/api/application.js.html +145 -145
- package/coverage/lcov-report/core/api/authentication.js.html +37 -37
- package/coverage/lcov-report/core/api/db.js.html +74 -74
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +15 -15
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +16 -16
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +112 -121
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +5 -5
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +3 -3
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +149 -149
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +13 -61
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +68 -32
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +15 -15
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +5 -5
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +111 -63
- package/coverage/lcov-report/core/api/hooks/index.html +72 -72
- package/coverage/lcov-report/core/api/hooks/index.js.html +15 -15
- package/coverage/lcov-report/core/api/index.html +35 -35
- package/coverage/lcov-report/core/api/index.js.html +13 -13
- package/coverage/lcov-report/core/api/marshall.js.html +81 -81
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +7 -7
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +3 -3
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +5 -5
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/account/index.html +17 -17
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +3 -3
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +40 -37
- package/coverage/lcov-report/core/api/services/authorisations/index.html +17 -17
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/devices.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/devices.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/index.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +5 -5
- package/coverage/lcov-report/core/api/services/index.js.html +40 -40
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/index.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.channels.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +4 -4
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +1 -1
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +12 -12
- package/coverage/lcov-report/core/common/index.html +32 -32
- package/coverage/lcov-report/core/common/index.js.html +27 -27
- package/coverage/lcov-report/core/common/permissions.js.html +135 -75
- package/coverage/lcov-report/index.html +157 -157
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +55 -55
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +337 -274
- package/coverage/lcov-report/map/api/hooks/index.html +43 -43
- package/coverage/lcov-report/map/api/hooks/index.js.html +12 -12
- package/coverage/lcov-report/map/api/index.html +31 -31
- package/coverage/lcov-report/map/api/index.js.html +24 -24
- package/coverage/lcov-report/map/api/marshall.js.html +39 -39
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +22 -22
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/index.html +43 -43
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +21 -21
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +156 -156
- package/coverage/lcov-report/map/api/services/alerts/index.html +30 -30
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +19 -19
- package/coverage/lcov-report/map/api/services/catalog/index.html +17 -17
- 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 +20 -20
- package/coverage/lcov-report/map/api/services/features/index.html +21 -21
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.hooks.js.html +8 -8
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.service.js.html +99 -99
- package/coverage/lcov-report/map/api/services/geocoder/index.html +28 -28
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +71 -71
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +9 -9
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +120 -120
- package/coverage/lcov-report/map/common/grid.js.html +268 -268
- package/coverage/lcov-report/map/common/index.html +149 -149
- package/coverage/lcov-report/map/common/index.js.html +31 -31
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +71 -71
- package/coverage/lcov-report/map/common/moment-utils.js.html +14 -14
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +280 -280
- package/coverage/lcov-report/map/common/opendap-utils.js.html +220 -220
- package/coverage/lcov-report/map/common/permissions.js.html +21 -21
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +51 -51
- package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +99 -99
- package/coverage/lcov-report/map/common/wcs-utils.js.html +66 -66
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +196 -196
- package/coverage/lcov-report/map/common/wfs-utils.js.html +8 -5
- package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wmts-utils.js.html +71 -11
- package/coverage/lcov.info +3588 -3659
- package/coverage/map/api/hooks/hooks.catalog.js.html +55 -55
- package/coverage/map/api/hooks/hooks.query.js.html +337 -274
- package/coverage/map/api/hooks/index.html +43 -43
- package/coverage/map/api/hooks/index.js.html +12 -12
- package/coverage/map/api/index.html +31 -31
- package/coverage/map/api/index.js.html +24 -24
- package/coverage/map/api/marshall.js.html +39 -39
- package/coverage/map/api/models/alerts.model.mongodb.js.html +20 -20
- package/coverage/map/api/models/catalog.model.mongodb.js.html +22 -22
- package/coverage/map/api/models/features.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/index.html +43 -43
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +21 -21
- package/coverage/map/api/services/alerts/alerts.service.js.html +156 -156
- package/coverage/map/api/services/alerts/index.html +30 -30
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +19 -19
- package/coverage/map/api/services/catalog/index.html +17 -17
- 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 +20 -20
- package/coverage/map/api/services/features/index.html +21 -21
- package/coverage/map/api/services/geocoder/geocoder.hooks.js.html +8 -8
- package/coverage/map/api/services/geocoder/geocoder.service.js.html +99 -99
- package/coverage/map/api/services/geocoder/index.html +28 -28
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +71 -71
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +9 -9
- package/coverage/map/common/geotiff-grid-source.js.html +120 -120
- package/coverage/map/common/grid.js.html +268 -268
- package/coverage/map/common/index.html +149 -149
- package/coverage/map/common/index.js.html +31 -31
- package/coverage/map/common/meteo-model-grid-source.js.html +71 -71
- package/coverage/map/common/moment-utils.js.html +14 -14
- package/coverage/map/common/opendap-grid-source.js.html +280 -280
- package/coverage/map/common/opendap-utils.js.html +220 -220
- package/coverage/map/common/permissions.js.html +21 -21
- package/coverage/map/common/time-based-grid-source.js.html +51 -51
- package/coverage/map/common/tms-utils.js.html +1 -1
- package/coverage/map/common/wcs-grid-source.js.html +99 -99
- package/coverage/map/common/wcs-utils.js.html +66 -66
- package/coverage/map/common/weacast-grid-source.js.html +196 -196
- package/coverage/map/common/wfs-utils.js.html +8 -5
- package/coverage/map/common/wms-utils.js.html +1 -1
- package/coverage/map/common/wmts-utils.js.html +71 -11
- package/extras/icons/kanban.png +0 -0
- package/extras/testcafe/page-models/map/catalog.js +2 -2
- package/extras/tours/core/add-member.js +10 -1
- package/extras/tours/core/{tag-member.js → edit-member-tags.js} +4 -3
- package/extras/tours/core/groups.js +8 -2
- package/extras/tours/core/members.js +11 -21
- package/extras/tours/core/tags.js +7 -1
- package/extras/tours/map/catalog-categories.js +4 -4
- package/extras/tours/map/catalog-panel.js +16 -16
- package/extras/tours/map/favorite-views.js +3 -3
- package/lib/core/api/hooks/hooks.authorisations.js +149 -140
- package/lib/core/api/hooks/hooks.authorisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.organisations.js +1 -23
- package/lib/core/api/hooks/hooks.organisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.query.js +22 -0
- package/lib/core/api/hooks/hooks.query.js.map +1 -1
- package/lib/core/api/hooks/hooks.users.js +34 -18
- package/lib/core/api/hooks/hooks.users.js.map +1 -1
- package/lib/core/api/services/authorisations/authorisations.service.js +34 -25
- package/lib/core/api/services/authorisations/authorisations.service.js.map +1 -1
- package/lib/core/client/api.js +1 -0
- package/lib/core/client/api.js.map +1 -1
- package/lib/core/client/components/account/KAccountDZ.vue +3 -4
- package/lib/core/client/components/account/KAccountDevices.vue +5 -6
- package/lib/core/client/components/account/KDeviceCard.vue +2 -1
- package/lib/core/client/components/account/KIdentityPanel.vue +1 -7
- package/lib/core/client/components/collection/KBoard.vue +26 -155
- package/lib/core/client/components/collection/KCard.vue +144 -42
- package/lib/core/client/components/collection/KCardSection.vue +52 -0
- package/lib/core/client/components/collection/KColumn.vue +181 -0
- package/lib/core/client/components/collection/KGrid.vue +13 -18
- package/lib/core/client/components/collection/KHistory.vue +61 -89
- package/lib/core/client/components/collection/KHistoryEntry.vue +90 -66
- package/lib/core/client/components/collection/KItem.vue +21 -2
- package/lib/core/client/components/collection/KList.vue +9 -12
- package/lib/core/client/components/collection/KTable.vue +33 -39
- package/lib/core/client/components/collection/index.js +6 -1
- package/lib/core/client/components/collection/index.js.map +1 -1
- package/lib/core/client/components/editor/KEditor.vue +0 -6
- package/lib/core/client/components/editor/KModalEditor.vue +4 -4
- package/lib/core/client/components/editor/KSettingsEditor.vue +49 -0
- package/lib/core/client/components/form/KAttachmentField.vue +10 -10
- package/lib/core/client/components/form/KChipsField.vue +28 -23
- package/lib/core/client/components/form/KColorField.vue +30 -25
- package/lib/core/client/components/form/KForm.vue +0 -12
- package/lib/core/client/components/form/KIconField.vue +1 -0
- package/lib/core/client/components/form/KItemField.vue +8 -4
- package/lib/core/client/components/form/KRoleField.vue +56 -0
- package/lib/core/client/components/form/KSelectField.vue +16 -1
- package/lib/core/client/components/form/KView.vue +5 -14
- package/lib/core/client/components/frame/KAction.vue +18 -12
- package/lib/core/client/components/frame/KAvatar.vue +3 -3
- package/lib/core/client/components/frame/KChart.vue +60 -0
- package/lib/core/client/components/frame/KChipsPane.vue +80 -0
- package/lib/core/client/components/frame/KContent.vue +1 -1
- package/lib/core/client/components/frame/KModal.vue +30 -44
- package/lib/core/client/components/frame/KPanel.vue +1 -1
- package/lib/core/client/components/frame/{KMenu.vue → KPopupAction.vue} +6 -7
- package/lib/core/client/components/frame/KSpot.vue +31 -0
- package/lib/core/client/components/frame/KStamp.vue +62 -0
- package/lib/core/client/components/frame/index.js +56 -1
- package/lib/core/client/components/frame/index.js.map +1 -1
- package/lib/core/client/components/input/KColorChooser.vue +16 -8
- package/lib/core/client/components/input/KIconChooser.vue +2 -1
- package/lib/core/client/components/input/KUploader.vue +14 -5
- package/lib/core/client/components/layout/KAbout.vue +9 -3
- package/lib/core/client/components/layout/KFab.vue +1 -1
- package/lib/core/client/components/layout/KPage.vue +44 -19
- package/lib/core/client/components/layout/KTour.vue +2 -2
- package/lib/core/client/components/layout/KWelcome.vue +13 -12
- package/lib/core/client/components/layout/KWindow.vue +1 -1
- package/lib/core/client/components/media/KImageViewer.vue +9 -7
- package/lib/core/client/components/media/KMediaBrowser.vue +12 -8
- package/lib/core/client/components/menu/KMenu.vue +103 -0
- package/lib/core/client/components/team/KAddMember.vue +17 -9
- package/lib/core/client/components/team/KChangeRole.vue +5 -7
- package/lib/core/client/components/team/KGroupCard.vue +34 -51
- package/lib/core/client/components/team/KGroupsActivity.vue +9 -2
- package/lib/core/client/components/team/KJoinGroup.vue +5 -7
- package/lib/core/client/components/team/KMemberCard.vue +104 -63
- package/lib/core/client/components/team/KMembersActivity.vue +9 -2
- package/lib/core/client/components/team/KOrganisationsActivity.vue +8 -1
- package/lib/core/client/components/team/KTagCard.vue +26 -26
- package/lib/core/client/components/team/KTagsActivity.vue +9 -2
- package/lib/core/client/components/time/KTimeRange.vue +144 -0
- package/lib/core/client/components/viewer/KModalViewer.vue +6 -0
- package/lib/core/client/components/viewer/KViewer.vue +0 -6
- package/lib/core/client/i18n/core_en.json +133 -93
- package/lib/core/client/i18n/core_fr.json +56 -16
- package/lib/core/client/index.js +28 -14
- package/lib/core/client/index.js.map +1 -1
- package/lib/core/client/mixins/mixin.authorisation.js +28 -18
- package/lib/core/client/mixins/mixin.authorisation.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-collection.js +57 -9
- package/lib/core/client/mixins/mixin.base-collection.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-context.js +1 -1
- package/lib/core/client/mixins/mixin.base-context.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-editor.js +26 -16
- package/lib/core/client/mixins/mixin.base-editor.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-field.js +0 -4
- package/lib/core/client/mixins/mixin.base-field.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-item.js +29 -14
- package/lib/core/client/mixins/mixin.base-item.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-viewer.js +0 -2
- package/lib/core/client/mixins/mixin.base-viewer.js.map +1 -1
- package/lib/core/client/mixins/mixin.object-proxy.js +17 -3
- package/lib/core/client/mixins/mixin.object-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.schema-proxy.js +31 -0
- package/lib/core/client/mixins/mixin.schema-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.service.js +5 -33
- package/lib/core/client/mixins/mixin.service.js.map +1 -1
- package/lib/core/client/services/index.js +23 -0
- package/lib/core/client/services/index.js.map +1 -1
- package/lib/core/client/services/local-settings.service.js +4 -0
- package/lib/core/client/services/local-settings.service.js.map +1 -1
- package/lib/core/client/time.js +131 -0
- package/lib/core/client/time.js.map +1 -0
- package/lib/core/common/permissions.js +65 -23
- package/lib/core/common/permissions.js.map +1 -1
- package/lib/core/common/schemas/groups.create.json +1 -1
- package/lib/core/common/schemas/groups.update.json +1 -1
- package/lib/core/common/schemas/organisations.create.json +1 -1
- package/lib/core/common/schemas/organisations.update.json +2 -2
- package/lib/core/common/schemas/settings.update.json +139 -0
- package/lib/core/common/schemas/tags.update.json +9 -1
- package/lib/map/api/hooks/hooks.query.js +48 -27
- package/lib/map/api/hooks/hooks.query.js.map +1 -1
- package/lib/map/api/services/features/features.hooks.js +1 -1
- package/lib/map/api/services/features/features.hooks.js.map +1 -1
- package/lib/map/client/components/KColorLegend.vue +25 -23
- package/lib/map/client/components/KFavoriteViews.vue +71 -35
- package/lib/map/client/components/KFeaturesChart.vue +11 -9
- package/lib/map/client/components/KFeaturesFilter.vue +15 -7
- package/lib/map/client/components/KFeaturesTable.vue +27 -2
- package/lib/map/client/components/KLayerEditionToolbar.vue +43 -0
- package/lib/map/client/components/KLayerStyleEditor.vue +10 -4
- package/lib/map/client/components/KLayerStyleForm.vue +14 -11
- package/lib/map/client/components/KLocationInput.vue +126 -65
- package/lib/map/client/components/KLocationMap.vue +199 -84
- package/lib/map/client/components/KPositionIndicator.vue +1 -0
- package/lib/map/client/components/KTimeline.vue +41 -36
- package/lib/map/client/components/KUrlLegend.vue +21 -19
- package/lib/map/client/components/catalog/KBaseLayersSelector.vue +105 -0
- package/lib/map/client/components/catalog/KCatalog.vue +14 -2
- package/lib/map/client/components/catalog/KConnectLayer.vue +31 -11
- package/lib/map/client/components/catalog/KCreateLayer.vue +37 -14
- package/lib/map/client/components/catalog/KImportLayer.vue +28 -8
- package/lib/map/client/components/catalog/KLayerCategories.vue +86 -62
- package/lib/map/client/components/catalog/KLayersSelector.vue +42 -42
- package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/lib/map/client/components/form/KLocationField.vue +1 -1
- package/lib/map/client/components/form/KOwsLayerField.vue +21 -2
- package/lib/map/client/components/form/KOwsServiceField.vue +1 -0
- package/lib/map/client/components/widget/KInformationBox.vue +10 -16
- package/lib/map/client/components/widget/KMapillaryViewer.vue +59 -49
- package/lib/map/client/components/widget/KTimeSeries.vue +39 -29
- package/lib/map/client/i18n/map_en.json +65 -17
- package/lib/map/client/i18n/map_fr.json +67 -20
- package/lib/map/client/init.js +18 -6
- package/lib/map/client/init.js.map +1 -1
- package/lib/map/client/leaflet/GSMaPLayer.js +4 -9
- package/lib/map/client/leaflet/GSMaPLayer.js.map +1 -1
- package/lib/map/client/leaflet/GradientPath.js.map +1 -1
- package/lib/map/client/leaflet/MaskLayer.js +64 -0
- package/lib/map/client/leaflet/MaskLayer.js.map +1 -0
- package/lib/map/client/mixins/globe/mixin.base-globe.js +4 -1
- package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js +7 -9
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/index.js +8 -13
- package/lib/map/client/mixins/index.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.base-map.js +30 -6
- package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.canvas-layers.js +274 -51
- package/lib/map/client/mixins/map/mixin.canvas-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.edit-layers.js +218 -121
- package/lib/map/client/mixins/map/mixin.edit-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.file-layers.js +25 -18
- package/lib/map/client/mixins/map/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.geojson-layers.js +18 -10
- package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.georaster-layers.js +7 -4
- package/lib/map/client/mixins/map/mixin.georaster-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js +3 -3
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js +8 -10
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js +25 -40
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js.map +1 -1
- package/lib/map/client/mixins/mixin.activity.js +60 -68
- package/lib/map/client/mixins/mixin.activity.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-selection.js +8 -10
- package/lib/map/client/mixins/mixin.feature-selection.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-service.js +7 -5
- package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
- package/lib/map/client/mixins/mixin.weacast.js +6 -4
- package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
- package/lib/map/client/pixi-utils.js +9 -0
- package/lib/map/client/pixi-utils.js.map +1 -1
- package/lib/map/client/utils.js +50 -0
- package/lib/map/client/utils.js.map +1 -1
- package/lib/map/common/wfs-utils.js +1 -1
- package/lib/map/common/wfs-utils.js.map +1 -1
- package/lib/map/common/wmts-utils.js +31 -7
- package/lib/map/common/wmts-utils.js.map +1 -1
- package/lib/test/client/core/account.js +100 -0
- package/lib/test/client/core/account.js.map +1 -0
- package/lib/test/client/core/api.js +400 -0
- package/lib/test/client/core/api.js.map +1 -0
- package/lib/test/client/core/collection.js +109 -0
- package/lib/test/client/core/collection.js.map +1 -0
- package/lib/test/client/core/index.js +90 -0
- package/lib/test/client/core/index.js.map +1 -0
- package/lib/test/client/core/layout.js +221 -0
- package/lib/test/client/core/layout.js.map +1 -0
- package/lib/test/client/core/runner.js +204 -0
- package/lib/test/client/core/runner.js.map +1 -0
- package/lib/test/client/core/screens.js +68 -0
- package/lib/test/client/core/screens.js.map +1 -0
- package/lib/test/client/core/utils.js +304 -0
- package/lib/test/client/core/utils.js.map +1 -0
- package/lib/test/client/index.js +20 -0
- package/lib/test/client/index.js.map +1 -0
- package/lib/test/client/map/catalog.js +191 -0
- package/lib/test/client/map/catalog.js.map +1 -0
- package/lib/test/client/map/controls.js +54 -0
- package/lib/test/client/map/controls.js.map +1 -0
- package/lib/test/client/map/index.js +30 -0
- package/lib/test/client/map/index.js.map +1 -0
- package/package.json +17 -9
- package/test.client.js +1 -0
- package/tests/core/test-log-2021-07-15.log +71 -0
- package/tests/core/test-log-2021-09-02.log +47 -0
- package/tests/map/test-log-%DATE%.logYYYY-07-DD +12 -0
- package/tests/map/test-log-%DATE%.logYYYY-09-DD +6 -0
- package/tests/map/test-log-2021-07-12.log +12 -0
- package/tests/map/test-log-2021-07-15.log +5 -0
- package/tests/map/test-log-2021-09-02.log +3 -0
- package/.nyc_output/11cd93d8-69cb-405c-98a3-d249ea35b6da.json +0 -1
- package/.nyc_output/2bece194-92f7-4971-a688-10604044a7fa.json +0 -1
- package/.nyc_output/5ddee33e-b658-4c8e-a247-54f575ac67e8.json +0 -1
- package/.nyc_output/78760ae4-555f-4d9c-a6a1-acf5e2f0fe45.json +0 -1
- package/.nyc_output/d0bb2559-084e-4c92-b9e6-29a9abd41f7c.json +0 -1
- package/.nyc_output/processinfo/0b8aa700-8daa-49ce-85e7-a8f8965d55f0.json +0 -1
- package/.nyc_output/processinfo/11cd93d8-69cb-405c-98a3-d249ea35b6da.json +0 -1
- package/.nyc_output/processinfo/20df4355-911a-4b16-a8ab-d3392e9f0a7f.json +0 -1
- package/.nyc_output/processinfo/257af0bb-96c3-465a-b5ef-a1df60078d5f.json +0 -1
- package/.nyc_output/processinfo/284aebfa-23fd-425f-9d72-e4b8904dc224.json +0 -1
- package/.nyc_output/processinfo/5cbee06e-be6e-468a-bd78-4793ee785fe4.json +0 -1
- package/.nyc_output/processinfo/5ddee33e-b658-4c8e-a247-54f575ac67e8.json +0 -1
- package/.nyc_output/processinfo/78760ae4-555f-4d9c-a6a1-acf5e2f0fe45.json +0 -1
- package/.nyc_output/processinfo/d0bb2559-084e-4c92-b9e6-29a9abd41f7c.json +0 -1
- package/lib/core/client/components/frame/KLabel.vue +0 -56
- package/lib/core/client/components/team/KTagsPane.vue +0 -35
- package/lib/map/client/leaflet/TiledMapillaryLayer.js +0 -137
- package/lib/map/client/leaflet/TiledMapillaryLayer.js.map +0 -1
- package/lib/map/client/mixins/mixin.time.js +0 -73
- package/lib/map/client/mixins/mixin.time.js.map +0 -1
- package/tests/core/account.test.js +0 -415
- package/tests/core/client.test.js.skip +0 -37
- package/tests/core/config/default.js +0 -97
- package/tests/core/config/email-templates/confirmInvitation/html.ejs +0 -18
- package/tests/core/config/email-templates/identityChange/html.ejs +0 -12
- package/tests/core/config/email-templates/newDevice/html.ejs +0 -7
- package/tests/core/config/email-templates/passwordChange/html.ejs +0 -5
- package/tests/core/config/email-templates/resendVerifySignup/html.ejs +0 -10
- package/tests/core/config/email-templates/resetPwd/html.ejs +0 -5
- package/tests/core/config/email-templates/sendResetPwd/html.ejs +0 -8
- package/tests/core/config/email-templates/verifySignup/html.ejs +0 -3
- package/tests/core/data/10k_most_common_passwords.txt +0 -10000
- package/tests/core/data/logo.png +0 -0
- package/tests/core/hooks.test.js +0 -175
- package/tests/core/index.test.js +0 -418
- package/tests/core/notifications.test.js +0 -465
- package/tests/core/storage.test.js +0 -134
- package/tests/core/team.test.js +0 -610
- package/tests/core/utils.js +0 -59
- package/tests/map/alerts.test.js +0 -554
- package/tests/map/config/default.js +0 -112
- package/tests/map/config/layers.json +0 -37
- package/tests/map/daptiles.test.js +0 -41
- package/tests/map/data/DescribeCoverage.xml +0 -55
- package/tests/map/data/GetCoverage.tif +0 -0
- package/tests/map/data/adsb.observations.json +0 -132
- package/tests/map/data/dataset.grb.das +0 -55
- package/tests/map/data/dataset.grb.dds +0 -17
- package/tests/map/data/dataset.grb.dods +0 -0
- package/tests/map/data/lat_lon_bounds.grb.dods +0 -0
- package/tests/map/data/subdataset.grb.dods +0 -0
- package/tests/map/data/vigicrues.observations.json +0 -47042
- package/tests/map/data/vigicrues.stations.json +0 -15422
- package/tests/map/data/zones.json +0 -1228
- package/tests/map/grid-sources.test.js +0 -304
- package/tests/map/hooks.test.js +0 -96
- package/tests/map/index.test.js +0 -333
|
@@ -1,38 +1,51 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
<div class="fit column">
|
|
3
|
+
<div v-if="toolbar" class="full-width row">
|
|
4
|
+
<q-toolbar class="q-pl-sm q-pr-sm bg-accent text-white">
|
|
5
|
+
<k-text-area :text="locationName" />
|
|
6
|
+
<q-space />
|
|
7
|
+
<q-btn v-if="drawable" icon="las la-road" flat round dense @click="onStartLine">
|
|
8
|
+
<q-tooltip>
|
|
9
|
+
{{ $t('KLocationMap.DRAW_LINE') }}
|
|
10
|
+
</q-tooltip>
|
|
11
|
+
</q-btn>
|
|
12
|
+
<q-btn v-if="drawable" icon="las la-draw-polygon" flat round dense @click="onStartPolygon">
|
|
13
|
+
<q-tooltip>
|
|
14
|
+
{{ $t('KLocationMap.DRAW_POLYGON') }}
|
|
15
|
+
</q-tooltip>
|
|
16
|
+
</q-btn>
|
|
17
|
+
<q-btn v-if="editable" icon="las la-crosshairs" flat round dense @click="onGeolocate">
|
|
18
|
+
<q-tooltip>
|
|
19
|
+
{{ $t('KLocationMap.LOCATE_BUTTON') }}
|
|
20
|
+
</q-tooltip>
|
|
21
|
+
</q-btn>
|
|
22
|
+
<q-btn icon="las la-search-location" flat round dense @click="centerMap">
|
|
23
|
+
<q-tooltip>
|
|
24
|
+
{{ $t('KLocationMap.RECENTER_BUTTON') }}
|
|
25
|
+
</q-tooltip>
|
|
26
|
+
</q-btn>
|
|
27
|
+
<q-btn v-if="closable" icon="las la-times" flat round dense @click="closeMap">
|
|
28
|
+
<q-tooltip>
|
|
29
|
+
{{ $t('KLocationMap.CLOSE_BUTTON') }}
|
|
30
|
+
</q-tooltip>
|
|
31
|
+
</q-btn>
|
|
32
|
+
</q-toolbar>
|
|
33
|
+
</div>
|
|
34
|
+
<div ref="map" class="col" style="fontWeight: normal; zIndex: 0; position: relative">
|
|
35
|
+
<q-resize-observer @resize="onMapResized" />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
27
38
|
</template>
|
|
28
39
|
|
|
29
40
|
<script>
|
|
41
|
+
import _ from 'lodash'
|
|
30
42
|
import L from 'leaflet'
|
|
43
|
+
import centroid from '@turf/centroid'
|
|
31
44
|
import { colors } from 'quasar'
|
|
32
45
|
import { mixins as kCoreMixins } from '../../../core/client'
|
|
33
46
|
import * as mapMixins from '../mixins/map'
|
|
34
47
|
import { Geolocation } from '../geolocation'
|
|
35
|
-
import { setGatewayJwt, formatUserCoordinates } from '../utils'
|
|
48
|
+
import { setGatewayJwt, formatUserCoordinates, bindLeafletEvents, unbindLeafletEvents } from '../utils'
|
|
36
49
|
|
|
37
50
|
export default {
|
|
38
51
|
name: 'k-location-map',
|
|
@@ -47,19 +60,6 @@ export default {
|
|
|
47
60
|
return null
|
|
48
61
|
}
|
|
49
62
|
},
|
|
50
|
-
editable: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
size: {
|
|
55
|
-
type: Object,
|
|
56
|
-
default: () => {
|
|
57
|
-
return {
|
|
58
|
-
width: 360,
|
|
59
|
-
height: 400
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
63
|
mapOptions: {
|
|
64
64
|
type: Object,
|
|
65
65
|
default: () => {
|
|
@@ -76,72 +76,178 @@ export default {
|
|
|
76
76
|
type: Object,
|
|
77
77
|
default: () => {
|
|
78
78
|
return {
|
|
79
|
-
iconClasses: 'fas fa-circle 0.
|
|
79
|
+
iconClasses: 'fas fa-circle 0.5rem',
|
|
80
80
|
markerColor: colors.getBrand('primary'),
|
|
81
81
|
iconColor: '#FFFFFF',
|
|
82
82
|
iconXOffset: 1,
|
|
83
83
|
iconYOffset: 0
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
},
|
|
87
|
+
editable: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
drawable: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
},
|
|
95
|
+
closable: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
},
|
|
99
|
+
toolbar: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
data () {
|
|
105
|
+
return {
|
|
106
|
+
location: this.defaultLocation()
|
|
86
107
|
}
|
|
87
108
|
},
|
|
88
109
|
computed: {
|
|
89
|
-
|
|
90
|
-
return
|
|
110
|
+
locationName () {
|
|
111
|
+
return this.location ? this.location.name : ''
|
|
91
112
|
}
|
|
92
113
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
location
|
|
96
|
-
|
|
114
|
+
watch: {
|
|
115
|
+
value: function () {
|
|
116
|
+
this.location = this.value
|
|
117
|
+
this.refresh()
|
|
118
|
+
},
|
|
119
|
+
editable: function () {
|
|
120
|
+
this.refresh()
|
|
121
|
+
},
|
|
122
|
+
drawable: function () {
|
|
123
|
+
this.refresh()
|
|
97
124
|
}
|
|
98
125
|
},
|
|
99
126
|
methods: {
|
|
100
127
|
defaultLocation () {
|
|
128
|
+
const latitude = this.$store.get('geolocation.position.latitude', 0)
|
|
129
|
+
const longitude = this.$store.get('geolocation.position.longitude', 0)
|
|
101
130
|
return {
|
|
102
|
-
name: '',
|
|
103
|
-
latitude
|
|
104
|
-
longitude
|
|
131
|
+
name: formatUserCoordinates(latitude, longitude, this.$store.get('locationFormat', 'FFf')),
|
|
132
|
+
latitude,
|
|
133
|
+
longitude
|
|
105
134
|
}
|
|
106
135
|
},
|
|
107
136
|
centerMap () {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
async refreshLocation () {
|
|
111
|
-
// Updated the location
|
|
112
|
-
if (this.value) {
|
|
113
|
-
this.location = this.value
|
|
137
|
+
if (this.drawLayer) {
|
|
138
|
+
this.map.fitBounds(this.drawLayer.getBounds())
|
|
114
139
|
} else {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.location
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
140
|
+
const longitude = (_.has(this.location, 'longitude')
|
|
141
|
+
? _.get(this.location, 'longitude') : _.get(this.location, 'coordinates[0]'))
|
|
142
|
+
const latitude = (_.has(this.location, 'latitude')
|
|
143
|
+
? _.get(this.location, 'latitude') : _.get(this.location, 'coordinates[1]'))
|
|
144
|
+
this.center(longitude, latitude, this.mapOptions.zoom)
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
closeMap () {
|
|
148
|
+
this.$emit('close', this.location)
|
|
149
|
+
},
|
|
150
|
+
async geolocate () {
|
|
151
|
+
await Geolocation.update()
|
|
152
|
+
const position = this.$store.get('geolocation.position')
|
|
153
|
+
if (position) {
|
|
154
|
+
this.location = {
|
|
155
|
+
name: formatUserCoordinates(position.latitude, position.longitude, this.$store.get('locationFormat', 'FFf')),
|
|
156
|
+
latitude: position.latitude,
|
|
157
|
+
longitude: position.longitude
|
|
123
158
|
}
|
|
124
159
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this.marker
|
|
130
|
-
|
|
131
|
-
draggable: this.editable
|
|
132
|
-
})
|
|
133
|
-
this.marker.addTo(this.map)
|
|
134
|
-
if (this.editable) this.marker.on('drag', this.onLocationDragged)
|
|
135
|
-
} else {
|
|
136
|
-
this.marker.setLatLng([this.location.latitude, this.location.longitude])
|
|
160
|
+
},
|
|
161
|
+
clear () {
|
|
162
|
+
if (this.marker) {
|
|
163
|
+
this.marker.off('drag', this.onLocationDragged)
|
|
164
|
+
this.marker.removeFrom(this.map)
|
|
165
|
+
this.marker = null
|
|
137
166
|
}
|
|
138
|
-
this.
|
|
167
|
+
if (this.drawLayer) {
|
|
168
|
+
this.map.removeLayer(this.drawLayer)
|
|
169
|
+
this.drawLayer = null
|
|
170
|
+
}
|
|
171
|
+
this.map.pm.disableDraw()
|
|
172
|
+
unbindLeafletEvents(this.map, ['pm:create'])
|
|
173
|
+
this.map.pm.setGlobalOptions({ layerGroup: null })
|
|
174
|
+
},
|
|
175
|
+
refresh () {
|
|
176
|
+
this.clear()
|
|
177
|
+
// No location ?
|
|
178
|
+
const hasLongitude = _.has(this.location, 'longitude')
|
|
179
|
+
const hasLatitude = _.has(this.location, 'latitude')
|
|
180
|
+
const hasGeometry = _.has(this.location, 'coordinates')
|
|
181
|
+
if (hasGeometry || (hasLongitude && hasLatitude)) {
|
|
182
|
+
// No default marker in draw mode
|
|
183
|
+
if (this.drawable && !hasGeometry) return
|
|
184
|
+
// GeoJson geometry or simple location ?
|
|
185
|
+
if (_.has(this.location, 'type') && (_.get(this.location, 'type') !== 'Point')) {
|
|
186
|
+
this.drawLayer = L.geoJson({ type: 'Feature', geometry: this.location })
|
|
187
|
+
this.map.addLayer(this.drawLayer)
|
|
188
|
+
} else {
|
|
189
|
+
const longitude = (hasLongitude
|
|
190
|
+
? _.get(this.location, 'longitude') : _.get(this.location, 'coordinates[0]'))
|
|
191
|
+
const latitude = (hasLatitude
|
|
192
|
+
? _.get(this.location, 'latitude') : _.get(this.location, 'coordinates[1]'))
|
|
193
|
+
|
|
194
|
+
this.marker = L.marker([latitude, longitude], {
|
|
195
|
+
icon: L.icon.fontAwesome(this.markerStyle),
|
|
196
|
+
draggable: this.editable,
|
|
197
|
+
pmIgnore: true
|
|
198
|
+
})
|
|
199
|
+
this.marker.addTo(this.map)
|
|
200
|
+
if (this.editable) this.marker.on('drag', this.onLocationDragged)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Center the map
|
|
204
|
+
this.centerMap()
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
async onGeolocate () {
|
|
208
|
+
await this.geolocate()
|
|
209
|
+
this.refresh()
|
|
139
210
|
},
|
|
140
211
|
onLocationDragged () {
|
|
141
212
|
this.location.name = formatUserCoordinates(this.marker.getLatLng().lat, this.marker.getLatLng().lng, this.$store.get('locationFormat', 'FFf'))
|
|
142
|
-
this.location
|
|
143
|
-
|
|
144
|
-
|
|
213
|
+
if (_.has(this.location, 'type') && (_.get(this.location, 'type') === 'Point')) {
|
|
214
|
+
_.set(this.location, 'coordinates[0]', this.marker.getLatLng().lng)
|
|
215
|
+
_.set(this.location, 'coordinates[1]', this.marker.getLatLng().lat)
|
|
216
|
+
} else {
|
|
217
|
+
this.location.longitude = this.marker.getLatLng().lng
|
|
218
|
+
this.location.latitude = this.marker.getLatLng().lat
|
|
219
|
+
}
|
|
220
|
+
this.$emit('input', this.location)
|
|
221
|
+
},
|
|
222
|
+
startDraw (shape) {
|
|
223
|
+
// Clear any previous edition
|
|
224
|
+
this.clear()
|
|
225
|
+
this.drawLayer = L.geoJson()
|
|
226
|
+
this.map.addLayer(this.drawLayer)
|
|
227
|
+
this.map.pm.setGlobalOptions({ layerGroup: this.drawLayer })
|
|
228
|
+
this.map.pm.enableDraw(shape, {
|
|
229
|
+
snappable: true,
|
|
230
|
+
snapDistance: 20
|
|
231
|
+
})
|
|
232
|
+
bindLeafletEvents(this.map, ['pm:create'], this)
|
|
233
|
+
},
|
|
234
|
+
stopDraw () {
|
|
235
|
+
const geoJson = this.drawLayer.toGeoJSON()
|
|
236
|
+
// The location is the feature geometry
|
|
237
|
+
const feature = _.get(geoJson, 'features[0]', {})
|
|
238
|
+
this.location = feature.geometry
|
|
239
|
+
// Compatibility with GPS-based localization
|
|
240
|
+
const location = centroid(feature)
|
|
241
|
+
this.location.name = formatUserCoordinates(
|
|
242
|
+
_.get(location, 'geometry.coordinates[1]'), _.get(location, 'geometry.coordinates[0]'),
|
|
243
|
+
this.$store.get('locationFormat', 'FFf'))
|
|
244
|
+
this.$emit('input', this.location)
|
|
245
|
+
},
|
|
246
|
+
onStartLine () {
|
|
247
|
+
this.startDraw('Line')
|
|
248
|
+
},
|
|
249
|
+
onStartPolygon () {
|
|
250
|
+
this.startDraw('Polygon')
|
|
145
251
|
},
|
|
146
252
|
async refreshBaseLayer () {
|
|
147
253
|
const catalogService = this.$api.getService('catalog', '')
|
|
@@ -159,25 +265,34 @@ export default {
|
|
|
159
265
|
this.refreshMap()
|
|
160
266
|
}
|
|
161
267
|
},
|
|
162
|
-
|
|
268
|
+
beforeCreate () {
|
|
163
269
|
// Load the required components
|
|
164
270
|
this.$options.components['k-text-area'] = this.$load('frame/KTextArea')
|
|
165
271
|
},
|
|
166
272
|
async mounted () {
|
|
273
|
+
// Initialize component
|
|
274
|
+
this.location = this.value
|
|
275
|
+
if (!this.location) await this.geolocate()
|
|
167
276
|
await this.loadRefs()
|
|
168
277
|
this.setupMap(this.$refs.map, this.mapOptions)
|
|
169
278
|
await this.refreshBaseLayer()
|
|
170
|
-
this.
|
|
279
|
+
this.refresh()
|
|
171
280
|
this.$events.$emit('map-ready')
|
|
281
|
+
this.$on('pm:create', this.stopDraw)
|
|
172
282
|
},
|
|
173
|
-
|
|
174
|
-
|
|
283
|
+
beforeDestroy () {
|
|
284
|
+
this.$off('pm:create', this.stopDraw)
|
|
285
|
+
this.clear()
|
|
175
286
|
}
|
|
176
287
|
}
|
|
177
288
|
</script>
|
|
178
289
|
|
|
179
290
|
<style>
|
|
291
|
+
.leaflet-fa-markers {
|
|
292
|
+
width: 15px;
|
|
293
|
+
height: 25px;
|
|
294
|
+
}
|
|
180
295
|
.leaflet-fa-markers .feature-icon {
|
|
181
|
-
|
|
296
|
+
font-size: 14px;
|
|
182
297
|
}
|
|
183
298
|
</style>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<q-date v-model="date" :mask="calendarDateMask" today-btn minimal />
|
|
14
14
|
</q-popup-proxy>
|
|
15
15
|
</q-btn>
|
|
16
|
-
<q-chip :label="
|
|
16
|
+
<q-chip :label="formatTime(time, 'date.long') + ' ' + formatTime(time, 'time.long')" color="primary" text-color="white" :dense="$q.screen.lt.sm" />
|
|
17
17
|
<q-btn id="timeline-now" dense flat round icon="las la-clock" size="md" color="primary" @click="onNowClicked">
|
|
18
18
|
<q-tooltip>{{$t('KTimeline.SET_NOW')}}</q-tooltip>
|
|
19
19
|
<q-badge v-if="timer !== undefined" floating transparent color="green">
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
:label="day.label"
|
|
72
72
|
clickable @click="onDayClicked(index, days.length)" />
|
|
73
73
|
</template>
|
|
74
|
-
<q-btn id="timeline-next-day" dense flat round icon='las la-calendar-plus'
|
|
74
|
+
<q-btn id="timeline-next-day" dense flat round icon='las la-calendar-plus' color="primary" @click="onNextDayClicked">
|
|
75
75
|
<q-tooltip>{{$t('KTimeline.NEXT_DAY')}}</q-tooltip>
|
|
76
76
|
</q-btn>
|
|
77
77
|
</div>
|
|
@@ -82,26 +82,31 @@
|
|
|
82
82
|
<script>
|
|
83
83
|
import logger from 'loglevel'
|
|
84
84
|
import moment from 'moment'
|
|
85
|
+
import { Time } from '../../../core/client/time'
|
|
85
86
|
|
|
86
87
|
export default {
|
|
87
88
|
name: 'k-timeline',
|
|
88
89
|
inject: ['kActivity'],
|
|
89
90
|
data () {
|
|
90
91
|
return {
|
|
91
|
-
timeline: this.$store.get('timeline'),
|
|
92
92
|
timer: undefined,
|
|
93
93
|
time: moment.utc(),
|
|
94
|
-
calendarDateMask: 'YYYY-MM-DD'
|
|
94
|
+
calendarDateMask: 'YYYY-MM-DD',
|
|
95
|
+
// Make this reactive
|
|
96
|
+
timeSettings: Time.get()
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
computed: {
|
|
100
|
+
step () {
|
|
101
|
+
// For now we do not handle step > 60 minutes
|
|
102
|
+
return Math.min(this.timeSettings.step, 60)
|
|
103
|
+
},
|
|
98
104
|
minutes () {
|
|
99
105
|
const minutes = []
|
|
100
|
-
|
|
101
|
-
if (step < 60) {
|
|
106
|
+
if (this.step < 60) {
|
|
102
107
|
const start = moment.utc(this.time).minute(0)
|
|
103
108
|
const end = moment.utc(this.time).minute(59)
|
|
104
|
-
for (let m = moment.utc(start); m.isBefore(end); m.add(step, 'm')) {
|
|
109
|
+
for (let m = moment.utc(start); m.isBefore(end); m.add(this.step, 'm')) {
|
|
105
110
|
minutes.push({
|
|
106
111
|
label: m.minute().toString().padStart(2, 0),
|
|
107
112
|
color: m.isSame(this.time, 'minute') ? 'primary' : 'grey-7',
|
|
@@ -122,7 +127,7 @@ export default {
|
|
|
122
127
|
const end = moment.utc(this.time).add((size + 1), 'hour')
|
|
123
128
|
for (let h = moment.utc(start); h.isBefore(end); h.add(1, 'h')) {
|
|
124
129
|
hours.push({
|
|
125
|
-
label:
|
|
130
|
+
label: Time.format(h, 'time.short'),
|
|
126
131
|
class: 'col k-timeline-hour-frame text-caption ' + (h.isSame(this.time, 'hour') ? 'k-timeline-hour-selected' : '')
|
|
127
132
|
})
|
|
128
133
|
}
|
|
@@ -139,7 +144,7 @@ export default {
|
|
|
139
144
|
const end = moment.utc(this.time).add(size + 1, 'day')
|
|
140
145
|
for (let d = moment.utc(start); d.isBefore(end); d.add(1, 'd')) {
|
|
141
146
|
days.push({
|
|
142
|
-
label:
|
|
147
|
+
label: Time.format(d, 'date.short'),
|
|
143
148
|
color: d.isSame(this.time, 'date') ? 'primary' : this.monthColors[d.month()],
|
|
144
149
|
textColor: d.isSame(this.time, 'date') ? 'white' : 'black'
|
|
145
150
|
})
|
|
@@ -148,13 +153,13 @@ export default {
|
|
|
148
153
|
},
|
|
149
154
|
date: {
|
|
150
155
|
get: function () {
|
|
151
|
-
return
|
|
156
|
+
return Time.getFormat().utc
|
|
152
157
|
? this.time.format(this.calendarDateMask)
|
|
153
158
|
: moment(this.time).local().format(this.calendarDateMask)
|
|
154
159
|
},
|
|
155
160
|
set: function (value) {
|
|
156
161
|
let time
|
|
157
|
-
if (
|
|
162
|
+
if (Time.getFormat().utc) {
|
|
158
163
|
time = moment.utc(value, this.calendarDateMask)
|
|
159
164
|
time.hour(this.time.hour())
|
|
160
165
|
time.minute(this.time.minute())
|
|
@@ -170,9 +175,8 @@ export default {
|
|
|
170
175
|
}
|
|
171
176
|
},
|
|
172
177
|
methods: {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return Math.min(this.timeline.step, 60)
|
|
178
|
+
formatTime (time, format) {
|
|
179
|
+
return Time.format(time, format)
|
|
176
180
|
},
|
|
177
181
|
startTimeLoop () {
|
|
178
182
|
this.setTime(moment.utc())
|
|
@@ -180,9 +184,9 @@ export default {
|
|
|
180
184
|
const now = moment.utc()
|
|
181
185
|
if (!this.time.isSame(now, 'minute')) {
|
|
182
186
|
this.time = now
|
|
183
|
-
this
|
|
184
|
-
|
|
185
|
-
this
|
|
187
|
+
this.$events.$off('time-current-time-changed', this.onTimeChanged)
|
|
188
|
+
Time.setCurrentTime(this.time)
|
|
189
|
+
this.$events.$on('time-current-time-changed', this.onTimeChanged)
|
|
186
190
|
}
|
|
187
191
|
}, 15 * 1000)
|
|
188
192
|
},
|
|
@@ -201,28 +205,28 @@ export default {
|
|
|
201
205
|
}
|
|
202
206
|
if (this.timer) this.stopTimeLoop()
|
|
203
207
|
this.time = time.clone()
|
|
204
|
-
this
|
|
205
|
-
if (propagate)
|
|
206
|
-
this
|
|
208
|
+
this.$events.$off('time-current-time-changed', this.onTimeChanged)
|
|
209
|
+
if (propagate) Time.setCurrentTime(moment.utc(time))
|
|
210
|
+
this.$events.$on('time-current-time-changed', this.onTimeChanged)
|
|
207
211
|
},
|
|
208
212
|
onPreviousStepClicked () {
|
|
209
|
-
let minutesToSubtract = this.
|
|
210
|
-
const remainder = (this.time.minute() + this.time.hour() * 60) % this.
|
|
213
|
+
let minutesToSubtract = this.step
|
|
214
|
+
const remainder = (this.time.minute() + this.time.hour() * 60) % this.step
|
|
211
215
|
if (remainder > 0) {
|
|
212
216
|
minutesToSubtract = remainder
|
|
213
217
|
}
|
|
214
218
|
this.setTime(this.time.subtract(minutesToSubtract, 'minute'))
|
|
215
219
|
},
|
|
216
220
|
onNextStepClicked () {
|
|
217
|
-
let minutesToAdd = this.
|
|
218
|
-
const remainder = (this.time.minute() + this.time.hour() * 60) % this.
|
|
221
|
+
let minutesToAdd = this.step
|
|
222
|
+
const remainder = (this.time.minute() + this.time.hour() * 60) % this.step
|
|
219
223
|
if (remainder > 0) {
|
|
220
|
-
minutesToAdd = this.
|
|
224
|
+
minutesToAdd = this.step - remainder
|
|
221
225
|
}
|
|
222
226
|
this.setTime(this.time.add(minutesToAdd, 'minute'))
|
|
223
227
|
},
|
|
224
228
|
onMinutesClicked (index) {
|
|
225
|
-
this.setTime(this.time.minute(index * this.
|
|
229
|
+
this.setTime(this.time.minute(index * this.step))
|
|
226
230
|
},
|
|
227
231
|
onHourClicked (index, length) {
|
|
228
232
|
this.setTime(this.time.add((index - Math.trunc(length / 2)), 'hour'))
|
|
@@ -246,7 +250,8 @@ export default {
|
|
|
246
250
|
this.startTimeLoop()
|
|
247
251
|
},
|
|
248
252
|
onTimeChanged (time) {
|
|
249
|
-
|
|
253
|
+
// When updating settings the root time object is sent instead of just the current time
|
|
254
|
+
this.setTime(time.currentTime || time, false)
|
|
250
255
|
}
|
|
251
256
|
},
|
|
252
257
|
created () {
|
|
@@ -257,22 +262,22 @@ export default {
|
|
|
257
262
|
// Define the actions
|
|
258
263
|
this.actions = {
|
|
259
264
|
mobile: [
|
|
260
|
-
{ id: 'previous-day', icon: 'las la-calendar-minus',
|
|
261
|
-
{ id: 'previous-hour', icon: 'las la-angle-left',
|
|
262
|
-
{ id: 'previous-step', icon: 'las la-step-backward',
|
|
263
|
-
{ id: 'next-step', icon: 'las la-step-forward',
|
|
264
|
-
{ id: 'next-hour', icon: 'las la-angle-right',
|
|
265
|
-
{ id: 'next-day', icon: 'las la-calendar-plus',
|
|
265
|
+
{ id: 'previous-day', icon: 'las la-calendar-minus', tooltip: this.$t('KTimeline.PREVIOUS_DAY'), handler: this.onPreviousDayClicked },
|
|
266
|
+
{ id: 'previous-hour', icon: 'las la-angle-left', tooltip: this.$t('KTimeline.PREVIOUS_HOUR'), handler: this.onPreviousHourClicked },
|
|
267
|
+
{ id: 'previous-step', icon: 'las la-step-backward', tooltip: this.$t('KTimeline.PREVIOUS_STEP'), handler: this.onPreviousStepClicked },
|
|
268
|
+
{ id: 'next-step', icon: 'las la-step-forward', tooltip: this.$t('KTimeline.NEXT_STEP'), handler: this.onNextStepClicked },
|
|
269
|
+
{ id: 'next-hour', icon: 'las la-angle-right', tooltip: this.$t('KTimeline.NEXT_HOUR'), handler: this.onNextHourClicked },
|
|
270
|
+
{ id: 'next-day', icon: 'las la-calendar-plus', tooltip: this.$t('KTimeline.NEXT_DAY'), handler: this.onNextDayClicked }
|
|
266
271
|
]
|
|
267
272
|
}
|
|
268
273
|
},
|
|
269
274
|
mounted () {
|
|
270
|
-
this
|
|
275
|
+
this.$events.$on('time-current-time-changed', this.onTimeChanged)
|
|
271
276
|
// Set the time
|
|
272
|
-
this.setTime(
|
|
277
|
+
this.setTime(Time.getCurrentTime(), false)
|
|
273
278
|
},
|
|
274
279
|
beforeDestroy () {
|
|
275
|
-
this
|
|
280
|
+
this.$events.$off('time-current-time-changed', this.onTimeChanged)
|
|
276
281
|
}
|
|
277
282
|
}
|
|
278
283
|
</script>
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
onLegendClick (index) {
|
|
26
26
|
this.legends[index].visible = !this.legends[index].visible
|
|
27
27
|
},
|
|
28
|
-
async
|
|
28
|
+
async getLegend (layer) {
|
|
29
29
|
let legendUrl = _.get(layer, 'legendUrl')
|
|
30
30
|
if (!legendUrl) {
|
|
31
31
|
// no legend on layer, try to fetch legend in case of WMS layer
|
|
@@ -49,32 +49,35 @@ export default {
|
|
|
49
49
|
|
|
50
50
|
// make sure server answers the request before using it
|
|
51
51
|
if (legendUrl) {
|
|
52
|
-
let visible = false
|
|
53
52
|
try {
|
|
54
53
|
const response = await fetch(legendUrl)
|
|
55
|
-
visible = response.ok
|
|
56
54
|
// additional check for funny servers answering with empty body ...
|
|
57
|
-
if (
|
|
55
|
+
if (response.ok) {
|
|
58
56
|
const asBlob = await response.blob()
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
if (visible) {
|
|
62
|
-
// make sure layer is still visible since it may have been hidden in the meantime ...
|
|
63
|
-
if (this.kActivity.isLayerVisible(layer.name)) {
|
|
64
|
-
this.urlLegendLayers[layer._id] = legendUrl
|
|
65
|
-
this.legends.push({
|
|
66
|
-
src: legendUrl,
|
|
67
|
-
layer: layer.name,
|
|
68
|
-
visible: true
|
|
69
|
-
})
|
|
70
|
-
}
|
|
57
|
+
if (asBlob.size === 0) legendUrl = null
|
|
71
58
|
}
|
|
72
59
|
} catch (error) {
|
|
60
|
+
legendUrl = null
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return legendUrl
|
|
65
|
+
},
|
|
66
|
+
async tryAddLegend (layer) {
|
|
67
|
+
const legendUrl = await this.getLegend(layer)
|
|
68
|
+
if (legendUrl) {
|
|
69
|
+
// make sure layer is still visible since it may have been hidden in the meantime ...
|
|
70
|
+
if (this.kActivity.isLayerVisible(layer.name)) {
|
|
71
|
+
this.legends.push({
|
|
72
|
+
src: legendUrl,
|
|
73
|
+
layer: layer.name,
|
|
74
|
+
visible: true
|
|
75
|
+
})
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
},
|
|
76
|
-
tryRemoveLegend (layer) {
|
|
77
|
-
const legendUrl = this.
|
|
79
|
+
async tryRemoveLegend (layer) {
|
|
80
|
+
const legendUrl = await this.getLegend(layer)
|
|
78
81
|
if (legendUrl) {
|
|
79
82
|
const index = this.legends.findIndex((legend) => legend.src === legendUrl)
|
|
80
83
|
this.legends.splice(index, 1)
|
|
@@ -88,7 +91,6 @@ export default {
|
|
|
88
91
|
}
|
|
89
92
|
},
|
|
90
93
|
mounted () {
|
|
91
|
-
this.urlLegendLayers = {}
|
|
92
94
|
this.kActivity.$on('layer-shown', this.onShowLayer)
|
|
93
95
|
this.kActivity.$on('layer-hidden', this.onHideLayer)
|
|
94
96
|
|