@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
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="readOnly && model" :id="properties.name + '-field'">
|
|
3
|
+
<q-chip :color="model.color" dense>
|
|
4
|
+
{{ model.name }}
|
|
5
|
+
</q-chip>
|
|
6
|
+
</div>
|
|
7
|
+
<q-select v-else
|
|
8
|
+
ref="select"
|
|
9
|
+
:for="properties.name + '-field'"
|
|
10
|
+
:id="properties.name + '-field'"
|
|
11
|
+
v-model="items"
|
|
12
|
+
:label="label"
|
|
13
|
+
:multiple="properties.multiselect"
|
|
14
|
+
autocomplete="off"
|
|
15
|
+
hide-dropdown-icon
|
|
16
|
+
use-input
|
|
17
|
+
:clearable="isClearable()"
|
|
18
|
+
:error-message="errorLabel"
|
|
19
|
+
:error="hasError"
|
|
20
|
+
:disable="disabled"
|
|
21
|
+
bottom-slots
|
|
22
|
+
:options="options"
|
|
23
|
+
@filter="onSearch"
|
|
24
|
+
@update:model-value="onSelected">
|
|
25
|
+
<!-- Value display -->
|
|
26
|
+
<template v-slot:selected-item="scope">
|
|
27
|
+
<KChip
|
|
28
|
+
v-bind="scope.opt"
|
|
29
|
+
:label="scope.opt.name"
|
|
30
|
+
square
|
|
31
|
+
removable
|
|
32
|
+
@remove="scope.removeAtIndex(scope.index)"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
<!-- Options display -->
|
|
36
|
+
<template v-slot:option="scope">
|
|
37
|
+
<q-item
|
|
38
|
+
v-bind="scope.itemProps"
|
|
39
|
+
:id="getId(scope.opt)"
|
|
40
|
+
>
|
|
41
|
+
<q-item-section v-if="scope.opt.create" class="col-auto">
|
|
42
|
+
{{ $t('KTagManager.CREATE_TAG_ON_THE_FLY')}}
|
|
43
|
+
</q-item-section>
|
|
44
|
+
<q-item-section>
|
|
45
|
+
<KChip v-bind="scope.opt" :label="scope.opt.name" />
|
|
46
|
+
</q-item-section>
|
|
47
|
+
<q-item-section v-if="!scope.opt.create" class="col-auto">
|
|
48
|
+
<KPanel
|
|
49
|
+
id="tag-actions"
|
|
50
|
+
:content="getActions(scope.opt)"/>
|
|
51
|
+
</q-item-section>
|
|
52
|
+
</q-item>
|
|
53
|
+
</template>
|
|
54
|
+
</q-select>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
import _ from 'lodash'
|
|
59
|
+
import logger from 'loglevel'
|
|
60
|
+
import { api } from '../../api.js'
|
|
61
|
+
import { Search } from '../../search'
|
|
62
|
+
import { baseField } from '../../mixins'
|
|
63
|
+
import KChip from '../KChip.vue'
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
mixins: [baseField],
|
|
67
|
+
components: {
|
|
68
|
+
KChip
|
|
69
|
+
},
|
|
70
|
+
data () {
|
|
71
|
+
return {
|
|
72
|
+
items: null,
|
|
73
|
+
options: [],
|
|
74
|
+
searchString: ''
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
hasSingleService () {
|
|
79
|
+
const services = _.uniqBy(this.properties.services, 'service')
|
|
80
|
+
return services.length === 1
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
getServiceForItem (item) {
|
|
85
|
+
return (this.hasSingleService
|
|
86
|
+
? this.properties.services[0]
|
|
87
|
+
: _.find(this.properties.services, { service: item.service }))
|
|
88
|
+
},
|
|
89
|
+
getId (item) {
|
|
90
|
+
return _.kebabCase(this.getLabel(item))
|
|
91
|
+
},
|
|
92
|
+
getLabel (item) {
|
|
93
|
+
const service = this.getServiceForItem(item)
|
|
94
|
+
return _.get(item, service.field || 'name', '')
|
|
95
|
+
},
|
|
96
|
+
getActions (item) {
|
|
97
|
+
if (item.scope !== 'user') return []
|
|
98
|
+
const actions = [{
|
|
99
|
+
id: 'item-field-actions',
|
|
100
|
+
component: 'menu/KMenu',
|
|
101
|
+
dropdownIcon: 'las la-ellipsis-v',
|
|
102
|
+
actionRenderer: 'item',
|
|
103
|
+
propagate: false,
|
|
104
|
+
dense: true,
|
|
105
|
+
content: [
|
|
106
|
+
{
|
|
107
|
+
id: 'edit-tag',
|
|
108
|
+
icon: 'las la-edit',
|
|
109
|
+
label: 'KTagManager.EDIT_TAG',
|
|
110
|
+
dialog: {
|
|
111
|
+
component: 'KEditor',
|
|
112
|
+
service: 'tags',
|
|
113
|
+
object: item,
|
|
114
|
+
hideButtons: true,
|
|
115
|
+
schema: 'tags.update',
|
|
116
|
+
cancelAction: 'CANCEL',
|
|
117
|
+
baseObject: {
|
|
118
|
+
service: _.get(this.properties, 'field.service'),
|
|
119
|
+
property: _.get(this.properties, 'field.property')
|
|
120
|
+
},
|
|
121
|
+
afterRequest: () => {
|
|
122
|
+
// Trigger a re-render of the select component
|
|
123
|
+
this.$refs.select.updateInputValue(this.searchString)
|
|
124
|
+
return { isOk: true }
|
|
125
|
+
},
|
|
126
|
+
okAction: {
|
|
127
|
+
id: 'ok-button',
|
|
128
|
+
label: 'APPLY',
|
|
129
|
+
handler: 'apply'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'delete-tag',
|
|
135
|
+
icon: 'las la-trash',
|
|
136
|
+
label: 'KTagManager.DELETE_TAG',
|
|
137
|
+
context: item,
|
|
138
|
+
handler: this.deleteTag
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}]
|
|
142
|
+
return actions
|
|
143
|
+
},
|
|
144
|
+
isClearable () {
|
|
145
|
+
return _.get(this.properties, 'field.clearable', true)
|
|
146
|
+
},
|
|
147
|
+
emptyModel () {
|
|
148
|
+
if (this.properties.multiselect) return []
|
|
149
|
+
return null
|
|
150
|
+
},
|
|
151
|
+
fill (value) {
|
|
152
|
+
this.model = value
|
|
153
|
+
this.items = _.clone(value)
|
|
154
|
+
},
|
|
155
|
+
async onSearch (pattern, update, abort) {
|
|
156
|
+
if (pattern.length < _.get(this.properties, 'minCharsToSearch', 2)) {
|
|
157
|
+
abort()
|
|
158
|
+
return
|
|
159
|
+
}
|
|
160
|
+
this.searchString = pattern
|
|
161
|
+
const results = await Search.query(this.properties.services, pattern)
|
|
162
|
+
update(() => {
|
|
163
|
+
if (this.properties.multiselect) {
|
|
164
|
+
this.options = _.differenceWith(results, this.items, (item1, item2) => {
|
|
165
|
+
return _.get(item1, 'name') === _.get(item2, 'name') && _.get(item1, 'color') === _.get(item2, 'color')
|
|
166
|
+
})
|
|
167
|
+
} else this.options = results
|
|
168
|
+
|
|
169
|
+
// Add the current pattern as an option if it is not already present
|
|
170
|
+
const hasInvalidMinLength = pattern.length < _.get(this.properties, 'minLength', 0)
|
|
171
|
+
const hasInvalidMaxLength = pattern.length > _.get(this.properties, 'maxLength', 256)
|
|
172
|
+
if (hasInvalidMinLength || hasInvalidMaxLength) return
|
|
173
|
+
this.options = _.filter(this.options, (item) => !item.create)
|
|
174
|
+
if (pattern !== '' && !_.find(results, { name: pattern })) {
|
|
175
|
+
this.options.push({
|
|
176
|
+
name: pattern,
|
|
177
|
+
color: 'grey',
|
|
178
|
+
create: true
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
async onSelected (value) {
|
|
184
|
+
if (value) {
|
|
185
|
+
this.model = this.items
|
|
186
|
+
} else this.model = this.emptyModel()
|
|
187
|
+
this.options = []
|
|
188
|
+
this.$refs.select.updateInputValue('')
|
|
189
|
+
this.onChanged()
|
|
190
|
+
|
|
191
|
+
if (!this.model) return
|
|
192
|
+
for (const item of this.model) {
|
|
193
|
+
if (item.create) {
|
|
194
|
+
const service = api.getService('tags')
|
|
195
|
+
|
|
196
|
+
if (!_.get(this.properties, 'field.service') || !_.get(this.properties, 'field.property')) {
|
|
197
|
+
logger.error('[KDK] KTagField: Missing service or property in field definition for tag creation.')
|
|
198
|
+
return
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const hasInvalidMinLength = item.name.length < _.get(this.properties, 'minLength', 0)
|
|
202
|
+
const hasInvalidMaxLength = item.name.length > _.get(this.properties, 'maxLength', 256)
|
|
203
|
+
if (hasInvalidMinLength || hasInvalidMaxLength) {
|
|
204
|
+
logger.error(`[KDK] KTagField: Tag name "${item.name}" is invalid. It must be between ${_.get(this.properties, 'minLength', 0)} and ${_.get(this.properties, 'maxLength', 256)} characters long.`)
|
|
205
|
+
return
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
_.defaults(item, {
|
|
209
|
+
service: this.properties.field.service,
|
|
210
|
+
property: this.properties.field.property,
|
|
211
|
+
scope: 'user',
|
|
212
|
+
color: 'grey',
|
|
213
|
+
description: ''
|
|
214
|
+
})
|
|
215
|
+
delete item.create
|
|
216
|
+
await service.create(item)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
async deleteTag (item) {
|
|
221
|
+
const service = api.getService('tags')
|
|
222
|
+
await service.remove(item._id)
|
|
223
|
+
// Trigger a re-render of the select component
|
|
224
|
+
this.$refs.select.updateInputValue(this.searchString)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
</script>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:error="hasError"
|
|
15
15
|
:error-message="errorLabel"
|
|
16
16
|
bottom-slots
|
|
17
|
+
:debounce="debounce"
|
|
17
18
|
@blur="onChanged"
|
|
18
19
|
@update:model-value='onChanged'
|
|
19
20
|
>
|
|
@@ -47,6 +48,9 @@ export default {
|
|
|
47
48
|
} else {
|
|
48
49
|
return this.model
|
|
49
50
|
}
|
|
51
|
+
},
|
|
52
|
+
debounce () {
|
|
53
|
+
return _.get(this.properties, 'field.debounce', 0)
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
methods: {
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
v-model="model"
|
|
20
20
|
:definitions="definitions"
|
|
21
21
|
:toolbar="editorToolbar"
|
|
22
|
+
:content-style="{ overflowWrap: 'anywhere' }"
|
|
22
23
|
content-class="text-grey-8"
|
|
23
24
|
min-height="5rem"
|
|
24
25
|
max-height="10rem"
|
|
25
|
-
dense
|
|
26
|
+
dense
|
|
27
|
+
/>
|
|
26
28
|
</div>
|
|
27
29
|
</template>
|
|
28
30
|
<!-- Helper -->
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
<script setup>
|
|
23
23
|
import _ from 'lodash'
|
|
24
24
|
import { ref, watch, computed } from 'vue'
|
|
25
|
-
import {
|
|
25
|
+
import { Shapes } from '../../utils/utils.shapes.js'
|
|
26
26
|
import KShape from '../media/KShape.vue'
|
|
27
27
|
|
|
28
28
|
// Props
|
|
29
29
|
const props = defineProps({
|
|
30
30
|
modelValue: {
|
|
31
31
|
type: String,
|
|
32
|
-
default: '
|
|
32
|
+
default: 'circle',
|
|
33
33
|
validator: (value) => {
|
|
34
|
-
return _.keys(
|
|
34
|
+
return _.concat(['none'], _.keys(Shapes)).includes(value)
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
size: {
|
|
@@ -45,8 +45,8 @@ const emit = defineEmits(['update:modelValue'])
|
|
|
45
45
|
|
|
46
46
|
// Data
|
|
47
47
|
const popupProxyRef = ref(null)
|
|
48
|
-
const
|
|
49
|
-
const
|
|
48
|
+
const shapeTypes = _.concat(['none'], _.keys(Shapes))
|
|
49
|
+
const shape = ref(shapeTypes.includes(props.modelValue) ? props.modelValue : 'circle')
|
|
50
50
|
const shapeSizes = {
|
|
51
51
|
xs: 14,
|
|
52
52
|
sm: 16,
|
|
@@ -7,18 +7,20 @@
|
|
|
7
7
|
id="fab"
|
|
8
8
|
v-model="isOpened"
|
|
9
9
|
:icon="icon"
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
:padding="padding"
|
|
11
|
+
vertical-actions-align="center"
|
|
12
12
|
:direction="direction"
|
|
13
|
-
color="
|
|
14
|
-
persistent
|
|
13
|
+
:color="color"
|
|
14
|
+
persistent
|
|
15
|
+
class="k-fab"
|
|
16
|
+
>
|
|
15
17
|
<!-- Render a grid menu if the number of actions is higher than the expandable limit -->
|
|
16
18
|
<q-menu v-if="actions.length > expandableLimit" v-model="isOpened" ref="menu" persistent fit anchor="top left" self="bottom right">
|
|
17
19
|
<div class="q-pa-sm row" style="max-width: 50vw">
|
|
18
20
|
<template v-for="action in actions" :key="action.id">
|
|
19
21
|
<div class="col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2">
|
|
20
22
|
<KAction
|
|
21
|
-
color="
|
|
23
|
+
:color="color"
|
|
22
24
|
v-bind="action"
|
|
23
25
|
renderer="item"
|
|
24
26
|
v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
|
|
@@ -32,11 +34,11 @@
|
|
|
32
34
|
<div v-else>
|
|
33
35
|
<template v-for="action in actions" :key="action.id">
|
|
34
36
|
<KAction
|
|
35
|
-
color="
|
|
37
|
+
:color="color"
|
|
36
38
|
v-bind="action"
|
|
37
39
|
renderer="fab-action"
|
|
40
|
+
:iconRight="alignment === 'left' ? true : false"
|
|
38
41
|
v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
|
|
39
|
-
:iconRight="actionsAlign === 'left' ? true : false"
|
|
40
42
|
/>
|
|
41
43
|
</template>
|
|
42
44
|
</div>
|
|
@@ -45,9 +47,8 @@
|
|
|
45
47
|
Render a non expandable fab if a single action is provided
|
|
46
48
|
-->
|
|
47
49
|
<KAction v-else-if="actions.length === 1"
|
|
48
|
-
color="
|
|
50
|
+
:color="color"
|
|
49
51
|
v-bind="actions[0]"
|
|
50
|
-
size="1.15rem"
|
|
51
52
|
renderer="fab"
|
|
52
53
|
v-on="actions[0].on ? { [actions[0].on.event]: actions[0].on.listener } : {}"
|
|
53
54
|
/>
|
|
@@ -57,14 +58,25 @@
|
|
|
57
58
|
<script setup>
|
|
58
59
|
import _ from 'lodash'
|
|
59
60
|
import { ref, computed } from 'vue'
|
|
60
|
-
import { Layout } from '../../layout'
|
|
61
61
|
import KAction from '../action/KAction.vue'
|
|
62
62
|
|
|
63
63
|
// Props
|
|
64
|
-
defineProps({
|
|
65
|
-
|
|
66
|
-
type:
|
|
67
|
-
default:
|
|
64
|
+
const props = defineProps({
|
|
65
|
+
content: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: () => null
|
|
68
|
+
},
|
|
69
|
+
icon: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: 'las la-ellipsis-v'
|
|
72
|
+
},
|
|
73
|
+
color: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: 'primary'
|
|
76
|
+
},
|
|
77
|
+
padding: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: 'md'
|
|
68
80
|
},
|
|
69
81
|
direction: {
|
|
70
82
|
type: String,
|
|
@@ -73,27 +85,27 @@ defineProps({
|
|
|
73
85
|
return ['up', 'down'].includes(value)
|
|
74
86
|
}
|
|
75
87
|
},
|
|
76
|
-
|
|
88
|
+
alignment: {
|
|
77
89
|
type: String,
|
|
78
90
|
required: true,
|
|
79
91
|
validator: (value) => {
|
|
80
92
|
return ['left', 'right'].includes(value)
|
|
81
93
|
}
|
|
94
|
+
},
|
|
95
|
+
expandableLimit: {
|
|
96
|
+
type: Number,
|
|
97
|
+
default: 8
|
|
82
98
|
}
|
|
83
99
|
})
|
|
84
100
|
|
|
85
101
|
// Data
|
|
86
|
-
const fab = Layout.getFab()
|
|
87
102
|
const isOpened = ref(false)
|
|
88
103
|
|
|
89
104
|
// Computed
|
|
90
|
-
const icon = computed(() => {
|
|
91
|
-
return fab.icon || 'las la-ellipsis-v'
|
|
92
|
-
})
|
|
93
105
|
const actions = computed(() => {
|
|
94
106
|
const actions = []
|
|
95
107
|
// Apply filtering
|
|
96
|
-
_.forEach(
|
|
108
|
+
_.forEach(props.content, (action) => {
|
|
97
109
|
let isVisible = _.get(action, 'visible', true)
|
|
98
110
|
// Can be a functional call
|
|
99
111
|
if (typeof isVisible === 'function') {
|
|
@@ -109,9 +109,11 @@
|
|
|
109
109
|
>
|
|
110
110
|
<KFab
|
|
111
111
|
id="fab"
|
|
112
|
-
v-if="fab.visible"
|
|
112
|
+
v-if="hasFabComponents && fab.visible"
|
|
113
|
+
:content="fab.components"
|
|
114
|
+
:icon="fab.icon"
|
|
113
115
|
:direction="fabBehavior.direction"
|
|
114
|
-
:
|
|
116
|
+
:alignment="fabBehavior.alignment"
|
|
115
117
|
/>
|
|
116
118
|
</q-page-sticky>
|
|
117
119
|
<!-- left Window -->
|
|
@@ -309,12 +311,15 @@ const bottomWindowSize = computed(() => {
|
|
|
309
311
|
const bottomWindowStyle = computed(() => {
|
|
310
312
|
return { maxWidth: bottomWindowSize[0] + 'px', maxHeight: bottomWindowSize[1] + 'px' }
|
|
311
313
|
})
|
|
314
|
+
const hasFabComponents = computed(() => {
|
|
315
|
+
return !_.isEmpty(fab.components)
|
|
316
|
+
})
|
|
312
317
|
const fabBehavior = computed(() => {
|
|
313
318
|
switch (fab.position) {
|
|
314
|
-
case 'bottom-right': return { direction: 'up',
|
|
315
|
-
case 'bottom-left': return { direction: 'up',
|
|
316
|
-
case 'top-right': return { direction: 'down',
|
|
317
|
-
case 'top-left': return { direction: 'down',
|
|
319
|
+
case 'bottom-right': return { direction: 'up', alignment: 'left' }
|
|
320
|
+
case 'bottom-left': return { direction: 'up', alignment: 'right' }
|
|
321
|
+
case 'top-right': return { direction: 'down', alignment: 'left' }
|
|
322
|
+
case 'top-left': return { direction: 'down', alignment: 'right' }
|
|
318
323
|
}
|
|
319
324
|
})
|
|
320
325
|
const stickiesComponents = computed(() => {
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
<div
|
|
90
90
|
:id="`${placement}-window-resize-grip`"
|
|
91
91
|
class="row items-center"
|
|
92
|
+
style="position: relative"
|
|
92
93
|
>
|
|
93
94
|
<q-icon
|
|
94
95
|
v-if="currentWindow.controls.resize && currentWindow.state !== 'maximized'"
|
|
@@ -97,6 +98,10 @@
|
|
|
97
98
|
size="10px"
|
|
98
99
|
v-touch-pan.prevent.mouse="onResized"
|
|
99
100
|
/>
|
|
101
|
+
<div
|
|
102
|
+
:id="`${placement}-window-magnet`"
|
|
103
|
+
style="position: absolute; right: 8px; bottom: 8px;"
|
|
104
|
+
/>
|
|
100
105
|
</div>
|
|
101
106
|
</div>
|
|
102
107
|
</div>
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import KColorScale from './KColorScale.vue'
|
|
2
|
-
import
|
|
3
|
-
import KMarkdownViewer from './KMarkdownViewer.vue'
|
|
4
|
-
import KMediaBrowser from './KMediaBrowser.vue'
|
|
2
|
+
import KRibbon from './KRibbon.vue'
|
|
5
3
|
import KShape from './KShape.vue'
|
|
6
4
|
|
|
7
5
|
export {
|
|
8
6
|
KColorScale,
|
|
9
|
-
|
|
10
|
-
KMediaBrowser,
|
|
11
|
-
KImageViewer,
|
|
7
|
+
KRibbon,
|
|
12
8
|
KShape
|
|
13
9
|
}
|
|
@@ -28,16 +28,18 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
<div class="row">
|
|
32
|
+
<KPanel
|
|
33
|
+
id="menu-entries"
|
|
34
|
+
:content="content"
|
|
35
|
+
:mode="mode"
|
|
36
|
+
:context="context"
|
|
37
|
+
:filter="filter"
|
|
38
|
+
:action-renderer="actionRenderer"
|
|
39
|
+
:direction="direction"
|
|
40
|
+
class="no-wrap"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
41
43
|
</q-btn-dropdown>
|
|
42
44
|
<q-tooltip v-if="enableTooltip && tooltip">
|
|
43
45
|
{{ tooltip }}
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
:persistent="persistent"
|
|
10
10
|
:auto-close="autoClose">
|
|
11
11
|
<div v-hover="{ enter: onShowMenu, leave: onHideMenuRequested }">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
<div class="row">
|
|
13
|
+
<KPanel
|
|
14
|
+
id="submenu-entries"
|
|
15
|
+
:content="content"
|
|
16
|
+
:mode="mode"
|
|
17
|
+
:context="context"
|
|
18
|
+
:filter="filter"
|
|
19
|
+
:action-renderer="actionRenderer"
|
|
20
|
+
:direction="direction"
|
|
21
|
+
class="no-wrap"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</q-menu>
|
|
26
26
|
</KAction>
|
|
@@ -96,18 +96,17 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script>
|
|
99
|
-
import {
|
|
100
|
-
Document,
|
|
101
|
-
Storage,
|
|
102
|
-
composables as kdkCoreComposables,
|
|
103
|
-
mixins as kdkCoreMixins
|
|
104
|
-
} from '@kalisio/kdk/core.client'
|
|
105
99
|
import _ from 'lodash'
|
|
100
|
+
import { Document } from '../../document.js'
|
|
101
|
+
import { Storage } from '../../storage.js'
|
|
102
|
+
import { api } from '../../api.js'
|
|
103
|
+
import { useScreen } from '../../composables/index.js'
|
|
104
|
+
import { baseItem } from '../../mixins/index.js'
|
|
106
105
|
import KTextArea from '../KTextArea.vue'
|
|
107
106
|
import KCard from '../collection/KCard.vue'
|
|
108
107
|
|
|
109
108
|
export default {
|
|
110
|
-
mixins: [
|
|
109
|
+
mixins: [baseItem],
|
|
111
110
|
props: {
|
|
112
111
|
header: {
|
|
113
112
|
type: [Array, Object],
|
|
@@ -187,17 +186,19 @@ export default {
|
|
|
187
186
|
Storage.export({ file: attachment.name, key, context: this.contextId })
|
|
188
187
|
},
|
|
189
188
|
canEditMessage () {
|
|
190
|
-
|
|
191
|
-
return
|
|
189
|
+
const result = this.canEditMessageFn(this.item)
|
|
190
|
+
if (result === null) return api.can('update', 'messages')
|
|
191
|
+
return result
|
|
192
192
|
},
|
|
193
193
|
canRemoveMessage () {
|
|
194
|
-
|
|
195
|
-
return
|
|
194
|
+
const result = this.canRemoveMessageFn(this.item)
|
|
195
|
+
if (result === null) return api.can('remove', 'messages')
|
|
196
|
+
return result
|
|
196
197
|
}
|
|
197
198
|
},
|
|
198
199
|
setup () {
|
|
199
200
|
// data
|
|
200
|
-
const { dense } =
|
|
201
|
+
const { dense } = useScreen()
|
|
201
202
|
// expose
|
|
202
203
|
return {
|
|
203
204
|
dense
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<div class="row justify-between items-center no-wrap">
|
|
7
7
|
<div :class="{ 'q-pa-xs': $q.screen.xs, 'q-pa-sm': $q.screen.gt.xs, 'col-auto': true }">
|
|
8
8
|
<q-fab
|
|
9
|
+
id="composer-fab"
|
|
9
10
|
:icon="getKindIcon(currentType)"
|
|
10
11
|
:color="getKindColor(currentType)"
|
|
11
12
|
direction="up"
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
<!--
|
|
43
44
|
Editor
|
|
44
45
|
-->
|
|
45
|
-
<div class="q-pa-sm col">
|
|
46
|
+
<div class="q-pa-sm full-width col">
|
|
46
47
|
<q-editor
|
|
47
48
|
v-if="editor"
|
|
48
49
|
:placeholder="$t('KMessageComposer.WRITE_YOUR_MESSAGE')"
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
v-else
|
|
58
59
|
:placeholder="$t('KMessageComposer.WRITE_YOUR_MESSAGE')"
|
|
59
60
|
v-model="body"
|
|
61
|
+
autogrow
|
|
60
62
|
borderless
|
|
61
63
|
dense
|
|
62
64
|
@keydown.enter.prevent="sendMessage"
|
|
@@ -87,16 +89,14 @@
|
|
|
87
89
|
</template>
|
|
88
90
|
|
|
89
91
|
<script setup>
|
|
90
|
-
import {
|
|
91
|
-
i18n,
|
|
92
|
-
composables as kdkCoreComposables,
|
|
93
|
-
Store
|
|
94
|
-
} from '@kalisio/kdk/core.client'
|
|
95
92
|
import config from 'config'
|
|
96
93
|
import _ from 'lodash'
|
|
97
94
|
import logger from 'loglevel'
|
|
98
95
|
import { Notify, useQuasar } from 'quasar'
|
|
99
96
|
import { computed, ref } from 'vue'
|
|
97
|
+
import { i18n } from '../../i18n.js'
|
|
98
|
+
import { Store } from '../../store.js'
|
|
99
|
+
import { useMessages } from '../../composables/index.js'
|
|
100
100
|
import KUploader from '../document/KUploader.vue'
|
|
101
101
|
|
|
102
102
|
// Props
|
|
@@ -116,6 +116,10 @@ const props = defineProps({
|
|
|
116
116
|
canSendMessage: {
|
|
117
117
|
type: Boolean,
|
|
118
118
|
default: true
|
|
119
|
+
},
|
|
120
|
+
editorModeByDefault: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false
|
|
119
123
|
}
|
|
120
124
|
})
|
|
121
125
|
|
|
@@ -123,8 +127,8 @@ const props = defineProps({
|
|
|
123
127
|
const $q = useQuasar()
|
|
124
128
|
const User = Store.get('user')
|
|
125
129
|
const MessageTypes = props.messageTypes ?? config.messagesActivity.messages
|
|
126
|
-
const { createMessage } =
|
|
127
|
-
const editor = ref(
|
|
130
|
+
const { createMessage } = useMessages()
|
|
131
|
+
const editor = ref(props.editorModeByDefault)
|
|
128
132
|
const uploaderRef = ref(null)
|
|
129
133
|
const attachments = ref(null)
|
|
130
134
|
const currentType = ref(_.head(_.keys(MessageTypes)))
|
|
@@ -165,6 +169,7 @@ async function sendMessage () {
|
|
|
165
169
|
type: currentType.value,
|
|
166
170
|
body: body.value,
|
|
167
171
|
author: _.get(User, 'profile.name'),
|
|
172
|
+
authorId: _.get(User, '_id'),
|
|
168
173
|
attachments: attachments.value
|
|
169
174
|
}
|
|
170
175
|
if (props.baseMessage) _.merge(message, props.baseMessage)
|
|
@@ -174,7 +179,6 @@ async function sendMessage () {
|
|
|
174
179
|
(_.some(attachments.value, (file) => !file.type) ||
|
|
175
180
|
_.some(attachments.value, (file) => !file.name))
|
|
176
181
|
) {
|
|
177
|
-
console.error('Invalid file type')
|
|
178
182
|
Notify.create({
|
|
179
183
|
type: 'negative',
|
|
180
184
|
message: i18n.t('KUploader.INVALID_TYPE')
|