@kalisio/kdk 2.2.2 → 2.3.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 +1 -0
- package/.github/workflows/main.yaml +67 -0
- package/.gitmodules +3 -0
- package/README.md +1 -2
- package/core/api/hooks/hooks.query.js +15 -2
- package/core/api/marshall.js +35 -4
- package/core/client/api.js +1 -1
- package/core/client/components/KActivity.vue +73 -0
- package/core/client/components/KContent.vue +1 -1
- package/core/client/components/KSponsor.vue +2 -13
- package/core/client/components/account/KDeleteAccountManager.vue +1 -1
- package/core/client/components/account/KPasswordManager.vue +1 -1
- package/core/client/components/action/KAction.vue +294 -0
- package/core/client/components/action/KBugReportAction.vue +37 -0
- package/core/client/components/action/index.js +7 -0
- package/core/client/components/app/KAbout.vue +16 -63
- package/core/client/components/app/KPlatform.vue +1 -1
- package/core/client/components/app/KSettings.vue +14 -14
- package/core/client/components/app/KTour.vue +6 -8
- package/core/client/components/app/KWelcome.vue +1 -1
- package/core/client/components/app/index.js +4 -0
- package/core/client/components/chart/KDataTable.vue +40 -25
- package/core/client/components/chart/KTimeSeriesChart.vue +20 -12
- package/core/client/components/collection/KCard.vue +1 -1
- package/core/client/components/collection/KColumn.vue +1 -1
- package/core/client/components/collection/KFilter.vue +6 -1
- package/core/client/components/document/KDocument.vue +83 -0
- package/core/client/components/document/KHtml.vue +23 -0
- package/core/client/components/document/KMarkdown.vue +37 -0
- package/core/client/components/document/index.js +9 -0
- package/core/client/components/form/KForm.vue +5 -1
- package/core/client/components/form/KSelectField.vue +1 -1
- package/core/client/components/index.js +1 -4
- package/core/client/components/input/KOptionsChooser.vue +1 -1
- package/core/client/components/layout/KFab.vue +1 -1
- package/core/client/components/layout/KPage.vue +3 -2
- package/core/client/components/layout/KWindow.vue +1 -1
- package/core/client/components/media/KColorScale.vue +16 -6
- package/core/client/components/screen/KLoginScreen.vue +1 -1
- package/core/client/components/screen/KRegisterScreen.vue +1 -1
- package/core/client/components/team/KAddMember.vue +7 -7
- package/core/client/components/team/KGroupCard.vue +1 -1
- package/core/client/components/team/KMemberFilter.vue +1 -1
- package/core/client/components/team/KTagCard.vue +1 -1
- package/core/client/components/time/KRelativeTimeRanges.vue +1 -1
- package/core/client/components/time/KTimeControl.vue +1 -0
- package/core/client/components/tool/KExportTool.vue +1 -1
- package/core/client/composables/collection.js +1 -1
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/layout.js +50 -0
- package/core/client/composables/session.js +6 -0
- package/core/client/filter.js +9 -6
- package/core/client/guards.js +29 -6
- package/core/client/i18n/core_en.json +1 -1
- package/core/client/i18n/core_fr.json +1 -1
- package/core/client/i18n.js +14 -0
- package/core/client/layout.js +25 -14
- package/core/client/mixins/mixin.base-activity.js +16 -0
- package/core/client/services/index.js +27 -26
- package/core/client/services/local-settings.service.js +2 -3
- package/core/client/units.js +6 -1
- package/core/client/utils/index.js +3 -0
- package/core/client/utils/utils.actions.js +93 -0
- package/core/client/utils/utils.colors.js +1 -1
- package/core/client/utils/utils.data.js +22 -0
- package/core/client/utils/utils.shapes.js +16 -6
- 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 +778 -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 +304 -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 +161 -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 +502 -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 +499 -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/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 +491 -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 +778 -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 +304 -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 +161 -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 +502 -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 +499 -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/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 +491 -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 +316 -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 +11128 -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 +316 -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-137435-1719398750767-0.json +1 -0
- package/coverage/tmp/coverage-137447-1719398750752-0.json +1 -0
- package/coverage/tmp/coverage-137458-1719398750740-0.json +1 -0
- package/coverage/tmp/coverage-137470-1719398750728-0.json +1 -0
- package/coverage/tmp/coverage-137477-1719398750691-0.json +1 -0
- package/map/api/hooks/hooks.query.js +5 -2
- package/map/api/services/catalog/catalog.hooks.js +4 -5
- package/map/client/cesium/utils/index.js +2 -1
- package/map/client/cesium/utils/utils.cesium.js +8 -0
- package/map/client/cesium/utils/utils.features.js +2 -2
- package/map/client/cesium/utils/utils.style.js +19 -17
- package/map/client/components/KCompass.vue +25 -3
- package/map/client/components/KEditLayerData.vue +1 -1
- package/map/client/components/KPositionIndicator.vue +1 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +2 -2
- package/map/client/components/form/KDirectionField.vue +4 -0
- package/map/client/components/form/KOwsLayerField.vue +4 -4
- package/map/client/components/form/KOwsServiceField.vue +3 -4
- package/map/client/components/legend/KLegend.vue +13 -15
- package/map/client/components/tools/KGeolocateTool.vue +1 -1
- package/map/client/components/widget/KStackableTimeSeries.vue +3 -0
- package/map/client/composables/highlight.js +4 -1
- package/map/client/elevation-utils.js +2 -2
- package/map/client/i18n/map_en.json +3 -1
- package/map/client/i18n/map_fr.json +3 -1
- package/map/client/mixins/globe/mixin.base-globe.js +121 -80
- package/map/client/mixins/globe/mixin.file-layers.js +2 -2
- package/map/client/mixins/globe/mixin.geojson-layers.js +24 -19
- package/map/client/mixins/globe/mixin.globe-activity.js +3 -3
- package/map/client/mixins/globe/mixin.opendap-layers.js +3 -3
- package/map/client/mixins/globe/mixin.style.js +5 -5
- package/map/client/mixins/globe/mixin.tooltip.js +5 -3
- package/map/client/mixins/map/mixin.base-map.js +42 -4
- package/map/client/mixins/map/mixin.canvas-layers.js +0 -1
- package/map/client/mixins/map/mixin.geojson-layers.js +10 -5
- package/map/client/mixins/mixin.activity.js +2 -2
- package/map/client/mixins/mixin.feature-selection.js +7 -5
- package/map/client/mixins/mixin.levels.js +1 -1
- package/map/client/utils/utils.catalog.js +15 -0
- package/map/client/utils/utils.location.js +2 -1
- package/map/client/utils/utils.style.js +1 -1
- package/map/common/geotiff-grid-source.js +5 -3
- package/map/common/grid.js +2 -2
- package/map/common/meteo-model-grid-source.js +1 -1
- package/map/common/time-based-grid-source.js +1 -1
- package/map/common/wmts-utils.js +11 -11
- package/package.json +12 -8
- package/scripts/build_docs.sh +37 -0
- package/scripts/init_runner.sh +30 -0
- package/scripts/kash/.github/workflows/run_tests.yaml +33 -0
- package/scripts/kash/README.md +2 -0
- package/scripts/kash/kash.sh +1657 -0
- package/scripts/kash/scripts/run_tests.sh +151 -0
- package/scripts/run_tests.sh +48 -0
- package/scripts/setup_workspace.sh +42 -0
- package/test/api/core/hooks.test.js +31 -0
- 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-06-06.log +23 -0
- package/test/api/core/test-log-2024-06-26.log +25 -0
- package/test/api/map/grid-sources.test.js +3 -1
- package/test/api/map/hooks.test.js +58 -12
- 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/client/core/collection.js +2 -2
- package/test/client/core/dialogs.js +13 -0
- package/test/client/core/index.js +6 -5
- package/test/client/core/layout.js +1 -13
- package/test/client/core/runner.js +41 -20
- package/test/client/core/screens.js +6 -0
- package/test/client/core/utils.js +23 -19
- package/.travis.doc.sh +0 -8
- package/.travis.test.sh +0 -72
- package/core/client/components/KAction.vue +0 -393
- package/core/client/components/KBlock.vue +0 -67
- package/core/client/components/app/KTerms.vue +0 -41
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
options () {
|
|
88
88
|
let opts = _.map(_.get(this.properties, 'field.options', []), option => {
|
|
89
89
|
const label = this.$tie(_.get(option, 'label', ''))
|
|
90
|
-
return Object.assign({}, option, { label
|
|
90
|
+
return Object.assign({}, option, { label })
|
|
91
91
|
})
|
|
92
92
|
if (this.filter) {
|
|
93
93
|
opts = _.filter(opts, option => {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import KAction from './KAction.vue'
|
|
2
1
|
import KAvatar from './KAvatar.vue'
|
|
3
|
-
import KBlock from './KBlock.vue'
|
|
4
2
|
import KChip from './KChip.vue'
|
|
5
3
|
import KChipsPane from './KChipsPane.vue'
|
|
6
4
|
import KContent from './KContent.vue'
|
|
@@ -16,9 +14,7 @@ import KTextArea from './KTextArea.vue'
|
|
|
16
14
|
import KVersion from './KVersion.vue'
|
|
17
15
|
|
|
18
16
|
export {
|
|
19
|
-
KAction,
|
|
20
17
|
KAvatar,
|
|
21
|
-
KBlock,
|
|
22
18
|
KChip,
|
|
23
19
|
KChipsPane,
|
|
24
20
|
KContent,
|
|
@@ -34,6 +30,7 @@ export {
|
|
|
34
30
|
KVersion
|
|
35
31
|
}
|
|
36
32
|
|
|
33
|
+
export * from './action/index.js'
|
|
37
34
|
export * from './layout/index.js'
|
|
38
35
|
export * from './form/index.js'
|
|
39
36
|
export * from './collection/index.js'
|
|
@@ -178,7 +178,6 @@ const contentStyleFunction = computed(() => {
|
|
|
178
178
|
return {
|
|
179
179
|
paddingTop: `${topPadding.value}px`,
|
|
180
180
|
paddingBottom: `${bottomPadding.value}px`,
|
|
181
|
-
paddingRight: `${rightPadding.value}px`,
|
|
182
181
|
widht: `calc(100vw - ${widthOffset}px)`,
|
|
183
182
|
height: `calc(100vh - ${heightOffset}px)`
|
|
184
183
|
}
|
|
@@ -247,6 +246,7 @@ const fabBehaviour = computed(() => {
|
|
|
247
246
|
case 'top-left': return { direction: 'down', actionsAlign: 'right' }
|
|
248
247
|
}
|
|
249
248
|
})
|
|
249
|
+
|
|
250
250
|
// Watch
|
|
251
251
|
watch(() => leftPane.visible, (visible) => {
|
|
252
252
|
if (visible) {
|
|
@@ -260,7 +260,8 @@ watch(() => leftPane.visible, (visible) => {
|
|
|
260
260
|
|
|
261
261
|
// Functions
|
|
262
262
|
function layoutOffsetListener (offset) {
|
|
263
|
-
// Catch layout offset and returns default Quasar function
|
|
263
|
+
// Catch layout offset and returns default Quasar function. "offset" is a Number
|
|
264
|
+
// (pixels) that refers to the total height of header + footer that occupies on screen.
|
|
264
265
|
// see https://quasar.dev/layout/page#style-fn
|
|
265
266
|
layoutOffset.value = offset
|
|
266
267
|
return { minHeight: offset ? `calc(100vh - ${offset}px)` : '100vh' }
|
|
@@ -187,7 +187,7 @@ const headerControls = computed(() => {
|
|
|
187
187
|
visible: currentWindow.controls.unpin && currentWindow.state === 'pinned' && restoreGeometry,
|
|
188
188
|
handler: () => Layout.setWindowState(props.placement, 'floating')
|
|
189
189
|
}, {
|
|
190
|
-
id: `
|
|
190
|
+
id: `maximize-${props.placement}-window`,
|
|
191
191
|
icon: 'las la-expand',
|
|
192
192
|
size: 'sm',
|
|
193
193
|
tooltip: 'KWindow.MAXIMIZE_ACTION',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<canvas
|
|
5
5
|
class="k-color-scale"
|
|
6
6
|
:id="canvasId"
|
|
7
|
-
|
|
7
|
+
/>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -13,6 +13,7 @@ import _ from 'lodash'
|
|
|
13
13
|
import * as math from 'mathjs'
|
|
14
14
|
import { computed, watch, onMounted } from 'vue'
|
|
15
15
|
import { uid } from 'quasar'
|
|
16
|
+
import { Units } from '../../units.js'
|
|
16
17
|
import { buildColorScale } from '../../utils/utils.colors'
|
|
17
18
|
|
|
18
19
|
// props
|
|
@@ -33,6 +34,10 @@ const props = defineProps({
|
|
|
33
34
|
type: Array,
|
|
34
35
|
default: () => null
|
|
35
36
|
},
|
|
37
|
+
unit: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: undefined
|
|
40
|
+
},
|
|
36
41
|
layout: {
|
|
37
42
|
type: Object,
|
|
38
43
|
default: () => {
|
|
@@ -74,6 +79,11 @@ let expectedSize = null
|
|
|
74
79
|
const callRefresh = _.debounce(() => { refresh() }, 200)
|
|
75
80
|
|
|
76
81
|
// Computed
|
|
82
|
+
const labelText = computed(() => {
|
|
83
|
+
let text = props.label
|
|
84
|
+
if (text && props.unit) text += ` (${Units.getUnitSymbol(props.unit)})`
|
|
85
|
+
return text
|
|
86
|
+
})
|
|
77
87
|
const labelSize = computed(() => {
|
|
78
88
|
return _.get(props.layout, 'label.size', 12)
|
|
79
89
|
})
|
|
@@ -110,7 +120,7 @@ function formatTick (tick) {
|
|
|
110
120
|
return math.format(tick, props.layout.ticks.format)
|
|
111
121
|
}
|
|
112
122
|
function drawLabel () {
|
|
113
|
-
if (_.isNil(
|
|
123
|
+
if (_.isNil(labelText.value)) return
|
|
114
124
|
canvasContext.font = labelFont.value
|
|
115
125
|
canvasContext.fillStyle = labelColor.value
|
|
116
126
|
canvasContext.textAlign = labelAlign.value
|
|
@@ -124,7 +134,7 @@ function drawLabel () {
|
|
|
124
134
|
break
|
|
125
135
|
default:
|
|
126
136
|
}
|
|
127
|
-
canvasContext.fillText(
|
|
137
|
+
canvasContext.fillText(labelText.value, xLabel, labelSize.value)
|
|
128
138
|
}
|
|
129
139
|
function drawDiscreteHorizontalScale () {
|
|
130
140
|
drawLabel()
|
|
@@ -242,10 +252,10 @@ function onResized (size) {
|
|
|
242
252
|
if (canvas) callRefresh()
|
|
243
253
|
}
|
|
244
254
|
|
|
245
|
-
//
|
|
246
|
-
watch(props, () => { if (canvas)
|
|
255
|
+
// Watch
|
|
256
|
+
watch(props, () => { if (canvas) callRefresh() })
|
|
247
257
|
|
|
248
|
-
//
|
|
258
|
+
// Hooks
|
|
249
259
|
onMounted(() => {
|
|
250
260
|
canvas = document.getElementById(canvasId)
|
|
251
261
|
canvasContext = canvas.getContext('2d')
|
|
@@ -29,7 +29,7 @@ import { login } from '../../utils/utils.session.js'
|
|
|
29
29
|
import { verifyEmail } from '../../utils/utils.account.js'
|
|
30
30
|
import KScreen from './KScreen.vue'
|
|
31
31
|
import KForm from '../form/KForm.vue'
|
|
32
|
-
import KAction from '../KAction.vue'
|
|
32
|
+
import KAction from '../action/KAction.vue'
|
|
33
33
|
|
|
34
34
|
// Data
|
|
35
35
|
const $q = useQuasar()
|
|
@@ -27,7 +27,7 @@ import { useQuasar } from 'quasar'
|
|
|
27
27
|
import { i18n } from '../../i18n.js'
|
|
28
28
|
import KScreen from './KScreen.vue'
|
|
29
29
|
import KForm from '../form/KForm.vue'
|
|
30
|
-
import KAction from '../KAction.vue'
|
|
30
|
+
import KAction from '../action/KAction.vue'
|
|
31
31
|
|
|
32
32
|
// Data
|
|
33
33
|
const $q = useQuasar()
|
|
@@ -94,7 +94,7 @@ import { i18n } from '../../i18n.js'
|
|
|
94
94
|
import { RoleNames } from '../../../common/permissions'
|
|
95
95
|
import KModal from '../KModal.vue'
|
|
96
96
|
import KForm from '../form/KForm.vue'
|
|
97
|
-
import KAction from '../KAction.vue'
|
|
97
|
+
import KAction from '../action/KAction.vue'
|
|
98
98
|
|
|
99
99
|
export default {
|
|
100
100
|
emits: ['opened', 'closed'],
|
|
@@ -174,7 +174,7 @@ export default {
|
|
|
174
174
|
$id: 'http://kalisio.xyz/schemas/user-properties',
|
|
175
175
|
type: 'object',
|
|
176
176
|
properties: {
|
|
177
|
-
role
|
|
177
|
+
role
|
|
178
178
|
},
|
|
179
179
|
required: ['role']
|
|
180
180
|
}
|
|
@@ -184,8 +184,8 @@ export default {
|
|
|
184
184
|
$id: 'http://kalisio.xyz/schemas/user-properties',
|
|
185
185
|
type: 'object',
|
|
186
186
|
properties: {
|
|
187
|
-
name
|
|
188
|
-
role
|
|
187
|
+
name,
|
|
188
|
+
role
|
|
189
189
|
},
|
|
190
190
|
required: ['name', 'role']
|
|
191
191
|
}
|
|
@@ -282,9 +282,9 @@ export default {
|
|
|
282
282
|
const role = _.trim(fileRecord[2])
|
|
283
283
|
if (name.length > 2 && emailExpr.test(email) && RoleNames.includes(role)) {
|
|
284
284
|
const record = {
|
|
285
|
-
name
|
|
286
|
-
email
|
|
287
|
-
role
|
|
285
|
+
name,
|
|
286
|
+
email,
|
|
287
|
+
role
|
|
288
288
|
}
|
|
289
289
|
records.push(record)
|
|
290
290
|
} else {
|
|
@@ -29,7 +29,7 @@ import { baseItem } from '../../mixins'
|
|
|
29
29
|
import { findMembersOfGroup, getRoleForGroup, getRoleForOrganisation, Roles, RoleNames } from '../../../common/permissions'
|
|
30
30
|
import { KCard, KCardSection } from '../collection'
|
|
31
31
|
import KTextArea from '../KTextArea.vue'
|
|
32
|
-
import KAction from '../KAction.vue'
|
|
32
|
+
import KAction from '../action/KAction.vue'
|
|
33
33
|
|
|
34
34
|
export default {
|
|
35
35
|
name: 'k-group-card',
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { baseItem } from '../../mixins'
|
|
28
28
|
import { countMembersWithTag } from '../../../common/permissions'
|
|
29
29
|
import { KCard, KCardSection } from '../collection'
|
|
30
|
-
import KAction from '../KAction.vue'
|
|
30
|
+
import KAction from '../action/KAction.vue'
|
|
31
31
|
|
|
32
32
|
export default {
|
|
33
33
|
name: 'k-tag-card',
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
const start = moment(Time.getCurrentTime()).add(duration)
|
|
43
43
|
// Revert range if duration in past
|
|
44
44
|
if (duration.asMilliseconds() > 0) Time.patchRange({ start: end, end: start })
|
|
45
|
-
else Time.patchRange({ start
|
|
45
|
+
else Time.patchRange({ start, end })
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
created () {
|
|
@@ -70,6 +70,7 @@ import { useQuasar } from 'quasar'
|
|
|
70
70
|
import { Time } from '../../time.js'
|
|
71
71
|
import { Store } from '../../store.js'
|
|
72
72
|
import KDateTime from './KDateTime.vue'
|
|
73
|
+
import KAction from '../action/KAction.vue'
|
|
73
74
|
import SettingsSchema from '../../../common/schemas/settings.update.json'
|
|
74
75
|
|
|
75
76
|
// Data
|
|
@@ -119,7 +119,7 @@ export function useCollection (options) {
|
|
|
119
119
|
|
|
120
120
|
function resetCollection () {
|
|
121
121
|
// Reset pagination and start again refreshing the collection
|
|
122
|
-
setCollectionItems([])
|
|
122
|
+
if (options.appendItems.value) setCollectionItems([])
|
|
123
123
|
currentPage.value = 1
|
|
124
124
|
refreshCollection()
|
|
125
125
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Layout } from '../layout.js'
|
|
2
|
+
|
|
3
|
+
export function useLayout () {
|
|
4
|
+
|
|
5
|
+
// functions
|
|
6
|
+
function configureLayout (configuration, context) {
|
|
7
|
+
if (configuration.header) Layout.setHeader(configuration.header, context)
|
|
8
|
+
if (configuration.footer) Layout.setFooter(configuration.footer, context)
|
|
9
|
+
if (configuration.page) Layout.setPage(configuration.page, context)
|
|
10
|
+
if (configuration.fab) Layout.setFab(configuration.fab, context)
|
|
11
|
+
Layout.placements.forEach(placement => {
|
|
12
|
+
if (_.has(configuration, `panes.${placement}`)) Layout.setPane(placement, _.get(configuration, `panes.${placement}`), context)
|
|
13
|
+
if (_.has(configuration, `windows.${placement}`)) Layout.setWindow(placement, _.get(configuration, `windows.${placement}`), context)
|
|
14
|
+
})
|
|
15
|
+
// for backward compatibility
|
|
16
|
+
if (configuration.leftPane) Layout.setPane('left', configuration.leftPane, context)
|
|
17
|
+
if (configuration.rightPane) Layout.setPane('right', configuration.rightPane, context)
|
|
18
|
+
if (configuration.topPane) Layout.setPane('top', configuration.topPane, context)
|
|
19
|
+
if (configuration.bottomPane) Layout.setPane('bottom', configuration.bottomPane, context)
|
|
20
|
+
}
|
|
21
|
+
function clearLayout () {
|
|
22
|
+
Layout.clearHeader()
|
|
23
|
+
Layout.clearFooter()
|
|
24
|
+
Layout.clearPage()
|
|
25
|
+
Layout.clearFab()
|
|
26
|
+
Layout.placements.forEach(placement => {
|
|
27
|
+
Layout.clearPane(placement)
|
|
28
|
+
Layout.clearWindow(placement)
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// immediate
|
|
33
|
+
const additionalFunctions = {}
|
|
34
|
+
Layout.placements.forEach(placement => {
|
|
35
|
+
additionalFunctions[`set${_.upperFirst(placement)}Pane`] = (options, context) => { Layout.setPane(placement, options, context) }
|
|
36
|
+
additionalFunctions[`set${_.upperFirst(placement)}PaneMode`] = (mode) => { Layout.setPaneMode(placement, mode) }
|
|
37
|
+
additionalFunctions[`set${_.upperFirst(placement)}PaneFilter`] = (filter) => { Layout.setPaneFilter(placement, filter) }
|
|
38
|
+
additionalFunctions[`set${_.upperFirst(placement)}PaneVisible`] = (visible) => { Layout.setPaneVisible(placement, visible) }
|
|
39
|
+
additionalFunctions[`set${_.upperFirst(placement)}PaneOpener`] = (opener) => { Layout.setPaneOpener(placement, opener) }
|
|
40
|
+
additionalFunctions[`clear${_.upperFirst(placement)}Pane`] = () => { Layout.clearPane(placement) }
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// expose
|
|
44
|
+
return {
|
|
45
|
+
layout: Layout,
|
|
46
|
+
configureLayout,
|
|
47
|
+
clearLayout,
|
|
48
|
+
...additionalFunctions
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -13,6 +13,8 @@ import { restoreSession } from '../utils/utils.session.js'
|
|
|
13
13
|
|
|
14
14
|
export function useSession (options = {}) {
|
|
15
15
|
// Data
|
|
16
|
+
const disconnectKey = 'disconnect-dialog'
|
|
17
|
+
const reconnectKey = 'reconnect-dialog'
|
|
16
18
|
const router = useRouter()
|
|
17
19
|
const route = useRoute()
|
|
18
20
|
const $q = useQuasar()
|
|
@@ -77,6 +79,8 @@ export function useSession (options = {}) {
|
|
|
77
79
|
if (!pendingReconnection && !ignoreReconnectionError) {
|
|
78
80
|
Events.emit('disconnected')
|
|
79
81
|
logger.error(new Error('Socket has been disconnected'))
|
|
82
|
+
// Disconnect prompt can be avoided, eg in tests
|
|
83
|
+
if (!LocalStorage.get(disconnectKey, true)) return
|
|
80
84
|
// This will ensure any operation in progress will not keep a "dead" loading indicator
|
|
81
85
|
// as this error might appear under-the-hood without notifying service operations
|
|
82
86
|
Loading.hide()
|
|
@@ -118,6 +122,8 @@ export function useSession (options = {}) {
|
|
|
118
122
|
// Display it only the first time the reconnection occurs because multiple attempts will be tried
|
|
119
123
|
if (!pendingReload) {
|
|
120
124
|
Events.emit('reconnected')
|
|
125
|
+
// Reconnect prompt can be avoided, eg in tests
|
|
126
|
+
if (!LocalStorage.get(reconnectKey, true)) return
|
|
121
127
|
pendingReload = $q.dialog({
|
|
122
128
|
title: i18n.t('composables.session.INFORMATION'),
|
|
123
129
|
message: i18n.t('composables.session.RECONNECT'),
|
package/core/client/filter.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Filter = {
|
|
|
8
8
|
initialize () {
|
|
9
9
|
// This object is used to filter the activities based on a search pattern or on specific items
|
|
10
10
|
// The filter then builds the corresponding query
|
|
11
|
-
Store.set('filter', {
|
|
11
|
+
Store.set('filter', { fields: 'name', pattern: '', items: [], query: {} })
|
|
12
12
|
// Make filter react to external changes to update the query
|
|
13
13
|
Events.on('filter-changed', () => this.updateFilterQuery())
|
|
14
14
|
},
|
|
@@ -18,8 +18,10 @@ export const Filter = {
|
|
|
18
18
|
getItems () {
|
|
19
19
|
return Store.get('filter.items')
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
getFields () {
|
|
22
|
+
const fields = Store.get('filter.fields')
|
|
23
|
+
if (typeof fields === 'string') return [fields]
|
|
24
|
+
return fields
|
|
23
25
|
},
|
|
24
26
|
getPattern () {
|
|
25
27
|
return Store.get('filter.pattern')
|
|
@@ -28,17 +30,18 @@ export const Filter = {
|
|
|
28
30
|
return Store.get('filter.query')
|
|
29
31
|
},
|
|
30
32
|
clear () {
|
|
31
|
-
Store.patch('filter', {
|
|
33
|
+
Store.patch('filter', { fields: 'name', pattern: '', items: [], query: {} })
|
|
32
34
|
},
|
|
33
35
|
// Build query from filter pattern and/or items
|
|
34
36
|
updateFilterQuery () {
|
|
35
37
|
const query = {}
|
|
36
38
|
const pattern = this.getPattern()
|
|
37
|
-
const
|
|
39
|
+
const fields = this.getFields()
|
|
38
40
|
const items = this.getItems()
|
|
39
41
|
// Handle the pattern
|
|
40
42
|
if (pattern !== '') {
|
|
41
|
-
query[field]
|
|
43
|
+
query.$or = _.map(fields, field => { return { [field]: { $search: pattern } } })
|
|
44
|
+
console.log(query)
|
|
42
45
|
}
|
|
43
46
|
// Handle the selection
|
|
44
47
|
items.forEach(item => {
|
package/core/client/guards.js
CHANGED
|
@@ -14,22 +14,31 @@ let guards = []
|
|
|
14
14
|
export function authenticationGuard (user, to, from) {
|
|
15
15
|
// Specific case of OAuth provider routes
|
|
16
16
|
if (to.path.startsWith('/oauth/')) return true
|
|
17
|
+
|
|
17
18
|
// Routes accessible whatever the authentication state, eg public
|
|
18
|
-
if (_.get(to, 'meta.authenticated') && _.get(to, 'meta.unauthenticated')) {
|
|
19
|
+
if ((_.get(to, 'meta.authenticated') && _.get(to, 'meta.unauthenticated')) || _.get(to, 'meta.public')) {
|
|
20
|
+
// First, check the root route, since all routes are children of the root route
|
|
21
|
+
if (to.path === '/') return 'home'
|
|
22
|
+
// Allow the navigation
|
|
19
23
|
return true
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
// Only when authenticated, eg private
|
|
22
27
|
if (_.get(to, 'meta.authenticated')) {
|
|
23
28
|
// If the user is here then he is authenticated so let it go
|
|
24
29
|
if (user) return true
|
|
25
30
|
// Otherwise redirect to login
|
|
26
31
|
else return 'login'
|
|
27
|
-
}
|
|
28
|
-
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Only when not authenticated, eg reset password
|
|
35
|
+
if (_.get(to, 'meta.unauthenticated')) {
|
|
29
36
|
// If the user is here then he is authenticated so redirect to home
|
|
30
37
|
if (user) return 'home'
|
|
31
|
-
//
|
|
32
|
-
|
|
38
|
+
// If the user is not authenticated, handle the specific case of the root domain
|
|
39
|
+
if (to.path === '/') return 'login'
|
|
40
|
+
// Allow the navigation
|
|
41
|
+
return true
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
|
|
@@ -53,6 +62,20 @@ export function permissionsGuard (user, to, from) {
|
|
|
53
62
|
} else return true
|
|
54
63
|
}
|
|
55
64
|
|
|
65
|
+
// Guard based on route definition
|
|
66
|
+
export function routeGuard (user, to, from) {
|
|
67
|
+
// Retrieves routes corresponding to the destination
|
|
68
|
+
const matchedRoute = _.get(to, 'matched', [])
|
|
69
|
+
// Retrieves the last corresponding route
|
|
70
|
+
const lastMatchedRoute = matchedRoute[matchedRoute.length - 1]
|
|
71
|
+
// If the last matching route has the name 'not-found', this is a route capturing all unknown routes ('/:catchAll(.*)*')
|
|
72
|
+
if (lastMatchedRoute.name === 'not-found') return false
|
|
73
|
+
// If the only corresponding route is the index, it is managed by authenticationGuard
|
|
74
|
+
if (lastMatchedRoute.name === 'index') return false
|
|
75
|
+
// Allow the navigation
|
|
76
|
+
return true
|
|
77
|
+
}
|
|
78
|
+
|
|
56
79
|
// Guard routes for a given user, can be used as router navigation guard
|
|
57
80
|
// or as standard function. In this case next will not be used and you get the
|
|
58
81
|
// final result after running all registered guards: true, false or redirect route name
|
|
@@ -68,7 +91,7 @@ export function beforeGuard (to, from, next) {
|
|
|
68
91
|
// but redirection should be handled at the app level to avoid concurrence
|
|
69
92
|
// between both mechanisms. For this you can call the function without passing from/next arguments.
|
|
70
93
|
// next({ name: result })
|
|
71
|
-
return next(
|
|
94
|
+
return next({ name: result })
|
|
72
95
|
} else {
|
|
73
96
|
return result
|
|
74
97
|
}
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
"DOMAIN": "Hosted on",
|
|
426
426
|
"FLAVOR": "Flavor",
|
|
427
427
|
"VIEW_CHANGELOG": "Changlog",
|
|
428
|
-
"BUG_REPORT": "Report
|
|
428
|
+
"BUG_REPORT": "Report a bug",
|
|
429
429
|
"BUG_REPORT_SUBJECT": "[{appName}] Bug report - Client v{clientVersion} - API v{apiVersion}",
|
|
430
430
|
"BUG_REPORT_BODY": "Please detail your problem here%0D%0A%0D%0APlatform information to be kept%0D%0A%0D%0A",
|
|
431
431
|
"PLATFORM_INFO": "Platform information"
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
"DOMAIN": "Hébergé sur",
|
|
424
424
|
"FLAVOR": "Saveur",
|
|
425
425
|
"VIEW_CHANGELOG": "Historique des versions",
|
|
426
|
-
"BUG_REPORT": "
|
|
426
|
+
"BUG_REPORT": "Signaler un bug",
|
|
427
427
|
"BUG_REPORT_SUBJECT": "[{appName}] Rapport de bug - Client v{clientVersion} - API v{apiVersion}",
|
|
428
428
|
"BUG_REPORT_BODY": "Merci de détailler ici le problème rencontré%0D%0A%0D%0AInformations à conserver concernant votre système%0D%0A%0D%0A",
|
|
429
429
|
"PLATFORM_INFO": "Informations système"
|
package/core/client/i18n.js
CHANGED
|
@@ -84,5 +84,19 @@ export const i18n = {
|
|
|
84
84
|
if (this.i18n.global.te(key)) return this.i18n.global.t(key, params)
|
|
85
85
|
if (this.i18n.global.te(key, this.i18n.global.fallbackLocale)) return this.i18n.global.t(key, this.i18n.global.fallbackLocale, params)
|
|
86
86
|
return key
|
|
87
|
+
},
|
|
88
|
+
localize (path) {
|
|
89
|
+
if (!this.i18n) {
|
|
90
|
+
logger.error('[KDK] i18n instance is not existing. Did you initialize it ?')
|
|
91
|
+
return path
|
|
92
|
+
}
|
|
93
|
+
const index = path.lastIndexOf('.')
|
|
94
|
+
const baseName = index > 0 ? path.substring(0, index) : path
|
|
95
|
+
const extName = index > 0 ? path.substring(index, path.length) : ''
|
|
96
|
+
return [
|
|
97
|
+
`${baseName}_${this.i18n.global.locale}${extName}`,
|
|
98
|
+
`${baseName}_${this.i18n.global.fallbackLocale}${extName}`,
|
|
99
|
+
path
|
|
100
|
+
]
|
|
87
101
|
}
|
|
88
102
|
}
|
package/core/client/layout.js
CHANGED
|
@@ -5,7 +5,6 @@ import sift from 'sift'
|
|
|
5
5
|
import { Store } from './store.js'
|
|
6
6
|
import { bindContent } from './utils/utils.content.js'
|
|
7
7
|
|
|
8
|
-
const placements = ['top', 'right', 'bottom', 'left']
|
|
9
8
|
const layoutPath = 'layout'
|
|
10
9
|
const contentDefaults = { content: undefined, filter: {}, mode: undefined, visible: false }
|
|
11
10
|
const windowDefaultContols = { pin: true, unpin: true, maximize: true, restore: true, close: true, resize: true }
|
|
@@ -42,6 +41,7 @@ const defaults = {
|
|
|
42
41
|
|
|
43
42
|
// Export singleton
|
|
44
43
|
export const Layout = {
|
|
44
|
+
placements: ['top', 'right', 'bottom', 'left'],
|
|
45
45
|
paths: {
|
|
46
46
|
layout: layoutPath,
|
|
47
47
|
header: layoutPath + '.header',
|
|
@@ -68,7 +68,7 @@ export const Layout = {
|
|
|
68
68
|
Store.set(this.paths.footer, this.getElementDefaults('footer'))
|
|
69
69
|
Store.set(this.paths.page, this.getElementDefaults('page'))
|
|
70
70
|
Store.set(this.paths.fab, this.getElementDefaults('fab'))
|
|
71
|
-
placements.forEach(placement => {
|
|
71
|
+
this.placements.forEach(placement => {
|
|
72
72
|
Store.set(_.get(this.paths.panes, placement), this.getElementDefaults(`panes.${placement}`))
|
|
73
73
|
Store.set(_.get(this.paths.windows, placement), this.getElementDefaults(`windows.${placement}`))
|
|
74
74
|
})
|
|
@@ -81,16 +81,6 @@ export const Layout = {
|
|
|
81
81
|
getLayoutDefaults () {
|
|
82
82
|
return Object.assign({}, defaults.options, _.pick(_.get(config, this.paths.layout), _.keys(defaults.layout)))
|
|
83
83
|
},
|
|
84
|
-
set (layout) {
|
|
85
|
-
if (layout.header) this.setHeader(layout.header)
|
|
86
|
-
if (layout.footer) this.setFooter(layout.footer)
|
|
87
|
-
if (layout.page) this.setPage(layout.page)
|
|
88
|
-
if (layout.fab) this.setFab(layout.fab)
|
|
89
|
-
placements.forEach(placement => {
|
|
90
|
-
if (_.has(layout, `panes.${placement}`)) this.setPane(placement, _.get(layout, `panes.${placement}`))
|
|
91
|
-
if (_.has(layout, `windows.${placement}`)) this.setWindow(placement, _.get(layout, `windows.${placement}`))
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
84
|
setView (view) {
|
|
95
85
|
Store.patch(this.paths.layout, { view })
|
|
96
86
|
},
|
|
@@ -99,7 +89,7 @@ export const Layout = {
|
|
|
99
89
|
this.setFooterMode(mode)
|
|
100
90
|
this.setPageMode(mode)
|
|
101
91
|
this.setFabMode(mode)
|
|
102
|
-
placements.forEach(placement => {
|
|
92
|
+
this.placements.forEach(placement => {
|
|
103
93
|
this.setPaneMode(placement, mode)
|
|
104
94
|
this.setWindowMode(placement, mode)
|
|
105
95
|
})
|
|
@@ -156,6 +146,9 @@ export const Layout = {
|
|
|
156
146
|
if (props.visible === visible) return
|
|
157
147
|
Store.patch(this.getElementPath(element), { visible })
|
|
158
148
|
},
|
|
149
|
+
clearElement (element) {
|
|
150
|
+
this.setElement(element, null)
|
|
151
|
+
},
|
|
159
152
|
getHeader () {
|
|
160
153
|
return this.getElement('header')
|
|
161
154
|
},
|
|
@@ -171,6 +164,9 @@ export const Layout = {
|
|
|
171
164
|
setHeaderVisible (visible) {
|
|
172
165
|
this.setElementVisible('header', visible)
|
|
173
166
|
},
|
|
167
|
+
clearHeader () {
|
|
168
|
+
this.clearElement('header')
|
|
169
|
+
},
|
|
174
170
|
getFooter () {
|
|
175
171
|
return this.getElement('footer')
|
|
176
172
|
},
|
|
@@ -186,6 +182,9 @@ export const Layout = {
|
|
|
186
182
|
setFooterVisible (visible) {
|
|
187
183
|
this.setElementVisible('footer', visible)
|
|
188
184
|
},
|
|
185
|
+
clearFooter () {
|
|
186
|
+
this.clearElement('footer')
|
|
187
|
+
},
|
|
189
188
|
getPage () {
|
|
190
189
|
return this.getElement('page')
|
|
191
190
|
},
|
|
@@ -201,6 +200,9 @@ export const Layout = {
|
|
|
201
200
|
setPageVisible (visible) {
|
|
202
201
|
this.setElementVisible('page', visible)
|
|
203
202
|
},
|
|
203
|
+
clearPage () {
|
|
204
|
+
this.clearElement('page')
|
|
205
|
+
},
|
|
204
206
|
getFab () {
|
|
205
207
|
return this.getElement('fab')
|
|
206
208
|
},
|
|
@@ -239,6 +241,9 @@ export const Layout = {
|
|
|
239
241
|
if (props.offset === offset) return
|
|
240
242
|
Store.patch(this.getElementPath('fab'), { offset })
|
|
241
243
|
},
|
|
244
|
+
clearFab () {
|
|
245
|
+
this.clearElement('fab')
|
|
246
|
+
},
|
|
242
247
|
getPane (placement) {
|
|
243
248
|
return this.getElement(`panes.${placement}`)
|
|
244
249
|
},
|
|
@@ -259,6 +264,9 @@ export const Layout = {
|
|
|
259
264
|
if (props.opener === opener) return
|
|
260
265
|
Store.patch(this.getElementPath(`panes.${placement}`), { opener })
|
|
261
266
|
},
|
|
267
|
+
clearPane (placement) {
|
|
268
|
+
this.clearElement(`panes.${placement}`)
|
|
269
|
+
},
|
|
262
270
|
getWindow (placement) {
|
|
263
271
|
return this.getElement(`windows.${placement}`)
|
|
264
272
|
},
|
|
@@ -330,8 +338,11 @@ export const Layout = {
|
|
|
330
338
|
if (!widget) current = _.get(props.components, '[0].id')
|
|
331
339
|
Store.patch(this.getElementPath(`windows.${placement}`), { current })
|
|
332
340
|
},
|
|
341
|
+
clearWindow (placement) {
|
|
342
|
+
this.clearElement(`windows.${placement}`)
|
|
343
|
+
},
|
|
333
344
|
findWindow (widget) {
|
|
334
|
-
for (const placement of placements) {
|
|
345
|
+
for (const placement of this.placements) {
|
|
335
346
|
const window = this.getWindow(placement)
|
|
336
347
|
if (_.find(window.components, { id: widget })) {
|
|
337
348
|
return { placement, window }
|