@kalisio/kdk 2.6.3 → 2.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/core/api/application.js +2 -4
- package/core/api/authentication.js +2 -3
- package/core/api/db.js +10 -2
- package/core/api/hooks/hooks.authorisations.js +4 -2
- package/core/api/hooks/hooks.push.js +6 -2
- package/core/api/hooks/hooks.query.js +29 -12
- package/core/api/hooks/hooks.users.js +30 -17
- package/core/api/models/configurations.model.mongodb.js +4 -0
- package/core/api/services/authorisations/authorisations.service.js +1 -1
- package/core/api/services/configurations/configurations.hooks.js +33 -0
- package/core/api/services/index.js +41 -7
- package/core/api/services/messages/messages.hooks.js +9 -3
- package/core/client/api.js +14 -1
- package/core/client/capabilities.js +1 -6
- package/core/client/components/KAvatar.vue +24 -20
- package/core/client/components/account/KProfile.vue +10 -71
- package/core/client/components/account/index.js +0 -2
- package/core/client/components/app/KSettings.vue +1 -0
- package/core/client/components/collection/KBoard.vue +4 -3
- package/core/client/components/collection/KCardSection.vue +1 -0
- package/core/client/components/collection/KGrid.vue +2 -0
- package/core/client/components/collection/KTable.vue +5 -1
- package/core/client/components/collection/KTimeLine.vue +9 -1
- package/core/client/components/collection/index.js +0 -2
- package/core/client/components/form/KChipsField.vue +2 -1
- package/core/client/components/form/KEmailField.vue +1 -0
- package/core/client/components/form/KFileField.vue +22 -1
- package/core/client/components/form/KForm.vue +2 -0
- package/core/client/components/form/KItemField.vue +1 -0
- package/core/client/components/form/KNumberField.vue +1 -0
- package/core/client/components/form/KPasswordField.vue +1 -0
- package/core/client/components/form/KPhoneField.vue +1 -0
- package/core/client/components/form/KPropertyItemField.vue +1 -0
- package/core/client/components/form/KResolutionField.vue +1 -0
- package/core/client/components/form/KSelectField.vue +31 -0
- package/core/client/components/form/KTagField.vue +1 -0
- package/core/client/components/form/KTextField.vue +1 -0
- package/core/client/components/form/KTokenField.vue +1 -0
- package/core/client/components/form/KUnitField.vue +1 -0
- package/core/client/components/form/KUrlField.vue +1 -0
- package/core/client/components/graphics/KIcon.vue +3 -4
- package/core/client/components/layout/KPage.vue +1 -0
- package/core/client/components/layout/KWindow.vue +6 -3
- package/core/client/components/messages/KMessageComposer.vue +2 -1
- package/core/client/components/messages/KMessagesTimeLine.vue +1 -1
- package/core/client/components/time/KDate.vue +1 -2
- package/core/client/components/time/KDateTime.vue +11 -11
- package/core/client/components/time/KTime.vue +1 -1
- package/core/client/composables/collection.js +33 -8
- package/core/client/composables/errors.js +1 -1
- package/core/client/composables/layout.js +9 -9
- package/core/client/configurations.js +50 -0
- package/core/client/exporter.js +1 -1
- package/core/client/i18n/core_en.json +6 -39
- package/core/client/i18n/core_fr.json +6 -39
- package/core/client/index.js +2 -0
- package/core/client/layout.js +8 -8
- package/core/client/mixins/mixin.base-activity.js +5 -2
- package/core/client/mixins/mixin.base-field.js +3 -3
- package/core/client/search.js +2 -1
- package/core/client/utils/utils.collection.js +8 -8
- package/core/client/utils/utils.items.js +4 -0
- package/core/client/utils/utils.push.js +3 -3
- package/core/client/utils/utils.session.js +7 -5
- package/core/client/utils/utils.shapes.js +38 -7
- package/core/client/utils/utils.time.js +21 -22
- package/core/common/schemas/users.update-profile.json +3 -2
- package/coverage/core/api/application.js.html +1 -1
- package/coverage/core/api/authentication.js.html +1 -1
- package/coverage/core/api/db.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authentication.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authorisations.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.push.js.html +22 -10
- package/coverage/core/api/hooks/hooks.query.js.html +33 -6
- package/coverage/core/api/hooks/hooks.schemas.js.html +1 -1
- 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 +4 -4
- package/coverage/core/api/hooks/index.html +23 -23
- package/coverage/core/api/hooks/index.js.html +1 -1
- package/coverage/core/api/index.html +1 -1
- package/coverage/core/api/index.js.html +1 -1
- package/coverage/core/api/marshall.js.html +1 -1
- package/coverage/core/api/models/configurations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/messages.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/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 +1 -1
- package/coverage/core/api/services/authorisations/index.html +1 -1
- package/coverage/core/api/services/configurations/configurations.hooks.js.html +1 -1
- package/coverage/core/api/services/configurations/index.html +1 -1
- 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/import-export/import-export.hooks.js.html +1 -1
- package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/core/api/services/import-export/index.html +1 -1
- package/coverage/core/api/services/index.html +1 -1
- package/coverage/core/api/services/index.js.html +1 -1
- 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/messages/index.html +1 -1
- package/coverage/core/api/services/messages/messages.hooks.js.html +1 -1
- package/coverage/core/api/services/push/index.html +1 -1
- package/coverage/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/core/api/services/push/push.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/storage/storage.service.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/api/services/users/users.service.js.html +1 -1
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +1 -1
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +1 -1
- package/coverage/core/common/schema.js.html +1 -1
- package/coverage/core/common/utils.js.html +1 -1
- package/coverage/core/common/utils.offline.js.html +1 -1
- package/coverage/index.html +17 -17
- package/coverage/lcov-report/core/api/application.js.html +1 -1
- package/coverage/lcov-report/core/api/authentication.js.html +1 -1
- package/coverage/lcov-report/core/api/db.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 +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.push.js.html +22 -10
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +33 -6
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +1 -1
- 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 +4 -4
- package/coverage/lcov-report/core/api/hooks/index.html +23 -23
- package/coverage/lcov-report/core/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/core/api/index.html +1 -1
- package/coverage/lcov-report/core/api/index.js.html +1 -1
- package/coverage/lcov-report/core/api/marshall.js.html +1 -1
- package/coverage/lcov-report/core/api/models/configurations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/messages.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/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 +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/configurations/configurations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/configurations/index.html +1 -1
- 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/import-export/import-export.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.js.html +1 -1
- 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/messages/index.html +1 -1
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/index.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.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/storage/storage.service.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/api/services/users/users.service.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +1 -1
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +1 -1
- package/coverage/lcov-report/core/common/schema.js.html +1 -1
- package/coverage/lcov-report/core/common/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/utils.offline.js.html +1 -1
- package/coverage/lcov-report/index.html +17 -17
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +184 -4
- package/coverage/lcov-report/map/api/hooks/index.html +5 -5
- 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 +1 -1
- package/coverage/lcov-report/map/api/models/index.html +1 -1
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +1 -1
- 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/features.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/features/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/api/services/projects/index.html +1 -1
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/styles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.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 +358 -280
- package/coverage/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +184 -4
- package/coverage/map/api/hooks/index.html +5 -5
- 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 +1 -1
- package/coverage/map/api/models/index.html +1 -1
- package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/styles.model.mongodb.js.html +1 -1
- 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/features.service.js.html +1 -1
- package/coverage/map/api/services/features/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/api/services/projects/index.html +1 -1
- package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/map/api/services/styles/index.html +1 -1
- package/coverage/map/api/services/styles/styles.hooks.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/coverage/tmp/coverage-1028514-1773134124472-0.json +1 -0
- package/coverage/tmp/coverage-1028526-1773134124448-0.json +1 -0
- package/coverage/tmp/coverage-1028537-1773134124431-0.json +1 -0
- package/coverage/tmp/coverage-1028549-1773134124401-0.json +1 -0
- package/coverage/tmp/{coverage-222566-1765963609278-0.json → coverage-1028556-1773134124353-0.json} +1 -1
- package/extras/configs/widgets.top.js +3 -3
- package/extras/tests/core/collection.mjs +2 -9
- package/map/api/hooks/hooks.catalog.js +18 -4
- package/map/api/services/catalog/catalog.hooks.js +3 -0
- package/map/api/services/features/features.hooks.js +3 -1
- package/map/api/services/index.js +2 -6
- package/map/api/services/styles/styles.hooks.js +6 -1
- package/map/client/components/KFeatureActionButton.vue +9 -3
- package/map/client/components/KFeaturesFilterManager.vue +5 -5
- package/map/client/components/KFilterCondition.vue +17 -10
- package/map/client/components/KLayerEditor.vue +49 -39
- package/map/client/components/KMeasureTool.vue +7 -1
- package/map/client/components/KTimezoneMap.vue +29 -9
- package/map/client/components/catalog/KLayersPanel.vue +26 -16
- package/map/client/components/catalog/KLayersSelector.vue +13 -2
- package/map/client/components/catalog/KViewsPanel.vue +5 -4
- package/map/client/components/form/KSelectLayersField.vue +28 -17
- package/map/client/components/form/KSelectViewsField.vue +18 -9
- package/map/client/components/form/KTimezoneField.vue +1 -2
- package/map/client/components/legend/KVariablesLegend.vue +10 -1
- package/map/client/components/location/KLocationCardSection.vue +7 -2
- package/map/client/components/location/KLocationMap.vue +31 -7
- package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
- package/map/client/components/stickies/KZoomControl.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +4 -1
- package/map/client/components/widget/KTimeSeries.vue +174 -497
- package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
- package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
- package/map/client/composables/catalog.js +6 -10
- package/map/client/composables/highlight.js +12 -9
- package/map/client/composables/project.js +1 -1
- package/map/client/composables/selection.js +8 -7
- package/map/client/composables/weather.js +9 -2
- package/map/client/geolocation.js +8 -5
- package/map/client/i18n/map_en.json +10 -8
- package/map/client/i18n/map_fr.json +9 -7
- package/map/client/leaflet/TiledFeatureLayer.js +85 -82
- package/map/client/leaflet/utils/utils.geojson.js +3 -3
- package/map/client/mixins/globe/mixin.base-globe.js +15 -6
- package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
- package/map/client/mixins/map/mixin.edit-layers.js +9 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
- package/map/client/mixins/mixin.activity.js +23 -30
- package/map/client/mixins/mixin.feature-selection.js +41 -5
- package/map/client/planets.js +1 -1
- package/map/client/readers/reader.kml.js +2 -3
- package/map/client/utils/utils.catalog.js +36 -10
- package/map/client/utils/utils.layers.js +39 -8
- package/map/client/utils/utils.project.js +4 -0
- package/map/client/utils/utils.style.js +37 -7
- package/map/client/utils/utils.time-series.js +215 -6
- package/map/common/schemas/catalog.update.json +1 -1
- package/map/common/weacast-grid-source.js +1 -1
- package/package.json +3 -3
- package/scripts/kash/CHANGELOG.md +0 -4
- package/scripts/kash/README.md +0 -9
- package/scripts/kash/kash.sh +45 -40
- package/scripts/kash/scripts/run_tests.sh +1 -4
- package/test/api/core/authentication.test.js +9 -4
- package/test/api/core/config/default.cjs +1 -0
- package/test/api/core/hooks.test.js +6 -0
- package/test/api/core/index.test.js +43 -18
- package/test/api/core/push.test.js +8 -8
- package/test/api/core/test-log-2026-03-10.log +60 -0
- package/test/api/core/users.test.js +384 -0
- package/test/api/map/grid-sources.test.js +1 -1
- package/test/api/map/test-log-2026-03-10.log +56 -0
- package/vite/package.json +11 -2
- package/vite/test/core/composables.test.js +77 -0
- package/vite/vitest.config.js +13 -0
- package/vite/yarn.lock +1096 -18
- package/client/css/core.variables.scss +0 -72
- package/client/i18n/core_en.json +0 -744
- package/client/i18n/core_fr.json +0 -744
- package/client/i18n/map_en.json +0 -800
- package/client/i18n/map_fr.json +0 -800
- package/client/kdk.client.css +0 -47
- package/client/kdk.client.js +0 -41097
- package/client/kdk.client.map.css +0 -47
- package/client/kdk.client.map.js +0 -38182
- package/client/kdk.client.map.min.css +0 -1
- package/client/kdk.client.map.min.js +0 -27032
- package/client/kdk.client.min.css +0 -1
- package/client/kdk.client.min.js +0 -29074
- package/client/schemas/capture.create.json +0 -132
- package/client/schemas/catalog.update.json +0 -44
- package/client/schemas/messages.update.json +0 -16
- package/client/schemas/projects.create.json +0 -52
- package/client/schemas/projects.update.json +0 -52
- package/client/schemas/settings.update.json +0 -286
- package/client/schemas/tags.update.json +0 -35
- package/client/schemas/users.update-profile.json +0 -34
- package/core/client/components/account/KAccount.vue +0 -68
- package/core/client/components/account/KDeleteAccountManager.vue +0 -62
- package/core/client/components/account/KEmailManager.vue +0 -128
- package/core/client/components/account/KPasswordManager.vue +0 -90
- package/core/client/components/account/KVerifyEmailManager.vue +0 -105
- package/core/client/components/collection/KColumn.vue +0 -227
- package/core/client/components/collection/KHistory.vue +0 -113
- package/core/client/components/collection/KHistoryEntry.vue +0 -109
- package/coverage/tmp/coverage-222524-1765963609350-0.json +0 -1
- package/coverage/tmp/coverage-222536-1765963609335-0.json +0 -1
- package/coverage/tmp/coverage-222547-1765963609324-0.json +0 -1
- package/coverage/tmp/coverage-222559-1765963609309-0.json +0 -1
- package/scripts/kash/LICENSE +0 -21
- package/test/api/core/test-log-2025-07-31.log +0 -15
- package/test/api/core/test-log-2025-10-03.log +0 -18
- package/test/api/core/test-log-2025-11-10.log +0 -0
- package/test/api/core/test-log-2025-11-12.log +0 -117
- package/test/api/core/test-log-2025-11-27.log +0 -0
- package/test/api/core/test-log-2025-11-28.log +0 -17
- package/test/api/core/test-log-2025-12-09.log +0 -148
- package/test/api/core/test-log-2025-12-17.log +0 -58
- package/test/api/core/test-log-2026-01-29.log +0 -17
- package/test/api/map/test-log-2025-07-23.log +0 -1
- package/test/api/map/test-log-2025-11-28.log +0 -33
- package/test/api/map/test-log-2025-12-10.log +0 -2
- package/test/api/map/test-log-2026-01-06.log +0 -26
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="count > 0">
|
|
3
|
+
<KMenu v-if="menu"
|
|
4
|
+
icon="las la-bars" id="time-series-selector"
|
|
5
|
+
:content="actions"
|
|
6
|
+
action-renderer="item"
|
|
7
|
+
:dense="dense"
|
|
8
|
+
:badge="{ color: 'accent', label: count }"
|
|
9
|
+
/>
|
|
10
|
+
<KPanel v-else
|
|
11
|
+
id="time-series-selector"
|
|
12
|
+
:content="actions"
|
|
13
|
+
action-renderer="item"
|
|
14
|
+
:dense="dense"
|
|
15
|
+
direction="vertical"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import _ from 'lodash'
|
|
22
|
+
import { computed } from 'vue'
|
|
23
|
+
import { Store, composables as kCoreComposables } from '../../../../core/client/index.js'
|
|
24
|
+
|
|
25
|
+
// Props
|
|
26
|
+
defineProps({
|
|
27
|
+
dense: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
menu: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
// Data
|
|
38
|
+
const { CurrentActivityContext } = kCoreComposables.useCurrentActivity()
|
|
39
|
+
const { state } = CurrentActivityContext
|
|
40
|
+
|
|
41
|
+
// Computed
|
|
42
|
+
const actions = computed(() => {
|
|
43
|
+
const timeSeries = []
|
|
44
|
+
for (let i = 0; i < state.timeSeries.length; i++) {
|
|
45
|
+
const timeSerie = state.timeSeries[i]
|
|
46
|
+
// When using list display all available timeseries like tabs
|
|
47
|
+
// When using menu only those that are not yet visible
|
|
48
|
+
if (Store.get('layout.windows.top.gt.sm') || !timeSerie.visible) {
|
|
49
|
+
timeSeries.push(timeSerie)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return timeSeries.map(timeSerie => ({
|
|
53
|
+
id: timeSerie.id,
|
|
54
|
+
label: timeSerie.label,
|
|
55
|
+
color: timeSerie.visible ? 'primary' : 'grey-9',
|
|
56
|
+
handler: () => showTimeSerie(timeSerie.id)
|
|
57
|
+
}))
|
|
58
|
+
})
|
|
59
|
+
const count = computed(() => {
|
|
60
|
+
return actions.value.length
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
// Functions
|
|
64
|
+
function showTimeSerie (id) {
|
|
65
|
+
// Only one graph visible at a time if no pinning
|
|
66
|
+
// Otherwise only one in addition to the pinned one
|
|
67
|
+
// This is managed by pinning action that will hide once pinned
|
|
68
|
+
_.forEach(state.timeSeries, timeSerie => {
|
|
69
|
+
timeSerie.visible = (timeSerie.id === id) || timeSerie.pinned
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KPanel
|
|
3
|
+
id="time-series-toolbar"
|
|
4
|
+
:content="content"
|
|
5
|
+
:context="context"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
import { computed, inject } from 'vue'
|
|
11
|
+
import { Store } from '../../../../core/client/store.js'
|
|
12
|
+
import { useCurrentActivity } from '../../composables/activity.js'
|
|
13
|
+
|
|
14
|
+
const { CurrentActivityContext, centerOnSelection, hasProbedLocation, centerOnProbe } = useCurrentActivity()
|
|
15
|
+
const { state } = CurrentActivityContext
|
|
16
|
+
|
|
17
|
+
// Props
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
context: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => null
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
// Data
|
|
26
|
+
const widget = inject('widget')
|
|
27
|
+
|
|
28
|
+
// Computed
|
|
29
|
+
const context = computed(() => {
|
|
30
|
+
return props.context
|
|
31
|
+
})
|
|
32
|
+
const hasSingleSerie = computed(() => {
|
|
33
|
+
return state.timeSeries.length === 1
|
|
34
|
+
})
|
|
35
|
+
const content = computed(() => {
|
|
36
|
+
if (!widget.value) return []
|
|
37
|
+
return [{
|
|
38
|
+
id: 'time-series-selector',
|
|
39
|
+
component: 'KTimeSeriesSelector',
|
|
40
|
+
visible: () => !hasSingleSerie.value && Store.get('layout.windows.top.lt.md')
|
|
41
|
+
}, {
|
|
42
|
+
id: 'restore-time-series-zoom',
|
|
43
|
+
icon: 'las la-undo',
|
|
44
|
+
tooltip: 'KTimeSeries.RESTORE_ZOOM',
|
|
45
|
+
visible: widget.value.isZoomed,
|
|
46
|
+
handler: () => widget.value.onRestoreZoom()
|
|
47
|
+
}, {
|
|
48
|
+
id: 'absolute-time-range',
|
|
49
|
+
component: 'time/KAbsoluteTimeRange'
|
|
50
|
+
}, {
|
|
51
|
+
id: 'relative-time-ranges',
|
|
52
|
+
component: 'menu/KMenu',
|
|
53
|
+
icon: 'las la-history',
|
|
54
|
+
content: [{
|
|
55
|
+
component: 'time/KRelativeTimeRanges',
|
|
56
|
+
ranges: ['last-hour', 'last-2-hours', 'last-3-hours', 'last-6-hours',
|
|
57
|
+
'last-12-hours', 'last-day', 'last-2-days', 'last-3-days', 'last-week',
|
|
58
|
+
'next-12-hours', 'next-day', 'next-2-days', 'next-3-days']
|
|
59
|
+
}]
|
|
60
|
+
}, {
|
|
61
|
+
id: 'center-view',
|
|
62
|
+
icon: 'las la-eye',
|
|
63
|
+
tooltip: 'KTimeSeries.CENTER_ON',
|
|
64
|
+
handler: () => {
|
|
65
|
+
if (hasProbedLocation()) centerOnProbe()
|
|
66
|
+
else centerOnSelection()
|
|
67
|
+
}
|
|
68
|
+
}]
|
|
69
|
+
/* TODO: action previously available on KTimeSeries
|
|
70
|
+
{
|
|
71
|
+
id: 'run-options',
|
|
72
|
+
component: 'input/KOptionsChooser',
|
|
73
|
+
icon: 'las la-clock',
|
|
74
|
+
tooltip: 'KTimeSeries.RUN',
|
|
75
|
+
visible: 'hasRunTimes',
|
|
76
|
+
hideSelected: false,
|
|
77
|
+
options: ':runOptions',
|
|
78
|
+
on: { event: 'option-chosen', listener: 'onUpdateRun' }
|
|
79
|
+
}
|
|
80
|
+
*/
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
</script>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import { ref, computed } from 'vue'
|
|
3
3
|
import * as catalog from '../utils/utils.catalog.js'
|
|
4
|
-
import { getCatalogProjectQuery } from '../utils/utils.project.js'
|
|
5
4
|
import { api } from '../../../core/client/api.js'
|
|
6
5
|
|
|
7
6
|
export function useCatalog (options = {}) {
|
|
@@ -30,13 +29,10 @@ export function useCatalog (options = {}) {
|
|
|
30
29
|
|
|
31
30
|
// Functions
|
|
32
31
|
async function getLayers (filterQuery = {}) {
|
|
33
|
-
const query = Object.assign({},
|
|
34
|
-
options.project ? Object.assign(getCatalogProjectQuery(options.project), options.layers) : options.layers,
|
|
35
|
-
filterQuery)
|
|
36
32
|
layers.value = await catalog.getLayers({
|
|
37
|
-
query,
|
|
33
|
+
query: Object.assign({}, options.layers, filterQuery),
|
|
38
34
|
context: options.context,
|
|
39
|
-
|
|
35
|
+
project: options.project
|
|
40
36
|
})
|
|
41
37
|
return layers.value
|
|
42
38
|
}
|
|
@@ -44,7 +40,7 @@ export function useCatalog (options = {}) {
|
|
|
44
40
|
categories.value = await catalog.getCategories({
|
|
45
41
|
query: options.categories,
|
|
46
42
|
context: options.context,
|
|
47
|
-
|
|
43
|
+
project: options.project
|
|
48
44
|
})
|
|
49
45
|
return categories.value
|
|
50
46
|
}
|
|
@@ -52,15 +48,15 @@ export function useCatalog (options = {}) {
|
|
|
52
48
|
sublegends.value = await catalog.getSublegends({
|
|
53
49
|
query: options.sublegends,
|
|
54
50
|
context: options.context,
|
|
55
|
-
|
|
51
|
+
project: options.project
|
|
56
52
|
})
|
|
57
53
|
return sublegends.value
|
|
58
54
|
}
|
|
59
55
|
async function getViews () {
|
|
60
56
|
views.value = await catalog.getViews({
|
|
61
|
-
query: options.
|
|
57
|
+
query: options.views,
|
|
62
58
|
context: options.context,
|
|
63
|
-
|
|
59
|
+
project: options.project
|
|
64
60
|
})
|
|
65
61
|
return views.value
|
|
66
62
|
}
|
|
@@ -4,7 +4,9 @@ import bbox from '@turf/bbox'
|
|
|
4
4
|
import bboxPolygon from '@turf/bbox-polygon'
|
|
5
5
|
import { uid } from 'quasar'
|
|
6
6
|
import { unref, onBeforeMount, onBeforeUnmount } from 'vue'
|
|
7
|
-
import
|
|
7
|
+
import { getFeatureId } from '../utils/utils.js'
|
|
8
|
+
import * as features from '../utils/utils.features.js' // Named import to avoid conflict with similar function names
|
|
9
|
+
import { isLayerHighlightable } from '../utils/utils.layers.js'
|
|
8
10
|
import * as composables from '../../../core/client/composables/index.js'
|
|
9
11
|
|
|
10
12
|
export const HighlightsLayerName = uid()
|
|
@@ -58,13 +60,13 @@ export function useHighlight (name, options = {}) {
|
|
|
58
60
|
let id = `${name}`
|
|
59
61
|
if (layer) id += `-${_.kebabCase(layer.name)}`
|
|
60
62
|
if (feature) {
|
|
61
|
-
const featureId =
|
|
63
|
+
const featureId = getFeatureId(feature, layer)
|
|
62
64
|
if (featureId) id += `-${featureId}`
|
|
63
65
|
}
|
|
64
66
|
return id
|
|
65
67
|
}
|
|
66
68
|
function isHighlightFor (highlightId, layer, feature) {
|
|
67
|
-
return feature ? highlightId.includes(`-${
|
|
69
|
+
return feature ? highlightId.includes(`-${getFeatureId(feature, layer)}`) : highlightId.includes(`-${_.kebabCase(layer.name)}`)
|
|
68
70
|
}
|
|
69
71
|
function hasHighlight (feature, layer) {
|
|
70
72
|
return has(getHighlightId(feature, layer))
|
|
@@ -88,7 +90,7 @@ export function useHighlight (name, options = {}) {
|
|
|
88
90
|
highlightMode = mode
|
|
89
91
|
}
|
|
90
92
|
function highlight (feature, layer, selected = true) {
|
|
91
|
-
if (layer && (highlightMode === 'highlightable-layers') && !
|
|
93
|
+
if (layer && (highlightMode === 'highlightable-layers') && !isLayerHighlightable(layer)) return
|
|
92
94
|
const highlightId = getHighlightId(feature, layer)
|
|
93
95
|
// Define default highlight feature
|
|
94
96
|
const highlight = {
|
|
@@ -102,7 +104,7 @@ export function useHighlight (name, options = {}) {
|
|
|
102
104
|
// Assign style
|
|
103
105
|
if (selected) {
|
|
104
106
|
// Do not alter config object
|
|
105
|
-
const selectionStylePath = `engines.${activity.engine}.style.selection.${
|
|
107
|
+
const selectionStylePath = `engines.${activity.engine}.style.selection.${features.getFeatureStyleType(highlight)}`
|
|
106
108
|
let highlightStyle = _.cloneDeep(_.get(config, selectionStylePath, {}))
|
|
107
109
|
if (activity.is2D()) {
|
|
108
110
|
// adapt the size to the marker using feature style
|
|
@@ -120,8 +122,9 @@ export function useHighlight (name, options = {}) {
|
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
// If highlight size is based on a shape with a radius use it, otherwise go for size
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
// FIXME: Take care to templating, in this case for now we don't take it into account
|
|
126
|
+
if (_.isNumber(radius)) Object.assign(highlightStyle, { radius: radius + 0.5 * HighlightMargin })
|
|
127
|
+
else if (Array.isArray(size) && (size.length > 1) && _.isNumber(size[0]) && _.isNumber(size[1])) Object.assign(highlightStyle, { size: [size[0] + HighlightMargin, size[1] + HighlightMargin] })
|
|
125
128
|
|
|
126
129
|
Object.assign(highlight, { style: highlightStyle })
|
|
127
130
|
} else {
|
|
@@ -236,13 +239,13 @@ export function useHighlight (name, options = {}) {
|
|
|
236
239
|
})
|
|
237
240
|
}
|
|
238
241
|
function listenToFeaturesServiceEventsForLayer (layer) {
|
|
239
|
-
const listeners =
|
|
242
|
+
const listeners = features.listenToFeaturesServiceEventsForLayer(layer, {
|
|
240
243
|
all: onFeatureUpdated, removed: onFeatureRemoved
|
|
241
244
|
}, layerServiceEventListeners[layer._id])
|
|
242
245
|
if (listeners) layerServiceEventListeners[layer._id] = listeners
|
|
243
246
|
}
|
|
244
247
|
function unlistenToFeaturesServiceEventsForLayer (layer) {
|
|
245
|
-
|
|
248
|
+
features.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
|
|
246
249
|
delete layerServiceEventListeners[layer._id]
|
|
247
250
|
}
|
|
248
251
|
function listenToFeaturesServiceEventsForLayers () {
|
|
@@ -9,7 +9,8 @@ import intersects from '@turf/boolean-intersects'
|
|
|
9
9
|
import { featureEach } from '@turf/meta'
|
|
10
10
|
import { unref } from 'vue'
|
|
11
11
|
import * as composables from '../../../core/client/composables/index.js'
|
|
12
|
-
import
|
|
12
|
+
import { getFeatureId } from '../utils/utils.js'
|
|
13
|
+
import * as features from '../utils/utils.features.js' // Named import to avoid conflict with similar function names
|
|
13
14
|
import { convertPolygonStyleToLeafletPath } from '../leaflet/utils/index.js'
|
|
14
15
|
|
|
15
16
|
export function useSelection (name, options = {}) {
|
|
@@ -31,8 +32,8 @@ export function useSelection (name, options = {}) {
|
|
|
31
32
|
if (layer1 !== layer2) return false
|
|
32
33
|
// Then compare features
|
|
33
34
|
if (item1.feature && item2.feature) {
|
|
34
|
-
const id1 =
|
|
35
|
-
const id2 =
|
|
35
|
+
const id1 = getFeatureId(item1.feature, item1.layer)
|
|
36
|
+
const id2 = getFeatureId(item2.feature, item2.layer)
|
|
36
37
|
return id1 === id2
|
|
37
38
|
} else {
|
|
38
39
|
// If only one has a feature then it cannot be the same
|
|
@@ -158,8 +159,8 @@ export function useSelection (name, options = {}) {
|
|
|
158
159
|
for (let i = 0; i < items.length; i++) {
|
|
159
160
|
const item = items[i]
|
|
160
161
|
if (item.feature && item.layer && (item.layer.name === layer.name)) {
|
|
161
|
-
const selectedId =
|
|
162
|
-
const featureId =
|
|
162
|
+
const selectedId = getFeatureId(item.feature, item.layer)
|
|
163
|
+
const featureId = getFeatureId(feature, layer)
|
|
163
164
|
if (featureId === selectedId) return item
|
|
164
165
|
}
|
|
165
166
|
}
|
|
@@ -355,13 +356,13 @@ export function useSelection (name, options = {}) {
|
|
|
355
356
|
hiddenFeatures.forEach((item) => selection.unselectItem(item))
|
|
356
357
|
}
|
|
357
358
|
function listenToFeaturesServiceEventsForLayer (layer) {
|
|
358
|
-
const listeners =
|
|
359
|
+
const listeners = features.listenToFeaturesServiceEventsForLayer(layer, {
|
|
359
360
|
all: onFeatureUpdated, removed: onFeatureRemoved
|
|
360
361
|
}, layerServiceEventListeners[layer._id])
|
|
361
362
|
if (listeners) layerServiceEventListeners[layer._id] = listeners
|
|
362
363
|
}
|
|
363
364
|
function unlistenToFeaturesServiceEventsForLayer (layer) {
|
|
364
|
-
|
|
365
|
+
features.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
|
|
365
366
|
delete layerServiceEventListeners[layer._id]
|
|
366
367
|
}
|
|
367
368
|
function listenToFeaturesServiceEventsForLayers () {
|
|
@@ -58,8 +58,15 @@ export function useWeather (options = {}) {
|
|
|
58
58
|
if (variables && variables.length > 0) {
|
|
59
59
|
_.forOwn(fields, (value, key) => {
|
|
60
60
|
// Take care that weather fields are prefixed by 'properties.' because they target feature
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
let name = value.property.replace('properties.', '')
|
|
62
|
+
// Also weacast properties are postfixed by forecast level
|
|
63
|
+
if (activity.forecastLevel) name = name.replace(`-${activity.forecastLevel}`, '')
|
|
64
|
+
const variable = _.find(variables, { name })
|
|
65
|
+
// We allow variable name to be customized based on level information
|
|
66
|
+
if (variable) value.label = _.template(i18n.tie(variable.label))({
|
|
67
|
+
level: (activity ? activity.selectedLevel : null),
|
|
68
|
+
levelUnit: (activity && activity.selectableLevels ? activity.selectableLevels.unit : '')
|
|
69
|
+
})
|
|
63
70
|
})
|
|
64
71
|
}
|
|
65
72
|
return fields
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
1
2
|
import { Store, Events, utils } from '../../core/client/index.js'
|
|
2
3
|
import { errors } from '../common/index.js'
|
|
3
4
|
import { formatUserCoordinates } from './utils.js'
|
|
@@ -50,11 +51,12 @@ export const Geolocation = {
|
|
|
50
51
|
get altitudeAccuracy () {
|
|
51
52
|
return this.getAltitudeAccuracy()
|
|
52
53
|
},
|
|
53
|
-
async update () {
|
|
54
|
+
async update (params = {}) {
|
|
55
|
+
const refreshParams = _.merge({ timeout: 30000, enableHighAccuracy: true }, params)
|
|
54
56
|
let location = null
|
|
55
57
|
// Get the position
|
|
56
58
|
try {
|
|
57
|
-
location = await this.refresh()
|
|
59
|
+
location = await this.refresh(refreshParams)
|
|
58
60
|
Store.patch('geolocation', { location, error: undefined })
|
|
59
61
|
logger.debug('[KDK] Geolocation updated:', location)
|
|
60
62
|
} catch (error) {
|
|
@@ -78,13 +80,14 @@ export const Geolocation = {
|
|
|
78
80
|
Events.emit('error', Object.assign(geolocationError, {
|
|
79
81
|
// By default we only show geolocation errors, nothing if disabled by user
|
|
80
82
|
ignore: (code === error.PERMISSION_DENIED),
|
|
81
|
-
retryHandler: () => this.refresh()
|
|
83
|
+
retryHandler: () => this.refresh(refreshParams)
|
|
82
84
|
}))
|
|
83
85
|
logger.debug('[KDK] geolocation failed: ', error)
|
|
84
86
|
}
|
|
85
87
|
return location
|
|
86
88
|
},
|
|
87
|
-
async refresh () {
|
|
89
|
+
async refresh (params = {}) {
|
|
90
|
+
const refreshParams = _.merge({ timeout: 30000, enableHighAccuracy: true }, params)
|
|
88
91
|
this.positionPromise = utils.createQuerablePromise(new Promise((resolve, reject) => {
|
|
89
92
|
if (!window.navigator.geolocation) {
|
|
90
93
|
Events.emit('error', {
|
|
@@ -112,7 +115,7 @@ export const Geolocation = {
|
|
|
112
115
|
}
|
|
113
116
|
})
|
|
114
117
|
},
|
|
115
|
-
(error) => reject(error),
|
|
118
|
+
(error) => reject(error), refreshParams)
|
|
116
119
|
}))
|
|
117
120
|
return this.positionPromise
|
|
118
121
|
}
|
|
@@ -465,15 +465,17 @@
|
|
|
465
465
|
"OUTSIDE_MAP": "Indeterminated position"
|
|
466
466
|
},
|
|
467
467
|
"KTimeSeries": {
|
|
468
|
-
"LABEL": "Time
|
|
469
|
-
"
|
|
470
|
-
"
|
|
471
|
-
"
|
|
472
|
-
"
|
|
468
|
+
"LABEL": "Time series",
|
|
469
|
+
"CHART_SERIE_TOOLTIP": "View graph",
|
|
470
|
+
"TABLE_SERIE_TOOLTIP": "View table",
|
|
471
|
+
"LOGARITHMIC_SERIE_TOOLTIP": "Logarithmic scale",
|
|
472
|
+
"LINEAR_SERIE_TOOLTIP": "Linear scale",
|
|
473
|
+
"PIN_SERIE_TOOLTIP": "Pin graph",
|
|
474
|
+
"UNPIN_SERIE_TOOLTIP": "Unpin graph",
|
|
475
|
+
"EXPORT_SERIE_TOOLTIP": "Export data",
|
|
476
|
+
"RESTORE_ZOOM": "Restore previous view",
|
|
473
477
|
"RUN": "Forecast run",
|
|
474
|
-
"
|
|
475
|
-
"EXPORT_SERIES": "Export data",
|
|
476
|
-
"SERIES_EXPORT_FILE": "Series"
|
|
478
|
+
"CENTER_ON": "Center the view on the probed location"
|
|
477
479
|
},
|
|
478
480
|
"KStackableTimeSeries": {
|
|
479
481
|
"NO_DATA_AVAILABLE": "No data available"
|
|
@@ -466,14 +466,16 @@
|
|
|
466
466
|
},
|
|
467
467
|
"KTimeSeries": {
|
|
468
468
|
"LABEL": "Séries chronologiques",
|
|
469
|
-
"
|
|
470
|
-
"
|
|
471
|
-
"
|
|
472
|
-
"
|
|
469
|
+
"CHART_SERIE_TOOLTIP": "Voir le graphe",
|
|
470
|
+
"TABLE_SERIE_TOOLTIP": "Voir la table",
|
|
471
|
+
"LOGARITHMIC_SERIE_TOOLTIP": "Echelle logarithmique",
|
|
472
|
+
"LINEAR_SERIE_TOOLTIP": "Echelle linéaire",
|
|
473
|
+
"PIN_SERIE_TOOLTIP": "Epingler le graphe",
|
|
474
|
+
"UNPIN_SERIE_TOOLTIP": "Désépingler le graphe",
|
|
475
|
+
"EXPORT_SERIE_TOOLTIP": "Exporter les données",
|
|
476
|
+
"RESTORE_ZOOM": "Restaurer la vue précédente",
|
|
473
477
|
"RUN": "Réseau de prévision",
|
|
474
|
-
"
|
|
475
|
-
"EXPORT_SERIES": "Exporter les données",
|
|
476
|
-
"SERIES_EXPORT_FILE": "Series"
|
|
478
|
+
"CENTER_ON": "Centrer la vue sur la sonde"
|
|
477
479
|
},
|
|
478
480
|
"KStackableTimeSeries": {
|
|
479
481
|
"NO_DATA_AVAILABLE": "Aucune donnée disponible"
|
|
@@ -10,6 +10,8 @@ import { getFeatureId } from '../utils.js'
|
|
|
10
10
|
const TiledFeatureLayer = L.GridLayer.extend({
|
|
11
11
|
initialize (options) {
|
|
12
12
|
this.enableDebug = _.get(options, 'enableDebug', false)
|
|
13
|
+
this.enableMergeRequests = _.get(options, 'enableMergeRequests', true)
|
|
14
|
+
|
|
13
15
|
// this.enableDebug = true
|
|
14
16
|
L.GridLayer.prototype.initialize.call(this, options)
|
|
15
17
|
|
|
@@ -168,98 +170,99 @@ const TiledFeatureLayer = L.GridLayer.extend({
|
|
|
168
170
|
mergeRequests (tiles) {
|
|
169
171
|
const requests = []
|
|
170
172
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
if (this.enableMergeRequests) {
|
|
174
|
+
// Try to merge tiles vertically, then horizontally
|
|
175
|
+
const sortedTiles = tiles.sort((a, b) => {
|
|
176
|
+
if (a.coords.x === b.coords.x) {
|
|
177
|
+
return a.coords.y < b.coords.y ? -1 : a.coords.y !== b.coords.y ? 1 : 0
|
|
178
|
+
}
|
|
179
|
+
return a.coords.x < b.coords.x ? -1 : 1
|
|
180
|
+
})
|
|
178
181
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
182
|
+
if (sortedTiles.length) {
|
|
183
|
+
const z = sortedTiles[0].coords.z
|
|
184
|
+
const vrequests = []
|
|
185
|
+
sortedTiles.forEach((tile) => {
|
|
186
|
+
let newRequest = true
|
|
187
|
+
if (vrequests.length) {
|
|
188
|
+
const r = vrequests[vrequests.length - 1]
|
|
189
|
+
if (tile.coords.x === r.x) {
|
|
190
|
+
if (tile.coords.y === r.maxy + 1) {
|
|
191
|
+
r.tiles.push(tile)
|
|
192
|
+
r.maxy = tile.coords.y
|
|
193
|
+
newRequest = false
|
|
194
|
+
}
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
})
|
|
197
|
+
if (newRequest) {
|
|
198
|
+
vrequests.push({
|
|
199
|
+
x: tile.coords.x,
|
|
200
|
+
miny: tile.coords.y,
|
|
201
|
+
maxy: tile.coords.y,
|
|
202
|
+
tiles: [tile]
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
})
|
|
203
206
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
// Now try to merge horizontally adjacent vertical requests
|
|
208
|
+
vrequests.forEach((v) => {
|
|
209
|
+
let newRequest = true
|
|
210
|
+
if (requests.length) {
|
|
211
|
+
const h = requests[requests.length - 1]
|
|
212
|
+
if (v.miny === h.miny && v.maxy === h.maxy && v.x === h.maxx + 1) {
|
|
213
|
+
h.tiles.push(...v.tiles)
|
|
214
|
+
h.maxx = v.x
|
|
215
|
+
newRequest = false
|
|
216
|
+
}
|
|
213
217
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
})
|
|
218
|
+
if (newRequest) {
|
|
219
|
+
requests.push({
|
|
220
|
+
minx: v.x,
|
|
221
|
+
maxx: v.x,
|
|
222
|
+
miny: v.miny,
|
|
223
|
+
maxy: v.maxy,
|
|
224
|
+
tiles: [].concat(v.tiles)
|
|
225
|
+
})
|
|
226
|
+
}
|
|
227
|
+
})
|
|
225
228
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
229
|
+
// Compute final query
|
|
230
|
+
requests.forEach((r) => {
|
|
231
|
+
const minp = L.point(r.minx, r.miny); const maxp = L.point(r.maxx, r.maxy)
|
|
232
|
+
minp.z = maxp.z = z
|
|
233
|
+
const bounds = this._tileCoordsToBounds(minp)
|
|
234
|
+
bounds.extend(this._tileCoordsToBounds(maxp))
|
|
235
|
+
r.query = {
|
|
236
|
+
south: bounds.getSouth(),
|
|
237
|
+
north: bounds.getNorth(),
|
|
238
|
+
west: bounds.getWest(),
|
|
239
|
+
east: bounds.getEast()
|
|
240
|
+
}
|
|
241
|
+
})
|
|
239
242
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
if (this.enableDebug) {
|
|
244
|
+
let numTilesR = 0
|
|
245
|
+
requests.forEach((r) => { numTilesR += r.tiles.length })
|
|
246
|
+
if (numTilesR !== tiles.length) {
|
|
247
|
+
logger.debug('TiledFeatureLayer: less requested tiles than expected !')
|
|
248
|
+
}
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
} else {
|
|
252
|
+
// Request merging disabled => one request per tile
|
|
253
|
+
tiles.forEach((tile) => {
|
|
254
|
+
const r = {
|
|
255
|
+
tiles: [tile],
|
|
256
|
+
query: {
|
|
257
|
+
south: tile.bbox.getSouth(),
|
|
258
|
+
north: tile.bbox.getNorth(),
|
|
259
|
+
west: tile.bbox.getWest(),
|
|
260
|
+
east: tile.bbox.getEast()
|
|
261
|
+
}
|
|
258
262
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
*/
|
|
263
|
+
requests.push(r)
|
|
264
|
+
})
|
|
265
|
+
}
|
|
263
266
|
|
|
264
267
|
if (this.enableDebug && tiles.length) {
|
|
265
268
|
logger.debug(`TiledFeatureLayer: ${tiles.length} requests reduced to ${requests.length}`)
|