@kalisio/kdk 2.3.2 → 2.4.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/.eslintignore +2 -1
- package/.github/workflows/main.yaml +3 -3
- package/README.md +1 -0
- package/core/api/db.js +6 -1
- package/core/api/hooks/hooks.model.js +1 -1
- package/core/api/hooks/hooks.schemas.js +0 -2
- package/core/api/models/messages.model.mongodb.js +13 -0
- package/core/api/services/authorisations/authorisations.service.js +13 -4
- package/core/api/services/index.js +19 -0
- package/core/api/services/messages/messages.hooks.js +38 -0
- package/core/client/api.js +7 -32
- package/core/client/capabilities.js +2 -2
- package/core/client/components/KActivity.vue +29 -6
- package/core/client/components/KContent.vue +2 -2
- package/core/client/components/KDialog.vue +4 -7
- package/core/client/components/KStamp.vue +3 -9
- package/core/client/components/KStore.vue +2 -4
- package/core/client/components/KTab.vue +95 -0
- package/core/client/components/action/KAction.vue +15 -2
- package/core/client/components/action/KBugReportAction.vue +4 -2
- package/core/client/components/action/KToggleFullscreenAction.vue +25 -0
- package/core/client/components/app/KSettings.vue +17 -13
- package/core/client/components/chart/KDataTable.vue +6 -9
- package/core/client/components/chart/KTimeSeriesChart.vue +62 -49
- package/core/client/components/collection/KBoard.vue +22 -33
- package/core/client/components/collection/KCard.vue +71 -56
- package/core/client/components/collection/KCardSection.vue +20 -10
- package/core/client/components/collection/KDescriptionCardSection.vue +47 -0
- package/core/client/components/collection/KGrid.vue +234 -54
- package/core/client/components/collection/KScrollDown.vue +97 -0
- package/core/client/components/collection/KScrollToTop.vue +93 -0
- package/core/client/components/collection/KTable.vue +87 -33
- package/core/client/components/collection/KTimeLine.vue +406 -0
- package/core/client/components/collection/index.js +1 -5
- package/core/client/components/document/KDocument.vue +20 -55
- package/core/client/components/document/KHtml.vue +17 -7
- package/core/client/components/document/KImage.vue +78 -0
- package/core/client/components/document/KMarkdown.vue +12 -16
- package/core/client/components/document/KPdf.vue +69 -0
- package/core/client/components/form/KFileField.vue +2 -2
- package/core/client/components/form/KSelectField.vue +2 -1
- package/core/client/components/form/KUnitField.vue +3 -1
- package/core/client/components/layout/KFab.vue +9 -10
- package/core/client/components/layout/KLayout.vue +104 -6
- package/core/client/components/layout/KOpener.vue +14 -19
- package/core/client/components/layout/KPage.vue +195 -105
- package/core/client/components/layout/KWindow.vue +54 -32
- package/core/client/components/layout/index.js +0 -2
- package/core/client/components/media/KRibbon.vue +95 -0
- package/core/client/components/menu/KMenu.vue +4 -4
- package/core/client/components/team/KGroupsActivity.vue +25 -27
- package/core/client/components/team/KMembersActivity.vue +21 -23
- package/core/client/components/team/KOrganisationsActivity.vue +20 -22
- package/core/client/components/team/KTagsActivity.vue +21 -23
- package/core/client/components/time/KAbsoluteTimeRange.vue +70 -170
- package/core/client/composables/activity.js +14 -12
- package/core/client/composables/collection.js +3 -1
- package/core/client/composables/counter.js +51 -0
- package/core/client/composables/index.js +3 -0
- package/core/client/composables/layout.js +13 -2
- package/core/client/composables/messages.js +15 -0
- package/core/client/composables/pwa.js +1 -1
- package/core/client/composables/schema.js +6 -6
- package/core/client/composables/screen.js +23 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-hover.js +23 -0
- package/core/client/document.js +61 -0
- package/core/client/exporter.js +1 -1
- package/core/client/filter.js +0 -1
- package/core/client/guards.js +1 -1
- package/core/client/i18n/core_en.json +14 -8
- package/core/client/i18n/core_fr.json +15 -9
- package/core/client/index.js +9 -3
- package/core/client/layout.js +129 -29
- package/core/client/local-storage.js +1 -1
- package/core/client/mixins/index.js +0 -1
- package/core/client/mixins/mixin.base-activity.js +23 -13
- package/core/client/mixins/mixin.base-item.js +6 -3
- package/core/client/services/index.js +4 -1
- package/core/client/services/local-settings.service.js +4 -0
- package/core/client/storage.js +1 -1
- package/core/client/store.js +1 -1
- package/core/client/template-context.js +17 -0
- package/core/client/units.js +49 -27
- package/core/client/utils/index.js +3 -2
- package/core/client/utils/utils.actions.js +4 -0
- package/core/client/utils/utils.colors.js +155 -2
- package/core/client/utils/utils.items.js +26 -0
- package/core/client/utils/utils.math.js +3 -0
- package/core/client/utils/utils.platform.js +3 -1
- package/core/client/utils/utils.screen.js +82 -0
- package/core/client/utils/utils.time.js +0 -1
- package/core/common/schemas/settings.update.json +12 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/core/api/application.js.html +1870 -0
- package/coverage/core/api/authentication.js.html +742 -0
- package/coverage/core/api/db.js.html +793 -0
- package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/core/api/hooks/index.html +296 -0
- package/coverage/core/api/hooks/index.js.html +121 -0
- package/coverage/core/api/index.html +191 -0
- package/coverage/core/api/index.js.html +148 -0
- package/coverage/core/api/marshall.js.html +448 -0
- package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/core/api/models/index.html +176 -0
- package/coverage/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/core/api/services/account/account.service.js.html +436 -0
- package/coverage/core/api/services/account/index.html +131 -0
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/core/api/services/authorisations/index.html +131 -0
- package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/core/api/services/databases/index.html +131 -0
- package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/core/api/services/groups/index.html +116 -0
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/core/api/services/import-export/index.html +131 -0
- package/coverage/core/api/services/index.html +116 -0
- package/coverage/core/api/services/index.js.html +556 -0
- package/coverage/core/api/services/mailer/index.html +131 -0
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/core/api/services/messages/index.html +116 -0
- package/coverage/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/core/api/services/organisations/index.html +131 -0
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/core/api/services/push/index.html +131 -0
- package/coverage/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/core/api/services/push/push.service.js.html +121 -0
- package/coverage/core/api/services/storage/index.html +131 -0
- package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/core/api/services/tags/index.html +116 -0
- package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/core/api/services/users/index.html +116 -0
- package/coverage/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/core/api/utils.js.html +118 -0
- package/coverage/core/common/errors.js.html +88 -0
- package/coverage/core/common/index.html +176 -0
- package/coverage/core/common/index.js.html +115 -0
- package/coverage/core/common/permissions.js.html +1048 -0
- package/coverage/core/common/schema.js.html +190 -0
- package/coverage/core/common/utils.js.html +220 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +506 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/core/api/application.js.html +1870 -0
- package/coverage/lcov-report/core/api/authentication.js.html +742 -0
- package/coverage/lcov-report/core/api/db.js.html +793 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/lcov-report/core/api/hooks/index.html +296 -0
- package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
- package/coverage/lcov-report/core/api/index.html +191 -0
- package/coverage/lcov-report/core/api/index.js.html +148 -0
- package/coverage/lcov-report/core/api/marshall.js.html +448 -0
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/core/api/models/index.html +176 -0
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
- package/coverage/lcov-report/core/api/services/account/index.html +131 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
- package/coverage/lcov-report/core/api/services/index.html +116 -0
- package/coverage/lcov-report/core/api/services/index.js.html +556 -0
- package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/messages/index.html +116 -0
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/lcov-report/core/api/services/push/index.html +131 -0
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
- package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/users/index.html +116 -0
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/lcov-report/core/api/utils.js.html +118 -0
- package/coverage/lcov-report/core/common/errors.js.html +88 -0
- package/coverage/lcov-report/core/common/index.html +176 -0
- package/coverage/lcov-report/core/common/index.js.html +115 -0
- package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
- package/coverage/lcov-report/core/common/schema.js.html +190 -0
- package/coverage/lcov-report/core/common/utils.js.html +220 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +506 -0
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/lcov-report/map/api/hooks/index.html +161 -0
- package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
- package/coverage/lcov-report/map/api/index.html +131 -0
- package/coverage/lcov-report/map/api/index.js.html +139 -0
- package/coverage/lcov-report/map/api/marshall.js.html +178 -0
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/lcov-report/map/api/models/index.html +161 -0
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/index.html +131 -0
- package/coverage/lcov-report/map/api/services/index.html +116 -0
- package/coverage/lcov-report/map/api/services/index.js.html +817 -0
- package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/lcov-report/map/common/errors.js.html +94 -0
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/lcov-report/map/common/grid.js.html +1612 -0
- package/coverage/lcov-report/map/common/index.html +371 -0
- package/coverage/lcov-report/map/common/index.js.html +172 -0
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
- package/coverage/lcov-report/map/common/permissions.js.html +124 -0
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
- package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
- package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +11245 -0
- package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/map/api/hooks/index.html +161 -0
- package/coverage/map/api/hooks/index.js.html +94 -0
- package/coverage/map/api/index.html +131 -0
- package/coverage/map/api/index.js.html +139 -0
- package/coverage/map/api/marshall.js.html +178 -0
- package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/map/api/models/index.html +161 -0
- package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/map/api/services/alerts/index.html +131 -0
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/map/api/services/catalog/index.html +116 -0
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/map/api/services/daptiles/index.html +116 -0
- package/coverage/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/map/api/services/features/features.service.js.html +241 -0
- package/coverage/map/api/services/features/index.html +131 -0
- package/coverage/map/api/services/index.html +116 -0
- package/coverage/map/api/services/index.js.html +817 -0
- package/coverage/map/api/services/projects/index.html +116 -0
- package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/map/common/errors.js.html +94 -0
- package/coverage/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/map/common/grid.js.html +1612 -0
- package/coverage/map/common/index.html +371 -0
- package/coverage/map/common/index.js.html +172 -0
- package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/map/common/moment-utils.js.html +157 -0
- package/coverage/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/map/common/opendap-utils.js.html +826 -0
- package/coverage/map/common/permissions.js.html +124 -0
- package/coverage/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/map/common/tms-utils.js.html +274 -0
- package/coverage/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/map/common/wcs-utils.js.html +586 -0
- package/coverage/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/map/common/wfs-utils.js.html +574 -0
- package/coverage/map/common/wms-utils.js.html +451 -0
- package/coverage/map/common/wmts-utils.js.html +547 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/tmp/coverage-280506-1731704745613-0.json +1 -0
- package/coverage/tmp/coverage-280518-1731704745599-0.json +1 -0
- package/coverage/tmp/coverage-280529-1731704745588-0.json +1 -0
- package/coverage/tmp/coverage-280541-1731704745574-0.json +1 -0
- package/coverage/tmp/coverage-280548-1731704745545-0.json +1 -0
- package/extras/css/core.variables.scss +32 -8
- package/extras/icons/attribution.png +0 -0
- package/map/api/services/catalog/catalog.hooks.js +5 -7
- package/map/api/services/features/features.hooks.js +1 -1
- package/map/client/cesium/utils/utils.style.js +11 -2
- package/map/client/components/KAttribution.vue +108 -0
- package/map/client/components/KPositionIndicator.vue +11 -18
- package/map/client/components/KProjectMenu.vue +4 -4
- package/map/client/components/catalog/KCategoryItem.vue +74 -0
- package/map/client/components/catalog/KLayerCategories.vue +24 -12
- package/map/client/components/catalog/KLayersPanel.vue +139 -116
- package/map/client/components/catalog/KProjectSelector.vue +29 -17
- package/map/client/components/catalog/KProjectsPanel.vue +19 -35
- package/map/client/components/catalog/KViewSelector.vue +37 -25
- package/map/client/components/catalog/KViewsPanel.vue +19 -35
- package/map/client/components/form/KLocationField.vue +1 -2
- package/map/client/components/legend/KLegend.vue +34 -34
- package/map/client/components/location/KLocationCardSection.vue +18 -22
- package/map/client/components/location/KLocationMap.vue +36 -38
- package/map/client/components/location/KLocationTimeLineCard.vue +147 -0
- package/map/client/components/location/KLocationTip.vue +12 -2
- package/map/client/components/widget/KInformationBox.vue +0 -4
- package/map/client/components/widget/KStackableTimeSeries.vue +8 -1
- package/map/client/components/widget/KTimeSeries.vue +1 -1
- package/map/client/composables/highlight.js +29 -31
- package/map/client/composables/probe.js +7 -3
- package/map/client/composables/weather.js +71 -31
- package/map/client/i18n/map_en.json +3 -0
- package/map/client/i18n/map_fr.json +3 -0
- package/map/client/init.js +4 -3
- package/map/client/leaflet/ShapeMarker.js +1 -1
- package/map/client/leaflet/utils/utils.events.js +1 -1
- package/map/client/leaflet/utils/utils.style.js +20 -8
- package/map/client/mixins/globe/mixin.base-globe.js +111 -13
- package/map/client/mixins/globe/mixin.file-layers.js +10 -10
- package/map/client/mixins/globe/mixin.geojson-layers.js +90 -15
- package/map/client/mixins/globe/mixin.style.js +2 -0
- package/map/client/mixins/index.js +0 -1
- package/map/client/mixins/map/index.js +1 -0
- package/map/client/mixins/map/mixin.base-map.js +21 -2
- package/map/client/mixins/map/mixin.canvas-layers.js +7 -2
- package/map/client/mixins/map/mixin.edit-layers.js +12 -4
- package/map/client/mixins/map/mixin.file-layers.js +3 -0
- package/map/client/mixins/map/mixin.geojson-layers.js +90 -5
- package/map/client/mixins/map/mixin.pmtiles-layers.js +106 -0
- package/map/client/mixins/mixin.activity.js +8 -3
- package/map/client/mixins/mixin.feature-service.js +73 -32
- package/map/client/mixins/mixin.levels.js +1 -0
- package/map/client/mixins/mixin.weacast.js +10 -87
- package/map/client/utils/index.js +1 -0
- package/map/client/utils/utils.capture.js +1 -1
- package/map/client/utils/utils.catalog.js +7 -7
- package/map/client/utils/utils.features.js +59 -1
- package/map/client/utils/utils.layers.js +8 -0
- package/map/client/utils/utils.time-series.js +121 -0
- package/map/client/utils/utils.weacast.js +102 -0
- package/package.json +6 -6
- package/scripts/init_runner.sh +2 -2
- package/scripts/kash/CHANGELOG.md +12 -0
- package/scripts/kash/README.md +2 -0
- package/scripts/kash/kash.sh +34 -32
- package/scripts/run_tests.sh +2 -2
- package/scripts/setup_workspace.sh +24 -6
- package/test/api/core/hooks.test.js +6 -3
- package/test/api/core/test-log-2023-12-19.log +7 -0
- package/test/api/core/test-log-2024-01-04.log +14 -0
- package/test/api/core/test-log-2024-05-14.log +6 -0
- package/test/api/core/{test-log-2024-04-23.log → test-log-2024-06-06.log} +3 -3
- package/test/api/core/test-log-2024-06-26.log +25 -0
- package/test/api/core/test-log-2024-06-28.log +2 -0
- package/test/api/core/test-log-2024-07-09.log +0 -0
- package/test/api/core/test-log-2024-08-13.log +69 -0
- package/test/api/core/test-log-2024-10-28.log +53 -0
- package/test/api/core/test-log-2024-11-05.log +30 -0
- package/test/api/core/test-log-2024-11-15.log +23 -0
- package/test/api/map/alerts.test.js +3 -1
- package/test/api/map/config/layers.json +3 -1
- package/test/api/map/index.test.js +18 -1
- package/test/api/map/test-log-2023-11-24.log +121 -0
- package/test/api/map/test-log-2023-12-12.log +29 -0
- package/test/api/map/test-log-2023-12-13.log +5 -0
- package/test/api/map/test-log-2024-01-04.log +2 -0
- package/test/api/map/test-log-2024-01-11.log +1 -0
- package/test/api/map/test-log-2024-01-25.log +19 -0
- package/test/api/map/test-log-2024-06-06.log +39 -0
- package/test/api/map/test-log-2024-08-13.log +13 -0
- package/test/api/map/test-log-2024-08-20.log +55 -0
- package/test/api/map/test-log-2024-09-09.log +92 -0
- package/test/api/map/test-log-2024-10-28.log +11 -0
- package/test/client/core/utils.js +13 -0
- package/test/client/map/api.js +34 -0
- package/test/client/map/catalog.js +6 -2
- package/test/client/map/index.js +1 -0
- package/test/client/map/utils.js +4 -2
- package/core/client/components/collection/KList.vue +0 -135
- package/core/client/components/layout/KPageSticky.vue +0 -53
- package/core/client/mixins/mixin.base-collection.js +0 -162
- package/core/client/utils/utils.data.js +0 -22
- package/map/client/mixins/mixin.catalog-panel.js +0 -26
- package/test/api/core/test-log-2024-04-22.log +0 -84
|
@@ -108,40 +108,6 @@ const zoom = ref()
|
|
|
108
108
|
// Computed
|
|
109
109
|
const layersBySublegend = computed(() => getLayersBySublegend(layers.value, sublegends.value))
|
|
110
110
|
|
|
111
|
-
// Functions
|
|
112
|
-
function onShowLayer (layer, engine) {
|
|
113
|
-
const layerLegend = layer.legend
|
|
114
|
-
// Check whether the layer has a legend
|
|
115
|
-
if (!layerLegend) return
|
|
116
|
-
// Check wehther the legend is already registered for that layer
|
|
117
|
-
if (_.find(layers.value, { name: layer.name })) {
|
|
118
|
-
logger.warn(`[KDK] Legend for ${layer.name} already resgistered`)
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
logger.debug(`[KDK] Register '${layer.name}' legend`)
|
|
122
|
-
layers.value.push(layer)
|
|
123
|
-
}
|
|
124
|
-
function onHideLayer (layer) {
|
|
125
|
-
if (!layer.legend) return
|
|
126
|
-
logger.debug(`[KDK] Unregister '${layer.name}' legend`)
|
|
127
|
-
_.remove(layers.value, { name: layer.name })
|
|
128
|
-
}
|
|
129
|
-
function onZoomChanged () {
|
|
130
|
-
zoom.value = CurrentActivity.value.getCenter().zoomLevel
|
|
131
|
-
}
|
|
132
|
-
function getHelperIcon (helper) {
|
|
133
|
-
return _.get(helper, 'icon', undefined)
|
|
134
|
-
}
|
|
135
|
-
function getHelperTooltip (helper) {
|
|
136
|
-
return _.get(helper, 'tooltip', '')
|
|
137
|
-
}
|
|
138
|
-
function getHelperUrl (helper) {
|
|
139
|
-
return _.get(helper, 'url', null)
|
|
140
|
-
}
|
|
141
|
-
function getHelperDialog (helper) {
|
|
142
|
-
return _.get(helper, 'dialog', null)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
111
|
// Watch
|
|
146
112
|
watch([() => props.sublegends, () => props.sublegendsFromCatalog], async () => {
|
|
147
113
|
// Retrieve the legends from catalog if required
|
|
@@ -189,4 +155,38 @@ watch(CurrentActivity, (newActivity, oldActivity) => {
|
|
|
189
155
|
newActivity.$engineEvents.on('zoomend', onZoomChanged)
|
|
190
156
|
}
|
|
191
157
|
}, { immediate: true })
|
|
158
|
+
|
|
159
|
+
// Functions
|
|
160
|
+
function onShowLayer (layer, engine) {
|
|
161
|
+
const layerLegend = layer.legend
|
|
162
|
+
// Check whether the layer has a legend
|
|
163
|
+
if (!layerLegend) return
|
|
164
|
+
// Check wehther the legend is already registered for that layer
|
|
165
|
+
if (_.find(layers.value, { name: layer.name })) {
|
|
166
|
+
logger.warn(`[KDK] Legend for ${layer.name} already resgistered`)
|
|
167
|
+
return
|
|
168
|
+
}
|
|
169
|
+
logger.debug(`[KDK] Register '${layer.name}' legend`)
|
|
170
|
+
layers.value.push(layer)
|
|
171
|
+
}
|
|
172
|
+
function onHideLayer (layer) {
|
|
173
|
+
if (!layer.legend) return
|
|
174
|
+
logger.debug(`[KDK] Unregister '${layer.name}' legend`)
|
|
175
|
+
_.remove(layers.value, { name: layer.name })
|
|
176
|
+
}
|
|
177
|
+
function onZoomChanged () {
|
|
178
|
+
zoom.value = CurrentActivity.value.getCenter().zoomLevel
|
|
179
|
+
}
|
|
180
|
+
function getHelperIcon (helper) {
|
|
181
|
+
return _.get(helper, 'icon', undefined)
|
|
182
|
+
}
|
|
183
|
+
function getHelperTooltip (helper) {
|
|
184
|
+
return _.get(helper, 'tooltip', '')
|
|
185
|
+
}
|
|
186
|
+
function getHelperUrl (helper) {
|
|
187
|
+
return _.get(helper, 'url', null)
|
|
188
|
+
}
|
|
189
|
+
function getHelperDialog (helper) {
|
|
190
|
+
return _.get(helper, 'dialog', null)
|
|
191
|
+
}
|
|
192
192
|
</script>
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
<KCardSection
|
|
3
3
|
:title="$t('KLocationCardSection.TITLE')"
|
|
4
4
|
:actions="actions"
|
|
5
|
-
:
|
|
5
|
+
:actionsFilter="actionsFilter"
|
|
6
|
+
:hideHeader="hideHeader"
|
|
6
7
|
:dense="dense"
|
|
7
|
-
style="position: relative"
|
|
8
8
|
>
|
|
9
9
|
<div v-if="feature" class="full-width column">
|
|
10
10
|
<!-- Description -->
|
|
11
11
|
<KTextArea
|
|
12
|
-
:text="feature.properties
|
|
13
|
-
:minHeight="
|
|
12
|
+
:text="feature.properties[namePath]"
|
|
13
|
+
:minHeight="24"
|
|
14
14
|
:maxHeight="204"
|
|
15
15
|
:dense="true"
|
|
16
16
|
/>
|
|
17
17
|
<!-- Map -->
|
|
18
18
|
<KLocationMap
|
|
19
19
|
v-model="feature"
|
|
20
|
-
style="min-height:
|
|
20
|
+
style="min-height: 120px"
|
|
21
21
|
/>
|
|
22
22
|
</div>
|
|
23
|
-
<div v-else style="height:
|
|
23
|
+
<div v-else style="height: 142px">
|
|
24
24
|
<div class="absolute-center">
|
|
25
25
|
<KStamp
|
|
26
26
|
icon="las la-map-marker"
|
|
@@ -32,34 +32,30 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
35
|
+
import _ from 'lodash'
|
|
35
36
|
import { ref, watch } from 'vue'
|
|
37
|
+
import { utils as coreUtils } from '../../../../core.client'
|
|
36
38
|
import KLocationMap from './KLocationMap.vue'
|
|
37
39
|
|
|
38
40
|
// Props
|
|
39
41
|
const props = defineProps({
|
|
40
|
-
|
|
41
|
-
type:
|
|
42
|
-
default:
|
|
42
|
+
locationPath: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'location'
|
|
43
45
|
},
|
|
44
|
-
|
|
45
|
-
type:
|
|
46
|
-
default:
|
|
46
|
+
namePath: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'name'
|
|
47
49
|
},
|
|
48
|
-
|
|
49
|
-
type: Object,
|
|
50
|
-
default: () => null
|
|
51
|
-
},
|
|
52
|
-
dense: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false
|
|
55
|
-
}
|
|
50
|
+
...coreUtils.CardSectionProps
|
|
56
51
|
})
|
|
57
52
|
|
|
58
53
|
// Data
|
|
59
54
|
const feature = ref(null)
|
|
60
55
|
|
|
61
56
|
// Watch
|
|
62
|
-
watch(() => props.
|
|
63
|
-
feature.value =
|
|
57
|
+
watch(() => [props.item, props.locationPath], () => {
|
|
58
|
+
if (_.get(props.item, 'type') === 'Feature') feature.value = _.cloneDeep(props.item)
|
|
59
|
+
else feature.value = _.get(props.item, props.locationPath)
|
|
64
60
|
}, { immediate: true })
|
|
65
61
|
</script>
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="fit
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<KPanel
|
|
12
|
-
id="header"
|
|
13
|
-
:content="headerComponents"
|
|
14
|
-
class="k-location-map-toolbar"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
2
|
+
<div :ref="mapRefCreated" class="fit">
|
|
3
|
+
<q-resize-observer @resize="refreshMap" />
|
|
4
|
+
<!-- Map header -->
|
|
5
|
+
<div class="row justify-center">
|
|
6
|
+
<KPanel
|
|
7
|
+
id="header"
|
|
8
|
+
:content="header"
|
|
9
|
+
class="k-location-map-toolbar"
|
|
10
|
+
/>
|
|
17
11
|
</div>
|
|
18
12
|
</div>
|
|
19
13
|
</template>
|
|
@@ -52,19 +46,15 @@ export default {
|
|
|
52
46
|
return _.get(config, 'engines.leaflet')
|
|
53
47
|
}
|
|
54
48
|
},
|
|
55
|
-
|
|
49
|
+
tools: {
|
|
56
50
|
type: Array,
|
|
57
51
|
default: () => []
|
|
58
|
-
},
|
|
59
|
-
draggable: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false
|
|
62
52
|
}
|
|
63
53
|
},
|
|
64
54
|
computed: {
|
|
65
|
-
|
|
55
|
+
header () {
|
|
66
56
|
const components = []
|
|
67
|
-
_.forEach(this.
|
|
57
|
+
_.forEach(this.tools, component => {
|
|
68
58
|
if (component === 'separator') {
|
|
69
59
|
components.push({
|
|
70
60
|
component: 'QSeparator',
|
|
@@ -104,6 +94,7 @@ export default {
|
|
|
104
94
|
icon: 'las la-project-diagram',
|
|
105
95
|
tooltip: 'KLocationMap.DRAW_LINE',
|
|
106
96
|
propagate: false,
|
|
97
|
+
|
|
107
98
|
handler: () => this.startDraw('Line')
|
|
108
99
|
})
|
|
109
100
|
}
|
|
@@ -128,6 +119,12 @@ export default {
|
|
|
128
119
|
})
|
|
129
120
|
return components
|
|
130
121
|
},
|
|
122
|
+
interactive () {
|
|
123
|
+
return !_.isEmpty(this.tools)
|
|
124
|
+
},
|
|
125
|
+
draggable () {
|
|
126
|
+
return _.indexOf(this.tools, 'draw-point') !== -1
|
|
127
|
+
},
|
|
131
128
|
allowGeolocation () {
|
|
132
129
|
return !_.isNil(this.header.geolocate)
|
|
133
130
|
}
|
|
@@ -135,9 +132,6 @@ export default {
|
|
|
135
132
|
watch: {
|
|
136
133
|
modelValue: function () {
|
|
137
134
|
this.refresh()
|
|
138
|
-
},
|
|
139
|
-
draggable: function () {
|
|
140
|
-
this.refresh()
|
|
141
135
|
}
|
|
142
136
|
},
|
|
143
137
|
methods: {
|
|
@@ -157,6 +151,10 @@ export default {
|
|
|
157
151
|
},
|
|
158
152
|
refresh () {
|
|
159
153
|
if (!this.mapReady) return
|
|
154
|
+
// disable handler if non interactive
|
|
155
|
+
if (!this.interactive) {
|
|
156
|
+
_.forEach(this.map._handlers, handler => { handler.disable() })
|
|
157
|
+
}
|
|
160
158
|
// clear the existing layer if any
|
|
161
159
|
if (this.locationLayer) {
|
|
162
160
|
this.map.removeLayer(this.locationLayer)
|
|
@@ -177,10 +175,11 @@ export default {
|
|
|
177
175
|
const coordinates = _.get(this.location, 'geometry.coordinates')
|
|
178
176
|
const style = _.get(this.engineOptions, 'style.location.point')
|
|
179
177
|
this.locationLayer = createMarkerFromPointStyle([coordinates[1], coordinates[0]],
|
|
180
|
-
Object.assign({ draggable: this.draggable, pmIgnore: true }, style))
|
|
178
|
+
Object.assign({ interactive: this.draggable, draggable: this.draggable, pmIgnore: true }, style))
|
|
181
179
|
if (this.draggable) this.locationLayer.on('dragend', this.onLocationDragged)
|
|
182
180
|
} else {
|
|
183
181
|
this.locationLayer = L.geoJson(this.location, {
|
|
182
|
+
interactive: false,
|
|
184
183
|
style: (feature) => {
|
|
185
184
|
const styleType = getFeatureStyleType(feature)
|
|
186
185
|
if (!styleType) {
|
|
@@ -200,10 +199,8 @@ export default {
|
|
|
200
199
|
}
|
|
201
200
|
})
|
|
202
201
|
}
|
|
203
|
-
// }
|
|
204
202
|
this.locationLayer.addTo(this.map)
|
|
205
|
-
|
|
206
|
-
this.$nextTick(() => this.recenter())
|
|
203
|
+
this.recenter()
|
|
207
204
|
},
|
|
208
205
|
onLocationDragged () {
|
|
209
206
|
const latLng = this.locationLayer.getLatLng()
|
|
@@ -249,19 +246,16 @@ export default {
|
|
|
249
246
|
unbindLeafletEvents(this.map, ['pm:create'])
|
|
250
247
|
this.map.pm.setGlobalOptions({ layerGroup: null })
|
|
251
248
|
},
|
|
252
|
-
async
|
|
253
|
-
const layers = await this.getLayers()
|
|
254
|
-
// Get first visible base layer
|
|
255
|
-
if (layers.length > 0) {
|
|
256
|
-
this.addLayer(layers[0])
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
mapRefCreated (container) {
|
|
249
|
+
async mapRefCreated (container) {
|
|
260
250
|
if (container) {
|
|
261
251
|
if (!this.mapReady) {
|
|
252
|
+
// setup map
|
|
262
253
|
this.setupMap(container, this.engineOptions.viewer)
|
|
263
254
|
this.mapReady = true
|
|
264
|
-
|
|
255
|
+
// setup base layer
|
|
256
|
+
const baseLayers = await this.getLayers({ type: 'BaseLayer' })
|
|
257
|
+
if (baseLayers.length > 0) await this.addLayer(baseLayers[0])
|
|
258
|
+
// setup location
|
|
265
259
|
this.refresh()
|
|
266
260
|
}
|
|
267
261
|
}
|
|
@@ -275,6 +269,10 @@ export default {
|
|
|
275
269
|
},
|
|
276
270
|
beforeUnmount () {
|
|
277
271
|
this.$engineEvents.off('pm:create', this.stopDraw)
|
|
272
|
+
if (this.locationLayer) {
|
|
273
|
+
this.map.removeLayer(this.locationLayer)
|
|
274
|
+
this.locationLayer = null
|
|
275
|
+
}
|
|
278
276
|
},
|
|
279
277
|
async setup () {
|
|
280
278
|
// Get current project for activity if any
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KCard
|
|
3
|
+
v-bind="$props"
|
|
4
|
+
:header="header"
|
|
5
|
+
:sections="sections"
|
|
6
|
+
:footer="footer"
|
|
7
|
+
:shadow="shadow"
|
|
8
|
+
:dense="dense"
|
|
9
|
+
>
|
|
10
|
+
<template v-slot:card-heading>
|
|
11
|
+
<div class="full-width row">
|
|
12
|
+
<div :class="{ 'col-12': dense, 'col-8': !dense }">
|
|
13
|
+
<div class="full-width row justify-between">
|
|
14
|
+
<!-- name -->
|
|
15
|
+
<div
|
|
16
|
+
class="text-subtitle1 text-weight-medium ellipsis-2-lines"
|
|
17
|
+
v-bind:class="{ 'q-py-xs': dense, 'q-py-sm': !dense }"
|
|
18
|
+
>
|
|
19
|
+
{{ item.name }}
|
|
20
|
+
</div>
|
|
21
|
+
<!-- location name if dense -->
|
|
22
|
+
<div v-if="dense && item.location"
|
|
23
|
+
class="row items-center justify-end q-gutter-x-sm k-location-name"
|
|
24
|
+
>
|
|
25
|
+
<q-icon v-if="dense" name="las la-map-marker" />
|
|
26
|
+
<span class="ellipsis text-caption">{{ item.location.properties.name }}</span>
|
|
27
|
+
<KLocationTip
|
|
28
|
+
v-if="dense"
|
|
29
|
+
:location="item.location"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<KDescriptionCardSection
|
|
34
|
+
:item="item"
|
|
35
|
+
:actions="descriptionActions"
|
|
36
|
+
:dense="dense"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div v-if="!dense" class="q-pl-sm q-pb-sm col-4">
|
|
40
|
+
<div v-if="item.location" class="fit column relative-position">
|
|
41
|
+
<KLocationMap
|
|
42
|
+
v-model="item.location"
|
|
43
|
+
:tools="[]"
|
|
44
|
+
class="col k-location-map"
|
|
45
|
+
/>
|
|
46
|
+
<div class="full-width ellipsis text-caption k-location-map-caption">
|
|
47
|
+
{{ item.location.properties.name }}
|
|
48
|
+
</div>
|
|
49
|
+
<KPanel
|
|
50
|
+
:content="locationActions"
|
|
51
|
+
class="k-location-actions"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<div v-else class="fit column k-location-map relative-position">
|
|
55
|
+
<div class="absolute-center" >
|
|
56
|
+
<KStamp
|
|
57
|
+
icon="las la-map-marker"
|
|
58
|
+
text="KLocationCardSection.NO_LOCATION"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
<KPanel
|
|
62
|
+
:content="locationActions"
|
|
63
|
+
class="k-location-actions"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
</KCard>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
import _ from 'lodash'
|
|
74
|
+
import { mixins as kCoreMixins } from '../../../../core/client'
|
|
75
|
+
import KDescriptionCardSection from '../../../../core/client/components/collection/KDescriptionCardSection.vue'
|
|
76
|
+
import KLocationMap from './KLocationMap'
|
|
77
|
+
import KLocationTip from './KLocationTip'
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
mixins: [kCoreMixins.baseItem],
|
|
81
|
+
components: {
|
|
82
|
+
KDescriptionCardSection,
|
|
83
|
+
KLocationMap,
|
|
84
|
+
KLocationTip
|
|
85
|
+
},
|
|
86
|
+
props: {
|
|
87
|
+
header: {
|
|
88
|
+
type: [Array, Object],
|
|
89
|
+
default: () => null
|
|
90
|
+
},
|
|
91
|
+
sections: {
|
|
92
|
+
type: Object,
|
|
93
|
+
default: () => null
|
|
94
|
+
},
|
|
95
|
+
footer: {
|
|
96
|
+
type: [Array, Object],
|
|
97
|
+
default: () => null
|
|
98
|
+
},
|
|
99
|
+
shadow: {
|
|
100
|
+
type: Number,
|
|
101
|
+
default: 0,
|
|
102
|
+
validator: (value) => {
|
|
103
|
+
return value >= 0 && value <= 24
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
dense: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
computed: {
|
|
112
|
+
descriptionActions () {
|
|
113
|
+
return _.filter(this.itemActions, { scope: 'description' })
|
|
114
|
+
},
|
|
115
|
+
locationActions () {
|
|
116
|
+
return _.filter(this.itemActions, { scope: 'location' })
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<style lang="scss" scoped>
|
|
123
|
+
.k-location-name {
|
|
124
|
+
user-select: none;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
}
|
|
127
|
+
.k-location-map {
|
|
128
|
+
border-radius: 5px 5px 0px 0px;
|
|
129
|
+
border: 1px solid lightgrey;
|
|
130
|
+
}
|
|
131
|
+
.k-location-map-caption {
|
|
132
|
+
user-select: none;
|
|
133
|
+
padding-left: 4px;
|
|
134
|
+
padding-right: 4px;
|
|
135
|
+
background-color: #EEEEEE;
|
|
136
|
+
border-radius: 0px 0px 5px 5px;
|
|
137
|
+
border: 1px solid lightgrey;
|
|
138
|
+
}
|
|
139
|
+
.k-location-actions {
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 2px;
|
|
142
|
+
right: 2px;
|
|
143
|
+
background-color: #ffffffaa;
|
|
144
|
+
border-radius: 10px;
|
|
145
|
+
z-index: 401;
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
anchor="center end"
|
|
4
4
|
self="center middle"
|
|
5
5
|
class="q-pa-none"
|
|
6
|
+
:delay="delay"
|
|
7
|
+
:hide-delay="150"
|
|
8
|
+
:transition-duration="150"
|
|
6
9
|
style="border-radius: 100px; border: 1px solid var(--q-primary);"
|
|
7
10
|
>
|
|
8
11
|
<KLocationMap
|
|
@@ -14,7 +17,7 @@
|
|
|
14
17
|
</template>
|
|
15
18
|
|
|
16
19
|
<script setup>
|
|
17
|
-
import {
|
|
20
|
+
import { computed } from 'vue'
|
|
18
21
|
import KLocationMap from './KLocationMap.vue'
|
|
19
22
|
|
|
20
23
|
// Props
|
|
@@ -22,8 +25,15 @@ const props = defineProps({
|
|
|
22
25
|
location: {
|
|
23
26
|
type: Object,
|
|
24
27
|
required: true
|
|
28
|
+
},
|
|
29
|
+
delay: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 500
|
|
25
32
|
}
|
|
26
33
|
})
|
|
27
34
|
|
|
28
|
-
|
|
35
|
+
// Data
|
|
36
|
+
const feature = computed(() => {
|
|
37
|
+
return props.location
|
|
38
|
+
})
|
|
29
39
|
</script>
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
<script>
|
|
23
23
|
import _ from 'lodash'
|
|
24
24
|
import logger from 'loglevel'
|
|
25
|
-
import { ref } from 'vue'
|
|
26
25
|
import { copyToClipboard, exportFile } from 'quasar'
|
|
27
26
|
import { KView, KPanel, KStamp } from '../../../../core/client/components'
|
|
28
27
|
import { generatePropertiesSchema } from '../../utils'
|
|
@@ -132,11 +131,8 @@ export default {
|
|
|
132
131
|
}
|
|
133
132
|
},
|
|
134
133
|
setup (props) {
|
|
135
|
-
// Data
|
|
136
|
-
const height = ref(0)
|
|
137
134
|
// Expose
|
|
138
135
|
return {
|
|
139
|
-
height,
|
|
140
136
|
...useCurrentActivity(),
|
|
141
137
|
...useHighlight('information-box', props.highlight)
|
|
142
138
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div id="stacked-time-series" class="column justify-start no-wrap"
|
|
2
|
+
<div id="stacked-time-series" v-if="components.length > 0" class="column justify-start no-wrap">
|
|
3
3
|
<!-- Pinned charts first -->
|
|
4
4
|
<template v-for="(timeSerie, index) in timeSeries">
|
|
5
5
|
<div v-if="timeSerie.pinned" class="col column justify-start no-wrap">
|
|
@@ -117,6 +117,7 @@ const exposed = {
|
|
|
117
117
|
zoomToData,
|
|
118
118
|
restorePreviousZoom,
|
|
119
119
|
update,
|
|
120
|
+
requestUpdate,
|
|
120
121
|
exportData,
|
|
121
122
|
exportSeries
|
|
122
123
|
}
|
|
@@ -200,6 +201,12 @@ function update () {
|
|
|
200
201
|
if (component.table) component.table.update()
|
|
201
202
|
})
|
|
202
203
|
}
|
|
204
|
+
function requestUpdate () {
|
|
205
|
+
_.forEach(components.value, component => {
|
|
206
|
+
if (component.chart) component.chart.requestUpdate()
|
|
207
|
+
if (component.table) component.table.requestUpdate()
|
|
208
|
+
})
|
|
209
|
+
}
|
|
203
210
|
function exportData (timeSerie) {
|
|
204
211
|
const component = _.find(components.value, { timeSerie })
|
|
205
212
|
if (component && component.table) component.table.exportData(_.get(props, 'exportOptions.data', {}))
|
|
@@ -398,7 +398,7 @@ export default {
|
|
|
398
398
|
},
|
|
399
399
|
onExportSeries () {
|
|
400
400
|
let times = []
|
|
401
|
-
const time = this.probedLocation
|
|
401
|
+
const time = _.get(this.probedLocation, 'time', _.get(this.probedLocation, 'forecastTime'))
|
|
402
402
|
this.probedVariables.forEach(variable => {
|
|
403
403
|
// Check if we are targetting a specific level
|
|
404
404
|
const name = (this.kActivity.forecastLevel ? `${variable.name}-${this.kActivity.forecastLevel}` : variable.name)
|
|
@@ -4,26 +4,26 @@ import bbox from '@turf/bbox'
|
|
|
4
4
|
import bboxPolygon from '@turf/bbox-polygon'
|
|
5
5
|
import { uid } from 'quasar'
|
|
6
6
|
import { unref, onUnmounted } from 'vue'
|
|
7
|
-
import { getFeatureId, getFeatureStyleType } from '../utils.js'
|
|
7
|
+
import { getFeatureId, getFeatureStyleType, isLayerHighlightable } from '../utils.js'
|
|
8
8
|
import * as composables from '../../../core/client/composables/index.js'
|
|
9
9
|
|
|
10
10
|
export const HighlightsLayerName = uid()
|
|
11
|
-
// This ensure it is on
|
|
11
|
+
// This ensure it is on top of everything else
|
|
12
12
|
export const HighlightsZIndex = 999
|
|
13
13
|
|
|
14
14
|
export function useHighlight (name, options = {}) {
|
|
15
15
|
// Set default options
|
|
16
|
-
options = Object.assign({ updateDelay:
|
|
16
|
+
options = Object.assign({ updateDelay: 250 }, options)
|
|
17
17
|
// Retrieve activity
|
|
18
18
|
const { kActivity } = composables.useCurrentActivity()
|
|
19
19
|
// Avoid using .value everywhere
|
|
20
20
|
let activity = unref(kActivity)
|
|
21
21
|
|
|
22
22
|
// Data
|
|
23
|
-
//
|
|
24
|
-
const { store, clear, set, get, unset, has } = composables.useStore(`
|
|
23
|
+
// highlight store for context
|
|
24
|
+
const { store, clear, set, get, unset, has } = composables.useStore(`highlights.${name}`)
|
|
25
25
|
// global highlight store
|
|
26
|
-
const { forOwn } = composables.useStore('
|
|
26
|
+
const { forOwn } = composables.useStore('highlights')
|
|
27
27
|
|
|
28
28
|
// functions
|
|
29
29
|
function setCurrentActivity (newActivity) {
|
|
@@ -63,6 +63,7 @@ export function useHighlight (name, options = {}) {
|
|
|
63
63
|
return get(getHighlightId(feature, layer))
|
|
64
64
|
}
|
|
65
65
|
function highlight (feature, layer, selected = true) {
|
|
66
|
+
if (layer && !isLayerHighlightable(layer)) return
|
|
66
67
|
const highlightId = getHighlightId(feature, layer)
|
|
67
68
|
// Define default highlight feature
|
|
68
69
|
const highlight = {
|
|
@@ -116,17 +117,17 @@ export function useHighlight (name, options = {}) {
|
|
|
116
117
|
// Add additional information provided by feature, if any, for custom styling
|
|
117
118
|
_.merge(highlight, _.omit(feature, ['geometry', 'style']))
|
|
118
119
|
set(highlightId, highlight)
|
|
119
|
-
|
|
120
|
+
requestHighlightsLayerUpdate()
|
|
120
121
|
return highlight
|
|
121
122
|
}
|
|
122
123
|
function unhighlight (feature, layer) {
|
|
123
124
|
const highlightId = getHighlightId(feature, layer)
|
|
124
125
|
unset(highlightId)
|
|
125
|
-
|
|
126
|
+
requestHighlightsLayerUpdate()
|
|
126
127
|
}
|
|
127
128
|
function clearHighlights () {
|
|
128
129
|
clear()
|
|
129
|
-
|
|
130
|
+
requestHighlightsLayerUpdate()
|
|
130
131
|
}
|
|
131
132
|
function getHighlightedFeatures () {
|
|
132
133
|
// Iterate over all highlights
|
|
@@ -156,7 +157,8 @@ export function useHighlight (name, options = {}) {
|
|
|
156
157
|
cluster: false,
|
|
157
158
|
removeMissing: true,
|
|
158
159
|
popup: { pick: [] },
|
|
159
|
-
zIndex: HighlightsZIndex
|
|
160
|
+
zIndex: HighlightsZIndex,
|
|
161
|
+
interactive: false
|
|
160
162
|
},
|
|
161
163
|
cesium: {
|
|
162
164
|
type: 'geoJson',
|
|
@@ -170,29 +172,25 @@ export function useHighlight (name, options = {}) {
|
|
|
170
172
|
}
|
|
171
173
|
if (!activity.isLayerVisible(HighlightsLayerName)) await activity.showLayer(HighlightsLayerName)
|
|
172
174
|
}
|
|
173
|
-
let updateRequested
|
|
174
175
|
function updateHighlightsLayer () {
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
features
|
|
188
|
-
})
|
|
189
|
-
}
|
|
190
|
-
updateRequested = false
|
|
191
|
-
}, options.updateDelay)
|
|
176
|
+
// Get all highlights
|
|
177
|
+
let features = getHighlightedFeatures()
|
|
178
|
+
// Filter invisible ones
|
|
179
|
+
features = features.filter(feature => !feature.isDisabled)
|
|
180
|
+
// Order from back to front
|
|
181
|
+
features = _.sortBy(features, feature => _.get(feature, 'properties.zOrder'))
|
|
182
|
+
if (activity) {
|
|
183
|
+
activity.updateLayer(HighlightsLayerName, {
|
|
184
|
+
type: 'FeatureCollection',
|
|
185
|
+
features
|
|
186
|
+
}, { replace: true }) // Always start from fresh data as we debounce the update and might multiple operations might generate a wrong order otherwise
|
|
187
|
+
}
|
|
192
188
|
}
|
|
189
|
+
// In order to avoid updating the layer too much often we queue a request update every N ms
|
|
190
|
+
const requestHighlightsLayerUpdate = _.debounce(updateHighlightsLayer, options.updateDelay)
|
|
191
|
+
|
|
193
192
|
function removeHighlightsLayer () {
|
|
194
193
|
// Clear any running update
|
|
195
|
-
if (updateRequested) clearTimeout(updateRequested)
|
|
196
194
|
if (activity) activity.removeLayer(HighlightsLayerName)
|
|
197
195
|
}
|
|
198
196
|
function onHighlightedLayerDisabled (layer) {
|
|
@@ -203,7 +201,7 @@ export function useHighlight (name, options = {}) {
|
|
|
203
201
|
const suffix = `-${_.kebabCase(layer.name)}-${getFeatureId(feature, layer)}`
|
|
204
202
|
if (feature.highlightId.endsWith(suffix)) feature.isDisabled = true
|
|
205
203
|
})
|
|
206
|
-
|
|
204
|
+
requestHighlightsLayerUpdate()
|
|
207
205
|
}
|
|
208
206
|
function onHighlightedLayerEnabled (layer) {
|
|
209
207
|
// Get all highlights
|
|
@@ -213,7 +211,7 @@ export function useHighlight (name, options = {}) {
|
|
|
213
211
|
const suffix = `-${_.kebabCase(layer.name)}-${getFeatureId(feature, layer)}`
|
|
214
212
|
if (feature.highlightId.endsWith(suffix)) feature.isDisabled = false
|
|
215
213
|
})
|
|
216
|
-
|
|
214
|
+
requestHighlightsLayerUpdate()
|
|
217
215
|
}
|
|
218
216
|
|
|
219
217
|
// Cleanup on destroy
|