@kalisio/kdk 2.3.2 → 2.4.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/.eslintignore +2 -1
- package/.github/workflows/main.yaml +3 -3
- package/README.md +1 -0
- package/core/api/db.js +6 -1
- package/core/api/hooks/hooks.model.js +1 -1
- package/core/api/hooks/hooks.schemas.js +0 -2
- package/core/api/models/messages.model.mongodb.js +13 -0
- package/core/api/services/authorisations/authorisations.service.js +13 -4
- package/core/api/services/index.js +19 -0
- package/core/api/services/messages/messages.hooks.js +38 -0
- package/core/client/api.js +7 -32
- package/core/client/capabilities.js +2 -2
- package/core/client/components/KActivity.vue +29 -6
- package/core/client/components/KContent.vue +2 -2
- package/core/client/components/KDialog.vue +4 -7
- package/core/client/components/KStamp.vue +3 -9
- package/core/client/components/KStore.vue +2 -4
- package/core/client/components/KTab.vue +95 -0
- package/core/client/components/action/KAction.vue +15 -2
- package/core/client/components/action/KBugReportAction.vue +4 -2
- package/core/client/components/action/KToggleFullscreenAction.vue +25 -0
- package/core/client/components/app/KSettings.vue +17 -13
- package/core/client/components/chart/KDataTable.vue +6 -9
- package/core/client/components/chart/KTimeSeriesChart.vue +62 -49
- package/core/client/components/collection/KBoard.vue +22 -33
- package/core/client/components/collection/KCard.vue +71 -56
- package/core/client/components/collection/KCardSection.vue +20 -10
- package/core/client/components/collection/KDescriptionCardSection.vue +47 -0
- package/core/client/components/collection/KGrid.vue +234 -54
- package/core/client/components/collection/KScrollDown.vue +97 -0
- package/core/client/components/collection/KScrollToTop.vue +93 -0
- package/core/client/components/collection/KTable.vue +87 -33
- package/core/client/components/collection/KTimeLine.vue +406 -0
- package/core/client/components/collection/index.js +1 -5
- package/core/client/components/document/KDocument.vue +20 -55
- package/core/client/components/document/KHtml.vue +17 -7
- package/core/client/components/document/KImage.vue +78 -0
- package/core/client/components/document/KMarkdown.vue +12 -16
- package/core/client/components/document/KPdf.vue +69 -0
- package/core/client/components/form/KFileField.vue +2 -2
- package/core/client/components/form/KSelectField.vue +2 -1
- package/core/client/components/form/KUnitField.vue +3 -1
- package/core/client/components/layout/KFab.vue +9 -10
- package/core/client/components/layout/KLayout.vue +104 -6
- package/core/client/components/layout/KOpener.vue +14 -19
- package/core/client/components/layout/KPage.vue +195 -105
- package/core/client/components/layout/KWindow.vue +54 -32
- package/core/client/components/layout/index.js +0 -2
- package/core/client/components/media/KRibbon.vue +95 -0
- package/core/client/components/menu/KMenu.vue +4 -4
- package/core/client/components/team/KGroupsActivity.vue +25 -27
- package/core/client/components/team/KMembersActivity.vue +21 -23
- package/core/client/components/team/KOrganisationsActivity.vue +20 -22
- package/core/client/components/team/KTagsActivity.vue +21 -23
- package/core/client/components/time/KAbsoluteTimeRange.vue +70 -170
- package/core/client/components/time/KDate.vue +4 -1
- package/core/client/components/time/KDateTimeRange.vue +2 -2
- package/core/client/components/time/KTime.vue +3 -1
- package/core/client/composables/activity.js +14 -12
- package/core/client/composables/collection.js +3 -1
- package/core/client/composables/counter.js +51 -0
- package/core/client/composables/index.js +3 -0
- package/core/client/composables/layout.js +13 -2
- package/core/client/composables/messages.js +15 -0
- package/core/client/composables/pwa.js +1 -1
- package/core/client/composables/schema.js +6 -6
- package/core/client/composables/screen.js +23 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-hover.js +23 -0
- package/core/client/document.js +61 -0
- package/core/client/exporter.js +1 -1
- package/core/client/filter.js +0 -1
- package/core/client/guards.js +1 -1
- package/core/client/i18n/core_en.json +14 -8
- package/core/client/i18n/core_fr.json +15 -9
- package/core/client/index.js +9 -3
- package/core/client/layout.js +129 -29
- package/core/client/local-storage.js +1 -1
- package/core/client/mixins/index.js +0 -1
- package/core/client/mixins/mixin.base-activity.js +23 -13
- package/core/client/mixins/mixin.base-item.js +6 -3
- package/core/client/services/index.js +4 -1
- package/core/client/services/local-settings.service.js +4 -0
- package/core/client/storage.js +1 -1
- package/core/client/store.js +1 -1
- package/core/client/template-context.js +17 -0
- package/core/client/time.js +1 -1
- package/core/client/units.js +49 -27
- package/core/client/utils/index.js +3 -2
- package/core/client/utils/utils.actions.js +4 -0
- package/core/client/utils/utils.colors.js +155 -2
- package/core/client/utils/utils.items.js +26 -0
- package/core/client/utils/utils.math.js +3 -0
- package/core/client/utils/utils.platform.js +3 -1
- package/core/client/utils/utils.screen.js +82 -0
- package/core/client/utils/utils.time.js +0 -1
- package/core/common/schemas/settings.update.json +12 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/core/api/application.js.html +1870 -0
- package/coverage/core/api/authentication.js.html +742 -0
- package/coverage/core/api/db.js.html +793 -0
- package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/core/api/hooks/index.html +296 -0
- package/coverage/core/api/hooks/index.js.html +121 -0
- package/coverage/core/api/index.html +191 -0
- package/coverage/core/api/index.js.html +148 -0
- package/coverage/core/api/marshall.js.html +448 -0
- package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/core/api/models/index.html +176 -0
- package/coverage/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/core/api/services/account/account.service.js.html +436 -0
- package/coverage/core/api/services/account/index.html +131 -0
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/core/api/services/authorisations/index.html +131 -0
- package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/core/api/services/databases/index.html +131 -0
- package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/core/api/services/groups/index.html +116 -0
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/core/api/services/import-export/index.html +131 -0
- package/coverage/core/api/services/index.html +116 -0
- package/coverage/core/api/services/index.js.html +556 -0
- package/coverage/core/api/services/mailer/index.html +131 -0
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/core/api/services/messages/index.html +116 -0
- package/coverage/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/core/api/services/organisations/index.html +131 -0
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/core/api/services/push/index.html +131 -0
- package/coverage/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/core/api/services/push/push.service.js.html +121 -0
- package/coverage/core/api/services/storage/index.html +131 -0
- package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/core/api/services/tags/index.html +116 -0
- package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/core/api/services/users/index.html +116 -0
- package/coverage/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/core/api/utils.js.html +118 -0
- package/coverage/core/common/errors.js.html +88 -0
- package/coverage/core/common/index.html +176 -0
- package/coverage/core/common/index.js.html +115 -0
- package/coverage/core/common/permissions.js.html +1048 -0
- package/coverage/core/common/schema.js.html +190 -0
- package/coverage/core/common/utils.js.html +220 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +506 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/core/api/application.js.html +1870 -0
- package/coverage/lcov-report/core/api/authentication.js.html +742 -0
- package/coverage/lcov-report/core/api/db.js.html +793 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/lcov-report/core/api/hooks/index.html +296 -0
- package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
- package/coverage/lcov-report/core/api/index.html +191 -0
- package/coverage/lcov-report/core/api/index.js.html +148 -0
- package/coverage/lcov-report/core/api/marshall.js.html +448 -0
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/core/api/models/index.html +176 -0
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
- package/coverage/lcov-report/core/api/services/account/index.html +131 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
- package/coverage/lcov-report/core/api/services/index.html +116 -0
- package/coverage/lcov-report/core/api/services/index.js.html +556 -0
- package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/messages/index.html +116 -0
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/lcov-report/core/api/services/push/index.html +131 -0
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
- package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/users/index.html +116 -0
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/lcov-report/core/api/utils.js.html +118 -0
- package/coverage/lcov-report/core/common/errors.js.html +88 -0
- package/coverage/lcov-report/core/common/index.html +176 -0
- package/coverage/lcov-report/core/common/index.js.html +115 -0
- package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
- package/coverage/lcov-report/core/common/schema.js.html +190 -0
- package/coverage/lcov-report/core/common/utils.js.html +220 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +506 -0
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/lcov-report/map/api/hooks/index.html +161 -0
- package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
- package/coverage/lcov-report/map/api/index.html +131 -0
- package/coverage/lcov-report/map/api/index.js.html +139 -0
- package/coverage/lcov-report/map/api/marshall.js.html +178 -0
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/lcov-report/map/api/models/index.html +161 -0
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/index.html +131 -0
- package/coverage/lcov-report/map/api/services/index.html +116 -0
- package/coverage/lcov-report/map/api/services/index.js.html +817 -0
- package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/lcov-report/map/common/errors.js.html +94 -0
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/lcov-report/map/common/grid.js.html +1612 -0
- package/coverage/lcov-report/map/common/index.html +371 -0
- package/coverage/lcov-report/map/common/index.js.html +172 -0
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
- package/coverage/lcov-report/map/common/permissions.js.html +124 -0
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
- package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
- package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +11245 -0
- package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/map/api/hooks/index.html +161 -0
- package/coverage/map/api/hooks/index.js.html +94 -0
- package/coverage/map/api/index.html +131 -0
- package/coverage/map/api/index.js.html +139 -0
- package/coverage/map/api/marshall.js.html +178 -0
- package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/map/api/models/index.html +161 -0
- package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/map/api/services/alerts/index.html +131 -0
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/map/api/services/catalog/index.html +116 -0
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/map/api/services/daptiles/index.html +116 -0
- package/coverage/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/map/api/services/features/features.service.js.html +241 -0
- package/coverage/map/api/services/features/index.html +131 -0
- package/coverage/map/api/services/index.html +116 -0
- package/coverage/map/api/services/index.js.html +817 -0
- package/coverage/map/api/services/projects/index.html +116 -0
- package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/map/common/errors.js.html +94 -0
- package/coverage/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/map/common/grid.js.html +1612 -0
- package/coverage/map/common/index.html +371 -0
- package/coverage/map/common/index.js.html +172 -0
- package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/map/common/moment-utils.js.html +157 -0
- package/coverage/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/map/common/opendap-utils.js.html +826 -0
- package/coverage/map/common/permissions.js.html +124 -0
- package/coverage/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/map/common/tms-utils.js.html +274 -0
- package/coverage/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/map/common/wcs-utils.js.html +586 -0
- package/coverage/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/map/common/wfs-utils.js.html +574 -0
- package/coverage/map/common/wms-utils.js.html +451 -0
- package/coverage/map/common/wmts-utils.js.html +547 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/tmp/coverage-280506-1731704745613-0.json +1 -0
- package/coverage/tmp/coverage-280518-1731704745599-0.json +1 -0
- package/coverage/tmp/coverage-280529-1731704745588-0.json +1 -0
- package/coverage/tmp/coverage-280541-1731704745574-0.json +1 -0
- package/coverage/tmp/coverage-280548-1731704745545-0.json +1 -0
- package/extras/css/core.variables.scss +32 -8
- package/extras/icons/attribution.png +0 -0
- package/map/api/services/catalog/catalog.hooks.js +5 -7
- package/map/api/services/features/features.hooks.js +1 -1
- package/map/client/cesium/utils/utils.style.js +11 -2
- package/map/client/components/KAttribution.vue +108 -0
- package/map/client/components/KPositionIndicator.vue +11 -18
- package/map/client/components/KProjectMenu.vue +4 -4
- package/map/client/components/catalog/KCategoryItem.vue +74 -0
- package/map/client/components/catalog/KLayerCategories.vue +24 -12
- package/map/client/components/catalog/KLayersPanel.vue +139 -116
- package/map/client/components/catalog/KProjectSelector.vue +29 -17
- package/map/client/components/catalog/KProjectsPanel.vue +19 -35
- package/map/client/components/catalog/KViewSelector.vue +37 -25
- package/map/client/components/catalog/KViewsPanel.vue +19 -35
- package/map/client/components/form/KLocationField.vue +1 -2
- package/map/client/components/legend/KLegend.vue +34 -34
- package/map/client/components/location/KLocationCardSection.vue +18 -22
- package/map/client/components/location/KLocationMap.vue +36 -38
- package/map/client/components/location/KLocationTimeLineCard.vue +147 -0
- package/map/client/components/location/KLocationTip.vue +12 -2
- package/map/client/components/widget/KInformationBox.vue +0 -4
- package/map/client/components/widget/KStackableTimeSeries.vue +8 -1
- package/map/client/components/widget/KTimeSeries.vue +1 -1
- package/map/client/composables/highlight.js +29 -31
- package/map/client/composables/probe.js +7 -3
- package/map/client/composables/weather.js +71 -31
- package/map/client/i18n/map_en.json +3 -0
- package/map/client/i18n/map_fr.json +3 -0
- package/map/client/init.js +4 -3
- package/map/client/leaflet/ShapeMarker.js +1 -1
- package/map/client/leaflet/TiledFeatureLayer.js +2 -3
- package/map/client/leaflet/utils/utils.events.js +1 -1
- package/map/client/leaflet/utils/utils.style.js +20 -8
- package/map/client/mixins/globe/mixin.base-globe.js +111 -13
- package/map/client/mixins/globe/mixin.file-layers.js +10 -10
- package/map/client/mixins/globe/mixin.geojson-layers.js +90 -15
- package/map/client/mixins/globe/mixin.style.js +2 -0
- package/map/client/mixins/index.js +0 -1
- package/map/client/mixins/map/index.js +1 -0
- package/map/client/mixins/map/mixin.base-map.js +21 -2
- package/map/client/mixins/map/mixin.canvas-layers.js +7 -2
- package/map/client/mixins/map/mixin.edit-layers.js +12 -4
- package/map/client/mixins/map/mixin.file-layers.js +3 -0
- package/map/client/mixins/map/mixin.geojson-layers.js +92 -6
- package/map/client/mixins/map/mixin.pmtiles-layers.js +106 -0
- package/map/client/mixins/mixin.activity.js +8 -3
- package/map/client/mixins/mixin.feature-service.js +73 -32
- package/map/client/mixins/mixin.levels.js +1 -0
- package/map/client/mixins/mixin.weacast.js +10 -87
- package/map/client/utils/index.js +1 -0
- package/map/client/utils/utils.capture.js +1 -1
- package/map/client/utils/utils.catalog.js +7 -7
- package/map/client/utils/utils.features.js +59 -1
- package/map/client/utils/utils.js +10 -0
- package/map/client/utils/utils.layers.js +8 -0
- package/map/client/utils/utils.time-series.js +195 -0
- package/map/client/utils/utils.weacast.js +102 -0
- package/package.json +6 -6
- package/scripts/init_runner.sh +2 -2
- package/scripts/kash/CHANGELOG.md +12 -0
- package/scripts/kash/README.md +2 -0
- package/scripts/kash/kash.sh +34 -32
- package/scripts/run_tests.sh +2 -2
- package/scripts/setup_workspace.sh +24 -6
- package/test/api/core/hooks.test.js +6 -3
- package/test/api/core/test-log-2023-12-19.log +7 -0
- package/test/api/core/test-log-2024-01-04.log +14 -0
- package/test/api/core/test-log-2024-05-14.log +6 -0
- package/test/api/core/{test-log-2024-04-23.log → test-log-2024-06-06.log} +3 -3
- package/test/api/core/test-log-2024-06-26.log +25 -0
- package/test/api/core/test-log-2024-06-28.log +2 -0
- package/test/api/core/test-log-2024-07-09.log +0 -0
- package/test/api/core/test-log-2024-08-13.log +69 -0
- package/test/api/core/test-log-2024-10-28.log +53 -0
- package/test/api/core/test-log-2024-11-05.log +30 -0
- package/test/api/core/test-log-2024-11-15.log +23 -0
- package/test/api/core/test-log-2024-11-18.log +0 -0
- package/test/api/core/test-log-2024-12-03.log +30 -0
- package/test/api/map/alerts.test.js +3 -1
- package/test/api/map/config/layers.json +3 -1
- package/test/api/map/index.test.js +18 -1
- package/test/api/map/test-log-2023-11-24.log +121 -0
- package/test/api/map/test-log-2023-12-12.log +29 -0
- package/test/api/map/test-log-2023-12-13.log +5 -0
- package/test/api/map/test-log-2024-01-04.log +2 -0
- package/test/api/map/test-log-2024-01-11.log +1 -0
- package/test/api/map/test-log-2024-01-25.log +19 -0
- package/test/api/map/test-log-2024-06-06.log +39 -0
- package/test/api/map/test-log-2024-08-13.log +13 -0
- package/test/api/map/test-log-2024-08-20.log +55 -0
- package/test/api/map/test-log-2024-09-09.log +92 -0
- package/test/api/map/test-log-2024-10-28.log +11 -0
- package/test/client/core/utils.js +13 -0
- package/test/client/map/api.js +34 -0
- package/test/client/map/catalog.js +6 -2
- package/test/client/map/index.js +1 -0
- package/test/client/map/utils.js +4 -2
- package/core/client/components/collection/KList.vue +0 -135
- package/core/client/components/layout/KPageSticky.vue +0 -53
- package/core/client/mixins/mixin.base-collection.js +0 -162
- package/core/client/utils/utils.data.js +0 -22
- package/map/client/mixins/mixin.catalog-panel.js +0 -26
- package/test/api/core/test-log-2024-04-22.log +0 -84
package/.eslintignore
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
core/client/components/action/KAction.vue
|
|
1
|
+
core/client/components/action/KAction.vue
|
|
2
|
+
map/client/components/catalog/KLayersPanel.vue
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
strategy:
|
|
26
26
|
fail-fast: false
|
|
27
27
|
matrix:
|
|
28
|
-
node: [ 18,
|
|
28
|
+
node: [ 18, 22 ]
|
|
29
29
|
mongo: [ 5, 6, 7 ]
|
|
30
30
|
name: Additional tests
|
|
31
31
|
if: ${{ contains(github.event.head_commit.message, 'additional tests') }}
|
|
@@ -40,7 +40,7 @@ jobs:
|
|
|
40
40
|
- name: Setup workspace
|
|
41
41
|
env:
|
|
42
42
|
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
|
|
43
|
-
run: bash ./scripts/setup_workspace.sh
|
|
43
|
+
run: bash ./scripts/setup_workspace.sh -n ${{ matrix.node }}
|
|
44
44
|
- name: Run tests
|
|
45
45
|
env:
|
|
46
46
|
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
|
@@ -60,7 +60,7 @@ jobs:
|
|
|
60
60
|
- name: Setup workspace
|
|
61
61
|
env:
|
|
62
62
|
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
|
|
63
|
-
run: bash ./scripts/setup_workspace.sh
|
|
63
|
+
run: bash ./scripts/setup_workspace.sh -k nokli -n 18
|
|
64
64
|
- name: Build docs
|
|
65
65
|
env:
|
|
66
66
|
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
package/README.md
CHANGED
package/core/api/db.js
CHANGED
|
@@ -29,7 +29,12 @@ export function createObjectID (id) {
|
|
|
29
29
|
if (isObjectID(id)) return id
|
|
30
30
|
// Take care that numbers could be a valid object ID
|
|
31
31
|
else if ((typeof id === 'number') || !ObjectID.isValid(id)) return null
|
|
32
|
-
else
|
|
32
|
+
else {
|
|
33
|
+
const objectId = new ObjectID(id)
|
|
34
|
+
// It appears that ObjectID.isValid is not reliable in some driver versions, see eg https://jira.mongodb.org/browse/NODE-3760
|
|
35
|
+
// So that we use an additional check here
|
|
36
|
+
return (objectId.toString() === id ? objectId : null)
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
// Utility function used to convert from string to MongoDB IDs as required eg by queries
|
|
@@ -224,7 +224,7 @@ export function setExpireAfter (delayInSeconds) {
|
|
|
224
224
|
export async function distinct (hook) {
|
|
225
225
|
const params = hook.params
|
|
226
226
|
const query = params.query
|
|
227
|
-
if (!query.$distinct) return hook
|
|
227
|
+
if (!query || !query.$distinct) return hook
|
|
228
228
|
const collection = hook.service.Model
|
|
229
229
|
hook.result = await collection.distinct(query.$distinct, _.omit(query, ['$distinct']))
|
|
230
230
|
return hook
|
|
@@ -28,7 +28,6 @@ export function validateData (schema) {
|
|
|
28
28
|
|
|
29
29
|
items.forEach((item, index) => {
|
|
30
30
|
if (item.status === 'rejected') {
|
|
31
|
-
console.log(item.reason)
|
|
32
31
|
item.validationError = {
|
|
33
32
|
message: item.reason.message,
|
|
34
33
|
data: item.reason.data.map(error => {
|
|
@@ -58,7 +57,6 @@ export function validateData (schema) {
|
|
|
58
57
|
const hasError = (errors.length > 0)
|
|
59
58
|
if (hasError) {
|
|
60
59
|
const firstError = errors[0]
|
|
61
|
-
console.log(firstError)
|
|
62
60
|
// Single item case => raise the error
|
|
63
61
|
if (!isArray) throw new BadRequest(firstError.message, firstError.data)
|
|
64
62
|
// Multiple items case => raise if no valid data found
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function (app, options) {
|
|
2
|
+
const db = options.db || app.db
|
|
3
|
+
options.Model = db.collection('messages')
|
|
4
|
+
// Collation provided in query ensure sorting to be case insensitive w.r.t. user's language
|
|
5
|
+
// We built indices with collation to cover the most used languages, it requires different naming...
|
|
6
|
+
options.Model.createIndex({ createdAt: -1 })
|
|
7
|
+
options.Model.createIndex({ title: 1 }, { name: 'title-en', collation: { locale: 'en', strength: 1 } })
|
|
8
|
+
options.Model.createIndex({ title: 1 }, { name: 'title-fr', collation: { locale: 'fr', strength: 1 } })
|
|
9
|
+
options.Model.createIndex({ body: 1 }, { name: 'body-en', collation: { locale: 'en', strength: 1 } })
|
|
10
|
+
options.Model.createIndex({ body: 1 }, { name: 'body-fr', collation: { locale: 'fr', strength: 1 } })
|
|
11
|
+
options.Model.createIndex({ author: 1 }, { name: 'author-en', collation: { locale: 'en', strength: 1 } })
|
|
12
|
+
options.Model.createIndex({ author: 1 }, { name: 'author-fr', collation: { locale: 'fr', strength: 1 } })
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
|
-
import
|
|
2
|
+
import { LRUCache } from 'lru-cache'
|
|
3
3
|
import makeDebug from 'debug'
|
|
4
4
|
import { defineAbilities } from '../../../common/permissions.js'
|
|
5
5
|
|
|
@@ -92,7 +92,11 @@ export default {
|
|
|
92
92
|
const config = app.get('authorisation')
|
|
93
93
|
if (config && config.cache) {
|
|
94
94
|
// Store abilities of the N most active users in LRU cache (defaults to 1000)
|
|
95
|
-
|
|
95
|
+
const max = config.cache.maxUsers || 1000
|
|
96
|
+
// LRU cache lib switched from positional parameters to options object at some point
|
|
97
|
+
// so that now we directly pass the options to it while before we used the max argument
|
|
98
|
+
if (!config.cache.max && !config.cache.ttl && !config.cache.maxSize) config.cache.max = max
|
|
99
|
+
this.cache = new LRUCache(config.cache)
|
|
96
100
|
debug('Using LRU cache for user abilities')
|
|
97
101
|
} else {
|
|
98
102
|
debug('Do not use LRU cache for user abilities')
|
|
@@ -127,13 +131,18 @@ export default {
|
|
|
127
131
|
async updateAbilities (subject) {
|
|
128
132
|
if (this.cache) {
|
|
129
133
|
if (subject && subject._id) {
|
|
130
|
-
this.cache.
|
|
134
|
+
this.cache.delete(subject._id.toString())
|
|
131
135
|
} else {
|
|
132
|
-
this.cache.
|
|
136
|
+
this.cache.delete(ANONYMOUS_USER)
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
const abilities = await this.getAbilities(subject)
|
|
137
141
|
return abilities
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
// Clear abilities
|
|
145
|
+
clearAbilities() {
|
|
146
|
+
if (this.cache) this.cache.clear()
|
|
138
147
|
}
|
|
139
148
|
}
|
|
@@ -38,6 +38,19 @@ export function removeStorageService (options = {}) {
|
|
|
38
38
|
return app.removeService(app.getService('storage', options.context))
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export function createMessagesService (options = {}) {
|
|
42
|
+
const app = this
|
|
43
|
+
return app.createService('messages', Object.assign({
|
|
44
|
+
servicesPath,
|
|
45
|
+
modelsPath
|
|
46
|
+
}, options))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function removeMessagesService (options = {}) {
|
|
50
|
+
const app = this
|
|
51
|
+
return app.removeService(app.getService('messages', options.context))
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
export function createDatabasesService (options = {}) {
|
|
42
55
|
const app = this
|
|
43
56
|
|
|
@@ -118,6 +131,12 @@ export default async function () {
|
|
|
118
131
|
debug('\'import-export\' service created')
|
|
119
132
|
}
|
|
120
133
|
|
|
134
|
+
const messagesConfig = app.get('messages')
|
|
135
|
+
if (messagesConfig) {
|
|
136
|
+
await createMessagesService.call(app)
|
|
137
|
+
debug('\'messages\' service created')
|
|
138
|
+
}
|
|
139
|
+
|
|
121
140
|
const orgConfig = app.get('organisations')
|
|
122
141
|
if (orgConfig) {
|
|
123
142
|
await createOrganisationService.call(app)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fuzzySearch from 'feathers-mongodb-fuzzy-search'
|
|
2
|
+
import commonHooks from 'feathers-hooks-common'
|
|
3
|
+
import { diacriticSearch } from '../../hooks/index.js'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
before: {
|
|
7
|
+
all: [],
|
|
8
|
+
find: [
|
|
9
|
+
fuzzySearch({ fields: ['title', 'body', 'author'] }),
|
|
10
|
+
diacriticSearch()
|
|
11
|
+
],
|
|
12
|
+
get: [],
|
|
13
|
+
create: [commonHooks.setNow('createdAt')],
|
|
14
|
+
update: [],
|
|
15
|
+
patch: [],
|
|
16
|
+
remove: []
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
after: {
|
|
20
|
+
all: [],
|
|
21
|
+
find: [],
|
|
22
|
+
get: [],
|
|
23
|
+
create: [],
|
|
24
|
+
update: [],
|
|
25
|
+
patch: [],
|
|
26
|
+
remove: []
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
error: {
|
|
30
|
+
all: [],
|
|
31
|
+
find: [],
|
|
32
|
+
get: [],
|
|
33
|
+
create: [],
|
|
34
|
+
update: [],
|
|
35
|
+
patch: [],
|
|
36
|
+
remove: []
|
|
37
|
+
}
|
|
38
|
+
}
|
package/core/client/api.js
CHANGED
|
@@ -10,7 +10,6 @@ import configuration from 'config'
|
|
|
10
10
|
import { permissions } from '../common/index.js'
|
|
11
11
|
import { Store } from './store.js'
|
|
12
12
|
import { Events } from './events.js'
|
|
13
|
-
import { LocalStorage } from './local-storage.js'
|
|
14
13
|
|
|
15
14
|
// Setup log level
|
|
16
15
|
if (_.get(configuration, 'logs.level')) {
|
|
@@ -22,7 +21,6 @@ if (_.get(configuration, 'logs.level')) {
|
|
|
22
21
|
export function createClient (config) {
|
|
23
22
|
// Initiate the client
|
|
24
23
|
const api = feathers()
|
|
25
|
-
const baseUrlStorageKey = 'baseUrl'
|
|
26
24
|
|
|
27
25
|
// Matchers that can be added to customize route guards
|
|
28
26
|
let matchers = []
|
|
@@ -137,35 +135,6 @@ export function createClient (config) {
|
|
|
137
135
|
if (options.context) service.context = options.context
|
|
138
136
|
return service
|
|
139
137
|
}
|
|
140
|
-
// Change the base URL/domain to be used (useful for mobile apps)
|
|
141
|
-
api.setBaseUrl = function (baseUrl) {
|
|
142
|
-
LocalStorage.set(baseUrlStorageKey, baseUrl)
|
|
143
|
-
// Updating this setting live does not seem to work well in Feathers
|
|
144
|
-
// For now the caller should simply "reload" the app
|
|
145
|
-
/*
|
|
146
|
-
if (config.transport === 'http') {
|
|
147
|
-
Object.keys(this.services).forEach(path => {
|
|
148
|
-
const service = this.service(path)
|
|
149
|
-
if (service.base) {
|
|
150
|
-
service.base = `${baseUrl}/${path}`
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
} else {
|
|
154
|
-
let socket = io(baseUrl, {
|
|
155
|
-
transports: ['websocket'],
|
|
156
|
-
path: (config.apiPath || '/') + 'ws'
|
|
157
|
-
})
|
|
158
|
-
this.configure(feathers.socketio(socket))
|
|
159
|
-
}
|
|
160
|
-
*/
|
|
161
|
-
}
|
|
162
|
-
// Get the base URL/domain to be used (useful for mobile apps)
|
|
163
|
-
api.getBaseUrl = function () {
|
|
164
|
-
// We can override the default app origin anyway
|
|
165
|
-
const origin = config.domain || config.origin || window.location.origin
|
|
166
|
-
// Check for registered custom base Url if any
|
|
167
|
-
return LocalStorage.get(baseUrlStorageKey, origin)
|
|
168
|
-
}
|
|
169
138
|
// Helper fonctions to access/alter config used at creation time
|
|
170
139
|
api.getConfig = function (path) {
|
|
171
140
|
return (path ? _.get(config, path) : config)
|
|
@@ -173,6 +142,9 @@ export function createClient (config) {
|
|
|
173
142
|
api.setConfig = function (path, value) {
|
|
174
143
|
_.set(config, path, value)
|
|
175
144
|
}
|
|
145
|
+
api.hasConfig = function (path, value) {
|
|
146
|
+
return _.has(config, path, value)
|
|
147
|
+
}
|
|
176
148
|
|
|
177
149
|
api.can = function () {
|
|
178
150
|
let service, context, resource
|
|
@@ -230,7 +202,7 @@ export function createClient (config) {
|
|
|
230
202
|
return result
|
|
231
203
|
}
|
|
232
204
|
|
|
233
|
-
const origin = api.
|
|
205
|
+
const origin = api.getConfig('domain')
|
|
234
206
|
if (config.transport === 'http') {
|
|
235
207
|
api.transporter = feathers.rest(origin).fetch(window.fetch.bind(window))
|
|
236
208
|
api.configure(api.transporter)
|
|
@@ -280,6 +252,9 @@ export function createClient (config) {
|
|
|
280
252
|
return this
|
|
281
253
|
}
|
|
282
254
|
|
|
255
|
+
// Define domain in config if not forced
|
|
256
|
+
if (!api.getConfig('domain')) api.setConfig('domain', window.location.origin)
|
|
257
|
+
|
|
283
258
|
return api
|
|
284
259
|
}
|
|
285
260
|
|
|
@@ -7,9 +7,9 @@ import { Store } from './store.js'
|
|
|
7
7
|
// Export singleton
|
|
8
8
|
export const Capabilities = {
|
|
9
9
|
async initialize () {
|
|
10
|
-
const capabilities = await window.fetch(api.
|
|
10
|
+
const capabilities = await window.fetch(api.getConfig('domain') + _.get(config, 'apiPath') + '/capabilities')
|
|
11
11
|
const content = await capabilities.json()
|
|
12
|
-
logger.debug('[KDK]
|
|
12
|
+
logger.debug('[KDK] Fetched capabilities:', content)
|
|
13
13
|
this.content = content
|
|
14
14
|
// Backend might override some defaults in client config
|
|
15
15
|
_.forOwn(_.pick(content, ['gateway']), (value, key) => {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<KPage>
|
|
3
|
-
<
|
|
4
|
-
<slot />
|
|
5
|
-
</template>
|
|
2
|
+
<KPage :padding="padding">
|
|
3
|
+
<slot />
|
|
6
4
|
</KPage>
|
|
7
5
|
</template>
|
|
8
6
|
|
|
@@ -25,6 +23,10 @@ export default {
|
|
|
25
23
|
layout: {
|
|
26
24
|
type: [Object, Function],
|
|
27
25
|
default: () => null
|
|
26
|
+
},
|
|
27
|
+
mode: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: null
|
|
28
30
|
}
|
|
29
31
|
},
|
|
30
32
|
setup (props) {
|
|
@@ -32,12 +34,28 @@ export default {
|
|
|
32
34
|
logger.debug(`[KDK] Reading '${props.name}' activity options with key ${keyName}`)
|
|
33
35
|
const options = _.get(config, keyName, {})
|
|
34
36
|
const { setCurrentActivity } = useActivity(keyName, options)
|
|
35
|
-
const { configureLayout, clearLayout } = useLayout()
|
|
37
|
+
const { Layout, configureLayout, clearLayout, setLayoutMode } = useLayout()
|
|
36
38
|
return {
|
|
37
39
|
options,
|
|
38
40
|
setCurrentActivity,
|
|
41
|
+
Layout,
|
|
39
42
|
configureLayout,
|
|
40
|
-
clearLayout
|
|
43
|
+
clearLayout,
|
|
44
|
+
setLayoutMode
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
padding () {
|
|
49
|
+
return this.Layout.padding
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
watch: {
|
|
53
|
+
mode: {
|
|
54
|
+
// [!] cannot be immediate as it is required that the activity is configured first
|
|
55
|
+
handler (value) {
|
|
56
|
+
logger.debug(`[KDK] Setting layout on '${value}' mode`)
|
|
57
|
+
if (value) this.setLayoutMode(value)
|
|
58
|
+
}
|
|
41
59
|
}
|
|
42
60
|
},
|
|
43
61
|
methods: {
|
|
@@ -54,6 +72,11 @@ export default {
|
|
|
54
72
|
this.configureLayout(_.merge({}, this.options, customLayout), concreteActivity)
|
|
55
73
|
// set the current activity
|
|
56
74
|
this.setCurrentActivity(concreteActivity)
|
|
75
|
+
// apply the mode if needed
|
|
76
|
+
if (this.mode) this.setLayoutMode(this.mode)
|
|
77
|
+
},
|
|
78
|
+
getOptions () {
|
|
79
|
+
return this.options
|
|
57
80
|
}
|
|
58
81
|
},
|
|
59
82
|
async mounted () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<template v-for="component in
|
|
3
|
+
<template v-for="component in availableComponents" :key="component.uid">
|
|
4
4
|
<Suspense v-if="component.suspense">
|
|
5
5
|
<component
|
|
6
6
|
v-if="component.isVisible && !component.isHidden"
|
|
@@ -61,7 +61,7 @@ const props = defineProps({
|
|
|
61
61
|
const emit = defineEmits(['triggered'])
|
|
62
62
|
|
|
63
63
|
// Computed
|
|
64
|
-
const
|
|
64
|
+
const availableComponents = computed(() => {
|
|
65
65
|
if (_.isEmpty(props.content)) return []
|
|
66
66
|
let components = filterContent(props.content, props.filter || {})
|
|
67
67
|
components = getComponents(components, props.mode, props.context)
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
<Suspense>
|
|
11
11
|
<!-- component with v-model -->
|
|
12
12
|
<component
|
|
13
|
-
v-if="
|
|
13
|
+
v-if="model"
|
|
14
14
|
ref="componentRef"
|
|
15
15
|
:is="computedComponent"
|
|
16
16
|
v-model="computedModel"
|
|
17
|
-
v-bind="
|
|
17
|
+
v-bind="attrs"
|
|
18
18
|
/>
|
|
19
19
|
<!-- component without v-model -->
|
|
20
20
|
<component
|
|
21
21
|
v-else
|
|
22
22
|
ref="componentRef"
|
|
23
23
|
:is="computedComponent"
|
|
24
|
-
v-bind="
|
|
24
|
+
v-bind="attrs"
|
|
25
25
|
/>
|
|
26
26
|
</Suspense>
|
|
27
27
|
</KModal>
|
|
@@ -97,7 +97,7 @@ const computedButtons = computed(() => {
|
|
|
97
97
|
const cancelButton = _.clone(props.cancelAction)
|
|
98
98
|
if (cancelButton.handler) {
|
|
99
99
|
cancelButton.handler = async () => {
|
|
100
|
-
// ! call the
|
|
100
|
+
// ! call the original handler to avoid recursive call
|
|
101
101
|
const result = await callHandler(props.cancelAction.handler)
|
|
102
102
|
// close dialog whatever the result of the handler
|
|
103
103
|
onDialogCancel(result)
|
|
@@ -141,9 +141,6 @@ const computedModel = computed({
|
|
|
141
141
|
emit('update:modelValue', value)
|
|
142
142
|
}
|
|
143
143
|
})
|
|
144
|
-
const computedProps = computed(() => {
|
|
145
|
-
return _.omit(attrs, ['v-model'])
|
|
146
|
-
})
|
|
147
144
|
|
|
148
145
|
// Functions
|
|
149
146
|
async function callHandler (handler) {
|
|
@@ -6,13 +6,10 @@
|
|
|
6
6
|
'column items-center q-gutter-y-sm': direction === 'vertical',
|
|
7
7
|
'row items-center no-wrap q-gutter-x-sm': direction === 'horizontal'
|
|
8
8
|
}">
|
|
9
|
-
<div>
|
|
10
|
-
<q-icon
|
|
11
|
-
<q-tooltip v-if="!canShowText">
|
|
12
|
-
{{ $tie(text) }}
|
|
13
|
-
</q-tooltip>
|
|
9
|
+
<div v-if="canShowIcon">
|
|
10
|
+
<q-icon :size="iconSize" :name="icon" />
|
|
14
11
|
</div>
|
|
15
|
-
<div
|
|
12
|
+
<div class="ellipsis" :style="`font-size: ${textSize};`"
|
|
16
13
|
v-bind:class="{'text-center': direction === 'vertical' }"
|
|
17
14
|
>
|
|
18
15
|
{{ $tie(text) }}
|
|
@@ -59,7 +56,4 @@ const $q = useQuasar()
|
|
|
59
56
|
const canShowIcon = computed(() => {
|
|
60
57
|
return !_.isEmpty(props.icon)
|
|
61
58
|
})
|
|
62
|
-
const canShowText = computed(() => {
|
|
63
|
-
return props.direction === 'vertical' || _.isEmpty(props.icon) || $q.screen.gt.xs
|
|
64
|
-
})
|
|
65
59
|
</script>
|
|
@@ -18,10 +18,8 @@ Events.on('store-changed', (path, value) => updateLazy(path, value))
|
|
|
18
18
|
|
|
19
19
|
// functions
|
|
20
20
|
function onLazyLoad ({ node, key, done, fail }) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
lazy.value = addPath(lazy.value)
|
|
24
|
-
}, 1000)
|
|
21
|
+
done(convertStore(_.get(Store, key), 1))
|
|
22
|
+
lazy.value = addPath(lazy.value)
|
|
25
23
|
}
|
|
26
24
|
function convertStore (node, maxDepth = -1, depth = 0) {
|
|
27
25
|
if (maxDepth >= 0 && maxDepth === depth) return
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="hasTabs" class="fit column">
|
|
3
|
+
<!-- Tabs -->
|
|
4
|
+
<q-tabs
|
|
5
|
+
v-model="current"
|
|
6
|
+
:no-caps="noCaps"
|
|
7
|
+
outside-arrows
|
|
8
|
+
mobile-arrows
|
|
9
|
+
:dense="dense"
|
|
10
|
+
class="full-width text-primary"
|
|
11
|
+
>
|
|
12
|
+
<template v-for="(tab, index) in tabs" :key="tab">
|
|
13
|
+
<q-tab :name="tab" :id="tab" :label="getLabel(index) || tab" />
|
|
14
|
+
</template>
|
|
15
|
+
</q-tabs>
|
|
16
|
+
<q-separator />
|
|
17
|
+
<!-- Panel -->
|
|
18
|
+
<KContent
|
|
19
|
+
:id="`${current}-panel`"
|
|
20
|
+
:content="panel"
|
|
21
|
+
:mode="current"
|
|
22
|
+
:filter="filter"
|
|
23
|
+
@triggered="onTriggered"
|
|
24
|
+
class="col full-width"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import _ from 'lodash'
|
|
31
|
+
import { ref, computed } from 'vue'
|
|
32
|
+
import { i18n } from '../i18n.js'
|
|
33
|
+
import KContent from './KContent.vue'
|
|
34
|
+
|
|
35
|
+
// Props
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
content: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => null
|
|
40
|
+
},
|
|
41
|
+
mode: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: undefined
|
|
44
|
+
},
|
|
45
|
+
filter: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => {}
|
|
48
|
+
},
|
|
49
|
+
context: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: () => null
|
|
52
|
+
},
|
|
53
|
+
labels: {
|
|
54
|
+
type: Array,
|
|
55
|
+
default: () => null
|
|
56
|
+
},
|
|
57
|
+
noCaps: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
dense: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
// Emit
|
|
68
|
+
const emit = defineEmits(['triggered'])
|
|
69
|
+
|
|
70
|
+
// Data
|
|
71
|
+
const current = ref(props.mode || _.head(getModes()))
|
|
72
|
+
|
|
73
|
+
// Computed
|
|
74
|
+
const hasTabs = computed(() => {
|
|
75
|
+
return !_.isEmpty(tabs.value)
|
|
76
|
+
})
|
|
77
|
+
const tabs = computed(() => {
|
|
78
|
+
return getModes()
|
|
79
|
+
})
|
|
80
|
+
const panel = computed(() => {
|
|
81
|
+
return _.get(props.content, current.value)
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
// Function
|
|
85
|
+
function getModes () {
|
|
86
|
+
return _.keys(props.content)
|
|
87
|
+
}
|
|
88
|
+
function getLabel (index) {
|
|
89
|
+
const label = _.nth(props.labels, index)
|
|
90
|
+
if (label) return i18n.tie(label)
|
|
91
|
+
}
|
|
92
|
+
function onTriggered (params) {
|
|
93
|
+
emit('triggered', params)
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
:icon="!iconRight ? computedIcon : undefined"
|
|
11
11
|
:icon-right="iconRight ? computedIcon : undefined"
|
|
12
12
|
:size="size"
|
|
13
|
-
flat
|
|
13
|
+
:flat="flat"
|
|
14
|
+
:outline="outline"
|
|
14
15
|
:round="label === null"
|
|
15
16
|
:rounded="label !== null"
|
|
16
17
|
:stack="stack"
|
|
@@ -111,6 +112,10 @@
|
|
|
111
112
|
label-class="bg-primary text-white text-caption k-fab-action"
|
|
112
113
|
:disable="computedDisabled"
|
|
113
114
|
@click="onClicked">
|
|
115
|
+
<!-- tooltip -->
|
|
116
|
+
<q-tooltip v-if="computedTooltip" anchor="top middle" self="bottom right">
|
|
117
|
+
{{ computedTooltip }}
|
|
118
|
+
</q-tooltip>
|
|
114
119
|
<!-- badge -->
|
|
115
120
|
<q-badge v-if="badge" v-bind="badge">
|
|
116
121
|
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
@@ -163,11 +168,13 @@ import { i18n } from '../../i18n.js'
|
|
|
163
168
|
import { actionProps } from '../../utils/utils.actions'
|
|
164
169
|
import { bindParams } from '../../utils/utils.content.js'
|
|
165
170
|
|
|
171
|
+
// Props
|
|
172
|
+
const props = defineProps(actionProps)
|
|
173
|
+
|
|
166
174
|
// Data
|
|
167
175
|
const route = useRoute()
|
|
168
176
|
const router = useRouter()
|
|
169
177
|
const $q = useQuasar()
|
|
170
|
-
const props = defineProps(actionProps)
|
|
171
178
|
const isToggled = _.has(props, 'toggle.value') ? toRef(props.toggle, 'value') : ref(props.toggled)
|
|
172
179
|
|
|
173
180
|
// Emit
|
|
@@ -282,6 +289,12 @@ async function onClicked (event) {
|
|
|
282
289
|
watch(() => props.toggled, (value) => {
|
|
283
290
|
if (isToggled.value !== value) isToggled.value = value
|
|
284
291
|
})
|
|
292
|
+
|
|
293
|
+
// Expose
|
|
294
|
+
defineExpose({
|
|
295
|
+
isToggled,
|
|
296
|
+
toggle
|
|
297
|
+
})
|
|
285
298
|
</script>
|
|
286
299
|
|
|
287
300
|
<style lang="scss" scoped>
|
|
@@ -13,10 +13,12 @@ import { i18n } from '../../i18n'
|
|
|
13
13
|
import { getPlatform } from '../../utils/utils.platform'
|
|
14
14
|
import { actionProps } from '../../utils/utils.actions'
|
|
15
15
|
import { useVersion } from '../../composables'
|
|
16
|
-
import KAction from '
|
|
16
|
+
import KAction from './KAction.vue'
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// Props
|
|
19
19
|
const props = defineProps(_.omit(actionProps, ['toggle', 'url', 'handler', 'route', 'dialog']))
|
|
20
|
+
|
|
21
|
+
// Data
|
|
20
22
|
const { clientVersionName, apiVersionName } = useVersion()
|
|
21
23
|
const platform = getPlatform()
|
|
22
24
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<KAction
|
|
3
|
+
ref="actionRef"
|
|
4
|
+
v-bind="props"
|
|
5
|
+
:handler="toggleFullscreen"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
import _ from 'lodash'
|
|
11
|
+
import { ref, watch } from 'vue'
|
|
12
|
+
import { actionProps, Fullscreen, toggleFullscreen } from '../../utils'
|
|
13
|
+
import KAction from './KAction.vue'
|
|
14
|
+
|
|
15
|
+
// Props
|
|
16
|
+
const props = defineProps(_.omit(actionProps, ['url', 'handler', 'dialog', 'route', 'closePopup']))
|
|
17
|
+
|
|
18
|
+
// Data
|
|
19
|
+
const actionRef = ref(null)
|
|
20
|
+
|
|
21
|
+
// Watch
|
|
22
|
+
watch(Fullscreen, () => {
|
|
23
|
+
if (actionRef.value.isToggled !== Fullscreen.value) actionRef.value.toggle()
|
|
24
|
+
})
|
|
25
|
+
</script>
|