@kalisio/kdk 2.3.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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/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/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/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 +90 -5
- 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.layers.js +8 -0
- package/map/client/utils/utils.time-series.js +121 -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/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/core/client/units.js
CHANGED
|
@@ -215,8 +215,9 @@ const quantities = {
|
|
|
215
215
|
export const Units = {
|
|
216
216
|
initialize () {
|
|
217
217
|
// Set the units object within the store
|
|
218
|
-
Store.set('units', _.
|
|
219
|
-
quantities,
|
|
218
|
+
Store.set('units', _.defaultsDeep(config.units || {},
|
|
219
|
+
quantities,
|
|
220
|
+
{
|
|
220
221
|
default: {
|
|
221
222
|
length: 'm',
|
|
222
223
|
altitude: 'm',
|
|
@@ -230,7 +231,8 @@ export const Units = {
|
|
|
230
231
|
notation: 'auto',
|
|
231
232
|
precision: 3
|
|
232
233
|
}
|
|
233
|
-
}
|
|
234
|
+
}
|
|
235
|
+
))
|
|
234
236
|
// Create units not defined by default in mathjs
|
|
235
237
|
this.getQuantities().forEach(quantity => {
|
|
236
238
|
this.createUnits(quantity)
|
|
@@ -284,15 +286,31 @@ export const Units = {
|
|
|
284
286
|
},
|
|
285
287
|
// Get unit definition by name
|
|
286
288
|
getUnit (unit) {
|
|
287
|
-
|
|
289
|
+
// Not optimized
|
|
290
|
+
// return _.find(this.getUnits(), { name: unit })
|
|
291
|
+
let definition
|
|
292
|
+
_.forOwn(this.get(), (units, quantity) => {
|
|
293
|
+
// Already found ?
|
|
294
|
+
if (!definition && _.has(units, unit)) definition = Object.assign({ name: unit, quantity }, _.get(units, unit))
|
|
295
|
+
})
|
|
296
|
+
if (!definition) {
|
|
297
|
+
// Check if that's a mathjs unit ? This will actually enforce a unit to be known by either our systelm or mathjs.
|
|
298
|
+
// We'd like to be able to mange unknown unit without braking the system just to perform unit display
|
|
299
|
+
// if (math.Unit.isValuelessUnit(unit)) definition = { name: unit, symbol: unit, label: unit }
|
|
300
|
+
// Create a fake unit definition for unknown units so tht it does not break others methods
|
|
301
|
+
definition = { name: unit, symbol: unit, label: unit }
|
|
302
|
+
}
|
|
303
|
+
return definition
|
|
288
304
|
},
|
|
289
|
-
// Get unit symbol by unit name
|
|
305
|
+
// Get unit symbol by unit name/definition
|
|
290
306
|
getUnitSymbol (unit) {
|
|
291
|
-
const definition = this.getUnit(unit)
|
|
292
|
-
return (definition ? i18n.tie(definition.symbol) : unit)
|
|
307
|
+
const definition = (typeof unit === 'object' ? unit : this.getUnit(unit))
|
|
308
|
+
return (definition && definition.symbol ? i18n.tie(definition.symbol) : unit)
|
|
293
309
|
},
|
|
294
|
-
// Get default unit definition (if any) for a given quantity/unit name
|
|
310
|
+
// Get default unit definition (if any) for a given quantity/unit name/definition
|
|
295
311
|
getDefaultUnit (quantityOrUnit) {
|
|
312
|
+
if (!quantityOrUnit) return null
|
|
313
|
+
if (typeof quantityOrUnit === 'object') quantityOrUnit = quantityOrUnit.name
|
|
296
314
|
// Check for quantity first
|
|
297
315
|
let defaultUnit = Store.get(`units.default.${quantityOrUnit}`)
|
|
298
316
|
// If not check by matching quantity based on given unit
|
|
@@ -300,44 +318,48 @@ export const Units = {
|
|
|
300
318
|
const baseUnit = this.getUnit(quantityOrUnit)
|
|
301
319
|
// Get default unit for this quantity instead
|
|
302
320
|
if (baseUnit) defaultUnit = this.getDefaultUnit(baseUnit.quantity)
|
|
321
|
+
} else {
|
|
322
|
+
// Jump from name to definition
|
|
323
|
+
defaultUnit = this.getUnit(defaultUnit)
|
|
303
324
|
}
|
|
304
325
|
return defaultUnit
|
|
305
326
|
},
|
|
327
|
+
// Set default unit name for a quantity
|
|
306
328
|
setDefaultUnit (quantity, unit) {
|
|
307
329
|
Store.set(`units.default.${quantity}`, unit)
|
|
308
330
|
},
|
|
309
|
-
// Get symbol of default unit (if any) for a given quantity/unit name
|
|
331
|
+
// Get symbol of default unit (if any) for a given quantity/unit name/definition
|
|
310
332
|
getDefaultUnitSymbol (quantityOrUnit) {
|
|
311
333
|
return this.getUnitSymbol(this.getDefaultUnit(quantityOrUnit))
|
|
312
334
|
},
|
|
313
|
-
// Get target unit for a source unit, will be default unit (if any) or source unit
|
|
335
|
+
// Get target unit definition for a source unit name/definition, will be default unit (if any) or source unit
|
|
314
336
|
getTargetUnit (sourceUnit) {
|
|
315
|
-
return this.getDefaultUnit(sourceUnit) || sourceUnit
|
|
337
|
+
return this.getDefaultUnit(sourceUnit) || (typeof sourceUnit === 'object' ? sourceUnit : this.getUnit(sourceUnit))
|
|
316
338
|
},
|
|
317
|
-
// Get target unit symbol for a source unit, will be default unit symbol (if any) or source unit symbol
|
|
339
|
+
// Get target unit symbol for a source unit name/definition, will be default unit symbol (if any) or source unit symbol
|
|
318
340
|
getTargetUnitSymbol (sourceUnit) {
|
|
319
341
|
return this.getUnitSymbol(this.getTargetUnit(sourceUnit))
|
|
320
342
|
},
|
|
321
|
-
// Convert between units by names
|
|
343
|
+
// Convert between units by names/definitions
|
|
322
344
|
// If target unit is not specified will use default unit (if any) for source unit
|
|
323
345
|
convert (value, sourceUnit, targetUnit) {
|
|
324
|
-
if (_.isNil(value))
|
|
325
|
-
logger.warn('[KDK] cannont convert a nil value')
|
|
326
|
-
return
|
|
327
|
-
}
|
|
346
|
+
if (_.isNil(value) || !_.isFinite(value)) return value
|
|
328
347
|
if (value === Number.MIN_VALUE || value === Number.MAX_VALUE) return value
|
|
329
|
-
|
|
330
|
-
|
|
348
|
+
const sourceUnitDef = (typeof sourceUnit === 'string') ? this.getUnit(sourceUnit) : sourceUnit
|
|
349
|
+
let targetUnitDef = (typeof targetUnit === 'string') ? this.getUnit(targetUnit) : targetUnit
|
|
331
350
|
// If target unit is not given use default one
|
|
332
|
-
if (!
|
|
333
|
-
// Check if the target unit does exist
|
|
334
|
-
if (!
|
|
335
|
-
//
|
|
336
|
-
if (
|
|
337
|
-
|
|
338
|
-
|
|
351
|
+
if (!targetUnitDef && sourceUnitDef) targetUnitDef = this.getDefaultUnit(sourceUnitDef)
|
|
352
|
+
// Check if the source/target unit does exist
|
|
353
|
+
if (!sourceUnitDef || !targetUnitDef) return value
|
|
354
|
+
// If target unit is same as source unit does nothing
|
|
355
|
+
if (targetUnitDef.name === sourceUnitDef.name) return value
|
|
356
|
+
// If target unit or source unit is unknown by unit system does nothing
|
|
357
|
+
if (!math.Unit.isValuelessUnit(sourceUnitDef.name) || !math.Unit.isValuelessUnit(targetUnitDef.name)) return value
|
|
358
|
+
// Now convert
|
|
359
|
+
let n = math.unit(value, sourceUnitDef.name)
|
|
360
|
+
n = n.toNumber(targetUnitDef.name)
|
|
339
361
|
// Remap from [-180,+180[ to [0,360[ for angles
|
|
340
|
-
n = (
|
|
362
|
+
n = (targetUnitDef.name === 'deg' ? (n < 0.0 ? n + 360.0 : n) : n)
|
|
341
363
|
return n
|
|
342
364
|
},
|
|
343
365
|
// Format display of source value in target unit, converting from source unit
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import logger from 'loglevel'
|
|
3
|
-
import moment from 'moment'
|
|
4
3
|
import emailValidator from 'email-validator'
|
|
5
4
|
import { Notify, Dialog, Loading, exportFile } from 'quasar'
|
|
6
5
|
import { defineAsyncComponent, markRaw } from 'vue'
|
|
@@ -9,11 +8,13 @@ export * from './utils.account.js'
|
|
|
9
8
|
export * from './utils.actions.js'
|
|
10
9
|
export * from './utils.colors.js'
|
|
11
10
|
export * from './utils.content.js'
|
|
12
|
-
export * from './utils.
|
|
11
|
+
export * from './utils.items.js'
|
|
13
12
|
export * from './utils.locale.js'
|
|
13
|
+
export * from './utils.math.js'
|
|
14
14
|
export * from './utils.platform.js'
|
|
15
15
|
export * from './utils.push.js'
|
|
16
16
|
export * from './utils.pwa.js'
|
|
17
|
+
export * from './utils.screen.js'
|
|
17
18
|
export * from './utils.shapes.js'
|
|
18
19
|
export * from './utils.session.js'
|
|
19
20
|
export * from './utils.time.js'
|
|
@@ -1,8 +1,159 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import logger from 'loglevel'
|
|
3
|
-
import {
|
|
3
|
+
import { colors } from 'quasar'
|
|
4
4
|
import chroma from 'chroma-js'
|
|
5
5
|
|
|
6
|
+
const HtmlColors = {
|
|
7
|
+
black: "#000000",
|
|
8
|
+
silver: "#C0C0C0",
|
|
9
|
+
gray: "#808080",
|
|
10
|
+
grey: "#808080",
|
|
11
|
+
white: "#FFFFFF",
|
|
12
|
+
maroon: "#800000",
|
|
13
|
+
red: "#FF0000",
|
|
14
|
+
purple: "#800080",
|
|
15
|
+
fuchsia: "#FF00FF",
|
|
16
|
+
green: "#008000",
|
|
17
|
+
lime: "#00FF00",
|
|
18
|
+
olive: "#808000",
|
|
19
|
+
yellow: "#FFFF00",
|
|
20
|
+
navy: "#000080",
|
|
21
|
+
blue: "#0000FF",
|
|
22
|
+
teal: "#008080",
|
|
23
|
+
aqua: "#00FFFF",
|
|
24
|
+
darkblue: "#00008B",
|
|
25
|
+
mediumblue: "#0000CD",
|
|
26
|
+
darkgreen: "#006400",
|
|
27
|
+
darkcyan: "#008B8B",
|
|
28
|
+
deepskyblue: "#00BFFF",
|
|
29
|
+
darkturquoise: "#00CED1",
|
|
30
|
+
mediumspringgreen: "#00FA9A",
|
|
31
|
+
springgreen: "#00FF7F",
|
|
32
|
+
cyan: "#00FFFF",
|
|
33
|
+
midnightblue: "#191970",
|
|
34
|
+
dodgerblue: "#1E90FF",
|
|
35
|
+
lightseagreen: "#20B2AA",
|
|
36
|
+
forestgreen: "#228B22",
|
|
37
|
+
seagreen: "#2E8B57",
|
|
38
|
+
darkslategray: "#2F4F4F",
|
|
39
|
+
darkslategrey: "#2F4F4F",
|
|
40
|
+
limegreen: "#32CD32",
|
|
41
|
+
mediumseagreen: "#3CB371",
|
|
42
|
+
turquoise: "#40E0D0",
|
|
43
|
+
royalblue: "#4169E1",
|
|
44
|
+
steelblue: "#4682B4",
|
|
45
|
+
darkslateblue: "#483D8B",
|
|
46
|
+
mediumturquoise: "#48D1CC",
|
|
47
|
+
indigo: "#4B0082",
|
|
48
|
+
darkolivegreen: "#556B2F",
|
|
49
|
+
cadetblue: "#5F9EA0",
|
|
50
|
+
cornflowerblue: "#6495ED",
|
|
51
|
+
rebeccapurple: "#663399",
|
|
52
|
+
mediumaquamarine: "#66CDAA",
|
|
53
|
+
dimgray: "#696969",
|
|
54
|
+
dimgrey: "#696969",
|
|
55
|
+
slateblue: "#6A5ACD",
|
|
56
|
+
olivedrab: "#6B8E23",
|
|
57
|
+
slategray: "#708090",
|
|
58
|
+
slategrey: "#708090",
|
|
59
|
+
lightslategray: "#778899",
|
|
60
|
+
lightslategrey: "#778899",
|
|
61
|
+
mediumslateblue: "#7B68EE",
|
|
62
|
+
lawngreen: "#7CFC00",
|
|
63
|
+
chartreuse: "#7FFF00",
|
|
64
|
+
aquamarine: "#7FFFD4",
|
|
65
|
+
skyblue: "#87CEEB",
|
|
66
|
+
lightskyblue: "#87CEFA",
|
|
67
|
+
blueviolet: "#8A2BE2",
|
|
68
|
+
darkred: "#8B0000",
|
|
69
|
+
darkmagenta: "#8B008B",
|
|
70
|
+
saddlebrown: "#8B4513",
|
|
71
|
+
darkseagreen: "#8FBC8F",
|
|
72
|
+
lightgreen: "#90EE90",
|
|
73
|
+
mediumpurple: "#9370DB",
|
|
74
|
+
darkviolet: "#9400D3",
|
|
75
|
+
palegreen: "#98FB98",
|
|
76
|
+
darkorchid: "#9932CC",
|
|
77
|
+
yellowgreen: "#9ACD32",
|
|
78
|
+
sienna: "#A0522D",
|
|
79
|
+
brown: "#A52A2A",
|
|
80
|
+
darkgray: "#A9A9A9",
|
|
81
|
+
darkgrey: "#A9A9A9",
|
|
82
|
+
lightblue: "#ADD8E6",
|
|
83
|
+
greenyellow: "#ADFF2F",
|
|
84
|
+
paleturquoise: "#AFEEEE",
|
|
85
|
+
lightsteelblue: "#B0C4DE",
|
|
86
|
+
powderblue: "#B0E0E6",
|
|
87
|
+
firebrick: "#B22222",
|
|
88
|
+
darkgoldenrod: "#B8860B",
|
|
89
|
+
mediumorchid: "#BA55D3",
|
|
90
|
+
rosybrown: "#BC8F8F",
|
|
91
|
+
darkkhaki: "#BDB76B",
|
|
92
|
+
mediumvioletred: "#C71585",
|
|
93
|
+
indianred: "#CD5C5C",
|
|
94
|
+
peru: "#CD853F",
|
|
95
|
+
chocolate: "#D2691E",
|
|
96
|
+
tan: "#D2B48C",
|
|
97
|
+
lightgray: "#D3D3D3",
|
|
98
|
+
lightgrey: "#D3D3D3",
|
|
99
|
+
thistle: "#D8BFD8",
|
|
100
|
+
orchid: "#DA70D6",
|
|
101
|
+
goldenrod: "#DAA520",
|
|
102
|
+
palevioletred: "#DB7093",
|
|
103
|
+
crimson: "#DC143C",
|
|
104
|
+
gainsboro: "#DCDCDC",
|
|
105
|
+
plum: "#DDA0DD",
|
|
106
|
+
burlywood: "#DEB887",
|
|
107
|
+
lightcyan: "#E0FFFF",
|
|
108
|
+
lavender: "#E6E6FA",
|
|
109
|
+
darksalmon: "#E9967A",
|
|
110
|
+
violet: "#EE82EE",
|
|
111
|
+
palegoldenrod: "#EEE8AA",
|
|
112
|
+
lightcoral: "#F08080",
|
|
113
|
+
khaki: "#F0E68C",
|
|
114
|
+
aliceblue: "#F0F8FF",
|
|
115
|
+
honeydew: "#F0FFF0",
|
|
116
|
+
azure: "#F0FFFF",
|
|
117
|
+
sandybrown: "#F4A460",
|
|
118
|
+
wheat: "#F5DEB3",
|
|
119
|
+
beige: "#F5F5DC",
|
|
120
|
+
whitesmoke: "#F5F5F5",
|
|
121
|
+
mintcream: "#F5FFFA",
|
|
122
|
+
ghostwhite: "#F8F8FF",
|
|
123
|
+
salmon: "#FA8072",
|
|
124
|
+
antiquewhite: "#FAEBD7",
|
|
125
|
+
linen: "#FAF0E6",
|
|
126
|
+
lightgoldenrodyellow: "#FAFAD2",
|
|
127
|
+
oldlace: "#FDF5E6",
|
|
128
|
+
magenta: "#FF00FF",
|
|
129
|
+
deeppink: "#FF1493",
|
|
130
|
+
orangered: "#FF4500",
|
|
131
|
+
tomato: "#FF6347",
|
|
132
|
+
hotpink: "#FF69B4",
|
|
133
|
+
coral: "#FF7F50",
|
|
134
|
+
darkorange: "#FF8C00",
|
|
135
|
+
lightsalmon: "#FFA07A",
|
|
136
|
+
orange: "#FFA500",
|
|
137
|
+
lightpink: "#FFB6C1",
|
|
138
|
+
pink: "#FFC0CB",
|
|
139
|
+
gold: "#FFD700",
|
|
140
|
+
peachpuff: "#FFDAB9",
|
|
141
|
+
navajowhite: "#FFDEAD",
|
|
142
|
+
moccasin: "#FFE4B5",
|
|
143
|
+
bisque: "#FFE4C4",
|
|
144
|
+
mistyrose: "#FFE4E1",
|
|
145
|
+
blanchedalmond: "#FFEBCD",
|
|
146
|
+
papayawhip: "#FFEFD5",
|
|
147
|
+
lavenderblush: "#FFF0F5",
|
|
148
|
+
seashell: "#FFF5EE",
|
|
149
|
+
cornsilk: "#FFF8DC",
|
|
150
|
+
lemonchiffon: "#FFFACD",
|
|
151
|
+
floralwhite: "#FFFAF0",
|
|
152
|
+
snow: "#FFFAFA",
|
|
153
|
+
lightyellow: "#FFFFE0",
|
|
154
|
+
ivory: "#FFFFF0"
|
|
155
|
+
}
|
|
156
|
+
|
|
6
157
|
export const Colors = {
|
|
7
158
|
white: '#fff',
|
|
8
159
|
dark: '#333',
|
|
@@ -29,7 +180,9 @@ export const Colors = {
|
|
|
29
180
|
|
|
30
181
|
export function getHtmlColor (color, defaultColor) {
|
|
31
182
|
if (!color) return defaultColor
|
|
32
|
-
|
|
183
|
+
if (color.startsWith('#')) return color
|
|
184
|
+
if (_.has(HtmlColors, color)) return color
|
|
185
|
+
return colors.getPaletteColor(color)
|
|
33
186
|
}
|
|
34
187
|
|
|
35
188
|
export function getPaletteFromColor (color) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const CardSectionProps = {
|
|
2
|
+
title: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: ''
|
|
5
|
+
},
|
|
6
|
+
item: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: () => null
|
|
9
|
+
},
|
|
10
|
+
actions: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: () => null
|
|
13
|
+
},
|
|
14
|
+
actionsFilter: {
|
|
15
|
+
type: [String, Array],
|
|
16
|
+
default: () => null
|
|
17
|
+
},
|
|
18
|
+
hideHeader: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
dense: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Platform } from 'quasar'
|
|
2
|
+
import config from 'config'
|
|
2
3
|
|
|
3
4
|
export function getPlatform () {
|
|
4
5
|
return Object.assign(Platform.is, {
|
|
5
6
|
touch: Platform.has.touch,
|
|
6
7
|
storage: Platform.has.webStorage,
|
|
7
8
|
iframe: Platform.within.frame,
|
|
8
|
-
agent: Platform.userAgent
|
|
9
|
+
agent: Platform.userAgent,
|
|
10
|
+
pwa: config.buildMode === 'pwa'
|
|
9
11
|
})
|
|
10
12
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import logger from 'loglevel'
|
|
3
|
+
import { toRef } from 'vue'
|
|
4
|
+
import { Screen } from 'quasar'
|
|
5
|
+
import { AppFullscreen } from 'quasar'
|
|
6
|
+
|
|
7
|
+
export const Fullscreen = toRef(AppFullscreen, 'isActive')
|
|
8
|
+
|
|
9
|
+
export function computeResponsiveWidth (width) {
|
|
10
|
+
if (_.isNumber(width)) {
|
|
11
|
+
if (width > 100) return width
|
|
12
|
+
return Screen.width * width / 100
|
|
13
|
+
}
|
|
14
|
+
if (!_.isObject(width)) {
|
|
15
|
+
logger.warn(`[KDK] Invalid width parameter ${width}`)
|
|
16
|
+
return undefined
|
|
17
|
+
}
|
|
18
|
+
let breakpointWidth = _.get(width, Screen.name)
|
|
19
|
+
if (!breakpointWidth) {
|
|
20
|
+
logger.warn(`[KDK] Cannot find width value for breakpoint ${Screen.name}`)
|
|
21
|
+
return undefined
|
|
22
|
+
}
|
|
23
|
+
if (!_.isNumber(breakpointWidth)) {
|
|
24
|
+
logger.warn(`[KDK] Invalid width value ${breakpointWidth} for breakpoint ${Screen.name}`)
|
|
25
|
+
return undefined
|
|
26
|
+
}
|
|
27
|
+
return computeResponsiveWidth(breakpointWidth)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function computeResponsiveHeight (height) {
|
|
31
|
+
if (_.isNumber(height)) {
|
|
32
|
+
if (height > 100) return height
|
|
33
|
+
return Screen.height * height / 100
|
|
34
|
+
}
|
|
35
|
+
if (!_.isObject(height)) {
|
|
36
|
+
logger.warn(`[KDK] Invalid height parameter ${height}`)
|
|
37
|
+
return undefined
|
|
38
|
+
}
|
|
39
|
+
let breakpointHeight = _.get(height, Screen.name)
|
|
40
|
+
if (!breakpointHeight) {
|
|
41
|
+
logger.warn(`[KDK] Cannot find height value for breakpoint ${Screen.name}`)
|
|
42
|
+
return undefined
|
|
43
|
+
}
|
|
44
|
+
if (!_.isNumber(breakpointHeight)) {
|
|
45
|
+
logger.warn(`[KDK] Invalid height value ${breakpointHeight} for breakpoint ${Screen.name}`)
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
return computeResponsiveHeight(breakpointHeight)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function computeResponsiveSize (size) {
|
|
52
|
+
if (_.isArray(size)) {
|
|
53
|
+
if (size.length === 2) {
|
|
54
|
+
logger.warn(`[KDK] Invalid size parameter ${size}`)
|
|
55
|
+
return undefined
|
|
56
|
+
}
|
|
57
|
+
return size
|
|
58
|
+
}
|
|
59
|
+
if (!_.isObject(size)) {
|
|
60
|
+
logger.warn(`[KDK] Invalid size parameter ${size}`)
|
|
61
|
+
return undefined
|
|
62
|
+
}
|
|
63
|
+
let breakpointSize = _.get(size, Screen.name)
|
|
64
|
+
return [computeResponsiveWidth(breakpointSize[0]), computeResponsiveHeight(breakpointSize[1])]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function getOrientation () {
|
|
68
|
+
return Screen.width > Screen.height ? 'portrait' : 'landscape'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export async function toggleFullscreen () {
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
AppFullscreen.toggle()
|
|
74
|
+
.then(() => {
|
|
75
|
+
resolve(true)
|
|
76
|
+
})
|
|
77
|
+
.catch(err => {
|
|
78
|
+
logger.warn(`[KDK] Cannot toggle fullscreen mode: ${err}`)
|
|
79
|
+
reject(false)
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
}
|
|
@@ -130,6 +130,18 @@
|
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
+
"timeseriesGroupBy": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"group": "group-timeseries",
|
|
136
|
+
"field": {
|
|
137
|
+
"component": "form/KSelectField",
|
|
138
|
+
"label": "schemas.TIMESERIES_GROUP_BY",
|
|
139
|
+
"options": [
|
|
140
|
+
{ "label": "schemas.TIMESERIES_GROUP_BY_VARIABLE", "value": "variable" },
|
|
141
|
+
{ "label": "schemas.TIMESERIES_GROUP_BY_FEATURE", "value": "feature", "selected": true }
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
133
145
|
"restoreView": {
|
|
134
146
|
"type": "boolean",
|
|
135
147
|
"group": "group-map",
|