@kalisio/kdk 2.5.2 → 2.6.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.
Files changed (535) hide show
  1. package/.github/workflows/main.yaml +35 -6
  2. package/client.globe.js +8 -0
  3. package/client.js +8 -0
  4. package/client.map.js +8 -0
  5. package/core/api/hooks/hooks.push.js +3 -2
  6. package/core/api/hooks/hooks.tags.js +56 -0
  7. package/core/api/models/tags.model.mongodb.js +8 -0
  8. package/core/api/services/index.js +33 -2
  9. package/core/api/services/tags/tags.hooks.js +47 -0
  10. package/core/client/api.js +5 -5
  11. package/core/client/components/KActivity.vue +3 -2
  12. package/core/client/components/KChip.vue +2 -2
  13. package/core/client/components/KEditor.vue +3 -1
  14. package/core/client/components/KFollower.vue +4 -4
  15. package/core/client/components/KStore.vue +1 -1
  16. package/core/client/components/KTab.vue +20 -7
  17. package/core/client/components/account/KProfile.vue +9 -25
  18. package/core/client/components/action/KAction.vue +10 -10
  19. package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
  20. package/core/client/components/app/KHome.vue +3 -2
  21. package/core/client/components/collection/KFilter.vue +5 -4
  22. package/core/client/components/collection/KGrid.vue +5 -1
  23. package/core/client/components/collection/KItemsFilter.vue +47 -0
  24. package/core/client/components/collection/KItemsSorter.vue +42 -0
  25. package/core/client/components/collection/KScrollDown.vue +2 -2
  26. package/core/client/components/collection/KSearchFilterControl.vue +3 -2
  27. package/core/client/components/collection/KSorter.vue +33 -37
  28. package/core/client/components/collection/KTagsFilterControl.vue +14 -40
  29. package/core/client/components/collection/KTagsFilterView.vue +10 -45
  30. package/core/client/components/collection/KTimeFilterControl.vue +6 -7
  31. package/core/client/components/collection/KTimeFilterView.vue +13 -22
  32. package/core/client/components/collection/KTimeLine.vue +18 -9
  33. package/core/client/components/form/KColorField.vue +13 -6
  34. package/core/client/components/form/KColorScaleField.vue +7 -12
  35. package/core/client/components/form/KFileField.vue +118 -89
  36. package/core/client/components/form/KForm.vue +30 -18
  37. package/core/client/components/form/KIconField.vue +4 -1
  38. package/core/client/components/form/KNumberField.vue +9 -2
  39. package/core/client/components/form/KSelectField.vue +1 -4
  40. package/core/client/components/form/KTagField.vue +229 -0
  41. package/core/client/components/form/KTextField.vue +4 -0
  42. package/core/client/components/form/KTextareaField.vue +3 -1
  43. package/core/client/components/input/KShapePicker.vue +5 -5
  44. package/core/client/components/layout/KFab.vue +32 -20
  45. package/core/client/components/layout/KPage.vue +11 -6
  46. package/core/client/components/layout/KWindow.vue +5 -0
  47. package/core/client/components/media/index.js +2 -6
  48. package/core/client/components/menu/KMenu.vue +12 -10
  49. package/core/client/components/menu/KSubMenu.vue +12 -12
  50. package/core/client/components/messages/KMessageCard.vue +13 -12
  51. package/core/client/components/messages/KMessageComposer.vue +13 -9
  52. package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
  53. package/core/client/components/tags/KTagFilter.vue +99 -0
  54. package/core/client/components/tags/KTagItem.vue +65 -0
  55. package/core/client/components/tags/KTagManager.vue +198 -0
  56. package/core/client/components/tags/KTagSelection.vue +82 -0
  57. package/core/client/components/time/KDate.vue +3 -17
  58. package/core/client/components/time/KDateTime.vue +1 -1
  59. package/core/client/components/time/KTime.vue +0 -4
  60. package/core/client/composables/collection-filter.js +41 -2
  61. package/core/client/composables/collection.js +3 -3
  62. package/core/client/composables/index.js +1 -0
  63. package/core/client/composables/pwa.js +13 -0
  64. package/core/client/composables/session.js +7 -8
  65. package/core/client/composables/user.js +36 -0
  66. package/core/client/directives/index.js +1 -0
  67. package/core/client/directives/v-drop-file.js +174 -0
  68. package/core/client/document.js +2 -1
  69. package/core/client/exporter.js +17 -3
  70. package/core/client/i18n/core_en.json +34 -7
  71. package/core/client/i18n/core_fr.json +36 -9
  72. package/core/client/i18n.js +26 -11
  73. package/core/client/layout.js +5 -5
  74. package/core/client/mixins/mixin.base-activity.js +8 -5
  75. package/core/client/mixins/mixin.base-editor.js +2 -1
  76. package/core/client/mixins/mixin.base-field.js +3 -2
  77. package/core/client/mixins/mixin.base-item.js +12 -10
  78. package/core/client/mixins/mixin.service.js +3 -1
  79. package/core/client/platform.js +0 -3
  80. package/core/client/readers/reader.json.js +2 -2
  81. package/core/client/utils/index.js +2 -0
  82. package/core/client/utils/utils.collection.js +6 -6
  83. package/core/client/utils/utils.colors.js +46 -19
  84. package/core/client/utils/utils.files.js +19 -0
  85. package/core/client/utils/utils.locale.js +13 -17
  86. package/core/client/utils/utils.services.js +27 -0
  87. package/core/client/utils/utils.shapes.js +2 -2
  88. package/core/client/utils/utils.tags.js +17 -0
  89. package/core/client/utils/utils.tours.js +31 -0
  90. package/core/common/permissions.js +3 -0
  91. package/core/common/schemas/tags.update.json +35 -0
  92. package/core/common/schemas/users.update-profile.json +1 -1
  93. package/core/common/utils.js +5 -5
  94. package/extras/configs/panes.top.js +11 -0
  95. package/extras/configs/stickies.js +1 -1
  96. package/extras/configs/widgets.left.js +13 -1
  97. package/extras/libs/jsts.min.js +8 -0
  98. package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
  99. package/extras/tests/core/api.mjs +114 -0
  100. package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
  101. package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
  102. package/extras/tests/core/index.mjs +9 -0
  103. package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
  104. package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
  105. package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
  106. package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
  107. package/extras/tests/index.mjs +4 -0
  108. package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
  109. package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
  110. package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
  111. package/extras/tests/map/index.mjs +5 -0
  112. package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
  113. package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
  114. package/extras/tours/fab.js +36 -0
  115. package/extras/tours/layout.js +49 -0
  116. package/extras/tours/pane.left.js +78 -0
  117. package/extras/tours/pane.right.js +145 -0
  118. package/extras/tours/pane.top.js +239 -0
  119. package/map/api/config/layers.cjs +28 -13
  120. package/map/api/hooks/hooks.query.js +12 -7
  121. package/map/api/models/catalog.model.mongodb.js +17 -6
  122. package/map/api/services/catalog/catalog.hooks.js +1 -1
  123. package/map/api/services/index.js +18 -1
  124. package/map/api/services/styles/styles.hooks.js +1 -1
  125. package/map/client/cesium/utils/utils.cesium.js +25 -65
  126. package/map/client/cesium/utils/utils.features.js +1 -0
  127. package/map/client/cesium/utils/utils.geojson.js +1 -0
  128. package/map/client/cesium/utils/utils.style.js +7 -6
  129. package/map/client/components/KFeatureEditor.vue +3 -3
  130. package/map/client/components/KFeaturesChart.vue +4 -4
  131. package/map/client/components/KFeaturesFilterEditor.vue +19 -13
  132. package/map/client/components/KFeaturesFilterManager.vue +7 -4
  133. package/map/client/components/KFeaturesTable.vue +2 -2
  134. package/map/client/components/KLayerEditor.vue +10 -6
  135. package/map/client/components/KMeasureTool.vue +2 -1
  136. package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
  137. package/map/client/components/catalog/KCategoryItem.vue +15 -1
  138. package/map/client/components/catalog/KConnectLayer.vue +2 -2
  139. package/map/client/components/catalog/KCreateView.vue +3 -2
  140. package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
  141. package/map/client/components/catalog/KImportLayer.vue +6 -3
  142. package/map/client/components/catalog/KLayerCategories.vue +8 -6
  143. package/map/client/components/catalog/KLayerItem.vue +12 -2
  144. package/map/client/components/catalog/KLayersList.vue +180 -0
  145. package/map/client/components/catalog/KLayersPanel.vue +146 -36
  146. package/map/client/components/catalog/KLayersSelector.vue +96 -48
  147. package/map/client/components/catalog/KProjectEditor.vue +0 -9
  148. package/map/client/components/catalog/KProjectSelector.vue +3 -2
  149. package/map/client/components/catalog/KProjectsPanel.vue +23 -8
  150. package/map/client/components/catalog/KViewsPanel.vue +18 -8
  151. package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
  152. package/map/client/components/form/KDirectionField.vue +3 -6
  153. package/map/client/components/form/KLayerCategoryField.vue +2 -2
  154. package/map/client/components/form/KOwsServiceField.vue +25 -24
  155. package/map/client/components/form/KSelectLayersField.vue +4 -4
  156. package/map/client/components/form/KSelectViewsField.vue +4 -4
  157. package/map/client/components/legend/KLayerLegend.vue +11 -2
  158. package/map/client/components/legend/KLegend.vue +44 -51
  159. package/map/client/components/location/KLocationCardSection.vue +6 -7
  160. package/map/client/components/location/KLocationMap.vue +23 -13
  161. package/map/client/components/stickies/KLevelSlider.vue +10 -8
  162. package/map/client/components/stickies/KPosition.vue +5 -0
  163. package/map/client/components/styles/KLayerStyleAction.vue +59 -12
  164. package/map/client/components/styles/KStyleEditor.vue +72 -9
  165. package/map/client/components/styles/KStyleEditorSection.vue +82 -33
  166. package/map/client/components/styles/KStyleManager.vue +126 -60
  167. package/map/client/components/styles/KStylePreview.vue +9 -25
  168. package/map/client/components/styles/KStylePreviewItem.vue +22 -1
  169. package/map/client/components/tools/KSearchTool.vue +1 -1
  170. package/map/client/components/widget/KElevationProfile.vue +20 -17
  171. package/map/client/components/widget/KInformationBox.vue +5 -5
  172. package/map/client/components/widget/KMapillaryViewer.vue +2 -1
  173. package/map/client/components/widget/KTimeSeries.vue +11 -9
  174. package/map/client/composables/highlight.js +5 -1
  175. package/map/client/globe.js +2 -0
  176. package/map/client/i18n/map_en.json +33 -8
  177. package/map/client/i18n/map_fr.json +33 -8
  178. package/map/client/leaflet/GradientPath.js +61 -24
  179. package/map/client/leaflet/ShapeMarker.js +12 -5
  180. package/map/client/leaflet/TiledMeshLayer.js +3 -3
  181. package/map/client/leaflet/utils/utils.geojson.js +66 -8
  182. package/map/client/leaflet/utils/utils.style.js +14 -15
  183. package/map/client/mixins/globe/mixin.base-globe.js +181 -34
  184. package/map/client/mixins/globe/mixin.file-layers.js +3 -0
  185. package/map/client/mixins/globe/mixin.geojson-layers.js +190 -36
  186. package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
  187. package/map/client/mixins/globe/mixin.style.js +23 -1
  188. package/map/client/mixins/globe/mixin.tooltip.js +14 -2
  189. package/map/client/mixins/map/mixin.base-map.js +146 -58
  190. package/map/client/mixins/map/mixin.edit-layers.js +18 -15
  191. package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
  192. package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
  193. package/map/client/mixins/map/mixin.map-activity.js +6 -1
  194. package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
  195. package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
  196. package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
  197. package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
  198. package/map/client/mixins/mixin.activity.js +203 -48
  199. package/map/client/mixins/mixin.context.js +11 -11
  200. package/map/client/mixins/mixin.feature-service.js +11 -9
  201. package/map/client/mixins/mixin.weacast.js +5 -3
  202. package/map/client/readers/reader.geojson.js +3 -1
  203. package/map/client/utils/utils.capture.js +3 -3
  204. package/map/client/utils/utils.catalog.js +9 -5
  205. package/map/client/utils/utils.features.js +120 -54
  206. package/map/client/utils/utils.js +25 -10
  207. package/map/client/utils/utils.layers.js +148 -26
  208. package/map/client/utils/utils.location.js +26 -9
  209. package/map/client/utils/utils.schema.js +2 -1
  210. package/map/client/utils/utils.style.js +53 -9
  211. package/map/common/geotiff-grid-source.js +1 -3
  212. package/map/common/opendap-utils.js +0 -1
  213. package/map/common/tms-utils.js +0 -1
  214. package/map/common/wcs-utils.js +0 -1
  215. package/map/common/wfs-utils.js +0 -1
  216. package/map/common/wms-utils.js +7 -1
  217. package/map/common/wmts-utils.js +0 -1
  218. package/package.json +12 -12
  219. package/scripts/init_runner.sh +3 -3
  220. package/scripts/kash/CHANGELOG.md +27 -0
  221. package/scripts/kash/kash.sh +556 -237
  222. package/scripts/kash/scripts/run_tests.sh +44 -5
  223. package/scripts/setup_workspace.sh +23 -13
  224. package/test/api/core/config/default.cjs +2 -1
  225. package/test/api/core/push.test.js +1 -1
  226. package/test/api/core/tags.test.js +62 -0
  227. package/test/api/map/config/default.cjs +2 -1
  228. package/test/api/map/config/layers.json +9 -0
  229. package/test/api/map/data/openradiation.json +13811 -0
  230. package/test/api/map/grid-sources.test.js +1 -3
  231. package/test/api/map/index.test.js +60 -1
  232. package/test/api/map/style.test.js +30 -1
  233. package/test.api.js +1 -1
  234. package/vite/App.vue +18 -0
  235. package/vite/AppWithGlobe.vue +84 -0
  236. package/vite/GlobeActivity.vue +58 -0
  237. package/vite/MapActivity.vue +63 -0
  238. package/vite/MapActivityWithGlobe.vue +63 -0
  239. package/vite/README.md +169 -0
  240. package/vite/config.js +221 -0
  241. package/vite/index_with_globe.html +50 -0
  242. package/vite/index_with_map.html +50 -0
  243. package/vite/package.json +173 -0
  244. package/vite/quasar.variables.scss +17 -0
  245. package/vite/vite.config.js +166 -0
  246. package/vite/yarn.lock +11641 -0
  247. package/core/client/components/media/KImageViewer.vue +0 -68
  248. package/core/client/components/media/KMarkdownViewer.vue +0 -55
  249. package/core/client/components/media/KMediaBrowser.vue +0 -301
  250. package/coverage/base.css +0 -224
  251. package/coverage/block-navigation.js +0 -87
  252. package/coverage/core/api/application.js.html +0 -1870
  253. package/coverage/core/api/authentication.js.html +0 -874
  254. package/coverage/core/api/db.js.html +0 -793
  255. package/coverage/core/api/hooks/hooks.authentication.js.html +0 -139
  256. package/coverage/core/api/hooks/hooks.authorisations.js.html +0 -955
  257. package/coverage/core/api/hooks/hooks.groups.js.html +0 -229
  258. package/coverage/core/api/hooks/hooks.logger.js.html +0 -163
  259. package/coverage/core/api/hooks/hooks.model.js.html +0 -955
  260. package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
  261. package/coverage/core/api/hooks/hooks.push.js.html +0 -265
  262. package/coverage/core/api/hooks/hooks.query.js.html +0 -862
  263. package/coverage/core/api/hooks/hooks.schemas.js.html +0 -298
  264. package/coverage/core/api/hooks/hooks.service.js.html +0 -319
  265. package/coverage/core/api/hooks/hooks.storage.js.html +0 -193
  266. package/coverage/core/api/hooks/hooks.users.js.html +0 -595
  267. package/coverage/core/api/hooks/index.html +0 -266
  268. package/coverage/core/api/hooks/index.js.html +0 -115
  269. package/coverage/core/api/index.html +0 -176
  270. package/coverage/core/api/index.js.html +0 -148
  271. package/coverage/core/api/marshall.js.html +0 -448
  272. package/coverage/core/api/models/groups.model.mongodb.js.html +0 -109
  273. package/coverage/core/api/models/index.html +0 -131
  274. package/coverage/core/api/models/messages.model.mongodb.js.html +0 -121
  275. package/coverage/core/api/models/organisations.model.mongodb.js.html +0 -94
  276. package/coverage/core/api/models/tags.model.mongodb.js.html +0 -115
  277. package/coverage/core/api/models/users.model.mongodb.js.html +0 -115
  278. package/coverage/core/api/services/account/account.hooks.js.html +0 -208
  279. package/coverage/core/api/services/account/account.service.js.html +0 -436
  280. package/coverage/core/api/services/account/index.html +0 -131
  281. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
  282. package/coverage/core/api/services/authorisations/authorisations.service.js.html +0 -532
  283. package/coverage/core/api/services/authorisations/index.html +0 -131
  284. package/coverage/core/api/services/databases/databases.hooks.js.html +0 -193
  285. package/coverage/core/api/services/databases/databases.service.js.html +0 -100
  286. package/coverage/core/api/services/databases/index.html +0 -131
  287. package/coverage/core/api/services/groups/groups.hooks.js.html +0 -178
  288. package/coverage/core/api/services/groups/index.html +0 -116
  289. package/coverage/core/api/services/import-export/import-export.hooks.js.html +0 -184
  290. package/coverage/core/api/services/import-export/import-export.service.js.html +0 -118
  291. package/coverage/core/api/services/import-export/index.html +0 -131
  292. package/coverage/core/api/services/index.html +0 -116
  293. package/coverage/core/api/services/index.js.html +0 -520
  294. package/coverage/core/api/services/mailer/index.html +0 -131
  295. package/coverage/core/api/services/mailer/mailer.hooks.js.html +0 -190
  296. package/coverage/core/api/services/mailer/mailer.service.js.html +0 -118
  297. package/coverage/core/api/services/messages/index.html +0 -116
  298. package/coverage/core/api/services/messages/messages.hooks.js.html +0 -199
  299. package/coverage/core/api/services/organisations/index.html +0 -131
  300. package/coverage/core/api/services/organisations/organisations.hooks.js.html +0 -178
  301. package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
  302. package/coverage/core/api/services/push/index.html +0 -131
  303. package/coverage/core/api/services/push/push.hooks.js.html +0 -190
  304. package/coverage/core/api/services/push/push.service.js.html +0 -121
  305. package/coverage/core/api/services/storage/index.html +0 -131
  306. package/coverage/core/api/services/storage/storage.hooks.js.html +0 -190
  307. package/coverage/core/api/services/storage/storage.service.js.html +0 -172
  308. package/coverage/core/api/services/tags/index.html +0 -116
  309. package/coverage/core/api/services/tags/tags.hooks.js.html +0 -178
  310. package/coverage/core/api/services/users/index.html +0 -131
  311. package/coverage/core/api/services/users/users.hooks.js.html +0 -307
  312. package/coverage/core/api/services/users/users.service.js.html +0 -100
  313. package/coverage/core/api/utils.js.html +0 -118
  314. package/coverage/core/common/errors.js.html +0 -88
  315. package/coverage/core/common/index.html +0 -191
  316. package/coverage/core/common/index.js.html +0 -115
  317. package/coverage/core/common/permissions.js.html +0 -733
  318. package/coverage/core/common/schema.js.html +0 -190
  319. package/coverage/core/common/utils.js.html +0 -226
  320. package/coverage/core/common/utils.offline.js.html +0 -199
  321. package/coverage/favicon.png +0 -0
  322. package/coverage/index.html +0 -461
  323. package/coverage/lcov-report/base.css +0 -224
  324. package/coverage/lcov-report/block-navigation.js +0 -87
  325. package/coverage/lcov-report/core/api/application.js.html +0 -1870
  326. package/coverage/lcov-report/core/api/authentication.js.html +0 -874
  327. package/coverage/lcov-report/core/api/db.js.html +0 -793
  328. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +0 -139
  329. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +0 -955
  330. package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +0 -229
  331. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +0 -163
  332. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +0 -955
  333. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
  334. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +0 -265
  335. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +0 -862
  336. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +0 -298
  337. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +0 -319
  338. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +0 -193
  339. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +0 -595
  340. package/coverage/lcov-report/core/api/hooks/index.html +0 -266
  341. package/coverage/lcov-report/core/api/hooks/index.js.html +0 -115
  342. package/coverage/lcov-report/core/api/index.html +0 -176
  343. package/coverage/lcov-report/core/api/index.js.html +0 -148
  344. package/coverage/lcov-report/core/api/marshall.js.html +0 -448
  345. package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +0 -109
  346. package/coverage/lcov-report/core/api/models/index.html +0 -131
  347. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +0 -121
  348. package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +0 -94
  349. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +0 -115
  350. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +0 -115
  351. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +0 -208
  352. package/coverage/lcov-report/core/api/services/account/account.service.js.html +0 -436
  353. package/coverage/lcov-report/core/api/services/account/index.html +0 -131
  354. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
  355. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +0 -532
  356. package/coverage/lcov-report/core/api/services/authorisations/index.html +0 -131
  357. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +0 -193
  358. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +0 -100
  359. package/coverage/lcov-report/core/api/services/databases/index.html +0 -131
  360. package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +0 -178
  361. package/coverage/lcov-report/core/api/services/groups/index.html +0 -116
  362. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +0 -184
  363. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +0 -118
  364. package/coverage/lcov-report/core/api/services/import-export/index.html +0 -131
  365. package/coverage/lcov-report/core/api/services/index.html +0 -116
  366. package/coverage/lcov-report/core/api/services/index.js.html +0 -520
  367. package/coverage/lcov-report/core/api/services/mailer/index.html +0 -131
  368. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +0 -190
  369. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +0 -118
  370. package/coverage/lcov-report/core/api/services/messages/index.html +0 -116
  371. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +0 -199
  372. package/coverage/lcov-report/core/api/services/organisations/index.html +0 -131
  373. package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +0 -178
  374. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
  375. package/coverage/lcov-report/core/api/services/push/index.html +0 -131
  376. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +0 -190
  377. package/coverage/lcov-report/core/api/services/push/push.service.js.html +0 -121
  378. package/coverage/lcov-report/core/api/services/storage/index.html +0 -131
  379. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +0 -190
  380. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +0 -172
  381. package/coverage/lcov-report/core/api/services/tags/index.html +0 -116
  382. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +0 -178
  383. package/coverage/lcov-report/core/api/services/users/index.html +0 -131
  384. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +0 -307
  385. package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
  386. package/coverage/lcov-report/core/api/utils.js.html +0 -118
  387. package/coverage/lcov-report/core/common/errors.js.html +0 -88
  388. package/coverage/lcov-report/core/common/index.html +0 -191
  389. package/coverage/lcov-report/core/common/index.js.html +0 -115
  390. package/coverage/lcov-report/core/common/permissions.js.html +0 -733
  391. package/coverage/lcov-report/core/common/schema.js.html +0 -190
  392. package/coverage/lcov-report/core/common/utils.js.html +0 -226
  393. package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
  394. package/coverage/lcov-report/favicon.png +0 -0
  395. package/coverage/lcov-report/index.html +0 -461
  396. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -463
  397. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +0 -397
  398. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +0 -1309
  399. package/coverage/lcov-report/map/api/hooks/index.html +0 -161
  400. package/coverage/lcov-report/map/api/hooks/index.js.html +0 -94
  401. package/coverage/lcov-report/map/api/index.html +0 -131
  402. package/coverage/lcov-report/map/api/index.js.html +0 -139
  403. package/coverage/lcov-report/map/api/marshall.js.html +0 -178
  404. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +0 -106
  405. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +0 -127
  406. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
  407. package/coverage/lcov-report/map/api/models/index.html +0 -161
  408. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
  409. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +0 -274
  410. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +0 -610
  411. package/coverage/lcov-report/map/api/services/alerts/index.html +0 -131
  412. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +0 -313
  413. package/coverage/lcov-report/map/api/services/catalog/index.html +0 -116
  414. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +0 -1510
  415. package/coverage/lcov-report/map/api/services/daptiles/index.html +0 -116
  416. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +0 -310
  417. package/coverage/lcov-report/map/api/services/features/features.service.js.html +0 -544
  418. package/coverage/lcov-report/map/api/services/features/index.html +0 -131
  419. package/coverage/lcov-report/map/api/services/index.html +0 -116
  420. package/coverage/lcov-report/map/api/services/index.js.html +0 -946
  421. package/coverage/lcov-report/map/api/services/projects/index.html +0 -116
  422. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +0 -439
  423. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +0 -466
  424. package/coverage/lcov-report/map/common/errors.js.html +0 -94
  425. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +0 -544
  426. package/coverage/lcov-report/map/common/grid.js.html +0 -1612
  427. package/coverage/lcov-report/map/common/index.html +0 -371
  428. package/coverage/lcov-report/map/common/index.js.html +0 -172
  429. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +0 -556
  430. package/coverage/lcov-report/map/common/moment-utils.js.html +0 -157
  431. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +0 -868
  432. package/coverage/lcov-report/map/common/opendap-utils.js.html +0 -826
  433. package/coverage/lcov-report/map/common/permissions.js.html +0 -124
  434. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +0 -418
  435. package/coverage/lcov-report/map/common/tms-utils.js.html +0 -274
  436. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +0 -364
  437. package/coverage/lcov-report/map/common/wcs-utils.js.html +0 -586
  438. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +0 -1033
  439. package/coverage/lcov-report/map/common/wfs-utils.js.html +0 -574
  440. package/coverage/lcov-report/map/common/wms-utils.js.html +0 -451
  441. package/coverage/lcov-report/map/common/wmts-utils.js.html +0 -547
  442. package/coverage/lcov-report/prettify.css +0 -1
  443. package/coverage/lcov-report/prettify.js +0 -2
  444. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  445. package/coverage/lcov-report/sorter.js +0 -196
  446. package/coverage/lcov.info +0 -10392
  447. package/coverage/map/api/hooks/hooks.catalog.js.html +0 -463
  448. package/coverage/map/api/hooks/hooks.features.js.html +0 -397
  449. package/coverage/map/api/hooks/hooks.query.js.html +0 -1309
  450. package/coverage/map/api/hooks/index.html +0 -161
  451. package/coverage/map/api/hooks/index.js.html +0 -94
  452. package/coverage/map/api/index.html +0 -131
  453. package/coverage/map/api/index.js.html +0 -139
  454. package/coverage/map/api/marshall.js.html +0 -178
  455. package/coverage/map/api/models/alerts.model.mongodb.js.html +0 -106
  456. package/coverage/map/api/models/catalog.model.mongodb.js.html +0 -127
  457. package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
  458. package/coverage/map/api/models/index.html +0 -161
  459. package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
  460. package/coverage/map/api/services/alerts/alerts.hooks.js.html +0 -274
  461. package/coverage/map/api/services/alerts/alerts.service.js.html +0 -610
  462. package/coverage/map/api/services/alerts/index.html +0 -131
  463. package/coverage/map/api/services/catalog/catalog.hooks.js.html +0 -313
  464. package/coverage/map/api/services/catalog/index.html +0 -116
  465. package/coverage/map/api/services/daptiles/daptiles.service.js.html +0 -1510
  466. package/coverage/map/api/services/daptiles/index.html +0 -116
  467. package/coverage/map/api/services/features/features.hooks.js.html +0 -310
  468. package/coverage/map/api/services/features/features.service.js.html +0 -544
  469. package/coverage/map/api/services/features/index.html +0 -131
  470. package/coverage/map/api/services/index.html +0 -116
  471. package/coverage/map/api/services/index.js.html +0 -946
  472. package/coverage/map/api/services/projects/index.html +0 -116
  473. package/coverage/map/api/services/projects/projects.hooks.js.html +0 -439
  474. package/coverage/map/common/dynamic-grid-source.js.html +0 -466
  475. package/coverage/map/common/errors.js.html +0 -94
  476. package/coverage/map/common/geotiff-grid-source.js.html +0 -544
  477. package/coverage/map/common/grid.js.html +0 -1612
  478. package/coverage/map/common/index.html +0 -371
  479. package/coverage/map/common/index.js.html +0 -172
  480. package/coverage/map/common/meteo-model-grid-source.js.html +0 -556
  481. package/coverage/map/common/moment-utils.js.html +0 -157
  482. package/coverage/map/common/opendap-grid-source.js.html +0 -868
  483. package/coverage/map/common/opendap-utils.js.html +0 -826
  484. package/coverage/map/common/permissions.js.html +0 -124
  485. package/coverage/map/common/time-based-grid-source.js.html +0 -418
  486. package/coverage/map/common/tms-utils.js.html +0 -274
  487. package/coverage/map/common/wcs-grid-source.js.html +0 -364
  488. package/coverage/map/common/wcs-utils.js.html +0 -586
  489. package/coverage/map/common/weacast-grid-source.js.html +0 -1033
  490. package/coverage/map/common/wfs-utils.js.html +0 -574
  491. package/coverage/map/common/wms-utils.js.html +0 -451
  492. package/coverage/map/common/wmts-utils.js.html +0 -547
  493. package/coverage/prettify.css +0 -1
  494. package/coverage/prettify.js +0 -2
  495. package/coverage/sort-arrow-sprite.png +0 -0
  496. package/coverage/sorter.js +0 -196
  497. package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
  498. package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
  499. package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
  500. package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
  501. package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
  502. package/extras/tours/core/account-profile.js +0 -32
  503. package/extras/tours/core/account.js +0 -143
  504. package/extras/tours/core/add-member.js +0 -75
  505. package/extras/tours/core/add-tag.js +0 -13
  506. package/extras/tours/core/create-group.js +0 -19
  507. package/extras/tours/core/create-organisation.js +0 -19
  508. package/extras/tours/core/create-tag.js +0 -26
  509. package/extras/tours/core/edit-member-role.js +0 -13
  510. package/extras/tours/core/groups.js +0 -65
  511. package/extras/tours/core/join-group.js +0 -13
  512. package/extras/tours/core/login.js +0 -41
  513. package/extras/tours/core/members.js +0 -108
  514. package/extras/tours/core/register.js +0 -61
  515. package/extras/tours/core/send-reset-password.js +0 -14
  516. package/extras/tours/core/tags.js +0 -65
  517. package/extras/tours/map/catalog-panel.js +0 -112
  518. package/extras/tours/map/fab.js +0 -26
  519. package/extras/tours/map/navigation-bar.js +0 -187
  520. package/extras/tours/map/side-nav.js +0 -36
  521. package/test/api/core/test-log-2025-05-26.log +0 -22
  522. package/test/api/map/test-log-2025-05-26.log +0 -12
  523. package/test/client/core/api.js +0 -361
  524. package/test/client/core/index.js +0 -9
  525. package/test/client/index.js +0 -4
  526. package/test/client/map/index.js +0 -5
  527. package/test.client.js +0 -1
  528. /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
  529. /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
  530. /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
  531. /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
  532. /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
  533. /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
  534. /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
  535. /package/extras/tours/{map/timeline.js → pane.bottom.js} +0 -0
