@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
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
|
-
import _ from 'lodash'
|
|
21
20
|
import { ref } from 'vue'
|
|
22
21
|
import { i18n } from '../../i18n.js'
|
|
23
22
|
import KGrid from './KGrid.vue'
|
|
24
23
|
|
|
25
24
|
// Props
|
|
26
|
-
defineProps({
|
|
25
|
+
const props = defineProps({
|
|
27
26
|
columns: {
|
|
28
27
|
type: Array,
|
|
29
28
|
default: () => null
|
|
@@ -35,7 +34,9 @@ const columnRefs = ref([])
|
|
|
35
34
|
|
|
36
35
|
// Functions
|
|
37
36
|
function getColumn (value) {
|
|
38
|
-
|
|
37
|
+
const index = props.columns.findIndex(column => column.name === value)
|
|
38
|
+
if (index === -1) return undefined
|
|
39
|
+
return columnRefs.value[index] || undefined
|
|
39
40
|
}
|
|
40
41
|
function getColumns (values) {
|
|
41
42
|
return values.map(value => getColumn(value))
|
|
@@ -286,6 +286,8 @@ onBeforeMount(() => {
|
|
|
286
286
|
})
|
|
287
287
|
onBeforeUnmount(() => {
|
|
288
288
|
Events.off('user-abilities-changed', refreshCollection)
|
|
289
|
+
if (scrollDownRef.value) scrollDownRef.value.refresh.cancel()
|
|
290
|
+
if (scrollToTopRef.value) scrollToTopRef.value.refresh.cancel()
|
|
289
291
|
})
|
|
290
292
|
|
|
291
293
|
// Expose
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<q-timeline-entry :color="getColor(item)">
|
|
44
44
|
<template v-slot:title>
|
|
45
45
|
<slot name="title">
|
|
46
|
-
<div v-if="getTitle(item)" class="text-h6">
|
|
46
|
+
<div v-if="getTitle(item)" class="text-h6 ellipsis">
|
|
47
47
|
{{ getTitle(item) }}
|
|
48
48
|
</div>
|
|
49
49
|
</slot>
|
|
@@ -243,6 +243,10 @@ const props = defineProps({
|
|
|
243
243
|
type: String,
|
|
244
244
|
default: undefined
|
|
245
245
|
},
|
|
246
|
+
heading: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
default: true
|
|
249
|
+
},
|
|
246
250
|
footer: {
|
|
247
251
|
type: [Array, Object],
|
|
248
252
|
default: () => null
|
|
@@ -333,6 +337,7 @@ function getColor (item) {
|
|
|
333
337
|
return _.get(item, _.get(props.schema, 'colorField'))
|
|
334
338
|
}
|
|
335
339
|
function getHeading (item) {
|
|
340
|
+
if (!props.heading) return null
|
|
336
341
|
const currentTimestamp = moment(_.get(item, _.get(props.schema, 'timestampField')))
|
|
337
342
|
if (!currentTimestamp || !currentTimestamp.isValid()) return false
|
|
338
343
|
const heading = _.capitalize(currentTimestamp.format('MMMM, YYYY'))
|
|
@@ -378,6 +383,8 @@ onBeforeMount(() => {
|
|
|
378
383
|
})
|
|
379
384
|
onBeforeUnmount(() => {
|
|
380
385
|
Events.off('user-abilities-changed', refreshCollection)
|
|
386
|
+
if (scrollDownRef.value) scrollDownRef.value.refresh.cancel()
|
|
387
|
+
if (scrollToTopRef.value) scrollToTopRef.value.refresh.cancel()
|
|
381
388
|
})
|
|
382
389
|
</script>
|
|
383
390
|
|
|
@@ -388,6 +395,7 @@ onBeforeUnmount(() => {
|
|
|
388
395
|
}
|
|
389
396
|
.q-timeline__title {
|
|
390
397
|
margin-bottom: 4px;
|
|
398
|
+
max-width: 80vw;
|
|
391
399
|
}
|
|
392
400
|
.q-timeline__subtitle {
|
|
393
401
|
margin-bottom: 0px;
|
|
@@ -2,7 +2,6 @@ import KCard from './KCard.vue'
|
|
|
2
2
|
import KCardSection from './KCardSection.vue'
|
|
3
3
|
import KGrid from './KGrid.vue'
|
|
4
4
|
import KItem from './KItem.vue'
|
|
5
|
-
import KHistory from './KHistory.vue'
|
|
6
5
|
import KTable from './KTable.vue'
|
|
7
6
|
|
|
8
7
|
export {
|
|
@@ -10,6 +9,5 @@ export {
|
|
|
10
9
|
KCardSection,
|
|
11
10
|
KGrid,
|
|
12
11
|
KItem,
|
|
13
|
-
KHistory,
|
|
14
12
|
KTable
|
|
15
13
|
}
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
{{ file.name }}
|
|
12
12
|
</q-chip>
|
|
13
13
|
</div>
|
|
14
|
+
<!-- -->
|
|
15
|
+
<q-field v-else-if="model"
|
|
16
|
+
:for="properties.name + '-field'"
|
|
17
|
+
v-model="model"
|
|
18
|
+
:label="label"
|
|
19
|
+
clearable
|
|
20
|
+
@clear="onFileCleared"
|
|
21
|
+
:disable="disabled"
|
|
22
|
+
>
|
|
23
|
+
<template v-slot:control>
|
|
24
|
+
{{ displayName }}
|
|
25
|
+
</template>
|
|
26
|
+
</q-field>
|
|
14
27
|
<q-file v-else
|
|
15
28
|
:for="properties.name + '-field'"
|
|
16
29
|
v-model="files"
|
|
@@ -70,12 +83,21 @@ export default {
|
|
|
70
83
|
computed: {
|
|
71
84
|
multiple () {
|
|
72
85
|
return _.get(this.properties, 'field.multiple', false)
|
|
86
|
+
},
|
|
87
|
+
displayName () {
|
|
88
|
+
if (_.isArray(this.model)) return _.map(this.model, 'name').join(', ')
|
|
89
|
+
return _.get(this.model, 'name', '')
|
|
73
90
|
}
|
|
74
91
|
},
|
|
75
92
|
methods: {
|
|
76
93
|
emptyModel () {
|
|
77
94
|
return this.multiple ? [] : null
|
|
78
95
|
},
|
|
96
|
+
onFileCleared () {
|
|
97
|
+
this.files = null
|
|
98
|
+
this.error = ''
|
|
99
|
+
this.onChanged()
|
|
100
|
+
},
|
|
79
101
|
getAcceptedTypes () {
|
|
80
102
|
return _.get(this.properties, 'field.mimeTypes', '')
|
|
81
103
|
},
|
|
@@ -129,7 +151,6 @@ export default {
|
|
|
129
151
|
this.onChanged()
|
|
130
152
|
},
|
|
131
153
|
onFileRejected (errs) {
|
|
132
|
-
console.log(errs)
|
|
133
154
|
const errors = [].concat(errs)
|
|
134
155
|
for (const error of errors) {
|
|
135
156
|
if (error?.failedPropValidation === 'max-files') this.error = i18n.tc('errors.MAX_FILES_REACHED', this.getMaxFiles())
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:error="hasError"
|
|
21
21
|
:error-message="errorLabel"
|
|
22
22
|
:disable="disabled"
|
|
23
|
+
:autofocus="hasFocus"
|
|
23
24
|
bottom-slots
|
|
24
25
|
@filter="onFilter"
|
|
25
26
|
@blur="onChanged"
|
|
@@ -55,6 +56,13 @@
|
|
|
55
56
|
{{ scope.opt.label }}
|
|
56
57
|
</span>
|
|
57
58
|
</template>
|
|
59
|
+
<!-- no options display -->
|
|
60
|
+
<template v-if="hasNoOption" v-slot:no-option>
|
|
61
|
+
<p v-if="typeof this.properties.field.noOption === 'string'" class="noOptionText">{{ this.properties.field.noOption }}</p>
|
|
62
|
+
<Suspense v-else>
|
|
63
|
+
<component v-if="noOptionComponent" :is="noOptionComponent" v-bind="noOptionsAttributes" />
|
|
64
|
+
</Suspense>
|
|
65
|
+
</template>
|
|
58
66
|
<!-- Helper -->
|
|
59
67
|
<template v-if="hasHelper" v-slot:append>
|
|
60
68
|
<k-action
|
|
@@ -76,6 +84,7 @@
|
|
|
76
84
|
import _ from 'lodash'
|
|
77
85
|
import { makeDiacriticPattern } from '../../../common'
|
|
78
86
|
import { baseField } from '../../mixins'
|
|
87
|
+
import { loadComponent } from '../../utils'
|
|
79
88
|
|
|
80
89
|
export default {
|
|
81
90
|
mixins: [baseField],
|
|
@@ -98,6 +107,15 @@ export default {
|
|
|
98
107
|
})
|
|
99
108
|
}
|
|
100
109
|
return opts
|
|
110
|
+
},
|
|
111
|
+
hasNoOption () {
|
|
112
|
+
return !_.isEmpty(_.get(this.properties.field, 'noOption', {}))
|
|
113
|
+
},
|
|
114
|
+
noOptionComponent () {
|
|
115
|
+
return loadComponent(this.properties.field.noOption.component)
|
|
116
|
+
},
|
|
117
|
+
noOptionsAttributes () {
|
|
118
|
+
return _.omit(this.properties.field.noOption, 'component')
|
|
101
119
|
}
|
|
102
120
|
},
|
|
103
121
|
data () {
|
|
@@ -163,3 +181,16 @@ export default {
|
|
|
163
181
|
}
|
|
164
182
|
}
|
|
165
183
|
</script>
|
|
184
|
+
|
|
185
|
+
<style lang=scss scoped>
|
|
186
|
+
.noOptionText {
|
|
187
|
+
margin-bottom: $space-y-base;
|
|
188
|
+
padding-inline: $space-x-base;
|
|
189
|
+
text-align: center;
|
|
190
|
+
}
|
|
191
|
+
@media (min-width: $breakpoint-lg-min) {
|
|
192
|
+
.noOptionText {
|
|
193
|
+
margin-block: $space-y-base;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
@@ -40,14 +40,13 @@ const computedIconColor = computed(() => {
|
|
|
40
40
|
return getHtmlColor(props.icon.color, defaultColor)
|
|
41
41
|
})
|
|
42
42
|
const computedOverlay = computed(() => {
|
|
43
|
-
|
|
44
|
-
return _.omit(props.icon.overlay, ['color', 'rotation'])
|
|
43
|
+
return _.omit(_.get(props.icon, 'overlay', {}), ['color', 'rotation'])
|
|
45
44
|
})
|
|
46
45
|
const computedOverlayColor = computed(() => {
|
|
47
|
-
return getHtmlColor(_.get(props.icon
|
|
46
|
+
return getHtmlColor(_.get(props.icon, 'overlay.color', defaultColor))
|
|
48
47
|
})
|
|
49
48
|
const computedOverlayTransform = computed(() => {
|
|
50
|
-
return `rotate(${_.get(props.icon
|
|
49
|
+
return `rotate(${_.get(props.icon, 'overlay.rotation', 0)}deg)`
|
|
51
50
|
})
|
|
52
51
|
</script>
|
|
53
52
|
|
|
@@ -270,7 +270,7 @@ const widgetHeight = computed(() => {
|
|
|
270
270
|
})
|
|
271
271
|
|
|
272
272
|
// Watch
|
|
273
|
-
watch(() => [$q.screen.width, $q.screen.height], (value) => onScreenResized())
|
|
273
|
+
watch(() => [$q.screen.width, $q.screen.height, header.visible, header.size, footer.visible, footer.size], (value) => onScreenResized())
|
|
274
274
|
watch(() => currentWindow.state, (newState, oldState) => refresh(newState, oldState))
|
|
275
275
|
|
|
276
276
|
// Functions
|
|
@@ -322,13 +322,16 @@ function refresh (newState, oldState) {
|
|
|
322
322
|
}
|
|
323
323
|
function setPinnedGeometry () {
|
|
324
324
|
const size = computeResponsiveSize(currentWindow.sizePolicy.pinned)
|
|
325
|
+
let height = $q.screen.height
|
|
326
|
+
if (header.visible) height -= header.size[1]
|
|
327
|
+
if (footer.visible) height -= footer.size[1]
|
|
325
328
|
let x, y
|
|
326
329
|
if (props.placement === 'top' || props.placement === 'bottom') {
|
|
327
330
|
x = $q.screen.width / 2 - size[0] / 2
|
|
328
|
-
y = props.placement === 'top' ? 0 :
|
|
331
|
+
y = props.placement === 'top' ? 0 : height - size[1]
|
|
329
332
|
} else {
|
|
330
333
|
x = props.placement === 'left' ? 0 : $q.screen.width - size[0]
|
|
331
|
-
y =
|
|
334
|
+
y = height / 2 - size[1] / 2
|
|
332
335
|
}
|
|
333
336
|
updateGeometry([x, y], size)
|
|
334
337
|
}
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
id="composer-fab"
|
|
10
10
|
:icon="getKindIcon(currentType)"
|
|
11
11
|
:color="getKindColor(currentType)"
|
|
12
|
-
direction="
|
|
12
|
+
direction="right"
|
|
13
13
|
:vertical-actions-align="$q.screen.lt.md ? 'left' : 'center'"
|
|
14
14
|
padding="xs"
|
|
15
15
|
>
|
|
16
16
|
<template v-for="type in availableTypes" :key="type">
|
|
17
17
|
<q-fab-action
|
|
18
|
+
:id="type + '-option'"
|
|
18
19
|
:icon="getKindIcon(type)"
|
|
19
20
|
:color="getKindColor(type)"
|
|
20
21
|
:label="getKindLabel(type)"
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
<script setup>
|
|
14
14
|
import _ from 'lodash'
|
|
15
|
-
import moment from 'moment'
|
|
16
15
|
import { computed } from 'vue'
|
|
17
16
|
import { Time } from '../../time.js'
|
|
18
17
|
import { i18n } from '../../i18n.js'
|
|
@@ -69,7 +68,7 @@ const computedButton = computed(() => {
|
|
|
69
68
|
let format = props.format
|
|
70
69
|
if (_.isEmpty(format)) format = _.get(Time.getFormat(), 'date.short')
|
|
71
70
|
// compute label
|
|
72
|
-
const label = _.isEmpty(computedModel.value) ? i18n.tie(props.placeholder) :
|
|
71
|
+
const label = _.isEmpty(computedModel.value) ? i18n.tie(props.placeholder) : Time.convertToLocal(computedModel.value).format(format)
|
|
73
72
|
// define button spec
|
|
74
73
|
const spec = {
|
|
75
74
|
id: 'date-button',
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
import _ from 'lodash'
|
|
35
35
|
import moment from 'moment'
|
|
36
36
|
import { ref, computed, watch } from 'vue'
|
|
37
|
-
import { toLocalTimezone } from '../../utils/utils.time.js'
|
|
38
37
|
import { Time } from '../../time.js'
|
|
39
38
|
import KDate from './KDate.vue'
|
|
40
39
|
import KTime from './KTime.vue'
|
|
@@ -143,7 +142,8 @@ const computedDateModel = computed({
|
|
|
143
142
|
})
|
|
144
143
|
const computedTimeModel = computed({
|
|
145
144
|
get: function () {
|
|
146
|
-
|
|
145
|
+
const time = (dateTime.value ? dateTime.value.format(timeMask) : null)
|
|
146
|
+
return time
|
|
147
147
|
},
|
|
148
148
|
set: function (value) {
|
|
149
149
|
const { HH, mm, ss } = toHMS(value)
|
|
@@ -164,18 +164,18 @@ const computedTimePicker = computed(() => {
|
|
|
164
164
|
|
|
165
165
|
// Watch
|
|
166
166
|
watch(() => props.modelValue, (value) => {
|
|
167
|
-
dateTime.value =
|
|
167
|
+
dateTime.value = Time.convertToLocal(props.modelValue)
|
|
168
168
|
})
|
|
169
169
|
watch(() => props.timezone, (value) => {
|
|
170
|
-
dateTime.value =
|
|
171
|
-
minDateTime.value =
|
|
172
|
-
maxDateTime.value =
|
|
170
|
+
dateTime.value = Time.convertToLocal(props.modelValue)
|
|
171
|
+
minDateTime.value = Time.convertToLocal(props.min)
|
|
172
|
+
maxDateTime.value = Time.convertToLocal(props.max)
|
|
173
173
|
})
|
|
174
174
|
watch(() => props.min, (value) => {
|
|
175
|
-
minDateTime.value =
|
|
175
|
+
minDateTime.value = Time.convertToLocal(props.min)
|
|
176
176
|
})
|
|
177
177
|
watch(() => props.max, (value) => {
|
|
178
|
-
maxDateTime.value =
|
|
178
|
+
maxDateTime.value = Time.convertToLocal(props.max)
|
|
179
179
|
})
|
|
180
180
|
|
|
181
181
|
// Functions
|
|
@@ -238,7 +238,7 @@ const triggerEmit = _.debounce(() => {
|
|
|
238
238
|
}, 100)
|
|
239
239
|
|
|
240
240
|
// Immediate
|
|
241
|
-
if (props.modelValue) dateTime.value =
|
|
242
|
-
if (props.min) minDateTime.value =
|
|
243
|
-
if (props.max) maxDateTime.value =
|
|
241
|
+
if (props.modelValue) dateTime.value = Time.convertToLocal(props.modelValue)
|
|
242
|
+
if (props.min) minDateTime.value = Time.convertToLocal(props.min)
|
|
243
|
+
if (props.max) maxDateTime.value = Time.convertToLocal(props.max)
|
|
244
244
|
</script>
|
|
@@ -74,7 +74,7 @@ const computedButton = computed(() => {
|
|
|
74
74
|
if (_.isEmpty(format)) format = _.get(Time.getFormat(), 'time.long')
|
|
75
75
|
// compute label
|
|
76
76
|
let label
|
|
77
|
-
if (!_.isEmpty(computedModel.value)) label = moment(computedModel.value, mask).format(format)
|
|
77
|
+
if (!_.isEmpty(computedModel.value)) label = moment.tz(computedModel.value, mask, Time.getFormatTimezone()).format(format)
|
|
78
78
|
else label = i18n.tie(props.placeholder)
|
|
79
79
|
// define button spec
|
|
80
80
|
const spec = {
|
|
@@ -36,7 +36,7 @@ export function useCollection (options) {
|
|
|
36
36
|
|
|
37
37
|
// Functions
|
|
38
38
|
function getService () {
|
|
39
|
-
const service = api.getService(options.service.value, options.contextId ? options.contextId.value : null)
|
|
39
|
+
const service = options.getService?.value ? options.getService.value() : api.getService(options.service.value, options.contextId ? options.contextId.value : null)
|
|
40
40
|
if (!service) {
|
|
41
41
|
throw new Error('Cannot retrieve target service ' + options.service.value)
|
|
42
42
|
}
|
|
@@ -111,18 +111,22 @@ export function useCollection (options) {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
function getFullQuery () {
|
|
115
|
+
return {
|
|
116
116
|
$locale: getLocale(),
|
|
117
117
|
...getCollectionBaseQuery(),
|
|
118
118
|
...getCollectionFilterQuery(),
|
|
119
119
|
...getCollectionPaginationQuery()
|
|
120
120
|
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const refreshCollection = _.throttle(() => {
|
|
124
|
+
const fullQuery = getFullQuery()
|
|
121
125
|
subscribe(fullQuery)
|
|
122
126
|
}, options.refreshThrottle.value, { leading: false })
|
|
123
127
|
|
|
124
128
|
function resetCollection () {
|
|
125
|
-
// Do not reset the collection since it is initializing
|
|
129
|
+
// Do not reset the collection since it is initializing
|
|
126
130
|
if (_.isNil(items.value)) return
|
|
127
131
|
// Reset pagination and start again refreshing the collection
|
|
128
132
|
if (options.appendItems.value) setCollectionItems([])
|
|
@@ -134,9 +138,30 @@ export function useCollection (options) {
|
|
|
134
138
|
// When we append items some items of the previous pages might have been updated.
|
|
135
139
|
// In this case we need to reset the full collection as Rx only tracks changes on the current page
|
|
136
140
|
updatedItems = (Array.isArray(updatedItems) ? updatedItems : [updatedItems])
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
141
|
+
// Update the required items
|
|
142
|
+
for (const updatedItem of updatedItems) {
|
|
143
|
+
const item = _.find(items.value, item => {
|
|
144
|
+
return updatedItem._id && item._id && (updatedItem._id.toString() === item._id.toString())
|
|
145
|
+
})
|
|
146
|
+
if (item) Object.assign(item, updatedItem)
|
|
147
|
+
}
|
|
148
|
+
// Some items might not match the query anymore so that we should remove it
|
|
149
|
+
const matcher = api.matcher(getFullQuery())
|
|
150
|
+
const matchedItems = updatedItems.filter(matcher)
|
|
151
|
+
const itemsToRemove = _.differenceBy(updatedItems, matchedItems, item => item._id ? item._id.toString() : null)
|
|
152
|
+
onItemsRemoved(itemsToRemove)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function onItemsRemoved (removedItems) {
|
|
156
|
+
// When we append items some items of the previous pages might have been updated.
|
|
157
|
+
// In this case we need to reset the full collection as Rx only tracks changes on the current page
|
|
158
|
+
removedItems = (Array.isArray(removedItems) ? removedItems : [removedItems])
|
|
159
|
+
// Remove the required items
|
|
160
|
+
for (const removedItem of removedItems) {
|
|
161
|
+
_.remove(items.value, item => {
|
|
162
|
+
return removedItem._id && item._id && (removedItem._id.toString() === item._id.toString())
|
|
163
|
+
})
|
|
164
|
+
}
|
|
140
165
|
}
|
|
141
166
|
|
|
142
167
|
// Lifecycle hooks
|
|
@@ -154,7 +179,7 @@ export function useCollection (options) {
|
|
|
154
179
|
serviceEventListeners = listenToServiceEvents(getService(), {
|
|
155
180
|
patched: onItemsUpdated,
|
|
156
181
|
updated: onItemsUpdated,
|
|
157
|
-
removed:
|
|
182
|
+
removed: onItemsRemoved
|
|
158
183
|
})
|
|
159
184
|
}
|
|
160
185
|
})
|
|
@@ -23,7 +23,7 @@ export function useErrors () {
|
|
|
23
23
|
// Check if user can retry to avoid this error
|
|
24
24
|
if (error.retryHandler) {
|
|
25
25
|
notification.actions = [{
|
|
26
|
-
label:
|
|
26
|
+
label: i18n.tie('RETRY'),
|
|
27
27
|
handler: error.retryHandler
|
|
28
28
|
}]
|
|
29
29
|
// Increase timeout so that user has a chance to retry
|