@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,28 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="
|
|
3
|
-
<
|
|
4
|
-
:
|
|
5
|
-
|
|
6
|
-
<KMarkdown v-if="contentType === 'md'"
|
|
7
|
-
:content="content"
|
|
8
|
-
:options="options"
|
|
2
|
+
<div v-if="viewer">
|
|
3
|
+
<component
|
|
4
|
+
:is="viewer"
|
|
5
|
+
v-bind="$props"
|
|
9
6
|
/>
|
|
10
7
|
</div>
|
|
11
8
|
</template>
|
|
12
9
|
|
|
13
10
|
<script setup>
|
|
14
11
|
import _ from 'lodash'
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import KHtml from './KHtml.vue'
|
|
19
|
-
import KMarkdown from './KMarkdown.vue'
|
|
12
|
+
import { computed } from 'vue'
|
|
13
|
+
import { Document } from '../../document.js'
|
|
14
|
+
import { loadComponent } from '../../utils'
|
|
20
15
|
|
|
21
16
|
// Props
|
|
22
17
|
const props = defineProps({
|
|
23
18
|
url: {
|
|
24
19
|
type: String,
|
|
25
|
-
default:
|
|
20
|
+
default: null
|
|
26
21
|
},
|
|
27
22
|
localize: {
|
|
28
23
|
type: Boolean,
|
|
@@ -34,50 +29,20 @@ const props = defineProps({
|
|
|
34
29
|
}
|
|
35
30
|
})
|
|
36
31
|
|
|
37
|
-
//
|
|
38
|
-
const
|
|
39
|
-
const
|
|
32
|
+
// Computed
|
|
33
|
+
const viewer = computed(() => {
|
|
34
|
+
const mimeType = guessMimeType()
|
|
35
|
+
if (!mimeType) return null
|
|
36
|
+
const viewer = _.get(Document.options, `viewers.${mimeType}`)
|
|
37
|
+
if (!viewer) return null
|
|
38
|
+
return loadComponent(viewer)
|
|
39
|
+
})
|
|
40
40
|
|
|
41
41
|
// Function
|
|
42
|
-
function
|
|
42
|
+
function guessMimeType () {
|
|
43
|
+
if (!props.url) return null
|
|
43
44
|
const index = _.lastIndexOf(props.url, '.')
|
|
44
|
-
if (index)
|
|
45
|
-
|
|
46
|
-
}
|
|
45
|
+
if (!index) return null
|
|
46
|
+
return props.url.substring(index + 1)
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
// Watch
|
|
50
|
-
watch(() => props.url, async (value) => {
|
|
51
|
-
if (!_.isEmpty(props.url)) {
|
|
52
|
-
content.value = null
|
|
53
|
-
// guess content type
|
|
54
|
-
contentType.value = guessContentType()
|
|
55
|
-
if (contentType.value) {
|
|
56
|
-
let urls
|
|
57
|
-
// localize file if needed
|
|
58
|
-
if (props.localize) urls = i18n.localize(props.url)
|
|
59
|
-
else urls = [props.url]
|
|
60
|
-
// try to load the content
|
|
61
|
-
let response
|
|
62
|
-
for (const url of urls) {
|
|
63
|
-
try {
|
|
64
|
-
response = await fetch(url)
|
|
65
|
-
if (response.ok) {
|
|
66
|
-
content.value = await response.text()
|
|
67
|
-
break
|
|
68
|
-
}
|
|
69
|
-
} catch (error) {
|
|
70
|
-
// ignore the error
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (content.value === null) {
|
|
74
|
-
logger.error(`[KDK] fetch '${props.url}' failed with error with code: ${response.status}`)
|
|
75
|
-
}
|
|
76
|
-
} else {
|
|
77
|
-
logger.error(`[KDK] cannot guess content type for '${props.url}'`)
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
content.value = null
|
|
81
|
-
}
|
|
82
|
-
}, { immediate: true })
|
|
83
48
|
</script>
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
v-if="html"
|
|
4
|
+
v-html="html"
|
|
5
|
+
/>
|
|
3
6
|
</template>
|
|
4
7
|
|
|
5
8
|
<script setup>
|
|
6
9
|
import { ref, watch } from 'vue'
|
|
7
|
-
|
|
8
|
-
// Data
|
|
9
|
-
const html = ref(null)
|
|
10
|
+
import { Document } from '../../document.js'
|
|
10
11
|
|
|
11
12
|
// Props
|
|
12
13
|
const props = defineProps({
|
|
13
|
-
|
|
14
|
+
url: {
|
|
14
15
|
type: String,
|
|
15
16
|
default: null
|
|
17
|
+
},
|
|
18
|
+
localize: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
16
21
|
}
|
|
17
22
|
})
|
|
18
23
|
|
|
24
|
+
// Data
|
|
25
|
+
const html = ref(null)
|
|
26
|
+
|
|
19
27
|
// Watch
|
|
20
|
-
watch(() => props.
|
|
21
|
-
|
|
28
|
+
watch(() => props.url, async (value) => {
|
|
29
|
+
const response = await Document.fetchUrl(value, props.localize)
|
|
30
|
+
if (response?.ok) html.value = Document.sanitizeHtml(await response.text())
|
|
31
|
+
else html.value = null
|
|
22
32
|
}, { immediate: true })
|
|
23
33
|
</script>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="interactive === true" class="fit" >
|
|
4
|
+
<pinch-zoom class="pinch-zoom-controller fit row justify-center items-center" @change="$emit('image-transformed')">
|
|
5
|
+
<img :src="url" class="fit" :onload="onLoaded" />
|
|
6
|
+
</pinch-zoom>
|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
<div v-else class="fit row justify-center items-center">
|
|
10
|
+
<img :src="url" class="fit" :onload="onLoaded" />
|
|
11
|
+
</div>
|
|
12
|
+
<q-spinner
|
|
13
|
+
class="absolute-center"
|
|
14
|
+
v-if="loading"
|
|
15
|
+
color="white"
|
|
16
|
+
size="3em"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import _ from 'lodash'
|
|
23
|
+
import { ref, computed, onMounted } from 'vue'
|
|
24
|
+
import 'pinch-zoom-element/dist/pinch-zoom.js'
|
|
25
|
+
|
|
26
|
+
// Props
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
url: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ''
|
|
31
|
+
},
|
|
32
|
+
options: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => {
|
|
35
|
+
return {
|
|
36
|
+
interactive: true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// Emit
|
|
43
|
+
defineEmits(['image-transformed'])
|
|
44
|
+
|
|
45
|
+
// Data
|
|
46
|
+
const loading = ref(true)
|
|
47
|
+
|
|
48
|
+
// Computed
|
|
49
|
+
const interactive = computed(() => {
|
|
50
|
+
return _.get(props.options, 'interactive', true)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// Functions
|
|
54
|
+
function restore () {
|
|
55
|
+
const controller = document.querySelector('.pinch-zoom-controller')
|
|
56
|
+
if (controller) {
|
|
57
|
+
controller.setTransform({
|
|
58
|
+
scale: 1,
|
|
59
|
+
x: 0,
|
|
60
|
+
y: 0,
|
|
61
|
+
allowChangeEvent: true
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function onLoaded () {
|
|
66
|
+
loading.value = false
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Hooks
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
restore()
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
// Expose
|
|
75
|
+
defineExpose({
|
|
76
|
+
restore
|
|
77
|
+
})
|
|
78
|
+
</script>
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div
|
|
3
3
|
v-if="html"
|
|
4
|
-
|
|
4
|
+
v-html="html"
|
|
5
5
|
/>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
9
|
import { ref, watch } from 'vue'
|
|
10
|
-
import
|
|
11
|
-
import KHtml from './KHtml.vue'
|
|
10
|
+
import { Document } from '../../document.js'
|
|
12
11
|
|
|
13
12
|
// Props
|
|
14
13
|
const props = defineProps({
|
|
15
|
-
|
|
14
|
+
url: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: null
|
|
18
17
|
},
|
|
19
|
-
|
|
20
|
-
type:
|
|
21
|
-
default:
|
|
18
|
+
localize: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
22
21
|
}
|
|
23
22
|
})
|
|
24
23
|
|
|
@@ -26,12 +25,9 @@ const props = defineProps({
|
|
|
26
25
|
const html = ref(null)
|
|
27
26
|
|
|
28
27
|
// Watch
|
|
29
|
-
watch(() =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} else {
|
|
34
|
-
html.value = null
|
|
35
|
-
}
|
|
28
|
+
watch(() => props.url, async (value) => {
|
|
29
|
+
const response = await Document.fetchUrl(value, props.localize)
|
|
30
|
+
if (response?.ok) html.value = Document.sanitizeHtml(Document.convertMdToHtml(await response.text()))
|
|
31
|
+
else html.value = null
|
|
36
32
|
}, { immediate: true })
|
|
37
33
|
</script>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
id="viewer"
|
|
4
|
+
class="fit"
|
|
5
|
+
/>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import _ from 'lodash'
|
|
10
|
+
import { watch, onMounted } from 'vue'
|
|
11
|
+
import { Viewer } from '@pdfme/ui'
|
|
12
|
+
import { Document } from '../../document.js'
|
|
13
|
+
|
|
14
|
+
// Props
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
url: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
20
|
+
localize: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
},
|
|
24
|
+
options: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => {
|
|
27
|
+
return {
|
|
28
|
+
schemas: [],
|
|
29
|
+
inputs: [{ fake: 'fake' }]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// Data
|
|
36
|
+
const defaultSchemas = []
|
|
37
|
+
const defaultInputs = [{ fake: 'fake' }]
|
|
38
|
+
let domViewer
|
|
39
|
+
let viewer
|
|
40
|
+
|
|
41
|
+
// Watch
|
|
42
|
+
watch(() => props.url, async (value) => {
|
|
43
|
+
if (viewer) {
|
|
44
|
+
viewer.destroy()
|
|
45
|
+
viewer = null
|
|
46
|
+
}
|
|
47
|
+
const response = await Document.fetchUrl(value, props.localize)
|
|
48
|
+
if (response?.ok) {
|
|
49
|
+
const blob = await response.blob()
|
|
50
|
+
const reader = new FileReader()
|
|
51
|
+
reader.onloadend = () => {
|
|
52
|
+
viewer = new Viewer({
|
|
53
|
+
domContainer: domViewer,
|
|
54
|
+
template: {
|
|
55
|
+
basePdf: reader.result,
|
|
56
|
+
schemas: _.get(props.options, 'schemas', defaultSchemas)
|
|
57
|
+
},
|
|
58
|
+
inputs: _.get(props.options, 'inputs', defaultInputs)
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
reader.readAsDataURL(blob)
|
|
62
|
+
}
|
|
63
|
+
}, { immediate: true })
|
|
64
|
+
|
|
65
|
+
// Hook
|
|
66
|
+
onMounted(() => {
|
|
67
|
+
domViewer = document.getElementById('viewer')
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@rejected="onFileRejected">
|
|
32
32
|
<!-- Helper -->
|
|
33
33
|
<template v-if="hasHelper" v-slot:append>
|
|
34
|
-
<
|
|
34
|
+
<KAction
|
|
35
35
|
:id="properties.name + '-helper'"
|
|
36
36
|
:label="helperLabel"
|
|
37
37
|
:icon="helperIcon"
|
|
@@ -141,7 +141,7 @@ export default {
|
|
|
141
141
|
let context = _.get(this.properties, 'field.storage.context')
|
|
142
142
|
if (context) context = _.template(context)(Object.assign({}, { fileName: this.model.name }, object))
|
|
143
143
|
const query = _.get(this.properties, 'field.storage.uploadQuery')
|
|
144
|
-
logger.debug(`Uploading file ${this.model.name} with key ${this.model.key}`)
|
|
144
|
+
logger.debug(`[KDK] Uploading file ${this.model.name} with key ${this.model.key}`)
|
|
145
145
|
Storage.upload({
|
|
146
146
|
file: this.model.name,
|
|
147
147
|
type: this.model.type,
|
|
@@ -55,7 +55,9 @@ export default {
|
|
|
55
55
|
mixins: [baseField],
|
|
56
56
|
computed: {
|
|
57
57
|
options () {
|
|
58
|
-
|
|
58
|
+
let units = Units.getUnits(_.get(this.properties, 'field.quantity'))
|
|
59
|
+
const unitsFilter = _.get(this.properties, 'field.filter', [])
|
|
60
|
+
if (!_.isEmpty(unitsFilter)) units = _.filter(units, unit => _.includes(unitsFilter, unit.name))
|
|
59
61
|
return units.map(unit => {
|
|
60
62
|
// Check if we have a translation key or directly the label content
|
|
61
63
|
const label = _.get(unit, 'label', '')
|
|
@@ -15,11 +15,13 @@
|
|
|
15
15
|
<!-- Render a grid menu if the number of actions is higher than the expandable limit -->
|
|
16
16
|
<q-menu v-if="actions.length > expandableLimit" v-model="isOpened" ref="menu" persistent fit anchor="top left" self="bottom right">
|
|
17
17
|
<div class="q-pa-sm row" style="max-width: 50vw">
|
|
18
|
-
<template v-for="action in actions" :key="action.
|
|
18
|
+
<template v-for="action in actions" :key="action.id">
|
|
19
19
|
<div class="col-12 col-sm-6 col-md-4 col-lg-3 col-xl-2">
|
|
20
20
|
<KAction
|
|
21
|
+
color="primary"
|
|
21
22
|
v-bind="action"
|
|
22
23
|
renderer="item"
|
|
24
|
+
v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
|
|
23
25
|
@triggered="isOpened = false"
|
|
24
26
|
/>
|
|
25
27
|
</div>
|
|
@@ -28,10 +30,12 @@
|
|
|
28
30
|
</q-menu>
|
|
29
31
|
<!-- Render an expandable list of actions -->
|
|
30
32
|
<div v-else>
|
|
31
|
-
<template v-for="action in actions" :key="action.
|
|
33
|
+
<template v-for="action in actions" :key="action.id">
|
|
32
34
|
<KAction
|
|
35
|
+
color="primary"
|
|
33
36
|
v-bind="action"
|
|
34
37
|
renderer="fab-action"
|
|
38
|
+
v-on="action.on ? { [action.on.event]: action.on.listener } : {}"
|
|
35
39
|
:iconRight="actionsAlign === 'left' ? true : false"
|
|
36
40
|
/>
|
|
37
41
|
</template>
|
|
@@ -41,9 +45,11 @@
|
|
|
41
45
|
Render a non expandable fab if a single action is provided
|
|
42
46
|
-->
|
|
43
47
|
<KAction v-else-if="actions.length === 1"
|
|
48
|
+
color="primary"
|
|
44
49
|
v-bind="actions[0]"
|
|
45
50
|
size="1.15rem"
|
|
46
51
|
renderer="fab"
|
|
52
|
+
v-on="actions[0].on ? { [actions[0].on.event]: actions[0].on.listener } : {}"
|
|
47
53
|
/>
|
|
48
54
|
</div>
|
|
49
55
|
</template>
|
|
@@ -51,7 +57,6 @@
|
|
|
51
57
|
<script setup>
|
|
52
58
|
import _ from 'lodash'
|
|
53
59
|
import { ref, computed } from 'vue'
|
|
54
|
-
import { uid } from 'quasar'
|
|
55
60
|
import { Layout } from '../../layout'
|
|
56
61
|
import KAction from '../action/KAction.vue'
|
|
57
62
|
|
|
@@ -86,8 +91,6 @@ const icon = computed(() => {
|
|
|
86
91
|
return fab.icon || 'las la-ellipsis-v'
|
|
87
92
|
})
|
|
88
93
|
const actions = computed(() => {
|
|
89
|
-
// let fabActions = fab.mode ? fab.content[fab.mode] : fab.content
|
|
90
|
-
// if (!fabActions) return null
|
|
91
94
|
const actions = []
|
|
92
95
|
// Apply filtering
|
|
93
96
|
_.forEach(fab.components, (action) => {
|
|
@@ -96,11 +99,7 @@ const actions = computed(() => {
|
|
|
96
99
|
if (typeof isVisible === 'function') {
|
|
97
100
|
isVisible = isVisible()
|
|
98
101
|
}
|
|
99
|
-
if (isVisible)
|
|
100
|
-
action.uid = uid()
|
|
101
|
-
if (!action.color) action.color = 'primary'
|
|
102
|
-
actions.push(action)
|
|
103
|
-
}
|
|
102
|
+
if (isVisible) actions.push(action)
|
|
104
103
|
})
|
|
105
104
|
return actions
|
|
106
105
|
})
|
|
@@ -1,13 +1,48 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-layout
|
|
3
|
-
|
|
4
|
-
v-bind="layout.options"
|
|
3
|
+
:view="layout.view"
|
|
5
4
|
>
|
|
5
|
+
<!-- Left pane -->
|
|
6
|
+
<div v-if="hasLeftPaneComponents">
|
|
7
|
+
<q-page-sticky
|
|
8
|
+
v-if="leftPane.opener"
|
|
9
|
+
position="left"
|
|
10
|
+
:offset="[openerOffset, 0]"
|
|
11
|
+
class="k-left-pane-sticky"
|
|
12
|
+
>
|
|
13
|
+
<KOpener
|
|
14
|
+
id="left-opener"
|
|
15
|
+
v-model="isLeftPaneOpened"
|
|
16
|
+
position="left"
|
|
17
|
+
/>
|
|
18
|
+
</q-page-sticky>
|
|
19
|
+
<q-drawer
|
|
20
|
+
id="left-pane"
|
|
21
|
+
v-model="isLeftPaneOpened"
|
|
22
|
+
:width="leftPaneSize"
|
|
23
|
+
side="left"
|
|
24
|
+
overlay
|
|
25
|
+
:behavior="$q.platform.is.mobile ? 'mobile' : 'desktop'"
|
|
26
|
+
no-swipe-open
|
|
27
|
+
no-swipe-close
|
|
28
|
+
no-swipe-backdrop
|
|
29
|
+
>
|
|
30
|
+
<q-scroll-area class="fit">
|
|
31
|
+
<KPanel
|
|
32
|
+
id="left-panel"
|
|
33
|
+
:content="leftPane.components"
|
|
34
|
+
:mode="leftPane.mode"
|
|
35
|
+
:filter="leftPane.filter"
|
|
36
|
+
/>
|
|
37
|
+
</q-scroll-area>
|
|
38
|
+
</q-drawer>
|
|
39
|
+
</div>
|
|
6
40
|
<!-- Header -->
|
|
7
41
|
<q-header
|
|
8
|
-
v-if="
|
|
42
|
+
v-if="hasHeaderComponents"
|
|
9
43
|
v-model="isHeaderVisible"
|
|
10
44
|
>
|
|
45
|
+
<q-resize-observer @resize="onHeaderResized" />
|
|
11
46
|
<KPanel
|
|
12
47
|
id="header-panel"
|
|
13
48
|
:content="header.components"
|
|
@@ -17,9 +52,10 @@
|
|
|
17
52
|
</q-header>
|
|
18
53
|
<!-- Footer -->
|
|
19
54
|
<q-footer
|
|
20
|
-
v-if="
|
|
55
|
+
v-if="hasFooterComponents"
|
|
21
56
|
v-model="isFooterVisible"
|
|
22
57
|
>
|
|
58
|
+
<q-resize-observer @resize="onFooterResized" />
|
|
23
59
|
<KPanel
|
|
24
60
|
id="footer-panel"
|
|
25
61
|
:content="footer.components"
|
|
@@ -35,16 +71,24 @@
|
|
|
35
71
|
</template>
|
|
36
72
|
|
|
37
73
|
<script setup>
|
|
38
|
-
import
|
|
74
|
+
import _ from 'lodash'
|
|
75
|
+
import { ref, computed, watch } from 'vue'
|
|
76
|
+
import { computeResponsiveWidth } from '../../utils'
|
|
39
77
|
import { Layout } from '../../layout'
|
|
78
|
+
import KOpener from './KOpener.vue'
|
|
40
79
|
import KPanel from '../KPanel.vue'
|
|
41
80
|
|
|
42
81
|
// Data
|
|
43
82
|
const layout = Layout.get()
|
|
83
|
+
const leftPane = Layout.getPane('left')
|
|
44
84
|
const header = Layout.getHeader()
|
|
45
85
|
const footer = Layout.getFooter()
|
|
86
|
+
const openerOffset = ref(0)
|
|
46
87
|
|
|
47
|
-
//
|
|
88
|
+
// Computed
|
|
89
|
+
const hasHeaderComponents = computed(() => {
|
|
90
|
+
return !_.isEmpty(header.components)
|
|
91
|
+
})
|
|
48
92
|
const isHeaderVisible = computed({
|
|
49
93
|
get: function () {
|
|
50
94
|
return header.visible
|
|
@@ -53,6 +97,9 @@ const isHeaderVisible = computed({
|
|
|
53
97
|
Layout.setHeaderVisible(value)
|
|
54
98
|
}
|
|
55
99
|
})
|
|
100
|
+
const hasFooterComponents = computed(() => {
|
|
101
|
+
return !_.isEmpty(footer.components)
|
|
102
|
+
})
|
|
56
103
|
const isFooterVisible = computed({
|
|
57
104
|
get: function () {
|
|
58
105
|
return footer.visible
|
|
@@ -61,4 +108,55 @@ const isFooterVisible = computed({
|
|
|
61
108
|
Layout.setFooterVisible(value)
|
|
62
109
|
}
|
|
63
110
|
})
|
|
111
|
+
const hasLeftPaneComponents = computed(() => {
|
|
112
|
+
return !_.isEmpty(leftPane.components)
|
|
113
|
+
})
|
|
114
|
+
const leftPaneSize = computed(() => {
|
|
115
|
+
return computeResponsiveWidth(leftPane.sizes)
|
|
116
|
+
})
|
|
117
|
+
const isLeftPaneOpened = computed({
|
|
118
|
+
get: function () {
|
|
119
|
+
return leftPane.visible
|
|
120
|
+
},
|
|
121
|
+
set: function (value) {
|
|
122
|
+
Layout.setPaneVisible('left', value)
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
// Watch
|
|
127
|
+
watch(() => leftPane.visible, (visible) => {
|
|
128
|
+
if (visible) {
|
|
129
|
+
setTimeout(() => {
|
|
130
|
+
openerOffset.value = leftPaneSize.value
|
|
131
|
+
document.addEventListener('click', clickOutsideLeftPanelListener, true)
|
|
132
|
+
}, 100)
|
|
133
|
+
} else {
|
|
134
|
+
document.removeEventListener('click', clickOutsideLeftPanelListener, true)
|
|
135
|
+
openerOffset.value = 0
|
|
136
|
+
}
|
|
137
|
+
}, { immediate: true })
|
|
138
|
+
watch(leftPaneSize, () => {
|
|
139
|
+
if (openerOffset.value > 0) openerOffset.value = leftPaneSize.value
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
// Functions
|
|
143
|
+
function clickOutsideLeftPanelListener (event) {
|
|
144
|
+
const leftPanelElement = document.getElementById('left-panel')
|
|
145
|
+
if (leftPanelElement && leftPanelElement.contains(event.target)) return
|
|
146
|
+
const leftOpenerElement = document.getElementById('left-opener')
|
|
147
|
+
if (leftOpenerElement && leftOpenerElement.contains(event.target)) return
|
|
148
|
+
Layout.setPaneVisible('left', false)
|
|
149
|
+
}
|
|
150
|
+
function onHeaderResized (size) {
|
|
151
|
+
Layout.setElementSize('header', [size.width, size.height])
|
|
152
|
+
}
|
|
153
|
+
function onFooterResized (size) {
|
|
154
|
+
Layout.setElementSize('footer', [size.width, size.height])
|
|
155
|
+
}
|
|
64
156
|
</script>
|
|
157
|
+
|
|
158
|
+
<style lang="scss">
|
|
159
|
+
.k-left-pane-sticky {
|
|
160
|
+
z-index: v-bind('leftPane.zIndex');
|
|
161
|
+
}
|
|
162
|
+
</style>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
23
|
-
import { ref
|
|
23
|
+
import { ref } from 'vue'
|
|
24
24
|
import { useQuasar } from 'quasar'
|
|
25
25
|
|
|
26
26
|
// Props
|
|
@@ -47,27 +47,22 @@ const hasTouch = $q.platform.has.touch
|
|
|
47
47
|
const isHovered = ref(false)
|
|
48
48
|
const icon = ref(null)
|
|
49
49
|
|
|
50
|
-
// Computed
|
|
51
|
-
const isOpened = computed(() => {
|
|
52
|
-
return props.modelValue
|
|
53
|
-
})
|
|
54
|
-
|
|
55
50
|
// Functions
|
|
56
51
|
function onMouseOver () {
|
|
57
52
|
if (hasTouch) return
|
|
58
53
|
isHovered.value = true
|
|
59
54
|
switch (props.position) {
|
|
60
55
|
case 'left':
|
|
61
|
-
icon.value =
|
|
56
|
+
icon.value = props.modelValue ? 'las la-angle-left' : 'las la-angle-right'
|
|
62
57
|
break
|
|
63
58
|
case 'right':
|
|
64
|
-
icon.value =
|
|
59
|
+
icon.value = props.modelValue ? 'las la-angle-right' : 'las la-angle-left'
|
|
65
60
|
break
|
|
66
61
|
case 'top':
|
|
67
|
-
icon.value =
|
|
62
|
+
icon.value = props.modelValue ? 'las la-angle-up' : 'las la-angle-down'
|
|
68
63
|
break
|
|
69
64
|
default: // bottom
|
|
70
|
-
icon.value =
|
|
65
|
+
icon.value = props.modelValue ? 'las la-angle-down' : 'las la-angle-up'
|
|
71
66
|
}
|
|
72
67
|
}
|
|
73
68
|
function onMouseLeave () {
|
|
@@ -79,24 +74,24 @@ function onSwipe ({ evt, ...info }) {
|
|
|
79
74
|
if (!info && !info.direction) return
|
|
80
75
|
switch (props.position) {
|
|
81
76
|
case 'left':
|
|
82
|
-
if (info.direction === 'left' &&
|
|
83
|
-
if (info.direction === 'right' && !
|
|
77
|
+
if (info.direction === 'left' && props.modelValue) onClick()
|
|
78
|
+
if (info.direction === 'right' && !props.modelValue) onClick()
|
|
84
79
|
break
|
|
85
80
|
case 'right':
|
|
86
|
-
if (info.direction === 'left' && !
|
|
87
|
-
if (info.direction === 'right' &&
|
|
81
|
+
if (info.direction === 'left' && !props.modelValue) onClick()
|
|
82
|
+
if (info.direction === 'right' && props.modelValue) onClick()
|
|
88
83
|
break
|
|
89
84
|
case 'top':
|
|
90
|
-
if (info.direction === 'up' &&
|
|
91
|
-
if (info.direction === 'down' && !
|
|
85
|
+
if (info.direction === 'up' && props.modelValue) onClick()
|
|
86
|
+
if (info.direction === 'down' && !props.modelValue) onClick()
|
|
92
87
|
break
|
|
93
88
|
default: // bottom
|
|
94
|
-
if (info.direction === 'up' && !
|
|
95
|
-
if (info.direction === 'down' &&
|
|
89
|
+
if (info.direction === 'up' && !props.modelValue) onClick()
|
|
90
|
+
if (info.direction === 'down' && props.modelValue) onClick()
|
|
96
91
|
}
|
|
97
92
|
}
|
|
98
93
|
function onClick () {
|
|
99
|
-
emit('update:modelValue', !
|
|
94
|
+
emit('update:modelValue', !props.modelValue)
|
|
100
95
|
}
|
|
101
96
|
</script>
|
|
102
97
|
|