@@ -1,44 +1,54 @@
1
1
  <template>
2
- <div>
3
- <q-expansion-item
4
- v-model="isOpened"
5
- group="editor"
6
- header-class="bg-grey-2"
7
- :dense="dense"
8
- >
9
- <template v-slot:header>
10
- <q-item-section v-if="label">
11
- {{ $t(label) }}
12
- </q-item-section>
13
- <q-item-section v-if="!isOpened" side>
14
- <KStylePreview :style="style[type]" :type="type" />
15
- </q-item-section>
16
- </template>
17
- <q-list v-hover="{ enter: onEnter }">
18
- <slot />
19
- </q-list>
20
- <KStyleTip
21
- v-model="showTip"
22
- :style="style[type]"
23
- :type="type"
24
- target="#style-editor"
25
- anchor="top right"
26
- self="center middle"
27
- no-parent-event
28
- @update:model-value="onUpdated"
29
- />
30
- </q-expansion-item>
31
-
32
- </div>
2
+ <q-expansion-item
3
+ ref="expansionItemRef"
4
+ v-model="isOpened"
5
+ group="editor"
6
+ header-class="bg-grey-2"
7
+ :dense="dense"
8
+ :disable="!isEnabled"
9
+ :class="{ 'k-disabled': !isEnabled }"
10
+ >
11
+ <template v-slot:header>
12
+ <q-item-section v-if="canBeDisabled" class="col-auto">
13
+ <q-checkbox
14
+ v-model="isEnabled"
15
+ size="xs"
16
+ />
17
+ </q-item-section>
18
+ <q-item-section v-if="label">
19
+ {{ $t(label) }}
20
+ </q-item-section>
21
+ <q-item-section v-if="!isOpened && isEnabled" side>
22
+ <KStylePreview :style="style[type]" :type="type" />
23
+ </q-item-section>
24
+ </template>
25
+ <q-list v-hover="{ enter: onEnter }">
26
+ <slot />
27
+ </q-list>
28
+ <KStyleTip
29
+ v-model="showTip"
30
+ :style="style[type]"
31
+ :type="type"
32
+ target="#style-editor"
33
+ anchor="top right"
34
+ self="center middle"
35
+ no-parent-event
36
+ @update:model-value="onUpdated"
37
+ />
38
+ </q-expansion-item>
33
39
  </template>
