@kalisio/kdk 2.6.4 → 2.7.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/core/api/application.js +2 -4
- package/core/api/authentication.js +2 -3
- package/core/api/db.js +10 -2
- package/core/api/hooks/hooks.authorisations.js +4 -2
- package/core/api/hooks/hooks.push.js +6 -2
- package/core/api/hooks/hooks.query.js +29 -12
- package/core/api/hooks/hooks.users.js +30 -17
- package/core/api/models/configurations.model.mongodb.js +4 -0
- package/core/api/services/authorisations/authorisations.service.js +1 -1
- package/core/api/services/configurations/configurations.hooks.js +33 -0
- package/core/api/services/index.js +41 -7
- package/core/api/services/messages/messages.hooks.js +9 -3
- package/core/client/api.js +14 -1
- package/core/client/capabilities.js +1 -6
- package/core/client/components/KAvatar.vue +24 -20
- package/core/client/components/account/KProfile.vue +10 -71
- package/core/client/components/account/index.js +0 -2
- package/core/client/components/app/KSettings.vue +1 -0
- package/core/client/components/collection/KBoard.vue +4 -3
- package/core/client/components/collection/KCardSection.vue +1 -0
- package/core/client/components/collection/KGrid.vue +2 -0
- package/core/client/components/collection/KTable.vue +5 -1
- package/core/client/components/collection/KTimeLine.vue +9 -1
- package/core/client/components/collection/index.js +0 -2
- package/core/client/components/form/KChipsField.vue +2 -1
- package/core/client/components/form/KEmailField.vue +1 -0
- package/core/client/components/form/KFileField.vue +22 -1
- package/core/client/components/form/KForm.vue +2 -0
- package/core/client/components/form/KItemField.vue +1 -0
- package/core/client/components/form/KNumberField.vue +1 -0
- package/core/client/components/form/KPasswordField.vue +1 -0
- package/core/client/components/form/KPhoneField.vue +1 -0
- package/core/client/components/form/KPropertyItemField.vue +1 -0
- package/core/client/components/form/KResolutionField.vue +1 -0
- package/core/client/components/form/KSelectField.vue +31 -0
- package/core/client/components/form/KTagField.vue +1 -0
- package/core/client/components/form/KTextField.vue +1 -0
- package/core/client/components/form/KTokenField.vue +1 -0
- package/core/client/components/form/KUnitField.vue +1 -0
- package/core/client/components/form/KUrlField.vue +1 -0
- package/core/client/components/graphics/KIcon.vue +3 -4
- package/core/client/components/layout/KPage.vue +1 -0
- package/core/client/components/layout/KWindow.vue +6 -3
- package/core/client/components/messages/KMessageComposer.vue +2 -1
- package/core/client/components/messages/KMessagesTimeLine.vue +1 -1
- package/core/client/components/time/KDate.vue +1 -2
- package/core/client/components/time/KDateTime.vue +11 -11
- package/core/client/components/time/KTime.vue +1 -1
- package/core/client/composables/collection.js +33 -8
- package/core/client/composables/errors.js +1 -1
- package/core/client/composables/layout.js +9 -9
- package/core/client/configurations.js +50 -0
- package/core/client/exporter.js +1 -1
- package/core/client/i18n/core_en.json +6 -39
- package/core/client/i18n/core_fr.json +6 -39
- package/core/client/index.js +2 -0
- package/core/client/layout.js +8 -8
- package/core/client/mixins/mixin.base-activity.js +5 -2
- package/core/client/mixins/mixin.base-field.js +3 -3
- package/core/client/search.js +2 -1
- package/core/client/utils/utils.collection.js +8 -8
- package/core/client/utils/utils.items.js +4 -0
- package/core/client/utils/utils.push.js +3 -3
- package/core/client/utils/utils.session.js +7 -5
- package/core/client/utils/utils.shapes.js +38 -7
- package/core/client/utils/utils.time.js +21 -22
- package/core/common/schemas/users.update-profile.json +3 -2
- package/coverage/core/api/application.js.html +392 -398
- package/coverage/core/api/authentication.js.html +352 -187
- package/coverage/core/api/db.js.html +165 -126
- package/coverage/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/core/api/hooks/index.html +107 -122
- package/coverage/core/api/hooks/index.js.html +4 -10
- package/coverage/core/api/index.html +46 -61
- package/coverage/core/api/index.js.html +9 -9
- package/coverage/core/api/marshall.js.html +9 -9
- package/coverage/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/core/api/models/index.html +35 -50
- package/coverage/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/core/api/services/account/account.service.js.html +127 -127
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/core/api/services/authorisations/index.html +21 -21
- package/coverage/core/api/services/{organisations/organisations.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/core/api/services/{groups → configurations}/index.html +8 -8
- 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/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 +313 -142
- 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 +112 -76
- 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 +29 -29
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/core/api/services/users/index.html +27 -12
- package/coverage/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/core/api/services/users/users.service.js.html +100 -0
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +42 -27
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +166 -472
- package/coverage/core/common/schema.js.html +4 -4
- package/coverage/core/common/utils.js.html +31 -25
- package/coverage/core/common/utils.offline.js.html +199 -0
- package/coverage/index.html +192 -192
- package/coverage/lcov-report/core/api/application.js.html +392 -398
- package/coverage/lcov-report/core/api/authentication.js.html +352 -187
- package/coverage/lcov-report/core/api/db.js.html +165 -126
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/lcov-report/core/api/hooks/index.html +107 -122
- package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
- package/coverage/lcov-report/core/api/index.html +46 -61
- package/coverage/lcov-report/core/api/index.js.html +9 -9
- package/coverage/lcov-report/core/api/marshall.js.html +9 -9
- package/coverage/lcov-report/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/core/api/models/index.html +35 -50
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +127 -127
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/lcov-report/core/api/services/authorisations/index.html +21 -21
- package/coverage/lcov-report/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/lcov-report/core/api/services/{groups → configurations}/index.html +8 -8
- 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/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 +313 -142
- 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 +112 -76
- 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 +29 -29
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/lcov-report/core/api/services/users/index.html +27 -12
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +42 -27
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +166 -472
- package/coverage/lcov-report/core/common/schema.js.html +4 -4
- package/coverage/lcov-report/core/common/utils.js.html +31 -25
- package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
- package/coverage/lcov-report/index.html +192 -192
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/lcov-report/map/api/hooks/index.html +7 -7
- package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/map/api/index.html +1 -1
- package/coverage/lcov-report/map/api/index.js.html +1 -1
- package/coverage/lcov-report/map/api/marshall.js.html +1 -1
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/index.html +22 -7
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/lcov-report/map/api/services/catalog/index.html +5 -5
- 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 +86 -11
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +307 -4
- package/coverage/lcov-report/map/api/services/features/index.html +7 -7
- package/coverage/lcov-report/map/api/services/index.html +5 -5
- package/coverage/lcov-report/map/api/services/index.js.html +326 -50
- package/coverage/lcov-report/map/api/services/projects/index.html +1 -1
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{core/api/services/organisations → lcov-report/map/api/services/styles}/index.html +10 -25
- package/coverage/lcov-report/{core/api/services/organisations/organisations.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/errors.js.html +1 -1
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +19 -19
- package/coverage/lcov-report/map/common/index.js.html +1 -1
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-utils.js.html +4 -7
- package/coverage/lcov-report/map/common/permissions.js.html +10 -4
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +9 -12
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/lcov-report/map/common/wcs-utils.js.html +12 -15
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/lcov-report/map/common/wfs-utils.js.html +14 -17
- package/coverage/lcov-report/map/common/wms-utils.js.html +30 -12
- package/coverage/lcov-report/map/common/wmts-utils.js.html +10 -13
- package/coverage/lcov.info +4157 -3816
- package/coverage/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/map/api/hooks/index.html +7 -7
- package/coverage/map/api/hooks/index.js.html +1 -1
- package/coverage/map/api/index.html +1 -1
- package/coverage/map/api/index.js.html +1 -1
- package/coverage/map/api/marshall.js.html +1 -1
- package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/index.html +22 -7
- package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/map/api/services/alerts/index.html +1 -1
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/map/api/services/catalog/index.html +5 -5
- 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 +86 -11
- package/coverage/map/api/services/features/features.service.js.html +307 -4
- package/coverage/map/api/services/features/index.html +7 -7
- package/coverage/map/api/services/index.html +5 -5
- package/coverage/map/api/services/index.js.html +326 -50
- package/coverage/map/api/services/projects/index.html +1 -1
- package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{lcov-report/core/api/services/organisations → map/api/services/styles}/index.html +10 -25
- package/coverage/{core/api/services/groups/groups.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/map/common/errors.js.html +1 -1
- package/coverage/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +19 -19
- package/coverage/map/common/index.js.html +1 -1
- package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/map/common/moment-utils.js.html +1 -1
- package/coverage/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/map/common/opendap-utils.js.html +4 -7
- package/coverage/map/common/permissions.js.html +10 -4
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +9 -12
- package/coverage/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/map/common/wcs-utils.js.html +12 -15
- package/coverage/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/map/common/wfs-utils.js.html +14 -17
- package/coverage/map/common/wms-utils.js.html +30 -12
- package/coverage/map/common/wmts-utils.js.html +10 -13
- package/coverage/tmp/coverage-1028514-1773134124472-0.json +1 -0
- package/coverage/tmp/coverage-1028526-1773134124448-0.json +1 -0
- package/coverage/tmp/coverage-1028537-1773134124431-0.json +1 -0
- package/coverage/tmp/coverage-1028549-1773134124401-0.json +1 -0
- package/coverage/tmp/coverage-1028556-1773134124353-0.json +1 -0
- package/extras/configs/widgets.top.js +3 -3
- package/extras/tests/core/collection.mjs +2 -9
- package/extras/tours/pane.top.js +0 -9
- package/map/api/hooks/hooks.catalog.js +18 -4
- package/map/api/services/catalog/catalog.hooks.js +3 -0
- package/map/api/services/features/features.hooks.js +3 -1
- package/map/api/services/index.js +2 -6
- package/map/api/services/styles/styles.hooks.js +6 -1
- package/map/client/components/KFeatureActionButton.vue +9 -3
- package/map/client/components/KFeaturesFilterManager.vue +5 -5
- package/map/client/components/KFilterCondition.vue +17 -10
- package/map/client/components/KLayerEditor.vue +49 -39
- package/map/client/components/KMeasureTool.vue +7 -1
- package/map/client/components/KTimezoneMap.vue +29 -9
- package/map/client/components/catalog/KLayersPanel.vue +26 -16
- package/map/client/components/catalog/KLayersSelector.vue +13 -2
- package/map/client/components/catalog/KViewsPanel.vue +5 -4
- package/map/client/components/form/KSelectLayersField.vue +28 -17
- package/map/client/components/form/KSelectViewsField.vue +18 -9
- package/map/client/components/form/KTimezoneField.vue +1 -2
- package/map/client/components/legend/KVariablesLegend.vue +10 -1
- package/map/client/components/location/KLocationCardSection.vue +7 -2
- package/map/client/components/location/KLocationMap.vue +31 -7
- package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
- package/map/client/components/stickies/KZoomControl.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +4 -1
- package/map/client/components/widget/KTimeSeries.vue +174 -497
- package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
- package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
- package/map/client/composables/catalog.js +6 -10
- package/map/client/composables/highlight.js +12 -9
- package/map/client/composables/project.js +1 -1
- package/map/client/composables/selection.js +8 -7
- package/map/client/composables/weather.js +9 -2
- package/map/client/geolocation.js +8 -5
- package/map/client/i18n/map_en.json +11 -10
- package/map/client/i18n/map_fr.json +10 -9
- package/map/client/leaflet/TiledFeatureLayer.js +85 -82
- package/map/client/leaflet/utils/utils.geojson.js +3 -3
- package/map/client/mixins/globe/mixin.base-globe.js +15 -6
- package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
- package/map/client/mixins/map/mixin.edit-layers.js +9 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
- package/map/client/mixins/mixin.activity.js +23 -30
- package/map/client/mixins/mixin.feature-selection.js +41 -5
- package/map/client/planets.js +1 -1
- package/map/client/readers/reader.kml.js +2 -3
- package/map/client/utils/utils.catalog.js +36 -10
- package/map/client/utils/utils.layers.js +39 -8
- package/map/client/utils/utils.project.js +4 -0
- package/map/client/utils/utils.style.js +37 -7
- package/map/client/utils/utils.time-series.js +215 -6
- package/map/common/schemas/catalog.update.json +1 -1
- package/map/common/weacast-grid-source.js +1 -1
- package/package.json +3 -3
- package/scripts/kash/CHANGELOG.md +0 -4
- package/scripts/kash/README.md +0 -9
- package/scripts/kash/kash.sh +45 -40
- package/scripts/kash/scripts/run_tests.sh +1 -4
- package/test/api/core/authentication.test.js +9 -4
- package/test/api/core/config/default.cjs +1 -0
- package/test/api/core/hooks.test.js +6 -0
- package/test/api/core/index.test.js +43 -18
- package/test/api/core/push.test.js +8 -8
- package/test/api/core/test-log-2026-03-10.log +60 -0
- package/test/api/core/users.test.js +384 -0
- package/test/api/map/grid-sources.test.js +1 -1
- package/test/api/map/test-log-2026-03-10.log +56 -0
- package/vite/package.json +11 -2
- package/vite/test/core/composables.test.js +77 -0
- package/vite/vitest.config.js +13 -0
- package/vite/yarn.lock +1096 -18
- package/.vscode/settings.json +0 -5
- package/core/client/components/account/KAccount.vue +0 -68
- package/core/client/components/account/KDeleteAccountManager.vue +0 -62
- package/core/client/components/account/KEmailManager.vue +0 -128
- package/core/client/components/account/KPasswordManager.vue +0 -90
- package/core/client/components/account/KVerifyEmailManager.vue +0 -105
- package/core/client/components/collection/KColumn.vue +0 -227
- package/core/client/components/collection/KHistory.vue +0 -113
- package/core/client/components/collection/KHistoryEntry.vue +0 -109
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/tmp/coverage-151166-1723543324307-0.json +0 -1
- package/coverage/tmp/coverage-151178-1723543324283-0.json +0 -1
- package/coverage/tmp/coverage-151189-1723543324271-0.json +0 -1
- package/coverage/tmp/coverage-151201-1723543324248-0.json +0 -1
- package/coverage/tmp/coverage-151208-1723543324227-0.json +0 -1
- package/scripts/kash/LICENSE +0 -21
- package/test/api/core/test-log-2024-04-22.log +0 -84
- package/test/api/core/test-log-2024-04-23.log +0 -23
- package/test/api/core/test-log-2024-08-13.log +0 -3
- package/test/api/map/test-log-2025-03-08.log +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">62.45% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>178/285</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">57.69% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>30/52</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">58.33% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/12</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">62.45% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>178/285</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 medium'></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,7 +322,35 @@
|
|
|
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
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
+
<a name='L261'></a><a href='#L261'>261</a>
|
|
327
|
+
<a name='L262'></a><a href='#L262'>262</a>
|
|
328
|
+
<a name='L263'></a><a href='#L263'>263</a>
|
|
329
|
+
<a name='L264'></a><a href='#L264'>264</a>
|
|
330
|
+
<a name='L265'></a><a href='#L265'>265</a>
|
|
331
|
+
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
|
+
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
|
+
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
+
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
+
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
+
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
+
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
+
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
+
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
+
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
+
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
+
<a name='L277'></a><a href='#L277'>277</a>
|
|
343
|
+
<a name='L278'></a><a href='#L278'>278</a>
|
|
344
|
+
<a name='L279'></a><a href='#L279'>279</a>
|
|
345
|
+
<a name='L280'></a><a href='#L280'>280</a>
|
|
346
|
+
<a name='L281'></a><a href='#L281'>281</a>
|
|
347
|
+
<a name='L282'></a><a href='#L282'>282</a>
|
|
348
|
+
<a name='L283'></a><a href='#L283'>283</a>
|
|
349
|
+
<a name='L284'></a><a href='#L284'>284</a>
|
|
350
|
+
<a name='L285'></a><a href='#L285'>285</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
351
|
+
<span class="cline-any cline-yes">1x</span>
|
|
352
|
+
<span class="cline-any cline-yes">1x</span>
|
|
353
|
+
<span class="cline-any cline-yes">1x</span>
|
|
326
354
|
<span class="cline-any cline-yes">1x</span>
|
|
327
355
|
<span class="cline-any cline-yes">1x</span>
|
|
328
356
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -340,12 +368,12 @@
|
|
|
340
368
|
<span class="cline-any cline-no"> </span>
|
|
341
369
|
<span class="cline-any cline-yes">1x</span>
|
|
342
370
|
<span class="cline-any cline-yes">1x</span>
|
|
343
|
-
<span class="cline-any cline-yes">
|
|
344
|
-
<span class="cline-any cline-yes">
|
|
345
|
-
<span class="cline-any cline-yes">
|
|
346
|
-
<span class="cline-any cline-yes">
|
|
347
|
-
<span class="cline-any cline-yes">
|
|
348
|
-
<span class="cline-any cline-yes">
|
|
371
|
+
<span class="cline-any cline-yes">4x</span>
|
|
372
|
+
<span class="cline-any cline-yes">4x</span>
|
|
373
|
+
<span class="cline-any cline-yes">3x</span>
|
|
374
|
+
<span class="cline-any cline-yes">3x</span>
|
|
375
|
+
<span class="cline-any cline-yes">3x</span>
|
|
376
|
+
<span class="cline-any cline-yes">4x</span>
|
|
349
377
|
<span class="cline-any cline-yes">1x</span>
|
|
350
378
|
<span class="cline-any cline-yes">1x</span>
|
|
351
379
|
<span class="cline-any cline-no"> </span>
|
|
@@ -393,45 +421,6 @@
|
|
|
393
421
|
<span class="cline-any cline-no"> </span>
|
|
394
422
|
<span class="cline-any cline-no"> </span>
|
|
395
423
|
<span class="cline-any cline-no"> </span>
|
|
396
|
-
<span class="cline-any cline-yes">1x</span>
|
|
397
|
-
<span class="cline-any cline-yes">1x</span>
|
|
398
|
-
<span class="cline-any cline-no"> </span>
|
|
399
|
-
<span class="cline-any cline-no"> </span>
|
|
400
|
-
<span class="cline-any cline-no"> </span>
|
|
401
|
-
<span class="cline-any cline-no"> </span>
|
|
402
|
-
<span class="cline-any cline-no"> </span>
|
|
403
|
-
<span class="cline-any cline-no"> </span>
|
|
404
|
-
<span class="cline-any cline-no"> </span>
|
|
405
|
-
<span class="cline-any cline-no"> </span>
|
|
406
|
-
<span class="cline-any cline-no"> </span>
|
|
407
|
-
<span class="cline-any cline-no"> </span>
|
|
408
|
-
<span class="cline-any cline-no"> </span>
|
|
409
|
-
<span class="cline-any cline-no"> </span>
|
|
410
|
-
<span class="cline-any cline-no"> </span>
|
|
411
|
-
<span class="cline-any cline-no"> </span>
|
|
412
|
-
<span class="cline-any cline-no"> </span>
|
|
413
|
-
<span class="cline-any cline-no"> </span>
|
|
414
|
-
<span class="cline-any cline-no"> </span>
|
|
415
|
-
<span class="cline-any cline-no"> </span>
|
|
416
|
-
<span class="cline-any cline-no"> </span>
|
|
417
|
-
<span class="cline-any cline-no"> </span>
|
|
418
|
-
<span class="cline-any cline-no"> </span>
|
|
419
|
-
<span class="cline-any cline-no"> </span>
|
|
420
|
-
<span class="cline-any cline-no"> </span>
|
|
421
|
-
<span class="cline-any cline-no"> </span>
|
|
422
|
-
<span class="cline-any cline-no"> </span>
|
|
423
|
-
<span class="cline-any cline-no"> </span>
|
|
424
|
-
<span class="cline-any cline-no"> </span>
|
|
425
|
-
<span class="cline-any cline-no"> </span>
|
|
426
|
-
<span class="cline-any cline-no"> </span>
|
|
427
|
-
<span class="cline-any cline-no"> </span>
|
|
428
|
-
<span class="cline-any cline-no"> </span>
|
|
429
|
-
<span class="cline-any cline-no"> </span>
|
|
430
|
-
<span class="cline-any cline-no"> </span>
|
|
431
|
-
<span class="cline-any cline-no"> </span>
|
|
432
|
-
<span class="cline-any cline-no"> </span>
|
|
433
|
-
<span class="cline-any cline-no"> </span>
|
|
434
|
-
<span class="cline-any cline-no"> </span>
|
|
435
424
|
<span class="cline-any cline-no"> </span>
|
|
436
425
|
<span class="cline-any cline-no"> </span>
|
|
437
426
|
<span class="cline-any cline-no"> </span>
|
|
@@ -439,35 +428,81 @@
|
|
|
439
428
|
<span class="cline-any cline-no"> </span>
|
|
440
429
|
<span class="cline-any cline-no"> </span>
|
|
441
430
|
<span class="cline-any cline-no"> </span>
|
|
431
|
+
<span class="cline-any cline-yes">1x</span>
|
|
432
|
+
<span class="cline-any cline-yes">1x</span>
|
|
433
|
+
<span class="cline-any cline-yes">4x</span>
|
|
434
|
+
<span class="cline-any cline-yes">4x</span>
|
|
435
|
+
<span class="cline-any cline-yes">4x</span>
|
|
436
|
+
<span class="cline-any cline-yes">4x</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>
|
|
442
444
|
<span class="cline-any cline-no"> </span>
|
|
443
445
|
<span class="cline-any cline-no"> </span>
|
|
444
446
|
<span class="cline-any cline-no"> </span>
|
|
447
|
+
<span class="cline-any cline-yes">4x</span>
|
|
445
448
|
<span class="cline-any cline-no"> </span>
|
|
446
449
|
<span class="cline-any cline-no"> </span>
|
|
447
450
|
<span class="cline-any cline-no"> </span>
|
|
451
|
+
<span class="cline-any cline-yes">4x</span>
|
|
452
|
+
<span class="cline-any cline-yes">4x</span>
|
|
453
|
+
<span class="cline-any cline-yes">4x</span>
|
|
454
|
+
<span class="cline-any cline-yes">4x</span>
|
|
455
|
+
<span class="cline-any cline-yes">4x</span>
|
|
456
|
+
<span class="cline-any cline-yes">4x</span>
|
|
457
|
+
<span class="cline-any cline-yes">4x</span>
|
|
458
|
+
<span class="cline-any cline-yes">4x</span>
|
|
448
459
|
<span class="cline-any cline-no"> </span>
|
|
449
460
|
<span class="cline-any cline-no"> </span>
|
|
450
461
|
<span class="cline-any cline-no"> </span>
|
|
462
|
+
<span class="cline-any cline-yes">4x</span>
|
|
451
463
|
<span class="cline-any cline-no"> </span>
|
|
452
464
|
<span class="cline-any cline-no"> </span>
|
|
453
465
|
<span class="cline-any cline-no"> </span>
|
|
466
|
+
<span class="cline-any cline-yes">4x</span>
|
|
467
|
+
<span class="cline-any cline-yes">4x</span>
|
|
468
|
+
<span class="cline-any cline-yes">4x</span>
|
|
454
469
|
<span class="cline-any cline-no"> </span>
|
|
455
470
|
<span class="cline-any cline-no"> </span>
|
|
456
471
|
<span class="cline-any cline-no"> </span>
|
|
472
|
+
<span class="cline-any cline-yes">4x</span>
|
|
473
|
+
<span class="cline-any cline-yes">4x</span>
|
|
474
|
+
<span class="cline-any cline-yes">4x</span>
|
|
475
|
+
<span class="cline-any cline-yes">4x</span>
|
|
476
|
+
<span class="cline-any cline-yes">4x</span>
|
|
477
|
+
<span class="cline-any cline-yes">4x</span>
|
|
478
|
+
<span class="cline-any cline-yes">4x</span>
|
|
479
|
+
<span class="cline-any cline-yes">4x</span>
|
|
480
|
+
<span class="cline-any cline-yes">4x</span>
|
|
481
|
+
<span class="cline-any cline-yes">4x</span>
|
|
482
|
+
<span class="cline-any cline-yes">4x</span>
|
|
483
|
+
<span class="cline-any cline-yes">4x</span>
|
|
457
484
|
<span class="cline-any cline-no"> </span>
|
|
458
485
|
<span class="cline-any cline-no"> </span>
|
|
459
486
|
<span class="cline-any cline-no"> </span>
|
|
460
487
|
<span class="cline-any cline-no"> </span>
|
|
488
|
+
<span class="cline-any cline-yes">4x</span>
|
|
461
489
|
<span class="cline-any cline-no"> </span>
|
|
462
490
|
<span class="cline-any cline-no"> </span>
|
|
463
491
|
<span class="cline-any cline-no"> </span>
|
|
492
|
+
<span class="cline-any cline-yes">4x</span>
|
|
464
493
|
<span class="cline-any cline-no"> </span>
|
|
465
494
|
<span class="cline-any cline-no"> </span>
|
|
466
495
|
<span class="cline-any cline-no"> </span>
|
|
496
|
+
<span class="cline-any cline-yes">4x</span>
|
|
497
|
+
<span class="cline-any cline-yes">4x</span>
|
|
498
|
+
<span class="cline-any cline-yes">4x</span>
|
|
499
|
+
<span class="cline-any cline-yes">4x</span>
|
|
467
500
|
<span class="cline-any cline-no"> </span>
|
|
468
501
|
<span class="cline-any cline-no"> </span>
|
|
469
502
|
<span class="cline-any cline-no"> </span>
|
|
470
503
|
<span class="cline-any cline-no"> </span>
|
|
504
|
+
<span class="cline-any cline-yes">4x</span>
|
|
505
|
+
<span class="cline-any cline-yes">4x</span>
|
|
471
506
|
<span class="cline-any cline-yes">1x</span>
|
|
472
507
|
<span class="cline-any cline-yes">1x</span>
|
|
473
508
|
<span class="cline-any cline-no"> </span>
|
|
@@ -484,85 +519,85 @@
|
|
|
484
519
|
<span class="cline-any cline-no"> </span>
|
|
485
520
|
<span class="cline-any cline-yes">1x</span>
|
|
486
521
|
<span class="cline-any cline-yes">1x</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
|
+
<span class="cline-any cline-yes">4x</span>
|
|
529
|
+
<span class="cline-any cline-yes">4x</span>
|
|
530
|
+
<span class="cline-any cline-yes">4x</span>
|
|
531
|
+
<span class="cline-any cline-yes">4x</span>
|
|
532
|
+
<span class="cline-any cline-yes">4x</span>
|
|
487
533
|
<span class="cline-any cline-no"> </span>
|
|
488
534
|
<span class="cline-any cline-no"> </span>
|
|
489
535
|
<span class="cline-any cline-no"> </span>
|
|
536
|
+
<span class="cline-any cline-yes">4x</span>
|
|
490
537
|
<span class="cline-any cline-no"> </span>
|
|
491
538
|
<span class="cline-any cline-no"> </span>
|
|
492
539
|
<span class="cline-any cline-no"> </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
|
+
<span class="cline-any cline-yes">4x</span>
|
|
545
|
+
<span class="cline-any cline-yes">4x</span>
|
|
546
|
+
<span class="cline-any cline-yes">4x</span>
|
|
547
|
+
<span class="cline-any cline-yes">4x</span>
|
|
493
548
|
<span class="cline-any cline-no"> </span>
|
|
494
549
|
<span class="cline-any cline-no"> </span>
|
|
495
550
|
<span class="cline-any cline-no"> </span>
|
|
551
|
+
<span class="cline-any cline-yes">4x</span>
|
|
496
552
|
<span class="cline-any cline-no"> </span>
|
|
497
553
|
<span class="cline-any cline-no"> </span>
|
|
498
554
|
<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
|
+
<span class="cline-any cline-yes">4x</span>
|
|
560
|
+
<span class="cline-any cline-yes">4x</span>
|
|
561
|
+
<span class="cline-any cline-yes">4x</span>
|
|
562
|
+
<span class="cline-any cline-yes">4x</span>
|
|
499
563
|
<span class="cline-any cline-no"> </span>
|
|
500
564
|
<span class="cline-any cline-no"> </span>
|
|
501
565
|
<span class="cline-any cline-no"> </span>
|
|
502
566
|
<span class="cline-any cline-no"> </span>
|
|
503
567
|
<span class="cline-any cline-no"> </span>
|
|
504
568
|
<span class="cline-any cline-no"> </span>
|
|
569
|
+
<span class="cline-any cline-yes">4x</span>
|
|
570
|
+
<span class="cline-any cline-yes">4x</span>
|
|
571
|
+
<span class="cline-any cline-yes">4x</span>
|
|
572
|
+
<span class="cline-any cline-yes">4x</span>
|
|
573
|
+
<span class="cline-any cline-yes">4x</span>
|
|
574
|
+
<span class="cline-any cline-yes">4x</span>
|
|
575
|
+
<span class="cline-any cline-yes">4x</span>
|
|
576
|
+
<span class="cline-any cline-yes">4x</span>
|
|
577
|
+
<span class="cline-any cline-yes">4x</span>
|
|
578
|
+
<span class="cline-any cline-yes">4x</span>
|
|
505
579
|
<span class="cline-any cline-no"> </span>
|
|
506
580
|
<span class="cline-any cline-no"> </span>
|
|
507
581
|
<span class="cline-any cline-no"> </span>
|
|
582
|
+
<span class="cline-any cline-yes">4x</span>
|
|
508
583
|
<span class="cline-any cline-no"> </span>
|
|
509
584
|
<span class="cline-any cline-no"> </span>
|
|
510
585
|
<span class="cline-any cline-no"> </span>
|
|
586
|
+
<span class="cline-any cline-yes">4x</span>
|
|
511
587
|
<span class="cline-any cline-no"> </span>
|
|
512
588
|
<span class="cline-any cline-no"> </span>
|
|
513
589
|
<span class="cline-any cline-no"> </span>
|
|
590
|
+
<span class="cline-any cline-yes">4x</span>
|
|
591
|
+
<span class="cline-any cline-yes">4x</span>
|
|
592
|
+
<span class="cline-any cline-yes">4x</span>
|
|
593
|
+
<span class="cline-any cline-yes">4x</span>
|
|
514
594
|
<span class="cline-any cline-no"> </span>
|
|
515
595
|
<span class="cline-any cline-no"> </span>
|
|
516
596
|
<span class="cline-any cline-no"> </span>
|
|
517
597
|
<span class="cline-any cline-no"> </span>
|
|
518
|
-
<span class="cline-any cline-
|
|
519
|
-
<span class="cline-any cline-
|
|
520
|
-
<span class="cline-any cline-
|
|
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>
|
|
598
|
+
<span class="cline-any cline-yes">4x</span>
|
|
599
|
+
<span class="cline-any cline-yes">4x</span>
|
|
600
|
+
<span class="cline-any cline-yes">4x</span>
|
|
566
601
|
<span class="cline-any cline-yes">1x</span>
|
|
567
602
|
<span class="cline-any cline-yes">1x</span>
|
|
568
603
|
<span class="cline-any cline-no"> </span>
|
|
@@ -571,23 +606,41 @@
|
|
|
571
606
|
<span class="cline-any cline-yes">1x</span>
|
|
572
607
|
<span class="cline-any cline-yes">1x</span>
|
|
573
608
|
<span class="cline-any cline-yes">1x</span>
|
|
609
|
+
<span class="cline-any cline-yes">1x</span>
|
|
610
|
+
<span class="cline-any cline-yes">29x</span>
|
|
574
611
|
<span class="cline-any cline-yes">2x</span>
|
|
575
|
-
<span class="cline-any cline-yes">
|
|
576
|
-
<span class="cline-any cline-yes">
|
|
577
|
-
<span class="cline-any cline-yes">
|
|
578
|
-
<span class="cline-any cline-yes">
|
|
579
|
-
<span class="cline-any cline-yes">
|
|
580
|
-
<span class="cline-any cline-yes">
|
|
581
|
-
<span class="cline-any cline-yes">
|
|
582
|
-
<span class="cline-any cline-yes">
|
|
583
|
-
<span class="cline-any cline-yes">
|
|
584
|
-
<span class="cline-any cline-
|
|
585
|
-
|
|
612
|
+
<span class="cline-any cline-yes">29x</span>
|
|
613
|
+
<span class="cline-any cline-yes">17x</span>
|
|
614
|
+
<span class="cline-any cline-yes">17x</span>
|
|
615
|
+
<span class="cline-any cline-yes">17x</span>
|
|
616
|
+
<span class="cline-any cline-yes">17x</span>
|
|
617
|
+
<span class="cline-any cline-yes">6x</span>
|
|
618
|
+
<span class="cline-any cline-yes">6x</span>
|
|
619
|
+
<span class="cline-any cline-yes">6x</span>
|
|
620
|
+
<span class="cline-any cline-yes">6x</span>
|
|
621
|
+
<span class="cline-any cline-yes">17x</span>
|
|
622
|
+
<span class="cline-any cline-yes">11x</span>
|
|
623
|
+
<span class="cline-any cline-yes">11x</span>
|
|
624
|
+
<span class="cline-any cline-yes">17x</span>
|
|
625
|
+
<span class="cline-any cline-yes">17x</span>
|
|
626
|
+
<span class="cline-any cline-yes">29x</span>
|
|
627
|
+
<span class="cline-any cline-yes">1x</span>
|
|
628
|
+
<span class="cline-any cline-yes">1x</span>
|
|
629
|
+
<span class="cline-any cline-yes">1x</span>
|
|
630
|
+
<span class="cline-any cline-yes">6x</span>
|
|
631
|
+
<span class="cline-any cline-yes">16x</span>
|
|
632
|
+
<span class="cline-any cline-yes">16x</span>
|
|
633
|
+
<span class="cline-any cline-yes">16x</span>
|
|
634
|
+
<span class="cline-any cline-yes">6x</span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
586
635
|
import mongodb from 'mongodb'
|
|
636
|
+
import errors from '@feathersjs/errors'
|
|
587
637
|
import makeDebug from 'debug'
|
|
638
|
+
import { marshallComparisonFields, marshallTime, marshallBooleanFields, marshallNumberFields, marshallDateFields } from '../marshall.js'
|
|
639
|
+
import { isValidObjectID, isObjectID } from '../db.js'
|
|
588
640
|
import { makeDiacriticPattern } from '../../common/utils.js'
|
|
589
641
|
|
|
590
642
|
const { ObjectID } = mongodb
|
|
643
|
+
const { Forbidden } = errors
|
|
591
644
|
const debug = makeDebug('kdk:core:query:hooks')
|
|
592
645
|
|
|
593
646
|
export <span class="fstat-no" title="function not covered" >function marshallTimeQuery (hook) {</span>
|
|
@@ -642,10 +695,17 @@ export function marshallHttpQuery (hook) {
|
|
|
642
695
|
}
|
|
643
696
|
|
|
644
697
|
export <span class="fstat-no" title="function not covered" >async function aggregationQuery (hook) {</span>
|
|
698
|
+
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'before') {</span>
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('The \'aggregationQuery\' hook should only be used as a \'before\' hook.')</span>
|
|
700
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
645
701
|
<span class="cstat-no" title="statement not covered" > const query = hook.params.query</span>
|
|
646
702
|
<span class="cstat-no" title="statement not covered" > if (!query) return</span>
|
|
647
703
|
<span class="cstat-no" title="statement not covered" > const service = hook.service</span>
|
|
648
704
|
<span class="cstat-no" title="statement not covered" > if (query.$aggregation) {</span>
|
|
705
|
+
<span class="cstat-no" title="statement not covered" > // Generic aggregation request could allow to disclose or update information in DB so that it should only be used through controlled internal calls</span>
|
|
706
|
+
<span class="cstat-no" title="statement not covered" > if (hook.params.provider) {</span>
|
|
707
|
+
<span class="cstat-no" title="statement not covered" > throw new Forbidden('You are not allowed to perform aggregation')</span>
|
|
708
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
649
709
|
<span class="cstat-no" title="statement not covered" > const collection = service.Model</span>
|
|
650
710
|
<span class="cstat-no" title="statement not covered" > // Set result to avoid service DB call</span>
|
|
651
711
|
<span class="cstat-no" title="statement not covered" > hook.result = await collection.aggregate(query.$aggregation.pipeline, query.$aggregation.options).toArray()</span>
|
|
@@ -653,80 +713,80 @@ export <span class="fstat-no" title="function not covered" >async function aggre
|
|
|
653
713
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
654
714
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
655
715
|
|
|
656
|
-
export
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
716
|
+
export function populateObject (options) {
|
|
717
|
+
return async function (hook) {
|
|
718
|
+
const app = hook.app
|
|
719
|
+
const data = hook.data
|
|
720
|
+
const params = hook.params
|
|
721
|
+
const query = params.query
|
|
722
|
+
const context = hook.service.context
|
|
723
|
+
const idProperty = options.nameIdAs || options.idField
|
|
724
|
+
const serviceProperty = options.nameServiceAs || options.serviceField
|
|
725
|
+
|
|
726
|
+
// Check if not already done
|
|
727
|
+
if (typeof _.get(params, idProperty) === 'object') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
668
728
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${idProperty} as already done`)</span>
|
|
669
729
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
670
730
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
671
|
-
|
|
731
|
+
if (typeof _.get(params, serviceProperty) === 'object') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
672
732
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${serviceProperty} as already done`)</span>
|
|
673
733
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
674
734
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
<span class="
|
|
735
|
+
|
|
736
|
+
// Get service where we can find the object to populate
|
|
737
|
+
// Make hook usable with query params as well and service name or real object
|
|
738
|
+
let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)
|
|
739
|
+
if (typeof service === 'string') {
|
|
740
|
+
const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate.`
|
|
741
|
+
service = app.getService(service, context)
|
|
742
|
+
if (!service) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
683
743
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(message)</span>
|
|
684
744
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
685
745
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
686
|
-
<span class="
|
|
746
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else if (!service) {</span>
|
|
687
747
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`No ${options.serviceField} given to dynamically populate.`)</span>
|
|
688
748
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
689
749
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
<span class="
|
|
750
|
+
// Then the object ID
|
|
751
|
+
const id = _.get(data, options.idField) || _.get(query, options.idField) || _.get(hook, 'id')
|
|
752
|
+
if (!id) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
693
753
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`Cannot find the ${options.idField} to dynamically populate.`)</span>
|
|
694
754
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
695
755
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
<span class="
|
|
756
|
+
debug(`Populating ${idProperty} with ID ${id}`)
|
|
757
|
+
// Set the retrieved service on the same field or given one in hook params
|
|
758
|
+
_.set(params, serviceProperty, service)
|
|
759
|
+
// Let it work with id/name string or real object
|
|
760
|
+
if (typeof id === 'string' || isObjectID(id)) {
|
|
761
|
+
const args = { user: hook.params.user }
|
|
762
|
+
let object
|
|
763
|
+
try {
|
|
764
|
+
// Get by ID or name ?
|
|
765
|
+
if (isObjectID(id) || isValidObjectID(id)) {
|
|
766
|
+
object = await service.get(id.toString(), args)
|
|
767
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
708
768
|
<span class="cstat-no" title="statement not covered" > Object.assign(args, { query: { name: id.toString() }, paginate: false })</span>
|
|
709
769
|
<span class="cstat-no" title="statement not covered" > const results = await service.find(args)</span>
|
|
710
770
|
<span class="cstat-no" title="statement not covered" > if (results.length >= 0) object = results[0]</span>
|
|
711
771
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
712
|
-
<span class="
|
|
772
|
+
} <span class="branch-0 cbranch-no" title="branch not covered" >catch (error) {</span>
|
|
713
773
|
<span class="cstat-no" title="statement not covered" > // Not found error is managed hereafter</span>
|
|
714
774
|
<span class="cstat-no" title="statement not covered" > if (error.code !== 404) throw error</span>
|
|
715
775
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
716
|
-
<span class="
|
|
776
|
+
if (!object) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
717
777
|
<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
778
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
719
779
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
<span class="
|
|
780
|
+
// Set the retrieved object on the same field or given one in hook params
|
|
781
|
+
_.set(params, idProperty, object)
|
|
782
|
+
return hook
|
|
783
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
724
784
|
<span class="cstat-no" title="statement not covered" > // Set the object on the same field or given one in hook params</span>
|
|
725
785
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, id)</span>
|
|
726
786
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
727
787
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
728
|
-
|
|
729
|
-
|
|
788
|
+
}
|
|
789
|
+
}
|
|
730
790
|
|
|
731
791
|
export <span class="fstat-no" title="function not covered" >function unpopulateObject (options) {</span>
|
|
732
792
|
<span class="cstat-no" title="statement not covered" > return function (hook) {</span>
|
|
@@ -742,112 +802,127 @@ export <span class="fstat-no" title="function not covered" >function unpopulateO
|
|
|
742
802
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
743
803
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
744
804
|
|
|
745
|
-
export
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
<span class="
|
|
805
|
+
export function populateObjects (options) {
|
|
806
|
+
return async function (hook) {
|
|
807
|
+
const app = hook.app
|
|
808
|
+
const data = hook.data
|
|
809
|
+
const params = hook.params
|
|
810
|
+
const query = params.query
|
|
811
|
+
const context = hook.service.context
|
|
812
|
+
const idProperty = options.nameIdAs || options.idField
|
|
813
|
+
const serviceProperty = options.nameServiceAs || options.serviceField
|
|
814
|
+
|
|
815
|
+
// Check if not already done
|
|
816
|
+
if (Array.isArray(_.get(params, idProperty))) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
757
817
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${idProperty} as already done`)</span>
|
|
758
818
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
759
819
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
760
|
-
|
|
820
|
+
if (typeof _.get(params, serviceProperty) === 'object') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
761
821
|
<span class="cstat-no" title="statement not covered" > debug(`Skipping populating ${serviceProperty} as already done`)</span>
|
|
762
822
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
763
823
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
<span class="
|
|
824
|
+
|
|
825
|
+
// Get service where we can find the object to populate
|
|
826
|
+
// Make hook usable with query params as well and service name or real object
|
|
827
|
+
let service = _.get(data, options.serviceField) || _.get(query, options.serviceField)
|
|
828
|
+
if (typeof service === 'string') {
|
|
829
|
+
const message = `Cannot find the service for ${options.serviceField} = ${service} to dynamically populate.`
|
|
830
|
+
service = app.getService(service, context)
|
|
831
|
+
if (!service) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
772
832
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(message)</span>
|
|
773
833
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
774
834
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
775
|
-
<span class="
|
|
835
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else if (!service) {</span>
|
|
776
836
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`No ${options.serviceField} given to dynamically populate.`)</span>
|
|
777
837
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
778
838
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
<span class="
|
|
839
|
+
|
|
840
|
+
// Set the retrieved service on the same field or given one in hook params
|
|
841
|
+
_.set(params, serviceProperty, service)
|
|
842
|
+
|
|
843
|
+
// Then the object ID
|
|
844
|
+
const id = _.get(data, options.idField) || _.get(query, options.idField)
|
|
845
|
+
// If no ID given we perform a find, no pagination to be sure we get all objects
|
|
846
|
+
if (!id) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
787
847
|
<span class="cstat-no" title="statement not covered" > debug(`Populating ${idProperty}`)</span>
|
|
788
848
|
<span class="cstat-no" title="statement not covered" > const objects = await service.find({ query: {}, paginate: false, user: hook.params.user })</span>
|
|
789
849
|
<span class="cstat-no" title="statement not covered" > // Set the retrieved objects on the same field or given one in hook params</span>
|
|
790
850
|
<span class="cstat-no" title="statement not covered" > debug(`Populated ${objects.length} ${idProperty}`)</span>
|
|
791
851
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, objects)</span>
|
|
792
852
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
<span class="
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
<span class="
|
|
853
|
+
} else {
|
|
854
|
+
debug(`Populating ${idProperty} with ID ${id}`)
|
|
855
|
+
// Let it work with id/name string or real object
|
|
856
|
+
if (typeof id === 'string' <span class="branch-0 cbranch-no" title="branch not covered" >|| isObjectID(id))</span> {
|
|
857
|
+
let object
|
|
858
|
+
try {
|
|
859
|
+
// Get by ID or name ?
|
|
860
|
+
if (isObjectID(id) || isValidObjectID(id)) {
|
|
861
|
+
object = await service.get(id.toString(), { user: hook.params.user })
|
|
862
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
803
863
|
<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
864
|
<span class="cstat-no" title="statement not covered" > if (results.length >= 0) object = results[0]</span>
|
|
805
865
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
806
|
-
<span class="
|
|
866
|
+
} <span class="branch-0 cbranch-no" title="branch not covered" >catch (error) {</span>
|
|
807
867
|
<span class="cstat-no" title="statement not covered" > // Not found error is managed hereafter</span>
|
|
808
868
|
<span class="cstat-no" title="statement not covered" > if (error.code !== 404) throw error</span>
|
|
809
869
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
810
|
-
<span class="
|
|
870
|
+
if (!object) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
811
871
|
<span class="cstat-no" title="statement not covered" > if (options.throwOnNotFound) throw new Error(`Cannot find ${options.idField} = ${id} to dynamically populate.`)</span>
|
|
812
872
|
<span class="cstat-no" title="statement not covered" > else return hook</span>
|
|
813
873
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
<span class="
|
|
874
|
+
// Set the retrieved object on the same field or given one in hook params
|
|
875
|
+
_.set(params, idProperty, [object])
|
|
876
|
+
return hook
|
|
877
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
818
878
|
<span class="cstat-no" title="statement not covered" > // Set the object on the same field or given one in hook params</span>
|
|
819
879
|
<span class="cstat-no" title="statement not covered" > _.set(params, idProperty, [id])</span>
|
|
820
880
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
821
881
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
825
885
|
|
|
826
886
|
export <span class="fstat-no" title="function not covered" >function unpopulateObjects (options) {</span>
|
|
827
887
|
<span class="cstat-no" title="statement not covered" > // These are similar behaviour</span>
|
|
828
888
|
<span class="cstat-no" title="statement not covered" > return unpopulateObject(options)</span>
|
|
829
889
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
830
890
|
|
|
831
|
-
//
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
891
|
+
// Recursively transform any $regex on object to a new $regex managing diacritics.
|
|
892
|
+
// Will flag the regex items with a diacritic property in order to avoid do it twice.
|
|
893
|
+
export function toDiacriticRegex(object) {
|
|
894
|
+
if (Array.isArray(object)) {
|
|
895
|
+
object.forEach(toDiacriticRegex)
|
|
896
|
+
} else if (typeof object === 'object') {
|
|
897
|
+
_.forOwn(object, (value, key) => {
|
|
898
|
+
if (!value) <span class="branch-0 cbranch-no" title="branch not covered" >return</span>
|
|
899
|
+
// Check if applicable
|
|
900
|
+
if (value.$regex && !value.$regex.diacritic && value.$regex.source && !value.$diacriticSensitive) {
|
|
837
901
|
// Take care to support as well case sensitivity by keeping flags
|
|
838
|
-
|
|
902
|
+
value.$regex = new RegExp(makeDiacriticPattern(value.$regex.source), value.$regex.flags)
|
|
903
|
+
// Custom internal property to make the hook reentrant
|
|
904
|
+
value.$regex.diacritic = true
|
|
905
|
+
} else {
|
|
906
|
+
toDiacriticRegex(value)
|
|
839
907
|
}
|
|
840
908
|
})
|
|
841
909
|
}
|
|
842
910
|
}
|
|
843
|
-
 
|
|
911
|
+
|
|
912
|
+
// Used to manage diacritic insensitive fuzzy search
|
|
913
|
+
export function diacriticSearch (options = {}) {
|
|
914
|
+
return hook => {
|
|
915
|
+
const query = hook.params.query
|
|
916
|
+
if (query) toDiacriticRegex(query)
|
|
917
|
+
}
|
|
918
|
+
}</pre></td></tr></table></pre>
|
|
844
919
|
|
|
845
920
|
<div class='push'></div><!-- for sticky footer -->
|
|
846
921
|
</div><!-- /wrapper -->
|
|
847
922
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
848
923
|
Code coverage generated by
|
|
849
924
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
850
|
-
at
|
|
925
|
+
at 2026-03-10T09:15:24.774Z
|
|
851
926
|
</div>
|
|
852
927
|
<script src="../../../prettify.js"></script>
|
|
853
928
|
<script>
|