@kalisio/kdk 2.5.3 → 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 +3 -3
- 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/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 +6 -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 +6 -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/KPosition.vue +5 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +71 -8
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +119 -59
- 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/globe.js +2 -0
- package/map/client/i18n/map_en.json +29 -7
- package/map/client/i18n/map_fr.json +29 -7
- 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 +179 -31
- 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 +197 -51
- 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 -24
- 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/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 -958
- 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 -967
- 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 -520
- 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 -532
- 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 -202
- 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 -310
- 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 -476
- 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 -958
- 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 -967
- 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 -520
- 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 -532
- 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 -202
- 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 -310
- 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 -476
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -553
- 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 -1294
- 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 -169
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/lcov-report/map/api/models/index.html +0 -176
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +0 -112
- 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 -328
- 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 -1054
- 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/api/services/styles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +0 -196
- 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 -130
- 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 -11520
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -553
- package/coverage/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1294
- 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 -169
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/map/api/models/index.html +0 -176
- package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/map/api/models/styles.model.mongodb.js.html +0 -112
- 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 -328
- 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 -1054
- 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/api/services/styles/index.html +0 -116
- package/coverage/map/api/services/styles/styles.hooks.js.html +0 -196
- 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 -130
- 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-151198-1753351220086-0.json +0 -1
- package/coverage/tmp/coverage-151210-1753351220070-0.json +0 -1
- package/coverage/tmp/coverage-151221-1753351129816-0.json +0 -1
- package/coverage/tmp/coverage-151233-1753351129803-0.json +0 -1
- package/coverage/tmp/coverage-151240-1753351129770-0.json +0 -1
- package/coverage/tmp/coverage-151307-1753351220058-0.json +0 -1
- package/coverage/tmp/coverage-151319-1753351220044-0.json +0 -1
- package/coverage/tmp/coverage-151326-1753351220010-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-02-05.log +0 -23
- package/test/api/core/test-log-2025-05-21.log +0 -15
- package/test/api/core/test-log-2025-06-25.log +0 -9
- package/test/api/core/test-log-2025-07-24.log +0 -44
- package/test/api/map/test-log-2025-05-27.log +0 -13
- package/test/api/map/test-log-2025-06-23.log +0 -7
- package/test/api/map/test-log-2025-07-24.log +0 -11
- 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
|
@@ -5,13 +5,14 @@ import { useQuasar, Loading } from 'quasar'
|
|
|
5
5
|
import { api } from '../api.js'
|
|
6
6
|
import { i18n } from '../i18n.js'
|
|
7
7
|
import { Events } from '../events.js'
|
|
8
|
-
import { Store } from '../store.js'
|
|
9
8
|
import { beforeGuard } from '../guards.js'
|
|
10
9
|
import { LocalStorage } from '../local-storage.js'
|
|
11
10
|
import { restoreSession } from '../utils/utils.session.js'
|
|
11
|
+
import { useUser } from './user.js'
|
|
12
12
|
|
|
13
13
|
export function useSession (options = {}) {
|
|
14
14
|
// Data
|
|
15
|
+
const { User } = useUser()
|
|
15
16
|
const disconnectKey = 'disconnect-dialog'
|
|
16
17
|
const reconnectKey = 'reconnect-dialog'
|
|
17
18
|
const router = useRouter()
|
|
@@ -23,8 +24,6 @@ export function useSession (options = {}) {
|
|
|
23
24
|
let pendingReload = null
|
|
24
25
|
let ignoreReconnectionError = false
|
|
25
26
|
|
|
26
|
-
const User = Store.getRef('user')
|
|
27
|
-
|
|
28
27
|
// Functions
|
|
29
28
|
function getRedirectKey () {
|
|
30
29
|
return 'redirect'
|
|
@@ -64,7 +63,7 @@ export function useSession (options = {}) {
|
|
|
64
63
|
// The first time initialize guards after the app has been correctly setup,
|
|
65
64
|
// ie either with or without a restored user and a redirection
|
|
66
65
|
if (!isInitialized.value) {
|
|
67
|
-
router.beforeEach(beforeGuard)
|
|
66
|
+
if (router) router.beforeEach(beforeGuard)
|
|
68
67
|
isInitialized.value = true
|
|
69
68
|
}
|
|
70
69
|
}
|
|
@@ -174,12 +173,13 @@ export function useSession (options = {}) {
|
|
|
174
173
|
}
|
|
175
174
|
// Then redirection
|
|
176
175
|
Events.on('user-abilities-changed', redirect)
|
|
177
|
-
api.on('logout', () => {
|
|
176
|
+
api.on('logout', async () => {
|
|
178
177
|
// Used to automatically redirect when the user has requested a logout from another client
|
|
179
178
|
// We don't use redirect() here as in this case the user is already logout and it would redirect to login instead
|
|
180
|
-
|
|
179
|
+
if (typeof options.logout === 'function') result = await options.logout()
|
|
180
|
+
else if (typeof options.logout === 'string') router.push({ name: options.logout })
|
|
181
|
+
else router.push({ name: 'logout' })
|
|
181
182
|
})
|
|
182
|
-
|
|
183
183
|
try {
|
|
184
184
|
await restoreSession()
|
|
185
185
|
} catch (error) {
|
|
@@ -198,7 +198,6 @@ export function useSession (options = {}) {
|
|
|
198
198
|
|
|
199
199
|
// Expose
|
|
200
200
|
return {
|
|
201
|
-
User,
|
|
202
201
|
redirect,
|
|
203
202
|
isInitialized,
|
|
204
203
|
onReconnectError,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Store } from '../store.js'
|
|
4
|
+
|
|
5
|
+
const User = Store.getRef('user')
|
|
6
|
+
|
|
7
|
+
export function useUser () {
|
|
8
|
+
|
|
9
|
+
// computed
|
|
10
|
+
const name = computed(() => {
|
|
11
|
+
return _.get(User.value, 'profile.name', _.get(User.value, 'profile.username', _.get(User.value, 'email', '')))
|
|
12
|
+
})
|
|
13
|
+
const description = computed(() => {
|
|
14
|
+
return _.get(User.value, 'profile.description', '')
|
|
15
|
+
})
|
|
16
|
+
const avatar = computed(() => {
|
|
17
|
+
return _.get(User.value, 'profile', {})
|
|
18
|
+
})
|
|
19
|
+
const permissions = computed(() => {
|
|
20
|
+
return _.get(User.value, 'permissions')
|
|
21
|
+
})
|
|
22
|
+
const role = computed(() => {
|
|
23
|
+
if (_.isEmpty(permissions.value)) return
|
|
24
|
+
if (_.isString(permissions.value)) return permissions.value
|
|
25
|
+
return permissions.value[0]
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
// Expose
|
|
29
|
+
return {
|
|
30
|
+
User,
|
|
31
|
+
name,
|
|
32
|
+
avatar,
|
|
33
|
+
description,
|
|
34
|
+
role
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import logger from 'loglevel'
|
|
3
|
+
import { colors, Notify } from 'quasar'
|
|
4
|
+
import { Reader } from '../reader.js'
|
|
5
|
+
import { i18n } from '../i18n.js'
|
|
6
|
+
import { formatSize } from '../utils/utils.files.js'
|
|
7
|
+
|
|
8
|
+
export const vDropFile = {
|
|
9
|
+
|
|
10
|
+
mounted (el, binding) {
|
|
11
|
+
el.__state = {
|
|
12
|
+
dropCallback: _.get(binding.value, 'dropCallback'),
|
|
13
|
+
acceptedTypes: _.get(binding.value, 'mimeTypes'),
|
|
14
|
+
maxFiles: _.get(binding.value, 'maxFiles'),
|
|
15
|
+
maxFileSize: _.get(binding.value, 'maxFileSize'),
|
|
16
|
+
maxTotalSize: _.get(binding.value, 'maxTotalSize'),
|
|
17
|
+
fontSize: _.get(binding.value, 'fontSize', '2rem'),
|
|
18
|
+
enabled: _.get(binding.value, 'enabled', true)
|
|
19
|
+
}
|
|
20
|
+
// check whether the dropCallback has been set properly
|
|
21
|
+
if (!el.__state.dropCallback || typeof el.__state.dropCallback !== 'function') {
|
|
22
|
+
logger.error(`[KDK] Missing 'dropCallback' argument in 'v-drop-file' directive`)
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
// make element relative
|
|
26
|
+
el.style.position = 'relative'
|
|
27
|
+
// create overlay element
|
|
28
|
+
const overlay = document.createElement('div');
|
|
29
|
+
overlay.className = 'drag-overlay'
|
|
30
|
+
overlay.innerHTML = `<div class="drag-overlay-box" />`
|
|
31
|
+
el.appendChild(overlay)
|
|
32
|
+
const style = document.createElement('style')
|
|
33
|
+
style.textContent = `
|
|
34
|
+
.drag-overlay {
|
|
35
|
+
display: none;
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0; left: 0;
|
|
38
|
+
width: 100%; height: 100%;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
font-size: ${el.__state.fontSize};
|
|
42
|
+
z-index: 9999;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
.drag-overlay-box {
|
|
46
|
+
display: flex;
|
|
47
|
+
border: 3px dashed;
|
|
48
|
+
width: 95%; height: 95%;
|
|
49
|
+
border-radius: 5px;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
align-items: center;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
`
|
|
55
|
+
document.head.appendChild(style)
|
|
56
|
+
const showOverlay = () => overlay.style.display = 'flex'
|
|
57
|
+
const hideOverlay = () => overlay.style.display = 'none'
|
|
58
|
+
let dragCounter = 0
|
|
59
|
+
let canDrop = false
|
|
60
|
+
|
|
61
|
+
const onDragEnter = (e) => {
|
|
62
|
+
// check whether the directive is enabled
|
|
63
|
+
if (!el.__state.enabled) return
|
|
64
|
+
e.preventDefault()
|
|
65
|
+
// check the dragged items
|
|
66
|
+
const items = e.dataTransfer.items
|
|
67
|
+
let rejectedItems = []
|
|
68
|
+
let acceptedItems = []
|
|
69
|
+
let color, message
|
|
70
|
+
if (el.__state.maxFiles && _.size(items) > el.__state.maxFiles) {
|
|
71
|
+
color = colors.getPaletteColor('negative')
|
|
72
|
+
message = i18n.tc('errors.MAX_FILES_REACHED', el.__state.maxFiles)
|
|
73
|
+
} else {
|
|
74
|
+
for (const item of items) {
|
|
75
|
+
if (item.kind === 'file' && _.includes(el.__state.acceptedTypes, item.type)) acceptedItems.push(item)
|
|
76
|
+
else rejectedItems.push(item)
|
|
77
|
+
}
|
|
78
|
+
if (_.isEmpty(acceptedItems)) {
|
|
79
|
+
color = colors.getPaletteColor('negative')
|
|
80
|
+
message = i18n.tc('directives.ALL_FILES_ARE_UNSUPPORTED', rejectedItems.length)
|
|
81
|
+
}
|
|
82
|
+
else if (_.isEmpty(rejectedItems)) {
|
|
83
|
+
color = colors.getPaletteColor('positive')
|
|
84
|
+
message = i18n.tc('directives.DROP_FILES', acceptedItems.length)
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
color = colors.getPaletteColor('warning')
|
|
88
|
+
message = i18n.t('directives.SOME_FILES_ARE_UNSUPPORTED')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
canDrop = _.size(acceptedItems) > 0
|
|
92
|
+
// customize the overlay
|
|
93
|
+
overlay.style.background = '#0007'
|
|
94
|
+
const overlayBox = overlay.querySelector('.drag-overlay-box')
|
|
95
|
+
overlayBox.textContent = message
|
|
96
|
+
overlayBox.style.borderColor = color
|
|
97
|
+
overlayBox.style.color = 'white'
|
|
98
|
+
overlayBox.style.textShadow = '-2px -2px 0 black, 2px -2px 0 black, -2px 2px 0 black, 2px 2px 0 black'
|
|
99
|
+
overlayBox.style.padding = '20px;'
|
|
100
|
+
// show the overlay
|
|
101
|
+
dragCounter++
|
|
102
|
+
showOverlay()
|
|
103
|
+
}
|
|
104
|
+
const onDragOver = (e) => {
|
|
105
|
+
e.preventDefault()
|
|
106
|
+
}
|
|
107
|
+
const onDragLeave = (e) => {
|
|
108
|
+
e.preventDefault()
|
|
109
|
+
dragCounter--
|
|
110
|
+
if (dragCounter === 0) hideOverlay()
|
|
111
|
+
}
|
|
112
|
+
const onDrop = async (e) => {
|
|
113
|
+
e.preventDefault()
|
|
114
|
+
dragCounter = 0
|
|
115
|
+
hideOverlay()
|
|
116
|
+
if (!canDrop) return
|
|
117
|
+
const files = Array.from(e.dataTransfer.files)
|
|
118
|
+
const acceptedFiles = Reader.filter(files)
|
|
119
|
+
if (el.__state.maxTotalSize && _.size(acceptedFiles) > 1) {
|
|
120
|
+
let totalSize = _.reduce(acceptedFiles, (size, file) => {
|
|
121
|
+
size += file.files[0].size
|
|
122
|
+
return size
|
|
123
|
+
}, 0)
|
|
124
|
+
if (totalSize > el.__state.maxTotalSize) {
|
|
125
|
+
Notify.create({ type: 'negative', message: i18n.t('errors.MAX_TOTAL_SIZE_FILES_REACHED', { maxSize: formatSize(el.__state.maxTotalSize) }) })
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
for (const file of acceptedFiles) {
|
|
130
|
+
if (el.__state.maxFileSize) {
|
|
131
|
+
let size = file.files[0].size
|
|
132
|
+
if (size > el.__state.maxFileSize) {
|
|
133
|
+
Notify.create({ type: 'negative', message: i18n.t('errors.MAX_FILE_SIZE_REACHED', { file: file.name, maxSize: formatSize(el.__state.maxFileSize) }) })
|
|
134
|
+
continue
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const content = await Reader.read(file)
|
|
138
|
+
await el.__state.dropCallback(content)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
el.__handlers = { onDragEnter, onDragOver, onDragLeave, onDrop }
|
|
143
|
+
el.addEventListener('dragenter', onDragEnter)
|
|
144
|
+
el.addEventListener('dragover', onDragOver)
|
|
145
|
+
el.addEventListener('dragleave', onDragLeave)
|
|
146
|
+
el.addEventListener('drop', onDrop)
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
updated (el, binding) {
|
|
150
|
+
// Handle arguments changes
|
|
151
|
+
if (binding.value !== binding.oldValue) {
|
|
152
|
+
el.__state = {
|
|
153
|
+
dropCallback: _.get(binding.value, 'dropCallback'),
|
|
154
|
+
acceptedTypes: _.get(binding.value, 'mimeTypes'),
|
|
155
|
+
maxFiles: _.get(binding.value, 'maxFiles'),
|
|
156
|
+
maxFileSize: _.get(binding.value, 'maxFileSize'),
|
|
157
|
+
maxTotalSize: _.get(binding.value, 'maxTotalSize'),
|
|
158
|
+
fontSize: _.get(binding.value, 'fontSize', '2rem'),
|
|
159
|
+
enabled: _.get(binding.value, 'enabled', true)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
beforeUnmount (el, binding) {
|
|
165
|
+
// Clean directive
|
|
166
|
+
const { onDragEnter, onDragOver, onDragLeave, onDrop } = el.__handlers
|
|
167
|
+
el.removeEventListener('dragenter', onDragEnter)
|
|
168
|
+
el.removeEventListener('dragover', onDragOver)
|
|
169
|
+
el.removeEventListener('dragleave', onDragLeave)
|
|
170
|
+
el.removeEventListener('drop', onDrop)
|
|
171
|
+
delete el.__handlers
|
|
172
|
+
delete el.__state
|
|
173
|
+
}
|
|
174
|
+
}
|
package/core/client/document.js
CHANGED
|
@@ -46,7 +46,8 @@ export const Document = {
|
|
|
46
46
|
},
|
|
47
47
|
htmlSanitizer: {
|
|
48
48
|
allowedTags: sanitize.defaults.allowedTags.concat(['img', 'strike']),
|
|
49
|
-
allowedAttributes: _.assign(sanitize.defaults.allowedAttributes, { div: ['style'] })
|
|
49
|
+
allowedAttributes: _.assign(sanitize.defaults.allowedAttributes, { div: ['style'] }),
|
|
50
|
+
allowedSchemesByTag: { img: ['http', 'https', 'ftp', 'data'] }
|
|
50
51
|
},
|
|
51
52
|
mdConverter: {}
|
|
52
53
|
})
|
package/core/client/exporter.js
CHANGED
|
@@ -14,7 +14,7 @@ const ExporterQueue = {
|
|
|
14
14
|
this.exportService = api.getService('import-export')
|
|
15
15
|
this.exportService.on('export-created', params => this.onRequestCreated(params))
|
|
16
16
|
this.exportService.on('export-completed', params => this.onRequestCompleted(params))
|
|
17
|
-
logger.debug(`[KDK]
|
|
17
|
+
logger.debug(`[KDK] Initialized 'Exporter' with '${maxConcurrentRequests}' maxConcurrentRequests`)
|
|
18
18
|
},
|
|
19
19
|
push (request) {
|
|
20
20
|
this.pendingRequests.push(request)
|
|
@@ -30,7 +30,6 @@ const ExporterQueue = {
|
|
|
30
30
|
if (!filename) {
|
|
31
31
|
const timestamp = moment().toISOString().replace(/:/g, '-')
|
|
32
32
|
filename = `${_.get(request, 'basename', request.service)}_${timestamp}.${request.format}`
|
|
33
|
-
if (_.get(request, 'gzip', true)) filename += '.gz'
|
|
34
33
|
}
|
|
35
34
|
// retrieve the target service path
|
|
36
35
|
let servicePath = api.getServicePath(request.service)
|
|
@@ -86,7 +85,22 @@ const ExporterQueue = {
|
|
|
86
85
|
document.body.appendChild(iframe)
|
|
87
86
|
}
|
|
88
87
|
iframe.src = params.SignedUrl
|
|
89
|
-
|
|
88
|
+
Notify.create({
|
|
89
|
+
type: 'positive',
|
|
90
|
+
message: i18n.t('exporter.SUCCEEDED', { filename: params.filename }),
|
|
91
|
+
html: true
|
|
92
|
+
})
|
|
93
|
+
} else if (params.chunks === 0) {
|
|
94
|
+
Notify.create({
|
|
95
|
+
type: 'warning',
|
|
96
|
+
message: i18n.t('exporter.NO_DATA')
|
|
97
|
+
})
|
|
98
|
+
} else {
|
|
99
|
+
Notify.create({
|
|
100
|
+
type: 'negative',
|
|
101
|
+
message: i18n.t('exporter.ERRORED')
|
|
102
|
+
})
|
|
103
|
+
}
|
|
90
104
|
// trigger a new request
|
|
91
105
|
this.triggerRequest()
|
|
92
106
|
}
|
|
@@ -79,12 +79,14 @@
|
|
|
79
79
|
"OAUTH2_PROVIDER": "You cannot update your account because it is managed by {provider}, in order to switch to a local account reset your password first",
|
|
80
80
|
"EMAIL_ALREADY_TAKEN": "A user with this email address seems to be already registered",
|
|
81
81
|
"OBJECT_ID_ALREADY_TAKEN": "An item with this identifier seems to already exist. Please try again with another value.",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
82
|
+
"MAX_FILES_REACHED": "Oops ! You can only drop one file | Oops! You can only drop up to {n} files at once",
|
|
83
|
+
"MAX_FILE_SIZE_REACHED": "Oops ! The file exceeds the maximum allowed size of {maxSize}",
|
|
84
|
+
"MAX_TOTAL_SIZE_FILES_REACHED": "Oops ! The total size files exceeds the maximum allowed total limit of {maxSize}",
|
|
85
|
+
"UNSUPPORTED_FILE_FORMAT": "Oops ! The {file} file format is not supported",
|
|
86
|
+
"CANNOT_READ_FILE": "Oops ! Unable to read the file {file}",
|
|
87
|
+
"INVALID_JSON_FILE": "Oops ! {file} is not a valid JSON file",
|
|
88
|
+
"INVALID_CSV_FILE": "Oops ! {file} is not a valid CSV file",
|
|
89
|
+
"NETWORK_ERROR": "Oops ! Network or service error occurred"
|
|
88
90
|
},
|
|
89
91
|
"units": {
|
|
90
92
|
"METER_SYMBOL": "m",
|
|
@@ -158,6 +160,11 @@
|
|
|
158
160
|
"MICROSIEVERT_PER_HOUR_LABEL": "Microsieverts per hour",
|
|
159
161
|
"NANOSIEVERT_PER_HOUR_LABEL": "Nanosieverts per hour"
|
|
160
162
|
},
|
|
163
|
+
"directives": {
|
|
164
|
+
"ALL_FILES_ARE_UNSUPPORTED": "Oops ! File is not supported | Oops ! None of the files are supported",
|
|
165
|
+
"SOME_FILES_ARE_UNSUPPORTED": "Some files will be ignored due to unsupported types",
|
|
166
|
+
"DROP_FILES": "Drop file here | Drop files here"
|
|
167
|
+
},
|
|
161
168
|
"mixins": {
|
|
162
169
|
"baseItem": {
|
|
163
170
|
"REMOVE_ITEM_TITLE": "Are you sure you want to delete <b>{name}</b> ?",
|
|
@@ -187,6 +194,11 @@
|
|
|
187
194
|
}
|
|
188
195
|
},
|
|
189
196
|
"utils": {
|
|
197
|
+
"files": {
|
|
198
|
+
"B": "B",
|
|
199
|
+
"KB": "KB",
|
|
200
|
+
"MB": "MB"
|
|
201
|
+
},
|
|
190
202
|
"pwa": {
|
|
191
203
|
"INSTALL_TITLE": "Install the application ?",
|
|
192
204
|
"INSTALL_MESSAGE": "We recommend to install the application to take full advantage of all the features",
|
|
@@ -290,7 +302,10 @@
|
|
|
290
302
|
"MESSAGE": "Select the file format to export",
|
|
291
303
|
"EXPORT": "Export",
|
|
292
304
|
"EXPORTING": "Please wait while exporting data",
|
|
293
|
-
"EXPORTS_LIMIT_REACHED": "You have reached the maximum number of exports allowed"
|
|
305
|
+
"EXPORTS_LIMIT_REACHED": "You have reached the maximum number of exports allowed",
|
|
306
|
+
"SUCCEEDED": "Export successful: your data has been saved to the file <b>{filename}</b>",
|
|
307
|
+
"NO_DATA": "Export skipped: no data found to export",
|
|
308
|
+
"ERRORED": "Oops! Export failed: an error occurred while exporting data"
|
|
294
309
|
},
|
|
295
310
|
"reader": {
|
|
296
311
|
"READING_FILE": "Reading file {file}"
|
|
@@ -746,5 +761,17 @@
|
|
|
746
761
|
"FILE_TOO_LARGE": "File {file} is too large. The size must be less than {size}Mb",
|
|
747
762
|
"UPLOAD_FILE_SUCCEEDED": "File {file} has been successfully uploaded",
|
|
748
763
|
"UPLOAD_FILE_ERRORED": "Cannot upload file {file} !"
|
|
764
|
+
},
|
|
765
|
+
"KTagManager": {
|
|
766
|
+
"TITLE": "Tags",
|
|
767
|
+
"CREATE_TAG": "Create a tag",
|
|
768
|
+
"EDIT_TAG": "Edit tag",
|
|
769
|
+
"DELETE_TAG": "Delete tag",
|
|
770
|
+
"SORT_TAGS": "Sort tags",
|
|
771
|
+
"CREATE_TAG_ON_THE_FLY": "Create tag",
|
|
772
|
+
"TAG_NAME": "Enter the name",
|
|
773
|
+
"TAG_SERVICE": "Tag type",
|
|
774
|
+
"TAG_DESCRIPTION": "Enter a description",
|
|
775
|
+
"TAG_COLOR": "Select a color"
|
|
749
776
|
}
|
|
750
777
|
}
|
|
@@ -79,12 +79,14 @@
|
|
|
79
79
|
"OAUTH2_PROVIDER": "Vous ne pouvez modifier votre compte car il est géré par {provider}, pour utiliser un compte local réinitialisez tout d'abord votre mot de passe",
|
|
80
80
|
"EMAIL_ALREADY_TAKEN": "Un utilisateur semble déjà enregistré avec cette adresse mail",
|
|
81
81
|
"OBJECT_ID_ALREADY_TAKEN": "Un élément semble déjà enregistré avec cet identifiant. Merci de réessayer avec une autre valeur.",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
82
|
+
"MAX_FILES_REACHED": "Oups ! Vous ne pouvez déposer qu'un seul fichier | Oups ! Vous ne pouvez déposer que jusqu’à {n} fichiers à la fois",
|
|
83
|
+
"MAX_FILE_SIZE_REACHED": "Oups ! Le fichier {file} dépasse la taille maximale autorisée de {maxSize}",
|
|
84
|
+
"MAX_TOTAL_SIZE_FILES_REACHED": "Oups ! La taille totale de tous les fichiers dépasse la limite maximale autorisée de {maxSize}",
|
|
85
|
+
"UNSUPPORTED_FILE_FORMAT": "Oups ! Le format du fichier {file} n'est pas supporté",
|
|
86
|
+
"CANNOT_READ_FILE": "Oups ! Impossible de lire le fichier {file}",
|
|
87
|
+
"INVALID_JSON_FILE": "Oups ! {file} n'est pas un fichier JSON valide",
|
|
88
|
+
"INVALID_CSV_FILE": "Oups ! {file} n'est pas un fichier CSV valide",
|
|
89
|
+
"NETWORK_ERROR": "Oups ! Une erreur réseau s'est produite ou le service est indisponible"
|
|
88
90
|
},
|
|
89
91
|
"units": {
|
|
90
92
|
"METER_SYMBOL": "m",
|
|
@@ -158,9 +160,14 @@
|
|
|
158
160
|
"MICROSIEVERT_PER_HOUR_LABEL": "Microsieverts par heure",
|
|
159
161
|
"NANOSIEVERT_PER_HOUR_LABEL": "Nanosieverts par heure"
|
|
160
162
|
},
|
|
163
|
+
"directives": {
|
|
164
|
+
"ALL_FILES_ARE_UNSUPPORTED": "Oups ! Fichier non pris en charge | Oups ! Aucun des fichiers n'est pris en charge",
|
|
165
|
+
"SOME_FILES_ARE_UNSUPPORTED": "Certains fichiers seront ignorés en raison de types non pris en charge",
|
|
166
|
+
"DROP_FILES": "Déposez le fichier ici | Déposez les fichiers ici"
|
|
167
|
+
},
|
|
161
168
|
"mixins": {
|
|
162
169
|
"baseItem": {
|
|
163
|
-
"REMOVE_ITEM_TITLE": "
|
|
170
|
+
"REMOVE_ITEM_TITLE": "Êtes vous sûr de vouloir supprimer <b>{name}</b> ?",
|
|
164
171
|
"REMOVE_ITEM_MESSAGE": "Merci de saisir le nom pour confirmer la suppression",
|
|
165
172
|
"ITEM_EXPORTED": "Export du contenu de {name} dans {file}",
|
|
166
173
|
"CANNOT_EXPORT_ITEM": "Impossible d'exporter {name}. Votre navigateur supporte t'il la fonctionnalité ?"
|
|
@@ -187,6 +194,11 @@
|
|
|
187
194
|
}
|
|
188
195
|
},
|
|
189
196
|
"utils": {
|
|
197
|
+
"files": {
|
|
198
|
+
"B": "o",
|
|
199
|
+
"KB": "Ko",
|
|
200
|
+
"MB": "Mo"
|
|
201
|
+
},
|
|
190
202
|
"pwa": {
|
|
191
203
|
"INSTALL_TITLE": "Installer l'application ?",
|
|
192
204
|
"INSTALL_MESSAGE": "Nous vous recommandons d'installer l'application pour profiter pleinement de toutes les fonctionnalités",
|
|
@@ -287,10 +299,13 @@
|
|
|
287
299
|
},
|
|
288
300
|
"exporter": {
|
|
289
301
|
"TITLE": "Exporter les données",
|
|
290
|
-
"MESSAGE": "
|
|
302
|
+
"MESSAGE": "Sélectionnez le format de fichier à exporter",
|
|
291
303
|
"EXPORT": "Exporter",
|
|
292
304
|
"EXPORTING": "Merci de patienter pendant l'export des données",
|
|
293
|
-
"EXPORTS_LIMIT_REACHED": "Vous avez atteint le nombre maximum d'exports autorisés"
|
|
305
|
+
"EXPORTS_LIMIT_REACHED": "Vous avez atteint le nombre maximum d'exports autorisés",
|
|
306
|
+
"SUCCEEDED": "Exportation terminée : les données ont été exportées dans le fichier <b>{filename}</b>",
|
|
307
|
+
"NO_DATA": "Exportation annulée : aucune donnée trouvée à exporter",
|
|
308
|
+
"ERROR": "Oops ! Échec de l’exportation : une erreur est survenue durant l'export des données"
|
|
294
309
|
},
|
|
295
310
|
"reader": {
|
|
296
311
|
"READING_FILE": "Lecture de {file} en cours"
|
|
@@ -746,5 +761,17 @@
|
|
|
746
761
|
"FILE_TOO_LARGE": "Le fichier {file} est trop volumineux. La taille doit être inférieure à {size}Mo",
|
|
747
762
|
"UPLOAD_FILE_SUCCEEDED": "Le fichier {file} a été transféré avec succès",
|
|
748
763
|
"UPLOAD_FILE_ERRORED": "Impossible de transférer le fichier {file} !"
|
|
764
|
+
},
|
|
765
|
+
"KTagManager": {
|
|
766
|
+
"TITLE": "Étiquettes",
|
|
767
|
+
"CREATE_TAG": "Créer une étiquette",
|
|
768
|
+
"EDIT_TAG": "Modifier l'étiquette",
|
|
769
|
+
"DELETE_TAG": "Supprimer l'étiquette",
|
|
770
|
+
"SORT_TAGS": "Trier les étiquettes",
|
|
771
|
+
"CREATE_TAG_ON_THE_FLY": "Créer l'étiquette",
|
|
772
|
+
"TAG_NAME": "Saisissez le nom",
|
|
773
|
+
"TAG_SERVICE": "Type de tag",
|
|
774
|
+
"TAG_DESCRIPTION": "Saisissez une description",
|
|
775
|
+
"TAG_COLOR": "Sélectionnez la couleur"
|
|
749
776
|
}
|
|
750
777
|
}
|
package/core/client/i18n.js
CHANGED
|
@@ -2,10 +2,10 @@ import _ from 'lodash'
|
|
|
2
2
|
import logger from 'loglevel'
|
|
3
3
|
import { Quasar } from 'quasar'
|
|
4
4
|
import { createI18n } from 'vue-i18n'
|
|
5
|
-
import {
|
|
5
|
+
import { getLocale, getFallbackLocale } from './utils/utils.locale.js'
|
|
6
6
|
|
|
7
7
|
// Helper function to load a translation file
|
|
8
|
-
// @i18n alias
|
|
8
|
+
// @i18n alias should be added in the quasar.config build section
|
|
9
9
|
async function loadTranslationBundles (bundles, locale, fallbackLocale) {
|
|
10
10
|
const translations = {}
|
|
11
11
|
translations[locale] = {}
|
|
@@ -27,19 +27,31 @@ async function loadTranslationBundles (bundles, locale, fallbackLocale) {
|
|
|
27
27
|
return translations
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
// Helper function to install a Quasar language pack
|
|
31
|
+
// It first tries to install the language pack for the full locale (e.g. en-US) and, if unavailable,
|
|
32
|
+
// falls back to the 2-letter language code (e.g. en)
|
|
33
|
+
async function installQuasarLanguage (fullLocale, locale) {
|
|
34
|
+
let languagePack
|
|
35
|
+
try {
|
|
36
|
+
languagePack = await import(`quasar/lang/${fullLocale}.js`)
|
|
37
|
+
} catch (error) {
|
|
36
38
|
try {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
if (locale !== fullLocale) languagePack = await import(`quasar/lang/${locale}.js`)
|
|
40
|
+
else logger.error(`[KDK] Could not load Quasar lang for locale: ${fullLocale}`)
|
|
39
41
|
} catch (error) {
|
|
40
|
-
logger.error(
|
|
42
|
+
logger.error(`[KDK] Could not load Quasar lang for locale: ${fullLocale}`)
|
|
41
43
|
}
|
|
44
|
+
}
|
|
45
|
+
if (!languagePack) return false
|
|
46
|
+
Quasar.lang.set(languagePack.default)
|
|
47
|
+
return true
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const i18n = {
|
|
51
|
+
async initialize (app, bundles) {
|
|
42
52
|
// Create i18n instance using the translation bundles
|
|
53
|
+
const fallbackLocale = getFallbackLocale()
|
|
54
|
+
const locale = getLocale()
|
|
43
55
|
this.i18n = createI18n({
|
|
44
56
|
locale,
|
|
45
57
|
fallbackLocale,
|
|
@@ -47,6 +59,9 @@ export const i18n = {
|
|
|
47
59
|
silentFallbackWarn: true
|
|
48
60
|
})
|
|
49
61
|
app.use(this.i18n)
|
|
62
|
+
// Install Quasar langage pack
|
|
63
|
+
const languagePackInstalled = await installQuasarLanguage(getLocale(false), locale)
|
|
64
|
+
if (!languagePackInstalled) await installQuasarLanguage(getFallbackLocale(false), fallbackLocale)
|
|
50
65
|
},
|
|
51
66
|
registerTranslation (translation) {
|
|
52
67
|
if (!this.i18n) {
|
package/core/client/layout.js
CHANGED
|
@@ -16,8 +16,8 @@ export const DefaultZIndex = {
|
|
|
16
16
|
const layoutPath = 'layout'
|
|
17
17
|
const contentDefaults = { content: undefined, filter: {}, mode: undefined, visible: false }
|
|
18
18
|
const paneDefaults = { opener: false, size: [0, 0], zIndex: DefaultZIndex.panes }
|
|
19
|
-
const
|
|
20
|
-
const windowDefaults = { state: undefined, position: undefined, size: undefined, current: undefined, controls:
|
|
19
|
+
const windowDefaultControls = { menu: true, pin: true, unpin: true, maximize: true, restore: true, close: true, resize: true }
|
|
20
|
+
const windowDefaults = { state: undefined, position: undefined, size: undefined, current: undefined, controls: windowDefaultControls, controlsMenuBreakpoint: 'xs', zIndex: 980 }
|
|
21
21
|
const hWindowDefaultSizePolicy = {
|
|
22
22
|
minSize: [300, 200],
|
|
23
23
|
floating: { position: [0, 0], size: [300, 200] },
|
|
@@ -391,8 +391,8 @@ export const Layout = {
|
|
|
391
391
|
return this.getElement(`windows.${placement}`)
|
|
392
392
|
},
|
|
393
393
|
setWindow (placement, options, context) {
|
|
394
|
-
// Take care to not bind widget
|
|
395
|
-
this.setElement(`windows.${placement}`, options, context, ['header'])
|
|
394
|
+
// Take care to not bind widget header/fab here as they will be when creating widgets
|
|
395
|
+
this.setElement(`windows.${placement}`, options, context, ['header', 'fab'])
|
|
396
396
|
},
|
|
397
397
|
setWindowMode (placement, mode) {
|
|
398
398
|
this.setElementMode(`windows.${placement}`, mode)
|
|
@@ -404,7 +404,7 @@ export const Layout = {
|
|
|
404
404
|
this.setElementVisible(`windows.${placement}`, visible)
|
|
405
405
|
},
|
|
406
406
|
setWindowControls (placement, controls) {
|
|
407
|
-
for (const key of _.keys(
|
|
407
|
+
for (const key of _.keys(windowDefaultControls)) {
|
|
408
408
|
if (!_.has(controls, key)) {
|
|
409
409
|
logger.warn(`[KDK] Invalid window control key ${key}`)
|
|
410
410
|
return
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
|
+
import config from 'config'
|
|
2
3
|
import { Layout } from '../layout.js'
|
|
4
|
+
import { Store } from '../store.js'
|
|
5
|
+
import { Events } from '../events.js'
|
|
3
6
|
|
|
4
7
|
export function baseActivity (name) {
|
|
5
8
|
return {
|
|
6
9
|
methods: {
|
|
7
10
|
getAppName () {
|
|
8
|
-
return
|
|
11
|
+
return config.appName
|
|
9
12
|
},
|
|
10
13
|
configurePadding () {
|
|
11
14
|
if (_.has(this.activityOptions, 'padding')) Layout.setPadding(_.get(this.activityOptions, 'padding'))
|
|
@@ -246,23 +249,23 @@ export function baseActivity (name) {
|
|
|
246
249
|
}
|
|
247
250
|
name = tourName
|
|
248
251
|
}
|
|
249
|
-
|
|
252
|
+
Store.patch('tours.current', { name })
|
|
250
253
|
}
|
|
251
254
|
},
|
|
252
255
|
beforeCreate () {
|
|
253
256
|
// Identify this activity using its name or the route name
|
|
254
257
|
this.activityName = name || _.camelCase(this.$options.name)
|
|
255
258
|
// Setup the options
|
|
256
|
-
this.activityOptions =
|
|
259
|
+
this.activityOptions = config[this.activityName]
|
|
257
260
|
},
|
|
258
261
|
mounted () {
|
|
259
262
|
// Configure the activity
|
|
260
263
|
this.configureActivity()
|
|
261
264
|
// Whenever the user abilities are updated, update activity as well
|
|
262
|
-
|
|
265
|
+
Events.on('user-abilities-changed', this.configureActivity)
|
|
263
266
|
},
|
|
264
267
|
beforeUnmount () {
|
|
265
|
-
|
|
268
|
+
Events.off('user-abilities-changed', this.configureActivity)
|
|
266
269
|
// Clear the activity
|
|
267
270
|
this.clearActivity()
|
|
268
271
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import logger from 'loglevel'
|
|
2
2
|
import _ from 'lodash'
|
|
3
|
+
import { i18n } from '../i18n.js'
|
|
3
4
|
|
|
4
5
|
export const baseEditor = {
|
|
5
6
|
emits: ['applied'],
|
|
@@ -43,7 +44,7 @@ export const baseEditor = {
|
|
|
43
44
|
if (this.getSchema()) {
|
|
44
45
|
const schemaTitle = this.getSchema().title
|
|
45
46
|
const objectName = _.get(this.getObject(), 'name')
|
|
46
|
-
return
|
|
47
|
+
return i18n.tie(schemaTitle, { name: objectName, interpolation: { escapeValue: false } })
|
|
47
48
|
}
|
|
48
49
|
return ''
|
|
49
50
|
},
|