34
40
 
35
41
  <script setup>
36
- import { ref, watch } from 'vue'
42
+ import { ref, watch, onMounted } from 'vue'
37
43
  import KStylePreview from './KStylePreview.vue'
38
44
  import KStyleTip from './KStyleTip.vue'
39
45
 
40
46
  // Props
41
- defineProps({
47
+ const props = defineProps({
48
+ modelValue: {
49
+ type: Boolean,
50
+ required: true
51
+ },
42
52
  label: {
43
53
  type: String,
44
54
  required: true
@@ -57,10 +67,19 @@ defineProps({
57
67
  dense: {
58
68
  type: Boolean,
59
69
  default: false
70
+ },
71
+ canBeDisabled: {
72
+ type: Boolean,
73
+ default: true
60
74
  }
61
75
  })
62
76
 
77
+ // Emits
78
+ const emit = defineEmits(['update:model-value'])
79
+
63
80
  // Data
81
+ const expansionItemRef = ref(null)
82
+ const isEnabled = ref(props.modelValue)
64
83
  const isOpened = ref(false)
65
84
  const showTip = ref(false)
66
85
 
@@ -68,6 +87,14 @@ const showTip = ref(false)
68
87
  watch(isOpened, (value) => {
69
88
  setTimeout(() => { showTip.value = value }, 500)
70
89
  })
90
+ watch(() => props.modelValue, (value) => {
91
+ isEnabled.value = value
92
+ if (!value) isOpened.value = false
93
+ })
94
+ watch(isEnabled, (value) => {
95
+ emit('update:model-value', value)
96
+ removeQuasarDisabledClass()
97
+ })
71
98
 
72
99
  // Functions
73
100
  function onEnter () {
@@ -76,4 +103,26 @@ function onEnter () {
76
103
  function onUpdated (value) {
77
104
  if (showTip.value !== value) showTip.value = value
78
105
  }
106
+ // Quasar "disabled" css class apply a "not-allowed" cursor, but we don't want that on the checkbox
107
+ // So we need to remove this class and apply a custom class that mimic the style, but without the cursor property
108
+ function removeQuasarDisabledClass () {
109
+ if (isEnabled.value) return
110
+ if (expansionItemRef.value) {
111
+ setTimeout(() => {
112
+ const target = expansionItemRef.value.$el.querySelector('.disabled')
113
+ if (target) target.classList.remove('disabled')
114
+ }, 100)
115
+ }
116
+ }
117
+
118
+ onMounted(() => {
119
+ removeQuasarDisabledClass()
120
+ })
79
121
  </script>
122
+
123
+ <style lang="scss">
124
+ .k-disabled {
125
+ opacity: 0.6 !important;
126
+ outline: 0 !important;
127
+ }
128
+ </style>
@@ -2,7 +2,7 @@
2
2
  <div class="column">
3
3
  <div id="style-manager-header"
4
4
  v-if="title || (toolbar && toolbar.length)"
5
- class="q-px-md q-mt-md"
5
+ class="full-width"
6
6
  >
7
7
  <div v-if="title" class="ellipsis text-h6">
8
8
  {{ $tie(title) }}
@@ -10,54 +10,28 @@
10
10
  <KPanel
11
11
  id="style-manager-toolbar"
12
12
  :content="toolbar"
13
+ class="q-pr-sm no-wrap"
13
14
  />
14
- <QSeparator inset />
15
+ <div class="row justify-center q-mt-xs">
16
+ <KTagSelection :selection="tagsSelection" @selection-changed="onTagSelectionChanged" />
17
+ </div>
15
18
  </div>
16
19
  <div id="style-manager-content">
17
20
  <q-tab-panels v-model="viewMode" animated>
18
- <q-tab-panel name="list">
21
+ <q-tab-panel name="list" class="q-pa-none">
19
22
  <KGrid
20
23
  service="styles"
21
24
  :append-items="true"
22
25
  :base-query="baseQuery"
23
26
  :filter-query="filterQuery"
27
+ :nb-items-per-page="24"
28
+ :renderer="renderer"
24
29
  class="fit"
25
- :renderer="{
26
- component: 'styles/KStylePreviewItem',
27
- options: {
28
- avatar: false
29
- },
30
- actions: [
31
- {
32
- id: 'apply-to-layer',
33
- component: 'menu/KMenu',
34
- icon: 'las la-layer-group',
35
- tooltip: 'KStyleManager.APPLY_TO_LAYER',
36
- actionRenderer: 'item',
37
- content: layerMenuContent
38
- },
39
- {
40
- id: 'apply-to-selection',
41
- icon: 'las la-object-group',
42
- tooltip: 'KStyleManager.APPLY_TO_SELECTION',
43
- handler: applyToSelection
44
- },
45
- {
46
- id: 'edit-style',
47
- icon: 'las la-edit',
48
- tooltip: 'KStyleManager.EDIT',
49
- handler: editStyle
50
- },
51
- {
52
- id: 'delete-style',
53
- icon: 'las la-trash',
54
- tooltip: 'KStyleManager.DELETE',
55
- handler: { name: 'removeItem', params: ['confirm'] }
56
- },
57
- ],
58
- dense: true,
59
- class: 'col-12'
60
- }"
30
+ />
31
+ <KFollower
32
+ :follower="follower"
33
+ targetId="left-window-magnet"
34
+ anchor="bottom-right"
61
35
  />
62
36
  </q-tab-panel>
63
37
  <q-tab-panel name="editor">
@@ -79,12 +53,14 @@
79
53
  <script setup>
80
54
  import _ from 'lodash'
81
55
  import sift from 'sift'
82
- import { computed, ref } from 'vue'
83
- import { Filter, Sorter } from '@kalisio/kdk/core.client'
56
+ import { computed, ref, onMounted } from 'vue'
84
57
  import { useCurrentActivity } from '../../composables/activity.js'
85
58
  import { isLayerStyleEditable, editLayerStyle, updateLayerWithFiltersStyle } from '../../utils/utils.layers.js'
86
59
  import { editFeaturesStyle } from '../../utils/utils.features.js'
60
+ import { getTagsFilterOptions } from '../../../../core/client/utils/utils.tags.js'
87
61
  import KGrid from '../../../../core/client/components/collection/KGrid.vue'
62
+ import KFollower from '../../../../core/client/components/KFollower.vue'
63
+ import KTagSelection from '../../../../core/client/components/tags/KTagSelection.vue'
88
64
  import KStyleEditor from './KStyleEditor.vue'
89
65
 
90
66
  // Props
@@ -100,49 +76,129 @@ const { getSelectedFeaturesByLayer, CurrentActivity } = useCurrentActivity()
100
76
  const styleEditor = ref(null)
101
77
  const style = ref(null)
102
78
  const viewMode = ref('list')
79
+ const baseQuery = ref({ $sort: { name: 1 } })
80
+ const searchString = ref('')
81
+ const tagsOptions = ref([])
82
+ const tagsSelection = ref([])
83
+ const follower = {
84
+ component: 'layout/KFab',
85
+ direction: 'up',
86
+ alignment: 'right',
87
+ content: [{
88
+ id: 'create-style',
89
+ icon: 'las la-plus',
90
+ tooltip: 'KStyleManager.CREATE_STYLE',
91
+ handler: editStyle
92
+ }]
93
+ }
103
94
 
104
95
  // Computed
105
- const baseQuery = computed(() => {
106
- return Object.assign({}, Sorter.get().query)
107
- })
108
96
  const filterQuery = computed(() => {
109
- return Object.assign({}, Filter.get().query)
97
+ const query = {}
98
+ if (!_.isEmpty(searchString.value)) {
99
+ query.name = { $regex: searchString.value }
100
+ }
101
+ if (!_.isEmpty(tagsSelection.value)) {
102
+ query['tags.name'] = { $in: _.map(tagsSelection.value, el => el.name) }
103
+ }
104
+ return query
110
105
  })
111
106
  const toolbar = computed(() => {
112
107
  if (viewMode.value === 'editor') return []
113
108
  return [
114
109
  {
115
- component: 'collection/KSorter',
110
+ component: 'tags/KTagFilter',
111
+ id: 'style-manager-tags-filter',
112
+ class: 'q-ml-sm',
113
+ selection: tagsSelection.value,
114
+ alignment: 'left',
115
+ options: tagsOptions.value,
116
+ onSelectionChanged: onTagSelectionChanged
117
+ },
118
+ {
119
+ component: 'collection/KItemsFilter',
120
+ class: 'col',
121
+ value: searchString.value,
122
+ onSearch: (value) => {
123
+ searchString.value = value
124
+ }
125
+ },
126
+ {
127
+ component: 'collection/KItemsSorter',
116
128
  id: 'style-manager-sorter-options',
117
129
  tooltip: 'KStyleManager.SORT',
118
130
  options: [
119
131
  { icon: 'las la-sort-alpha-down', value: { field: 'name', order: 1 }, default: true },
120
132
  { icon: 'las la-sort-alpha-up', value: { field: 'name', order: -1 } }
121
- ]
122
- },
123
- { component: 'collection/KFilter', style: 'max-width: 200px;' },
124
- { component: 'QSpace' },
125
- {
126
- id: 'add-style',
127
- icon: 'las la-plus-circle',
128
- tooltip: 'KStyleManager.CREATE_STYLE',
129
- size: '1rem',
130
- handler: () => { editStyle() }
133
+ ],
134
+ onOptionChanged: (option) => {
135
+ baseQuery.value = { $sort: { [option.field]: option.order } }
136
+ }
131
137
  }
132
138
  ]
133
139
  })
134
- const layerMenuContent = computed(() => {
140
+ const renderer = computed(() => {
135
141
  const visibleLayers = CurrentActivity.value.getLayers().filter(sift({ isVisible: true, scope: 'user' }))
136
- return _.map(visibleLayers, layer => {
142
+ const layerMenuContent = _.map(visibleLayers, layer => {
137
143
  return {
138
144
  id: 'apply-style-to-layer',
139
145
  label: layer.name,
140
146
  handler: (styleToApply) => applyToLayer(layer, styleToApply.item)
141
147
  }
142
148
  })
149
+ return {
150
+ component: 'styles/KStylePreviewItem',
151
+ options: {
152
+ avatar: false
153
+ },
154
+ actions: [
155
+ {
156
+ id: 'apply-to-layer',
157
+ component: 'menu/KMenu',
158
+ icon: 'las la-layer-group',
159
+ tooltip: 'KStyleManager.APPLY_TO_LAYER',
160
+ actionRenderer: 'item',
161
+ dense: true,
162
+ content: layerMenuContent
163
+ },
164
+ {
165
+ id: 'apply-to-selection',
166
+ icon: 'las la-object-group',
167
+ tooltip: 'KStyleManager.APPLY_TO_SELECTION',
168
+ handler: applyToSelection
169
+ },
170
+ {
171
+ id: 'style-menu',
172
+ component: 'menu/KMenu',
173
+ dropdownIcon: 'las la-ellipsis-v',
174
+ actionRenderer: 'item',
175
+ propagate: false,
176
+ dense: true,
177
+ content: [
178
+ {
179
+ id: 'edit-style',
180
+ icon: 'las la-edit',
181
+ label: 'KStyleManager.EDIT',
182
+ handler: editStyle
183
+ },
184
+ {
185
+ id: 'delete-style',
186
+ icon: 'las la-trash',
187
+ label: 'KStyleManager.DELETE',
188
+ handler: { name: 'removeItem', params: ['confirm'] }
189
+ }
190
+ ]
191
+ }
192
+ ],
193
+ dense: true,
194
+ class: 'col-12'
195
+ }
143
196
  })
144
197
 
145
198
  // Functions
199
+ function onTagSelectionChanged (selection) {
200
+ tagsSelection.value = selection
201
+ }
146
202
  async function applyToLayer (layer, styleToApply) {
147
203
  await editLayerStyle(layer, styleToApply)
148
204
  if (CurrentActivity.value.isInMemoryLayer(layer)) {
@@ -154,7 +210,13 @@ function applyToSelection (styleToApply) {
154
210
  _.forEach(getSelectedFeaturesByLayer(), layer => {
155
211
  if (isLayerStyleEditable(layer.layer)) {
156
212
  _.forEach(layer.features, f => {
157
- _.set(f, 'style', _.get(styleToApply, ['item', _.get(type, f.geometry.type, 'point')], null))
213
+ let geometryType = f.geometry.type
214
+ if (_.has(f, 'properties.entityStyle')) {
215
+ // Walls and corridors must be treated as polygons in style editor
216
+ if (_.has(f, 'properties.entityStyle.wall')) geometryType = 'Polygon'
217
+ else if (_.has(f, 'properties.entityStyle.corridor')) geometryType = 'Polygon'
218
+ }
219
+ _.set(f, 'style', _.get(styleToApply, ['item', _.get(type, geometryType, 'point')], null))
158
220
  })
159
221
  if (CurrentActivity.value.isInMemoryLayer(layer.layer)) {
160
222
  CurrentActivity.value.resetLayer(layer.layer)
@@ -170,7 +232,6 @@ function editStyle (styleToEdit) {
170
232
  }
171
233
  function onApplied (style) {
172
234
  viewMode.value = 'list'
173
-
174
235
  // Update layers with filters that use this style
175
236
  const layers = _.filter(CurrentActivity.value?.getLayers ? CurrentActivity.value.getLayers() : [], layer =>
176
237
  _.get(layer, 'scope') === 'user' &&
@@ -180,4 +241,9 @@ function onApplied (style) {
180
241
  function onCanceled () {
181
242
  viewMode.value = 'list'
182
243
  }
244
+
245
+ // Hooks
246
+ onMounted(async () => {
247
+ tagsOptions.value = await getTagsFilterOptions('styles')
248
+ })
183
249
  </script>
@@ -9,8 +9,8 @@
9
9
  </template>
10
10
 
11
11
  <script setup>
12
- import _ from 'lodash'
13
12
  import { computed } from 'vue'
13
+ import { getShapeFromPointStyle, getShapeFromLineStyle, getShapeFromPolygonStyle } from '../../utils/utils.style.js'
14
14
  import KShape from '../../../../core/client/components/media/KShape.vue'
15
15
  import KStyleTip from './KStyleTip.vue'
16
16
 
@@ -35,30 +35,14 @@ const props = defineProps({
35
35
 
36
36
  // Computed
37
37
  const shapeOptions = computed(() => {
38
- const size = props.dense ? ['20px', '20px'] : ['24px', '24px']
39
- // Point
40
- if (props.type === 'point') {
41
- let stroke = _.get(props.style, 'stroke')
42
- if (stroke) {
43
- let width = _.get(stroke, 'width', 1)
44
- if (width > 1) width = width / 4
45
- stroke = { stroke: { width } }
46
- }
47
- return _.merge({}, props.style, { size }, stroke)
48
- }
49
- // Line
50
- if (props.type === 'line') {
51
- let width = _.get(props.style, 'width', 1)
52
- if (width > 1) width = width / 4
53
- return { shape: 'polyline', stroke: _.merge({}, props.style, { width }) }
54
- }
55
- // Polygon
56
- let stroke = _.get(props.style, 'stroke')
57
- if (stroke) {
58
- let width = _.get(stroke, 'width', 1)
59
- if (width > 1) width = width / 4
60
- stroke = { stroke: { width } }
38
+ const size = props.dense ? [20, 20] : [24, 24]
39
+ switch (props.type) {
40
+ case 'point':
41
+ return getShapeFromPointStyle(props.style, size)
42
+ case 'line':
43
+ return getShapeFromLineStyle(props.style, size)
44
+ default:
45
+ return getShapeFromPolygonStyle(props.style, size)
61
46
  }
62
- return _.merge({}, props.style, { shape: 'polygon' }, { size }, stroke)
63
47
  })
64
48
  </script>
@@ -3,6 +3,7 @@
3
3
  v-bind="$props"
4
4
  :actions="itemActions"
5
5
  :dense="dense"
6
+ class="items-center k-style-preview-item"
6
7
  >
7
8
  <template v-slot:item-content>
8
9
  <div
@@ -10,7 +11,14 @@
10
11
  :class="{ 'q-gutter-x-sm': dense, 'q-gutter-x-md': !dense }"
11
12
  >
12
13
  <div class="text-subtitle2">
13
- {{ name }}
14
+ <div>
15
+ {{ name }}
16
+ </div>
17
+ <div>
18
+ <span v-for="tag in tags">
19
+ <q-badge class="q-mx-xs" :style="'background-color: ' + tag.color" :text-color="getTextColor(tag)">{{ tag.name }}</q-badge>
20
+ </span>
21
+ </div>
14
22
  </div>
15
23
  <div
16
24
  class="row item-baseline no-wrap"
@@ -27,6 +35,7 @@
27
35
 
28
36
  <script>
29
37
  import { mixins as kdkCoreMixins } from '../../../../core/client'
38
+ import { getContrastColor } from '../../../../core/client/utils/utils.colors.js'
30
39
  import KItem from '../../../../core/client/components/collection/KItem.vue'
31
40
  import KStylePreview from './KStylePreview.vue'
32
41
 
@@ -46,6 +55,9 @@ export default {
46
55
  name () {
47
56
  return this.item.name
48
57
  },
58
+ tags () {
59
+ return this.item.tags || []
60
+ },
49
61
  pointStyle () {
50
62
  return this.item.point
51
63
  },
@@ -62,7 +74,16 @@ export default {
62
74
  },
63
75
  hasSystemScope () {
64
76
  return this.item.scope === 'system'
77
+ },
78
+ getTextColor (tag) {
79
+ return getContrastColor(tag.color ? tag.color : 'white')
65
80
  }
66
81
  }
67
82
  }
68
83
  </script>
84
+
85
+ <style lang="scss">
86
+ .k-style-preview-item:hover {
87
+ background: $grey-3 !important;
88
+ }
89
+ </style>
@@ -64,7 +64,7 @@ async function createLocationLayer () {
64
64
  type: 'geoJson',
65
65
  isVisible: true,
66
66
  realtime: true,
67
- interactive: false,
67
+ interactive: true,
68
68
  style,
69
69
  popup: { template: '<%= properties.name %>' }
70
70
  },
@@ -6,13 +6,16 @@
6
6
 
7
7
  <script>
8
8
  import _ from 'lodash'
9
+ import config from 'config'
9
10
  import logger from 'loglevel'
10
- import { getCssVar, copyToClipboard, exportFile } from 'quasar'
11
+ import { getCssVar, copyToClipboard, exportFile, Notify } from 'quasar'
11
12
  import along from '@turf/along'
12
13
  import length from '@turf/length'
13
14
  import flatten from '@turf/flatten'
14
15
  import { Units } from '../../../../core/client/units'
15
16
  import { Store } from '../../../../core/client/store'
17
+ import { Events } from '../../../../core/client/events'
18
+ import { api } from '../../../../core/client/api.js'
16
19
  import { KChart, KPanel, KStamp } from '../../../../core/client/components'
17
20
  import { useCurrentActivity, useHighlight } from '../../composables'
18
21
  import { fetchProfileDataset, fetchElevation, extractElevation } from '../../elevation-utils.js'
@@ -342,7 +345,7 @@ export default {
342
345
  const geometry = _.get(this.feature, 'geometry.type')
343
346
  if (geometry !== 'LineString' && geometry !== 'MultiLineString') {
344
347
  logger.warn('[KDK] the selected feature has an invald geometry')
345
- this.$notify({ type: 'negative', message: this.$t('KElevationProfile.INVALID_GEOMETRY') })
348
+ Notify.create({ type: 'negative', message: this.$t('KElevationProfile.INVALID_GEOMETRY') })
346
349
  return
347
350
  }
348
351
  this.highlight(this.feature, false)
@@ -354,10 +357,10 @@ export default {
354
357
  const chartWidth = window.size[0]
355
358
 
356
359
  // Setup the request url options
357
- const endpoint = this.$store.get('capabilities.api.gateway') + '/elevation'
360
+ const endpoint = Store.get('capabilities.api.gateway') + '/elevation'
358
361
  const headers = { 'Content-Type': 'application/json' }
359
362
  // Add the Authorization header if jwt is defined
360
- const jwt = await this.$api.get('storage').getItem(this.$config('gatewayJwt'))
363
+ const jwt = await api.get('storage').getItem(config.gatewayJwt)
361
364
  if (jwt) headers.Authorization = 'Bearer ' + jwt
362
365
 
363
366
  const dismiss = this.$q.notify({
@@ -392,7 +395,7 @@ export default {
392
395
  terrainDataset = dataset
393
396
  this.profile = geojson
394
397
  } catch (error) {
395
- this.$notify({ type: 'negative', message: this.$t('errors.NETWORK_ERROR') })
398
+ Notify.create({ type: 'negative', message: this.$t('errors.NETWORK_ERROR') })
396
399
  }
397
400
 
398
401
  dismiss()
@@ -406,9 +409,9 @@ export default {
406
409
  if (this.profile) {
407
410
  try {
408
411
  await copyToClipboard(JSON.stringify(this.profile))
409
- this.$notify({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_COPIED') })
412
+ Notify.create({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_COPIED') })
410
413
  } catch (error) {
411
- this.$notify({ type: 'negative', message: this.$t('KElevationProfile.CANNOT_COPY_PROFILE') })
414
+ Notify.create({ type: 'negative', message: this.$t('KElevationProfile.CANNOT_COPY_PROFILE') })
412
415
  logger.error(error)
413
416
  }
414
417
  }
@@ -417,8 +420,8 @@ export default {
417
420
  if (this.profile) {
418
421
  const file = this.title + '.geojson'
419
422
  const status = exportFile(file, JSON.stringify(this.profile))
420
- if (status) this.$notify({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_EXPORTED', { file }) })
421
- else this.$notify({ rtpe: 'negative', message: this.$t('KElevationProfile.CANNOT_EXPORT_PROFILE') })
423
+ if (status) Notify.create({ type: 'positive', message: this.$t('KElevationProfile.PROFILE_EXPORTED', { file }) })
424
+ else Notify.create({ rtpe: 'negative', message: this.$t('KElevationProfile.CANNOT_EXPORT_PROFILE') })
422
425
  }
423
426
  }
424
427
  },
@@ -429,17 +432,17 @@ export default {
429
432
  this.debouncedRefresh = _.debounce(this.refresh, 100)
430
433
 
431
434
  // Setup listeners
432
- this.$events.on('units-default-length-changed', this.debouncedRefresh)
433
- this.$events.on('units-default-altitude-changed', this.debouncedRefresh)
434
- if (this.layerStorePath) { this.$events.on(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
435
- if (this.featureStorePath) { this.$events.on(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
435
+ Events.on('units-default-length-changed', this.debouncedRefresh)
436
+ Events.on('units-default-altitude-changed', this.debouncedRefresh)
437
+ if (this.layerStorePath) { Events.on(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
438
+ if (this.featureStorePath) { Events.on(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
436
439
  },
437
440
  beforeUnmount () {
438
441
  // Release listeners
439
- this.$events.off('units-default-length-changed', this.debouncedRefresh)
440
- this.$events.off('units-default-altitude-changed', this.debouncedRefresh)
441
- if (this.layerStorePath) { this.$events.off(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
442
- if (this.featureStorePath) { this.$events.off(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
442
+ Events.off('units-default-length-changed', this.debouncedRefresh)
443
+ Events.off('units-default-altitude-changed', this.debouncedRefresh)
444
+ if (this.layerStorePath) { Events.off(`${_.kebabCase(this.layerStorePath)}-changed`, this.debouncedRefresh) }
445
+ if (this.featureStorePath) { Events.off(`${_.kebabCase(this.featureStorePath)}-changed`, this.debouncedRefresh) }
443
446
  },
444
447
  setup (props) {
445
448
  return {
@@ -22,7 +22,7 @@
22
22
  <script>
23
23
  import _ from 'lodash'
24
24
  import logger from 'loglevel'
25
- import { copyToClipboard, exportFile } from 'quasar'
25
+ import { copyToClipboard, exportFile, Notify } from 'quasar'
26
26
  import { KView, KPanel, KStamp } from '../../../../core/client/components'
27
27
  import { generatePropertiesSchema } from '../../utils'
28
28
  import { useCurrentActivity, useHighlight } from '../../composables'
@@ -108,9 +108,9 @@ export default {
108
108
  if (this.feature) {
109
109
  try {
110
110
  await copyToClipboard(JSON.stringify(this.feature.properties))
111
- this.$notify({ type: 'positive', message: this.$t('KInformationBox.PROPERTIES_COPIED') })
111
+ Notify.create({ type: 'positive', message: this.$t('KInformationBox.PROPERTIES_COPIED') })
112
112
  } catch (error) {
113
- this.$notify({ type: 'negative', message: this.$t('KInformationBox.CANNOT_COPY_PROPERTIES') })
113
+ Notify.create({ type: 'negative', message: this.$t('KInformationBox.CANNOT_COPY_PROPERTIES') })
114
114
  logger.error(error)
115
115
  }
116
116
  }
@@ -125,8 +125,8 @@ export default {
125
125
  _.get(this.layer, 'properties.name')
126
126
  const file = name + '.geojson'
127
127
  const status = exportFile(file, JSON.stringify(this.feature))
128
- if (status) this.$notify({ type: 'negative', message: this.$t('KInformationBox.FEATURE_EXPORTED', { file }) })
129
- else this.$notify({ type: 'negative', message: this.$t('KInformationBox.CANNOT_EXPORT_FEATURE') })
128
+ if (status) Notify.create({ type: 'negative', message: this.$t('KInformationBox.FEATURE_EXPORTED', { file }) })
129
+ else Notify.create({ type: 'negative', message: this.$t('KInformationBox.CANNOT_EXPORT_FEATURE') })
130
130
  }
131
131
  }
132
132
  },