@kalisio/kdk 1.5.0 → 1.7.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/{058fc679-d60a-4501-ac04-71171e5200b8.json → 27401f21-8ccf-42fa-8230-4232189d86b3.json} +0 -0
- package/.nyc_output/{8b1830fa-932e-4a61-9837-4a5b18f83ea9.json → 52278ef5-c337-4724-97be-e2e4416847c5.json} +0 -0
- package/.nyc_output/{afd2d144-3570-4858-b94a-b523dbd023dd.json → 5dd49b8a-4c84-42f9-a3d5-712247a84775.json} +0 -0
- package/.nyc_output/612b4859-9645-45c1-a41e-1fae420518c4.json +1 -0
- package/.nyc_output/bab87fe9-d99a-4759-99e6-3fc4622eeca0.json +1 -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/.travis.test.sh +1 -1
- package/CHANGELOG.md +107 -11
- package/coverage/core/api/application.js.html +323 -245
- package/coverage/core/api/authentication.js.html +1 -1
- package/coverage/core/api/db.js.html +108 -108
- package/coverage/core/api/hooks/hooks.account.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authentication.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authorisations.js.html +21 -6
- package/coverage/core/api/hooks/hooks.devices.js.html +1 -1
- package/coverage/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/core/api/hooks/hooks.logger.js.html +1 -1
- package/coverage/core/api/hooks/hooks.model.js.html +1 -1
- package/coverage/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/core/api/hooks/hooks.pusher.js.html +1 -1
- package/coverage/core/api/hooks/hooks.query.js.html +114 -48
- package/coverage/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/core/api/hooks/hooks.tags.js.html +1 -1
- package/coverage/core/api/hooks/hooks.users.js.html +1 -1
- package/coverage/core/api/hooks/index.html +12 -12
- package/coverage/core/api/hooks/index.js.html +1 -1
- package/coverage/core/api/index.html +34 -34
- package/coverage/core/api/index.js.html +26 -26
- package/coverage/core/api/marshall.js.html +1 -1
- 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 +1 -1
- package/coverage/core/api/oauth2-handler.js.html +1 -1
- package/coverage/core/api/oauth2-verifier.js.html +1 -1
- package/coverage/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/core/api/services/account/account.service.js.html +1 -1
- package/coverage/core/api/services/account/index.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +31 -7
- package/coverage/core/api/services/authorisations/index.html +9 -9
- 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 +11 -11
- package/coverage/core/api/services/index.js.html +66 -66
- 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 +1 -1
- 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 +1 -1
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +7 -7
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +81 -51
- package/coverage/index.html +39 -39
- package/coverage/lcov-report/core/api/application.js.html +323 -245
- package/coverage/lcov-report/core/api/authentication.js.html +1 -1
- package/coverage/lcov-report/core/api/db.js.html +108 -108
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +21 -6
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +114 -48
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/index.html +12 -12
- package/coverage/lcov-report/core/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/core/api/index.html +34 -34
- package/coverage/lcov-report/core/api/index.js.html +26 -26
- package/coverage/lcov-report/core/api/marshall.js.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +1 -1
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/core/api/services/account/index.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +31 -7
- package/coverage/lcov-report/core/api/services/authorisations/index.html +9 -9
- 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 +11 -11
- package/coverage/lcov-report/core/api/services/index.js.html +66 -66
- 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 +1 -1
- 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 +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +7 -7
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +81 -51
- package/coverage/lcov-report/index.html +39 -39
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/index.html +1 -1
- 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 +948 -769
- package/coverage/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +1 -1
- package/coverage/map/api/hooks/index.html +1 -1
- 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/catalog-panel.js +61 -10
- package/extras/tours/map/create-view.js +25 -0
- package/extras/tours/map/fab.js +10 -1
- package/extras/tours/map/navigation-bar.js +56 -10
- package/lib/core/api/application.js +44 -10
- 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/chart/KChart.vue +115 -0
- package/lib/core/client/components/chart/KStatsChart.vue +76 -0
- package/lib/core/client/components/chart/index.js +20 -0
- package/lib/core/client/components/chart/index.js.map +1 -0
- package/lib/core/client/components/collection/KColumn.vue +29 -28
- package/lib/core/client/components/collection/KFilter.vue +103 -72
- package/lib/core/client/components/collection/KHistoryEntry.vue +1 -1
- package/lib/core/client/components/collection/KItem.vue +4 -4
- 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/KChipsField.vue +4 -4
- package/lib/core/client/components/form/KFileField.vue +13 -6
- 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/form/KView.vue +1 -1
- package/lib/core/client/components/frame/KAction.vue +41 -7
- package/lib/core/client/components/frame/KBlock.vue +7 -7
- package/lib/core/client/components/frame/KContent.vue +1 -1
- package/lib/core/client/components/frame/KModal.vue +66 -20
- package/lib/core/client/components/frame/KOpener.vue +1 -1
- package/lib/core/client/components/frame/KPanel.vue +8 -7
- package/lib/core/client/components/frame/KPopupAction.vue +6 -0
- package/lib/core/client/components/frame/KScreen.vue +1 -1
- package/lib/core/client/components/frame/KScrollArea.vue +65 -0
- package/lib/core/client/components/frame/KStamp.vue +4 -2
- package/lib/core/client/components/frame/index.js +6 -6
- 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 +41 -40
- package/lib/core/client/components/input/KPalette.vue +1 -1
- package/lib/core/client/components/input/index.js +14 -4
- package/lib/core/client/components/input/index.js.map +1 -1
- package/lib/core/client/components/layout/KAbout.vue +47 -49
- package/lib/core/client/components/layout/KFab.vue +1 -1
- package/lib/core/client/components/layout/KLayout.vue +10 -2
- package/lib/core/client/components/layout/KPage.vue +19 -18
- package/lib/core/client/components/layout/KTour.vue +5 -3
- package/lib/core/client/components/layout/KWindow.vue +211 -59
- package/lib/core/client/components/media/KMediaBrowser.vue +6 -6
- package/lib/core/client/components/menu/KMenu.vue +13 -5
- package/lib/core/client/components/menu/KRadialFab.vue +22 -24
- package/lib/core/client/components/menu/KRadialFabItem.vue +17 -18
- 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/KJoinGroup.vue +22 -22
- package/lib/core/client/components/team/KMemberCard.vue +19 -4
- package/lib/core/client/components/time/KAbsoluteTimeRange.vue +190 -0
- package/lib/core/client/components/time/KRelativeTimeRanges.vue +192 -0
- package/lib/core/client/components/time/index.js +20 -0
- package/lib/core/client/components/time/index.js.map +1 -0
- package/lib/core/client/components/viewer/KModalViewer.vue +10 -9
- package/lib/core/client/i18n/core_en.json +99 -17
- package/lib/core/client/i18n/core_fr.json +94 -18
- package/lib/core/client/index.js +16 -3
- package/lib/core/client/index.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-collection.js +11 -1
- package/lib/core/client/mixins/mixin.base-collection.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-widget.js +26 -12
- package/lib/core/client/mixins/mixin.base-widget.js.map +1 -1
- package/lib/core/client/reader.js +46 -15
- package/lib/core/client/reader.js.map +1 -1
- package/lib/core/client/readers/reader.csv.js +33 -22
- package/lib/core/client/readers/reader.csv.js.map +1 -1
- package/lib/core/client/readers/reader.json.js +31 -20
- package/lib/core/client/readers/reader.json.js.map +1 -1
- package/lib/core/client/services/index.js +16 -4
- package/lib/core/client/services/index.js.map +1 -1
- package/lib/core/client/services/local-settings.service.js +10 -4
- package/lib/core/client/services/local-settings.service.js.map +1 -1
- package/lib/core/client/time.js +29 -18
- package/lib/core/client/time.js.map +1 -1
- package/lib/core/client/units.js +207 -0
- package/lib/core/client/units.js.map +1 -0
- package/lib/core/client/utils.js +11 -0
- package/lib/core/client/utils.js.map +1 -1
- 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 +86 -4
- package/lib/map/api/hooks/hooks.catalog.js +20 -0
- package/lib/map/api/hooks/hooks.catalog.js.map +1 -1
- package/lib/map/api/models/catalog.model.mongodb.js +6 -1
- package/lib/map/api/models/catalog.model.mongodb.js.map +1 -1
- package/lib/map/api/models/features.model.mongodb.js +8 -0
- package/lib/map/api/models/features.model.mongodb.js.map +1 -1
- package/lib/map/api/services/catalog/catalog.hooks.js +3 -1
- package/lib/map/api/services/catalog/catalog.hooks.js.map +1 -1
- package/lib/map/client/components/KCaptureToolbar.vue +2 -7
- package/lib/map/client/components/KColorLegend.vue +38 -25
- package/lib/map/client/components/KFeaturesChart.vue +84 -114
- package/lib/map/client/components/KFeaturesFilter.vue +37 -38
- package/lib/map/client/components/KFeaturesTable.vue +15 -16
- package/lib/map/client/components/KLayerStyleEditor.vue +1 -1
- package/lib/map/client/components/KLayerStyleForm.vue +123 -51
- package/lib/map/client/components/KLevelSlider.vue +30 -29
- package/lib/map/client/components/KLocationMap.vue +2 -2
- package/lib/map/client/components/KMeasureTool.vue +49 -28
- package/lib/map/client/components/KPositionIndicator.vue +4 -4
- package/lib/map/client/components/KTimeline.vue +30 -35
- package/lib/map/client/components/KTimezoneMap.vue +156 -0
- package/lib/map/client/components/KUrlLegend.vue +11 -10
- package/lib/map/client/components/catalog/KAddLayer.vue +3 -2
- package/lib/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/lib/map/client/components/catalog/KCatalogLayersPanel.vue +56 -0
- package/lib/map/client/components/catalog/KCreateView.vue +91 -0
- package/lib/map/client/components/catalog/KLayerCategories.vue +5 -3
- package/lib/map/client/components/catalog/{KCatalog.vue → KLayersPanel.vue} +23 -22
- package/lib/map/client/components/catalog/KLayersSelector.vue +3 -3
- package/lib/map/client/components/catalog/KUserLayersPanel.vue +40 -0
- package/lib/map/client/components/catalog/KViewSelector.vue +46 -0
- package/lib/map/client/components/catalog/KViewsPanel.vue +110 -0
- package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +5 -14
- package/lib/map/client/components/form/KTimezoneField.vue +135 -0
- package/lib/map/client/components/widget/KElevationProfile.vue +488 -0
- package/lib/map/client/components/widget/KInformationBox.vue +53 -37
- package/lib/map/client/components/widget/KMapillaryViewer.vue +26 -16
- package/lib/map/client/components/widget/KTimeSeries.vue +283 -358
- package/lib/map/client/i18n/map_en.json +73 -56
- package/lib/map/client/i18n/map_fr.json +75 -58
- package/lib/map/client/init.js +4 -3
- package/lib/map/client/init.js.map +1 -1
- package/lib/map/client/leaflet/GradientPath.js +40 -19
- package/lib/map/client/leaflet/GradientPath.js.map +1 -1
- package/lib/map/client/leaflet/TiledFeatureLayer.js +527 -93
- package/lib/map/client/leaflet/TiledFeatureLayer.js.map +1 -1
- package/lib/map/client/leaflet/TiledMeshLayer.js +58 -35
- package/lib/map/client/leaflet/TiledMeshLayer.js.map +1 -1
- package/lib/map/client/leaflet/utils.js +44 -3
- package/lib/map/client/leaflet/utils.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.base-globe.js +16 -1
- package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.file-layers.js +12 -2
- package/lib/map/client/mixins/globe/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js +23 -27
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.popup.js +7 -3
- package/lib/map/client/mixins/globe/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.style.js +8 -4
- package/lib/map/client/mixins/globe/mixin.style.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.tooltip.js +7 -3
- package/lib/map/client/mixins/globe/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/index.js +23 -18
- package/lib/map/client/mixins/index.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.base-map.js +32 -8
- package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.edit-layers.js +8 -4
- package/lib/map/client/mixins/map/mixin.edit-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.file-layers.js +13 -5
- package/lib/map/client/mixins/map/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.geojson-layers.js +65 -14
- package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js +6 -1
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.popup.js +4 -2
- package/lib/map/client/mixins/map/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.style.js +9 -5
- package/lib/map/client/mixins/map/mixin.style.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js +4 -11
- 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 +0 -11
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tooltip.js +4 -2
- package/lib/map/client/mixins/map/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/mixin.activity.js +150 -150
- package/lib/map/client/mixins/mixin.activity.js.map +1 -1
- package/lib/map/client/mixins/mixin.catalog-panel.js +36 -0
- package/lib/map/client/mixins/mixin.catalog-panel.js.map +1 -0
- package/lib/map/client/mixins/mixin.feature-selection.js +17 -8
- package/lib/map/client/mixins/mixin.feature-selection.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-service.js +36 -16
- package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
- package/lib/map/client/mixins/mixin.infobox.js +1 -1
- package/lib/map/client/mixins/mixin.infobox.js.map +1 -1
- package/lib/map/client/mixins/mixin.levels.js +26 -12
- package/lib/map/client/mixins/mixin.levels.js.map +1 -1
- package/lib/map/client/mixins/mixin.style.js +1 -0
- package/lib/map/client/mixins/mixin.style.js.map +1 -1
- package/lib/map/client/mixins/mixin.weacast.js +22 -28
- package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
- package/lib/map/client/pixi-utils.js +8 -177
- package/lib/map/client/pixi-utils.js.map +1 -1
- package/lib/map/client/readers/index.js +12 -0
- package/lib/map/client/readers/index.js.map +1 -1
- package/lib/map/client/readers/reader.geojson.js +62 -34
- package/lib/map/client/readers/reader.geojson.js.map +1 -1
- package/lib/map/client/readers/reader.gpx.js +32 -21
- package/lib/map/client/readers/reader.gpx.js.map +1 -1
- package/lib/map/client/readers/reader.kml.js +32 -21
- package/lib/map/client/readers/reader.kml.js.map +1 -1
- 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 +1 -8
- package/lib/map/client/utils.js.map +1 -1
- package/lib/map/common/grid.js +131 -0
- package/lib/map/common/grid.js.map +1 -1
- package/lib/map/common/index.js +22 -11
- package/lib/map/common/index.js.map +1 -1
- package/lib/map/common/meteo-model-grid-source.js +5 -2
- package/lib/map/common/meteo-model-grid-source.js.map +1 -1
- package/lib/map/common/time-based-grid-source.js +5 -2
- package/lib/map/common/time-based-grid-source.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/collection.js +31 -13
- package/lib/test/client/core/collection.js.map +1 -1
- package/lib/test/client/core/layout.js +137 -49
- package/lib/test/client/core/layout.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 +89 -22
- package/lib/test/client/core/utils.js.map +1 -1
- package/lib/test/client/map/catalog.js +134 -41
- package/lib/test/client/map/catalog.js.map +1 -1
- package/lib/test/client/map/controls.js +7 -4
- package/lib/test/client/map/controls.js.map +1 -1
- package/lib/test/client/map/index.js +12 -0
- package/lib/test/client/map/index.js.map +1 -1
- package/lib/test/client/map/utils.js +67 -0
- package/lib/test/client/map/utils.js.map +1 -0
- package/package.json +5 -6
- package/.nyc_output/2226bcce-9d22-4dad-b9fa-46564b5565c7.json +0 -1
- package/.nyc_output/6dc4b140-1a8a-4d69-b91c-89c557883d6e.json +0 -1
- package/.nyc_output/processinfo/058fc679-d60a-4501-ac04-71171e5200b8.json +0 -1
- package/.nyc_output/processinfo/2226bcce-9d22-4dad-b9fa-46564b5565c7.json +0 -1
- package/.nyc_output/processinfo/6dc4b140-1a8a-4d69-b91c-89c557883d6e.json +0 -1
- package/.nyc_output/processinfo/8b1830fa-932e-4a61-9837-4a5b18f83ea9.json +0 -1
- package/.nyc_output/processinfo/afd2d144-3570-4858-b94a-b523dbd023dd.json +0 -1
- package/extras/tours/map/favorite-views.js +0 -53
- package/lib/core/client/components/frame/KChart.vue +0 -60
- package/lib/core/client/components/input/KCodeInput.vue +0 -50
- package/lib/core/client/components/input/KTimeRangeChooser.vue +0 -109
- package/lib/core/client/components/time/KTimeRange.vue +0 -144
- package/lib/map/client/components/KFavoriteViews.vue +0 -217
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<script>
|
|
26
26
|
import _ from 'lodash'
|
|
27
27
|
import mixins from '../../mixins'
|
|
28
|
-
import { findMembersOfGroup, getRoleForGroup, Roles, RoleNames } from '../../../common/permissions'
|
|
28
|
+
import { findMembersOfGroup, getRoleForGroup, getRoleForOrganisation, Roles, RoleNames } from '../../../common/permissions'
|
|
29
29
|
import { KCard, KCardSection } from '../collection'
|
|
30
30
|
import { KTextArea } from '../frame'
|
|
31
31
|
|
|
@@ -47,14 +47,21 @@ export default {
|
|
|
47
47
|
computed: {
|
|
48
48
|
header () {
|
|
49
49
|
const components = _.filter(this.itemActions, { scope: 'header' })
|
|
50
|
-
|
|
50
|
+
if (this.memberRoleLabel) {
|
|
51
|
+
components.splice(0, 0, { component: 'QBadge', label: this.$t(this.memberRoleLabel), color: 'grey-7' }, { component: 'QSpace' })
|
|
52
|
+
} else {
|
|
53
|
+
components.splice(0, 0, { component: 'QSpace' })
|
|
54
|
+
}
|
|
51
55
|
return components
|
|
52
56
|
},
|
|
53
57
|
memberRoleLabel () {
|
|
54
58
|
const user = this.$store.get('user')
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
// Organisation managers can manage all groups so that we do not display anything about role
|
|
60
|
+
let role = getRoleForOrganisation(user, this.contextId)
|
|
61
|
+
if (Roles[role] >= Roles.manager) return ''
|
|
62
|
+
// Otherwise the user can be member or manager of the group
|
|
63
|
+
role = getRoleForGroup(user, this.contextId, this.item._id)
|
|
64
|
+
return (!_.isUndefined(role) ? this.roleLabels[Roles[role]] : '')
|
|
58
65
|
},
|
|
59
66
|
dense () {
|
|
60
67
|
return this.$q.screen.lt.sm
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
:buttons="getButtons()"
|
|
7
7
|
v-model="isModalOpened"
|
|
8
8
|
@opened="$emit('opened')"
|
|
9
|
-
@closed="$emit('closed')"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</div>
|
|
9
|
+
@closed="$emit('closed')"
|
|
10
|
+
>
|
|
11
|
+
<k-form ref="form" :schema="schema" />
|
|
13
12
|
</k-modal>
|
|
14
13
|
</div>
|
|
15
14
|
</template>
|
|
16
15
|
|
|
17
16
|
<script>
|
|
18
17
|
import _ from 'lodash'
|
|
18
|
+
import { Roles, getRoleForOrganisation } from '../../../common/permissions'
|
|
19
19
|
import mixins from '../../mixins'
|
|
20
20
|
|
|
21
21
|
export default {
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
},
|
|
43
43
|
schema () {
|
|
44
44
|
if (this.member === null) return {}
|
|
45
|
-
|
|
45
|
+
const schema = {
|
|
46
46
|
$schema: 'http://json-schema.org/draft-06/schema#',
|
|
47
47
|
$id: 'http://kalisio.xyz/schemas/join-group#',
|
|
48
48
|
title: 'Join Group Form',
|
|
@@ -68,24 +68,21 @@ export default {
|
|
|
68
68
|
component: 'form/KItemField',
|
|
69
69
|
label: 'KJoinGroup.GROUP_FIELD_LABEL'
|
|
70
70
|
}
|
|
71
|
-
},
|
|
72
|
-
role: {
|
|
73
|
-
type: 'string',
|
|
74
|
-
default: 'member',
|
|
75
|
-
field: {
|
|
76
|
-
component: 'form/KSelectField',
|
|
77
|
-
label: 'KJoinGroup.ROLE_FIELD_LABEL',
|
|
78
|
-
type: 'radio',
|
|
79
|
-
options: [
|
|
80
|
-
{ label: this.$t('KAddMember.MEMBER_LABEL'), value: 'member' },
|
|
81
|
-
{ label: this.$t('KAddMember.MANAGER_LABEL'), value: 'manager' },
|
|
82
|
-
{ label: this.$t('KAddMember.OWNER_LABEL'), value: 'owner' }
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
71
|
}
|
|
86
72
|
},
|
|
87
|
-
required: ['group'
|
|
73
|
+
required: ['group']
|
|
74
|
+
}
|
|
75
|
+
if (Roles[this.role] === Roles.member) {
|
|
76
|
+
_.set(schema, 'properties.role', {
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
default: false,
|
|
79
|
+
field: {
|
|
80
|
+
component: 'form/KToggleField',
|
|
81
|
+
label: 'KJoinGroup.ROLE_FIELD_LABEL'
|
|
82
|
+
}
|
|
83
|
+
})
|
|
88
84
|
}
|
|
85
|
+
return schema
|
|
89
86
|
}
|
|
90
87
|
},
|
|
91
88
|
data () {
|
|
@@ -109,7 +106,7 @@ export default {
|
|
|
109
106
|
const authorisationService = this.$api.getService('authorisations')
|
|
110
107
|
await authorisationService.create({
|
|
111
108
|
scope: 'groups',
|
|
112
|
-
permissions: result
|
|
109
|
+
permissions: _.get(result, 'values.role', false) ? 'manager' : 'member',
|
|
113
110
|
subjects: this.objectId,
|
|
114
111
|
subjectsService: this.contextId + '/members',
|
|
115
112
|
resource: result.values.group._id,
|
|
@@ -119,11 +116,14 @@ export default {
|
|
|
119
116
|
}
|
|
120
117
|
}
|
|
121
118
|
},
|
|
122
|
-
|
|
119
|
+
beforeCreate () {
|
|
123
120
|
this.$options.components['k-modal'] = this.$load('frame/KModal')
|
|
124
121
|
this.$options.components['k-form'] = this.$load('form/KForm')
|
|
122
|
+
},
|
|
123
|
+
async created () {
|
|
125
124
|
// Load the member
|
|
126
125
|
this.member = await this.loadObject()
|
|
126
|
+
this.role = getRoleForOrganisation(this.member, this.contextId)
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
</script>
|
|
@@ -222,17 +222,32 @@ export default {
|
|
|
222
222
|
},
|
|
223
223
|
canJoinGroup () {
|
|
224
224
|
const user = this.$store.get('user')
|
|
225
|
-
//
|
|
225
|
+
// Organisation managers can manage all groups
|
|
226
|
+
const role = getRoleForOrganisation(user, this.contextId)
|
|
227
|
+
if (Roles[role] >= Roles.manager) return true
|
|
228
|
+
// Group managers can manage members of their own groups so
|
|
229
|
+
// can add members to a group if at least manager of one
|
|
226
230
|
const groups = findGroupsWithRole(user, this.contextId, Roles.manager)
|
|
227
|
-
.concat(findGroupsWithRole(user, this.contextId, Roles.owner))
|
|
228
231
|
// FIXME: we should also filter by the member groups so that if already added to all my groups we don't show the action
|
|
229
232
|
return groups.length > 0
|
|
230
233
|
},
|
|
231
234
|
canChangeRoleInGroup (group) {
|
|
232
|
-
|
|
235
|
+
const memberRole = getRoleForOrganisation(this.item, this.contextId)
|
|
236
|
+
if (Roles[memberRole] >= Roles.manager) return false
|
|
237
|
+
const user = this.$store.get('user')
|
|
238
|
+
// Organisation managers can manage all groups
|
|
239
|
+
const userRole = getRoleForOrganisation(user, this.contextId)
|
|
240
|
+
if (Roles[userRole] >= Roles.manager) return true
|
|
241
|
+
// Group managers can manage members of their own groups
|
|
242
|
+
else return this.$can('create', 'authorisations', null, { resource: group._id, permissions: 'member' })
|
|
233
243
|
},
|
|
234
244
|
canLeaveGroup (group) {
|
|
235
|
-
|
|
245
|
+
const user = this.$store.get('user')
|
|
246
|
+
// Organisation managers can manage all groups
|
|
247
|
+
const role = getRoleForOrganisation(user, this.contextId)
|
|
248
|
+
if (Roles[role] >= Roles.manager) return true
|
|
249
|
+
// Group managers can manage members of their own groups
|
|
250
|
+
else return this.$can('remove', 'authorisations', null, { resource: group._id, permissions: 'member' })
|
|
236
251
|
},
|
|
237
252
|
onChangeRoleInGroup (group) {
|
|
238
253
|
this.$router.push({
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="row justify-start items-center q-pl-sm q-pr-sm no-wrap">
|
|
3
|
+
<div id="start-date" class="k-datetime text-body2">
|
|
4
|
+
{{ formattedStartDate }}
|
|
5
|
+
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_DATE_LABEL') }}</q-tooltip>
|
|
6
|
+
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
7
|
+
<q-date
|
|
8
|
+
id="start-date-popup"
|
|
9
|
+
v-model="startDate"
|
|
10
|
+
mask="DD/MM/YYYY"
|
|
11
|
+
:title="startDate"
|
|
12
|
+
@input="onTimeRangeChanged"
|
|
13
|
+
:options="checkStartDate" />
|
|
14
|
+
</q-popup-proxy>
|
|
15
|
+
</div>
|
|
16
|
+
<div> </div>
|
|
17
|
+
<div id="start-time" class="k-datetime text-body2">
|
|
18
|
+
{{ formattedStartTime }}
|
|
19
|
+
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_TIME_LABEL') }}</q-tooltip>
|
|
20
|
+
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
21
|
+
<q-time
|
|
22
|
+
id="start-time-popup"
|
|
23
|
+
v-model="startTime"
|
|
24
|
+
mask="HH:mm"
|
|
25
|
+
@input="onTimeRangeChanged"
|
|
26
|
+
:options="checkStartTime" />
|
|
27
|
+
</q-popup-proxy>
|
|
28
|
+
</div>
|
|
29
|
+
<div> - </div>
|
|
30
|
+
<div id="end-date" class="k-datetime text-body2">
|
|
31
|
+
{{ formattedEndDate }}
|
|
32
|
+
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_DATE_LABEL') }}</q-tooltip>
|
|
33
|
+
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
34
|
+
<q-date
|
|
35
|
+
id="end-date-popup"
|
|
36
|
+
v-model="endDate"
|
|
37
|
+
mask="DD/MM/YYYY"
|
|
38
|
+
:title="endDate"
|
|
39
|
+
@input="onTimeRangeChanged"
|
|
40
|
+
:options="checkEndDate" />
|
|
41
|
+
</q-popup-proxy>
|
|
42
|
+
</div>
|
|
43
|
+
<div> </div>
|
|
44
|
+
<div id="end-time" class="k-datetime text-body2">
|
|
45
|
+
{{ formattedEndTime }}
|
|
46
|
+
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_TIME_LABEL') }}</q-tooltip>
|
|
47
|
+
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
48
|
+
<q-time
|
|
49
|
+
id="end-time-popup"
|
|
50
|
+
v-model="endTime"
|
|
51
|
+
mask="HH:mm"
|
|
52
|
+
@input="onTimeRangeChanged"
|
|
53
|
+
:options="checkEndTime" />
|
|
54
|
+
</q-popup-proxy>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
import moment from 'moment'
|
|
61
|
+
import { Time } from '../../time'
|
|
62
|
+
|
|
63
|
+
export default {
|
|
64
|
+
name: 'k-absolute-time-range',
|
|
65
|
+
props: {
|
|
66
|
+
dense: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
computed: {
|
|
72
|
+
formattedStartDate () {
|
|
73
|
+
return Time.format(this.range.start, 'date.short')
|
|
74
|
+
},
|
|
75
|
+
startDate: {
|
|
76
|
+
get: function () {
|
|
77
|
+
return this.range.start.format('DD/MM/YYYY')
|
|
78
|
+
},
|
|
79
|
+
set: function (value) {
|
|
80
|
+
const date = moment(value, 'DD/MM/YYYY')
|
|
81
|
+
this.range = {
|
|
82
|
+
start: this.range.start.set({ year: date.year(), month: date.month(), date: date.date() }),
|
|
83
|
+
end: this.range.end
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
formattedStartTime () {
|
|
88
|
+
return Time.format(this.range.start, 'time.long')
|
|
89
|
+
},
|
|
90
|
+
startTime: {
|
|
91
|
+
get: function () {
|
|
92
|
+
return this.range.start.format('HH:mm')
|
|
93
|
+
},
|
|
94
|
+
set: function (value) {
|
|
95
|
+
const time = moment(value, 'HH:mm')
|
|
96
|
+
this.range = {
|
|
97
|
+
start: this.range.start.set({ hour: time.hour(), minute: time.minute() }),
|
|
98
|
+
end: this.range.end
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
formattedEndDate () {
|
|
103
|
+
return Time.format(this.range.end, 'date.short')
|
|
104
|
+
},
|
|
105
|
+
endDate: {
|
|
106
|
+
get: function () {
|
|
107
|
+
return this.range.end.format('DD/MM/YYYY')
|
|
108
|
+
},
|
|
109
|
+
set: function (value) {
|
|
110
|
+
const date = moment(value, 'DD/MM')
|
|
111
|
+
this.range = {
|
|
112
|
+
start: this.range.start,
|
|
113
|
+
end: this.range.end.set({ month: date.month(), date: date.date() })
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
formattedEndTime () {
|
|
118
|
+
return Time.format(this.range.end, 'time.long')
|
|
119
|
+
},
|
|
120
|
+
endTime: {
|
|
121
|
+
get: function () {
|
|
122
|
+
return this.range.end.format('HH:mm')
|
|
123
|
+
},
|
|
124
|
+
set: function (value) {
|
|
125
|
+
const time = moment(value, 'HH:mm')
|
|
126
|
+
this.range = {
|
|
127
|
+
start: this.range.start,
|
|
128
|
+
end: this.range.end.set({ hour: time.hour(), minute: time.minute() })
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
data () {
|
|
134
|
+
return {
|
|
135
|
+
range: Time.getRange()
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
methods: {
|
|
139
|
+
checkStartDate (date) {
|
|
140
|
+
const dateToCheck = moment({
|
|
141
|
+
year: date.substring(0, 4),
|
|
142
|
+
month: date.substring(5, 7) - 1,
|
|
143
|
+
date: date.substring(8, 10),
|
|
144
|
+
hour: this.range.start.hour(),
|
|
145
|
+
minute: this.range.start.minute()
|
|
146
|
+
}).utc()
|
|
147
|
+
return dateToCheck.isBefore(this.range.end)
|
|
148
|
+
},
|
|
149
|
+
checkStartTime (hour, minute) {
|
|
150
|
+
const timeToCheck = moment({
|
|
151
|
+
year: this.range.start.year(),
|
|
152
|
+
month: this.range.start.month(),
|
|
153
|
+
date: this.range.start.date(),
|
|
154
|
+
hour: hour,
|
|
155
|
+
minute: minute
|
|
156
|
+
}).utc()
|
|
157
|
+
return timeToCheck.isBefore(this.range.end)
|
|
158
|
+
},
|
|
159
|
+
checkEndDate (date) {
|
|
160
|
+
const dateToCheck = moment({
|
|
161
|
+
year: date.substring(0, 4),
|
|
162
|
+
month: date.substring(5, 7) - 1,
|
|
163
|
+
date: date.substring(8, 10),
|
|
164
|
+
hour: this.range.end.hour(),
|
|
165
|
+
minute: this.range.end.minute()
|
|
166
|
+
}).utc()
|
|
167
|
+
return dateToCheck.isAfter(this.range.start)
|
|
168
|
+
},
|
|
169
|
+
checkEndTime (hour, minute) {
|
|
170
|
+
const timeToCheck = moment({
|
|
171
|
+
year: this.range.end.year(),
|
|
172
|
+
month: this.range.end.month(),
|
|
173
|
+
date: this.range.end.date(),
|
|
174
|
+
hour: hour,
|
|
175
|
+
minute: minute
|
|
176
|
+
}).utc()
|
|
177
|
+
return timeToCheck.isAfter(this.range.start)
|
|
178
|
+
},
|
|
179
|
+
onTimeRangeChanged () {
|
|
180
|
+
Time.patchRange({ start: this.range.start, end: this.range.end })
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<style lang="scss">
|
|
187
|
+
.k-datetime:hover {
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<k-panel
|
|
3
|
+
id="time-ranges"
|
|
4
|
+
:content="content"
|
|
5
|
+
action-renderer="item"
|
|
6
|
+
:dense="dense"
|
|
7
|
+
direction="vertical" />
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import _ from 'lodash'
|
|
12
|
+
import moment from 'moment'
|
|
13
|
+
import { Time } from '../../time'
|
|
14
|
+
import KPanel from '../frame/KPanel.vue'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'k-relative-time-ranges',
|
|
18
|
+
components: {
|
|
19
|
+
KPanel
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
ranges: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
dense: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
content () {
|
|
33
|
+
return _.filter(this.defaultRanges, range => {
|
|
34
|
+
return _.indexOf(this.ranges, range.id) > -1
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
rangeTriggered (duration) {
|
|
40
|
+
const end = moment(Time.getCurrentTime())
|
|
41
|
+
const start = moment(Time.getCurrentTime()).add(duration)
|
|
42
|
+
// Revert range if duration in past
|
|
43
|
+
if (duration.asMilliseconds() > 0) Time.patchRange({ start: end, end: start })
|
|
44
|
+
else Time.patchRange({ start: start, end: end })
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
created () {
|
|
48
|
+
this.defaultRanges = [
|
|
49
|
+
{
|
|
50
|
+
id: 'last-hour',
|
|
51
|
+
label: 'KRelativeTimeRanges.LAST_HOUR_LABEL',
|
|
52
|
+
handler: () => this.rangeTriggered(moment.duration(-1, 'hours'))
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'next-hour',
|
|
56
|
+
label: 'KRelativeTimeRanges.NEXT_HOUR_LABEL',
|
|
57
|
+
handler: () => this.rangeTriggered(moment.duration(1, 'hours'))
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'last-2-hours',
|
|
61
|
+
label: 'KRelativeTimeRanges.LAST_2_HOURS_LABEL',
|
|
62
|
+
handler: () => this.rangeTriggered(moment.duration(-2, 'hours'))
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'next-2-hours',
|
|
66
|
+
label: 'KRelativeTimeRanges.NEXT_2_HOURS_LABEL',
|
|
67
|
+
handler: () => this.rangeTriggered(moment.duration(2, 'hours'))
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'last-3-hours',
|
|
71
|
+
label: 'KRelativeTimeRanges.LAST_3_HOURS_LABEL',
|
|
72
|
+
handler: () => this.rangeTriggered(moment.duration(-3, 'hours'))
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'next-3-hours',
|
|
76
|
+
label: 'KRelativeTimeRanges.NEXT_3_HOURS_LABEL',
|
|
77
|
+
handler: () => this.rangeTriggered(moment.duration(3, 'hours'))
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'last-6-hours',
|
|
81
|
+
label: 'KRelativeTimeRanges.LAST_6_HOURS_LABEL',
|
|
82
|
+
handler: () => this.rangeTriggered(moment.duration(-6, 'hours'))
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'next-6-hours',
|
|
86
|
+
label: 'KRelativeTimeRanges.NEXT_6_HOURS_LABEL',
|
|
87
|
+
handler: () => this.rangeTriggered(moment.duration(6, 'hours'))
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'last-12-hours',
|
|
91
|
+
label: 'KRelativeTimeRanges.LAST_12_HOURS_LABEL',
|
|
92
|
+
handler: () => this.rangeTriggered(moment.duration(-12, 'hours'))
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'next-12-hours',
|
|
96
|
+
label: 'KRelativeTimeRanges.NEXT_12_HOURS_LABEL',
|
|
97
|
+
handler: () => this.rangeTriggered(moment.duration(12, 'hours'))
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'last-day',
|
|
101
|
+
label: 'KRelativeTimeRanges.LAST_DAY_LABEL',
|
|
102
|
+
handler: () => this.rangeTriggered(moment.duration(-1, 'days'))
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'next-day',
|
|
106
|
+
label: 'KRelativeTimeRanges.NEXT_DAY_LABEL',
|
|
107
|
+
handler: () => this.rangeTriggered(moment.duration(1, 'days'))
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: 'last-2-days',
|
|
111
|
+
label: 'KRelativeTimeRanges.LAST_2_DAYS_LABEL',
|
|
112
|
+
handler: () => this.rangeTriggered(moment.duration(-2, 'days'))
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'next-2-days',
|
|
116
|
+
label: 'KRelativeTimeRanges.NEXT_2_DAYS_LABEL',
|
|
117
|
+
handler: () => this.rangeTriggered(moment.duration(2, 'days'))
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'last-3-days',
|
|
121
|
+
label: 'KRelativeTimeRanges.LAST_3_DAYS_LABEL',
|
|
122
|
+
handler: () => this.rangeTriggered(moment.duration(-3, 'days'))
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'next-3-days',
|
|
126
|
+
label: 'KRelativeTimeRanges.NEXT_3_DAYS_LABEL',
|
|
127
|
+
handler: () => this.rangeTriggered(moment.duration(3, 'days'))
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'last-week',
|
|
131
|
+
label: 'KRelativeTimeRanges.LAST_WEEK_LABEL',
|
|
132
|
+
handler: () => this.rangeTriggered(moment.duration(-1, 'weeks'))
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'next-week',
|
|
136
|
+
label: 'KRelativeTimeRanges.NEXT_WEEK_LABEL',
|
|
137
|
+
handler: () => this.rangeTriggered(moment.duration(1, 'weeks'))
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 'last-2-weeks',
|
|
141
|
+
label: 'KRelativeTimeRanges.LAST_2_WEEKS_LABEL',
|
|
142
|
+
handler: () => this.rangeTriggered(moment.duration(-2, 'weeks'))
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: 'next-2-weeks',
|
|
146
|
+
label: 'KRelativeTimeRanges.NEXT_2_WEEKS_LABEL',
|
|
147
|
+
handler: () => this.rangeTriggered(moment.duration(2, 'weeks'))
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: 'last-month',
|
|
151
|
+
label: 'KRelativeTimeRanges.LAST_MONTH_LABEL',
|
|
152
|
+
handler: () => this.rangeTriggered(moment.duration(-1, 'months'))
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: 'next-month',
|
|
156
|
+
label: 'KRelativeTimeRanges.NEXT_MONTH_LABEL',
|
|
157
|
+
handler: () => this.rangeTriggered(moment.duration(1, 'months'))
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'last-3-months',
|
|
161
|
+
label: 'KRelativeTimeRanges.LAST_3_MONTHS_LABEL',
|
|
162
|
+
handler: () => this.rangeTriggered(moment.duration(-3, 'months'))
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 'next-3-months',
|
|
166
|
+
label: 'KRelativeTimeRanges.NEXT_3_MONTHS_LABEL',
|
|
167
|
+
handler: () => this.rangeTriggered(moment.duration(3, 'months'))
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 'last-6-months',
|
|
171
|
+
label: 'KRelativeTimeRanges.LAST_6_MONTHS_LABEL',
|
|
172
|
+
handler: () => this.rangeTriggered(moment.duration(-6, 'months'))
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 'next-6-months',
|
|
176
|
+
label: 'KRelativeTimeRanges.NEXT_6_MONTHS_LABEL',
|
|
177
|
+
handler: () => this.rangeTriggered(moment.duration(6, 'months'))
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'last-year',
|
|
181
|
+
label: 'KRelativeTimeRanges.LAST_YEAR_LABEL',
|
|
182
|
+
handler: () => this.rangeTriggered(moment.duration(-1, 'years'))
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 'next-year',
|
|
186
|
+
label: 'KRelativeTimeRanges.NEXT_YEAR_LABEL',
|
|
187
|
+
handler: () => this.rangeTriggered(moment.duration(1, 'years'))
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.KRelativeTimeRanges = exports.KAbsoluteTimeRange = undefined;
|
|
7
|
+
|
|
8
|
+
var _KAbsoluteTimeRange = require('./KAbsoluteTimeRange.vue');
|
|
9
|
+
|
|
10
|
+
var _KAbsoluteTimeRange2 = _interopRequireDefault(_KAbsoluteTimeRange);
|
|
11
|
+
|
|
12
|
+
var _KRelativeTimeRanges = require('./KRelativeTimeRanges.vue');
|
|
13
|
+
|
|
14
|
+
var _KRelativeTimeRanges2 = _interopRequireDefault(_KRelativeTimeRanges);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
exports.KAbsoluteTimeRange = _KAbsoluteTimeRange2.default;
|
|
19
|
+
exports.KRelativeTimeRanges = _KRelativeTimeRanges2.default;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../core/client/components/time/index.js"],"names":["KAbsoluteTimeRange","KRelativeTimeRanges"],"mappings":";;;;;;;AAAA;;;;AACA;;;;;;QAGEA,kB,GAAAA,4B;QACAC,mB,GAAAA,6B","file":"index.js","sourcesContent":["import KAbsoluteTimeRange from './KAbsoluteTimeRange.vue'\r\nimport KRelativeTimeRanges from './KRelativeTimeRanges.vue'\r\n\r\nexport {\r\n KAbsoluteTimeRange,\r\n KRelativeTimeRanges\r\n}\r\n"]}
|
|
@@ -5,18 +5,24 @@
|
|
|
5
5
|
:buttons="getButtons()"
|
|
6
6
|
v-model="isModalOpened"
|
|
7
7
|
@opened="$emit('opened')"
|
|
8
|
-
@closed="$emit('closed')"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</div>
|
|
8
|
+
@closed="$emit('closed')"
|
|
9
|
+
>
|
|
10
|
+
<k-view :values="object" :schema="schema" />
|
|
12
11
|
</k-modal>
|
|
13
12
|
</template>
|
|
14
13
|
|
|
15
14
|
<script>
|
|
15
|
+
import { KModal, KScrollArea } from '../frame'
|
|
16
|
+
import { KView } from '../form'
|
|
16
17
|
import mixins from '../../mixins'
|
|
17
18
|
|
|
18
19
|
export default {
|
|
19
20
|
name: 'k-modal-viewer',
|
|
21
|
+
components: {
|
|
22
|
+
KModal,
|
|
23
|
+
KScrollArea,
|
|
24
|
+
KView
|
|
25
|
+
},
|
|
20
26
|
mixins: [
|
|
21
27
|
mixins.baseViewer,
|
|
22
28
|
mixins.baseModal,
|
|
@@ -34,11 +40,6 @@ export default {
|
|
|
34
40
|
await this.refresh()
|
|
35
41
|
this.isModalOpened = true
|
|
36
42
|
}
|
|
37
|
-
},
|
|
38
|
-
created () {
|
|
39
|
-
// Loads the required components
|
|
40
|
-
this.$options.components['k-modal'] = this.$load('frame/KModal')
|
|
41
|
-
this.$options.components['k-view'] = this.$load('form/KView')
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
</script>
|