@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
|
@@ -1,183 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:mask="dateFormat"
|
|
11
|
-
:title="startDate"
|
|
12
|
-
:options="checkStartDate"
|
|
13
|
-
@update:model-value="onTimeRangeChanged"
|
|
14
|
-
/>
|
|
15
|
-
</q-popup-proxy>
|
|
16
|
-
</div>
|
|
17
|
-
<div> </div>
|
|
18
|
-
<div id="start-time" class="k-datetime text-body2">
|
|
19
|
-
{{ formattedStartTime }}
|
|
20
|
-
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_START_TIME_LABEL') }}</q-tooltip>
|
|
21
|
-
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
22
|
-
<q-time
|
|
23
|
-
id="start-time-popup"
|
|
24
|
-
v-model="startTime"
|
|
25
|
-
:mask="hourFormat"
|
|
26
|
-
:options="checkStartTime"
|
|
27
|
-
@update:model-value="onTimeRangeChanged"
|
|
28
|
-
/>
|
|
29
|
-
</q-popup-proxy>
|
|
30
|
-
</div>
|
|
31
|
-
<div> - </div>
|
|
32
|
-
<div id="end-date" class="k-datetime text-body2">
|
|
33
|
-
{{ formattedEndDate }}
|
|
34
|
-
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_DATE_LABEL') }}</q-tooltip>
|
|
35
|
-
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
36
|
-
<q-date
|
|
37
|
-
id="end-date-popup"
|
|
38
|
-
v-model="endDate"
|
|
39
|
-
:mask="dateFormat"
|
|
40
|
-
:title="endDate"
|
|
41
|
-
:options="checkEndDate"
|
|
42
|
-
@update:model-value="onTimeRangeChanged"
|
|
43
|
-
/>
|
|
44
|
-
</q-popup-proxy>
|
|
45
|
-
</div>
|
|
46
|
-
<div> </div>
|
|
47
|
-
<div id="end-time" class="k-datetime text-body2">
|
|
48
|
-
{{ formattedEndTime }}
|
|
49
|
-
<q-tooltip>{{ $t('KAbsoluteTimeRange.PICK_END_TIME_LABEL') }}</q-tooltip>
|
|
50
|
-
<q-popup-proxy ref="popup" transition-show="scale" transition-hide="scale">
|
|
51
|
-
<q-time
|
|
52
|
-
id="end-time-popup"
|
|
53
|
-
v-model="endTime"
|
|
54
|
-
:mask="hourFormat"
|
|
55
|
-
:options="checkEndTime"
|
|
56
|
-
@update:model-value="onTimeRangeChanged"
|
|
57
|
-
/>
|
|
58
|
-
</q-popup-proxy>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
2
|
+
<KDateTimeRange
|
|
3
|
+
v-model="dateTimeRangeModel"
|
|
4
|
+
:options="dateTimeRangeOptions"
|
|
5
|
+
:min="props.min"
|
|
6
|
+
:max="props.max"
|
|
7
|
+
:dense="props.dense"
|
|
8
|
+
:disabled="props.disabled"
|
|
9
|
+
/>
|
|
61
10
|
</template>
|
|
62
11
|
|
|
63
|
-
<script>
|
|
64
|
-
import
|
|
12
|
+
<script setup>
|
|
13
|
+
import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
|
|
14
|
+
import KDateTimeRange from './KDateTimeRange.vue'
|
|
15
|
+
import { Events } from '../../events'
|
|
65
16
|
import { Time } from '../../time'
|
|
17
|
+
import moment from 'moment'
|
|
66
18
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
function toQuasarTime (date) {
|
|
76
|
-
return Time.convertToLocal(date).format(hourFormat)
|
|
77
|
-
}
|
|
78
|
-
// Convert from quasar format in local time zone to moment date/time
|
|
79
|
-
function fromQuasarDate (date, format) {
|
|
80
|
-
return (Time.getFormatTimezone()
|
|
81
|
-
? moment.tz(date, format, Time.getFormatTimezone())
|
|
82
|
-
: moment(date, format))
|
|
83
|
-
}
|
|
84
|
-
function fromQuasarTime (time, format) {
|
|
85
|
-
return (Time.getFormatTimezone()
|
|
86
|
-
? moment.tz(time, format, Time.getFormatTimezone())
|
|
87
|
-
: moment(time, format))
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default {
|
|
91
|
-
name: 'k-absolute-time-range',
|
|
92
|
-
props: {
|
|
93
|
-
dense: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: false
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
data () {
|
|
99
|
-
const { start, end } = Time.getRange()
|
|
100
|
-
return {
|
|
101
|
-
dateFormat,
|
|
102
|
-
hourFormat,
|
|
103
|
-
checkDateFormat,
|
|
104
|
-
startDate: toQuasarDate(start),
|
|
105
|
-
startTime: toQuasarTime(start),
|
|
106
|
-
endDate: toQuasarDate(end),
|
|
107
|
-
endTime: toQuasarTime(end)
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
min: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: () => null,
|
|
23
|
+
validator: (value) => {
|
|
24
|
+
if (value) return moment(value).isValid()
|
|
25
|
+
return true
|
|
108
26
|
}
|
|
109
27
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return
|
|
116
|
-
},
|
|
117
|
-
formattedStartDate () {
|
|
118
|
-
return Time.format(this.start, 'date.short')
|
|
119
|
-
},
|
|
120
|
-
formattedStartTime () {
|
|
121
|
-
return Time.format(this.start, 'time.long')
|
|
122
|
-
},
|
|
123
|
-
end () {
|
|
124
|
-
const date = fromQuasarDate(this.endDate, this.dateFormat)
|
|
125
|
-
const time = fromQuasarTime(this.endTime, this.hourFormat)
|
|
126
|
-
date.set({ hour: time.hour(), minute: time.minute() })
|
|
127
|
-
return date.utc()
|
|
128
|
-
},
|
|
129
|
-
formattedEndDate () {
|
|
130
|
-
return Time.format(this.end, 'date.short')
|
|
131
|
-
},
|
|
132
|
-
formattedEndTime () {
|
|
133
|
-
return Time.format(this.end, 'time.long')
|
|
28
|
+
max: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: () => null,
|
|
31
|
+
validator: (value) => {
|
|
32
|
+
if (value) return moment(value).isValid()
|
|
33
|
+
return true
|
|
134
34
|
}
|
|
135
35
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const time = fromQuasarTime(this.startTime, this.hourFormat)
|
|
140
|
-
date.set({ hour: time.hour(), minute: time.minute() })
|
|
141
|
-
return date.utc().isBefore(this.end)
|
|
142
|
-
},
|
|
143
|
-
checkStartTime (hour, minute) {
|
|
144
|
-
const date = fromQuasarDate(this.startDate, this.dateFormat)
|
|
145
|
-
date.set({ hour, minute })
|
|
146
|
-
return date.utc().isBefore(this.end)
|
|
147
|
-
},
|
|
148
|
-
checkEndDate (date) {
|
|
149
|
-
date = fromQuasarDate(date, this.checkDateFormat)
|
|
150
|
-
const time = fromQuasarTime(this.endTime, this.hourFormat)
|
|
151
|
-
date.set({ hour: time.hour(), minute: time.minute() })
|
|
152
|
-
return date.utc().isAfter(this.start)
|
|
153
|
-
},
|
|
154
|
-
checkEndTime (hour, minute) {
|
|
155
|
-
const date = fromQuasarDate(this.endDate, this.dateFormat)
|
|
156
|
-
date.set({ hour, minute })
|
|
157
|
-
return date.utc().isAfter(this.start)
|
|
158
|
-
},
|
|
159
|
-
onTimeRangeChanged () {
|
|
160
|
-
Time.patchRange({ start: this.start, end: this.end })
|
|
161
|
-
},
|
|
162
|
-
onTimeRangeUpdated () {
|
|
163
|
-
const { start, end } = Time.getRange()
|
|
164
|
-
this.startDate = toQuasarDate(start)
|
|
165
|
-
this.startTime = toQuasarTime(start)
|
|
166
|
-
this.endDate = toQuasarDate(end)
|
|
167
|
-
this.endTime = toQuasarTime(end)
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
created () {
|
|
171
|
-
this.$events.on('time-range-changed', () => this.onTimeRangeUpdated())
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
172
39
|
},
|
|
173
|
-
|
|
174
|
-
|
|
40
|
+
dense: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
175
43
|
}
|
|
176
|
-
}
|
|
177
|
-
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
// Data
|
|
47
|
+
const { start, end } = Time.getRange()
|
|
48
|
+
const dateTimeRangeModel = ref({
|
|
49
|
+
start: start.toISOString(),
|
|
50
|
+
end: end.toISOString()
|
|
51
|
+
})
|
|
52
|
+
const dateTimeRangeOptions = ref({
|
|
53
|
+
separator: '-',
|
|
54
|
+
date: {
|
|
55
|
+
format: 'DD/MM/YYYY'
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
// Watch
|
|
60
|
+
watch(dateTimeRangeModel, (newDateTimeRange, oldDateTimeRange) => {
|
|
61
|
+
Time.patchRange({
|
|
62
|
+
start: moment(newDateTimeRange.start),
|
|
63
|
+
end: moment(newDateTimeRange.end)
|
|
64
|
+
})
|
|
65
|
+
})
|
|
178
66
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
67
|
+
// Functions
|
|
68
|
+
function onTimeRangeUpdated () {
|
|
69
|
+
const { start, end } = Time.getRange()
|
|
70
|
+
dateTimeRangeModel.value = {
|
|
71
|
+
start: start.toISOString(),
|
|
72
|
+
end: end.toISOString()
|
|
182
73
|
}
|
|
183
|
-
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Hooks
|
|
77
|
+
onMounted(() => {
|
|
78
|
+
Events.on('time-range-changed', onTimeRangeUpdated)
|
|
79
|
+
})
|
|
80
|
+
onBeforeUnmount(() => {
|
|
81
|
+
Events.off('time-range-changed', onTimeRangeUpdated)
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
@@ -4,8 +4,8 @@ import { ref, shallowRef, readonly, onBeforeUnmount } from 'vue'
|
|
|
4
4
|
import { useStore } from './store.js'
|
|
5
5
|
import { useSelection } from './selection.js'
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const CurrentActivity = shallowRef(null)
|
|
8
|
+
const CurrentActivityName = ref(null)
|
|
9
9
|
|
|
10
10
|
export function useActivity (name, options = {}) {
|
|
11
11
|
_.defaults(options, { selection: true })
|
|
@@ -18,9 +18,9 @@ export function useActivity (name, options = {}) {
|
|
|
18
18
|
|
|
19
19
|
// functions
|
|
20
20
|
function setCurrentActivity (activity) {
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (CurrentActivity.value === activity) return
|
|
22
|
+
CurrentActivityName.value = activity ? name : null
|
|
23
|
+
CurrentActivity.value = activity
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// expose
|
|
@@ -31,7 +31,7 @@ export function useActivity (name, options = {}) {
|
|
|
31
31
|
}
|
|
32
32
|
if (options.selection) {
|
|
33
33
|
Object.assign(expose, {
|
|
34
|
-
...useSelection(
|
|
34
|
+
...useSelection(name)
|
|
35
35
|
})
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -46,12 +46,14 @@ export function useCurrentActivity (options = {}) {
|
|
|
46
46
|
|
|
47
47
|
// expose
|
|
48
48
|
const expose = {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
CurrentActivity: readonly(CurrentActivity),
|
|
50
|
+
kActivity: readonly(CurrentActivity),
|
|
51
|
+
CurrentActivityName: readonly(CurrentActivityName),
|
|
52
|
+
kActivityName: readonly(CurrentActivityName)
|
|
51
53
|
}
|
|
52
|
-
if (
|
|
53
|
-
const activityState = useStore(`store.${
|
|
54
|
-
const activityOptions = useStore(`store.${
|
|
54
|
+
if (CurrentActivityName.value) {
|
|
55
|
+
const activityState = useStore(`store.${CurrentActivityName.value}.state`)
|
|
56
|
+
const activityOptions = useStore(`store.${CurrentActivityName.value}.options`)
|
|
55
57
|
|
|
56
58
|
Object.assign(expose, {
|
|
57
59
|
state: activityState.store,
|
|
@@ -59,7 +61,7 @@ export function useCurrentActivity (options = {}) {
|
|
|
59
61
|
})
|
|
60
62
|
if (options.selection) {
|
|
61
63
|
Object.assign(expose, {
|
|
62
|
-
...useSelection(
|
|
64
|
+
...useSelection(CurrentActivityName.value)
|
|
63
65
|
})
|
|
64
66
|
}
|
|
65
67
|
}
|
|
@@ -20,7 +20,7 @@ export function useCollection (options) {
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
// Data
|
|
23
|
-
const items = ref(
|
|
23
|
+
const items = ref(null)
|
|
24
24
|
const nbTotalItems = ref(0)
|
|
25
25
|
const currentPage = ref(1)
|
|
26
26
|
let itemListener = null
|
|
@@ -118,6 +118,8 @@ export function useCollection (options) {
|
|
|
118
118
|
}, options.refreshThrottle.value, { leading: false })
|
|
119
119
|
|
|
120
120
|
function resetCollection () {
|
|
121
|
+
// Do not reset the collection since it is initializing
|
|
122
|
+
if (_.isNil(items.value)) return
|
|
121
123
|
// Reset pagination and start again refreshing the collection
|
|
122
124
|
if (options.appendItems.value) setCollectionItems([])
|
|
123
125
|
currentPage.value = 1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import logger from 'loglevel'
|
|
3
|
+
import { ref, watchEffect, onBeforeMount, onBeforeUnmount } from 'vue'
|
|
4
|
+
import { api } from '../api.js'
|
|
5
|
+
|
|
6
|
+
export function useCounter (options) {
|
|
7
|
+
logger.trace(`[KDK] Counter created with options ${options}`)
|
|
8
|
+
|
|
9
|
+
// Data
|
|
10
|
+
const counter = ref(0)
|
|
11
|
+
|
|
12
|
+
// Watch
|
|
13
|
+
watchEffect(() => refresh())
|
|
14
|
+
|
|
15
|
+
// Functions
|
|
16
|
+
function getService () {
|
|
17
|
+
const service = api.getService(options.service.value, options.contextId ? options.contextId.value : null)
|
|
18
|
+
if (!service) {
|
|
19
|
+
throw new Error('[KDK] Cannot retrieve target service ' + options.service.value)
|
|
20
|
+
}
|
|
21
|
+
return service
|
|
22
|
+
}
|
|
23
|
+
function getBaseQuery () {
|
|
24
|
+
return options.baseQuery ? options.baseQuery.value : {}
|
|
25
|
+
}
|
|
26
|
+
function getFilterQuery () {
|
|
27
|
+
return options.filterQuery ? options.filterQuery.value : {}
|
|
28
|
+
}
|
|
29
|
+
async function refresh () {
|
|
30
|
+
const query = _.merge(getBaseQuery(), getFilterQuery(), { $limit: 0 })
|
|
31
|
+
logger.trace(`[KDK] Count service ${options.service.value} with query ${query}`)
|
|
32
|
+
const response = await getService().find({ query })
|
|
33
|
+
counter.value = response.total
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Hooks
|
|
37
|
+
onBeforeMount(async () => {
|
|
38
|
+
const service = getService()
|
|
39
|
+
service.on('created', refresh)
|
|
40
|
+
service.on('removed', refresh)
|
|
41
|
+
})
|
|
42
|
+
onBeforeUnmount(() => {
|
|
43
|
+
const service = getService()
|
|
44
|
+
service.off('created', refresh)
|
|
45
|
+
service.off('removed', refresh)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
counter
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './activity.js'
|
|
2
2
|
export * from './collection.js'
|
|
3
|
+
export * from './counter.js'
|
|
3
4
|
export * from './layout.js'
|
|
5
|
+
export * from './messages.js'
|
|
4
6
|
export * from './pwa.js'
|
|
5
7
|
export * from './session.js'
|
|
6
8
|
export * from './schema.js'
|
|
9
|
+
export * from './screen.js'
|
|
7
10
|
export * from './selection.js'
|
|
8
11
|
export * from './store.js'
|
|
9
12
|
export * from './version.js'
|
|
@@ -4,9 +4,12 @@ export function useLayout () {
|
|
|
4
4
|
|
|
5
5
|
// functions
|
|
6
6
|
function configureLayout (configuration, context) {
|
|
7
|
+
if (configuration.view) Layout.setView(configuration.view)
|
|
8
|
+
if (configuration.padding) Layout.setPadding(configuration.padding)
|
|
7
9
|
if (configuration.header) Layout.setHeader(configuration.header, context)
|
|
8
10
|
if (configuration.footer) Layout.setFooter(configuration.footer, context)
|
|
9
11
|
if (configuration.page) Layout.setPage(configuration.page, context)
|
|
12
|
+
if (configuration.stickies) Layout.setStickies(configuration.stickies, context)
|
|
10
13
|
if (configuration.fab) Layout.setFab(configuration.fab, context)
|
|
11
14
|
Layout.placements.forEach(placement => {
|
|
12
15
|
if (_.has(configuration, `panes.${placement}`)) Layout.setPane(placement, _.get(configuration, `panes.${placement}`), context)
|
|
@@ -19,16 +22,23 @@ export function useLayout () {
|
|
|
19
22
|
if (configuration.bottomPane) Layout.setPane('bottom', configuration.bottomPane, context)
|
|
20
23
|
}
|
|
21
24
|
function clearLayout () {
|
|
25
|
+
Layout.clearFocus()
|
|
26
|
+
Layout.clearView()
|
|
27
|
+
Layout.clearPadding()
|
|
22
28
|
Layout.clearHeader()
|
|
23
29
|
Layout.clearFooter()
|
|
24
30
|
Layout.clearPage()
|
|
31
|
+
Layout.clearStickies()
|
|
25
32
|
Layout.clearFab()
|
|
26
33
|
Layout.placements.forEach(placement => {
|
|
27
34
|
Layout.clearPane(placement)
|
|
28
35
|
Layout.clearWindow(placement)
|
|
29
36
|
})
|
|
30
37
|
}
|
|
31
|
-
|
|
38
|
+
function setLayoutMode (mode) {
|
|
39
|
+
if (mode) Layout.setMode(mode)
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
// immediate
|
|
33
43
|
const additionalFunctions = {}
|
|
34
44
|
Layout.placements.forEach(placement => {
|
|
@@ -42,9 +52,10 @@ export function useLayout () {
|
|
|
42
52
|
|
|
43
53
|
// expose
|
|
44
54
|
return {
|
|
45
|
-
|
|
55
|
+
Layout,
|
|
46
56
|
configureLayout,
|
|
47
57
|
clearLayout,
|
|
58
|
+
setLayoutMode,
|
|
48
59
|
...additionalFunctions
|
|
49
60
|
}
|
|
50
61
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { api } from '../api.js'
|
|
2
|
+
|
|
3
|
+
export function useMessages (contextId) {
|
|
4
|
+
const messagesService = api.getService('messages', contextId)
|
|
5
|
+
|
|
6
|
+
// Functions
|
|
7
|
+
async function createMessage (message) {
|
|
8
|
+
return messagesService.create(message)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Expose
|
|
12
|
+
return {
|
|
13
|
+
createMessage
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -15,7 +15,7 @@ export function usePwa () {
|
|
|
15
15
|
|
|
16
16
|
// Functions
|
|
17
17
|
function install () {
|
|
18
|
-
if (window.matchMedia('(display-mode: standalone)').matches) return
|
|
18
|
+
if (config.buildMode !== 'pwa' || window.matchMedia('(display-mode: standalone)').matches) return
|
|
19
19
|
// Install prompt can be avoided, eg in tests
|
|
20
20
|
if (!LocalStorage.get(installKey, true)) return
|
|
21
21
|
// Take care of install prompt
|
|
@@ -16,19 +16,19 @@ export function useSchema () {
|
|
|
16
16
|
async function compile (schemaNameOrObject, propertiesFilter) {
|
|
17
17
|
if (typeof schemaNameOrObject === 'string') {
|
|
18
18
|
// load the schema file
|
|
19
|
-
logger.
|
|
19
|
+
logger.trace('[KDK] Loading schema ', schemaNameOrObject)
|
|
20
20
|
const schemaModule = await import(`@schemas/${schemaNameOrObject}.json`)
|
|
21
|
-
schema.value = schemaModule.default
|
|
21
|
+
schema.value = _.cloneDeep(schemaModule.default)
|
|
22
22
|
} else {
|
|
23
23
|
// clone the schema object
|
|
24
|
-
logger.
|
|
24
|
+
logger.trace('setting schema ', schemaNameOrObject.$id)
|
|
25
25
|
schema.value = _.cloneDeep(schemaNameOrObject)
|
|
26
26
|
}
|
|
27
27
|
// filter ther schema
|
|
28
28
|
if (propertiesFilter) {
|
|
29
29
|
let properties = propertiesFilter
|
|
30
30
|
if (typeof propertiesFilter === 'string') properties = _.split(propertiesFilter, ',')
|
|
31
|
-
logger.
|
|
31
|
+
logger.trace('[KDK] Filtering schema with ', properties)
|
|
32
32
|
_.forOwn(schema.value.properties, (value, key) => {
|
|
33
33
|
if (!properties.includes(key)) delete schema.value.properties[key]
|
|
34
34
|
})
|
|
@@ -38,12 +38,12 @@ export function useSchema () {
|
|
|
38
38
|
schema.value.required = _.intersection(schema.value.required, properties)
|
|
39
39
|
}
|
|
40
40
|
// compile the schema
|
|
41
|
-
logger.
|
|
41
|
+
logger.trace('[KDK] Compiling schema ', schema.value.$id)
|
|
42
42
|
validator.value = Schema.register(schema.value)
|
|
43
43
|
}
|
|
44
44
|
function validate (values) {
|
|
45
45
|
if (!validator.value) {
|
|
46
|
-
logger.error('validator not instantiated')
|
|
46
|
+
logger.error('[KDK] schema \'validator\' not instantiated')
|
|
47
47
|
return
|
|
48
48
|
}
|
|
49
49
|
const result = validator.value(values)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ref, watch, readonly } from 'vue'
|
|
2
|
+
import { useQuasar } from 'quasar'
|
|
3
|
+
import { Fullscreen, toggleFullscreen } from '../utils/utils.screen.js'
|
|
4
|
+
|
|
5
|
+
const Orientation = ref(null)
|
|
6
|
+
|
|
7
|
+
export function useScreen () {
|
|
8
|
+
// Data
|
|
9
|
+
const $q = useQuasar()
|
|
10
|
+
|
|
11
|
+
// Watch
|
|
12
|
+
watch(() => [$q.screen.width, $q.screen.height], () => {
|
|
13
|
+
Orientation.value = $q.screen.width >= $q.screen.height ? 'landscape' : 'portrait'
|
|
14
|
+
}, { immediate: true})
|
|
15
|
+
|
|
16
|
+
// Expose
|
|
17
|
+
return {
|
|
18
|
+
Screen: readonly($q.screen),
|
|
19
|
+
Orientation: readonly(Orientation),
|
|
20
|
+
Fullscreen: readonly(Fullscreen),
|
|
21
|
+
toggleFullscreen
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './v-hover.js'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getPlatform } from '../utils/utils.platform.js'
|
|
2
|
+
const Platform = getPlatform()
|
|
3
|
+
|
|
4
|
+
export const vHover = {
|
|
5
|
+
|
|
6
|
+
mounted (el, binding) {
|
|
7
|
+
if (Platform.touch) return
|
|
8
|
+
el.__vHoverEnter__ = binding.value.enter || (() => {})
|
|
9
|
+
el.__vHoverLeave__ = binding.value.leave || (() => {})
|
|
10
|
+
|
|
11
|
+
// Add Event Listeners
|
|
12
|
+
el.addEventListener('mouseover', el.__vHoverEnter__)
|
|
13
|
+
el.addEventListener('mouseleave', el.__vHoverLeave__)
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
beforeUnmount (el, binding) {
|
|
17
|
+
// Remove Event Listeners
|
|
18
|
+
el.removeEventListener('mouseover', el.__vHoverEnter__)
|
|
19
|
+
el.removeEventListener('mouseleave', el.__vHoverLeave__)
|
|
20
|
+
delete el.__vHoverEnter__
|
|
21
|
+
delete el.__vHoverLeave__
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import logger from 'loglevel'
|
|
3
|
+
import config from 'config'
|
|
4
|
+
import sanitize from 'sanitize-html'
|
|
5
|
+
import showdown from 'showdown'
|
|
6
|
+
import { i18n } from './i18n.js'
|
|
7
|
+
|
|
8
|
+
export const Document = {
|
|
9
|
+
initialize () {
|
|
10
|
+
this.options = _.get(config, 'document')
|
|
11
|
+
this.options = _.defaultsDeep(this.options, {
|
|
12
|
+
viewers: {
|
|
13
|
+
htm: 'document/KHtml',
|
|
14
|
+
html: 'document/KHtml',
|
|
15
|
+
md: 'document/KMarkdown',
|
|
16
|
+
pdf: 'document/KPdf',
|
|
17
|
+
jpg: 'document/KImage',
|
|
18
|
+
jpeg: 'document/KImage',
|
|
19
|
+
png: 'document/KImage'
|
|
20
|
+
},
|
|
21
|
+
htmlSanitizer: {
|
|
22
|
+
allowedTags: sanitize.defaults.allowedTags.concat(['img'])
|
|
23
|
+
},
|
|
24
|
+
mdConverter: {}
|
|
25
|
+
})
|
|
26
|
+
logger.debug('[KDK] Configuring documents with options:', this.options)
|
|
27
|
+
},
|
|
28
|
+
register (mimeTypes, viewer) {
|
|
29
|
+
if (!_.isArray(mimeTypes)) mimeTypes = [mimeTypes]
|
|
30
|
+
_.forEach(mimeTypes, mimeType => {
|
|
31
|
+
_.set(this.options, `viewers.${mimeType}`, viewer)
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
sanitizeHtml (html) {
|
|
35
|
+
if (_.isNil(html)) return null
|
|
36
|
+
return sanitize(html, this.options.htmlSanitizer)
|
|
37
|
+
},
|
|
38
|
+
convertMdToHtml (md) {
|
|
39
|
+
if (_.isNil(md)) return null
|
|
40
|
+
const converter = new showdown.Converter(this.options.mdConverter)
|
|
41
|
+
return converter.makeHtml(md)
|
|
42
|
+
},
|
|
43
|
+
async fetchUrl (url, localize) {
|
|
44
|
+
if (_.isEmpty(url)) return null
|
|
45
|
+
// localize the url if needed
|
|
46
|
+
let urls
|
|
47
|
+
if (localize) urls = i18n.localize(url)
|
|
48
|
+
else urls = [url]
|
|
49
|
+
// try to load the content
|
|
50
|
+
let response
|
|
51
|
+
for (const url of urls) {
|
|
52
|
+
try {
|
|
53
|
+
response = await fetch(url)
|
|
54
|
+
if (response.ok) return response
|
|
55
|
+
} catch (error) {
|
|
56
|
+
// ignore the error
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return null
|
|
60
|
+
}
|
|
61
|
+
}
|
package/core/client/exporter.js
CHANGED
|
@@ -9,7 +9,7 @@ import { i18n } from './i18n.js'
|
|
|
9
9
|
const ExporterQueue = {
|
|
10
10
|
initialize (maxConcurrentRequests) {
|
|
11
11
|
this.maxConcurrentRequests = maxConcurrentRequests
|
|
12
|
-
logger.debug(`[KDK]
|
|
12
|
+
logger.debug(`[KDK] Configuring exporter with '${maxConcurrentRequests}' maxConcurrentRequests`)
|
|
13
13
|
this.pendingRequests = []
|
|
14
14
|
this.runningRequests = []
|
|
15
15
|
this.exportService = api.getService('import-export')
|
package/core/client/filter.js
CHANGED
package/core/client/guards.js
CHANGED
|
@@ -63,7 +63,7 @@ export function permissionsGuard (user, to, from) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Guard based on route definition
|
|
66
|
-
export function
|
|
66
|
+
export function publicRouteGuard (user, to, from) {
|
|
67
67
|
// Retrieves routes corresponding to the destination
|
|
68
68
|
const matchedRoute = _.get(to, 'matched', [])
|
|
69
69
|
// Retrieves the last corresponding route
|