@kalisio/kdk 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yaml +35 -6
- package/client.globe.js +8 -0
- package/client.js +8 -0
- package/client.map.js +8 -0
- package/core/api/hooks/hooks.push.js +3 -2
- package/core/api/hooks/hooks.tags.js +56 -0
- package/core/api/models/tags.model.mongodb.js +8 -0
- package/core/api/services/index.js +33 -2
- package/core/api/services/tags/tags.hooks.js +47 -0
- package/core/client/api.js +5 -5
- package/core/client/components/KActivity.vue +3 -2
- package/core/client/components/KChip.vue +2 -2
- package/core/client/components/KEditor.vue +3 -1
- package/core/client/components/KFollower.vue +4 -4
- package/core/client/components/KStore.vue +1 -1
- package/core/client/components/KTab.vue +20 -7
- package/core/client/components/account/KProfile.vue +9 -25
- package/core/client/components/action/KAction.vue +10 -10
- package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
- package/core/client/components/app/KHome.vue +3 -2
- package/core/client/components/collection/KFilter.vue +5 -4
- package/core/client/components/collection/KGrid.vue +5 -1
- package/core/client/components/collection/KItemsFilter.vue +47 -0
- package/core/client/components/collection/KItemsSorter.vue +42 -0
- package/core/client/components/collection/KScrollDown.vue +2 -2
- package/core/client/components/collection/KSearchFilterControl.vue +3 -2
- package/core/client/components/collection/KSorter.vue +33 -37
- package/core/client/components/collection/KTagsFilterControl.vue +14 -40
- package/core/client/components/collection/KTagsFilterView.vue +10 -45
- package/core/client/components/collection/KTimeFilterControl.vue +6 -7
- package/core/client/components/collection/KTimeFilterView.vue +13 -22
- package/core/client/components/collection/KTimeLine.vue +18 -9
- package/core/client/components/form/KColorField.vue +13 -6
- package/core/client/components/form/KColorScaleField.vue +7 -12
- package/core/client/components/form/KFileField.vue +118 -89
- package/core/client/components/form/KForm.vue +30 -18
- package/core/client/components/form/KIconField.vue +4 -1
- package/core/client/components/form/KNumberField.vue +9 -2
- package/core/client/components/form/KSelectField.vue +1 -4
- package/core/client/components/form/KTagField.vue +229 -0
- package/core/client/components/form/KTextField.vue +4 -0
- package/core/client/components/form/KTextareaField.vue +3 -1
- package/core/client/components/input/KShapePicker.vue +5 -5
- package/core/client/components/layout/KFab.vue +32 -20
- package/core/client/components/layout/KPage.vue +11 -6
- package/core/client/components/layout/KWindow.vue +5 -0
- package/core/client/components/media/index.js +2 -6
- package/core/client/components/menu/KMenu.vue +12 -10
- package/core/client/components/menu/KSubMenu.vue +12 -12
- package/core/client/components/messages/KMessageCard.vue +13 -12
- package/core/client/components/messages/KMessageComposer.vue +13 -9
- package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
- package/core/client/components/tags/KTagFilter.vue +99 -0
- package/core/client/components/tags/KTagItem.vue +65 -0
- package/core/client/components/tags/KTagManager.vue +198 -0
- package/core/client/components/tags/KTagSelection.vue +82 -0
- package/core/client/components/time/KDate.vue +3 -17
- package/core/client/components/time/KDateTime.vue +1 -1
- package/core/client/components/time/KTime.vue +0 -4
- package/core/client/composables/collection-filter.js +41 -2
- package/core/client/composables/collection.js +3 -3
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/pwa.js +13 -0
- package/core/client/composables/session.js +7 -8
- package/core/client/composables/user.js +36 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-drop-file.js +174 -0
- package/core/client/document.js +2 -1
- package/core/client/exporter.js +17 -3
- package/core/client/i18n/core_en.json +34 -7
- package/core/client/i18n/core_fr.json +36 -9
- package/core/client/i18n.js +26 -11
- package/core/client/layout.js +5 -5
- package/core/client/mixins/mixin.base-activity.js +8 -5
- package/core/client/mixins/mixin.base-editor.js +2 -1
- package/core/client/mixins/mixin.base-field.js +3 -2
- package/core/client/mixins/mixin.base-item.js +12 -10
- package/core/client/mixins/mixin.service.js +3 -1
- package/core/client/platform.js +0 -3
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/utils/index.js +2 -0
- package/core/client/utils/utils.collection.js +6 -6
- package/core/client/utils/utils.colors.js +46 -19
- package/core/client/utils/utils.files.js +19 -0
- package/core/client/utils/utils.locale.js +13 -17
- package/core/client/utils/utils.services.js +27 -0
- package/core/client/utils/utils.shapes.js +2 -2
- package/core/client/utils/utils.tags.js +17 -0
- package/core/client/utils/utils.tours.js +31 -0
- package/core/common/permissions.js +3 -0
- package/core/common/schemas/tags.update.json +35 -0
- package/core/common/schemas/users.update-profile.json +1 -1
- package/core/common/utils.js +5 -5
- package/extras/configs/panes.top.js +11 -0
- package/extras/configs/stickies.js +1 -1
- package/extras/configs/widgets.left.js +13 -1
- package/extras/libs/jsts.min.js +8 -0
- package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
- package/extras/tests/core/api.mjs +114 -0
- package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
- package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
- package/extras/tests/core/index.mjs +9 -0
- package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
- package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
- package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
- package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
- package/extras/tests/index.mjs +4 -0
- package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
- package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
- package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
- package/extras/tests/map/index.mjs +5 -0
- package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
- package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
- package/extras/tours/fab.js +36 -0
- package/extras/tours/layout.js +49 -0
- package/extras/tours/pane.left.js +78 -0
- package/extras/tours/pane.right.js +145 -0
- package/extras/tours/pane.top.js +239 -0
- package/map/api/config/layers.cjs +28 -13
- package/map/api/hooks/hooks.query.js +12 -7
- package/map/api/models/catalog.model.mongodb.js +17 -6
- package/map/api/services/catalog/catalog.hooks.js +1 -1
- package/map/api/services/index.js +18 -1
- package/map/api/services/styles/styles.hooks.js +1 -1
- package/map/client/cesium/utils/utils.cesium.js +25 -65
- package/map/client/cesium/utils/utils.features.js +1 -0
- package/map/client/cesium/utils/utils.geojson.js +1 -0
- package/map/client/cesium/utils/utils.style.js +7 -6
- package/map/client/components/KFeatureEditor.vue +3 -3
- package/map/client/components/KFeaturesChart.vue +4 -4
- package/map/client/components/KFeaturesFilterEditor.vue +19 -13
- package/map/client/components/KFeaturesFilterManager.vue +7 -4
- package/map/client/components/KFeaturesTable.vue +2 -2
- package/map/client/components/KLayerEditor.vue +10 -6
- package/map/client/components/KMeasureTool.vue +2 -1
- package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/map/client/components/catalog/KCategoryItem.vue +15 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +3 -2
- package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
- package/map/client/components/catalog/KImportLayer.vue +6 -3
- package/map/client/components/catalog/KLayerCategories.vue +8 -6
- package/map/client/components/catalog/KLayerItem.vue +12 -2
- package/map/client/components/catalog/KLayersList.vue +180 -0
- package/map/client/components/catalog/KLayersPanel.vue +146 -36
- package/map/client/components/catalog/KLayersSelector.vue +96 -48
- package/map/client/components/catalog/KProjectEditor.vue +0 -9
- package/map/client/components/catalog/KProjectSelector.vue +3 -2
- package/map/client/components/catalog/KProjectsPanel.vue +23 -8
- package/map/client/components/catalog/KViewsPanel.vue +18 -8
- package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/map/client/components/form/KDirectionField.vue +3 -6
- package/map/client/components/form/KLayerCategoryField.vue +2 -2
- package/map/client/components/form/KOwsServiceField.vue +25 -24
- package/map/client/components/form/KSelectLayersField.vue +4 -4
- package/map/client/components/form/KSelectViewsField.vue +4 -4
- package/map/client/components/legend/KLayerLegend.vue +11 -2
- package/map/client/components/legend/KLegend.vue +44 -51
- package/map/client/components/location/KLocationCardSection.vue +6 -7
- package/map/client/components/location/KLocationMap.vue +23 -13
- package/map/client/components/stickies/KLevelSlider.vue +10 -8
- package/map/client/components/stickies/KPosition.vue +5 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +72 -9
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +126 -60
- package/map/client/components/styles/KStylePreview.vue +9 -25
- package/map/client/components/styles/KStylePreviewItem.vue +22 -1
- package/map/client/components/tools/KSearchTool.vue +1 -1
- package/map/client/components/widget/KElevationProfile.vue +20 -17
- package/map/client/components/widget/KInformationBox.vue +5 -5
- package/map/client/components/widget/KMapillaryViewer.vue +2 -1
- package/map/client/components/widget/KTimeSeries.vue +11 -9
- package/map/client/composables/highlight.js +5 -1
- package/map/client/globe.js +2 -0
- package/map/client/i18n/map_en.json +33 -8
- package/map/client/i18n/map_fr.json +33 -8
- package/map/client/leaflet/GradientPath.js +61 -24
- package/map/client/leaflet/ShapeMarker.js +12 -5
- package/map/client/leaflet/TiledMeshLayer.js +3 -3
- package/map/client/leaflet/utils/utils.geojson.js +66 -8
- package/map/client/leaflet/utils/utils.style.js +14 -15
- package/map/client/mixins/globe/mixin.base-globe.js +181 -34
- package/map/client/mixins/globe/mixin.file-layers.js +3 -0
- package/map/client/mixins/globe/mixin.geojson-layers.js +190 -36
- package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
- package/map/client/mixins/globe/mixin.style.js +23 -1
- package/map/client/mixins/globe/mixin.tooltip.js +14 -2
- package/map/client/mixins/map/mixin.base-map.js +146 -58
- package/map/client/mixins/map/mixin.edit-layers.js +18 -15
- package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
- package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
- package/map/client/mixins/map/mixin.map-activity.js +6 -1
- package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
- package/map/client/mixins/mixin.activity.js +203 -48
- package/map/client/mixins/mixin.context.js +11 -11
- package/map/client/mixins/mixin.feature-service.js +11 -9
- package/map/client/mixins/mixin.weacast.js +5 -3
- package/map/client/readers/reader.geojson.js +3 -1
- package/map/client/utils/utils.capture.js +3 -3
- package/map/client/utils/utils.catalog.js +9 -5
- package/map/client/utils/utils.features.js +120 -54
- package/map/client/utils/utils.js +25 -10
- package/map/client/utils/utils.layers.js +148 -26
- package/map/client/utils/utils.location.js +26 -9
- package/map/client/utils/utils.schema.js +2 -1
- package/map/client/utils/utils.style.js +53 -9
- package/map/common/geotiff-grid-source.js +1 -3
- package/map/common/opendap-utils.js +0 -1
- package/map/common/tms-utils.js +0 -1
- package/map/common/wcs-utils.js +0 -1
- package/map/common/wfs-utils.js +0 -1
- package/map/common/wms-utils.js +7 -1
- package/map/common/wmts-utils.js +0 -1
- package/package.json +12 -12
- package/scripts/init_runner.sh +3 -3
- package/scripts/kash/CHANGELOG.md +27 -0
- package/scripts/kash/kash.sh +556 -237
- package/scripts/kash/scripts/run_tests.sh +44 -5
- package/scripts/setup_workspace.sh +23 -13
- package/test/api/core/config/default.cjs +2 -1
- package/test/api/core/push.test.js +1 -1
- package/test/api/core/tags.test.js +62 -0
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/config/layers.json +9 -0
- package/test/api/map/data/openradiation.json +13811 -0
- package/test/api/map/grid-sources.test.js +1 -3
- package/test/api/map/index.test.js +60 -1
- package/test/api/map/style.test.js +30 -1
- package/test.api.js +1 -1
- package/vite/App.vue +18 -0
- package/vite/AppWithGlobe.vue +84 -0
- package/vite/GlobeActivity.vue +58 -0
- package/vite/MapActivity.vue +63 -0
- package/vite/MapActivityWithGlobe.vue +63 -0
- package/vite/README.md +169 -0
- package/vite/config.js +221 -0
- package/vite/index_with_globe.html +50 -0
- package/vite/index_with_map.html +50 -0
- package/vite/package.json +173 -0
- package/vite/quasar.variables.scss +17 -0
- package/vite/vite.config.js +166 -0
- package/vite/yarn.lock +11641 -0
- package/core/client/components/media/KImageViewer.vue +0 -68
- package/core/client/components/media/KMarkdownViewer.vue +0 -55
- package/core/client/components/media/KMediaBrowser.vue +0 -301
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/core/api/application.js.html +0 -1870
- package/coverage/core/api/authentication.js.html +0 -874
- package/coverage/core/api/db.js.html +0 -793
- package/coverage/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/core/api/hooks/index.html +0 -266
- package/coverage/core/api/hooks/index.js.html +0 -115
- package/coverage/core/api/index.html +0 -176
- package/coverage/core/api/index.js.html +0 -148
- package/coverage/core/api/marshall.js.html +0 -448
- package/coverage/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/core/api/models/index.html +0 -131
- package/coverage/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/core/api/services/account/account.service.js.html +0 -436
- package/coverage/core/api/services/account/index.html +0 -131
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/core/api/services/authorisations/index.html +0 -131
- package/coverage/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/core/api/services/databases/index.html +0 -131
- package/coverage/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/core/api/services/groups/index.html +0 -116
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/core/api/services/import-export/index.html +0 -131
- package/coverage/core/api/services/index.html +0 -116
- package/coverage/core/api/services/index.js.html +0 -520
- package/coverage/core/api/services/mailer/index.html +0 -131
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/core/api/services/messages/index.html +0 -116
- package/coverage/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/core/api/services/organisations/index.html +0 -131
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/services/push/index.html +0 -131
- package/coverage/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/core/api/services/push/push.service.js.html +0 -121
- package/coverage/core/api/services/storage/index.html +0 -131
- package/coverage/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/core/api/services/tags/index.html +0 -116
- package/coverage/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/core/api/services/users/index.html +0 -131
- package/coverage/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/core/common/errors.js.html +0 -88
- package/coverage/core/common/index.html +0 -191
- package/coverage/core/common/index.js.html +0 -115
- package/coverage/core/common/permissions.js.html +0 -733
- package/coverage/core/common/schema.js.html +0 -190
- package/coverage/core/common/utils.js.html +0 -226
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -461
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/core/api/application.js.html +0 -1870
- package/coverage/lcov-report/core/api/authentication.js.html +0 -874
- package/coverage/lcov-report/core/api/db.js.html +0 -793
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/lcov-report/core/api/hooks/index.html +0 -266
- package/coverage/lcov-report/core/api/hooks/index.js.html +0 -115
- package/coverage/lcov-report/core/api/index.html +0 -176
- package/coverage/lcov-report/core/api/index.js.html +0 -148
- package/coverage/lcov-report/core/api/marshall.js.html +0 -448
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/core/api/models/index.html +0 -131
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +0 -436
- package/coverage/lcov-report/core/api/services/account/index.html +0 -131
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/lcov-report/core/api/services/authorisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/lcov-report/core/api/services/databases/index.html +0 -131
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/groups/index.html +0 -116
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/import-export/index.html +0 -131
- package/coverage/lcov-report/core/api/services/index.html +0 -116
- package/coverage/lcov-report/core/api/services/index.js.html +0 -520
- package/coverage/lcov-report/core/api/services/mailer/index.html +0 -131
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/messages/index.html +0 -116
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/lcov-report/core/api/services/organisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/services/push/index.html +0 -131
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +0 -121
- package/coverage/lcov-report/core/api/services/storage/index.html +0 -131
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/lcov-report/core/api/services/tags/index.html +0 -116
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/users/index.html +0 -131
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/common/errors.js.html +0 -88
- package/coverage/lcov-report/core/common/index.html +0 -191
- package/coverage/lcov-report/core/common/index.js.html +0 -115
- package/coverage/lcov-report/core/common/permissions.js.html +0 -733
- package/coverage/lcov-report/core/common/schema.js.html +0 -190
- package/coverage/lcov-report/core/common/utils.js.html +0 -226
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -461
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/lcov-report/map/api/hooks/index.html +0 -161
- package/coverage/lcov-report/map/api/hooks/index.js.html +0 -94
- package/coverage/lcov-report/map/api/index.html +0 -131
- package/coverage/lcov-report/map/api/index.js.html +0 -139
- package/coverage/lcov-report/map/api/marshall.js.html +0 -178
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/lcov-report/map/api/models/index.html +0 -161
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/lcov-report/map/api/services/alerts/index.html +0 -131
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/lcov-report/map/api/services/catalog/index.html +0 -116
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/lcov-report/map/api/services/daptiles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +0 -544
- package/coverage/lcov-report/map/api/services/features/index.html +0 -131
- package/coverage/lcov-report/map/api/services/index.html +0 -116
- package/coverage/lcov-report/map/api/services/index.js.html +0 -946
- package/coverage/lcov-report/map/api/services/projects/index.html +0 -116
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/lcov-report/map/common/errors.js.html +0 -94
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/lcov-report/map/common/grid.js.html +0 -1612
- package/coverage/lcov-report/map/common/index.html +0 -371
- package/coverage/lcov-report/map/common/index.js.html +0 -172
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/lcov-report/map/common/moment-utils.js.html +0 -157
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/lcov-report/map/common/opendap-utils.js.html +0 -826
- package/coverage/lcov-report/map/common/permissions.js.html +0 -124
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/lcov-report/map/common/tms-utils.js.html +0 -274
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/lcov-report/map/common/wcs-utils.js.html +0 -586
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/lcov-report/map/common/wfs-utils.js.html +0 -574
- package/coverage/lcov-report/map/common/wms-utils.js.html +0 -451
- package/coverage/lcov-report/map/common/wmts-utils.js.html +0 -547
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -10392
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/map/api/hooks/index.html +0 -161
- package/coverage/map/api/hooks/index.js.html +0 -94
- package/coverage/map/api/index.html +0 -131
- package/coverage/map/api/index.js.html +0 -139
- package/coverage/map/api/marshall.js.html +0 -178
- package/coverage/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/map/api/models/index.html +0 -161
- package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/map/api/services/alerts/index.html +0 -131
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/map/api/services/catalog/index.html +0 -116
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/map/api/services/daptiles/index.html +0 -116
- package/coverage/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/map/api/services/features/features.service.js.html +0 -544
- package/coverage/map/api/services/features/index.html +0 -131
- package/coverage/map/api/services/index.html +0 -116
- package/coverage/map/api/services/index.js.html +0 -946
- package/coverage/map/api/services/projects/index.html +0 -116
- package/coverage/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/map/common/errors.js.html +0 -94
- package/coverage/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/map/common/grid.js.html +0 -1612
- package/coverage/map/common/index.html +0 -371
- package/coverage/map/common/index.js.html +0 -172
- package/coverage/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/map/common/moment-utils.js.html +0 -157
- package/coverage/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/map/common/opendap-utils.js.html +0 -826
- package/coverage/map/common/permissions.js.html +0 -124
- package/coverage/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/map/common/tms-utils.js.html +0 -274
- package/coverage/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/map/common/wcs-utils.js.html +0 -586
- package/coverage/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/map/common/wfs-utils.js.html +0 -574
- package/coverage/map/common/wms-utils.js.html +0 -451
- package/coverage/map/common/wmts-utils.js.html +0 -547
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
- package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
- package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
- package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
- package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
- package/extras/tours/core/account-profile.js +0 -32
- package/extras/tours/core/account.js +0 -143
- package/extras/tours/core/add-member.js +0 -75
- package/extras/tours/core/add-tag.js +0 -13
- package/extras/tours/core/create-group.js +0 -19
- package/extras/tours/core/create-organisation.js +0 -19
- package/extras/tours/core/create-tag.js +0 -26
- package/extras/tours/core/edit-member-role.js +0 -13
- package/extras/tours/core/groups.js +0 -65
- package/extras/tours/core/join-group.js +0 -13
- package/extras/tours/core/login.js +0 -41
- package/extras/tours/core/members.js +0 -108
- package/extras/tours/core/register.js +0 -61
- package/extras/tours/core/send-reset-password.js +0 -14
- package/extras/tours/core/tags.js +0 -65
- package/extras/tours/map/catalog-panel.js +0 -112
- package/extras/tours/map/fab.js +0 -26
- package/extras/tours/map/navigation-bar.js +0 -187
- package/extras/tours/map/side-nav.js +0 -36
- package/test/api/core/test-log-2025-05-26.log +0 -22
- package/test/api/map/test-log-2025-05-26.log +0 -12
- package/test/client/core/api.js +0 -361
- package/test/client/core/index.js +0 -9
- package/test/client/index.js +0 -4
- package/test/client/map/index.js +0 -5
- package/test.client.js +0 -1
- /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
- /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
- /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
- /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
- /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
- /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
- /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
- /package/extras/tours/{map/timeline.js → pane.bottom.js} +0 -0
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
name: ci
|
|
2
|
-
on:
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
run_tests:
|
|
7
|
+
description: "Run tests"
|
|
8
|
+
default: false
|
|
9
|
+
required: false
|
|
10
|
+
type: boolean
|
|
11
|
+
additional_tests:
|
|
12
|
+
description: "Additional tests"
|
|
13
|
+
default: false
|
|
14
|
+
required: false
|
|
15
|
+
type: boolean
|
|
16
|
+
build_docs:
|
|
17
|
+
description: "Build docs"
|
|
18
|
+
default: false
|
|
19
|
+
required: false
|
|
20
|
+
type: boolean
|
|
3
21
|
|
|
4
22
|
jobs:
|
|
5
23
|
run_tests:
|
|
6
24
|
name: Run tests
|
|
25
|
+
if: ${{
|
|
26
|
+
github.event_name == 'workflow_dispatch' && inputs.run_tests ||
|
|
27
|
+
github.event_name == 'push'
|
|
28
|
+
}}
|
|
7
29
|
runs-on: ubuntu-22.04
|
|
8
30
|
steps:
|
|
9
31
|
- name: Checkout repo
|
|
@@ -19,16 +41,20 @@ jobs:
|
|
|
19
41
|
- name: Run tests
|
|
20
42
|
env:
|
|
21
43
|
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
|
22
|
-
run: bash ./scripts/run_tests.sh -c -r ${{ github.job }}
|
|
44
|
+
# run: bash ./scripts/run_tests.sh -c -r ${{ github.job }}
|
|
45
|
+
run: bash ./scripts/run_tests.sh -r ${{ github.job }}
|
|
23
46
|
|
|
24
47
|
additional_tests:
|
|
25
48
|
strategy:
|
|
26
49
|
fail-fast: false
|
|
27
50
|
matrix:
|
|
28
|
-
node: [
|
|
29
|
-
mongo: [
|
|
51
|
+
node: [ 20, 22 ]
|
|
52
|
+
mongo: [ 8 ]
|
|
30
53
|
name: Additional tests
|
|
31
|
-
if: ${{
|
|
54
|
+
if: ${{
|
|
55
|
+
github.event_name == 'workflow_dispatch' && inputs.additional_tests ||
|
|
56
|
+
github.event_name == 'push' && contains(github.event.head_commit.message, 'additional tests')
|
|
57
|
+
}}
|
|
32
58
|
runs-on: ubuntu-22.04
|
|
33
59
|
steps:
|
|
34
60
|
- name: Checkout repo
|
|
@@ -48,7 +74,10 @@ jobs:
|
|
|
48
74
|
|
|
49
75
|
build_docs:
|
|
50
76
|
name: Build doc
|
|
51
|
-
if: ${{
|
|
77
|
+
if: ${{
|
|
78
|
+
github.event_name == 'workflow_dispatch' && inputs.build_docs ||
|
|
79
|
+
github.event_name == 'push' && contains(github.event.head_commit.message, 'doc')
|
|
80
|
+
}}
|
|
52
81
|
runs-on: ubuntu-22.04
|
|
53
82
|
steps:
|
|
54
83
|
- name: Checkout repo
|
package/client.globe.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Need this as export * only exports named exports but not the default export
|
|
2
|
+
import core from './core/client/index.js'
|
|
3
|
+
import map from './map/client/globe.js'
|
|
4
|
+
const kdk = { core, map }
|
|
5
|
+
|
|
6
|
+
export default kdk
|
|
7
|
+
export * as kdkCore from './core/client/index.js'
|
|
8
|
+
export * as kdkMap from './map/client/globe.js'
|
package/client.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Need this as export * only exports named exports but not the default export
|
|
2
|
+
import core from './core/client/index.js'
|
|
3
|
+
import map from './map/client/index.js'
|
|
4
|
+
const kdk = { core, map }
|
|
5
|
+
|
|
6
|
+
export default kdk
|
|
7
|
+
export * as kdkCore from './core/client/index.js'
|
|
8
|
+
export * as kdkMap from './map/client/index.js'
|
package/client.map.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Need this as export * only exports named exports but not the default export
|
|
2
|
+
import core from './core/client/index.js'
|
|
3
|
+
import map from './map/client/map.js'
|
|
4
|
+
const kdk = { core, map }
|
|
5
|
+
|
|
6
|
+
export default kdk
|
|
7
|
+
export * as kdkCore from './core/client/index.js'
|
|
8
|
+
export * as kdkMap from './map/client/map.js'
|
|
@@ -14,6 +14,9 @@ export async function sendNewSubscriptionEmail (hook) {
|
|
|
14
14
|
if (hook.type !== 'after') {
|
|
15
15
|
throw new Error('The \'sendNewSubscriptionEmail\' hook should only be used as a \'after\' hook.')
|
|
16
16
|
}
|
|
17
|
+
const app = hook.app
|
|
18
|
+
const mailerService = app.getService('mailer')
|
|
19
|
+
if (!mailerService) return
|
|
17
20
|
// Check for a new subscription if any
|
|
18
21
|
const currentUser = hook.result
|
|
19
22
|
const previousUser = hook.params.user
|
|
@@ -32,8 +35,6 @@ export async function sendNewSubscriptionEmail (hook) {
|
|
|
32
35
|
}
|
|
33
36
|
debug('Last subscription uses uses a new fingerprint')
|
|
34
37
|
// Send an email to notify the user
|
|
35
|
-
const app = hook.app
|
|
36
|
-
const mailerService = app.getService('mailer')
|
|
37
38
|
const domainPath = app.get('domain') + '/#/'
|
|
38
39
|
const email = {
|
|
39
40
|
subject: 'Security alert - new browser detected',
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import makeDebug from 'debug'
|
|
2
|
+
|
|
3
|
+
const debug = makeDebug('kdk:core:tags:hooks')
|
|
4
|
+
|
|
5
|
+
export async function reflectTagUpdate (hook) {
|
|
6
|
+
const { app, result, params, method } = hook
|
|
7
|
+
|
|
8
|
+
const { service: targetService, property, name, description, color } = result
|
|
9
|
+
|
|
10
|
+
if (!targetService) return hook
|
|
11
|
+
|
|
12
|
+
const service = app.getService(targetService)
|
|
13
|
+
if (!service) {
|
|
14
|
+
debug('Service not found: ', targetService)
|
|
15
|
+
return hook
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const previousItem = params.previousItem || {}
|
|
19
|
+
|
|
20
|
+
const records = await service.find({
|
|
21
|
+
query: {
|
|
22
|
+
[property]: {
|
|
23
|
+
$elemMatch: {
|
|
24
|
+
name: previousItem.name,
|
|
25
|
+
color: previousItem.color
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
$select: ['_id', property]
|
|
30
|
+
},
|
|
31
|
+
paginate: false
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
for (const record of records) {
|
|
35
|
+
const updatedTags = record[property].map(tag => {
|
|
36
|
+
if (tag.name === previousItem.name && tag.color === previousItem.color) {
|
|
37
|
+
if (method === 'remove') {
|
|
38
|
+
// If the tag is being removed, we return null to filter it out
|
|
39
|
+
return null
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
...tag,
|
|
43
|
+
name,
|
|
44
|
+
description,
|
|
45
|
+
color
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return tag
|
|
49
|
+
}).filter(Boolean)
|
|
50
|
+
await service.patch(record._id, {
|
|
51
|
+
[property]: updatedTags
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return hook
|
|
56
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default function (app, options) {
|
|
2
|
+
const db = options.db || app.db
|
|
3
|
+
options.Model = db.collection('tags')
|
|
4
|
+
// Collation provided in query ensure sorting to be case insensitive w.r.t. user's language
|
|
5
|
+
// We built indices with collation to cover the most used languages, it requires different naming...
|
|
6
|
+
options.Model.createIndex({ name: 1 }, { name: 'name-en', collation: { locale: 'en', strength: 1 } })
|
|
7
|
+
options.Model.createIndex({ name: 1 }, { name: 'name-fr', collation: { locale: 'fr', strength: 1 } })
|
|
8
|
+
}
|
|
@@ -56,7 +56,7 @@ export function createStorageService (options = {}) {
|
|
|
56
56
|
return app.createService('storage', Object.assign({
|
|
57
57
|
servicesPath,
|
|
58
58
|
modelsPath,
|
|
59
|
-
methods: ['create', 'get', 'find', 'remove', 'createMultipartUpload', 'completeMultipartUpload', 'uploadPart', 'putObject'],
|
|
59
|
+
methods: ['create', 'get', 'find', 'remove', 'createMultipartUpload', 'completeMultipartUpload', 'uploadPart', 'putObject', 'uploadFile', 'downloadFile'],
|
|
60
60
|
events: ['multipart-upload-created', 'multipart-upload-completed', 'part-uploaded', 'object-put'],
|
|
61
61
|
id: '_id'
|
|
62
62
|
}, options))
|
|
@@ -93,6 +93,31 @@ export function removeDatabasesService (options = {}) {
|
|
|
93
93
|
return app.removeService(app.getService('databases', options.context))
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
export function createTagsService (options = {}) {
|
|
97
|
+
const app = this
|
|
98
|
+
return app.createService('tags', Object.assign({
|
|
99
|
+
servicesPath,
|
|
100
|
+
modelsPath
|
|
101
|
+
}, options))
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export async function createDefaultTags () {
|
|
105
|
+
const app = this
|
|
106
|
+
const defaultTags = app.get('tags').defaultTags
|
|
107
|
+
if (!defaultTags) return
|
|
108
|
+
const tagsService = app.getService('tags')
|
|
109
|
+
// Create default tags if not already done
|
|
110
|
+
const tags = await tagsService.find({ paginate: false })
|
|
111
|
+
for (let i = 0; i < defaultTags.length; i++) {
|
|
112
|
+
const defaultTag = defaultTags[i]
|
|
113
|
+
const createdTag = _.find(tags, { name: defaultTag.name })
|
|
114
|
+
if (!createdTag) {
|
|
115
|
+
app.logger.info('Initializing default tag (name = ' + defaultTag.name + ')')
|
|
116
|
+
await tagsService.create(defaultTag)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
96
121
|
export default async function () {
|
|
97
122
|
const app = this
|
|
98
123
|
|
|
@@ -131,7 +156,7 @@ export default async function () {
|
|
|
131
156
|
|
|
132
157
|
const messagesConfig = app.get('messages')
|
|
133
158
|
if (messagesConfig) {
|
|
134
|
-
await createMessagesService.call(app)
|
|
159
|
+
await createMessagesService.call(app, messagesConfig)
|
|
135
160
|
debug('\'messages\' service created')
|
|
136
161
|
}
|
|
137
162
|
|
|
@@ -146,4 +171,10 @@ export default async function () {
|
|
|
146
171
|
await app.createService('push', { servicesPath })
|
|
147
172
|
debug('\'push\' service created')
|
|
148
173
|
}
|
|
174
|
+
|
|
175
|
+
const tagsConfig = app.get('tags')
|
|
176
|
+
if (tagsConfig) {
|
|
177
|
+
await createTagsService.call(app, tagsConfig)
|
|
178
|
+
debug('\'tags\' service created')
|
|
179
|
+
}
|
|
149
180
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import fuzzySearch from 'feathers-mongodb-fuzzy-search'
|
|
2
|
+
import { diacriticSearch } from '../../hooks/hooks.query.js'
|
|
3
|
+
import { hooks as kdkCoreHooks } from '../../index.js'
|
|
4
|
+
import { reflectTagUpdate } from '../../hooks/hooks.tags.js'
|
|
5
|
+
|
|
6
|
+
function addFieldToCheckUnique (property) {
|
|
7
|
+
return (query, hook) => {
|
|
8
|
+
const value = hook.data[property]
|
|
9
|
+
if (value === undefined) return
|
|
10
|
+
query[property] = value
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
before: {
|
|
16
|
+
all: [],
|
|
17
|
+
find: [
|
|
18
|
+
fuzzySearch({ fields: ['name'] }),
|
|
19
|
+
diacriticSearch()
|
|
20
|
+
],
|
|
21
|
+
get: [],
|
|
22
|
+
create: [kdkCoreHooks.checkUnique({ field: 'name', query: addFieldToCheckUnique('service') })],
|
|
23
|
+
update: [kdkCoreHooks.checkUnique({ field: 'name', query: addFieldToCheckUnique('service') }), kdkCoreHooks.populatePreviousObject],
|
|
24
|
+
patch: [kdkCoreHooks.checkUnique({ field: 'name', query: addFieldToCheckUnique('service') }), kdkCoreHooks.populatePreviousObject],
|
|
25
|
+
remove: [kdkCoreHooks.populatePreviousObject]
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
after: {
|
|
29
|
+
all: [],
|
|
30
|
+
find: [],
|
|
31
|
+
get: [],
|
|
32
|
+
create: [],
|
|
33
|
+
update: [reflectTagUpdate],
|
|
34
|
+
patch: [reflectTagUpdate],
|
|
35
|
+
remove: [reflectTagUpdate]
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
error: {
|
|
39
|
+
all: [],
|
|
40
|
+
find: [],
|
|
41
|
+
get: [],
|
|
42
|
+
create: [],
|
|
43
|
+
update: [],
|
|
44
|
+
patch: [],
|
|
45
|
+
remove: []
|
|
46
|
+
}
|
|
47
|
+
}
|
package/core/client/api.js
CHANGED
|
@@ -5,7 +5,7 @@ import moment from 'moment'
|
|
|
5
5
|
import jwtdecode from 'jwt-decode'
|
|
6
6
|
import feathers from '@feathersjs/client'
|
|
7
7
|
import { io } from 'socket.io-client'
|
|
8
|
-
import reactive from 'feathers-reactive
|
|
8
|
+
import { rx as reactive } from 'feathers-reactive'
|
|
9
9
|
import createOfflineService from '@kalisio/feathers-localforage'
|
|
10
10
|
import configuration from 'config'
|
|
11
11
|
import { permissions } from '../common/index.js'
|
|
@@ -140,14 +140,14 @@ export async function createClient (config) {
|
|
|
140
140
|
// api.getService('xxx').on('event', () => ...)
|
|
141
141
|
// In this case we simply warn and return the wrapper to the online service.
|
|
142
142
|
// However, it is up to the application to make sure of not using such components when offline
|
|
143
|
-
// throw new Error('Cannot retrieve offline service ' + name + ' for context ' + (typeof context === 'object' ? context._id : context))
|
|
144
|
-
logger.warn('[KDK] Cannot retrieve offline service ' + name + ' for context ' + (typeof context === 'object' ? context._id : context))
|
|
143
|
+
// throw new Error('Cannot retrieve offline service ' + name + ' for context ' + (context && (typeof context === 'object') ? context._id : context))
|
|
144
|
+
logger.warn('[KDK] Cannot retrieve offline service ' + name + ' for context ' + (context && (typeof context === 'object') ? context._id : context))
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
if (!service) {
|
|
148
148
|
service = api.getOnlineService(name, context, options)
|
|
149
149
|
if (!service) {
|
|
150
|
-
throw new Error('Cannot retrieve service ' + name + ' for context ' + (typeof context === 'object' ? context._id : context))
|
|
150
|
+
throw new Error('Cannot retrieve service ' + name + ' for context ' + (context && (typeof context === 'object') ? context._id : context))
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
return service
|
|
@@ -356,7 +356,7 @@ export async function createClient (config) {
|
|
|
356
356
|
// We also add a random query parameter to prevent cached responses.
|
|
357
357
|
if (!api.isDisconnected) {
|
|
358
358
|
try {
|
|
359
|
-
const url = new URL(api.getConfig('domain'))
|
|
359
|
+
const url = new URL(api.getConfig('domain') + config.apiPath + '/capabilities')
|
|
360
360
|
url.searchParams.set('random', Math.random().toFixed(18).substring(2, 18))
|
|
361
361
|
await window.fetch(url.toString(), { method: 'HEAD' })
|
|
362
362
|
} catch (error) {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import _ from 'lodash'
|
|
9
9
|
import logger from 'loglevel'
|
|
10
10
|
import { useActivity, useLayout } from '../composables'
|
|
11
|
+
import { Events } from '../events.js'
|
|
11
12
|
import KPage from './layout/KPage.vue'
|
|
12
13
|
|
|
13
14
|
export default {
|
|
@@ -79,11 +80,11 @@ export default {
|
|
|
79
80
|
async created () {
|
|
80
81
|
await this.configure()
|
|
81
82
|
// whenever the user abilities are updated, update activity as well
|
|
82
|
-
|
|
83
|
+
Events.on('user-abilities-changed', this.configure)
|
|
83
84
|
},
|
|
84
85
|
beforeUnmount () {
|
|
85
86
|
logger.debug(`[KDK] Clearing '${this.name}' activity`)
|
|
86
|
-
|
|
87
|
+
Events.off('user-abilities-changed', this.configure)
|
|
87
88
|
// Clear the layout
|
|
88
89
|
this.clearLayout()
|
|
89
90
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div v-if="computedLabel"
|
|
21
21
|
:id="id"
|
|
22
22
|
class="ellipsis"
|
|
23
|
-
:class="{ 'q-pl-sm': !dense && icon, 'q-pl-xs': dense && icon }"
|
|
23
|
+
:class="{ 'q-pl-sm': !dense && (icon || isTruncated ) , 'q-pl-xs': dense && (icon || isTruncated) }"
|
|
24
24
|
>
|
|
25
25
|
{{ computedLabel }}
|
|
26
26
|
<q-resize-observer @resize="onResize" />
|
|
@@ -125,7 +125,7 @@ const computedState = computed({
|
|
|
125
125
|
return props.modelValue
|
|
126
126
|
},
|
|
127
127
|
set: function (state) {
|
|
128
|
-
emit('
|
|
128
|
+
emit('update:modelValue', state)
|
|
129
129
|
}
|
|
130
130
|
})
|
|
131
131
|
const computedLabel = computed(() => {
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
import _ from 'lodash'
|
|
12
12
|
import logger from 'loglevel'
|
|
13
13
|
import { ref } from 'vue'
|
|
14
|
-
import {
|
|
14
|
+
import { i18n } from '../i18n.js'
|
|
15
|
+
import { api } from '../api.js'
|
|
16
|
+
import { Context } from '../context.js'
|
|
15
17
|
import { Notify } from 'quasar'
|
|
16
18
|
|
|
17
19
|
// Props
|
|
@@ -24,12 +24,12 @@ const props = defineProps({
|
|
|
24
24
|
type: String,
|
|
25
25
|
required: true
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
anchor: {
|
|
28
28
|
type: String,
|
|
29
29
|
default: 'top-right'
|
|
30
30
|
},
|
|
31
31
|
offset: {
|
|
32
|
-
type:
|
|
32
|
+
type: Array,
|
|
33
33
|
default: [0, 0]
|
|
34
34
|
}
|
|
35
35
|
})
|
|
@@ -45,9 +45,9 @@ const computedStyle = computed(() => {
|
|
|
45
45
|
const hOffset = `${props.offset[0]}px`
|
|
46
46
|
const vOffset = `${props.offset[1]}px`
|
|
47
47
|
const style = {
|
|
48
|
-
position: '
|
|
48
|
+
position: 'absolute'
|
|
49
49
|
}
|
|
50
|
-
switch (props.
|
|
50
|
+
switch (props.anchor) {
|
|
51
51
|
case 'top-right':
|
|
52
52
|
style.top = vOffset
|
|
53
53
|
style.right = hOffset
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="hasTabs" class="fit column">
|
|
2
|
+
<div v-if="hasTabs && current" class="fit column">
|
|
3
3
|
<!-- Tabs -->
|
|
4
4
|
<q-tabs
|
|
5
5
|
v-model="current"
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
mobile-arrows
|
|
9
9
|
:dense="dense"
|
|
10
10
|
class="full-width text-primary"
|
|
11
|
+
@update:model-value="onTabChanged"
|
|
11
12
|
>
|
|
12
13
|
<template v-for="(tab, index) in tabs" :key="tab">
|
|
13
|
-
<q-tab
|
|
14
|
+
<q-tab
|
|
15
|
+
:name="tab"
|
|
16
|
+
:id="tab"
|
|
17
|
+
:label="getLabel(index) || tab"
|
|
18
|
+
/>
|
|
14
19
|
</template>
|
|
15
20
|
</q-tabs>
|
|
16
21
|
<q-separator />
|
|
@@ -20,7 +25,7 @@
|
|
|
20
25
|
:content="panel"
|
|
21
26
|
:mode="current"
|
|
22
27
|
:filter="filter"
|
|
23
|
-
@triggered="
|
|
28
|
+
@triggered="onContentTriggered"
|
|
24
29
|
class="col full-width"
|
|
25
30
|
/>
|
|
26
31
|
</div>
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
|
|
29
34
|
<script setup>
|
|
30
35
|
import _ from 'lodash'
|
|
31
|
-
import { ref, computed } from 'vue'
|
|
36
|
+
import { ref, computed, watch } from 'vue'
|
|
32
37
|
import { i18n } from '../i18n.js'
|
|
33
38
|
import KContent from './KContent.vue'
|
|
34
39
|
|
|
@@ -65,10 +70,10 @@ const props = defineProps({
|
|
|
65
70
|
})
|
|
66
71
|
|
|
67
72
|
// Emit
|
|
68
|
-
const emit = defineEmits(['triggered'])
|
|
73
|
+
const emit = defineEmits(['tab-changed', 'triggered'])
|
|
69
74
|
|
|
70
75
|
// Data
|
|
71
|
-
const current = ref(
|
|
76
|
+
const current = ref(null)
|
|
72
77
|
|
|
73
78
|
// Computed
|
|
74
79
|
const hasTabs = computed(() => {
|
|
@@ -81,6 +86,11 @@ const panel = computed(() => {
|
|
|
81
86
|
return _.get(props.content, current.value)
|
|
82
87
|
})
|
|
83
88
|
|
|
89
|
+
// Watch
|
|
90
|
+
watch(() => props.mode, (mode) => {
|
|
91
|
+
current.value = mode
|
|
92
|
+
}, { immediate: true })
|
|
93
|
+
|
|
84
94
|
// Function
|
|
85
95
|
function getModes () {
|
|
86
96
|
return _.keys(props.content)
|
|
@@ -89,7 +99,10 @@ function getLabel (index) {
|
|
|
89
99
|
const label = _.nth(props.labels, index)
|
|
90
100
|
if (label) return i18n.tie(label)
|
|
91
101
|
}
|
|
92
|
-
function
|
|
102
|
+
function onTabChanged (params) {
|
|
103
|
+
emit('tab-changed', params)
|
|
104
|
+
}
|
|
105
|
+
function onContentTriggered (params) {
|
|
93
106
|
emit('triggered', params)
|
|
94
107
|
}
|
|
95
108
|
</script>
|
|
@@ -9,29 +9,29 @@
|
|
|
9
9
|
@triggered="onTriggered"
|
|
10
10
|
/>
|
|
11
11
|
<!-- Avatar -->
|
|
12
|
-
<div v-if="avatar &&
|
|
12
|
+
<div v-if="avatar && userAvatar" class="q-py-sm column items-center">
|
|
13
13
|
<KAvatar
|
|
14
|
-
:subject="
|
|
14
|
+
:subject="userAvatar"
|
|
15
15
|
size="5rem"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
18
|
<!-- Information -->
|
|
19
19
|
<div class="q-py-sm column items-center">
|
|
20
20
|
<div class="text-subtitle1 text-weight-medium">
|
|
21
|
-
{{
|
|
21
|
+
{{ userName }}
|
|
22
22
|
</div>
|
|
23
|
-
<div v-if="description &&
|
|
24
|
-
{{
|
|
23
|
+
<div v-if="description && userDescription" class="text-caption">
|
|
24
|
+
{{ userDescription }}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
<!-- Role -->
|
|
28
|
-
<div v-if="role &&
|
|
28
|
+
<div v-if="role && userRole" class="q-py-sm column items-center">
|
|
29
29
|
<KChip
|
|
30
30
|
color="primary"
|
|
31
31
|
text-color="white"
|
|
32
32
|
square
|
|
33
33
|
size=".85rem"
|
|
34
|
-
:label="$t(`roles.${
|
|
34
|
+
:label="$t(`roles.${userRole}`)"
|
|
35
35
|
/>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<script setup>
|
|
41
41
|
import _ from 'lodash'
|
|
42
42
|
import { computed } from 'vue'
|
|
43
|
-
import {
|
|
43
|
+
import { useUser } from '../../composables'
|
|
44
44
|
import KAvatar from '../KAvatar.vue'
|
|
45
45
|
import KPanel from '../KPanel.vue'
|
|
46
46
|
import KChip from '../KChip.vue'
|
|
@@ -73,7 +73,7 @@ const props = defineProps({
|
|
|
73
73
|
const emit = defineEmits(['triggered'])
|
|
74
74
|
|
|
75
75
|
// Data
|
|
76
|
-
const User =
|
|
76
|
+
const { User, name: userName, description: userDescription, avatar: userAvatar, role: userRole } = useUser()
|
|
77
77
|
|
|
78
78
|
// Computed
|
|
79
79
|
const header = computed(() => {
|
|
@@ -123,22 +123,6 @@ const header = computed(() => {
|
|
|
123
123
|
}
|
|
124
124
|
return actions
|
|
125
125
|
})
|
|
126
|
-
const computedName = computed(() => {
|
|
127
|
-
return _.get(User.value, 'profile.name', _.get(User.value, 'profile.username', _.get(User.value, 'email', '')))
|
|
128
|
-
})
|
|
129
|
-
const computedDescription = computed(() => {
|
|
130
|
-
return _.get(User.value, 'profile.description', '')
|
|
131
|
-
})
|
|
132
|
-
const computedAvatar = computed(() => {
|
|
133
|
-
return _.get(User.value, 'profile', {})
|
|
134
|
-
})
|
|
135
|
-
const computedRole = computed(() => {
|
|
136
|
-
const permissions = _.get(User.value, 'permissions')
|
|
137
|
-
if (permissions) {
|
|
138
|
-
if (_.isString(permissions)) return permissions
|
|
139
|
-
return permissions[0]
|
|
140
|
-
}
|
|
141
|
-
})
|
|
142
126
|
|
|
143
127
|
// Functions
|
|
144
128
|
function onTriggered (args) {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<!-- icon -->
|
|
24
24
|
<KIcon v-if="!iconRight && computedIcon" :icon="computedIcon" />
|
|
25
25
|
<!-- label -->
|
|
26
|
-
<div v-if="computedLabel" :class="{ 'ellipsis q-pr-md': iconRight, 'ellipsis q-pl-md': !iconRight }">
|
|
26
|
+
<div v-if="computedLabel" :class="{ 'ellipsis q-pr-md': iconRight, 'ellipsis q-pl-md': !iconRight && computedIcon }">
|
|
27
27
|
{{ computedLabel }}
|
|
28
28
|
</div>
|
|
29
29
|
<!-- tooltip -->
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</q-tooltip>
|
|
33
33
|
<!-- badge -->
|
|
34
34
|
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
35
|
-
<
|
|
35
|
+
<KIcon v-if="badge.icon" v-bind="badge.icon" />
|
|
36
36
|
</q-badge>
|
|
37
37
|
<!-- extra content -->
|
|
38
38
|
<slot>
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
-->
|
|
91
91
|
<q-btn v-else-if="renderer === 'fab'"
|
|
92
92
|
:id="id"
|
|
93
|
-
class="k-action-fab"
|
|
94
93
|
:color="computedColor"
|
|
95
94
|
:size="size"
|
|
96
95
|
:round="true"
|
|
97
96
|
:dense="dense"
|
|
98
97
|
:disable="computedDisabled"
|
|
99
98
|
@click="onClicked"
|
|
99
|
+
class="k-fab"
|
|
100
100
|
>
|
|
101
101
|
<!-- icon -->
|
|
102
102
|
<KIcon v-if="!iconRight && computedIcon" :icon="computedIcon" />
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
</q-tooltip>
|
|
107
107
|
<!-- badge -->
|
|
108
108
|
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
109
|
-
<
|
|
109
|
+
<KIcon v-if="badge.icon" v-bind="badge.icon" />
|
|
110
110
|
</q-badge>
|
|
111
111
|
</q-btn>
|
|
112
112
|
<!--
|
|
@@ -114,17 +114,17 @@
|
|
|
114
114
|
-->
|
|
115
115
|
<q-fab-action v-else-if="renderer === 'fab-action'"
|
|
116
116
|
:id="id"
|
|
117
|
-
class="k-action-fab-action"
|
|
118
117
|
no-caps
|
|
119
|
-
:icon="computedIcon"
|
|
118
|
+
:icon="iconRight ? computedIcon : undefined"
|
|
120
119
|
:color="computedColor"
|
|
121
120
|
:label="computedLabel"
|
|
122
121
|
square
|
|
123
122
|
external-label
|
|
124
123
|
:label-position="iconRight ? 'left' : 'right'"
|
|
125
|
-
label-class="
|
|
124
|
+
label-class="text-white text-caption"
|
|
126
125
|
:disable="computedDisabled"
|
|
127
126
|
@click="onClicked"
|
|
127
|
+
class="k-fab-action"
|
|
128
128
|
>
|
|
129
129
|
<!-- icon -->
|
|
130
130
|
<KIcon v-if="!iconRight && computedIcon" :icon="computedIcon" />
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
Tab renderer
|
|
142
142
|
-->
|
|
143
143
|
<q-btn v-else-if="renderer === 'tab'"
|
|
144
|
-
:class="{'k-action-
|
|
144
|
+
:class="{'k-tab-action-active': isToggled }"
|
|
145
145
|
:id="id"
|
|
146
146
|
no-caps
|
|
147
147
|
no-wrap
|
|
@@ -314,11 +314,11 @@ defineExpose({
|
|
|
314
314
|
</script>
|
|
315
315
|
|
|
316
316
|
<style lang="scss" scoped>
|
|
317
|
-
.k-
|
|
317
|
+
.k-fab, .k-fab-action {
|
|
318
318
|
border: 2px solid;
|
|
319
319
|
border-color: v-bind(computedColor) - 75%;
|
|
320
320
|
}
|
|
321
|
-
.k-action-
|
|
321
|
+
.k-tab-action-active {
|
|
322
322
|
border-bottom: solid 2px;
|
|
323
323
|
}
|
|
324
324
|
.k-action-toggled {
|