@kalisio/kdk 2.5.3 → 2.6.1
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/.vscode/settings.json +5 -0
- 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 +6 -1
- 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 +473 -173
- 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/coverage/core/api/application.js.html +464 -464
- package/coverage/core/api/authentication.js.html +219 -351
- package/coverage/core/api/db.js.html +194 -209
- package/coverage/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/core/api/hooks/index.html +132 -102
- package/coverage/core/api/hooks/index.js.html +19 -13
- package/coverage/core/api/index.html +69 -54
- package/coverage/core/api/index.js.html +25 -25
- package/coverage/core/api/marshall.js.html +127 -127
- package/coverage/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/core/api/models/index.html +66 -21
- package/coverage/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/core/api/services/account/account.service.js.html +139 -139
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/core/api/services/authorisations/index.html +20 -20
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/groups/groups.hooks.js.html +72 -72
- package/coverage/core/api/services/groups/index.html +21 -21
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/core/api/services/import-export/index.html +32 -32
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +195 -171
- package/coverage/core/api/services/mailer/index.html +32 -32
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/core/api/services/messages/index.html +21 -21
- package/coverage/core/api/services/messages/messages.hooks.js.html +76 -94
- package/coverage/core/api/services/organisations/index.html +32 -32
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/core/api/services/organisations/organisations.service.js.html +163 -163
- package/coverage/core/api/services/push/index.html +32 -32
- package/coverage/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/core/api/services/push/push.service.js.html +34 -34
- package/coverage/core/api/services/storage/index.html +29 -29
- package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/core/api/services/storage/storage.service.js.html +37 -37
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/core/api/services/users/index.html +12 -27
- package/coverage/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +2 -2
- package/coverage/core/common/index.html +32 -47
- package/coverage/core/common/index.js.html +11 -11
- package/coverage/core/common/permissions.js.html +579 -264
- package/coverage/core/common/schema.js.html +26 -26
- package/coverage/core/common/utils.js.html +59 -65
- package/coverage/index.html +286 -256
- package/coverage/lcov-report/core/api/application.js.html +464 -464
- package/coverage/lcov-report/core/api/authentication.js.html +219 -351
- package/coverage/lcov-report/core/api/db.js.html +194 -209
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/lcov-report/core/api/hooks/index.html +132 -102
- package/coverage/lcov-report/core/api/hooks/index.js.html +19 -13
- package/coverage/lcov-report/core/api/index.html +69 -54
- package/coverage/lcov-report/core/api/index.js.html +25 -25
- package/coverage/lcov-report/core/api/marshall.js.html +127 -127
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/core/api/models/index.html +66 -21
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +139 -139
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/lcov-report/core/api/services/authorisations/index.html +20 -20
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/groups/index.html +21 -21
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +195 -171
- package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +76 -94
- package/coverage/lcov-report/core/api/services/organisations/index.html +32 -32
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +163 -163
- package/coverage/lcov-report/core/api/services/push/index.html +32 -32
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +37 -37
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/users/index.html +12 -27
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +2 -2
- package/coverage/lcov-report/core/common/index.html +32 -47
- package/coverage/lcov-report/core/common/index.js.html +11 -11
- package/coverage/lcov-report/core/common/permissions.js.html +579 -264
- package/coverage/lcov-report/core/common/schema.js.html +26 -26
- package/coverage/lcov-report/core/common/utils.js.html +59 -65
- package/coverage/lcov-report/index.html +286 -256
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/lcov-report/map/api/hooks/index.html +54 -54
- package/coverage/lcov-report/map/api/hooks/index.js.html +16 -16
- package/coverage/lcov-report/map/api/index.html +32 -32
- package/coverage/lcov-report/map/api/index.js.html +46 -46
- package/coverage/lcov-report/map/api/marshall.js.html +72 -72
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +54 -69
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/lcov-report/map/api/services/alerts/index.html +32 -32
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/lcov-report/map/api/services/catalog/index.html +21 -21
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +114 -183
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +56 -359
- package/coverage/lcov-report/map/api/services/features/index.html +31 -31
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +258 -495
- package/coverage/lcov-report/map/api/services/projects/index.html +21 -21
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +16 -16
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/lcov-report/map/common/grid.js.html +554 -554
- package/coverage/lcov-report/map/common/index.html +158 -158
- package/coverage/lcov-report/map/common/index.js.html +68 -68
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/lcov-report/map/common/moment-utils.js.html +18 -18
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/lcov-report/map/common/opendap-utils.js.html +353 -353
- package/coverage/lcov-report/map/common/permissions.js.html +36 -42
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/lcov-report/map/common/tms-utils.js.html +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/lcov-report/map/common/wcs-utils.js.html +339 -339
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/lcov-report/map/common/wfs-utils.js.html +11 -11
- package/coverage/lcov-report/map/common/wms-utils.js.html +8 -8
- package/coverage/lcov-report/map/common/wmts-utils.js.html +7 -7
- package/coverage/lcov.info +7793 -8564
- package/coverage/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/map/api/hooks/index.html +54 -54
- package/coverage/map/api/hooks/index.js.html +16 -16
- package/coverage/map/api/index.html +32 -32
- package/coverage/map/api/index.js.html +46 -46
- package/coverage/map/api/marshall.js.html +72 -72
- package/coverage/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +54 -69
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/map/api/services/alerts/index.html +32 -32
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/map/api/services/catalog/index.html +21 -21
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/map/api/services/daptiles/index.html +1 -1
- package/coverage/map/api/services/features/features.hooks.js.html +114 -183
- package/coverage/map/api/services/features/features.service.js.html +56 -359
- package/coverage/map/api/services/features/index.html +31 -31
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +258 -495
- package/coverage/map/api/services/projects/index.html +21 -21
- package/coverage/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +16 -16
- package/coverage/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/map/common/grid.js.html +554 -554
- package/coverage/map/common/index.html +158 -158
- package/coverage/map/common/index.js.html +68 -68
- package/coverage/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/map/common/moment-utils.js.html +18 -18
- package/coverage/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/map/common/opendap-utils.js.html +353 -353
- package/coverage/map/common/permissions.js.html +36 -42
- package/coverage/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/map/common/tms-utils.js.html +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/map/common/wcs-utils.js.html +339 -339
- package/coverage/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/map/common/wfs-utils.js.html +11 -11
- package/coverage/map/common/wms-utils.js.html +8 -8
- package/coverage/map/common/wmts-utils.js.html +7 -7
- package/coverage/tmp/coverage-151166-1723543324307-0.json +1 -0
- package/coverage/tmp/coverage-151178-1723543324283-0.json +1 -0
- package/coverage/tmp/coverage-151189-1723543324271-0.json +1 -0
- package/coverage/tmp/coverage-151201-1723543324248-0.json +1 -0
- package/coverage/tmp/coverage-151208-1723543324227-0.json +1 -0
- package/extras/configs/panes.top.js +33 -11
- package/extras/configs/stickies.js +26 -16
- 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/stickies/KZoomControl.vue +70 -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 +30 -7
- package/map/client/i18n/map_fr.json +30 -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 +190 -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 +156 -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 +199 -55
- 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/core/test-log-2024-04-22.log +84 -0
- package/test/api/core/{test-log-2025-02-05.log → test-log-2024-04-23.log} +3 -3
- package/test/api/core/test-log-2024-08-13.log +3 -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/map/test-log-2025-03-08.log +0 -0
- 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/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +0 -112
- 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/map/api/models/styles.model.mongodb.js.html +0 -112
- package/coverage/map/api/services/styles/index.html +0 -116
- package/coverage/map/api/services/styles/styles.hooks.js.html +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-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
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">25.86% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>67/259</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">80% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>8/10</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">36.36% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>4/11</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">25.86% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>67/259</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -322,40 +322,7 @@
|
|
|
322
322
|
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
323
|
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
324
|
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
-
<a name='L260'></a><a href='#L260'>260</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">
|
|
326
|
-
<span class="cline-any cline-yes">2x</span>
|
|
327
|
-
<span class="cline-any cline-yes">2x</span>
|
|
328
|
-
<span class="cline-any cline-yes">2x</span>
|
|
329
|
-
<span class="cline-any cline-yes">2x</span>
|
|
330
|
-
<span class="cline-any cline-yes">2x</span>
|
|
331
|
-
<span class="cline-any cline-yes">2x</span>
|
|
332
|
-
<span class="cline-any cline-yes">2x</span>
|
|
333
|
-
<span class="cline-any cline-yes">2x</span>
|
|
334
|
-
<span class="cline-any cline-yes">2x</span>
|
|
335
|
-
<span class="cline-any cline-yes">50x</span>
|
|
336
|
-
<span class="cline-any cline-yes">50x</span>
|
|
337
|
-
<span class="cline-any cline-yes">39x</span>
|
|
338
|
-
<span class="cline-any cline-yes">39x</span>
|
|
339
|
-
<span class="cline-any cline-yes">39x</span>
|
|
340
|
-
<span class="cline-any cline-yes">50x</span>
|
|
341
|
-
<span class="cline-any cline-yes">2x</span>
|
|
342
|
-
<span class="cline-any cline-yes">2x</span>
|
|
343
|
-
<span class="cline-any cline-yes">41x</span>
|
|
344
|
-
<span class="cline-any cline-yes">41x</span>
|
|
345
|
-
<span class="cline-any cline-yes">40x</span>
|
|
346
|
-
<span class="cline-any cline-yes">40x</span>
|
|
347
|
-
<span class="cline-any cline-yes">40x</span>
|
|
348
|
-
<span class="cline-any cline-yes">41x</span>
|
|
349
|
-
<span class="cline-any cline-yes">2x</span>
|
|
350
|
-
<span class="cline-any cline-yes">2x</span>
|
|
351
|
-
<span class="cline-any cline-yes">36x</span>
|
|
352
|
-
<span class="cline-any cline-yes">36x</span>
|
|
353
|
-
<span class="cline-any cline-yes">4x</span>
|
|
354
|
-
<span class="cline-any cline-yes">4x</span>
|
|
355
|
-
<span class="cline-any cline-yes">4x</span>
|
|
356
|
-
<span class="cline-any cline-yes">36x</span>
|
|
357
|
-
<span class="cline-any cline-yes">2x</span>
|
|
358
|
-
<span class="cline-any cline-yes">2x</span>
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
359
326
|
<span class="cline-any cline-yes">1x</span>
|
|
360
327
|
<span class="cline-any cline-yes">1x</span>
|
|
361
328
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -363,15 +330,48 @@
|
|
|
363
330
|
<span class="cline-any cline-yes">1x</span>
|
|
364
331
|
<span class="cline-any cline-yes">1x</span>
|
|
365
332
|
<span class="cline-any cline-yes">1x</span>
|
|
333
|
+
<span class="cline-any cline-yes">1x</span>
|
|
334
|
+
<span class="cline-any cline-yes">1x</span>
|
|
335
|
+
<span class="cline-any cline-no"> </span>
|
|
336
|
+
<span class="cline-any cline-no"> </span>
|
|
366
337
|
<span class="cline-any cline-no"> </span>
|
|
367
338
|
<span class="cline-any cline-no"> </span>
|
|
368
339
|
<span class="cline-any cline-no"> </span>
|
|
340
|
+
<span class="cline-any cline-no"> </span>
|
|
341
|
+
<span class="cline-any cline-yes">1x</span>
|
|
342
|
+
<span class="cline-any cline-yes">1x</span>
|
|
343
|
+
<span class="cline-any cline-yes">1x</span>
|
|
344
|
+
<span class="cline-any cline-yes">1x</span>
|
|
345
|
+
<span class="cline-any cline-yes">1x</span>
|
|
346
|
+
<span class="cline-any cline-yes">1x</span>
|
|
347
|
+
<span class="cline-any cline-yes">1x</span>
|
|
348
|
+
<span class="cline-any cline-yes">1x</span>
|
|
349
|
+
<span class="cline-any cline-yes">1x</span>
|
|
350
|
+
<span class="cline-any cline-yes">1x</span>
|
|
351
|
+
<span class="cline-any cline-no"> </span>
|
|
352
|
+
<span class="cline-any cline-no"> </span>
|
|
353
|
+
<span class="cline-any cline-no"> </span>
|
|
354
|
+
<span class="cline-any cline-no"> </span>
|
|
355
|
+
<span class="cline-any cline-no"> </span>
|
|
356
|
+
<span class="cline-any cline-no"> </span>
|
|
357
|
+
<span class="cline-any cline-yes">1x</span>
|
|
358
|
+
<span class="cline-any cline-yes">1x</span>
|
|
359
|
+
<span class="cline-any cline-yes">1x</span>
|
|
360
|
+
<span class="cline-any cline-yes">1x</span>
|
|
361
|
+
<span class="cline-any cline-yes">1x</span>
|
|
362
|
+
<span class="cline-any cline-yes">1x</span>
|
|
363
|
+
<span class="cline-any cline-yes">1x</span>
|
|
364
|
+
<span class="cline-any cline-yes">1x</span>
|
|
365
|
+
<span class="cline-any cline-yes">1x</span>
|
|
366
|
+
<span class="cline-any cline-no"> </span>
|
|
367
|
+
<span class="cline-any cline-no"> </span>
|
|
368
|
+
<span class="cline-any cline-no"> </span>
|
|
369
|
+
<span class="cline-any cline-yes">1x</span>
|
|
370
|
+
<span class="cline-any cline-yes">1x</span>
|
|
369
371
|
<span class="cline-any cline-yes">1x</span>
|
|
370
372
|
<span class="cline-any cline-yes">1x</span>
|
|
371
373
|
<span class="cline-any cline-yes">2x</span>
|
|
372
374
|
<span class="cline-any cline-yes">2x</span>
|
|
373
|
-
<span class="cline-any cline-yes">71x</span>
|
|
374
|
-
<span class="cline-any cline-yes">71x</span>
|
|
375
375
|
<span class="cline-any cline-yes">1x</span>
|
|
376
376
|
<span class="cline-any cline-yes">1x</span>
|
|
377
377
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -380,96 +380,44 @@
|
|
|
380
380
|
<span class="cline-any cline-yes">1x</span>
|
|
381
381
|
<span class="cline-any cline-yes">1x</span>
|
|
382
382
|
<span class="cline-any cline-yes">1x</span>
|
|
383
|
-
<span class="cline-any cline-yes">71x</span>
|
|
384
383
|
<span class="cline-any cline-yes">2x</span>
|
|
385
|
-
<span class="cline-any cline-yes">
|
|
386
|
-
<span class="cline-any cline-yes">
|
|
387
|
-
<span class="cline-any cline-yes">36x</span>
|
|
388
|
-
<span class="cline-any cline-yes">36x</span>
|
|
389
|
-
<span class="cline-any cline-yes">36x</span>
|
|
384
|
+
<span class="cline-any cline-yes">1x</span>
|
|
385
|
+
<span class="cline-any cline-yes">1x</span>
|
|
390
386
|
<span class="cline-any cline-no"> </span>
|
|
391
387
|
<span class="cline-any cline-no"> </span>
|
|
392
388
|
<span class="cline-any cline-no"> </span>
|
|
393
389
|
<span class="cline-any cline-no"> </span>
|
|
394
|
-
<span class="cline-any cline-yes">36x</span>
|
|
395
|
-
<span class="cline-any cline-yes">36x</span>
|
|
396
|
-
<span class="cline-any cline-yes">2x</span>
|
|
397
|
-
<span class="cline-any cline-yes">2x</span>
|
|
398
|
-
<span class="cline-any cline-yes">4x</span>
|
|
399
|
-
<span class="cline-any cline-yes">4x</span>
|
|
400
|
-
<span class="cline-any cline-yes">4x</span>
|
|
401
|
-
<span class="cline-any cline-yes">4x</span>
|
|
402
|
-
<span class="cline-any cline-yes">4x</span>
|
|
403
|
-
<span class="cline-any cline-yes">4x</span>
|
|
404
|
-
<span class="cline-any cline-yes">4x</span>
|
|
405
|
-
<span class="cline-any cline-yes">4x</span>
|
|
406
|
-
<span class="cline-any cline-yes">4x</span>
|
|
407
|
-
<span class="cline-any cline-yes">4x</span>
|
|
408
|
-
<span class="cline-any cline-yes">4x</span>
|
|
409
390
|
<span class="cline-any cline-no"> </span>
|
|
410
391
|
<span class="cline-any cline-no"> </span>
|
|
411
392
|
<span class="cline-any cline-no"> </span>
|
|
412
|
-
<span class="cline-any cline-yes">4x</span>
|
|
413
393
|
<span class="cline-any cline-no"> </span>
|
|
414
394
|
<span class="cline-any cline-no"> </span>
|
|
415
395
|
<span class="cline-any cline-no"> </span>
|
|
416
|
-
<span class="cline-any cline-yes">
|
|
417
|
-
<span class="cline-any cline-yes">
|
|
418
|
-
<span class="cline-any cline-yes">4x</span>
|
|
419
|
-
<span class="cline-any cline-yes">4x</span>
|
|
420
|
-
<span class="cline-any cline-yes">4x</span>
|
|
421
|
-
<span class="cline-any cline-yes">4x</span>
|
|
422
|
-
<span class="cline-any cline-yes">4x</span>
|
|
423
|
-
<span class="cline-any cline-yes">4x</span>
|
|
396
|
+
<span class="cline-any cline-yes">1x</span>
|
|
397
|
+
<span class="cline-any cline-yes">1x</span>
|
|
424
398
|
<span class="cline-any cline-no"> </span>
|
|
425
399
|
<span class="cline-any cline-no"> </span>
|
|
426
400
|
<span class="cline-any cline-no"> </span>
|
|
427
|
-
<span class="cline-any cline-yes">4x</span>
|
|
428
401
|
<span class="cline-any cline-no"> </span>
|
|
429
402
|
<span class="cline-any cline-no"> </span>
|
|
430
403
|
<span class="cline-any cline-no"> </span>
|
|
431
|
-
<span class="cline-any cline-yes">4x</span>
|
|
432
|
-
<span class="cline-any cline-yes">4x</span>
|
|
433
|
-
<span class="cline-any cline-yes">4x</span>
|
|
434
404
|
<span class="cline-any cline-no"> </span>
|
|
435
405
|
<span class="cline-any cline-no"> </span>
|
|
436
406
|
<span class="cline-any cline-no"> </span>
|
|
437
|
-
<span class="cline-any cline-yes">4x</span>
|
|
438
|
-
<span class="cline-any cline-yes">4x</span>
|
|
439
|
-
<span class="cline-any cline-yes">4x</span>
|
|
440
|
-
<span class="cline-any cline-yes">4x</span>
|
|
441
|
-
<span class="cline-any cline-yes">4x</span>
|
|
442
|
-
<span class="cline-any cline-yes">4x</span>
|
|
443
|
-
<span class="cline-any cline-yes">4x</span>
|
|
444
|
-
<span class="cline-any cline-yes">4x</span>
|
|
445
|
-
<span class="cline-any cline-yes">4x</span>
|
|
446
|
-
<span class="cline-any cline-yes">4x</span>
|
|
447
|
-
<span class="cline-any cline-yes">4x</span>
|
|
448
|
-
<span class="cline-any cline-yes">4x</span>
|
|
449
407
|
<span class="cline-any cline-no"> </span>
|
|
450
408
|
<span class="cline-any cline-no"> </span>
|
|
451
409
|
<span class="cline-any cline-no"> </span>
|
|
452
410
|
<span class="cline-any cline-no"> </span>
|
|
453
|
-
<span class="cline-any cline-yes">4x</span>
|
|
454
411
|
<span class="cline-any cline-no"> </span>
|
|
455
412
|
<span class="cline-any cline-no"> </span>
|
|
456
413
|
<span class="cline-any cline-no"> </span>
|
|
457
|
-
<span class="cline-any cline-yes">4x</span>
|
|
458
414
|
<span class="cline-any cline-no"> </span>
|
|
459
415
|
<span class="cline-any cline-no"> </span>
|
|
460
416
|
<span class="cline-any cline-no"> </span>
|
|
461
|
-
<span class="cline-any cline-yes">4x</span>
|
|
462
|
-
<span class="cline-any cline-yes">4x</span>
|
|
463
|
-
<span class="cline-any cline-yes">4x</span>
|
|
464
|
-
<span class="cline-any cline-yes">4x</span>
|
|
465
417
|
<span class="cline-any cline-no"> </span>
|
|
466
418
|
<span class="cline-any cline-no"> </span>
|
|
467
419
|
<span class="cline-any cline-no"> </span>
|
|
468
420
|
<span class="cline-any cline-no"> </span>
|
|
469
|
-
<span class="cline-any cline-yes">4x</span>
|
|
470
|
-
<span class="cline-any cline-yes">4x</span>
|
|
471
|
-
<span class="cline-any cline-yes">2x</span>
|
|
472
|
-
<span class="cline-any cline-yes">2x</span>
|
|
473
421
|
<span class="cline-any cline-no"> </span>
|
|
474
422
|
<span class="cline-any cline-no"> </span>
|
|
475
423
|
<span class="cline-any cline-no"> </span>
|
|
@@ -482,105 +430,157 @@
|
|
|
482
430
|
<span class="cline-any cline-no"> </span>
|
|
483
431
|
<span class="cline-any cline-no"> </span>
|
|
484
432
|
<span class="cline-any cline-no"> </span>
|
|
485
|
-
<span class="cline-any cline-yes">2x</span>
|
|
486
|
-
<span class="cline-any cline-yes">2x</span>
|
|
487
|
-
<span class="cline-any cline-yes">4x</span>
|
|
488
|
-
<span class="cline-any cline-yes">4x</span>
|
|
489
|
-
<span class="cline-any cline-yes">4x</span>
|
|
490
|
-
<span class="cline-any cline-yes">4x</span>
|
|
491
|
-
<span class="cline-any cline-yes">4x</span>
|
|
492
|
-
<span class="cline-any cline-yes">4x</span>
|
|
493
|
-
<span class="cline-any cline-yes">4x</span>
|
|
494
|
-
<span class="cline-any cline-yes">4x</span>
|
|
495
|
-
<span class="cline-any cline-yes">4x</span>
|
|
496
|
-
<span class="cline-any cline-yes">4x</span>
|
|
497
|
-
<span class="cline-any cline-yes">4x</span>
|
|
498
433
|
<span class="cline-any cline-no"> </span>
|
|
499
434
|
<span class="cline-any cline-no"> </span>
|
|
500
435
|
<span class="cline-any cline-no"> </span>
|
|
501
|
-
<span class="cline-any cline-yes">4x</span>
|
|
502
436
|
<span class="cline-any cline-no"> </span>
|
|
503
437
|
<span class="cline-any cline-no"> </span>
|
|
504
438
|
<span class="cline-any cline-no"> </span>
|
|
505
|
-
<span class="cline-any cline-yes">4x</span>
|
|
506
|
-
<span class="cline-any cline-yes">4x</span>
|
|
507
|
-
<span class="cline-any cline-yes">4x</span>
|
|
508
|
-
<span class="cline-any cline-yes">4x</span>
|
|
509
|
-
<span class="cline-any cline-yes">4x</span>
|
|
510
|
-
<span class="cline-any cline-yes">4x</span>
|
|
511
|
-
<span class="cline-any cline-yes">4x</span>
|
|
512
|
-
<span class="cline-any cline-yes">4x</span>
|
|
513
439
|
<span class="cline-any cline-no"> </span>
|
|
514
440
|
<span class="cline-any cline-no"> </span>
|
|
515
441
|
<span class="cline-any cline-no"> </span>
|
|
516
|
-
<span class="cline-any cline-yes">4x</span>
|
|
517
442
|
<span class="cline-any cline-no"> </span>
|
|
518
443
|
<span class="cline-any cline-no"> </span>
|
|
519
444
|
<span class="cline-any cline-no"> </span>
|
|
520
|
-
<span class="cline-any cline-yes">4x</span>
|
|
521
|
-
<span class="cline-any cline-yes">4x</span>
|
|
522
|
-
<span class="cline-any cline-yes">4x</span>
|
|
523
|
-
<span class="cline-any cline-yes">4x</span>
|
|
524
|
-
<span class="cline-any cline-yes">4x</span>
|
|
525
|
-
<span class="cline-any cline-yes">4x</span>
|
|
526
|
-
<span class="cline-any cline-yes">4x</span>
|
|
527
|
-
<span class="cline-any cline-yes">4x</span>
|
|
528
445
|
<span class="cline-any cline-no"> </span>
|
|
529
446
|
<span class="cline-any cline-no"> </span>
|
|
530
447
|
<span class="cline-any cline-no"> </span>
|
|
531
448
|
<span class="cline-any cline-no"> </span>
|
|
532
449
|
<span class="cline-any cline-no"> </span>
|
|
533
450
|
<span class="cline-any cline-no"> </span>
|
|
534
|
-
<span class="cline-any cline-yes">4x</span>
|
|
535
|
-
<span class="cline-any cline-yes">4x</span>
|
|
536
|
-
<span class="cline-any cline-yes">4x</span>
|
|
537
|
-
<span class="cline-any cline-yes">4x</span>
|
|
538
|
-
<span class="cline-any cline-yes">4x</span>
|
|
539
|
-
<span class="cline-any cline-yes">4x</span>
|
|
540
|
-
<span class="cline-any cline-yes">4x</span>
|
|
541
|
-
<span class="cline-any cline-yes">4x</span>
|
|
542
|
-
<span class="cline-any cline-yes">4x</span>
|
|
543
|
-
<span class="cline-any cline-yes">4x</span>
|
|
544
451
|
<span class="cline-any cline-no"> </span>
|
|
545
452
|
<span class="cline-any cline-no"> </span>
|
|
546
453
|
<span class="cline-any cline-no"> </span>
|
|
547
|
-
<span class="cline-any cline-yes">4x</span>
|
|
548
454
|
<span class="cline-any cline-no"> </span>
|
|
549
455
|
<span class="cline-any cline-no"> </span>
|
|
550
456
|
<span class="cline-any cline-no"> </span>
|
|
551
|
-
<span class="cline-any cline-yes">4x</span>
|
|
552
457
|
<span class="cline-any cline-no"> </span>
|
|
553
458
|
<span class="cline-any cline-no"> </span>
|
|
554
459
|
<span class="cline-any cline-no"> </span>
|
|
555
|
-
<span class="cline-any cline-yes">4x</span>
|
|
556
|
-
<span class="cline-any cline-yes">4x</span>
|
|
557
|
-
<span class="cline-any cline-yes">4x</span>
|
|
558
|
-
<span class="cline-any cline-yes">4x</span>
|
|
559
460
|
<span class="cline-any cline-no"> </span>
|
|
560
461
|
<span class="cline-any cline-no"> </span>
|
|
561
462
|
<span class="cline-any cline-no"> </span>
|
|
562
463
|
<span class="cline-any cline-no"> </span>
|
|
563
|
-
<span class="cline-any cline-yes">4x</span>
|
|
564
|
-
<span class="cline-any cline-yes">4x</span>
|
|
565
|
-
<span class="cline-any cline-yes">4x</span>
|
|
566
|
-
<span class="cline-any cline-yes">2x</span>
|
|
567
|
-
<span class="cline-any cline-yes">2x</span>
|
|
568
464
|
<span class="cline-any cline-no"> </span>
|
|
569
465
|
<span class="cline-any cline-no"> </span>
|
|
570
466
|
<span class="cline-any cline-no"> </span>
|
|
467
|
+
<span class="cline-any cline-no"> </span>
|
|
468
|
+
<span class="cline-any cline-no"> </span>
|
|
469
|
+
<span class="cline-any cline-no"> </span>
|
|
470
|
+
<span class="cline-any cline-no"> </span>
|
|
471
|
+
<span class="cline-any cline-yes">1x</span>
|
|
472
|
+
<span class="cline-any cline-yes">1x</span>
|
|
473
|
+
<span class="cline-any cline-no"> </span>
|
|
474
|
+
<span class="cline-any cline-no"> </span>
|
|
475
|
+
<span class="cline-any cline-no"> </span>
|
|
476
|
+
<span class="cline-any cline-no"> </span>
|
|
477
|
+
<span class="cline-any cline-no"> </span>
|
|
478
|
+
<span class="cline-any cline-no"> </span>
|
|
479
|
+
<span class="cline-any cline-no"> </span>
|
|
480
|
+
<span class="cline-any cline-no"> </span>
|
|
481
|
+
<span class="cline-any cline-no"> </span>
|
|
482
|
+
<span class="cline-any cline-no"> </span>
|
|
483
|
+
<span class="cline-any cline-no"> </span>
|
|
484
|
+
<span class="cline-any cline-no"> </span>
|
|
485
|
+
<span class="cline-any cline-yes">1x</span>
|
|
486
|
+
<span class="cline-any cline-yes">1x</span>
|
|
487
|
+
<span class="cline-any cline-no"> </span>
|
|
488
|
+
<span class="cline-any cline-no"> </span>
|
|
489
|
+
<span class="cline-any cline-no"> </span>
|
|
490
|
+
<span class="cline-any cline-no"> </span>
|
|
491
|
+
<span class="cline-any cline-no"> </span>
|
|
492
|
+
<span class="cline-any cline-no"> </span>
|
|
493
|
+
<span class="cline-any cline-no"> </span>
|
|
494
|
+
<span class="cline-any cline-no"> </span>
|
|
495
|
+
<span class="cline-any cline-no"> </span>
|
|
496
|
+
<span class="cline-any cline-no"> </span>
|
|
497
|
+
<span class="cline-any cline-no"> </span>
|
|
498
|
+
<span class="cline-any cline-no"> </span>
|
|
499
|
+
<span class="cline-any cline-no"> </span>
|
|
500
|
+
<span class="cline-any cline-no"> </span>
|
|
501
|
+
<span class="cline-any cline-no"> </span>
|
|
502
|
+
<span class="cline-any cline-no"> </span>
|
|
503
|
+
<span class="cline-any cline-no"> </span>
|
|
504
|
+
<span class="cline-any cline-no"> </span>
|
|
505
|
+
<span class="cline-any cline-no"> </span>
|
|
506
|
+
<span class="cline-any cline-no"> </span>
|
|
507
|
+
<span class="cline-any cline-no"> </span>
|
|
508
|
+
<span class="cline-any cline-no"> </span>
|
|
509
|
+
<span class="cline-any cline-no"> </span>
|
|
510
|
+
<span class="cline-any cline-no"> </span>
|
|
511
|
+
<span class="cline-any cline-no"> </span>
|
|
512
|
+
<span class="cline-any cline-no"> </span>
|
|
513
|
+
<span class="cline-any cline-no"> </span>
|
|
514
|
+
<span class="cline-any cline-no"> </span>
|
|
515
|
+
<span class="cline-any cline-no"> </span>
|
|
516
|
+
<span class="cline-any cline-no"> </span>
|
|
517
|
+
<span class="cline-any cline-no"> </span>
|
|
518
|
+
<span class="cline-any cline-no"> </span>
|
|
519
|
+
<span class="cline-any cline-no"> </span>
|
|
520
|
+
<span class="cline-any cline-no"> </span>
|
|
521
|
+
<span class="cline-any cline-no"> </span>
|
|
522
|
+
<span class="cline-any cline-no"> </span>
|
|
523
|
+
<span class="cline-any cline-no"> </span>
|
|
524
|
+
<span class="cline-any cline-no"> </span>
|
|
525
|
+
<span class="cline-any cline-no"> </span>
|
|
526
|
+
<span class="cline-any cline-no"> </span>
|
|
527
|
+
<span class="cline-any cline-no"> </span>
|
|
528
|
+
<span class="cline-any cline-no"> </span>
|
|
529
|
+
<span class="cline-any cline-no"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
531
|
+
<span class="cline-any cline-no"> </span>
|
|
532
|
+
<span class="cline-any cline-no"> </span>
|
|
533
|
+
<span class="cline-any cline-no"> </span>
|
|
534
|
+
<span class="cline-any cline-no"> </span>
|
|
535
|
+
<span class="cline-any cline-no"> </span>
|
|
536
|
+
<span class="cline-any cline-no"> </span>
|
|
537
|
+
<span class="cline-any cline-no"> </span>
|
|
538
|
+
<span class="cline-any cline-no"> </span>
|
|
539
|
+
<span class="cline-any cline-no"> </span>
|
|
540
|
+
<span class="cline-any cline-no"> </span>
|
|
541
|
+
<span class="cline-any cline-no"> </span>
|
|
542
|
+
<span class="cline-any cline-no"> </span>
|
|
543
|
+
<span class="cline-any cline-no"> </span>
|
|
544
|
+
<span class="cline-any cline-no"> </span>
|
|
545
|
+
<span class="cline-any cline-no"> </span>
|
|
546
|
+
<span class="cline-any cline-no"> </span>
|
|
547
|
+
<span class="cline-any cline-no"> </span>
|
|
548
|
+
<span class="cline-any cline-no"> </span>
|
|
549
|
+
<span class="cline-any cline-no"> </span>
|
|
550
|
+
<span class="cline-any cline-no"> </span>
|
|
551
|
+
<span class="cline-any cline-no"> </span>
|
|
552
|
+
<span class="cline-any cline-no"> </span>
|
|
553
|
+
<span class="cline-any cline-no"> </span>
|
|
554
|
+
<span class="cline-any cline-no"> </span>
|
|
555
|
+
<span class="cline-any cline-no"> </span>
|
|
556
|
+
<span class="cline-any cline-no"> </span>
|
|
557
|
+
<span class="cline-any cline-no"> </span>
|
|
558
|
+
<span class="cline-any cline-no"> </span>
|
|
559
|
+
<span class="cline-any cline-no"> </span>
|
|
560
|
+
<span class="cline-any cline-no"> </span>
|
|
561
|
+
<span class="cline-any cline-no"> </span>
|
|
562
|
+
<span class="cline-any cline-no"> </span>
|
|
563
|
+
<span class="cline-any cline-no"> </span>
|
|
564
|
+
<span class="cline-any cline-no"> </span>
|
|
565
|
+
<span class="cline-any cline-no"> </span>
|
|
566
|
+
<span class="cline-any cline-yes">1x</span>
|
|
567
|
+
<span class="cline-any cline-yes">1x</span>
|
|
568
|
+
<span class="cline-any cline-no"> </span>
|
|
569
|
+
<span class="cline-any cline-no"> </span>
|
|
570
|
+
<span class="cline-any cline-no"> </span>
|
|
571
|
+
<span class="cline-any cline-yes">1x</span>
|
|
572
|
+
<span class="cline-any cline-yes">1x</span>
|
|
573
|
+
<span class="cline-any cline-yes">1x</span>
|
|
574
|
+
<span class="cline-any cline-yes">2x</span>
|
|
575
|
+
<span class="cline-any cline-yes">2x</span>
|
|
576
|
+
<span class="cline-any cline-yes">2x</span>
|
|
577
|
+
<span class="cline-any cline-yes">2x</span>
|
|
578
|
+
<span class="cline-any cline-yes">2x</span>
|
|
579
|
+
<span class="cline-any cline-yes">2x</span>
|
|
580
|
+
<span class="cline-any cline-yes">2x</span>
|
|
571
581
|
<span class="cline-any cline-yes">2x</span>
|
|
572
582
|
<span class="cline-any cline-yes">2x</span>
|
|
573
583
|
<span class="cline-any cline-yes">2x</span>
|
|
574
|
-
<span class="cline-any cline-yes">6x</span>
|
|
575
|
-
<span class="cline-any cline-yes">63x</span>
|
|
576
|
-
<span class="cline-any cline-yes">63x</span>
|
|
577
|
-
<span class="cline-any cline-yes">115x</span>
|
|
578
|
-
<span class="cline-any cline-yes">4x</span>
|
|
579
|
-
<span class="cline-any cline-yes">4x</span>
|
|
580
|
-
<span class="cline-any cline-yes">4x</span>
|
|
581
|
-
<span class="cline-any cline-yes">63x</span>
|
|
582
|
-
<span class="cline-any cline-yes">63x</span>
|
|
583
|
-
<span class="cline-any cline-yes">6x</span>
|
|
584
584
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
585
585
|
import { marshallComparisonFields, marshallTime, marshallBooleanFields, marshallNumberFields, marshallDateFields } from '../marshall.js'
|
|
586
586
|
import mongodb from 'mongodb'
|
|
@@ -590,13 +590,13 @@ import { makeDiacriticPattern } from '../../common/utils.js'
|
|
|
590
590
|
const { ObjectID } = mongodb
|
|
591
591
|
const debug = makeDebug('kdk:core:query:hooks')
|
|
592
592
|
|
|
593
|
-
export function marshallTimeQuery (hook) {
|
|
594
|
-
const query = hook.params.query
|
|
595
|
-
if (query) {
|
|
596
|
-
// Need to convert from client/server side types : string or moment dates
|
|
597
|
-
marshallTime(query, 'time')
|
|
598
|
-
}
|
|
599
|
-
}
|
|
593
|
+
export <span class="fstat-no" title="function not covered" >function marshallTimeQuery (hook) {</span>
|
|
594
|
+
<span class="cstat-no" title="statement not covered" > const query = hook.params.query</span>
|
|
595
|
+
<span class="cstat-no" title="statement not covered" > if (query) {</span>
|
|
596
|
+
<span class="cstat-no" title="statement not covered" > // Need to convert from client/server side types : string or moment dates</span>
|
|
597
|
+
<span class="cstat-no" title="statement not covered" > marshallTime(query, 'time')</span>
|
|
598
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
599
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
600
600
|
|
|
601
601
|
export function marshallComparisonQuery (hook) {
|
|
602
602
|
const query = hook.params.query
|
|
@@ -606,13 +606,13 @@ export function marshallComparisonQuery (hook) {
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
export function marshallSortQuery (hook) {
|
|
610
|
-
const query = hook.params.query
|
|
611
|
-
if (query && query.$sort) {
|
|
612
|
-
// Complex queries might have nested objects so we call a recursive function to handle this
|
|
613
|
-
marshallNumberFields(query.$sort)
|
|
614
|
-
}
|
|
615
|
-
}
|
|
609
|
+
export <span class="fstat-no" title="function not covered" >function marshallSortQuery (hook) {</span>
|
|
610
|
+
<span class="cstat-no" title="statement not covered" > const query = hook.params.query</span>
|
|
611
|
+
<span class="cstat-no" title="statement not covered" > if (query && query.$sort) {</span>
|
|
612
|
+
<span class="cstat-no" title="statement not covered" > // Complex queries might have nested objects so we call a recursive function to handle this</span>
|
|
613
|
+
<span class="cstat-no" title="statement not covered" > marshallNumberFields(query.$sort)</span>
|
|
614
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
615
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
616
616
|
|
|
617
617
|
export function marshallCollationQuery (hook) {
|
|
618
618
|
const query = hook.params.query
|
|
@@ -641,92 +641,92 @@ export function marshallHttpQuery (hook) {
|
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
export async function aggregationQuery (hook) {
|
|
645
|
-
const query = hook.params.query
|
|
646
|
-
|
|
647
|
-
const service = hook.service
|
|
648
|
-
|
|
644
|
+
export <span class="fstat-no" title="function not covered" >async function aggregationQuery (hook) {</span>
|
|
645
|
+
<span class="cstat-no" title="statement not covered" > const query = hook.params.query</span>
|
|
646
|
+
<span class="cstat-no" title="statement not covered" > if (!query) return</span>
|
|
647
|
+
<span class="cstat-no" title="statement not covered" > const service = hook.service</span>
|
|
648
|
+
<span class="cstat-no" title="statement not covered" > if (query.$aggregation) {</span>
|
|
649
649
|
<span class="cstat-no" title="statement not covered" > const collection = service.Model</span>
|
|
650
650
|
<span class="cstat-no" title="statement not covered" > // Set result to avoid service DB call</span>
|
|
651
651
|
<span class="cstat-no" title="statement not covered" > hook.result = await collection.aggregate(query.$aggregation.pipeline, query.$aggregation.options).toArray()</span>
|
|
652
652
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
653
|
-
return hook
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
export function populateObject (options) {
|
|
657
|
-
return async function (hook) {
|
|
658
|
-
const app = hook.app
|
|
659
|
-
const data = hook.data
|
|
660
|
-
const params = hook.params
|
|
661
|
-
const query = params.query
|
|
662
|
-
const context = hook.service.context
|
|
663
|
-
const idProperty = options.nameIdAs || options.idField
|
|
664
|
-
const serviceProperty = options.nameServiceAs || options.serviceField
|
|
653
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
654
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
665
655
|
|
|
666
|
-
|
|
667
|
-
|
|
656
|
+
export <span class="fstat-no" title="function not covered" >function populateObject (options) {</span>
|
|
657
|
+
<span class="cstat-no" title="statement not covered" > return async function (hook) {</span>
|
|
658
|
+
<span class="cstat-no" title="statement not covered" > const app = hook.app</span>
|
|
659
|
+
<span class="cstat-no" title="statement not covered" > const data = hook.data</span>
|
|
660
|
+
<span class="cstat-no" title="statement not covered" > const params = hook.params</span>
|
|
661
|
+
<span class="cstat-no" title="statement not covered" > const query = params.query</span>
|
|
662
|
+
<span class="cstat-no" title="statement not covered" > const context = hook.service.context</span>
|
|
663
|
+
<span class="cstat-no" title="statement not covered" > const idProperty = options.nameIdAs || options.idField</span>
|
|
664
|
+
<span class="cstat-no" title="statement not covered" > const serviceProperty = options.nameServiceAs || options.serviceField</span>
|
|
665
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
666
|
+
<span class="cstat-no" title="statement not covered" > // Check if not already done</span>
|
|
667
|
+
<span class="cstat-no" title="statement not covered" > if (typeof _.get(params, idProperty) === 'object') {</span>
|
|
668
668
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${idProperty} as already done`)</span>
|
|
669
669
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
670
670
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
671
|
-
if (typeof _.get(params, serviceProperty) === 'object')
|
|
671
|
+
<span class="cstat-no" title="statement not covered" > if (typeof _.get(params, serviceProperty) === 'object') {</span>
|
|
672
672
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${serviceProperty} as already done`)</span>
|
|
673
673
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
674
674
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
675
|
-
|
|
676
|
-
// Get service where we can find the object to populate
|
|
677
|
-
// Make hook usable with query params as well and service name or real object
|
|
678
|
-
let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)
|
|
679
|
-
if (typeof service === 'string') {
|
|
680
|
-
const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate
|
|
681
|
-
service = app.getService(service, context)
|
|
682
|
-
|
|
675
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
676
|
+
<span class="cstat-no" title="statement not covered" > // Get service where we can find the object to populate</span>
|
|
677
|
+
<span class="cstat-no" title="statement not covered" > // Make hook usable with query params as well and service name or real object</span>
|
|
678
|
+
<span class="cstat-no" title="statement not covered" > let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)</span>
|
|
679
|
+
<span class="cstat-no" title="statement not covered" > if (typeof service === 'string') {</span>
|
|
680
|
+
<span class="cstat-no" title="statement not covered" > const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate.`</span>
|
|
681
|
+
<span class="cstat-no" title="statement not covered" > service = app.getService(service, context)</span>
|
|
682
|
+
<span class="cstat-no" title="statement not covered" > if (!service) {</span>
|
|
683
683
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(message)</span>
|
|
684
684
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
685
685
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
686
|
-
|
|
686
|
+
<span class="cstat-no" title="statement not covered" > } else if (!service) {</span>
|
|
687
687
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`No ${options.serviceField} given to dynamically populate.`)</span>
|
|
688
688
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
689
689
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
690
|
-
// Then the object ID
|
|
691
|
-
const id = _.get(data, options.idField) || _.get(query, options.idField) || _.get(hook, 'id')
|
|
692
|
-
|
|
690
|
+
<span class="cstat-no" title="statement not covered" > // Then the object ID</span>
|
|
691
|
+
<span class="cstat-no" title="statement not covered" > const id = _.get(data, options.idField) || _.get(query, options.idField) || _.get(hook, 'id')</span>
|
|
692
|
+
<span class="cstat-no" title="statement not covered" > if (!id) {</span>
|
|
693
693
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`Cannot find the ${options.idField} to dynamically populate.`)</span>
|
|
694
694
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
695
695
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
696
|
-
debug(`Populating ${idProperty} with ID ${id}`)
|
|
697
|
-
// Set the retrieved service on the same field or given one in hook params
|
|
698
|
-
_.set(params, serviceProperty, service)
|
|
699
|
-
// Let it work with id/name string or real object
|
|
700
|
-
if (typeof id === 'string' || ObjectID.isValid(id)) {
|
|
701
|
-
const args = { user: hook.params.user }
|
|
702
|
-
let object
|
|
703
|
-
try {
|
|
704
|
-
// Get by ID or name
|
|
705
|
-
if (ObjectID.isValid(id)) {
|
|
706
|
-
object = await service.get(id.toString(), args)
|
|
707
|
-
|
|
696
|
+
<span class="cstat-no" title="statement not covered" > debug(`Populating ${idProperty} with ID ${id}`)</span>
|
|
697
|
+
<span class="cstat-no" title="statement not covered" > // Set the retrieved service on the same field or given one in hook params</span>
|
|
698
|
+
<span class="cstat-no" title="statement not covered" > _.set(params, serviceProperty, service)</span>
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > // Let it work with id/name string or real object</span>
|
|
700
|
+
<span class="cstat-no" title="statement not covered" > if (typeof id === 'string' || ObjectID.isValid(id)) {</span>
|
|
701
|
+
<span class="cstat-no" title="statement not covered" > const args = { user: hook.params.user }</span>
|
|
702
|
+
<span class="cstat-no" title="statement not covered" > let object</span>
|
|
703
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
704
|
+
<span class="cstat-no" title="statement not covered" > // Get by ID or name ?</span>
|
|
705
|
+
<span class="cstat-no" title="statement not covered" > if (ObjectID.isValid(id)) {</span>
|
|
706
|
+
<span class="cstat-no" title="statement not covered" > object = await service.get(id.toString(), args)</span>
|
|
707
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
708
708
|
<span class="cstat-no" title="statement not covered" > Object.assign(args, { query: { name: id.toString() }, paginate: false })</span>
|
|
709
709
|
<span class="cstat-no" title="statement not covered" > const results = await service.find(args)</span>
|
|
710
710
|
<span class="cstat-no" title="statement not covered" > if (results.length >= 0) object = results[0]</span>
|
|
711
711
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
712
|
-
|
|
712
|
+
<span class="cstat-no" title="statement not covered" > } catch (error) {</span>
|
|
713
713
|
<span class="cstat-no" title="statement not covered" > // Not found error is managed hereafter</span>
|
|
714
714
|
<span class="cstat-no" title="statement not covered" > if (error.code !== 404) throw error</span>
|
|
715
715
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
716
|
-
|
|
716
|
+
<span class="cstat-no" title="statement not covered" > if (!object) {</span>
|
|
717
717
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`Cannot find object with id ${id} to dynamically populate.`)</span>
|
|
718
718
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
719
719
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
720
|
-
// Set the retrieved object on the same field or given one in hook params
|
|
721
|
-
_.set(params, idProperty, object)
|
|
722
|
-
return hook
|
|
723
|
-
|
|
720
|
+
<span class="cstat-no" title="statement not covered" > // Set the retrieved object on the same field or given one in hook params</span>
|
|
721
|
+
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, object)</span>
|
|
722
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
723
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
724
724
|
<span class="cstat-no" title="statement not covered" > // Set the object on the same field or given one in hook params</span>
|
|
725
725
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, id)</span>
|
|
726
726
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
727
727
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
728
|
-
}
|
|
729
|
-
}
|
|
728
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
729
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
730
730
|
|
|
731
731
|
export <span class="fstat-no" title="function not covered" >function unpopulateObject (options) {</span>
|
|
732
732
|
<span class="cstat-no" title="statement not covered" > return function (hook) {</span>
|
|
@@ -742,86 +742,86 @@ export <span class="fstat-no" title="function not covered" >function unpopulateO
|
|
|
742
742
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
743
743
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
744
744
|
|
|
745
|
-
export function populateObjects (options) {
|
|
746
|
-
return async function (hook) {
|
|
747
|
-
const app = hook.app
|
|
748
|
-
const data = hook.data
|
|
749
|
-
const params = hook.params
|
|
750
|
-
const query = params.query
|
|
751
|
-
const context = hook.service.context
|
|
752
|
-
const idProperty = options.nameIdAs || options.idField
|
|
753
|
-
const serviceProperty = options.nameServiceAs || options.serviceField
|
|
754
|
-
|
|
755
|
-
// Check if not already done
|
|
756
|
-
if (Array.isArray(_.get(params, idProperty)))
|
|
745
|
+
export <span class="fstat-no" title="function not covered" >function populateObjects (options) {</span>
|
|
746
|
+
<span class="cstat-no" title="statement not covered" > return async function (hook) {</span>
|
|
747
|
+
<span class="cstat-no" title="statement not covered" > const app = hook.app</span>
|
|
748
|
+
<span class="cstat-no" title="statement not covered" > const data = hook.data</span>
|
|
749
|
+
<span class="cstat-no" title="statement not covered" > const params = hook.params</span>
|
|
750
|
+
<span class="cstat-no" title="statement not covered" > const query = params.query</span>
|
|
751
|
+
<span class="cstat-no" title="statement not covered" > const context = hook.service.context</span>
|
|
752
|
+
<span class="cstat-no" title="statement not covered" > const idProperty = options.nameIdAs || options.idField</span>
|
|
753
|
+
<span class="cstat-no" title="statement not covered" > const serviceProperty = options.nameServiceAs || options.serviceField</span>
|
|
754
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
755
|
+
<span class="cstat-no" title="statement not covered" > // Check if not already done</span>
|
|
756
|
+
<span class="cstat-no" title="statement not covered" > if (Array.isArray(_.get(params, idProperty))) {</span>
|
|
757
757
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${idProperty} as already done`)</span>
|
|
758
758
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
759
759
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
760
|
-
if (typeof _.get(params, serviceProperty) === 'object')
|
|
760
|
+
<span class="cstat-no" title="statement not covered" > if (typeof _.get(params, serviceProperty) === 'object') {</span>
|
|
761
761
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${serviceProperty} as already done`)</span>
|
|
762
762
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
763
763
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
764
|
-
|
|
765
|
-
// Get service where we can find the object to populate
|
|
766
|
-
// Make hook usable with query params as well and service name or real object
|
|
767
|
-
let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)
|
|
768
|
-
if (typeof service === 'string') {
|
|
769
|
-
const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate
|
|
770
|
-
service = app.getService(service, context)
|
|
771
|
-
|
|
764
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
765
|
+
<span class="cstat-no" title="statement not covered" > // Get service where we can find the object to populate</span>
|
|
766
|
+
<span class="cstat-no" title="statement not covered" > // Make hook usable with query params as well and service name or real object</span>
|
|
767
|
+
<span class="cstat-no" title="statement not covered" > let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)</span>
|
|
768
|
+
<span class="cstat-no" title="statement not covered" > if (typeof service === 'string') {</span>
|
|
769
|
+
<span class="cstat-no" title="statement not covered" > const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate.`</span>
|
|
770
|
+
<span class="cstat-no" title="statement not covered" > service = app.getService(service, context)</span>
|
|
771
|
+
<span class="cstat-no" title="statement not covered" > if (!service) {</span>
|
|
772
772
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(message)</span>
|
|
773
773
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
774
774
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
775
|
-
|
|
775
|
+
<span class="cstat-no" title="statement not covered" > } else if (!service) {</span>
|
|
776
776
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`No ${options.serviceField} given to dynamically populate.`)</span>
|
|
777
777
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
778
778
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
779
|
-
|
|
780
|
-
// Set the retrieved service on the same field or given one in hook params
|
|
781
|
-
_.set(params, serviceProperty, service)
|
|
782
|
-
|
|
783
|
-
// Then the object ID
|
|
784
|
-
const id = _.get(data, options.idField) || _.get(query, options.idField)
|
|
785
|
-
// If no ID given we perform a find, no pagination to be sure we get all objects
|
|
786
|
-
|
|
779
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
780
|
+
<span class="cstat-no" title="statement not covered" > // Set the retrieved service on the same field or given one in hook params</span>
|
|
781
|
+
<span class="cstat-no" title="statement not covered" > _.set(params, serviceProperty, service)</span>
|
|
782
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
783
|
+
<span class="cstat-no" title="statement not covered" > // Then the object ID</span>
|
|
784
|
+
<span class="cstat-no" title="statement not covered" > const id = _.get(data, options.idField) || _.get(query, options.idField)</span>
|
|
785
|
+
<span class="cstat-no" title="statement not covered" > // If no ID given we perform a find, no pagination to be sure we get all objects</span>
|
|
786
|
+
<span class="cstat-no" title="statement not covered" > if (!id) {</span>
|
|
787
787
|
<span class="cstat-no" title="statement not covered" > debug(`Populating ${idProperty}`)</span>
|
|
788
788
|
<span class="cstat-no" title="statement not covered" > const objects = await service.find({ query: {}, paginate: false, user: hook.params.user })</span>
|
|
789
789
|
<span class="cstat-no" title="statement not covered" > // Set the retrieved objects on the same field or given one in hook params</span>
|
|
790
790
|
<span class="cstat-no" title="statement not covered" > debug(`Populated ${objects.length} ${idProperty}`)</span>
|
|
791
791
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, objects)</span>
|
|
792
792
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
793
|
-
} else {
|
|
794
|
-
debug(`Populating ${idProperty} with ID ${id}`)
|
|
795
|
-
// Let it work with id/name string or real object
|
|
796
|
-
|
|
797
|
-
let object
|
|
798
|
-
try {
|
|
799
|
-
// Get by ID or name
|
|
800
|
-
if (ObjectID.isValid(id)) {
|
|
801
|
-
object = await service.get(id.toString(), { user: hook.params.user })
|
|
802
|
-
|
|
793
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
794
|
+
<span class="cstat-no" title="statement not covered" > debug(`Populating ${idProperty} with ID ${id}`)</span>
|
|
795
|
+
<span class="cstat-no" title="statement not covered" > // Let it work with id/name string or real object</span>
|
|
796
|
+
<span class="cstat-no" title="statement not covered" > if (typeof id === 'string' || ObjectID.isValid(id)) {</span>
|
|
797
|
+
<span class="cstat-no" title="statement not covered" > let object</span>
|
|
798
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
799
|
+
<span class="cstat-no" title="statement not covered" > // Get by ID or name ?</span>
|
|
800
|
+
<span class="cstat-no" title="statement not covered" > if (ObjectID.isValid(id)) {</span>
|
|
801
|
+
<span class="cstat-no" title="statement not covered" > object = await service.get(id.toString(), { user: hook.params.user })</span>
|
|
802
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
803
803
|
<span class="cstat-no" title="statement not covered" > const results = await service.find({ query: { name: id.toString() }, paginate: false, user: hook.params.user })</span>
|
|
804
804
|
<span class="cstat-no" title="statement not covered" > if (results.length >= 0) object = results[0]</span>
|
|
805
805
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
806
|
-
|
|
806
|
+
<span class="cstat-no" title="statement not covered" > } catch (error) {</span>
|
|
807
807
|
<span class="cstat-no" title="statement not covered" > // Not found error is managed hereafter</span>
|
|
808
808
|
<span class="cstat-no" title="statement not covered" > if (error.code !== 404) throw error</span>
|
|
809
809
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
810
|
-
|
|
810
|
+
<span class="cstat-no" title="statement not covered" > if (!object) {</span>
|
|
811
811
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`Cannot find ${options.idField} = ${id} to dynamically populate.`)</span>
|
|
812
812
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
813
813
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
814
|
-
// Set the retrieved object on the same field or given one in hook params
|
|
815
|
-
_.set(params, idProperty, [object])
|
|
816
|
-
return hook
|
|
817
|
-
|
|
814
|
+
<span class="cstat-no" title="statement not covered" > // Set the retrieved object on the same field or given one in hook params</span>
|
|
815
|
+
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, [object])</span>
|
|
816
|
+
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
817
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
818
818
|
<span class="cstat-no" title="statement not covered" > // Set the object on the same field or given one in hook params</span>
|
|
819
819
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, [id])</span>
|
|
820
820
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
821
821
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
822
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
823
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
824
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
825
825
|
|
|
826
826
|
export <span class="fstat-no" title="function not covered" >function unpopulateObjects (options) {</span>
|
|
827
827
|
<span class="cstat-no" title="statement not covered" > // These are similar behaviour</span>
|
|
@@ -847,7 +847,7 @@ export function diacriticSearch (options = {}) {
|
|
|
847
847
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
848
848
|
Code coverage generated by
|
|
849
849
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
850
|
-
at
|
|
850
|
+
at 2024-08-13T10:02:04.843Z
|
|
851
851
|
</div>
|
|
852
852
|
<script src="../../../prettify.js"></script>
|
|
853
853
|
<script>
|