@kalisio/kdk 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/api/application.js +12 -12
- package/core/api/authentication.js +51 -7
- package/core/api/hooks/hooks.authentication.js +1 -59
- package/core/api/hooks/hooks.authorisations.js +8 -102
- package/core/api/hooks/hooks.model.js +4 -0
- package/core/api/hooks/hooks.push.js +18 -14
- package/core/api/hooks/hooks.users.js +0 -91
- package/core/api/hooks/index.js +0 -2
- package/core/api/services/account/account.service.js +1 -1
- package/core/api/services/authorisations/authorisations.service.js +28 -29
- package/core/api/services/index.js +38 -50
- package/core/api/services/messages/messages.hooks.js +4 -3
- package/core/api/services/users/users.service.js +5 -0
- package/core/client/api.js +182 -71
- package/core/client/broadcaster.js +20 -0
- package/core/client/capabilities.js +17 -7
- package/core/client/components/KActivity.vue +29 -34
- package/core/client/components/KAvatar.vue +0 -6
- package/core/client/components/KChip.vue +142 -39
- package/core/client/components/KContent.vue +13 -32
- package/core/client/components/KDialog.vue +29 -8
- package/core/client/components/KEditor.vue +120 -0
- package/core/client/components/KFollower.vue +75 -0
- package/core/client/components/KLogo.vue +2 -3
- package/core/client/components/KModal.vue +30 -10
- package/core/client/components/KSponsor.vue +1 -1
- package/core/client/components/KTextArea.vue +2 -5
- package/core/client/components/account/KDeleteAccountManager.vue +1 -1
- package/core/client/components/account/KProfile.vue +52 -14
- package/core/client/components/account/KSubscription.vue +19 -9
- package/core/client/components/account/KSubscriptionsManager.vue +10 -11
- package/core/client/components/action/KAction.vue +44 -24
- package/core/client/components/action/KBugReportAction.vue +4 -5
- package/core/client/components/action/KToggleStickyVisibility.vue +41 -0
- package/core/client/components/action/KToggleWidgetVisibility.vue +41 -0
- package/core/client/components/app/KPlatform.vue +122 -35
- package/core/client/components/app/KRequestProgressBar.vue +59 -0
- package/core/client/components/app/KSettings.vue +13 -2
- package/core/client/components/app/KTour.vue +2 -2
- package/core/client/components/chart/KTimeSeriesChart.vue +11 -3
- package/core/client/components/collection/KCard.vue +27 -33
- package/core/client/components/collection/KCardSection.vue +3 -23
- package/core/client/components/collection/KColumn.vue +0 -5
- package/core/client/components/collection/KDescriptionCardSection.vue +10 -5
- package/core/client/components/collection/KFilterView.vue +15 -0
- package/core/client/components/collection/KGrid.vue +4 -9
- package/core/client/components/collection/KHistory.vue +0 -5
- package/core/client/components/collection/KHistoryEntry.vue +0 -2
- package/core/client/components/collection/KItem.vue +1 -2
- package/core/client/components/collection/KSearchFilterControl.vue +139 -0
- package/core/client/components/collection/KTable.vue +1 -4
- package/core/client/components/collection/KTagsFilterControl.vue +70 -0
- package/core/client/components/collection/KTagsFilterView.vue +61 -0
- package/core/client/components/collection/KTimeFilterControl.vue +40 -0
- package/core/client/components/collection/KTimeFilterView.vue +106 -0
- package/core/client/components/collection/KTimeLine.vue +18 -11
- package/core/client/components/document/KBrowser.vue +283 -0
- package/core/client/components/document/KCsv.vue +52 -0
- package/core/client/components/document/KDocument.vue +19 -5
- package/core/client/components/document/KImage.vue +50 -19
- package/core/client/components/document/KMarkdown.vue +10 -2
- package/core/client/components/document/KUploader.vue +126 -0
- package/core/client/components/document/KVideo.vue +39 -0
- package/core/client/components/form/KDateField.vue +70 -0
- package/core/client/components/form/KDateTimeRangeField.vue +6 -17
- package/core/client/components/form/KDatetimeField.vue +6 -13
- package/core/client/components/form/KForm.vue +8 -8
- package/core/client/components/form/KOptionsField.vue +2 -0
- package/core/client/components/form/KResolutionField.vue +54 -52
- package/core/client/components/form/KSelectField.vue +27 -13
- package/core/client/components/form/KTextareaField.vue +23 -5
- package/core/client/components/graphics/KIcon.vue +64 -0
- package/core/client/components/index.js +1 -3
- package/core/client/components/input/KColorPicker.vue +70 -0
- package/core/client/components/input/KIconPicker.vue +188 -0
- package/core/client/components/input/KShapePicker.vue +81 -0
- package/core/client/components/input/index.js +7 -1
- package/core/client/components/layout/KFab.vue +1 -1
- package/core/client/components/layout/KLayout.vue +14 -2
- package/core/client/components/layout/KOpener.vue +9 -11
- package/core/client/components/layout/KPage.vue +31 -17
- package/core/client/components/layout/KWindow.vue +34 -18
- package/core/client/components/menu/KMenu.vue +52 -36
- package/core/client/components/menu/KSubMenu.vue +105 -0
- package/core/client/components/messages/KMessageCard.vue +207 -0
- package/core/client/components/messages/KMessageComposer.vue +199 -0
- package/core/client/components/messages/KMessagesTimeLine.vue +137 -0
- package/core/client/components/messages/index.js +7 -0
- package/core/client/components/screen/KErrorScreen.vue +2 -3
- package/core/client/components/screen/KLogoutScreen.vue +3 -1
- package/core/client/components/screen/KOAuthLoginScreen.vue +15 -0
- package/core/client/components/screen/KOAuthLogoutScreen.vue +33 -0
- package/core/client/components/screen/KUnauthorizedScreen.vue +16 -0
- package/core/client/components/time/KAbsoluteTimeRange.vue +7 -14
- package/core/client/components/time/KDate.vue +56 -26
- package/core/client/components/time/KDateTime.vue +93 -37
- package/core/client/components/time/KDateTimeRange.vue +197 -52
- package/core/client/components/time/KTime.vue +56 -26
- package/core/client/composables/activity.js +40 -30
- package/core/client/composables/{counter.js → collection-counter.js} +2 -4
- package/core/client/composables/collection-filter.js +111 -0
- package/core/client/composables/collection-timerange.js +56 -0
- package/core/client/composables/collection.js +13 -11
- package/core/client/composables/context.js +92 -0
- package/core/client/composables/errors.js +83 -0
- package/core/client/composables/index.js +5 -1
- package/core/client/composables/layout.js +14 -11
- package/core/client/composables/messages.js +4 -4
- package/core/client/composables/pwa.js +20 -27
- package/core/client/composables/schema.js +1 -1
- package/core/client/composables/screen.js +21 -9
- package/core/client/composables/selection.js +16 -4
- package/core/client/composables/session.js +13 -7
- package/core/client/composables/store.js +2 -1
- package/core/client/context.js +38 -0
- package/core/client/directives/v-hover.js +7 -4
- package/core/client/document.js +43 -15
- package/core/client/events.js +2 -2
- package/core/client/exporter.js +5 -4
- package/core/client/filter.js +1 -8
- package/core/client/guards.js +3 -3
- package/core/client/hooks/hooks.logger.js +1 -1
- package/core/client/hooks/hooks.offline.js +32 -0
- package/core/client/hooks/index.js +2 -1
- package/core/client/i18n/core_en.json +95 -268
- package/core/client/i18n/core_fr.json +181 -353
- package/core/client/index.js +22 -8
- package/core/client/layout.js +64 -25
- package/core/client/local-cache.js +67 -0
- package/core/client/local-storage.js +6 -2
- package/core/client/mixins/index.js +0 -1
- package/core/client/mixins/mixin.base-activity.js +22 -10
- package/core/client/mixins/mixin.base-editor.js +1 -1
- package/core/client/mixins/mixin.base-field.js +10 -1
- package/core/client/mixins/mixin.base-item.js +14 -11
- package/core/client/mixins/mixin.service.js +1 -5
- package/core/client/platform.js +44 -0
- package/core/client/readers/reader.blob.js +3 -3
- package/core/client/readers/reader.csv.js +2 -2
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/services/index.js +7 -11
- package/core/client/storage.js +43 -8
- package/core/client/template-context.js +14 -14
- package/core/client/time.js +3 -3
- package/core/client/units.js +7 -4
- package/core/client/utils/index.js +6 -5
- package/core/client/utils/utils.collection.js +71 -0
- package/core/client/utils/utils.colors.js +29 -8
- package/core/client/utils/utils.content.js +14 -14
- package/core/client/utils/utils.files.js +17 -0
- package/core/client/utils/utils.items.js +4 -0
- package/core/client/utils/utils.math.js +18 -1
- package/core/client/utils/utils.push.js +22 -13
- package/core/client/utils/utils.screen.js +6 -2
- package/core/client/utils/utils.services.js +42 -0
- package/core/client/utils/utils.session.js +48 -12
- package/core/client/utils/utils.shapes.js +15 -11
- package/core/common/permissions.js +3 -108
- package/core/common/schemas/messages.update.json +16 -0
- package/core/common/schemas/settings.update.json +27 -8
- package/core/common/utils.js +2 -0
- package/core/common/utils.offline.js +38 -0
- package/coverage/core/api/application.js.html +296 -296
- package/coverage/core/api/authentication.js.html +206 -74
- package/coverage/core/api/db.js.html +61 -61
- package/coverage/core/api/hooks/hooks.authentication.js.html +15 -189
- package/coverage/core/api/hooks/hooks.authorisations.js.html +180 -462
- package/coverage/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/core/api/hooks/hooks.logger.js.html +16 -16
- package/coverage/core/api/hooks/hooks.model.js.html +69 -57
- package/coverage/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/core/api/hooks/hooks.push.js.html +58 -46
- package/coverage/core/api/hooks/hooks.query.js.html +142 -142
- package/coverage/core/api/hooks/hooks.schemas.js.html +1 -1
- 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.users.js.html +54 -327
- package/coverage/core/api/hooks/index.html +64 -94
- package/coverage/core/api/hooks/index.js.html +4 -10
- package/coverage/core/api/index.html +41 -56
- package/coverage/core/api/index.js.html +1 -1
- package/coverage/core/api/marshall.js.html +9 -9
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +13 -58
- package/coverage/core/api/models/messages.model.mongodb.js.html +35 -35
- package/coverage/core/api/models/organisations.model.mongodb.js.html +3 -3
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +1 -1
- package/coverage/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/core/api/services/account/account.service.js.html +67 -67
- package/coverage/core/api/services/account/index.html +16 -16
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +141 -144
- package/coverage/core/api/services/authorisations/index.html +19 -19
- package/coverage/core/api/services/databases/databases.hooks.js.html +82 -82
- package/coverage/core/api/services/databases/databases.service.js.html +20 -20
- package/coverage/core/api/services/databases/index.html +32 -32
- package/coverage/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/core/api/services/import-export/index.html +1 -1
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +118 -154
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/messages/index.html +21 -21
- package/coverage/core/api/services/messages/messages.hooks.js.html +89 -86
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +23 -23
- package/coverage/core/api/services/push/index.html +1 -1
- package/coverage/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/core/api/services/push/push.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +5 -5
- package/coverage/core/api/services/storage/storage.hooks.js.html +1 -1
- package/coverage/core/api/services/storage/storage.service.js.html +27 -27
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +23 -8
- package/coverage/core/api/services/users/users.hooks.js.html +1 -1
- package/coverage/core/api/services/users/users.service.js.html +100 -0
- package/coverage/core/api/utils.js.html +1 -1
- 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 +195 -510
- package/coverage/core/common/schema.js.html +1 -1
- package/coverage/core/common/utils.js.html +12 -6
- package/coverage/core/common/utils.offline.js.html +199 -0
- package/coverage/index.html +142 -172
- package/coverage/lcov-report/core/api/application.js.html +296 -296
- package/coverage/lcov-report/core/api/authentication.js.html +206 -74
- package/coverage/lcov-report/core/api/db.js.html +61 -61
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +15 -189
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +180 -462
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +16 -16
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +69 -57
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +58 -46
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +142 -142
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +1 -1
- 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.users.js.html +54 -327
- package/coverage/lcov-report/core/api/hooks/index.html +64 -94
- package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
- package/coverage/lcov-report/core/api/index.html +41 -56
- package/coverage/lcov-report/core/api/index.js.html +1 -1
- package/coverage/lcov-report/core/api/marshall.js.html +9 -9
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +13 -58
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +35 -35
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +3 -3
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +67 -67
- package/coverage/lcov-report/core/api/services/account/index.html +16 -16
- 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 +141 -144
- package/coverage/lcov-report/core/api/services/authorisations/index.html +19 -19
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +82 -82
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +20 -20
- package/coverage/lcov-report/core/api/services/databases/index.html +32 -32
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +118 -154
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +89 -86
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +23 -23
- package/coverage/lcov-report/core/api/services/push/index.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +5 -5
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +27 -27
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +23 -8
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- 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 +195 -510
- package/coverage/lcov-report/core/common/schema.js.html +1 -1
- package/coverage/lcov-report/core/common/utils.js.html +12 -6
- package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
- package/coverage/lcov-report/index.html +142 -172
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +125 -29
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +20 -44
- 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 +49 -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/map/api/models/styles.model.mongodb.js.html +112 -0
- 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 +29 -11
- 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 +78 -9
- 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 +287 -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/lcov-report/map/api/services/styles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +196 -0
- 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 +8 -5
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +7 -7
- 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 +1 -1
- 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 +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/lcov-report/map/common/wcs-utils.js.html +9 -9
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wfs-utils.js.html +11 -11
- package/coverage/lcov-report/map/common/wms-utils.js.html +8 -8
- package/coverage/lcov-report/map/common/wmts-utils.js.html +7 -7
- package/coverage/lcov.info +2581 -3278
- package/coverage/map/api/hooks/hooks.catalog.js.html +125 -29
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +20 -44
- 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 +49 -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/map/api/models/styles.model.mongodb.js.html +112 -0
- 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 +29 -11
- 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 +78 -9
- 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 +287 -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/map/api/services/styles/index.html +116 -0
- package/coverage/map/api/services/styles/styles.hooks.js.html +196 -0
- 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 +8 -5
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +7 -7
- 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 +1 -1
- 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 +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/map/common/wcs-utils.js.html +9 -9
- package/coverage/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/map/common/wfs-utils.js.html +11 -11
- package/coverage/map/common/wms-utils.js.html +8 -8
- package/coverage/map/common/wmts-utils.js.html +7 -7
- package/coverage/tmp/coverage-323534-1747828879483-0.json +1 -0
- package/coverage/tmp/coverage-323546-1747828879453-0.json +1 -0
- package/coverage/tmp/coverage-323557-1747828879439-0.json +1 -0
- package/coverage/tmp/coverage-323569-1747828879416-0.json +1 -0
- package/coverage/tmp/coverage-323576-1747828879390-0.json +1 -0
- package/extras/configs/helpers.js +78 -0
- package/extras/configs/panes.left.js +118 -0
- package/extras/configs/panes.top.js +222 -0
- package/extras/configs/stickies.js +57 -0
- package/extras/configs/widgets.left.js +23 -0
- package/extras/configs/widgets.top.js +73 -0
- package/extras/css/core.variables.scss +8 -0
- package/extras/images/north.svg +3 -0
- package/extras/tours/map/side-nav.js +3 -3
- package/map/api/hooks/hooks.catalog.js +56 -23
- package/map/api/hooks/hooks.query.js +16 -24
- package/map/api/models/catalog.model.mongodb.js +16 -2
- package/{core/api/models/groups.model.mongodb.js → map/api/models/styles.model.mongodb.js} +2 -1
- package/map/api/services/catalog/catalog.hooks.js +13 -7
- package/map/api/services/features/features.hooks.js +28 -5
- package/map/api/services/features/features.service.js +101 -0
- package/map/api/services/index.js +125 -46
- package/map/api/services/styles/styles.hooks.js +37 -0
- package/map/client/cesium/utils/index.js +1 -0
- package/map/client/cesium/utils/utils.cesium.js +397 -0
- package/map/client/cesium/utils/utils.features.js +8 -0
- package/map/client/cesium/utils/utils.geojson.js +59 -0
- package/map/client/cesium/utils/utils.style.js +134 -17
- package/map/client/components/KEditLayerData.vue +17 -79
- package/map/client/components/KFeatureEditor.vue +2 -7
- package/map/client/components/KFeaturesChart.vue +2 -6
- package/map/client/components/KFeaturesFilterEditor.vue +300 -0
- package/map/client/components/KFeaturesFilterManager.vue +196 -0
- package/map/client/components/KFeaturesTable.vue +0 -5
- package/map/client/components/KFilterCondition.vue +303 -0
- package/map/client/components/KLayerEditionToolbar.vue +4 -3
- package/map/client/components/KLayerEditor.vue +451 -36
- package/map/client/components/KMeasureTool.vue +36 -9
- package/map/client/components/KProjectMenu.vue +14 -8
- package/map/client/components/catalog/KAddLayer.vue +0 -4
- package/map/client/components/catalog/KBaseLayersSelector.vue +42 -46
- package/map/client/components/catalog/KConnectLayer.vue +295 -291
- package/map/client/components/catalog/KCreateLayer.vue +141 -146
- package/map/client/components/catalog/KCreateOfflineView.vue +100 -0
- package/map/client/components/catalog/KCreateView.vue +2 -8
- package/map/client/components/catalog/KFilteredLayerItem.vue +72 -25
- package/map/client/components/catalog/KImportLayer.vue +121 -129
- package/map/client/components/catalog/KLayerItem.vue +44 -32
- package/map/client/components/catalog/KLayersPanel.vue +45 -17
- package/map/client/components/catalog/KLayersSelector.vue +51 -50
- package/map/client/components/catalog/KProjectManager.vue +4 -8
- package/map/client/components/catalog/KProjectSelector.vue +33 -2
- package/map/client/components/catalog/KProjectsPanel.vue +84 -106
- package/map/client/components/catalog/KSelectLayers.vue +56 -69
- package/map/client/components/catalog/KSelectViews.vue +56 -69
- package/map/client/components/catalog/KViewSelector.vue +32 -2
- package/map/client/components/catalog/KViewsPanel.vue +178 -110
- package/map/client/components/catalog/KWeatherLayersSelector.vue +77 -85
- package/map/client/components/form/KLocationField.vue +21 -2
- package/map/client/components/form/KOwsLayerField.vue +1 -1
- package/map/client/components/form/KOwsServiceField.vue +102 -63
- package/map/client/components/form/KSelectLayersField.vue +1 -1
- package/map/client/components/form/KSelectViewsField.vue +1 -1
- package/map/client/components/form/KTimezoneField.vue +0 -1
- package/map/client/components/legend/KLegend.vue +4 -4
- package/map/client/components/location/KLocationCardSection.vue +16 -0
- package/map/client/components/location/KLocationMap.vue +3 -2
- package/map/client/components/location/KLocationSearch.vue +46 -8
- package/map/client/components/location/KLocationTimeLineCard.vue +25 -3
- package/map/client/components/location/KLocationTip.vue +57 -10
- package/map/client/components/selection/KFeaturesSelection.vue +71 -0
- package/map/client/components/selection/KSelectedLayerFeatures.vue +343 -0
- package/map/client/components/{KAttribution.vue → stickies/KAttribution.vue} +39 -33
- package/map/client/components/stickies/KLevelSlider.vue +114 -0
- package/map/client/components/stickies/KNorthArrow.vue +26 -0
- package/map/client/components/stickies/KPosition.vue +103 -0
- package/map/client/components/stickies/KTarget.vue +34 -0
- package/map/client/components/styles/KLayerStyleAction.vue +58 -0
- package/map/client/components/styles/KStyleEditor.vue +273 -0
- package/map/client/components/styles/KStyleEditorSection.vue +79 -0
- package/map/client/components/styles/KStyleManager.vue +183 -0
- package/map/client/components/styles/KStylePreview.vue +64 -0
- package/map/client/components/styles/KStylePreviewItem.vue +68 -0
- package/map/client/components/styles/KStylePropertiesGroup.vue +76 -0
- package/map/client/components/styles/KStyleProperty.vue +136 -0
- package/map/client/components/styles/KStyleTip.vue +118 -0
- package/map/client/components/tools/KGeolocateTool.vue +3 -2
- package/map/client/components/tools/KSearchTool.vue +34 -6
- package/map/client/components/widget/KMapillaryViewer.vue +1 -1
- package/map/client/components/widget/KStackableTimeSeries.vue +8 -5
- package/map/client/composables/activity.js +29 -43
- package/map/client/composables/catalog.js +1 -1
- package/map/client/composables/highlight.js +117 -57
- package/map/client/composables/location.js +33 -14
- package/map/client/composables/project.js +9 -10
- package/map/client/composables/selection.js +136 -23
- package/map/client/geocoder.js +104 -0
- package/map/client/geolocation.js +1 -1
- package/map/client/globe.js +3 -0
- package/map/client/hooks/hooks.offline.js +95 -0
- package/map/client/hooks/index.js +1 -0
- package/map/client/i18n/map_en.json +159 -94
- package/map/client/i18n/map_fr.json +186 -127
- package/map/client/index.js +3 -0
- package/map/client/init.js +44 -8
- package/map/client/leaflet/BoxSelection.js +2 -2
- package/map/client/leaflet/GradientPath.js +84 -4
- package/map/client/leaflet/TiledFeatureLayer.js +2 -3
- package/map/client/leaflet/WindBarb.js +323 -0
- package/map/client/leaflet/utils/index.js +1 -0
- package/map/client/leaflet/utils/utils.events.js +8 -3
- package/map/client/leaflet/utils/utils.geojson.js +221 -0
- package/map/client/leaflet/utils/utils.style.js +10 -9
- package/map/client/map.js +3 -0
- package/map/client/mixins/globe/mixin.base-globe.js +151 -19
- package/map/client/mixins/globe/mixin.geojson-layers.js +208 -86
- package/map/client/mixins/globe/mixin.popup.js +3 -2
- package/map/client/mixins/globe/mixin.style.js +3 -1
- package/map/client/mixins/globe/mixin.tooltip.js +3 -2
- package/map/client/mixins/map/index.js +1 -3
- package/map/client/mixins/map/mixin.base-map.js +267 -79
- package/map/client/mixins/map/mixin.canvas-layers.js +44 -10
- package/map/client/mixins/map/mixin.edit-layers.js +142 -57
- package/map/client/mixins/map/mixin.geojson-layers.js +129 -205
- package/map/client/mixins/map/mixin.pmtiles-layers.js +24 -11
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +1 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +2 -1
- package/map/client/mixins/mixin.activity.js +61 -41
- package/map/client/mixins/mixin.context.js +19 -14
- package/map/client/mixins/mixin.feature-selection.js +0 -1
- package/map/client/mixins/mixin.feature-service.js +41 -59
- package/map/client/mixins/mixin.weacast.js +1 -1
- package/map/client/navigator.js +38 -0
- package/map/client/pixi-utils.js +1 -1
- package/map/client/planets.js +1 -1
- package/map/client/readers/reader.kml.js +57 -1
- package/map/client/utils/index.js +1 -0
- package/map/client/utils/utils.capture.js +10 -7
- package/map/client/utils/utils.catalog.js +2 -2
- package/map/client/utils/utils.features.js +193 -39
- package/map/client/utils/utils.js +8 -19
- package/map/client/utils/utils.layers.js +381 -4
- package/map/client/utils/utils.location.js +39 -74
- package/map/client/utils/utils.offline.js +89 -0
- package/map/client/utils/utils.style.js +133 -80
- package/map/client/utils/utils.time-series.js +99 -25
- package/map/common/geotiff-grid-source.js +2 -1
- package/map/common/permissions.js +2 -0
- package/map/common/schemas/capture.create.json +4 -4
- package/map/common/schemas/catalog.update.json +18 -2
- package/map/common/schemas/projects.create.json +2 -2
- package/map/common/schemas/projects.update.json +2 -2
- package/map/common/tms-utils.js +5 -5
- package/map/common/wcs-grid-source.js +2 -2
- package/map/common/wcs-utils.js +8 -8
- package/map/common/wfs-utils.js +10 -10
- package/map/common/wms-utils.js +7 -7
- package/map/common/wmts-utils.js +6 -6
- package/package.json +7 -4
- package/test/api/core/account.test.js +0 -72
- package/test/api/core/authentication.test.js +184 -0
- package/test/api/core/config/default.cjs +1 -3
- package/test/api/core/index.test.js +33 -96
- package/test/api/core/offline.test.js +55 -0
- package/test/api/core/push.test.js +3 -3
- package/test/api/core/{test-log-2024-06-06.log → test-log-2025-02-05.log} +3 -3
- package/test/api/core/{test-log-2024-11-15.log → test-log-2025-05-21.log} +1 -9
- package/test/api/map/alerts.test.js +1 -1
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/data/vigicrues.observations.Q.json +47042 -0
- package/test/api/map/index.test.js +113 -9
- package/test/api/map/style.test.js +62 -0
- package/test/client/core/layout.js +2 -2
- package/test/client/core/runner.js +1 -1
- package/test/client/core/utils.js +52 -0
- package/test/client/map/catalog.js +1 -0
- package/core/api/hooks/hooks.groups.js +0 -48
- package/core/api/hooks/hooks.organisations.js +0 -152
- package/core/api/models/organisations.model.mongodb.js +0 -3
- package/core/api/models/tags.model.mongodb.js +0 -10
- package/core/api/services/groups/groups.hooks.js +0 -31
- package/core/api/services/organisations/organisations.hooks.js +0 -31
- package/core/api/services/organisations/organisations.service.js +0 -86
- package/core/api/services/tags/tags.hooks.js +0 -31
- package/core/api/utils.js +0 -11
- package/core/client/components/KChipsPane.vue +0 -103
- package/core/client/components/document/index.js +0 -9
- package/core/client/components/team/KAddMember.vue +0 -378
- package/core/client/components/team/KAddTag.vue +0 -121
- package/core/client/components/team/KChangeRole.vue +0 -118
- package/core/client/components/team/KGroupCard.vue +0 -110
- package/core/client/components/team/KGroupsActivity.vue +0 -78
- package/core/client/components/team/KJoinGroup.vue +0 -132
- package/core/client/components/team/KMemberCard.vue +0 -328
- package/core/client/components/team/KMemberFilter.vue +0 -49
- package/core/client/components/team/KMembersActivity.vue +0 -136
- package/core/client/components/team/KOrganisationsActivity.vue +0 -51
- package/core/client/components/team/KTagCard.vue +0 -72
- package/core/client/components/team/KTagsActivity.vue +0 -73
- package/core/client/components/team/index.js +0 -9
- package/core/client/mixins/mixin.base-context.js +0 -54
- package/core/client/utils/utils.platform.js +0 -12
- package/core/common/schemas/groups.create.json +0 -28
- package/core/common/schemas/groups.update.json +0 -28
- package/core/common/schemas/organisations.create.json +0 -28
- package/core/common/schemas/organisations.update.json +0 -49
- package/core/common/schemas/tags.create.json +0 -35
- package/core/common/schemas/tags.update.json +0 -35
- package/coverage/tmp/coverage-280506-1731704745613-0.json +0 -1
- package/coverage/tmp/coverage-280518-1731704745599-0.json +0 -1
- package/coverage/tmp/coverage-280529-1731704745588-0.json +0 -1
- package/coverage/tmp/coverage-280541-1731704745574-0.json +0 -1
- package/coverage/tmp/coverage-280548-1731704745545-0.json +0 -1
- package/map/client/components/KFeaturesFilter.vue +0 -259
- package/map/client/components/KLayerStyleEditor.vue +0 -118
- package/map/client/components/KLayerStyleForm.vue +0 -740
- package/map/client/components/KLevelSlider.vue +0 -100
- package/map/client/components/KNorth.vue +0 -31
- package/map/client/components/KPositionIndicator.vue +0 -83
- package/map/client/components/catalog/KCreateProject.vue +0 -100
- package/map/client/mixins/map/mixin.forecast-layers.js +0 -81
- package/map/client/mixins/map/mixin.georaster-layers.js +0 -107
- package/test/api/core/team.test.js +0 -670
- package/test/api/core/test-log-2023-12-19.log +0 -7
- package/test/api/core/test-log-2024-01-04.log +0 -14
- package/test/api/core/test-log-2024-05-14.log +0 -6
- package/test/api/core/test-log-2024-06-26.log +0 -25
- package/test/api/core/test-log-2024-06-28.log +0 -2
- package/test/api/core/test-log-2024-07-09.log +0 -0
- package/test/api/core/test-log-2024-08-13.log +0 -69
- package/test/api/core/test-log-2024-10-28.log +0 -53
- package/test/api/core/test-log-2024-11-05.log +0 -30
- package/test/api/map/test-log-2023-11-24.log +0 -121
- package/test/api/map/test-log-2023-12-12.log +0 -29
- package/test/api/map/test-log-2023-12-13.log +0 -5
- package/test/api/map/test-log-2024-01-04.log +0 -2
- package/test/api/map/test-log-2024-01-11.log +0 -1
- package/test/api/map/test-log-2024-01-25.log +0 -19
- package/test/api/map/test-log-2024-06-06.log +0 -39
- package/test/api/map/test-log-2024-08-13.log +0 -13
- package/test/api/map/test-log-2024-08-20.log +0 -55
- package/test/api/map/test-log-2024-09-09.log +0 -92
- package/test/api/map/test-log-2024-10-28.log +0 -11
- /package/extras/{logos → images}/kalisio.png +0 -0
- /package/extras/{icons → images}/target.svg +0 -0
- /package/test/api/map/data/{vigicrues.observations.json → vigicrues.observations.H.json} +0 -0
|
@@ -1,85 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<KAction v-bind="props" :toggled="isToggled">
|
|
3
|
+
</KAction>
|
|
3
4
|
</template>
|
|
4
5
|
|
|
5
|
-
<script>
|
|
6
|
+
<script setup>
|
|
7
|
+
import _ from 'lodash'
|
|
8
|
+
import { computed } from 'vue'
|
|
9
|
+
import { actionProps } from '../../../core/client/utils/utils.actions.js'
|
|
6
10
|
import KAction from '../../../core/client/components/action/KAction.vue'
|
|
11
|
+
import { useCurrentActivity } from '../composables/activity.js'
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
icon: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: undefined
|
|
22
|
-
},
|
|
23
|
-
color: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'grey-9'
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: 'md'
|
|
30
|
-
},
|
|
31
|
-
flat: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: true
|
|
34
|
-
},
|
|
35
|
-
outline: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: false
|
|
38
|
-
},
|
|
39
|
-
badge: {
|
|
40
|
-
type: Object,
|
|
41
|
-
default: () => null
|
|
42
|
-
},
|
|
43
|
-
toggle: {
|
|
44
|
-
type: Object,
|
|
45
|
-
default: () => null
|
|
46
|
-
},
|
|
47
|
-
label: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: ''
|
|
50
|
-
},
|
|
51
|
-
tooltip: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: ''
|
|
54
|
-
},
|
|
55
|
-
disabled: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
default: false
|
|
58
|
-
},
|
|
59
|
-
loading: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false
|
|
62
|
-
},
|
|
63
|
-
context: {
|
|
64
|
-
type: Object,
|
|
65
|
-
default: () => null
|
|
66
|
-
},
|
|
67
|
-
handler: {
|
|
68
|
-
type: [Function],
|
|
69
|
-
default: null
|
|
70
|
-
},
|
|
71
|
-
renderer: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: 'button',
|
|
74
|
-
validator: (value) => {
|
|
75
|
-
return ['button', 'form-button', 'item', 'fab'].includes(value)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
computed: {
|
|
80
|
-
isToggled () {
|
|
81
|
-
return this.kActivity.isLayerEdited(this.context)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
13
|
+
// Props
|
|
14
|
+
const props = defineProps(_.omit(actionProps, ['toggle', 'url', 'handler', 'route', 'dialog']))
|
|
15
|
+
|
|
16
|
+
// Data
|
|
17
|
+
const { CurrentActivity } = useCurrentActivity({ selection: false, probe: false })
|
|
18
|
+
|
|
19
|
+
// Computed
|
|
20
|
+
const isToggled = computed(() => {
|
|
21
|
+
return CurrentActivity.value.isLayerEdited(props.context)
|
|
22
|
+
})
|
|
85
23
|
</script>
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
:service="service"
|
|
7
7
|
perspective="properties"
|
|
8
8
|
:objectId="featureId"
|
|
9
|
-
:contextId="contextId"
|
|
10
9
|
:schema-function="loadLayerSchema"
|
|
11
10
|
@applied="onFeatureEdited"
|
|
12
11
|
@closed="closeModal()"
|
|
@@ -38,10 +37,6 @@ export default {
|
|
|
38
37
|
featureId: {
|
|
39
38
|
type: String,
|
|
40
39
|
required: true
|
|
41
|
-
},
|
|
42
|
-
contextId: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: ''
|
|
45
40
|
}
|
|
46
41
|
},
|
|
47
42
|
data () {
|
|
@@ -60,7 +55,7 @@ export default {
|
|
|
60
55
|
async onFeatureEdited (updatedFeature) {
|
|
61
56
|
// Save in DB or in memory
|
|
62
57
|
if (this.layer._id) {
|
|
63
|
-
await this.kActivity.editFeaturesProperties(updatedFeature)
|
|
58
|
+
await this.kActivity.editFeaturesProperties(updatedFeature, this.layer)
|
|
64
59
|
} else {
|
|
65
60
|
await this.$api.getService(this.service).patch(updatedFeature._id, _.pick(updatedFeature, ['properties']))
|
|
66
61
|
}
|
|
@@ -80,7 +75,7 @@ export default {
|
|
|
80
75
|
// If not injected load it
|
|
81
76
|
if (this.layerName) this.layer = this.kActivity.getLayerByName(this.layerName)
|
|
82
77
|
else this.layer = await this.$api.getService('catalog').get(this.layerId)
|
|
83
|
-
this.service = _.get(this.layer, '_id') ? '
|
|
78
|
+
this.service = _.get(this.layer, '_id') ? _.get(this.layer, 'service') : 'features-edition'
|
|
84
79
|
},
|
|
85
80
|
setup (props) {
|
|
86
81
|
return {
|
|
@@ -95,10 +95,6 @@ export default {
|
|
|
95
95
|
layerName: {
|
|
96
96
|
type: String,
|
|
97
97
|
default: ''
|
|
98
|
-
},
|
|
99
|
-
contextId: {
|
|
100
|
-
type: String,
|
|
101
|
-
default: ''
|
|
102
98
|
}
|
|
103
99
|
},
|
|
104
100
|
computed: {
|
|
@@ -175,7 +171,7 @@ export default {
|
|
|
175
171
|
let values = _.get(this.layer.schema, `content.properties.${this.selectedProperty.value}.field.options`)
|
|
176
172
|
if (!values) {
|
|
177
173
|
// Otherwise we need to make a DB query
|
|
178
|
-
values = await this.$api.getService(this.layer.service
|
|
174
|
+
values = await this.$api.getService(this.layer.service)
|
|
179
175
|
.find({ query: Object.assign({ $distinct: `properties.${this.selectedProperty.value}` }, this.layer.baseQuery) })
|
|
180
176
|
// We don't have label in that case
|
|
181
177
|
values = _.map(values, value => ({ value, label: (value || this.$t('KFeaturesChart.NULL_VALUE_LABEL')) }))
|
|
@@ -187,7 +183,7 @@ export default {
|
|
|
187
183
|
this.values = await this.getPropertyValues()
|
|
188
184
|
// Then count features for each value
|
|
189
185
|
let data = await Promise.all(_.map(this.values, async value => {
|
|
190
|
-
const response = await this.$api.getService(this.layer.service
|
|
186
|
+
const response = await this.$api.getService(this.layer.service)
|
|
191
187
|
.find({ query: Object.assign({ $limit: 0, [`properties.${this.selectedProperty.value}`]: value.value }, this.layer.baseQuery) })
|
|
192
188
|
return { value, count: response.total }
|
|
193
189
|
}))
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="filter-editor" class="column">
|
|
3
|
+
<!--
|
|
4
|
+
Title
|
|
5
|
+
-->
|
|
6
|
+
<div id="filter-editor-header" v-if="title">
|
|
7
|
+
<div class="ellipsis text-h6">
|
|
8
|
+
{{ $tie(title) }}
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div
|
|
12
|
+
id="filter-editor-content"
|
|
13
|
+
class="full-width column"
|
|
14
|
+
>
|
|
15
|
+
<!--
|
|
16
|
+
Name editor
|
|
17
|
+
-->
|
|
18
|
+
<KForm
|
|
19
|
+
ref="formRef"
|
|
20
|
+
:values="formValues"
|
|
21
|
+
:schema="formSchema"
|
|
22
|
+
/>
|
|
23
|
+
<div id="filter-editor-rule">
|
|
24
|
+
<q-list>
|
|
25
|
+
<q-item v-if="!hasUniqueCondition">
|
|
26
|
+
<q-item-section>{{ $t('KFilterCondition.FILTER_WHEN') }}</q-item-section>
|
|
27
|
+
</q-item>
|
|
28
|
+
<template v-for="(condition, index) in conditions" :key="condition.id">
|
|
29
|
+
<KFilterCondition
|
|
30
|
+
:ref="(el) => conditionsRefs[index] = el"
|
|
31
|
+
:condition="condition"
|
|
32
|
+
:isFirst="index === 0"
|
|
33
|
+
:isUnique="hasUniqueCondition"
|
|
34
|
+
:layerId="layerId"
|
|
35
|
+
:layerName="layerName"
|
|
36
|
+
@onRemove="removeCondition"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
<q-item>
|
|
40
|
+
<q-item-section class="row items-center">
|
|
41
|
+
<q-btn
|
|
42
|
+
id="add-condition"
|
|
43
|
+
icon="las la-plus"
|
|
44
|
+
:label="$t('KFeaturesFilterManager.ADD_CONDITION')"
|
|
45
|
+
outline
|
|
46
|
+
rounded
|
|
47
|
+
@click="addCondition"
|
|
48
|
+
/>
|
|
49
|
+
</q-item-section>
|
|
50
|
+
</q-item>
|
|
51
|
+
</q-list>
|
|
52
|
+
</div>
|
|
53
|
+
<q-select for="filter-style-field" id="filter-style-field"
|
|
54
|
+
v-model="style"
|
|
55
|
+
:options="styleOptions"
|
|
56
|
+
:label="$t('KFeaturesFilterManager.STYLE_LABEL')"
|
|
57
|
+
>
|
|
58
|
+
<!-- Selected display -->
|
|
59
|
+
<template v-slot:selected-item="scope">
|
|
60
|
+
<q-item v-bind="scope.itemProps" class="q-ma-none q-pa-none">
|
|
61
|
+
<q-item-section class="col-auto q-mr-md"><q-item-label>{{ scope.opt.label }}</q-item-label></q-item-section>
|
|
62
|
+
<q-item-section v-if="scope.opt.data">
|
|
63
|
+
<div class="row items-center q-gutter-sm">
|
|
64
|
+
<KStylePreview :style="scope.opt.data.point" type="point" />
|
|
65
|
+
<KStylePreview :style="scope.opt.data.line" type="line" />
|
|
66
|
+
<KStylePreview :style="scope.opt.data.polygon" type="polygon" />
|
|
67
|
+
</div>
|
|
68
|
+
</q-item-section>
|
|
69
|
+
</q-item>
|
|
70
|
+
</template>
|
|
71
|
+
<!-- Options display -->
|
|
72
|
+
<template v-slot:option="scope">
|
|
73
|
+
<q-item v-bind="scope.itemProps">
|
|
74
|
+
<q-item-section class="col-auto q-mr-md"><q-item-label>{{ scope.opt.label }}</q-item-label></q-item-section>
|
|
75
|
+
<q-item-section v-if="scope.opt.data">
|
|
76
|
+
<div class="row items-center q-gutter-sm">
|
|
77
|
+
<KStylePreview :style="scope.opt.data.point" type="point" />
|
|
78
|
+
<KStylePreview :style="scope.opt.data.line" type="line" />
|
|
79
|
+
<KStylePreview :style="scope.opt.data.polygon" type="polygon" />
|
|
80
|
+
</div>
|
|
81
|
+
</q-item-section>
|
|
82
|
+
</q-item>
|
|
83
|
+
</template>
|
|
84
|
+
</q-select>
|
|
85
|
+
<KStyleEditor
|
|
86
|
+
v-if="style && styleOptions.length > 0 && style.value === styleOptions[1].value"
|
|
87
|
+
ref="styleEditorRef"
|
|
88
|
+
v-model="styleValue"
|
|
89
|
+
class="q-pa-md"
|
|
90
|
+
hideButtons
|
|
91
|
+
@applied="onStyleApplied"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
<!--
|
|
95
|
+
Buttons
|
|
96
|
+
-->
|
|
97
|
+
<div id="filter-editor-footer" class="row justify-end q-mt-md" v-if="!hideButtons">
|
|
98
|
+
<KPanel
|
|
99
|
+
id="filter-editor-buttons"
|
|
100
|
+
class="q-gutter-x-sm"
|
|
101
|
+
:content="buttons"
|
|
102
|
+
:action-renderer="'form-button'"
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<script setup>
|
|
109
|
+
import _ from 'lodash'
|
|
110
|
+
import { uid } from 'quasar'
|
|
111
|
+
import { ref, computed, onMounted } from 'vue'
|
|
112
|
+
import { api, i18n } from '../../../core/client'
|
|
113
|
+
import { filterQueryToConditions } from '../utils'
|
|
114
|
+
import KFilterCondition from './KFilterCondition.vue'
|
|
115
|
+
import KStyleEditor from './styles/KStyleEditor.vue'
|
|
116
|
+
import KStylePreview from './styles/KStylePreview.vue'
|
|
117
|
+
|
|
118
|
+
// Props
|
|
119
|
+
const props = defineProps({
|
|
120
|
+
filter: {
|
|
121
|
+
type: Object,
|
|
122
|
+
default: () => null
|
|
123
|
+
},
|
|
124
|
+
title: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: ''
|
|
127
|
+
},
|
|
128
|
+
hideButtons: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: false
|
|
131
|
+
},
|
|
132
|
+
buttons: {
|
|
133
|
+
type: Array,
|
|
134
|
+
default: null
|
|
135
|
+
},
|
|
136
|
+
layerId: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: ''
|
|
139
|
+
},
|
|
140
|
+
layerName: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: ''
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
// Emits
|
|
147
|
+
const emit = defineEmits(['canceled', 'applied'])
|
|
148
|
+
|
|
149
|
+
// Data
|
|
150
|
+
const formRef = ref(null)
|
|
151
|
+
const styleEditorRef = ref(null)
|
|
152
|
+
const conditionsRefs = ref([])
|
|
153
|
+
let styles = []
|
|
154
|
+
const styleOptions = ref(getStyleOptions())
|
|
155
|
+
const conditions = ref(getConditions())
|
|
156
|
+
const style = ref(null)
|
|
157
|
+
let createdStyle = null
|
|
158
|
+
const formSchema = {
|
|
159
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
160
|
+
$id: 'http://kalisio.xyz/schemas/style-editor#',
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {
|
|
163
|
+
name: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
minLength: 3,
|
|
166
|
+
maxLength: 256,
|
|
167
|
+
field: {
|
|
168
|
+
component: 'form/KTextField',
|
|
169
|
+
label: 'KFeaturesFilterManager.NAME_LABEL'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
required: ['name']
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Computed
|
|
177
|
+
const formValues = computed(() => {
|
|
178
|
+
if (_.isEmpty(props.filter)) return null
|
|
179
|
+
return { name: _.get(props.filter, 'label') }
|
|
180
|
+
})
|
|
181
|
+
const styleValue = computed(() => {
|
|
182
|
+
if (_.isEmpty(props.filter)) return null
|
|
183
|
+
return _.get(props.filter, 'style')
|
|
184
|
+
})
|
|
185
|
+
const buttons = computed(() => {
|
|
186
|
+
if (props.buttons !== null) return props.buttons
|
|
187
|
+
return [
|
|
188
|
+
{
|
|
189
|
+
id: 'close-button',
|
|
190
|
+
label: 'CANCEL',
|
|
191
|
+
renderer: 'form-button',
|
|
192
|
+
outline: true,
|
|
193
|
+
handler: () => emit('canceled')
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'apply-button',
|
|
197
|
+
label: 'APPLY',
|
|
198
|
+
renderer: 'form-button',
|
|
199
|
+
handler: apply
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
const hasUniqueCondition = computed(() => {
|
|
204
|
+
return _.compact(conditions.value).length === 1
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
// Functions
|
|
208
|
+
async function getStyles () {
|
|
209
|
+
const styles = await api.getService('styles').find()
|
|
210
|
+
return styles.data
|
|
211
|
+
}
|
|
212
|
+
function getStyleOptions () {
|
|
213
|
+
const options = [{ label: i18n.t('KFeaturesFilterManager.NONE'), value: null }, { label: i18n.t('KFeaturesFilterManager.NEW'), value: '+' }]
|
|
214
|
+
_.forEach(styles, style => {
|
|
215
|
+
options.push({ label: style.name, value: style._id, data: style })
|
|
216
|
+
})
|
|
217
|
+
return options
|
|
218
|
+
}
|
|
219
|
+
function getConditions () {
|
|
220
|
+
if (_.isEmpty(props.filter)) return [{ id: uid() }]
|
|
221
|
+
return filterQueryToConditions(_.get(props.filter, 'active'))
|
|
222
|
+
}
|
|
223
|
+
function getStyle () {
|
|
224
|
+
if (_.isEmpty(props.filter)) return styleOptions.value[0]
|
|
225
|
+
const style = _.find(styles, { _id: _.get(props.filter, 'style') })
|
|
226
|
+
if (!style) return styleOptions.value[0]
|
|
227
|
+
return { label: style.name, value: style._id, data: style }
|
|
228
|
+
}
|
|
229
|
+
function addCondition () {
|
|
230
|
+
conditions.value.push({ id: uid() })
|
|
231
|
+
}
|
|
232
|
+
function removeCondition (id) {
|
|
233
|
+
conditions.value = _.filter(conditions.value, condition => condition.id !== id)
|
|
234
|
+
}
|
|
235
|
+
function conditionsToQuery (conditions) {
|
|
236
|
+
const value = { ['properties.' + conditions[0].property]: { ['$' + conditions[0].comparisonOperator]: conditions[0].value } }
|
|
237
|
+
if (conditions.length < 2) return value
|
|
238
|
+
const query = {
|
|
239
|
+
['$' + conditions[1].booleanOperator]: [
|
|
240
|
+
value,
|
|
241
|
+
conditionsToQuery(conditions.slice(1))
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return query
|
|
246
|
+
}
|
|
247
|
+
function onStyleApplied (style) {
|
|
248
|
+
createdStyle = style
|
|
249
|
+
}
|
|
250
|
+
async function apply () {
|
|
251
|
+
const formResult = formRef.value.validate()
|
|
252
|
+
if (!formResult.isValid) return
|
|
253
|
+
|
|
254
|
+
let areConditionsValid = true
|
|
255
|
+
const conditionsValues = []
|
|
256
|
+
_.forEach(conditionsRefs.value, condition => {
|
|
257
|
+
if (!condition) return
|
|
258
|
+
const result = condition.validate()
|
|
259
|
+
if (!result.isValid) {
|
|
260
|
+
areConditionsValid = false
|
|
261
|
+
return
|
|
262
|
+
}
|
|
263
|
+
conditionsValues.push(result.values)
|
|
264
|
+
})
|
|
265
|
+
|
|
266
|
+
if (!areConditionsValid) return
|
|
267
|
+
|
|
268
|
+
let styleResult = null
|
|
269
|
+
if (style.value.value === styleOptions.value[1].value) {
|
|
270
|
+
// Create a new style
|
|
271
|
+
styleResult = await styleEditorRef.value.apply()
|
|
272
|
+
if (!styleResult) return
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const filter = {
|
|
276
|
+
id: _.get(props.filter, 'id'),
|
|
277
|
+
label: formResult.values.name,
|
|
278
|
+
description: _.join(_.map(conditionsValues, condition => condition.description), ''),
|
|
279
|
+
isActive: true,
|
|
280
|
+
active: conditionsToQuery(conditionsValues),
|
|
281
|
+
inactive: {},
|
|
282
|
+
style: styleResult ? _.get(createdStyle, '_id') : style.value.value
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
emit('applied', filter)
|
|
286
|
+
return true
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
onMounted(async () => {
|
|
290
|
+
styles = await getStyles()
|
|
291
|
+
styleOptions.value = getStyleOptions()
|
|
292
|
+
style.value = getStyle()
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
// Expose
|
|
296
|
+
defineExpose({
|
|
297
|
+
apply
|
|
298
|
+
})
|
|
299
|
+
|
|
300
|
+
</script>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="column">
|
|
3
|
+
<div id="filter-manager-header"
|
|
4
|
+
class="row items-center full-row q-px-md q-mt-md q-gutter-sm"
|
|
5
|
+
>
|
|
6
|
+
<KAction
|
|
7
|
+
v-if="viewMode === 'editor'"
|
|
8
|
+
id="back"
|
|
9
|
+
icon="las la-arrow-left"
|
|
10
|
+
tooltip="KFeaturesFilterManager.BACK"
|
|
11
|
+
class="col-auto"
|
|
12
|
+
:handler="onCanceled"
|
|
13
|
+
/>
|
|
14
|
+
<div class="ellipsis text-h6 col">
|
|
15
|
+
{{ $tie('KFeaturesFilterManager.TITLE') + ' ' + layerName }}
|
|
16
|
+
</div>
|
|
17
|
+
<KPanel
|
|
18
|
+
id="filter-manager-toolbar"
|
|
19
|
+
:content="toolbar"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<div id="filter-manager-content">
|
|
23
|
+
<q-tab-panels v-model="viewMode" animated>
|
|
24
|
+
<q-tab-panel name="list">
|
|
25
|
+
<q-list separator v-if="filters.length">
|
|
26
|
+
<q-item v-for="item in filters" :key="item.id">
|
|
27
|
+
<q-item-section>
|
|
28
|
+
<q-item-label>{{ item.label }}</q-item-label>
|
|
29
|
+
<q-item-label caption>{{ item.description }}</q-item-label>
|
|
30
|
+
</q-item-section>
|
|
31
|
+
<q-item-section class="col-auto">
|
|
32
|
+
<KPanel
|
|
33
|
+
id="filter-actions"
|
|
34
|
+
:content="getPanelContent(item)"
|
|
35
|
+
/>
|
|
36
|
+
</q-item-section>
|
|
37
|
+
</q-item>
|
|
38
|
+
</q-list>
|
|
39
|
+
<div v-else class="column items-center full-row">
|
|
40
|
+
<KStamp
|
|
41
|
+
icon="las la-exclamation-circle"
|
|
42
|
+
icon-size="1.6rem"
|
|
43
|
+
:text="$t('KFeaturesFilterManager.NO_FILTERS')"
|
|
44
|
+
direction="horizontal"
|
|
45
|
+
class="q-pa-md"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</q-tab-panel>
|
|
49
|
+
<q-tab-panel name="editor">
|
|
50
|
+
<div class="full-width column">
|
|
51
|
+
<KFeaturesFilterEditor
|
|
52
|
+
ref="filterEditor"
|
|
53
|
+
:filter="filterToEdit"
|
|
54
|
+
:layerId="layerId"
|
|
55
|
+
:layerName="layerName"
|
|
56
|
+
:hideButtons="true"
|
|
57
|
+
@canceled="onCanceled"
|
|
58
|
+
@applied="onApplied"
|
|
59
|
+
class="col"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
</q-tab-panel>
|
|
63
|
+
</q-tab-panels>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup>
|
|
69
|
+
import _ from 'lodash'
|
|
70
|
+
import { uid } from 'quasar'
|
|
71
|
+
import { ref, computed, onMounted } from 'vue'
|
|
72
|
+
import { api } from '../../../core/client'
|
|
73
|
+
import { useCurrentActivity } from '../composables'
|
|
74
|
+
import { getDefaultStyleFromTemplates, generateStyleTemplates, filterQueryToConditions, DefaultStyle } from '../utils'
|
|
75
|
+
import KFeaturesFilterEditor from './KFeaturesFilterEditor.vue'
|
|
76
|
+
|
|
77
|
+
// Props
|
|
78
|
+
const props = defineProps({
|
|
79
|
+
layerId: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ''
|
|
82
|
+
},
|
|
83
|
+
layerName: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: ''
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
// Data
|
|
90
|
+
const { CurrentActivity } = useCurrentActivity()
|
|
91
|
+
const filterEditor = ref(null)
|
|
92
|
+
const filterToEdit = ref(null)
|
|
93
|
+
const viewMode = ref('list')
|
|
94
|
+
let layer = null
|
|
95
|
+
const filters = ref([])
|
|
96
|
+
|
|
97
|
+
// Computed
|
|
98
|
+
const toolbar = computed(() => {
|
|
99
|
+
if (viewMode.value === 'editor') return []
|
|
100
|
+
return [
|
|
101
|
+
{
|
|
102
|
+
id: 'add-filter',
|
|
103
|
+
icon: 'las la-plus-circle',
|
|
104
|
+
tooltip: 'KFeaturesFilterManager.CREATE',
|
|
105
|
+
size: '1rem',
|
|
106
|
+
handler: () => { editFilter() }
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
// Functions
|
|
112
|
+
async function getLayer () {
|
|
113
|
+
if (props.layerName) {
|
|
114
|
+
return CurrentActivity.value.getLayerByName(props.layerName)
|
|
115
|
+
} else {
|
|
116
|
+
return await api.getService('catalog').get(props.layerId)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function getFilters () {
|
|
120
|
+
const filters = _.clone(_.get(layer, 'filters', []))
|
|
121
|
+
_.forEach(filters, filter => { filter.id = uid() })
|
|
122
|
+
return filters
|
|
123
|
+
}
|
|
124
|
+
function getPanelContent (item) {
|
|
125
|
+
return [{
|
|
126
|
+
id: 'edit-filter',
|
|
127
|
+
tooltip: 'KFeaturesFilterManager.EDIT',
|
|
128
|
+
icon: 'las la-edit',
|
|
129
|
+
handler: () => editFilter(item)
|
|
130
|
+
}, {
|
|
131
|
+
id: 'remove-filter',
|
|
132
|
+
tooltip: 'KFeaturesFilterManager.REMOVE',
|
|
133
|
+
icon: 'las la-trash',
|
|
134
|
+
handler: () => removeFilter(item.id)
|
|
135
|
+
}]
|
|
136
|
+
}
|
|
137
|
+
function editFilter (filter) {
|
|
138
|
+
filterToEdit.value = filter || null
|
|
139
|
+
viewMode.value = 'editor'
|
|
140
|
+
}
|
|
141
|
+
function removeFilter (id) {
|
|
142
|
+
filters.value = filters.value.filter(filter => filter.id !== id)
|
|
143
|
+
}
|
|
144
|
+
function onApplied (filter) {
|
|
145
|
+
const targetIndex = _.get(filter, 'id') ? _.findIndex(filters.value, { id: filter.id }) : -1
|
|
146
|
+
if (targetIndex > -1) {
|
|
147
|
+
filters.value[targetIndex] = filter
|
|
148
|
+
} else {
|
|
149
|
+
Object.assign(filter, { id: uid() })
|
|
150
|
+
filters.value.push(filter)
|
|
151
|
+
}
|
|
152
|
+
viewMode.value = 'list'
|
|
153
|
+
}
|
|
154
|
+
function onCanceled () {
|
|
155
|
+
viewMode.value = 'list'
|
|
156
|
+
}
|
|
157
|
+
async function apply () {
|
|
158
|
+
if (viewMode.value === 'editor') {
|
|
159
|
+
filterEditor.value.apply()
|
|
160
|
+
} else {
|
|
161
|
+
// Apply styles
|
|
162
|
+
const styles = []
|
|
163
|
+
const styleService = api.getService('styles')
|
|
164
|
+
const validFilters = _.map(filters.value, filter => _.omit(filter, 'id'))
|
|
165
|
+
for (const filter of validFilters) {
|
|
166
|
+
if (!filter.style) continue
|
|
167
|
+
styles.push({
|
|
168
|
+
conditions: filterQueryToConditions(filter.active),
|
|
169
|
+
values: await styleService.get(filter.style)
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const engineStyle = _.pick(_.get(CurrentActivity.value, 'activityOptions.engine', {}), ['point', 'line', 'polygon'])
|
|
174
|
+
const layerDefaultStyle = getDefaultStyleFromTemplates(_.get(layer, 'leaflet.style', {}))
|
|
175
|
+
const templates = generateStyleTemplates(_.merge({}, DefaultStyle, engineStyle, layerDefaultStyle), styles)
|
|
176
|
+
const result = Object.assign(
|
|
177
|
+
{},
|
|
178
|
+
{ filters: validFilters },
|
|
179
|
+
_.mapKeys(templates, (value, key) => `leaflet.${key}`),
|
|
180
|
+
_.mapKeys(templates, (value, key) => `cesium.${key}`)
|
|
181
|
+
)
|
|
182
|
+
api.getService('catalog').patch(layer._id, result)
|
|
183
|
+
return true
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
onMounted(async () => {
|
|
188
|
+
layer = await getLayer()
|
|
189
|
+
filters.value = getFilters()
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
defineExpose({
|
|
193
|
+
apply
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
</script>
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
>
|
|
9
9
|
<KTable
|
|
10
10
|
:service="service"
|
|
11
|
-
:contextId="contextId"
|
|
12
11
|
:schema="schema"
|
|
13
12
|
:item-actions="actions"
|
|
14
13
|
:base-query="layer.baseQuery"
|
|
@@ -44,10 +43,6 @@ export default {
|
|
|
44
43
|
layerName: {
|
|
45
44
|
type: String,
|
|
46
45
|
default: ''
|
|
47
|
-
},
|
|
48
|
-
contextId: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: ''
|
|
51
46
|
}
|
|
52
47
|
},
|
|
53
48
|
data () {
|