@kalisio/kdk 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yaml +35 -6
- package/client.globe.js +8 -0
- package/client.js +8 -0
- package/client.map.js +8 -0
- package/core/api/hooks/hooks.push.js +3 -2
- package/core/api/hooks/hooks.tags.js +56 -0
- package/core/api/models/tags.model.mongodb.js +8 -0
- package/core/api/services/index.js +33 -2
- package/core/api/services/tags/tags.hooks.js +47 -0
- package/core/client/api.js +5 -5
- package/core/client/components/KActivity.vue +3 -2
- package/core/client/components/KChip.vue +2 -2
- package/core/client/components/KEditor.vue +3 -1
- package/core/client/components/KFollower.vue +4 -4
- package/core/client/components/KStore.vue +1 -1
- package/core/client/components/KTab.vue +20 -7
- package/core/client/components/account/KProfile.vue +9 -25
- package/core/client/components/action/KAction.vue +10 -10
- package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
- package/core/client/components/app/KHome.vue +3 -2
- package/core/client/components/collection/KFilter.vue +5 -4
- package/core/client/components/collection/KGrid.vue +5 -1
- package/core/client/components/collection/KItemsFilter.vue +47 -0
- package/core/client/components/collection/KItemsSorter.vue +42 -0
- package/core/client/components/collection/KScrollDown.vue +2 -2
- package/core/client/components/collection/KSearchFilterControl.vue +3 -2
- package/core/client/components/collection/KSorter.vue +33 -37
- package/core/client/components/collection/KTagsFilterControl.vue +14 -40
- package/core/client/components/collection/KTagsFilterView.vue +10 -45
- package/core/client/components/collection/KTimeFilterControl.vue +6 -7
- package/core/client/components/collection/KTimeFilterView.vue +13 -22
- package/core/client/components/collection/KTimeLine.vue +18 -9
- package/core/client/components/form/KColorField.vue +13 -6
- package/core/client/components/form/KColorScaleField.vue +7 -12
- package/core/client/components/form/KFileField.vue +118 -89
- package/core/client/components/form/KForm.vue +30 -18
- package/core/client/components/form/KIconField.vue +4 -1
- package/core/client/components/form/KNumberField.vue +9 -2
- package/core/client/components/form/KSelectField.vue +1 -4
- package/core/client/components/form/KTagField.vue +229 -0
- package/core/client/components/form/KTextField.vue +4 -0
- package/core/client/components/form/KTextareaField.vue +3 -1
- package/core/client/components/input/KShapePicker.vue +5 -5
- package/core/client/components/layout/KFab.vue +32 -20
- package/core/client/components/layout/KPage.vue +11 -6
- package/core/client/components/layout/KWindow.vue +5 -0
- package/core/client/components/media/index.js +2 -6
- package/core/client/components/menu/KMenu.vue +12 -10
- package/core/client/components/menu/KSubMenu.vue +12 -12
- package/core/client/components/messages/KMessageCard.vue +13 -12
- package/core/client/components/messages/KMessageComposer.vue +13 -9
- package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
- package/core/client/components/tags/KTagFilter.vue +99 -0
- package/core/client/components/tags/KTagItem.vue +65 -0
- package/core/client/components/tags/KTagManager.vue +198 -0
- package/core/client/components/tags/KTagSelection.vue +82 -0
- package/core/client/components/time/KDate.vue +3 -17
- package/core/client/components/time/KDateTime.vue +1 -1
- package/core/client/components/time/KTime.vue +0 -4
- package/core/client/composables/collection-filter.js +41 -2
- package/core/client/composables/collection.js +3 -3
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/pwa.js +13 -0
- package/core/client/composables/session.js +7 -8
- package/core/client/composables/user.js +36 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-drop-file.js +174 -0
- package/core/client/document.js +2 -1
- package/core/client/exporter.js +17 -3
- package/core/client/i18n/core_en.json +34 -7
- package/core/client/i18n/core_fr.json +36 -9
- package/core/client/i18n.js +26 -11
- package/core/client/layout.js +5 -5
- package/core/client/mixins/mixin.base-activity.js +8 -5
- package/core/client/mixins/mixin.base-editor.js +2 -1
- package/core/client/mixins/mixin.base-field.js +3 -2
- package/core/client/mixins/mixin.base-item.js +12 -10
- package/core/client/mixins/mixin.service.js +3 -1
- package/core/client/platform.js +0 -3
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/utils/index.js +2 -0
- package/core/client/utils/utils.collection.js +6 -6
- package/core/client/utils/utils.colors.js +46 -19
- package/core/client/utils/utils.files.js +19 -0
- package/core/client/utils/utils.locale.js +13 -17
- package/core/client/utils/utils.services.js +27 -0
- package/core/client/utils/utils.shapes.js +2 -2
- package/core/client/utils/utils.tags.js +17 -0
- package/core/client/utils/utils.tours.js +31 -0
- package/core/common/permissions.js +3 -0
- package/core/common/schemas/tags.update.json +35 -0
- package/core/common/schemas/users.update-profile.json +1 -1
- package/core/common/utils.js +5 -5
- package/extras/configs/panes.top.js +11 -0
- package/extras/configs/stickies.js +1 -1
- package/extras/configs/widgets.left.js +13 -1
- package/extras/libs/jsts.min.js +8 -0
- package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
- package/extras/tests/core/api.mjs +114 -0
- package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
- package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
- package/extras/tests/core/index.mjs +9 -0
- package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
- package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
- package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
- package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
- package/extras/tests/index.mjs +4 -0
- package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
- package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
- package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
- package/extras/tests/map/index.mjs +5 -0
- package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
- package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
- package/extras/tours/fab.js +36 -0
- package/extras/tours/layout.js +49 -0
- package/extras/tours/pane.left.js +78 -0
- package/extras/tours/pane.right.js +145 -0
- package/extras/tours/pane.top.js +239 -0
- package/map/api/config/layers.cjs +28 -13
- package/map/api/hooks/hooks.query.js +12 -7
- package/map/api/models/catalog.model.mongodb.js +17 -6
- package/map/api/services/catalog/catalog.hooks.js +1 -1
- package/map/api/services/index.js +18 -1
- package/map/api/services/styles/styles.hooks.js +1 -1
- package/map/client/cesium/utils/utils.cesium.js +25 -65
- package/map/client/cesium/utils/utils.features.js +1 -0
- package/map/client/cesium/utils/utils.geojson.js +1 -0
- package/map/client/cesium/utils/utils.style.js +7 -6
- package/map/client/components/KFeatureEditor.vue +3 -3
- package/map/client/components/KFeaturesChart.vue +4 -4
- package/map/client/components/KFeaturesFilterEditor.vue +19 -13
- package/map/client/components/KFeaturesFilterManager.vue +7 -4
- package/map/client/components/KFeaturesTable.vue +2 -2
- package/map/client/components/KLayerEditor.vue +10 -6
- package/map/client/components/KMeasureTool.vue +2 -1
- package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/map/client/components/catalog/KCategoryItem.vue +15 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +3 -2
- package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
- package/map/client/components/catalog/KImportLayer.vue +6 -3
- package/map/client/components/catalog/KLayerCategories.vue +8 -6
- package/map/client/components/catalog/KLayerItem.vue +12 -2
- package/map/client/components/catalog/KLayersList.vue +180 -0
- package/map/client/components/catalog/KLayersPanel.vue +146 -36
- package/map/client/components/catalog/KLayersSelector.vue +96 -48
- package/map/client/components/catalog/KProjectEditor.vue +0 -9
- package/map/client/components/catalog/KProjectSelector.vue +3 -2
- package/map/client/components/catalog/KProjectsPanel.vue +23 -8
- package/map/client/components/catalog/KViewsPanel.vue +18 -8
- package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/map/client/components/form/KDirectionField.vue +3 -6
- package/map/client/components/form/KLayerCategoryField.vue +2 -2
- package/map/client/components/form/KOwsServiceField.vue +25 -24
- package/map/client/components/form/KSelectLayersField.vue +4 -4
- package/map/client/components/form/KSelectViewsField.vue +4 -4
- package/map/client/components/legend/KLayerLegend.vue +11 -2
- package/map/client/components/legend/KLegend.vue +44 -51
- package/map/client/components/location/KLocationCardSection.vue +6 -7
- package/map/client/components/location/KLocationMap.vue +23 -13
- package/map/client/components/stickies/KLevelSlider.vue +10 -8
- package/map/client/components/stickies/KPosition.vue +5 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +72 -9
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +126 -60
- package/map/client/components/styles/KStylePreview.vue +9 -25
- package/map/client/components/styles/KStylePreviewItem.vue +22 -1
- package/map/client/components/tools/KSearchTool.vue +1 -1
- package/map/client/components/widget/KElevationProfile.vue +20 -17
- package/map/client/components/widget/KInformationBox.vue +5 -5
- package/map/client/components/widget/KMapillaryViewer.vue +2 -1
- package/map/client/components/widget/KTimeSeries.vue +11 -9
- package/map/client/composables/highlight.js +5 -1
- package/map/client/globe.js +2 -0
- package/map/client/i18n/map_en.json +33 -8
- package/map/client/i18n/map_fr.json +33 -8
- package/map/client/leaflet/GradientPath.js +61 -24
- package/map/client/leaflet/ShapeMarker.js +12 -5
- package/map/client/leaflet/TiledMeshLayer.js +3 -3
- package/map/client/leaflet/utils/utils.geojson.js +66 -8
- package/map/client/leaflet/utils/utils.style.js +14 -15
- package/map/client/mixins/globe/mixin.base-globe.js +181 -34
- package/map/client/mixins/globe/mixin.file-layers.js +3 -0
- package/map/client/mixins/globe/mixin.geojson-layers.js +190 -36
- package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
- package/map/client/mixins/globe/mixin.style.js +23 -1
- package/map/client/mixins/globe/mixin.tooltip.js +14 -2
- package/map/client/mixins/map/mixin.base-map.js +146 -58
- package/map/client/mixins/map/mixin.edit-layers.js +18 -15
- package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
- package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
- package/map/client/mixins/map/mixin.map-activity.js +6 -1
- package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
- package/map/client/mixins/mixin.activity.js +203 -48
- package/map/client/mixins/mixin.context.js +11 -11
- package/map/client/mixins/mixin.feature-service.js +11 -9
- package/map/client/mixins/mixin.weacast.js +5 -3
- package/map/client/readers/reader.geojson.js +3 -1
- package/map/client/utils/utils.capture.js +3 -3
- package/map/client/utils/utils.catalog.js +9 -5
- package/map/client/utils/utils.features.js +120 -54
- package/map/client/utils/utils.js +25 -10
- package/map/client/utils/utils.layers.js +148 -26
- package/map/client/utils/utils.location.js +26 -9
- package/map/client/utils/utils.schema.js +2 -1
- package/map/client/utils/utils.style.js +53 -9
- package/map/common/geotiff-grid-source.js +1 -3
- package/map/common/opendap-utils.js +0 -1
- package/map/common/tms-utils.js +0 -1
- package/map/common/wcs-utils.js +0 -1
- package/map/common/wfs-utils.js +0 -1
- package/map/common/wms-utils.js +7 -1
- package/map/common/wmts-utils.js +0 -1
- package/package.json +12 -12
- package/scripts/init_runner.sh +3 -3
- package/scripts/kash/CHANGELOG.md +27 -0
- package/scripts/kash/kash.sh +556 -237
- package/scripts/kash/scripts/run_tests.sh +44 -5
- package/scripts/setup_workspace.sh +23 -13
- package/test/api/core/config/default.cjs +2 -1
- package/test/api/core/push.test.js +1 -1
- package/test/api/core/tags.test.js +62 -0
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/config/layers.json +9 -0
- package/test/api/map/data/openradiation.json +13811 -0
- package/test/api/map/grid-sources.test.js +1 -3
- package/test/api/map/index.test.js +60 -1
- package/test/api/map/style.test.js +30 -1
- package/test.api.js +1 -1
- package/vite/App.vue +18 -0
- package/vite/AppWithGlobe.vue +84 -0
- package/vite/GlobeActivity.vue +58 -0
- package/vite/MapActivity.vue +63 -0
- package/vite/MapActivityWithGlobe.vue +63 -0
- package/vite/README.md +169 -0
- package/vite/config.js +221 -0
- package/vite/index_with_globe.html +50 -0
- package/vite/index_with_map.html +50 -0
- package/vite/package.json +173 -0
- package/vite/quasar.variables.scss +17 -0
- package/vite/vite.config.js +166 -0
- package/vite/yarn.lock +11641 -0
- package/core/client/components/media/KImageViewer.vue +0 -68
- package/core/client/components/media/KMarkdownViewer.vue +0 -55
- package/core/client/components/media/KMediaBrowser.vue +0 -301
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/core/api/application.js.html +0 -1870
- package/coverage/core/api/authentication.js.html +0 -874
- package/coverage/core/api/db.js.html +0 -793
- package/coverage/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/core/api/hooks/index.html +0 -266
- package/coverage/core/api/hooks/index.js.html +0 -115
- package/coverage/core/api/index.html +0 -176
- package/coverage/core/api/index.js.html +0 -148
- package/coverage/core/api/marshall.js.html +0 -448
- package/coverage/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/core/api/models/index.html +0 -131
- package/coverage/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/core/api/services/account/account.service.js.html +0 -436
- package/coverage/core/api/services/account/index.html +0 -131
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/core/api/services/authorisations/index.html +0 -131
- package/coverage/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/core/api/services/databases/index.html +0 -131
- package/coverage/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/core/api/services/groups/index.html +0 -116
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/core/api/services/import-export/index.html +0 -131
- package/coverage/core/api/services/index.html +0 -116
- package/coverage/core/api/services/index.js.html +0 -520
- package/coverage/core/api/services/mailer/index.html +0 -131
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/core/api/services/messages/index.html +0 -116
- package/coverage/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/core/api/services/organisations/index.html +0 -131
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/services/push/index.html +0 -131
- package/coverage/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/core/api/services/push/push.service.js.html +0 -121
- package/coverage/core/api/services/storage/index.html +0 -131
- package/coverage/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/core/api/services/tags/index.html +0 -116
- package/coverage/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/core/api/services/users/index.html +0 -131
- package/coverage/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/core/common/errors.js.html +0 -88
- package/coverage/core/common/index.html +0 -191
- package/coverage/core/common/index.js.html +0 -115
- package/coverage/core/common/permissions.js.html +0 -733
- package/coverage/core/common/schema.js.html +0 -190
- package/coverage/core/common/utils.js.html +0 -226
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -461
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/core/api/application.js.html +0 -1870
- package/coverage/lcov-report/core/api/authentication.js.html +0 -874
- package/coverage/lcov-report/core/api/db.js.html +0 -793
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/lcov-report/core/api/hooks/index.html +0 -266
- package/coverage/lcov-report/core/api/hooks/index.js.html +0 -115
- package/coverage/lcov-report/core/api/index.html +0 -176
- package/coverage/lcov-report/core/api/index.js.html +0 -148
- package/coverage/lcov-report/core/api/marshall.js.html +0 -448
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/core/api/models/index.html +0 -131
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +0 -436
- package/coverage/lcov-report/core/api/services/account/index.html +0 -131
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/lcov-report/core/api/services/authorisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/lcov-report/core/api/services/databases/index.html +0 -131
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/groups/index.html +0 -116
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/import-export/index.html +0 -131
- package/coverage/lcov-report/core/api/services/index.html +0 -116
- package/coverage/lcov-report/core/api/services/index.js.html +0 -520
- package/coverage/lcov-report/core/api/services/mailer/index.html +0 -131
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/messages/index.html +0 -116
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/lcov-report/core/api/services/organisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/services/push/index.html +0 -131
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +0 -121
- package/coverage/lcov-report/core/api/services/storage/index.html +0 -131
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/lcov-report/core/api/services/tags/index.html +0 -116
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/users/index.html +0 -131
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/common/errors.js.html +0 -88
- package/coverage/lcov-report/core/common/index.html +0 -191
- package/coverage/lcov-report/core/common/index.js.html +0 -115
- package/coverage/lcov-report/core/common/permissions.js.html +0 -733
- package/coverage/lcov-report/core/common/schema.js.html +0 -190
- package/coverage/lcov-report/core/common/utils.js.html +0 -226
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -461
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/lcov-report/map/api/hooks/index.html +0 -161
- package/coverage/lcov-report/map/api/hooks/index.js.html +0 -94
- package/coverage/lcov-report/map/api/index.html +0 -131
- package/coverage/lcov-report/map/api/index.js.html +0 -139
- package/coverage/lcov-report/map/api/marshall.js.html +0 -178
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/lcov-report/map/api/models/index.html +0 -161
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/lcov-report/map/api/services/alerts/index.html +0 -131
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/lcov-report/map/api/services/catalog/index.html +0 -116
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/lcov-report/map/api/services/daptiles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +0 -544
- package/coverage/lcov-report/map/api/services/features/index.html +0 -131
- package/coverage/lcov-report/map/api/services/index.html +0 -116
- package/coverage/lcov-report/map/api/services/index.js.html +0 -946
- package/coverage/lcov-report/map/api/services/projects/index.html +0 -116
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/lcov-report/map/common/errors.js.html +0 -94
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/lcov-report/map/common/grid.js.html +0 -1612
- package/coverage/lcov-report/map/common/index.html +0 -371
- package/coverage/lcov-report/map/common/index.js.html +0 -172
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/lcov-report/map/common/moment-utils.js.html +0 -157
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/lcov-report/map/common/opendap-utils.js.html +0 -826
- package/coverage/lcov-report/map/common/permissions.js.html +0 -124
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/lcov-report/map/common/tms-utils.js.html +0 -274
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/lcov-report/map/common/wcs-utils.js.html +0 -586
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/lcov-report/map/common/wfs-utils.js.html +0 -574
- package/coverage/lcov-report/map/common/wms-utils.js.html +0 -451
- package/coverage/lcov-report/map/common/wmts-utils.js.html +0 -547
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -10392
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/map/api/hooks/index.html +0 -161
- package/coverage/map/api/hooks/index.js.html +0 -94
- package/coverage/map/api/index.html +0 -131
- package/coverage/map/api/index.js.html +0 -139
- package/coverage/map/api/marshall.js.html +0 -178
- package/coverage/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/map/api/models/index.html +0 -161
- package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/map/api/services/alerts/index.html +0 -131
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/map/api/services/catalog/index.html +0 -116
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/map/api/services/daptiles/index.html +0 -116
- package/coverage/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/map/api/services/features/features.service.js.html +0 -544
- package/coverage/map/api/services/features/index.html +0 -131
- package/coverage/map/api/services/index.html +0 -116
- package/coverage/map/api/services/index.js.html +0 -946
- package/coverage/map/api/services/projects/index.html +0 -116
- package/coverage/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/map/common/errors.js.html +0 -94
- package/coverage/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/map/common/grid.js.html +0 -1612
- package/coverage/map/common/index.html +0 -371
- package/coverage/map/common/index.js.html +0 -172
- package/coverage/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/map/common/moment-utils.js.html +0 -157
- package/coverage/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/map/common/opendap-utils.js.html +0 -826
- package/coverage/map/common/permissions.js.html +0 -124
- package/coverage/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/map/common/tms-utils.js.html +0 -274
- package/coverage/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/map/common/wcs-utils.js.html +0 -586
- package/coverage/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/map/common/wfs-utils.js.html +0 -574
- package/coverage/map/common/wms-utils.js.html +0 -451
- package/coverage/map/common/wmts-utils.js.html +0 -547
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
- package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
- package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
- package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
- package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
- package/extras/tours/core/account-profile.js +0 -32
- package/extras/tours/core/account.js +0 -143
- package/extras/tours/core/add-member.js +0 -75
- package/extras/tours/core/add-tag.js +0 -13
- package/extras/tours/core/create-group.js +0 -19
- package/extras/tours/core/create-organisation.js +0 -19
- package/extras/tours/core/create-tag.js +0 -26
- package/extras/tours/core/edit-member-role.js +0 -13
- package/extras/tours/core/groups.js +0 -65
- package/extras/tours/core/join-group.js +0 -13
- package/extras/tours/core/login.js +0 -41
- package/extras/tours/core/members.js +0 -108
- package/extras/tours/core/register.js +0 -61
- package/extras/tours/core/send-reset-password.js +0 -14
- package/extras/tours/core/tags.js +0 -65
- package/extras/tours/map/catalog-panel.js +0 -112
- package/extras/tours/map/fab.js +0 -26
- package/extras/tours/map/navigation-bar.js +0 -187
- package/extras/tours/map/side-nav.js +0 -36
- package/test/api/core/test-log-2025-05-26.log +0 -22
- package/test/api/map/test-log-2025-05-26.log +0 -12
- package/test/client/core/api.js +0 -361
- package/test/client/core/index.js +0 -9
- package/test/client/index.js +0 -4
- package/test/client/map/index.js +0 -5
- package/test.client.js +0 -1
- /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
- /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
- /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
- /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
- /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
- /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
- /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
- /package/extras/tours/{map/timeline.js → pane.bottom.js} +0 -0
|
@@ -1,44 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<q-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:style="style[type]"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
<q-expansion-item
|
|
3
|
+
ref="expansionItemRef"
|
|
4
|
+
v-model="isOpened"
|
|
5
|
+
group="editor"
|
|
6
|
+
header-class="bg-grey-2"
|
|
7
|
+
:dense="dense"
|
|
8
|
+
:disable="!isEnabled"
|
|
9
|
+
:class="{ 'k-disabled': !isEnabled }"
|
|
10
|
+
>
|
|
11
|
+
<template v-slot:header>
|
|
12
|
+
<q-item-section v-if="canBeDisabled" class="col-auto">
|
|
13
|
+
<q-checkbox
|
|
14
|
+
v-model="isEnabled"
|
|
15
|
+
size="xs"
|
|
16
|
+
/>
|
|
17
|
+
</q-item-section>
|
|
18
|
+
<q-item-section v-if="label">
|
|
19
|
+
{{ $t(label) }}
|
|
20
|
+
</q-item-section>
|
|
21
|
+
<q-item-section v-if="!isOpened && isEnabled" side>
|
|
22
|
+
<KStylePreview :style="style[type]" :type="type" />
|
|
23
|
+
</q-item-section>
|
|
24
|
+
</template>
|
|
25
|
+
<q-list v-hover="{ enter: onEnter }">
|
|
26
|
+
<slot />
|
|
27
|
+
</q-list>
|
|
28
|
+
<KStyleTip
|
|
29
|
+
v-model="showTip"
|
|
30
|
+
:style="style[type]"
|
|
31
|
+
:type="type"
|
|
32
|
+
target="#style-editor"
|
|
33
|
+
anchor="top right"
|
|
34
|
+
self="center middle"
|
|
35
|
+
no-parent-event
|
|
36
|
+
@update:model-value="onUpdated"
|
|
37
|
+
/>
|
|
38
|
+
</q-expansion-item>
|
|
33
39
|
</template>
|
|
34
40
|
|
|
35
41
|
<script setup>
|
|
36
|
-
import { ref, watch } from 'vue'
|
|
42
|
+
import { ref, watch, onMounted } from 'vue'
|
|
37
43
|
import KStylePreview from './KStylePreview.vue'
|
|
38
44
|
import KStyleTip from './KStyleTip.vue'
|
|
39
45
|
|
|
40
46
|
// Props
|
|
41
|
-
defineProps({
|
|
47
|
+
const props = defineProps({
|
|
48
|
+
modelValue: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
42
52
|
label: {
|
|
43
53
|
type: String,
|
|
44
54
|
required: true
|
|
@@ -57,10 +67,19 @@ defineProps({
|
|
|
57
67
|
dense: {
|
|
58
68
|
type: Boolean,
|
|
59
69
|
default: false
|
|
70
|
+
},
|
|
71
|
+
canBeDisabled: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
60
74
|
}
|
|
61
75
|
})
|
|
62
76
|
|
|
77
|
+
// Emits
|
|
78
|
+
const emit = defineEmits(['update:model-value'])
|
|
79
|
+
|
|
63
80
|
// Data
|
|
81
|
+
const expansionItemRef = ref(null)
|
|
82
|
+
const isEnabled = ref(props.modelValue)
|
|
64
83
|
const isOpened = ref(false)
|
|
65
84
|
const showTip = ref(false)
|
|
66
85
|
|
|
@@ -68,6 +87,14 @@ const showTip = ref(false)
|
|
|
68
87
|
watch(isOpened, (value) => {
|
|
69
88
|
setTimeout(() => { showTip.value = value }, 500)
|
|
70
89
|
})
|
|
90
|
+
watch(() => props.modelValue, (value) => {
|
|
91
|
+
isEnabled.value = value
|
|
92
|
+
if (!value) isOpened.value = false
|
|
93
|
+
})
|
|
94
|
+
watch(isEnabled, (value) => {
|
|
95
|
+
emit('update:model-value', value)
|
|
96
|
+
removeQuasarDisabledClass()
|
|
97
|
+
})
|
|
71
98
|
|
|
72
99
|
// Functions
|
|
73
100
|
function onEnter () {
|
|
@@ -76,4 +103,26 @@ function onEnter () {
|
|
|
76
103
|
function onUpdated (value) {
|
|
77
104
|
if (showTip.value !== value) showTip.value = value
|
|
78
105
|
}
|
|
106
|
+
// Quasar "disabled" css class apply a "not-allowed" cursor, but we don't want that on the checkbox
|
|
107
|
+
// So we need to remove this class and apply a custom class that mimic the style, but without the cursor property
|
|
108
|
+
function removeQuasarDisabledClass () {
|
|
109
|
+
if (isEnabled.value) return
|
|
110
|
+
if (expansionItemRef.value) {
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
const target = expansionItemRef.value.$el.querySelector('.disabled')
|
|
113
|
+
if (target) target.classList.remove('disabled')
|
|
114
|
+
}, 100)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
onMounted(() => {
|
|
119
|
+
removeQuasarDisabledClass()
|
|
120
|
+
})
|
|
79
121
|
</script>
|
|
122
|
+
|
|
123
|
+
<style lang="scss">
|
|
124
|
+
.k-disabled {
|
|
125
|
+
opacity: 0.6 !important;
|
|
126
|
+
outline: 0 !important;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="column">
|
|
3
3
|
<div id="style-manager-header"
|
|
4
4
|
v-if="title || (toolbar && toolbar.length)"
|
|
5
|
-
class="
|
|
5
|
+
class="full-width"
|
|
6
6
|
>
|
|
7
7
|
<div v-if="title" class="ellipsis text-h6">
|
|
8
8
|
{{ $tie(title) }}
|
|
@@ -10,54 +10,28 @@
|
|
|
10
10
|
<KPanel
|
|
11
11
|
id="style-manager-toolbar"
|
|
12
12
|
:content="toolbar"
|
|
13
|
+
class="q-pr-sm no-wrap"
|
|
13
14
|
/>
|
|
14
|
-
<
|
|
15
|
+
<div class="row justify-center q-mt-xs">
|
|
16
|
+
<KTagSelection :selection="tagsSelection" @selection-changed="onTagSelectionChanged" />
|
|
17
|
+
</div>
|
|
15
18
|
</div>
|
|
16
19
|
<div id="style-manager-content">
|
|
17
20
|
<q-tab-panels v-model="viewMode" animated>
|
|
18
|
-
<q-tab-panel name="list">
|
|
21
|
+
<q-tab-panel name="list" class="q-pa-none">
|
|
19
22
|
<KGrid
|
|
20
23
|
service="styles"
|
|
21
24
|
:append-items="true"
|
|
22
25
|
:base-query="baseQuery"
|
|
23
26
|
:filter-query="filterQuery"
|
|
27
|
+
:nb-items-per-page="24"
|
|
28
|
+
:renderer="renderer"
|
|
24
29
|
class="fit"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
actions: [
|
|
31
|
-
{
|
|
32
|
-
id: 'apply-to-layer',
|
|
33
|
-
component: 'menu/KMenu',
|
|
34
|
-
icon: 'las la-layer-group',
|
|
35
|
-
tooltip: 'KStyleManager.APPLY_TO_LAYER',
|
|
36
|
-
actionRenderer: 'item',
|
|
37
|
-
content: layerMenuContent
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: 'apply-to-selection',
|
|
41
|
-
icon: 'las la-object-group',
|
|
42
|
-
tooltip: 'KStyleManager.APPLY_TO_SELECTION',
|
|
43
|
-
handler: applyToSelection
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: 'edit-style',
|
|
47
|
-
icon: 'las la-edit',
|
|
48
|
-
tooltip: 'KStyleManager.EDIT',
|
|
49
|
-
handler: editStyle
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: 'delete-style',
|
|
53
|
-
icon: 'las la-trash',
|
|
54
|
-
tooltip: 'KStyleManager.DELETE',
|
|
55
|
-
handler: { name: 'removeItem', params: ['confirm'] }
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
dense: true,
|
|
59
|
-
class: 'col-12'
|
|
60
|
-
}"
|
|
30
|
+
/>
|
|
31
|
+
<KFollower
|
|
32
|
+
:follower="follower"
|
|
33
|
+
targetId="left-window-magnet"
|
|
34
|
+
anchor="bottom-right"
|
|
61
35
|
/>
|
|
62
36
|
</q-tab-panel>
|
|
63
37
|
<q-tab-panel name="editor">
|
|
@@ -79,12 +53,14 @@
|
|
|
79
53
|
<script setup>
|
|
80
54
|
import _ from 'lodash'
|
|
81
55
|
import sift from 'sift'
|
|
82
|
-
import { computed, ref } from 'vue'
|
|
83
|
-
import { Filter, Sorter } from '@kalisio/kdk/core.client'
|
|
56
|
+
import { computed, ref, onMounted } from 'vue'
|
|
84
57
|
import { useCurrentActivity } from '../../composables/activity.js'
|
|
85
58
|
import { isLayerStyleEditable, editLayerStyle, updateLayerWithFiltersStyle } from '../../utils/utils.layers.js'
|
|
86
59
|
import { editFeaturesStyle } from '../../utils/utils.features.js'
|
|
60
|
+
import { getTagsFilterOptions } from '../../../../core/client/utils/utils.tags.js'
|
|
87
61
|
import KGrid from '../../../../core/client/components/collection/KGrid.vue'
|
|
62
|
+
import KFollower from '../../../../core/client/components/KFollower.vue'
|
|
63
|
+
import KTagSelection from '../../../../core/client/components/tags/KTagSelection.vue'
|
|
88
64
|
import KStyleEditor from './KStyleEditor.vue'
|
|
89
65
|
|
|
90
66
|
// Props
|
|
@@ -100,49 +76,129 @@ const { getSelectedFeaturesByLayer, CurrentActivity } = useCurrentActivity()
|
|
|
100
76
|
const styleEditor = ref(null)
|
|
101
77
|
const style = ref(null)
|
|
102
78
|
const viewMode = ref('list')
|
|
79
|
+
const baseQuery = ref({ $sort: { name: 1 } })
|
|
80
|
+
const searchString = ref('')
|
|
81
|
+
const tagsOptions = ref([])
|
|
82
|
+
const tagsSelection = ref([])
|
|
83
|
+
const follower = {
|
|
84
|
+
component: 'layout/KFab',
|
|
85
|
+
direction: 'up',
|
|
86
|
+
alignment: 'right',
|
|
87
|
+
content: [{
|
|
88
|
+
id: 'create-style',
|
|
89
|
+
icon: 'las la-plus',
|
|
90
|
+
tooltip: 'KStyleManager.CREATE_STYLE',
|
|
91
|
+
handler: editStyle
|
|
92
|
+
}]
|
|
93
|
+
}
|
|
103
94
|
|
|
104
95
|
// Computed
|
|
105
|
-
const baseQuery = computed(() => {
|
|
106
|
-
return Object.assign({}, Sorter.get().query)
|
|
107
|
-
})
|
|
108
96
|
const filterQuery = computed(() => {
|
|
109
|
-
|
|
97
|
+
const query = {}
|
|
98
|
+
if (!_.isEmpty(searchString.value)) {
|
|
99
|
+
query.name = { $regex: searchString.value }
|
|
100
|
+
}
|
|
101
|
+
if (!_.isEmpty(tagsSelection.value)) {
|
|
102
|
+
query['tags.name'] = { $in: _.map(tagsSelection.value, el => el.name) }
|
|
103
|
+
}
|
|
104
|
+
return query
|
|
110
105
|
})
|
|
111
106
|
const toolbar = computed(() => {
|
|
112
107
|
if (viewMode.value === 'editor') return []
|
|
113
108
|
return [
|
|
114
109
|
{
|
|
115
|
-
component: '
|
|
110
|
+
component: 'tags/KTagFilter',
|
|
111
|
+
id: 'style-manager-tags-filter',
|
|
112
|
+
class: 'q-ml-sm',
|
|
113
|
+
selection: tagsSelection.value,
|
|
114
|
+
alignment: 'left',
|
|
115
|
+
options: tagsOptions.value,
|
|
116
|
+
onSelectionChanged: onTagSelectionChanged
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
component: 'collection/KItemsFilter',
|
|
120
|
+
class: 'col',
|
|
121
|
+
value: searchString.value,
|
|
122
|
+
onSearch: (value) => {
|
|
123
|
+
searchString.value = value
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
component: 'collection/KItemsSorter',
|
|
116
128
|
id: 'style-manager-sorter-options',
|
|
117
129
|
tooltip: 'KStyleManager.SORT',
|
|
118
130
|
options: [
|
|
119
131
|
{ icon: 'las la-sort-alpha-down', value: { field: 'name', order: 1 }, default: true },
|
|
120
132
|
{ icon: 'las la-sort-alpha-up', value: { field: 'name', order: -1 } }
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
{
|
|
126
|
-
id: 'add-style',
|
|
127
|
-
icon: 'las la-plus-circle',
|
|
128
|
-
tooltip: 'KStyleManager.CREATE_STYLE',
|
|
129
|
-
size: '1rem',
|
|
130
|
-
handler: () => { editStyle() }
|
|
133
|
+
],
|
|
134
|
+
onOptionChanged: (option) => {
|
|
135
|
+
baseQuery.value = { $sort: { [option.field]: option.order } }
|
|
136
|
+
}
|
|
131
137
|
}
|
|
132
138
|
]
|
|
133
139
|
})
|
|
134
|
-
const
|
|
140
|
+
const renderer = computed(() => {
|
|
135
141
|
const visibleLayers = CurrentActivity.value.getLayers().filter(sift({ isVisible: true, scope: 'user' }))
|
|
136
|
-
|
|
142
|
+
const layerMenuContent = _.map(visibleLayers, layer => {
|
|
137
143
|
return {
|
|
138
144
|
id: 'apply-style-to-layer',
|
|
139
145
|
label: layer.name,
|
|
140
146
|
handler: (styleToApply) => applyToLayer(layer, styleToApply.item)
|
|
141
147
|
}
|
|
142
148
|
})
|
|
149
|
+
return {
|
|
150
|
+
component: 'styles/KStylePreviewItem',
|
|
151
|
+
options: {
|
|
152
|
+
avatar: false
|
|
153
|
+
},
|
|
154
|
+
actions: [
|
|
155
|
+
{
|
|
156
|
+
id: 'apply-to-layer',
|
|
157
|
+
component: 'menu/KMenu',
|
|
158
|
+
icon: 'las la-layer-group',
|
|
159
|
+
tooltip: 'KStyleManager.APPLY_TO_LAYER',
|
|
160
|
+
actionRenderer: 'item',
|
|
161
|
+
dense: true,
|
|
162
|
+
content: layerMenuContent
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 'apply-to-selection',
|
|
166
|
+
icon: 'las la-object-group',
|
|
167
|
+
tooltip: 'KStyleManager.APPLY_TO_SELECTION',
|
|
168
|
+
handler: applyToSelection
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'style-menu',
|
|
172
|
+
component: 'menu/KMenu',
|
|
173
|
+
dropdownIcon: 'las la-ellipsis-v',
|
|
174
|
+
actionRenderer: 'item',
|
|
175
|
+
propagate: false,
|
|
176
|
+
dense: true,
|
|
177
|
+
content: [
|
|
178
|
+
{
|
|
179
|
+
id: 'edit-style',
|
|
180
|
+
icon: 'las la-edit',
|
|
181
|
+
label: 'KStyleManager.EDIT',
|
|
182
|
+
handler: editStyle
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 'delete-style',
|
|
186
|
+
icon: 'las la-trash',
|
|
187
|
+
label: 'KStyleManager.DELETE',
|
|
188
|
+
handler: { name: 'removeItem', params: ['confirm'] }
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
dense: true,
|
|
194
|
+
class: 'col-12'
|
|
195
|
+
}
|
|
143
196
|
})
|
|
144
197
|
|
|
145
198
|
// Functions
|
|
199
|
+
function onTagSelectionChanged (selection) {
|
|
200
|
+
tagsSelection.value = selection
|
|
201
|
+
}
|
|
146
202
|
async function applyToLayer (layer, styleToApply) {
|
|
147
203
|
await editLayerStyle(layer, styleToApply)
|
|
148
204
|
if (CurrentActivity.value.isInMemoryLayer(layer)) {
|
|
@@ -154,7 +210,13 @@ function applyToSelection (styleToApply) {
|
|
|
154
210
|
_.forEach(getSelectedFeaturesByLayer(), layer => {
|
|
155
211
|
if (isLayerStyleEditable(layer.layer)) {
|
|
156
212
|
_.forEach(layer.features, f => {
|
|
157
|
-
|
|
213
|
+
let geometryType = f.geometry.type
|
|
214
|
+
if (_.has(f, 'properties.entityStyle')) {
|
|
215
|
+
// Walls and corridors must be treated as polygons in style editor
|
|
216
|
+
if (_.has(f, 'properties.entityStyle.wall')) geometryType = 'Polygon'
|
|
217
|
+
else if (_.has(f, 'properties.entityStyle.corridor')) geometryType = 'Polygon'
|
|
218
|
+
}
|
|
219
|
+
_.set(f, 'style', _.get(styleToApply, ['item', _.get(type, geometryType, 'point')], null))
|
|
158
220
|
})
|
|
159
221
|
if (CurrentActivity.value.isInMemoryLayer(layer.layer)) {
|
|
160
222
|
CurrentActivity.value.resetLayer(layer.layer)
|
|
@@ -170,7 +232,6 @@ function editStyle (styleToEdit) {
|
|
|
170
232
|
}
|
|
171
233
|
function onApplied (style) {
|
|
172
234
|
viewMode.value = 'list'
|
|
173
|
-
|
|
174
235
|
// Update layers with filters that use this style
|
|
175
236
|
const layers = _.filter(CurrentActivity.value?.getLayers ? CurrentActivity.value.getLayers() : [], layer =>
|
|
176
237
|
_.get(layer, 'scope') === 'user' &&
|
|
@@ -180,4 +241,9 @@ function onApplied (style) {
|
|
|
180
241
|
function onCanceled () {
|
|
181
242
|
viewMode.value = 'list'
|
|
182
243
|
}
|
|
244
|
+
|
|
245
|
+
// Hooks
|
|
246
|
+
onMounted(async () => {
|
|
247
|
+
tagsOptions.value = await getTagsFilterOptions('styles')
|
|
248
|
+
})
|
|
183
249
|
</script>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script setup>
|
|
12
|
-
import _ from 'lodash'
|
|
13
12
|
import { computed } from 'vue'
|
|
13
|
+
import { getShapeFromPointStyle, getShapeFromLineStyle, getShapeFromPolygonStyle } from '../../utils/utils.style.js'
|
|
14
14
|
import KShape from '../../../../core/client/components/media/KShape.vue'
|
|
15
15
|
import KStyleTip from './KStyleTip.vue'
|
|
16
16
|
|
|
@@ -35,30 +35,14 @@ const props = defineProps({
|
|
|
35
35
|
|
|
36
36
|
// Computed
|
|
37
37
|
const shapeOptions = computed(() => {
|
|
38
|
-
const size = props.dense ? [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
return _.merge({}, props.style, { size }, stroke)
|
|
48
|
-
}
|
|
49
|
-
// Line
|
|
50
|
-
if (props.type === 'line') {
|
|
51
|
-
let width = _.get(props.style, 'width', 1)
|
|
52
|
-
if (width > 1) width = width / 4
|
|
53
|
-
return { shape: 'polyline', stroke: _.merge({}, props.style, { width }) }
|
|
54
|
-
}
|
|
55
|
-
// Polygon
|
|
56
|
-
let stroke = _.get(props.style, 'stroke')
|
|
57
|
-
if (stroke) {
|
|
58
|
-
let width = _.get(stroke, 'width', 1)
|
|
59
|
-
if (width > 1) width = width / 4
|
|
60
|
-
stroke = { stroke: { width } }
|
|
38
|
+
const size = props.dense ? [20, 20] : [24, 24]
|
|
39
|
+
switch (props.type) {
|
|
40
|
+
case 'point':
|
|
41
|
+
return getShapeFromPointStyle(props.style, size)
|
|
42
|
+
case 'line':
|
|
43
|
+
return getShapeFromLineStyle(props.style, size)
|
|
44
|
+
default:
|
|
45
|
+
return getShapeFromPolygonStyle(props.style, size)
|
|
61
46
|
}
|
|
62
|
-
return _.merge({}, props.style, { shape: 'polygon' }, { size }, stroke)
|
|
63
47
|
})
|
|
64
48
|
</script>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
v-bind="$props"
|
|
4
4
|
:actions="itemActions"
|
|
5
5
|
:dense="dense"
|
|
6
|
+
class="items-center k-style-preview-item"
|
|
6
7
|
>
|
|
7
8
|
<template v-slot:item-content>
|
|
8
9
|
<div
|
|
@@ -10,7 +11,14 @@
|
|
|
10
11
|
:class="{ 'q-gutter-x-sm': dense, 'q-gutter-x-md': !dense }"
|
|
11
12
|
>
|
|
12
13
|
<div class="text-subtitle2">
|
|
13
|
-
|
|
14
|
+
<div>
|
|
15
|
+
{{ name }}
|
|
16
|
+
</div>
|
|
17
|
+
<div>
|
|
18
|
+
<span v-for="tag in tags">
|
|
19
|
+
<q-badge class="q-mx-xs" :style="'background-color: ' + tag.color" :text-color="getTextColor(tag)">{{ tag.name }}</q-badge>
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
14
22
|
</div>
|
|
15
23
|
<div
|
|
16
24
|
class="row item-baseline no-wrap"
|
|
@@ -27,6 +35,7 @@
|
|
|
27
35
|
|
|
28
36
|
<script>
|
|
29
37
|
import { mixins as kdkCoreMixins } from '../../../../core/client'
|
|
38
|
+
import { getContrastColor } from '../../../../core/client/utils/utils.colors.js'
|
|
30
39
|
import KItem from '../../../../core/client/components/collection/KItem.vue'
|
|
31
40
|
import KStylePreview from './KStylePreview.vue'
|
|
32
41
|
|
|
@@ -46,6 +55,9 @@ export default {
|
|
|
46
55
|
name () {
|
|
47
56
|
return this.item.name
|
|
48
57
|
},
|
|
58
|
+
tags () {
|
|
59
|
+
return this.item.tags || []
|
|
60
|
+
},
|
|
49
61
|
pointStyle () {
|
|
50
62
|
return this.item.point
|
|
51
63
|
},
|
|
@@ -62,7 +74,16 @@ export default {
|
|
|
62
74
|
},
|
|
63
75
|
hasSystemScope () {
|
|
64
76
|
return this.item.scope === 'system'
|
|
77
|
+
},
|
|
78
|
+
getTextColor (tag) {
|
|
79
|
+
return getContrastColor(tag.color ? tag.color : 'white')
|
|
65
80
|
}
|
|
66
81
|
}
|
|
67
82
|
}
|
|
68
83
|
</script>
|
|
84
|
+
|
|
85
|
+
<style lang="scss">
|
|
86
|
+
.k-style-preview-item:hover {
|
|
87
|
+
background: $grey-3 !important;
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
@@ -6,13 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import _ from 'lodash'
|
|
9
|
+
import config from 'config'
|
|
9
10
|
import logger from 'loglevel'
|
|
10
|
-
import { getCssVar, copyToClipboard, exportFile } from 'quasar'
|
|
11
|
+
import { getCssVar, copyToClipboard, exportFile, Notify } from 'quasar'
|
|
11
12
|
import along from '@turf/along'
|
|
12
13
|
import length from '@turf/length'
|
|
13
14
|
import flatten from '@turf/flatten'
|
|
14
15
|
import { Units } from '../../../../core/client/units'
|
|
15
16
|
import { Store } from '../../../../core/client/store'
|
|
17
|
+
import { Events } from '../../../../core/client/events'
|
|
18
|
+
import { api } from '../../../../core/client/api.js'
|
|
16
19
|
import { KChart, KPanel, KStamp } from '../../../../core/client/components'
|
|
17
20
|
import { useCurrentActivity, useHighlight } from '../../composables'
|
|
18
21
|
import { fetchProfileDataset, fetchElevation, extractElevation } from '../../elevation-utils.js'
|
|
@@ -342,7 +345,7 @@ export default {
|
|
|
342
345
|
const geometry = _.get(this.feature, 'geometry.type')
|
|
343
346
|
if (geometry !== 'LineString' && geometry !== 'MultiLineString') {
|
|
344
347
|
logger.warn('[KDK] the selected feature has an invald geometry')
|
|
345
|
-
|
|
348
|
+
Notify.create({ type: 'negative', message: this.$t('KElevationProfile.INVALID_GEOMETRY') })
|
|
346
349
|
return
|
|
347
350
|
}
|
|
348
351
|
this.highlight(this.feature, false)
|
|
@@ -354,10 +357,10 @@ export default {
|
|
|
354
357
|
const chartWidth = window.size[0]
|
|
355
358
|
|
|
356
359
|
// Setup the request url options
|
|
357
|
-
const endpoint =
|
|
360
|
+
const endpoint = Store.get('capabilities.api.gateway') + '/elevation'
|
|
358
361
|
const headers = { 'Content-Type': 'application/json' }
|
|
359
362
|
// Add the Authorization header if jwt is defined
|
|
360
|
-
const jwt = await
|
|
363
|
+
const jwt = await api.get('storage').getItem(config.gatewayJwt)
|
|
361
364
|
if (jwt) headers.Authorization = 'Bearer ' + jwt
|
|
362
365
|
|
|
363
366
|
const dismiss = this.$q.notify({
|
|
@@ -392,7 +395,7 @@ export default {
|
|
|
392
395
|
terrainDataset = dataset
|
|
393
396
|
this.profile = geojson
|
|
394
397
|
} catch (error) {
|
|
395
|
-
|
|
398
|
+
Notify.create({ type: 'negative', message: this.$t('errors.NETWORK_ERROR') })
|
|
396
399
|
}
|
|
397
400
|
|
|
398
401
|
dismiss()
|
|
@@ -406,9 +409,9 @@ export default {
|
|
|
406
409
|
if (this.profile) {
|
|
407
410
|
try {
|
|
408
411
|
await copyToClipboard(JSON.stringify(this.profile))
|
|
409
|
-
|
|
412
|
+
Notify.create({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_COPIED') })
|
|
410
413
|
} catch (error) {
|
|
411
|
-
|
|
414
|
+
Notify.create({ type: 'negative', message: this.$t('KElevationProfile.CANNOT_COPY_PROFILE') })
|
|
412
415
|
logger.error(error)
|
|
413
416
|
}
|
|
414
417
|
}
|
|
@@ -417,8 +420,8 @@ export default {
|
|
|
417
420
|
if (this.profile) {
|
|
418
421
|
const file = this.title + '.geojson'
|
|
419
422
|
const status = exportFile(file, JSON.stringify(this.profile))
|
|
420
|
-
if (status)
|
|
421
|
-
else
|
|
423
|
+
if (status) Notify.create({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_EXPORTED', { file }) })
|
|
424
|
+
else Notify.create({ rtpe: 'negative', message: this.$t('KElevationProfile.CANNOT_EXPORT_PROFILE') })
|
|
422
425
|
}
|
|
423
426
|
}
|
|
424
427
|
},
|
|
@@ -429,17 +432,17 @@ export default {
|
|
|
429
432
|
this.debouncedRefresh = _.debounce(this.refresh, 100)
|
|
430
433
|
|
|
431
434
|
// Setup listeners
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (this.layerStorePath) {
|
|
435
|
-
if (this.featureStorePath) {
|
|
435
|
+
Events.on('units-default-length-changed', this.debouncedRefresh)
|
|
436
|
+
Events.on('units-default-altitude-changed', this.debouncedRefresh)
|
|
437
|
+
if (this.layerStorePath) { Events.on(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
|
|
438
|
+
if (this.featureStorePath) { Events.on(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
|
|
436
439
|
},
|
|
437
440
|
beforeUnmount () {
|
|
438
441
|
// Release listeners
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
if (this.layerStorePath) {
|
|
442
|
-
if (this.featureStorePath) {
|
|
442
|
+
Events.off('units-default-length-changed', this.debouncedRefresh)
|
|
443
|
+
Events.off('units-default-altitude-changed', this.debouncedRefresh)
|
|
444
|
+
if (this.layerStorePath) { Events.off(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
|
|
445
|
+
if (this.featureStorePath) { Events.off(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
|
|
443
446
|
},
|
|
444
447
|
setup (props) {
|
|
445
448
|
return {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<script>
|
|
23
23
|
import _ from 'lodash'
|
|
24
24
|
import logger from 'loglevel'
|
|
25
|
-
import { copyToClipboard, exportFile } from 'quasar'
|
|
25
|
+
import { copyToClipboard, exportFile, Notify } from 'quasar'
|
|
26
26
|
import { KView, KPanel, KStamp } from '../../../../core/client/components'
|
|
27
27
|
import { generatePropertiesSchema } from '../../utils'
|
|
28
28
|
import { useCurrentActivity, useHighlight } from '../../composables'
|
|
@@ -108,9 +108,9 @@ export default {
|
|
|
108
108
|
if (this.feature) {
|
|
109
109
|
try {
|
|
110
110
|
await copyToClipboard(JSON.stringify(this.feature.properties))
|
|
111
|
-
|
|
111
|
+
Notify.create({ type: 'positive', message: this.$t('KInformationBox.PROPERTIES_COPIED') })
|
|
112
112
|
} catch (error) {
|
|
113
|
-
|
|
113
|
+
Notify.create({ type: 'negative', message: this.$t('KInformationBox.CANNOT_COPY_PROPERTIES') })
|
|
114
114
|
logger.error(error)
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -125,8 +125,8 @@ export default {
|
|
|
125
125
|
_.get(this.layer, 'properties.name')
|
|
126
126
|
const file = name + '.geojson'
|
|
127
127
|
const status = exportFile(file, JSON.stringify(this.feature))
|
|
128
|
-
if (status)
|
|
129
|
-
else
|
|
128
|
+
if (status) Notify.create({ type: 'negative', message: this.$t('KInformationBox.FEATURE_EXPORTED', { file }) })
|
|
129
|
+
else Notify.create({ type: 'negative', message: this.$t('KInformationBox.CANNOT_EXPORT_FEATURE') })
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
},
|