@kalisio/kdk 2.1.7 → 2.1.9
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/.codeclimate.yml +34 -34
- package/.nycrc +5 -5
- package/.travis.doc.sh +8 -8
- package/.travis.test.sh +40 -40
- package/CHANGELOG.md +727 -727
- package/LICENSE +21 -21
- package/README.md +32 -32
- package/core/api/application.js +591 -591
- package/core/api/authentication.js +203 -203
- package/core/api/db.js +226 -226
- package/core/api/hooks/hooks.authentication.js +73 -73
- package/core/api/hooks/hooks.authorisations.js +376 -376
- package/core/api/hooks/hooks.groups.js +48 -48
- package/core/api/hooks/hooks.logger.js +26 -26
- package/core/api/hooks/hooks.model.js +290 -290
- package/core/api/hooks/hooks.organisations.js +156 -156
- package/core/api/hooks/hooks.push.js +56 -56
- package/core/api/hooks/hooks.query.js +246 -246
- package/core/api/hooks/hooks.schemas.js +73 -73
- package/core/api/hooks/hooks.service.js +78 -78
- package/core/api/hooks/hooks.storage.js +36 -36
- package/core/api/hooks/hooks.users.js +261 -261
- package/core/api/hooks/index.js +12 -12
- package/core/api/index.js +21 -21
- package/core/api/marshall.js +90 -90
- package/core/api/models/groups.model.mongodb.js +8 -8
- package/core/api/models/organisations.model.mongodb.js +3 -3
- package/core/api/models/tags.model.mongodb.js +10 -10
- package/core/api/models/users.model.mongodb.js +10 -10
- package/core/api/services/account/account.hooks.js +37 -37
- package/core/api/services/account/account.service.js +117 -117
- package/core/api/services/authorisations/authorisations.hooks.js +33 -33
- package/core/api/services/authorisations/authorisations.service.js +139 -139
- package/core/api/services/databases/databases.hooks.js +36 -36
- package/core/api/services/databases/databases.service.js +5 -5
- package/core/api/services/groups/groups.hooks.js +31 -31
- package/core/api/services/index.js +126 -126
- package/core/api/services/mailer/mailer.hooks.js +35 -35
- package/core/api/services/mailer/mailer.service.js +11 -11
- package/core/api/services/organisations/organisations.hooks.js +31 -31
- package/core/api/services/organisations/organisations.service.js +86 -86
- package/core/api/services/push/push.hooks.js +35 -35
- package/core/api/services/push/push.service.js +12 -12
- package/core/api/services/storage/storage.hooks.js +35 -35
- package/core/api/services/storage/storage.service.js +29 -29
- package/core/api/services/tags/tags.hooks.js +31 -31
- package/core/api/services/users/users.hooks.js +75 -75
- package/core/api/utils.js +11 -11
- package/core/client/api.js +293 -293
- package/core/client/capabilities.js +22 -22
- package/core/client/components/KAction.vue +393 -393
- package/core/client/components/KAvatar.vue +129 -129
- package/core/client/components/KBlock.vue +67 -67
- package/core/client/components/KChip.vue +68 -68
- package/core/client/components/KChipsPane.vue +103 -103
- package/core/client/components/KContent.vue +105 -105
- package/core/client/components/KDialog.vue +160 -160
- package/core/client/components/KExpandable.vue +49 -49
- package/core/client/components/KLogo.vue +32 -32
- package/core/client/components/KModal.vue +173 -173
- package/core/client/components/KPanel.vue +64 -64
- package/core/client/components/KScrollArea.vue +88 -88
- package/core/client/components/KSponsor.vue +40 -40
- package/core/client/components/KStamp.vue +65 -65
- package/core/client/components/KStore.vue +102 -102
- package/core/client/components/KTextArea.vue +143 -143
- package/core/client/components/KTree.vue +31 -31
- package/core/client/components/KVersion.vue +19 -19
- package/core/client/components/account/KAccount.vue +68 -68
- package/core/client/components/account/KDeleteAccountManager.vue +62 -62
- package/core/client/components/account/KEmailManager.vue +128 -128
- package/core/client/components/account/KPasswordManager.vue +90 -90
- package/core/client/components/account/KProfile.vue +109 -109
- package/core/client/components/account/KResetPassword.vue +126 -120
- package/core/client/components/account/KSendResetPassword.vue +97 -97
- package/core/client/components/account/KSubscription.vue +71 -71
- package/core/client/components/account/KSubscriptionsManager.vue +46 -46
- package/core/client/components/account/KVerifyEmailManager.vue +105 -105
- package/core/client/components/account/index.js +7 -7
- package/core/client/components/app/KAbout.vue +98 -98
- package/core/client/components/app/KHome.vue +12 -12
- package/core/client/components/app/KPlatform.vue +55 -55
- package/core/client/components/app/KSettings.vue +42 -42
- package/core/client/components/app/KTerms.vue +41 -41
- package/core/client/components/app/KTour.vue +448 -448
- package/core/client/components/app/KWelcome.vue +133 -133
- package/core/client/components/app/index.js +11 -11
- package/core/client/components/chart/KChart.vue +197 -197
- package/core/client/components/chart/KDataTable.vue +183 -183
- package/core/client/components/chart/KStatisticsChart.vue +94 -94
- package/core/client/components/chart/KTimeSeriesChart.vue +431 -431
- package/core/client/components/chart/index.js +9 -9
- package/core/client/components/collection/KBoard.vue +65 -65
- package/core/client/components/collection/KCard.vue +196 -196
- package/core/client/components/collection/KCardSection.vue +52 -52
- package/core/client/components/collection/KColumn.vue +229 -229
- package/core/client/components/collection/KFilter.vue +158 -158
- package/core/client/components/collection/KGrid.vue +121 -121
- package/core/client/components/collection/KHistory.vue +118 -118
- package/core/client/components/collection/KHistoryEntry.vue +111 -111
- package/core/client/components/collection/KItem.vue +128 -128
- package/core/client/components/collection/KList.vue +135 -135
- package/core/client/components/collection/KSorter.vue +46 -46
- package/core/client/components/collection/KTable.vue +238 -238
- package/core/client/components/collection/index.js +19 -19
- package/core/client/components/editor/KEditor.vue +52 -52
- package/core/client/components/editor/KModalEditor.vue +96 -96
- package/core/client/components/editor/index.js +7 -7
- package/core/client/components/form/KChipsField.vue +162 -162
- package/core/client/components/form/KColorField.vue +69 -69
- package/core/client/components/form/KColorScaleField.vue +86 -86
- package/core/client/components/form/KDateTimeRangeField.vue +65 -65
- package/core/client/components/form/KDatetimeField.vue +70 -70
- package/core/client/components/form/KEmailField.vue +33 -33
- package/core/client/components/form/KFileField.vue +161 -161
- package/core/client/components/form/KForm.vue +247 -247
- package/core/client/components/form/KIconField.vue +101 -101
- package/core/client/components/form/KItemField.vue +123 -123
- package/core/client/components/form/KNumberField.vue +33 -33
- package/core/client/components/form/KOptionsField.vue +63 -63
- package/core/client/components/form/KPasswordField.vue +57 -57
- package/core/client/components/form/KPhoneField.vue +32 -32
- package/core/client/components/form/KPropertyItemField.vue +119 -119
- package/core/client/components/form/KRoleField.vue +60 -60
- package/core/client/components/form/KSelectField.vue +143 -143
- package/core/client/components/form/KTextField.vue +48 -48
- package/core/client/components/form/KTextareaField.vue +88 -88
- package/core/client/components/form/KToggleField.vue +46 -46
- package/core/client/components/form/KTokenField.vue +80 -80
- package/core/client/components/form/KUnitField.vue +57 -57
- package/core/client/components/form/KUrlField.vue +32 -32
- package/core/client/components/form/KView.vue +118 -118
- package/core/client/components/form/index.js +7 -7
- package/core/client/components/index.js +48 -48
- package/core/client/components/input/KColorChooser.vue +63 -63
- package/core/client/components/input/KIconChooser.vue +308 -308
- package/core/client/components/input/KOptionsChooser.vue +122 -122
- package/core/client/components/input/KPalette.vue +40 -40
- package/core/client/components/input/index.js +11 -11
- package/core/client/components/layout/KFab.vue +113 -113
- package/core/client/components/layout/KLayout.vue +64 -64
- package/core/client/components/layout/KOpener.vue +140 -140
- package/core/client/components/layout/KPage.vue +320 -320
- package/core/client/components/layout/KPageSticky.vue +53 -53
- package/core/client/components/layout/KWindow.vue +443 -443
- package/core/client/components/layout/index.js +13 -13
- package/core/client/components/media/KColorScale.vue +254 -254
- package/core/client/components/media/KImageViewer.vue +44 -44
- package/core/client/components/media/KMarkdownViewer.vue +55 -55
- package/core/client/components/media/KMediaBrowser.vue +301 -340
- package/core/client/components/media/KShape.vue +120 -120
- package/core/client/components/media/index.js +13 -13
- package/core/client/components/menu/KMenu.vue +147 -147
- package/core/client/components/menu/KRadialFab.vue +122 -122
- package/core/client/components/menu/KRadialFabItem.vue +73 -73
- package/core/client/components/menu/index.js +9 -9
- package/core/client/components/screen/KEndpointScreen.vue +80 -80
- package/core/client/components/screen/KErrorScreen.vue +24 -24
- package/core/client/components/screen/KLoginScreen.vue +84 -84
- package/core/client/components/screen/KLogoutScreen.vue +20 -20
- package/core/client/components/screen/KRegisterScreen.vue +114 -114
- package/core/client/components/screen/KScreen.vue +106 -106
- package/core/client/components/screen/KScreenFooter.vue +32 -32
- package/core/client/components/screen/KScreenHeader.vue +17 -17
- package/core/client/components/screen/index.js +5 -5
- package/core/client/components/team/KAddMember.vue +384 -375
- package/core/client/components/team/KAddTag.vue +121 -121
- package/core/client/components/team/KChangeRole.vue +118 -118
- package/core/client/components/team/KGroupCard.vue +110 -110
- package/core/client/components/team/KGroupsActivity.vue +66 -66
- package/core/client/components/team/KJoinGroup.vue +132 -132
- package/core/client/components/team/KMemberCard.vue +328 -328
- package/core/client/components/team/KMemberFilter.vue +49 -49
- package/core/client/components/team/KMembersActivity.vue +126 -126
- package/core/client/components/team/KOrganisationsActivity.vue +53 -53
- package/core/client/components/team/KTagCard.vue +72 -72
- package/core/client/components/team/KTagsActivity.vue +61 -61
- package/core/client/components/team/index.js +9 -9
- package/core/client/components/time/KAbsoluteTimeRange.vue +183 -183
- package/core/client/components/time/KDate.vue +75 -75
- package/core/client/components/time/KDateTime.vue +172 -172
- package/core/client/components/time/KDateTimeRange.vue +118 -118
- package/core/client/components/time/KRelativeTimeRanges.vue +193 -193
- package/core/client/components/time/KTime.vue +74 -74
- package/core/client/components/time/index.js +7 -7
- package/core/client/components/viewer/KModalViewer.vue +47 -47
- package/core/client/components/viewer/KViewer.vue +30 -30
- package/core/client/composables/activity.js +67 -67
- package/core/client/composables/collection.js +181 -181
- package/core/client/composables/index.js +8 -8
- package/core/client/composables/pwa.js +71 -71
- package/core/client/composables/schema.js +64 -64
- package/core/client/composables/selection.js +88 -88
- package/core/client/composables/session.js +172 -172
- package/core/client/composables/store.js +49 -49
- package/core/client/composables/version.js +47 -47
- package/core/client/events.js +3 -3
- package/core/client/filter.js +60 -60
- package/core/client/guards.js +101 -101
- package/core/client/hooks/hooks.events.js +7 -7
- package/core/client/hooks/hooks.logger.js +24 -24
- package/core/client/hooks/hooks.users.js +22 -22
- package/core/client/hooks/index.js +3 -3
- package/core/client/i18n/core_en.json +846 -845
- package/core/client/i18n/core_fr.json +844 -843
- package/core/client/i18n.js +88 -88
- package/core/client/index.js +84 -84
- package/core/client/layout.js +323 -323
- package/core/client/local-storage.js +28 -28
- package/core/client/mixins/index.js +12 -12
- package/core/client/mixins/mixin.account.js +61 -61
- package/core/client/mixins/mixin.base-activity.js +232 -232
- package/core/client/mixins/mixin.base-collection.js +162 -162
- package/core/client/mixins/mixin.base-context.js +54 -54
- package/core/client/mixins/mixin.base-editor.js +194 -194
- package/core/client/mixins/mixin.base-field.js +105 -105
- package/core/client/mixins/mixin.base-item.js +166 -166
- package/core/client/mixins/mixin.base-modal.js +36 -36
- package/core/client/mixins/mixin.base-viewer.js +43 -43
- package/core/client/mixins/mixin.object-proxy.js +46 -46
- package/core/client/mixins/mixin.schema-proxy.js +97 -97
- package/core/client/mixins/mixin.service.js +22 -22
- package/core/client/reader.js +65 -65
- package/core/client/readers/index.js +3 -3
- package/core/client/readers/reader.blob.js +39 -39
- package/core/client/readers/reader.csv.js +36 -36
- package/core/client/readers/reader.json.js +34 -34
- package/core/client/search.js +47 -47
- package/core/client/services/index.js +49 -49
- package/core/client/services/local-settings.service.js +67 -67
- package/core/client/sorter.js +31 -31
- package/core/client/storage.js +110 -102
- package/core/client/store.js +39 -39
- package/core/client/theme.js +40 -40
- package/core/client/time.js +167 -167
- package/core/client/units.js +218 -218
- package/core/client/utils/index.js +203 -203
- package/core/client/utils/utils.account.js +52 -52
- package/core/client/utils/utils.colors.js +36 -36
- package/core/client/utils/utils.content.js +185 -185
- package/core/client/utils/utils.locale.js +28 -28
- package/core/client/utils/utils.platform.js +11 -11
- package/core/client/utils/utils.push.js +53 -53
- package/core/client/utils/utils.pwa.js +62 -62
- package/core/client/utils/utils.session.js +89 -89
- package/core/common/errors.js +1 -1
- package/core/common/index.js +10 -10
- package/core/common/permissions.js +318 -318
- package/core/common/schema.js +35 -35
- package/core/common/schemas/groups.create.json +28 -28
- package/core/common/schemas/groups.update.json +28 -28
- package/core/common/schemas/organisations.create.json +28 -28
- package/core/common/schemas/organisations.update.json +49 -49
- package/core/common/schemas/settings.update.json +234 -234
- package/core/common/schemas/tags.create.json +35 -35
- package/core/common/schemas/tags.update.json +35 -35
- package/core/common/schemas/users.update-profile.json +33 -33
- package/core/common/utils.js +45 -45
- package/core.api.js +5 -5
- package/core.client.js +5 -5
- package/core.common.js +1 -1
- package/extras/css/core.variables.scss +38 -38
- package/extras/icons/center-on-feature.svg +315 -315
- package/extras/icons/json.svg +83 -83
- package/extras/icons/map-legend.svg +251 -251
- package/extras/icons/target.svg +37 -37
- package/extras/tours/core/account-profile.js +32 -32
- package/extras/tours/core/account.js +143 -143
- package/extras/tours/core/add-member.js +74 -74
- package/extras/tours/core/add-tag.js +12 -12
- package/extras/tours/core/create-group.js +19 -19
- package/extras/tours/core/create-organisation.js +19 -19
- package/extras/tours/core/create-tag.js +26 -26
- package/extras/tours/core/edit-member-role.js +13 -13
- package/extras/tours/core/groups.js +65 -65
- package/extras/tours/core/join-group.js +13 -13
- package/extras/tours/core/login.js +41 -41
- package/extras/tours/core/members.js +108 -108
- package/extras/tours/core/register.js +61 -61
- package/extras/tours/core/send-reset-password.js +14 -14
- package/extras/tours/core/tags.js +65 -65
- package/extras/tours/map/add-layer.js +28 -28
- package/extras/tours/map/catalog-categories.js +59 -59
- package/extras/tours/map/catalog-panel.js +112 -112
- package/extras/tours/map/connect-layer.js +39 -39
- package/extras/tours/map/create-layer.js +33 -33
- package/extras/tours/map/create-view.js +25 -25
- package/extras/tours/map/fab.js +26 -26
- package/extras/tours/map/import-layer.js +33 -33
- package/extras/tours/map/navigation-bar.js +185 -185
- package/extras/tours/map/side-nav.js +35 -35
- package/extras/tours/map/timeline.js +77 -77
- package/map/api/config/categories.cjs +42 -42
- package/map/api/config/layers.cjs +43 -43
- package/map/api/config/sublegends.cjs +42 -42
- package/map/api/hooks/hooks.catalog.js +85 -85
- package/map/api/hooks/hooks.features.js +84 -84
- package/map/api/hooks/hooks.query.js +361 -361
- package/map/api/hooks/index.js +3 -3
- package/map/api/index.js +18 -18
- package/map/api/marshall.js +31 -31
- package/map/api/models/alerts.model.mongodb.js +7 -7
- package/map/api/models/catalog.model.mongodb.js +14 -14
- package/map/api/models/features.model.mongodb.js +37 -37
- package/map/api/services/alerts/alerts.hooks.js +63 -63
- package/map/api/services/alerts/alerts.service.js +175 -175
- package/map/api/services/catalog/catalog.hooks.js +76 -76
- package/map/api/services/daptiles/daptiles.service.js +475 -475
- package/map/api/services/features/features.hooks.js +40 -40
- package/map/api/services/features/features.service.js +52 -52
- package/map/api/services/geocoder/geocoder.hooks.js +31 -31
- package/map/api/services/geocoder/geocoder.service.js +79 -79
- package/map/api/services/index.js +228 -228
- package/map/client/canvas-draw-context.js +16 -16
- package/map/client/cesium/utils.js +133 -133
- package/map/client/components/KCaptureToolbar.vue +155 -155
- package/map/client/components/KColorLegend.vue +349 -349
- package/map/client/components/KCompass.vue +143 -143
- package/map/client/components/KEditLayerData.vue +85 -85
- package/map/client/components/KFeatureActionButton.vue +119 -119
- package/map/client/components/KFeatureEditor.vue +92 -92
- package/map/client/components/KFeaturesChart.vue +285 -285
- package/map/client/components/KFeaturesFilter.vue +259 -259
- package/map/client/components/KFeaturesTable.vue +99 -99
- package/map/client/components/KLayerEditionToolbar.vue +54 -54
- package/map/client/components/KLayerEditor.vue +48 -48
- package/map/client/components/KLayerStyleEditor.vue +118 -118
- package/map/client/components/KLayerStyleForm.vue +906 -906
- package/map/client/components/KLevelSlider.vue +100 -100
- package/map/client/components/KMeasureTool.vue +568 -568
- package/map/client/components/KPositionIndicator.vue +90 -90
- package/map/client/components/KTimeline.vue +293 -293
- package/map/client/components/KTimezoneMap.vue +158 -158
- package/map/client/components/KUrlLegend.vue +122 -122
- package/map/client/components/catalog/KAddLayer.vue +66 -66
- package/map/client/components/catalog/KBaseLayersSelector.vue +114 -114
- package/map/client/components/catalog/KConnectLayer.vue +323 -323
- package/map/client/components/catalog/KCreateLayer.vue +184 -184
- package/map/client/components/catalog/KCreateView.vue +108 -108
- package/map/client/components/catalog/KFilteredLayerItem.vue +53 -53
- package/map/client/components/catalog/KImportLayer.vue +168 -168
- package/map/client/components/catalog/KLayerCategories.vue +274 -274
- package/map/client/components/catalog/KLayerItem.vue +70 -70
- package/map/client/components/catalog/KLayersPanel.vue +137 -137
- package/map/client/components/catalog/KLayersSelector.vue +78 -78
- package/map/client/components/catalog/KViewSelector.vue +46 -46
- package/map/client/components/catalog/KViewsPanel.vue +123 -123
- package/map/client/components/catalog/KWeatherLayersSelector.vue +129 -129
- package/map/client/components/form/KDirectionField.vue +113 -113
- package/map/client/components/form/KLayerCategoryField.vue +46 -46
- package/map/client/components/form/KLocationField.vue +189 -189
- package/map/client/components/form/KOwsLayerField.vue +130 -130
- package/map/client/components/form/KOwsServiceField.vue +238 -238
- package/map/client/components/form/KTimezoneField.vue +142 -142
- package/map/client/components/index.js +1 -1
- package/map/client/components/legend/KColorScaleLegend.vue +31 -31
- package/map/client/components/legend/KImageLegend.vue +52 -52
- package/map/client/components/legend/KLegend.vue +191 -191
- package/map/client/components/legend/KLegendRenderer.vue +20 -20
- package/map/client/components/legend/KSymbolsLegend.vue +101 -101
- package/map/client/components/location/KGeocodersFilter.vue +44 -44
- package/map/client/components/location/KLocationCardSection.vue +61 -61
- package/map/client/components/location/KLocationMap.vue +280 -280
- package/map/client/components/location/KLocationSearch.vue +144 -144
- package/map/client/components/location/KLocationTip.vue +29 -29
- package/map/client/components/tools/KGeolocateTool.vue +46 -46
- package/map/client/components/tools/KSearchTool.vue +93 -93
- package/map/client/components/widget/KElevationProfile.vue +454 -454
- package/map/client/components/widget/KInformationBox.vue +145 -145
- package/map/client/components/widget/KMapillaryViewer.vue +178 -178
- package/map/client/components/widget/KStackableTimeSeries.vue +214 -214
- package/map/client/components/widget/KTimeSeries.vue +500 -500
- package/map/client/composables/activity.js +88 -88
- package/map/client/composables/highlight.js +214 -214
- package/map/client/composables/index.js +7 -7
- package/map/client/composables/location.js +53 -53
- package/map/client/composables/measure.js +42 -42
- package/map/client/composables/probe.js +133 -133
- package/map/client/composables/selection.js +300 -300
- package/map/client/composables/weather.js +213 -213
- package/map/client/elevation-utils.js +258 -258
- package/map/client/geolocation.js +119 -119
- package/map/client/globe.js +13 -13
- package/map/client/i18n/map_en.json +645 -645
- package/map/client/i18n/map_fr.json +646 -646
- package/map/client/index.js +18 -18
- package/map/client/init.js +80 -80
- package/map/client/leaflet/GSMaPLayer.js +55 -55
- package/map/client/leaflet/GradientPath.js +180 -180
- package/map/client/leaflet/MaskLayer.js +57 -57
- package/map/client/leaflet/TiledFeatureLayer.js +572 -572
- package/map/client/leaflet/TiledMeshLayer.js +486 -486
- package/map/client/leaflet/TiledWindLayer.js +384 -384
- package/map/client/leaflet/utils.js +246 -246
- package/map/client/map.js +15 -15
- package/map/client/mixins/globe/index.js +8 -8
- package/map/client/mixins/globe/mixin.base-globe.js +462 -462
- package/map/client/mixins/globe/mixin.file-layers.js +40 -40
- package/map/client/mixins/globe/mixin.geojson-layers.js +314 -314
- package/map/client/mixins/globe/mixin.globe-activity.js +52 -52
- package/map/client/mixins/globe/mixin.opendap-layers.js +51 -51
- package/map/client/mixins/globe/mixin.popup.js +82 -82
- package/map/client/mixins/globe/mixin.style.js +110 -110
- package/map/client/mixins/globe/mixin.tooltip.js +101 -101
- package/map/client/mixins/index.js +9 -9
- package/map/client/mixins/map/index.js +16 -16
- package/map/client/mixins/map/mixin.base-map.js +592 -592
- package/map/client/mixins/map/mixin.canvas-layers.js +529 -529
- package/map/client/mixins/map/mixin.edit-layers.js +493 -474
- package/map/client/mixins/map/mixin.file-layers.js +49 -49
- package/map/client/mixins/map/mixin.forecast-layers.js +79 -79
- package/map/client/mixins/map/mixin.geojson-layers.js +557 -557
- package/map/client/mixins/map/mixin.georaster-layers.js +114 -114
- package/map/client/mixins/map/mixin.gsmap-layers.js +27 -27
- package/map/client/mixins/map/mixin.heatmap-layers.js +116 -116
- package/map/client/mixins/map/mixin.map-activity.js +38 -38
- package/map/client/mixins/map/mixin.mapillary-layers.js +45 -45
- package/map/client/mixins/map/mixin.popup.js +53 -53
- package/map/client/mixins/map/mixin.style.js +73 -73
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +120 -120
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +126 -126
- package/map/client/mixins/map/mixin.tooltip.js +47 -47
- package/map/client/mixins/mixin.activity.js +477 -477
- package/map/client/mixins/mixin.catalog-panel.js +26 -26
- package/map/client/mixins/mixin.context.js +262 -262
- package/map/client/mixins/mixin.feature-selection.js +28 -28
- package/map/client/mixins/mixin.feature-service.js +403 -403
- package/map/client/mixins/mixin.infobox.js +29 -29
- package/map/client/mixins/mixin.levels.js +66 -66
- package/map/client/mixins/mixin.style.js +29 -29
- package/map/client/mixins/mixin.weacast.js +212 -212
- package/map/client/pixi-utils.js +256 -256
- package/map/client/readers/index.js +4 -4
- package/map/client/readers/reader.geojson.js +64 -64
- package/map/client/readers/reader.gpx.js +36 -36
- package/map/client/readers/reader.kml.js +36 -36
- package/map/client/readers/reader.shp.js +82 -82
- package/map/client/utils/index.js +3 -3
- package/map/client/utils/utils.js +228 -228
- package/map/client/utils/utils.location.js +45 -45
- package/map/client/utils/utils.schema.js +75 -75
- package/map/client/utils.all.js +3 -3
- package/map/client/utils.globe.js +2 -2
- package/map/client/utils.js +4 -4
- package/map/client/utils.map.js +2 -2
- package/map/common/dynamic-grid-source.js +127 -127
- package/map/common/errors.js +3 -3
- package/map/common/geotiff-grid-source.js +150 -150
- package/map/common/grid.js +509 -509
- package/map/common/index.js +29 -29
- package/map/common/meteo-model-grid-source.js +157 -157
- package/map/common/moment-utils.js +24 -24
- package/map/common/opendap-grid-source.js +261 -261
- package/map/common/opendap-utils.js +247 -247
- package/map/common/permissions.js +11 -11
- package/map/common/schemas/catalog.update.json +28 -28
- package/map/common/time-based-grid-source.js +111 -111
- package/map/common/tms-utils.js +63 -63
- package/map/common/wcs-grid-source.js +93 -93
- package/map/common/wcs-utils.js +167 -167
- package/map/common/weacast-grid-source.js +316 -316
- package/map/common/wfs-utils.js +163 -163
- package/map/common/wms-utils.js +117 -117
- package/map/common/wmts-utils.js +154 -154
- package/map.api.js +5 -5
- package/map.client.globe.js +5 -5
- package/map.client.js +5 -5
- package/map.client.map.js +5 -5
- package/map.common.js +1 -1
- package/map.config.cjs +9 -9
- package/package.json +161 -161
- package/test/api/core/account.test.js +485 -485
- package/test/api/core/client.test.js.skip +37 -37
- package/test/api/core/config/default.cjs +118 -118
- package/test/api/core/config/email-templates/confirmInvitation/html.ejs +18 -18
- package/test/api/core/config/email-templates/identityChange/html.ejs +14 -14
- package/test/api/core/config/email-templates/newDevice/html.ejs +7 -7
- package/test/api/core/config/email-templates/newSubscription/html.ejs +7 -7
- package/test/api/core/config/email-templates/passwordChange/html.ejs +5 -5
- package/test/api/core/config/email-templates/resendVerifySignup/html.ejs +12 -12
- package/test/api/core/config/email-templates/resetPwd/html.ejs +5 -5
- package/test/api/core/config/email-templates/sendResetPwd/html.ejs +12 -12
- package/test/api/core/config/email-templates/verifySignup/html.ejs +3 -3
- package/test/api/core/data/invalid-objects.json +59 -59
- package/test/api/core/data/schema.json +57 -57
- package/test/api/core/data/valid-objects.json +37 -37
- package/test/api/core/hooks.test.js +330 -330
- package/test/api/core/index.js +1 -1
- package/test/api/core/index.test.js +478 -478
- package/test/api/core/push.test.js +197 -197
- package/test/api/core/schemas.test.js +82 -82
- package/test/api/core/storage.test.js +153 -153
- package/test/api/core/team.test.js +670 -670
- package/test/api/core/test-log-2023-12-19.log +7 -0
- package/test/api/core/utils.js +92 -92
- package/test/api/index.js +3 -3
- package/test/api/map/alerts.test.js +560 -560
- package/test/api/map/config/default.cjs +125 -125
- package/test/api/map/config/layers.json +38 -38
- package/test/api/map/data/DescribeCoverage.xml +54 -54
- package/test/api/map/data/adsb.observations.json +131 -131
- package/test/api/map/data/dataset.grb.das +55 -55
- package/test/api/map/data/dataset.grb.dds +17 -17
- package/test/api/map/data/vigicrues.observations.json +47041 -47041
- package/test/api/map/data/vigicrues.stations.json +15421 -15421
- package/test/api/map/data/zones.json +1227 -1227
- package/test/api/map/grid-sources.test.js +313 -313
- package/test/api/map/hooks.test.js +98 -98
- package/test/api/map/index.test.js +563 -563
- 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/client/core/account.js +36 -36
- package/test/client/core/api.js +361 -361
- package/test/client/core/collection.js +64 -64
- package/test/client/core/index.js +8 -8
- package/test/client/core/layout.js +116 -116
- package/test/client/core/runner.js +224 -224
- package/test/client/core/screens.js +35 -35
- package/test/client/core/time.js +10 -10
- package/test/client/core/utils.js +260 -260
- package/test/client/index.js +3 -3
- package/test/client/map/catalog.js +193 -193
- package/test/client/map/controls.js +41 -41
- package/test/client/map/index.js +4 -4
- package/test/client/map/time.js +24 -24
- package/test/client/map/utils.js +27 -27
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/core/api/application.js.html +0 -1789
- package/coverage/core/api/authentication.js.html +0 -694
- package/coverage/core/api/db.js.html +0 -751
- package/coverage/core/api/hooks/hooks.account.js.html +0 -169
- package/coverage/core/api/hooks/hooks.authentication.js.html +0 -274
- package/coverage/core/api/hooks/hooks.authorisations.js.html +0 -1201
- package/coverage/core/api/hooks/hooks.devices.js.html +0 -211
- package/coverage/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/core/api/hooks/hooks.model.js.html +0 -988
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -823
- package/coverage/core/api/hooks/hooks.pusher.js.html +0 -730
- package/coverage/core/api/hooks/hooks.query.js.html +0 -838
- package/coverage/core/api/hooks/hooks.schemas.js.html +0 -244
- package/coverage/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/core/api/hooks/hooks.tags.js.html +0 -850
- package/coverage/core/api/hooks/hooks.users.js.html +0 -889
- package/coverage/core/api/hooks/index.html +0 -341
- package/coverage/core/api/hooks/index.js.html +0 -130
- package/coverage/core/api/index.html +0 -176
- package/coverage/core/api/index.js.html +0 -148
- package/coverage/core/api/marshall.js.html +0 -355
- package/coverage/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/core/api/models/index.html +0 -161
- package/coverage/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/core/api/oauth2-handler.js.html +0 -202
- package/coverage/core/api/oauth2-verifier.js.html +0 -355
- package/coverage/core/api/services/account/account.hooks.js.html +0 -196
- package/coverage/core/api/services/account/account.service.js.html +0 -448
- package/coverage/core/api/services/account/index.html +0 -131
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +0 -502
- package/coverage/core/api/services/authorisations/index.html +0 -131
- package/coverage/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/core/api/services/databases/index.html +0 -131
- package/coverage/core/api/services/devices/devices.hooks.js.html +0 -190
- package/coverage/core/api/services/devices/devices.service.js.html +0 -382
- package/coverage/core/api/services/devices/index.html +0 -131
- package/coverage/core/api/services/groups/groups.hooks.js.html +0 -184
- package/coverage/core/api/services/groups/index.html +0 -116
- package/coverage/core/api/services/index.html +0 -116
- package/coverage/core/api/services/index.js.html +0 -472
- package/coverage/core/api/services/mailer/index.html +0 -131
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/core/api/services/organisations/index.html +0 -131
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -319
- package/coverage/core/api/services/pusher/index.html +0 -146
- package/coverage/core/api/services/pusher/pusher.channels.js.html +0 -94
- package/coverage/core/api/services/pusher/pusher.hooks.js.html +0 -193
- package/coverage/core/api/services/pusher/pusher.service.js.html +0 -1420
- package/coverage/core/api/services/storage/index.html +0 -131
- package/coverage/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/core/api/services/tags/index.html +0 -116
- package/coverage/core/api/services/tags/tags.hooks.js.html +0 -220
- package/coverage/core/api/services/users/index.html +0 -116
- package/coverage/core/api/services/users/users.hooks.js.html +0 -313
- package/coverage/core/common/errors.js.html +0 -88
- package/coverage/core/common/index.html +0 -176
- package/coverage/core/common/index.js.html +0 -115
- package/coverage/core/common/permissions.js.html +0 -1015
- package/coverage/core/common/schema.js.html +0 -190
- package/coverage/core/common/utils.js.html +0 -220
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -491
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/core/api/application.js.html +0 -1789
- package/coverage/lcov-report/core/api/authentication.js.html +0 -694
- package/coverage/lcov-report/core/api/db.js.html +0 -751
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +0 -169
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +0 -274
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +0 -1201
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +0 -211
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +0 -988
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -823
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +0 -730
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +0 -838
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +0 -244
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +0 -850
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +0 -889
- package/coverage/lcov-report/core/api/hooks/index.html +0 -341
- package/coverage/lcov-report/core/api/hooks/index.js.html +0 -130
- package/coverage/lcov-report/core/api/index.html +0 -176
- package/coverage/lcov-report/core/api/index.js.html +0 -148
- package/coverage/lcov-report/core/api/marshall.js.html +0 -355
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/core/api/models/index.html +0 -161
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +0 -202
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +0 -355
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +0 -196
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +0 -448
- package/coverage/lcov-report/core/api/services/account/index.html +0 -131
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +0 -502
- package/coverage/lcov-report/core/api/services/authorisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/lcov-report/core/api/services/databases/index.html +0 -131
- package/coverage/lcov-report/core/api/services/devices/devices.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/devices/devices.service.js.html +0 -382
- package/coverage/lcov-report/core/api/services/devices/index.html +0 -131
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/groups/index.html +0 -116
- package/coverage/lcov-report/core/api/services/index.html +0 -116
- package/coverage/lcov-report/core/api/services/index.js.html +0 -472
- package/coverage/lcov-report/core/api/services/mailer/index.html +0 -131
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/organisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -319
- package/coverage/lcov-report/core/api/services/pusher/index.html +0 -146
- package/coverage/lcov-report/core/api/services/pusher/pusher.channels.js.html +0 -94
- package/coverage/lcov-report/core/api/services/pusher/pusher.hooks.js.html +0 -193
- package/coverage/lcov-report/core/api/services/pusher/pusher.service.js.html +0 -1420
- package/coverage/lcov-report/core/api/services/storage/index.html +0 -131
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/lcov-report/core/api/services/tags/index.html +0 -116
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +0 -220
- package/coverage/lcov-report/core/api/services/users/index.html +0 -116
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +0 -313
- package/coverage/lcov-report/core/common/errors.js.html +0 -88
- package/coverage/lcov-report/core/common/index.html +0 -176
- package/coverage/lcov-report/core/common/index.js.html +0 -115
- package/coverage/lcov-report/core/common/permissions.js.html +0 -1015
- package/coverage/lcov-report/core/common/schema.js.html +0 -190
- package/coverage/lcov-report/core/common/utils.js.html +0 -220
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -491
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -340
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +0 -337
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +0 -1162
- package/coverage/lcov-report/map/api/hooks/index.html +0 -161
- package/coverage/lcov-report/map/api/hooks/index.js.html +0 -94
- package/coverage/lcov-report/map/api/index.html +0 -131
- package/coverage/lcov-report/map/api/index.js.html +0 -139
- package/coverage/lcov-report/map/api/marshall.js.html +0 -178
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -202
- package/coverage/lcov-report/map/api/models/index.html +0 -146
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/lcov-report/map/api/services/alerts/index.html +0 -131
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/lcov-report/map/api/services/catalog/index.html +0 -116
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/lcov-report/map/api/services/daptiles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +0 -205
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +0 -241
- package/coverage/lcov-report/map/api/services/features/index.html +0 -131
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.hooks.js.html +0 -178
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.service.js.html +0 -322
- package/coverage/lcov-report/map/api/services/geocoder/index.html +0 -131
- package/coverage/lcov-report/map/api/services/index.html +0 -116
- package/coverage/lcov-report/map/api/services/index.js.html +0 -760
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/lcov-report/map/common/errors.js.html +0 -94
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +0 -535
- package/coverage/lcov-report/map/common/grid.js.html +0 -1612
- package/coverage/lcov-report/map/common/index.html +0 -371
- package/coverage/lcov-report/map/common/index.js.html +0 -172
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/lcov-report/map/common/moment-utils.js.html +0 -157
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/lcov-report/map/common/opendap-utils.js.html +0 -826
- package/coverage/lcov-report/map/common/permissions.js.html +0 -118
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/lcov-report/map/common/tms-utils.js.html +0 -274
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/lcov-report/map/common/wcs-utils.js.html +0 -586
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/lcov-report/map/common/wfs-utils.js.html +0 -574
- package/coverage/lcov-report/map/common/wms-utils.js.html +0 -436
- package/coverage/lcov-report/map/common/wmts-utils.js.html +0 -547
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -12501
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -340
- package/coverage/map/api/hooks/hooks.features.js.html +0 -337
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1162
- package/coverage/map/api/hooks/index.html +0 -161
- package/coverage/map/api/hooks/index.js.html +0 -94
- package/coverage/map/api/index.html +0 -131
- package/coverage/map/api/index.js.html +0 -139
- package/coverage/map/api/marshall.js.html +0 -178
- package/coverage/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -202
- package/coverage/map/api/models/index.html +0 -146
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/map/api/services/alerts/index.html +0 -131
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/map/api/services/catalog/index.html +0 -116
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/map/api/services/daptiles/index.html +0 -116
- package/coverage/map/api/services/features/features.hooks.js.html +0 -205
- package/coverage/map/api/services/features/features.service.js.html +0 -241
- package/coverage/map/api/services/features/index.html +0 -131
- package/coverage/map/api/services/geocoder/geocoder.hooks.js.html +0 -178
- package/coverage/map/api/services/geocoder/geocoder.service.js.html +0 -322
- package/coverage/map/api/services/geocoder/index.html +0 -131
- package/coverage/map/api/services/index.html +0 -116
- package/coverage/map/api/services/index.js.html +0 -760
- package/coverage/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/map/common/errors.js.html +0 -94
- package/coverage/map/common/geotiff-grid-source.js.html +0 -535
- package/coverage/map/common/grid.js.html +0 -1612
- package/coverage/map/common/index.html +0 -371
- package/coverage/map/common/index.js.html +0 -172
- package/coverage/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/map/common/moment-utils.js.html +0 -157
- package/coverage/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/map/common/opendap-utils.js.html +0 -826
- package/coverage/map/common/permissions.js.html +0 -118
- package/coverage/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/map/common/tms-utils.js.html +0 -274
- package/coverage/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/map/common/wcs-utils.js.html +0 -586
- package/coverage/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/map/common/wfs-utils.js.html +0 -574
- package/coverage/map/common/wms-utils.js.html +0 -436
- package/coverage/map/common/wmts-utils.js.html +0 -547
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/tmp/coverage-19264-1684834146599-0.json +0 -1
- package/coverage/tmp/coverage-2508-1684834182408-0.json +0 -1
- package/coverage/tmp/coverage-25908-1684834189369-0.json +0 -1
- package/coverage/tmp/coverage-32364-1684834189420-0.json +0 -1
- package/coverage/tmp/coverage-36604-1684834189485-0.json +0 -1
- package/coverage/tmp/coverage-40652-1684834182272-0.json +0 -1
- package/coverage/tmp/coverage-48484-1684834182342-0.json +0 -1
- package/coverage/tmp/coverage-51652-1684834189584-0.json +0 -1
- package/coverage/tmp/coverage-9776-1684834189519-0.json +0 -1
- package/test/api/core/test-log-2023-06-05.log +0 -0
- package/test/api/map/test-log-2022-12-01.log +0 -19
- package/test/api/map/test-log-2023-01-05.log +0 -4
- package/test/api/map/test-log-2023-01-09.log +0 -3
- package/test/api/map/test-log-2023-02-05.log +0 -11
- package/test/api/map/test-log-2023-02-14.log +0 -82
- package/test/api/map/test-log-2023-02-28.log +0 -28
- package/test/api/map/test-log-2023-03-02.log +0 -11
- package/test/api/map/test-log-2023-03-06.log +0 -11
- package/test/api/map/test-log-2023-03-07.log +0 -61
- package/test/api/map/test-log-2023-03-31.log +0 -11
- package/test/api/map/test-log-2023-05-23.log +0 -11
- package/test/api/map/test-log-2023-05-24.log +0 -11
|
@@ -1,393 +1,393 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!--
|
|
3
|
-
Button renderer
|
|
4
|
-
-->
|
|
5
|
-
<q-btn v-if="renderer === 'button'"
|
|
6
|
-
:id="id"
|
|
7
|
-
no-caps
|
|
8
|
-
no-wrap
|
|
9
|
-
:color="computedColor"
|
|
10
|
-
:icon="!iconRight ? computedIcon : undefined"
|
|
11
|
-
:icon-right="iconRight ? computedIcon : undefined"
|
|
12
|
-
:size="size"
|
|
13
|
-
flat
|
|
14
|
-
:round="label === null"
|
|
15
|
-
:rounded="label !== null"
|
|
16
|
-
:stack="stack"
|
|
17
|
-
:dense="dense"
|
|
18
|
-
:disable="computedDisabled"
|
|
19
|
-
v-close-popup="closePopup"
|
|
20
|
-
@click="onClicked">
|
|
21
|
-
<!-- label -->
|
|
22
|
-
<div v-if="computedLabel" :class="{ 'ellipsis q-pr-md': iconRight, 'ellipsis q-pl-md': !iconRight }">
|
|
23
|
-
{{ computedLabel }}
|
|
24
|
-
</div>
|
|
25
|
-
<!-- tooltip -->
|
|
26
|
-
<q-tooltip v-if="computedTooltip">
|
|
27
|
-
{{ computedTooltip }}
|
|
28
|
-
</q-tooltip>
|
|
29
|
-
<!-- badge -->
|
|
30
|
-
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
31
|
-
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
32
|
-
</q-badge>
|
|
33
|
-
<!-- extra content -->
|
|
34
|
-
<slot>
|
|
35
|
-
</slot>
|
|
36
|
-
</q-btn>
|
|
37
|
-
<!--
|
|
38
|
-
Form button renderer
|
|
39
|
-
-->
|
|
40
|
-
<q-btn v-else-if="renderer === 'form-button'"
|
|
41
|
-
:id="id"
|
|
42
|
-
no-wrap
|
|
43
|
-
color="primary"
|
|
44
|
-
:outline="outline"
|
|
45
|
-
:size="size"
|
|
46
|
-
:disable="computedDisabled"
|
|
47
|
-
:loading="loading"
|
|
48
|
-
v-close-popup="closePopup"
|
|
49
|
-
@click="onClicked">
|
|
50
|
-
<div class="ellipsis">
|
|
51
|
-
{{ computedLabel }}
|
|
52
|
-
</div>
|
|
53
|
-
</q-btn>
|
|
54
|
-
<!--
|
|
55
|
-
Item renderer
|
|
56
|
-
-->
|
|
57
|
-
<q-item v-else-if="renderer === 'item'"
|
|
58
|
-
:id="id"
|
|
59
|
-
class="full-width"
|
|
60
|
-
clickable
|
|
61
|
-
:dense="dense"
|
|
62
|
-
:disable="computedDisabled"
|
|
63
|
-
v-close-popup="closePopup"
|
|
64
|
-
@click="onClicked">
|
|
65
|
-
<q-item-section v-if="computedIcon || badge" avatar>
|
|
66
|
-
<q-icon v-if="computedIcon" :name="computedIcon" :color="computedColor" :dense="dense" />
|
|
67
|
-
<!-- badge -->
|
|
68
|
-
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
69
|
-
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
70
|
-
</q-badge>
|
|
71
|
-
</q-item-section>
|
|
72
|
-
<q-item-section :class="'text-' + computedColor" no-wrap>
|
|
73
|
-
<q-item-label :lines="1">{{ computedLabel }}</q-item-label>
|
|
74
|
-
</q-item-section>
|
|
75
|
-
</q-item>
|
|
76
|
-
<!--
|
|
77
|
-
Fab renderer
|
|
78
|
-
-->
|
|
79
|
-
<q-btn v-else-if="renderer === 'fab'"
|
|
80
|
-
:id="id"
|
|
81
|
-
class="k-action-fab"
|
|
82
|
-
:icon="computedIcon"
|
|
83
|
-
:color="computedColor"
|
|
84
|
-
:size="size"
|
|
85
|
-
:round="true"
|
|
86
|
-
:dense="dense"
|
|
87
|
-
:disable="computedDisabled"
|
|
88
|
-
@click="onClicked">
|
|
89
|
-
<!-- tooltip -->
|
|
90
|
-
<q-tooltip v-if="computedTooltip" anchor="top middle" self="bottom right">
|
|
91
|
-
{{ computedTooltip }}
|
|
92
|
-
</q-tooltip>
|
|
93
|
-
<!-- badge -->
|
|
94
|
-
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
95
|
-
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
96
|
-
</q-badge>
|
|
97
|
-
</q-btn>
|
|
98
|
-
<!--
|
|
99
|
-
Fab action renderer
|
|
100
|
-
-->
|
|
101
|
-
<q-fab-action v-else-if="renderer === 'fab-action'"
|
|
102
|
-
:id="id"
|
|
103
|
-
class="k-action-fab-action"
|
|
104
|
-
no-caps
|
|
105
|
-
:icon="computedIcon"
|
|
106
|
-
:color="computedColor"
|
|
107
|
-
:label="computedLabel"
|
|
108
|
-
square
|
|
109
|
-
external-label
|
|
110
|
-
:label-position="iconRight ? 'left' : 'right'"
|
|
111
|
-
label-class="bg-primary text-white text-caption k-fab-action"
|
|
112
|
-
:disable="computedDisabled"
|
|
113
|
-
@click="onClicked">
|
|
114
|
-
<!-- badge -->
|
|
115
|
-
<q-badge v-if="badge" v-bind="badge">
|
|
116
|
-
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
117
|
-
</q-badge>
|
|
118
|
-
</q-fab-action>
|
|
119
|
-
<!--
|
|
120
|
-
Tab renderer
|
|
121
|
-
-->
|
|
122
|
-
<q-btn v-else-if="renderer === 'tab'"
|
|
123
|
-
:class="{'k-action-tab-active': isToggled }"
|
|
124
|
-
:id="id"
|
|
125
|
-
no-caps
|
|
126
|
-
no-wrap
|
|
127
|
-
:label="computedLabel"
|
|
128
|
-
:color="computedColor"
|
|
129
|
-
:size="size"
|
|
130
|
-
flat
|
|
131
|
-
square
|
|
132
|
-
:dense="dense"
|
|
133
|
-
:disable="computedDisabled"
|
|
134
|
-
@click="onClicked">
|
|
135
|
-
<!-- tooltip -->
|
|
136
|
-
<q-tooltip v-if="computedTooltip">
|
|
137
|
-
{{ computedTooltip }}
|
|
138
|
-
</q-tooltip>
|
|
139
|
-
<!-- badge -->
|
|
140
|
-
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
141
|
-
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
142
|
-
</q-badge>
|
|
143
|
-
<!-- extra content -->
|
|
144
|
-
<slot>
|
|
145
|
-
</slot>
|
|
146
|
-
</q-btn>
|
|
147
|
-
</template>
|
|
148
|
-
|
|
149
|
-
<script>
|
|
150
|
-
import _ from 'lodash'
|
|
151
|
-
import { ref, toRef, computed, watch } from 'vue'
|
|
152
|
-
import { useRoute, useRouter } from 'vue-router'
|
|
153
|
-
import { useQuasar, openURL } from 'quasar'
|
|
154
|
-
import { i18n } from '../i18n.js'
|
|
155
|
-
import { bindParams } from '../utils/utils.content.js'
|
|
156
|
-
|
|
157
|
-
export default {
|
|
158
|
-
props: {
|
|
159
|
-
id: {
|
|
160
|
-
type: String,
|
|
161
|
-
required: true
|
|
162
|
-
},
|
|
163
|
-
label: {
|
|
164
|
-
type: String,
|
|
165
|
-
default: null
|
|
166
|
-
},
|
|
167
|
-
icon: {
|
|
168
|
-
type: String,
|
|
169
|
-
default: undefined
|
|
170
|
-
},
|
|
171
|
-
iconRight: {
|
|
172
|
-
type: Boolean,
|
|
173
|
-
default: false
|
|
174
|
-
},
|
|
175
|
-
color: {
|
|
176
|
-
type: String,
|
|
177
|
-
default: 'grey-9'
|
|
178
|
-
},
|
|
179
|
-
size: {
|
|
180
|
-
type: String,
|
|
181
|
-
default: 'md'
|
|
182
|
-
},
|
|
183
|
-
outline: {
|
|
184
|
-
type: Boolean,
|
|
185
|
-
default: false
|
|
186
|
-
},
|
|
187
|
-
badge: {
|
|
188
|
-
type: Object,
|
|
189
|
-
default: () => null
|
|
190
|
-
},
|
|
191
|
-
tooltip: {
|
|
192
|
-
type: String,
|
|
193
|
-
default: ''
|
|
194
|
-
},
|
|
195
|
-
disabled: {
|
|
196
|
-
type: [Boolean, Function],
|
|
197
|
-
default: false
|
|
198
|
-
},
|
|
199
|
-
toggled: {
|
|
200
|
-
type: Boolean,
|
|
201
|
-
default: false
|
|
202
|
-
},
|
|
203
|
-
toggle: {
|
|
204
|
-
type: Object,
|
|
205
|
-
default: () => {}
|
|
206
|
-
},
|
|
207
|
-
stack: {
|
|
208
|
-
type: Boolean,
|
|
209
|
-
default: false
|
|
210
|
-
},
|
|
211
|
-
loading: {
|
|
212
|
-
type: Boolean,
|
|
213
|
-
default: false
|
|
214
|
-
},
|
|
215
|
-
propagate: {
|
|
216
|
-
type: Boolean,
|
|
217
|
-
default: true
|
|
218
|
-
},
|
|
219
|
-
context: {
|
|
220
|
-
type: Object,
|
|
221
|
-
default: () => null
|
|
222
|
-
},
|
|
223
|
-
handler: {
|
|
224
|
-
type: Function,
|
|
225
|
-
default: null
|
|
226
|
-
},
|
|
227
|
-
closePopup: {
|
|
228
|
-
type: [Boolean, Number, String],
|
|
229
|
-
default: false
|
|
230
|
-
},
|
|
231
|
-
dialog: {
|
|
232
|
-
type: Object,
|
|
233
|
-
default: null
|
|
234
|
-
},
|
|
235
|
-
route: {
|
|
236
|
-
type: Object,
|
|
237
|
-
default: () => null
|
|
238
|
-
},
|
|
239
|
-
url: {
|
|
240
|
-
type: String,
|
|
241
|
-
default: null
|
|
242
|
-
},
|
|
243
|
-
renderer: {
|
|
244
|
-
type: String,
|
|
245
|
-
default: 'button',
|
|
246
|
-
validator: (value) => {
|
|
247
|
-
return ['button', 'form-button', 'item', 'fab', 'fab-action', 'tab'].includes(value)
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
inheritAttrs: false,
|
|
252
|
-
emits: ['triggered', 'toggled', 'dialog-confirmed', 'dialog-canceled'],
|
|
253
|
-
setup (props, { emit }) {
|
|
254
|
-
// data
|
|
255
|
-
const route = useRoute()
|
|
256
|
-
const router = useRouter()
|
|
257
|
-
const $q = useQuasar()
|
|
258
|
-
const isToggled = _.has(props, 'toggle.value') ? toRef(props.toggle, 'value') : ref(props.toggled)
|
|
259
|
-
|
|
260
|
-
// computed
|
|
261
|
-
const computedLabel = computed(() => {
|
|
262
|
-
// Check also for translation key or already translated message
|
|
263
|
-
if (isToggled.value && _.has(props.toggle, 'label')) return i18n.tie(props.toggle.label)
|
|
264
|
-
return i18n.tie(props.label)
|
|
265
|
-
})
|
|
266
|
-
const computedIcon = computed(() => {
|
|
267
|
-
if (isToggled.value && _.has(props.toggle, 'icon')) return props.toggle.icon
|
|
268
|
-
return props.icon
|
|
269
|
-
})
|
|
270
|
-
const computedColor = computed(() => {
|
|
271
|
-
if (isToggled.value) return _.get(props.toggle, 'color', 'accent')
|
|
272
|
-
return props.color
|
|
273
|
-
})
|
|
274
|
-
const computedDisabled = computed(() => {
|
|
275
|
-
if (!props.disabled) return false
|
|
276
|
-
if (typeof props.disabled === 'function') return props.disabled()
|
|
277
|
-
return props.disabled
|
|
278
|
-
})
|
|
279
|
-
const computedTooltip = computed(() => {
|
|
280
|
-
if (computedDisabled.value) return
|
|
281
|
-
// Check also for translation key or already translated message
|
|
282
|
-
if (isToggled.value && _.has(props.toggle, 'tooltip')) return i18n.tie(props.toggle.tooltip)
|
|
283
|
-
return i18n.tie(props.tooltip)
|
|
284
|
-
})
|
|
285
|
-
const computedBadgeLabel = computed(() => {
|
|
286
|
-
// Check also for translation key or already translated message
|
|
287
|
-
if (props.badge && _.has(props.badge, 'label')) return i18n.tie(props.badge.label)
|
|
288
|
-
// Take care that changing this to null or '' breaks the display in Quasar
|
|
289
|
-
return undefined
|
|
290
|
-
})
|
|
291
|
-
const dense = computed(() => {
|
|
292
|
-
return $q.screen.lt.sm
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
// functions
|
|
296
|
-
function toggle () {
|
|
297
|
-
isToggled.value = !isToggled.value
|
|
298
|
-
emit('toggled', props.context, isToggled.value)
|
|
299
|
-
}
|
|
300
|
-
function bindRouteParams (path) {
|
|
301
|
-
// When action is created from code we can directly inject the params.
|
|
302
|
-
// However, when created from the config we need to manage dynamic values.
|
|
303
|
-
// A parameter like ':xxx' in config means xxx is a dynamic property of
|
|
304
|
-
// the current route or the context object, not a static value.
|
|
305
|
-
// We bind the target params object to both possible context.
|
|
306
|
-
const currentParams = _.get(route, path, {})
|
|
307
|
-
const targetParams = _.get(props.route, path, {})
|
|
308
|
-
const routeParams = bindParams(targetParams, currentParams)
|
|
309
|
-
const contextParams = bindParams(targetParams, props.context)
|
|
310
|
-
return _.merge(routeParams, contextParams)
|
|
311
|
-
}
|
|
312
|
-
async function onClicked (event) {
|
|
313
|
-
if (!props.propagate) event.stopPropagation()
|
|
314
|
-
// handle the toggle if needed
|
|
315
|
-
if (props.toggle) toggle()
|
|
316
|
-
// handle the URL case
|
|
317
|
-
if (props.url) openURL(props.url)
|
|
318
|
-
// handle the callback case
|
|
319
|
-
if (props.handler) {
|
|
320
|
-
try {
|
|
321
|
-
await props.handler(props.context, isToggled.value)
|
|
322
|
-
} catch (error) {
|
|
323
|
-
// in case an error is raised we assume toggling has failed
|
|
324
|
-
if (props.toggle) toggle()
|
|
325
|
-
throw error
|
|
326
|
-
}
|
|
327
|
-
return
|
|
328
|
-
}
|
|
329
|
-
// handle the route case
|
|
330
|
-
if (props.route) {
|
|
331
|
-
// allow to directly call a given URL, eg OAuth callback
|
|
332
|
-
if (props.route.url) {
|
|
333
|
-
location.href = props.route.url
|
|
334
|
-
} else {
|
|
335
|
-
// process route params
|
|
336
|
-
router.push(Object.assign({
|
|
337
|
-
query: bindRouteParams('query'),
|
|
338
|
-
params: bindRouteParams('params')
|
|
339
|
-
}, _.omit(props.route, ['query', 'params']))).catch(() => {})
|
|
340
|
-
}
|
|
341
|
-
return
|
|
342
|
-
}
|
|
343
|
-
// handle the dialog case
|
|
344
|
-
if (props.dialog) {
|
|
345
|
-
let dialog = props.dialog
|
|
346
|
-
const component = _.get(props.dialog, 'component')
|
|
347
|
-
if (component) {
|
|
348
|
-
dialog = {
|
|
349
|
-
component: 'KDialog',
|
|
350
|
-
componentProps: _.clone(dialog)
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
$q.dialog(dialog)
|
|
354
|
-
.onOk((result) => {
|
|
355
|
-
emit('dialog-confirmed', props.context, result)
|
|
356
|
-
})
|
|
357
|
-
.onCancel((result) => {
|
|
358
|
-
emit('dialog-canceled', props.context, result)
|
|
359
|
-
})
|
|
360
|
-
}
|
|
361
|
-
// notify listeners
|
|
362
|
-
emit('triggered', props.context, isToggled.value)
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// watch
|
|
366
|
-
watch(() => props.toggled, (value) => {
|
|
367
|
-
if (isToggled.value !== value) isToggled.value = value
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
// expose
|
|
371
|
-
return {
|
|
372
|
-
isToggled,
|
|
373
|
-
computedLabel,
|
|
374
|
-
computedIcon,
|
|
375
|
-
computedColor,
|
|
376
|
-
computedDisabled,
|
|
377
|
-
computedTooltip,
|
|
378
|
-
computedBadgeLabel,
|
|
379
|
-
dense,
|
|
380
|
-
onClicked
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
</script>
|
|
385
|
-
|
|
386
|
-
<style lang="scss" scoped>
|
|
387
|
-
.k-action-fab, .k-action-fab-action {
|
|
388
|
-
border: 2px solid var(--q-secondary);
|
|
389
|
-
}
|
|
390
|
-
.k-action-tab-active {
|
|
391
|
-
border-bottom: solid 2px;
|
|
392
|
-
}
|
|
393
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!--
|
|
3
|
+
Button renderer
|
|
4
|
+
-->
|
|
5
|
+
<q-btn v-if="renderer === 'button'"
|
|
6
|
+
:id="id"
|
|
7
|
+
no-caps
|
|
8
|
+
no-wrap
|
|
9
|
+
:color="computedColor"
|
|
10
|
+
:icon="!iconRight ? computedIcon : undefined"
|
|
11
|
+
:icon-right="iconRight ? computedIcon : undefined"
|
|
12
|
+
:size="size"
|
|
13
|
+
flat
|
|
14
|
+
:round="label === null"
|
|
15
|
+
:rounded="label !== null"
|
|
16
|
+
:stack="stack"
|
|
17
|
+
:dense="dense"
|
|
18
|
+
:disable="computedDisabled"
|
|
19
|
+
v-close-popup="closePopup"
|
|
20
|
+
@click="onClicked">
|
|
21
|
+
<!-- label -->
|
|
22
|
+
<div v-if="computedLabel" :class="{ 'ellipsis q-pr-md': iconRight, 'ellipsis q-pl-md': !iconRight }">
|
|
23
|
+
{{ computedLabel }}
|
|
24
|
+
</div>
|
|
25
|
+
<!-- tooltip -->
|
|
26
|
+
<q-tooltip v-if="computedTooltip">
|
|
27
|
+
{{ computedTooltip }}
|
|
28
|
+
</q-tooltip>
|
|
29
|
+
<!-- badge -->
|
|
30
|
+
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
31
|
+
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
32
|
+
</q-badge>
|
|
33
|
+
<!-- extra content -->
|
|
34
|
+
<slot>
|
|
35
|
+
</slot>
|
|
36
|
+
</q-btn>
|
|
37
|
+
<!--
|
|
38
|
+
Form button renderer
|
|
39
|
+
-->
|
|
40
|
+
<q-btn v-else-if="renderer === 'form-button'"
|
|
41
|
+
:id="id"
|
|
42
|
+
no-wrap
|
|
43
|
+
color="primary"
|
|
44
|
+
:outline="outline"
|
|
45
|
+
:size="size"
|
|
46
|
+
:disable="computedDisabled"
|
|
47
|
+
:loading="loading"
|
|
48
|
+
v-close-popup="closePopup"
|
|
49
|
+
@click="onClicked">
|
|
50
|
+
<div class="ellipsis">
|
|
51
|
+
{{ computedLabel }}
|
|
52
|
+
</div>
|
|
53
|
+
</q-btn>
|
|
54
|
+
<!--
|
|
55
|
+
Item renderer
|
|
56
|
+
-->
|
|
57
|
+
<q-item v-else-if="renderer === 'item'"
|
|
58
|
+
:id="id"
|
|
59
|
+
class="full-width"
|
|
60
|
+
clickable
|
|
61
|
+
:dense="dense"
|
|
62
|
+
:disable="computedDisabled"
|
|
63
|
+
v-close-popup="closePopup"
|
|
64
|
+
@click="onClicked">
|
|
65
|
+
<q-item-section v-if="computedIcon || badge" avatar>
|
|
66
|
+
<q-icon v-if="computedIcon" :name="computedIcon" :color="computedColor" :dense="dense" />
|
|
67
|
+
<!-- badge -->
|
|
68
|
+
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
69
|
+
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
70
|
+
</q-badge>
|
|
71
|
+
</q-item-section>
|
|
72
|
+
<q-item-section :class="'text-' + computedColor" no-wrap>
|
|
73
|
+
<q-item-label :lines="1">{{ computedLabel }}</q-item-label>
|
|
74
|
+
</q-item-section>
|
|
75
|
+
</q-item>
|
|
76
|
+
<!--
|
|
77
|
+
Fab renderer
|
|
78
|
+
-->
|
|
79
|
+
<q-btn v-else-if="renderer === 'fab'"
|
|
80
|
+
:id="id"
|
|
81
|
+
class="k-action-fab"
|
|
82
|
+
:icon="computedIcon"
|
|
83
|
+
:color="computedColor"
|
|
84
|
+
:size="size"
|
|
85
|
+
:round="true"
|
|
86
|
+
:dense="dense"
|
|
87
|
+
:disable="computedDisabled"
|
|
88
|
+
@click="onClicked">
|
|
89
|
+
<!-- tooltip -->
|
|
90
|
+
<q-tooltip v-if="computedTooltip" anchor="top middle" self="bottom right">
|
|
91
|
+
{{ computedTooltip }}
|
|
92
|
+
</q-tooltip>
|
|
93
|
+
<!-- badge -->
|
|
94
|
+
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
95
|
+
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
96
|
+
</q-badge>
|
|
97
|
+
</q-btn>
|
|
98
|
+
<!--
|
|
99
|
+
Fab action renderer
|
|
100
|
+
-->
|
|
101
|
+
<q-fab-action v-else-if="renderer === 'fab-action'"
|
|
102
|
+
:id="id"
|
|
103
|
+
class="k-action-fab-action"
|
|
104
|
+
no-caps
|
|
105
|
+
:icon="computedIcon"
|
|
106
|
+
:color="computedColor"
|
|
107
|
+
:label="computedLabel"
|
|
108
|
+
square
|
|
109
|
+
external-label
|
|
110
|
+
:label-position="iconRight ? 'left' : 'right'"
|
|
111
|
+
label-class="bg-primary text-white text-caption k-fab-action"
|
|
112
|
+
:disable="computedDisabled"
|
|
113
|
+
@click="onClicked">
|
|
114
|
+
<!-- badge -->
|
|
115
|
+
<q-badge v-if="badge" v-bind="badge">
|
|
116
|
+
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
117
|
+
</q-badge>
|
|
118
|
+
</q-fab-action>
|
|
119
|
+
<!--
|
|
120
|
+
Tab renderer
|
|
121
|
+
-->
|
|
122
|
+
<q-btn v-else-if="renderer === 'tab'"
|
|
123
|
+
:class="{'k-action-tab-active': isToggled }"
|
|
124
|
+
:id="id"
|
|
125
|
+
no-caps
|
|
126
|
+
no-wrap
|
|
127
|
+
:label="computedLabel"
|
|
128
|
+
:color="computedColor"
|
|
129
|
+
:size="size"
|
|
130
|
+
flat
|
|
131
|
+
square
|
|
132
|
+
:dense="dense"
|
|
133
|
+
:disable="computedDisabled"
|
|
134
|
+
@click="onClicked">
|
|
135
|
+
<!-- tooltip -->
|
|
136
|
+
<q-tooltip v-if="computedTooltip">
|
|
137
|
+
{{ computedTooltip }}
|
|
138
|
+
</q-tooltip>
|
|
139
|
+
<!-- badge -->
|
|
140
|
+
<q-badge v-if="badge" v-bind="badge" :label="computedBadgeLabel">
|
|
141
|
+
<q-icon v-if="badge.icon" v-bind="badge.icon" />
|
|
142
|
+
</q-badge>
|
|
143
|
+
<!-- extra content -->
|
|
144
|
+
<slot>
|
|
145
|
+
</slot>
|
|
146
|
+
</q-btn>
|
|
147
|
+
</template>
|
|
148
|
+
|
|
149
|
+
<script>
|
|
150
|
+
import _ from 'lodash'
|
|
151
|
+
import { ref, toRef, computed, watch } from 'vue'
|
|
152
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
153
|
+
import { useQuasar, openURL } from 'quasar'
|
|
154
|
+
import { i18n } from '../i18n.js'
|
|
155
|
+
import { bindParams } from '../utils/utils.content.js'
|
|
156
|
+
|
|
157
|
+
export default {
|
|
158
|
+
props: {
|
|
159
|
+
id: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: true
|
|
162
|
+
},
|
|
163
|
+
label: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: null
|
|
166
|
+
},
|
|
167
|
+
icon: {
|
|
168
|
+
type: String,
|
|
169
|
+
default: undefined
|
|
170
|
+
},
|
|
171
|
+
iconRight: {
|
|
172
|
+
type: Boolean,
|
|
173
|
+
default: false
|
|
174
|
+
},
|
|
175
|
+
color: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: 'grey-9'
|
|
178
|
+
},
|
|
179
|
+
size: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: 'md'
|
|
182
|
+
},
|
|
183
|
+
outline: {
|
|
184
|
+
type: Boolean,
|
|
185
|
+
default: false
|
|
186
|
+
},
|
|
187
|
+
badge: {
|
|
188
|
+
type: Object,
|
|
189
|
+
default: () => null
|
|
190
|
+
},
|
|
191
|
+
tooltip: {
|
|
192
|
+
type: String,
|
|
193
|
+
default: ''
|
|
194
|
+
},
|
|
195
|
+
disabled: {
|
|
196
|
+
type: [Boolean, Function],
|
|
197
|
+
default: false
|
|
198
|
+
},
|
|
199
|
+
toggled: {
|
|
200
|
+
type: Boolean,
|
|
201
|
+
default: false
|
|
202
|
+
},
|
|
203
|
+
toggle: {
|
|
204
|
+
type: Object,
|
|
205
|
+
default: () => {}
|
|
206
|
+
},
|
|
207
|
+
stack: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
default: false
|
|
210
|
+
},
|
|
211
|
+
loading: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
default: false
|
|
214
|
+
},
|
|
215
|
+
propagate: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
default: true
|
|
218
|
+
},
|
|
219
|
+
context: {
|
|
220
|
+
type: Object,
|
|
221
|
+
default: () => null
|
|
222
|
+
},
|
|
223
|
+
handler: {
|
|
224
|
+
type: Function,
|
|
225
|
+
default: null
|
|
226
|
+
},
|
|
227
|
+
closePopup: {
|
|
228
|
+
type: [Boolean, Number, String],
|
|
229
|
+
default: false
|
|
230
|
+
},
|
|
231
|
+
dialog: {
|
|
232
|
+
type: Object,
|
|
233
|
+
default: null
|
|
234
|
+
},
|
|
235
|
+
route: {
|
|
236
|
+
type: Object,
|
|
237
|
+
default: () => null
|
|
238
|
+
},
|
|
239
|
+
url: {
|
|
240
|
+
type: String,
|
|
241
|
+
default: null
|
|
242
|
+
},
|
|
243
|
+
renderer: {
|
|
244
|
+
type: String,
|
|
245
|
+
default: 'button',
|
|
246
|
+
validator: (value) => {
|
|
247
|
+
return ['button', 'form-button', 'item', 'fab', 'fab-action', 'tab'].includes(value)
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
inheritAttrs: false,
|
|
252
|
+
emits: ['triggered', 'toggled', 'dialog-confirmed', 'dialog-canceled'],
|
|
253
|
+
setup (props, { emit }) {
|
|
254
|
+
// data
|
|
255
|
+
const route = useRoute()
|
|
256
|
+
const router = useRouter()
|
|
257
|
+
const $q = useQuasar()
|
|
258
|
+
const isToggled = _.has(props, 'toggle.value') ? toRef(props.toggle, 'value') : ref(props.toggled)
|
|
259
|
+
|
|
260
|
+
// computed
|
|
261
|
+
const computedLabel = computed(() => {
|
|
262
|
+
// Check also for translation key or already translated message
|
|
263
|
+
if (isToggled.value && _.has(props.toggle, 'label')) return i18n.tie(props.toggle.label)
|
|
264
|
+
return i18n.tie(props.label)
|
|
265
|
+
})
|
|
266
|
+
const computedIcon = computed(() => {
|
|
267
|
+
if (isToggled.value && _.has(props.toggle, 'icon')) return props.toggle.icon
|
|
268
|
+
return props.icon
|
|
269
|
+
})
|
|
270
|
+
const computedColor = computed(() => {
|
|
271
|
+
if (isToggled.value) return _.get(props.toggle, 'color', 'accent')
|
|
272
|
+
return props.color
|
|
273
|
+
})
|
|
274
|
+
const computedDisabled = computed(() => {
|
|
275
|
+
if (!props.disabled) return false
|
|
276
|
+
if (typeof props.disabled === 'function') return props.disabled()
|
|
277
|
+
return props.disabled
|
|
278
|
+
})
|
|
279
|
+
const computedTooltip = computed(() => {
|
|
280
|
+
if (computedDisabled.value) return
|
|
281
|
+
// Check also for translation key or already translated message
|
|
282
|
+
if (isToggled.value && _.has(props.toggle, 'tooltip')) return i18n.tie(props.toggle.tooltip)
|
|
283
|
+
return i18n.tie(props.tooltip)
|
|
284
|
+
})
|
|
285
|
+
const computedBadgeLabel = computed(() => {
|
|
286
|
+
// Check also for translation key or already translated message
|
|
287
|
+
if (props.badge && _.has(props.badge, 'label')) return i18n.tie(props.badge.label)
|
|
288
|
+
// Take care that changing this to null or '' breaks the display in Quasar
|
|
289
|
+
return undefined
|
|
290
|
+
})
|
|
291
|
+
const dense = computed(() => {
|
|
292
|
+
return $q.screen.lt.sm
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
// functions
|
|
296
|
+
function toggle () {
|
|
297
|
+
isToggled.value = !isToggled.value
|
|
298
|
+
emit('toggled', props.context, isToggled.value)
|
|
299
|
+
}
|
|
300
|
+
function bindRouteParams (path) {
|
|
301
|
+
// When action is created from code we can directly inject the params.
|
|
302
|
+
// However, when created from the config we need to manage dynamic values.
|
|
303
|
+
// A parameter like ':xxx' in config means xxx is a dynamic property of
|
|
304
|
+
// the current route or the context object, not a static value.
|
|
305
|
+
// We bind the target params object to both possible context.
|
|
306
|
+
const currentParams = _.get(route, path, {})
|
|
307
|
+
const targetParams = _.get(props.route, path, {})
|
|
308
|
+
const routeParams = bindParams(targetParams, currentParams)
|
|
309
|
+
const contextParams = bindParams(targetParams, props.context)
|
|
310
|
+
return _.merge(routeParams, contextParams)
|
|
311
|
+
}
|
|
312
|
+
async function onClicked (event) {
|
|
313
|
+
if (!props.propagate) event.stopPropagation()
|
|
314
|
+
// handle the toggle if needed
|
|
315
|
+
if (props.toggle) toggle()
|
|
316
|
+
// handle the URL case
|
|
317
|
+
if (props.url) openURL(props.url)
|
|
318
|
+
// handle the callback case
|
|
319
|
+
if (props.handler) {
|
|
320
|
+
try {
|
|
321
|
+
await props.handler(props.context, isToggled.value)
|
|
322
|
+
} catch (error) {
|
|
323
|
+
// in case an error is raised we assume toggling has failed
|
|
324
|
+
if (props.toggle) toggle()
|
|
325
|
+
throw error
|
|
326
|
+
}
|
|
327
|
+
return
|
|
328
|
+
}
|
|
329
|
+
// handle the route case
|
|
330
|
+
if (props.route) {
|
|
331
|
+
// allow to directly call a given URL, eg OAuth callback
|
|
332
|
+
if (props.route.url) {
|
|
333
|
+
location.href = props.route.url
|
|
334
|
+
} else {
|
|
335
|
+
// process route params
|
|
336
|
+
router.push(Object.assign({
|
|
337
|
+
query: bindRouteParams('query'),
|
|
338
|
+
params: bindRouteParams('params')
|
|
339
|
+
}, _.omit(props.route, ['query', 'params']))).catch(() => {})
|
|
340
|
+
}
|
|
341
|
+
return
|
|
342
|
+
}
|
|
343
|
+
// handle the dialog case
|
|
344
|
+
if (props.dialog) {
|
|
345
|
+
let dialog = props.dialog
|
|
346
|
+
const component = _.get(props.dialog, 'component')
|
|
347
|
+
if (component) {
|
|
348
|
+
dialog = {
|
|
349
|
+
component: 'KDialog',
|
|
350
|
+
componentProps: _.clone(dialog)
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
$q.dialog(dialog)
|
|
354
|
+
.onOk((result) => {
|
|
355
|
+
emit('dialog-confirmed', props.context, result)
|
|
356
|
+
})
|
|
357
|
+
.onCancel((result) => {
|
|
358
|
+
emit('dialog-canceled', props.context, result)
|
|
359
|
+
})
|
|
360
|
+
}
|
|
361
|
+
// notify listeners
|
|
362
|
+
emit('triggered', props.context, isToggled.value)
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// watch
|
|
366
|
+
watch(() => props.toggled, (value) => {
|
|
367
|
+
if (isToggled.value !== value) isToggled.value = value
|
|
368
|
+
})
|
|
369
|
+
|
|
370
|
+
// expose
|
|
371
|
+
return {
|
|
372
|
+
isToggled,
|
|
373
|
+
computedLabel,
|
|
374
|
+
computedIcon,
|
|
375
|
+
computedColor,
|
|
376
|
+
computedDisabled,
|
|
377
|
+
computedTooltip,
|
|
378
|
+
computedBadgeLabel,
|
|
379
|
+
dense,
|
|
380
|
+
onClicked
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
</script>
|
|
385
|
+
|
|
386
|
+
<style lang="scss" scoped>
|
|
387
|
+
.k-action-fab, .k-action-fab-action {
|
|
388
|
+
border: 2px solid var(--q-secondary);
|
|
389
|
+
}
|
|
390
|
+
.k-action-tab-active {
|
|
391
|
+
border-bottom: solid 2px;
|
|
392
|
+
}
|
|
393
|
+
</style>
|