@kalisio/kdk 2.6.3 → 2.7.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 (419) hide show
  1. package/core/api/application.js +2 -4
  2. package/core/api/authentication.js +2 -3
  3. package/core/api/db.js +10 -2
  4. package/core/api/hooks/hooks.authorisations.js +4 -2
  5. package/core/api/hooks/hooks.push.js +6 -2
  6. package/core/api/hooks/hooks.query.js +29 -12
  7. package/core/api/hooks/hooks.users.js +30 -17
  8. package/core/api/models/configurations.model.mongodb.js +4 -0
  9. package/core/api/services/authorisations/authorisations.service.js +1 -1
  10. package/core/api/services/configurations/configurations.hooks.js +33 -0
  11. package/core/api/services/index.js +41 -7
  12. package/core/api/services/messages/messages.hooks.js +9 -3
  13. package/core/client/api.js +14 -1
  14. package/core/client/capabilities.js +1 -6
  15. package/core/client/components/KAvatar.vue +24 -20
  16. package/core/client/components/account/KProfile.vue +10 -71
  17. package/core/client/components/account/index.js +0 -2
  18. package/core/client/components/app/KSettings.vue +1 -0
  19. package/core/client/components/collection/KBoard.vue +4 -3
  20. package/core/client/components/collection/KCardSection.vue +1 -0
  21. package/core/client/components/collection/KGrid.vue +2 -0
  22. package/core/client/components/collection/KTable.vue +5 -1
  23. package/core/client/components/collection/KTimeLine.vue +9 -1
  24. package/core/client/components/collection/index.js +0 -2
  25. package/core/client/components/form/KChipsField.vue +2 -1
  26. package/core/client/components/form/KEmailField.vue +1 -0
  27. package/core/client/components/form/KFileField.vue +22 -1
  28. package/core/client/components/form/KForm.vue +2 -0
  29. package/core/client/components/form/KItemField.vue +1 -0
  30. package/core/client/components/form/KNumberField.vue +1 -0
  31. package/core/client/components/form/KPasswordField.vue +1 -0
  32. package/core/client/components/form/KPhoneField.vue +1 -0
  33. package/core/client/components/form/KPropertyItemField.vue +1 -0
  34. package/core/client/components/form/KResolutionField.vue +1 -0
  35. package/core/client/components/form/KSelectField.vue +31 -0
  36. package/core/client/components/form/KTagField.vue +1 -0
  37. package/core/client/components/form/KTextField.vue +1 -0
  38. package/core/client/components/form/KTokenField.vue +1 -0
  39. package/core/client/components/form/KUnitField.vue +1 -0
  40. package/core/client/components/form/KUrlField.vue +1 -0
  41. package/core/client/components/graphics/KIcon.vue +3 -4
  42. package/core/client/components/layout/KPage.vue +1 -0
  43. package/core/client/components/layout/KWindow.vue +6 -3
  44. package/core/client/components/messages/KMessageComposer.vue +2 -1
  45. package/core/client/components/messages/KMessagesTimeLine.vue +1 -1
  46. package/core/client/components/time/KDate.vue +1 -2
  47. package/core/client/components/time/KDateTime.vue +11 -11
  48. package/core/client/components/time/KTime.vue +1 -1
  49. package/core/client/composables/collection.js +33 -8
  50. package/core/client/composables/errors.js +1 -1
  51. package/core/client/composables/layout.js +9 -9
  52. package/core/client/configurations.js +50 -0
  53. package/core/client/exporter.js +1 -1
  54. package/core/client/i18n/core_en.json +6 -39
  55. package/core/client/i18n/core_fr.json +6 -39
  56. package/core/client/index.js +2 -0
  57. package/core/client/layout.js +8 -8
  58. package/core/client/mixins/mixin.base-activity.js +5 -2
  59. package/core/client/mixins/mixin.base-field.js +3 -3
  60. package/core/client/search.js +2 -1
  61. package/core/client/utils/utils.collection.js +8 -8
  62. package/core/client/utils/utils.items.js +4 -0
  63. package/core/client/utils/utils.push.js +3 -3
  64. package/core/client/utils/utils.session.js +7 -5
  65. package/core/client/utils/utils.shapes.js +38 -7
  66. package/core/client/utils/utils.time.js +21 -22
  67. package/core/common/schemas/users.update-profile.json +3 -2
  68. package/coverage/core/api/application.js.html +1 -1
  69. package/coverage/core/api/authentication.js.html +1 -1
  70. package/coverage/core/api/db.js.html +1 -1
  71. package/coverage/core/api/hooks/hooks.authentication.js.html +1 -1
  72. package/coverage/core/api/hooks/hooks.authorisations.js.html +1 -1
  73. package/coverage/core/api/hooks/hooks.logger.js.html +1 -1
  74. package/coverage/core/api/hooks/hooks.model.js.html +1 -1
  75. package/coverage/core/api/hooks/hooks.push.js.html +22 -10
  76. package/coverage/core/api/hooks/hooks.query.js.html +33 -6
  77. package/coverage/core/api/hooks/hooks.schemas.js.html +1 -1
  78. package/coverage/core/api/hooks/hooks.service.js.html +1 -1
  79. package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
  80. package/coverage/core/api/hooks/hooks.tags.js.html +1 -1
  81. package/coverage/core/api/hooks/hooks.users.js.html +4 -4
  82. package/coverage/core/api/hooks/index.html +23 -23
  83. package/coverage/core/api/hooks/index.js.html +1 -1
  84. package/coverage/core/api/index.html +1 -1
  85. package/coverage/core/api/index.js.html +1 -1
  86. package/coverage/core/api/marshall.js.html +1 -1
  87. package/coverage/core/api/models/configurations.model.mongodb.js.html +1 -1
  88. package/coverage/core/api/models/index.html +1 -1
  89. package/coverage/core/api/models/messages.model.mongodb.js.html +1 -1
  90. package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
  91. package/coverage/core/api/models/users.model.mongodb.js.html +1 -1
  92. package/coverage/core/api/services/account/account.hooks.js.html +1 -1
  93. package/coverage/core/api/services/account/account.service.js.html +1 -1
  94. package/coverage/core/api/services/account/index.html +1 -1
  95. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
  96. package/coverage/core/api/services/authorisations/authorisations.service.js.html +1 -1
  97. package/coverage/core/api/services/authorisations/index.html +1 -1
  98. package/coverage/core/api/services/configurations/configurations.hooks.js.html +1 -1
  99. package/coverage/core/api/services/configurations/index.html +1 -1
  100. package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
  101. package/coverage/core/api/services/databases/databases.service.js.html +1 -1
  102. package/coverage/core/api/services/databases/index.html +1 -1
  103. package/coverage/core/api/services/import-export/import-export.hooks.js.html +1 -1
  104. package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
  105. package/coverage/core/api/services/import-export/index.html +1 -1
  106. package/coverage/core/api/services/index.html +1 -1
  107. package/coverage/core/api/services/index.js.html +1 -1
  108. package/coverage/core/api/services/mailer/index.html +1 -1
  109. package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
  110. package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
  111. package/coverage/core/api/services/messages/index.html +1 -1
  112. package/coverage/core/api/services/messages/messages.hooks.js.html +1 -1
  113. package/coverage/core/api/services/push/index.html +1 -1
  114. package/coverage/core/api/services/push/push.hooks.js.html +1 -1
  115. package/coverage/core/api/services/push/push.service.js.html +1 -1
  116. package/coverage/core/api/services/storage/index.html +1 -1
  117. package/coverage/core/api/services/storage/storage.hooks.js.html +1 -1
  118. package/coverage/core/api/services/storage/storage.service.js.html +1 -1
  119. package/coverage/core/api/services/tags/index.html +1 -1
  120. package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
  121. package/coverage/core/api/services/users/index.html +1 -1
  122. package/coverage/core/api/services/users/users.hooks.js.html +1 -1
  123. package/coverage/core/api/services/users/users.service.js.html +1 -1
  124. package/coverage/core/common/errors.js.html +1 -1
  125. package/coverage/core/common/index.html +1 -1
  126. package/coverage/core/common/index.js.html +1 -1
  127. package/coverage/core/common/permissions.js.html +1 -1
  128. package/coverage/core/common/schema.js.html +1 -1
  129. package/coverage/core/common/utils.js.html +1 -1
  130. package/coverage/core/common/utils.offline.js.html +1 -1
  131. package/coverage/index.html +17 -17
  132. package/coverage/lcov-report/core/api/application.js.html +1 -1
  133. package/coverage/lcov-report/core/api/authentication.js.html +1 -1
  134. package/coverage/lcov-report/core/api/db.js.html +1 -1
  135. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +1 -1
  136. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1 -1
  137. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +1 -1
  138. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +1 -1
  139. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +22 -10
  140. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +33 -6
  141. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +1 -1
  142. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
  143. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
  144. package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +1 -1
  145. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +4 -4
  146. package/coverage/lcov-report/core/api/hooks/index.html +23 -23
  147. package/coverage/lcov-report/core/api/hooks/index.js.html +1 -1
  148. package/coverage/lcov-report/core/api/index.html +1 -1
  149. package/coverage/lcov-report/core/api/index.js.html +1 -1
  150. package/coverage/lcov-report/core/api/marshall.js.html +1 -1
  151. package/coverage/lcov-report/core/api/models/configurations.model.mongodb.js.html +1 -1
  152. package/coverage/lcov-report/core/api/models/index.html +1 -1
  153. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +1 -1
  154. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
  155. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +1 -1
  156. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +1 -1
  157. package/coverage/lcov-report/core/api/services/account/account.service.js.html +1 -1
  158. package/coverage/lcov-report/core/api/services/account/index.html +1 -1
  159. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
  160. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +1 -1
  161. package/coverage/lcov-report/core/api/services/authorisations/index.html +1 -1
  162. package/coverage/lcov-report/core/api/services/configurations/configurations.hooks.js.html +1 -1
  163. package/coverage/lcov-report/core/api/services/configurations/index.html +1 -1
  164. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
  165. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
  166. package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
  167. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +1 -1
  168. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
  169. package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
  170. package/coverage/lcov-report/core/api/services/index.html +1 -1
  171. package/coverage/lcov-report/core/api/services/index.js.html +1 -1
  172. package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
  173. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
  174. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
  175. package/coverage/lcov-report/core/api/services/messages/index.html +1 -1
  176. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +1 -1
  177. package/coverage/lcov-report/core/api/services/push/index.html +1 -1
  178. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
  179. package/coverage/lcov-report/core/api/services/push/push.service.js.html +1 -1
  180. package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
  181. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +1 -1
  182. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +1 -1
  183. package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
  184. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
  185. package/coverage/lcov-report/core/api/services/users/index.html +1 -1
  186. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +1 -1
  187. package/coverage/lcov-report/core/api/services/users/users.service.js.html +1 -1
  188. package/coverage/lcov-report/core/common/errors.js.html +1 -1
  189. package/coverage/lcov-report/core/common/index.html +1 -1
  190. package/coverage/lcov-report/core/common/index.js.html +1 -1
  191. package/coverage/lcov-report/core/common/permissions.js.html +1 -1
  192. package/coverage/lcov-report/core/common/schema.js.html +1 -1
  193. package/coverage/lcov-report/core/common/utils.js.html +1 -1
  194. package/coverage/lcov-report/core/common/utils.offline.js.html +1 -1
  195. package/coverage/lcov-report/index.html +17 -17
  196. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +1 -1
  197. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
  198. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +184 -4
  199. package/coverage/lcov-report/map/api/hooks/index.html +5 -5
  200. package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
  201. package/coverage/lcov-report/map/api/index.html +1 -1
  202. package/coverage/lcov-report/map/api/index.js.html +1 -1
  203. package/coverage/lcov-report/map/api/marshall.js.html +1 -1
  204. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
  205. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +1 -1
  206. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
  207. package/coverage/lcov-report/map/api/models/index.html +1 -1
  208. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
  209. package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +1 -1
  210. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
  211. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
  212. package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
  213. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +1 -1
  214. package/coverage/lcov-report/map/api/services/catalog/index.html +1 -1
  215. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
  216. package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
  217. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +1 -1
  218. package/coverage/lcov-report/map/api/services/features/features.service.js.html +1 -1
  219. package/coverage/lcov-report/map/api/services/features/index.html +1 -1
  220. package/coverage/lcov-report/map/api/services/index.html +1 -1
  221. package/coverage/lcov-report/map/api/services/index.js.html +1 -1
  222. package/coverage/lcov-report/map/api/services/projects/index.html +1 -1
  223. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
  224. package/coverage/lcov-report/map/api/services/styles/index.html +1 -1
  225. package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +1 -1
  226. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
  227. package/coverage/lcov-report/map/common/errors.js.html +1 -1
  228. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +1 -1
  229. package/coverage/lcov-report/map/common/grid.js.html +1 -1
  230. package/coverage/lcov-report/map/common/index.html +1 -1
  231. package/coverage/lcov-report/map/common/index.js.html +1 -1
  232. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
  233. package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
  234. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
  235. package/coverage/lcov-report/map/common/opendap-utils.js.html +1 -1
  236. package/coverage/lcov-report/map/common/permissions.js.html +1 -1
  237. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
  238. package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
  239. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +1 -1
  240. package/coverage/lcov-report/map/common/wcs-utils.js.html +1 -1
  241. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1 -1
  242. package/coverage/lcov-report/map/common/wfs-utils.js.html +1 -1
  243. package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
  244. package/coverage/lcov-report/map/common/wmts-utils.js.html +1 -1
  245. package/coverage/lcov.info +358 -280
  246. package/coverage/map/api/hooks/hooks.catalog.js.html +1 -1
  247. package/coverage/map/api/hooks/hooks.features.js.html +1 -1
  248. package/coverage/map/api/hooks/hooks.query.js.html +184 -4
  249. package/coverage/map/api/hooks/index.html +5 -5
  250. package/coverage/map/api/hooks/index.js.html +1 -1
  251. package/coverage/map/api/index.html +1 -1
  252. package/coverage/map/api/index.js.html +1 -1
  253. package/coverage/map/api/marshall.js.html +1 -1
  254. package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
  255. package/coverage/map/api/models/catalog.model.mongodb.js.html +1 -1
  256. package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
  257. package/coverage/map/api/models/index.html +1 -1
  258. package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
  259. package/coverage/map/api/models/styles.model.mongodb.js.html +1 -1
  260. package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
  261. package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
  262. package/coverage/map/api/services/alerts/index.html +1 -1
  263. package/coverage/map/api/services/catalog/catalog.hooks.js.html +1 -1
  264. package/coverage/map/api/services/catalog/index.html +1 -1
  265. package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
  266. package/coverage/map/api/services/daptiles/index.html +1 -1
  267. package/coverage/map/api/services/features/features.hooks.js.html +1 -1
  268. package/coverage/map/api/services/features/features.service.js.html +1 -1
  269. package/coverage/map/api/services/features/index.html +1 -1
  270. package/coverage/map/api/services/index.html +1 -1
  271. package/coverage/map/api/services/index.js.html +1 -1
  272. package/coverage/map/api/services/projects/index.html +1 -1
  273. package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
  274. package/coverage/map/api/services/styles/index.html +1 -1
  275. package/coverage/map/api/services/styles/styles.hooks.js.html +1 -1
  276. package/coverage/map/common/dynamic-grid-source.js.html +1 -1
  277. package/coverage/map/common/errors.js.html +1 -1
  278. package/coverage/map/common/geotiff-grid-source.js.html +1 -1
  279. package/coverage/map/common/grid.js.html +1 -1
  280. package/coverage/map/common/index.html +1 -1
  281. package/coverage/map/common/index.js.html +1 -1
  282. package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
  283. package/coverage/map/common/moment-utils.js.html +1 -1
  284. package/coverage/map/common/opendap-grid-source.js.html +1 -1
  285. package/coverage/map/common/opendap-utils.js.html +1 -1
  286. package/coverage/map/common/permissions.js.html +1 -1
  287. package/coverage/map/common/time-based-grid-source.js.html +1 -1
  288. package/coverage/map/common/tms-utils.js.html +1 -1
  289. package/coverage/map/common/wcs-grid-source.js.html +1 -1
  290. package/coverage/map/common/wcs-utils.js.html +1 -1
  291. package/coverage/map/common/weacast-grid-source.js.html +1 -1
  292. package/coverage/map/common/wfs-utils.js.html +1 -1
  293. package/coverage/map/common/wms-utils.js.html +1 -1
  294. package/coverage/map/common/wmts-utils.js.html +1 -1
  295. package/coverage/tmp/coverage-1028514-1773134124472-0.json +1 -0
  296. package/coverage/tmp/coverage-1028526-1773134124448-0.json +1 -0
  297. package/coverage/tmp/coverage-1028537-1773134124431-0.json +1 -0
  298. package/coverage/tmp/coverage-1028549-1773134124401-0.json +1 -0
  299. package/coverage/tmp/{coverage-222566-1765963609278-0.json → coverage-1028556-1773134124353-0.json} +1 -1
  300. package/extras/configs/widgets.top.js +3 -3
  301. package/extras/tests/core/collection.mjs +2 -9
  302. package/map/api/hooks/hooks.catalog.js +18 -4
  303. package/map/api/services/catalog/catalog.hooks.js +3 -0
  304. package/map/api/services/features/features.hooks.js +3 -1
  305. package/map/api/services/index.js +2 -6
  306. package/map/api/services/styles/styles.hooks.js +6 -1
  307. package/map/client/components/KFeatureActionButton.vue +9 -3
  308. package/map/client/components/KFeaturesFilterManager.vue +5 -5
  309. package/map/client/components/KFilterCondition.vue +17 -10
  310. package/map/client/components/KLayerEditor.vue +49 -39
  311. package/map/client/components/KMeasureTool.vue +7 -1
  312. package/map/client/components/KTimezoneMap.vue +29 -9
  313. package/map/client/components/catalog/KLayersPanel.vue +26 -16
  314. package/map/client/components/catalog/KLayersSelector.vue +13 -2
  315. package/map/client/components/catalog/KViewsPanel.vue +5 -4
  316. package/map/client/components/form/KSelectLayersField.vue +28 -17
  317. package/map/client/components/form/KSelectViewsField.vue +18 -9
  318. package/map/client/components/form/KTimezoneField.vue +1 -2
  319. package/map/client/components/legend/KVariablesLegend.vue +10 -1
  320. package/map/client/components/location/KLocationCardSection.vue +7 -2
  321. package/map/client/components/location/KLocationMap.vue +31 -7
  322. package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
  323. package/map/client/components/stickies/KZoomControl.vue +1 -1
  324. package/map/client/components/styles/KStyleManager.vue +4 -1
  325. package/map/client/components/widget/KTimeSeries.vue +174 -497
  326. package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
  327. package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
  328. package/map/client/composables/catalog.js +6 -10
  329. package/map/client/composables/highlight.js +12 -9
  330. package/map/client/composables/project.js +1 -1
  331. package/map/client/composables/selection.js +8 -7
  332. package/map/client/composables/weather.js +9 -2
  333. package/map/client/geolocation.js +8 -5
  334. package/map/client/i18n/map_en.json +10 -8
  335. package/map/client/i18n/map_fr.json +9 -7
  336. package/map/client/leaflet/TiledFeatureLayer.js +85 -82
  337. package/map/client/leaflet/utils/utils.geojson.js +3 -3
  338. package/map/client/mixins/globe/mixin.base-globe.js +15 -6
  339. package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
  340. package/map/client/mixins/map/mixin.edit-layers.js +9 -1
  341. package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
  342. package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
  343. package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
  344. package/map/client/mixins/mixin.activity.js +23 -30
  345. package/map/client/mixins/mixin.feature-selection.js +41 -5
  346. package/map/client/planets.js +1 -1
  347. package/map/client/readers/reader.kml.js +2 -3
  348. package/map/client/utils/utils.catalog.js +36 -10
  349. package/map/client/utils/utils.layers.js +39 -8
  350. package/map/client/utils/utils.project.js +4 -0
  351. package/map/client/utils/utils.style.js +37 -7
  352. package/map/client/utils/utils.time-series.js +215 -6
  353. package/map/common/schemas/catalog.update.json +1 -1
  354. package/map/common/weacast-grid-source.js +1 -1
  355. package/package.json +3 -3
  356. package/scripts/kash/CHANGELOG.md +0 -4
  357. package/scripts/kash/README.md +0 -9
  358. package/scripts/kash/kash.sh +45 -40
  359. package/scripts/kash/scripts/run_tests.sh +1 -4
  360. package/test/api/core/authentication.test.js +9 -4
  361. package/test/api/core/config/default.cjs +1 -0
  362. package/test/api/core/hooks.test.js +6 -0
  363. package/test/api/core/index.test.js +43 -18
  364. package/test/api/core/push.test.js +8 -8
  365. package/test/api/core/test-log-2026-03-10.log +60 -0
  366. package/test/api/core/users.test.js +384 -0
  367. package/test/api/map/grid-sources.test.js +1 -1
  368. package/test/api/map/test-log-2026-03-10.log +56 -0
  369. package/vite/package.json +11 -2
  370. package/vite/test/core/composables.test.js +77 -0
  371. package/vite/vitest.config.js +13 -0
  372. package/vite/yarn.lock +1096 -18
  373. package/client/css/core.variables.scss +0 -72
  374. package/client/i18n/core_en.json +0 -744
  375. package/client/i18n/core_fr.json +0 -744
  376. package/client/i18n/map_en.json +0 -800
  377. package/client/i18n/map_fr.json +0 -800
  378. package/client/kdk.client.css +0 -47
  379. package/client/kdk.client.js +0 -41097
  380. package/client/kdk.client.map.css +0 -47
  381. package/client/kdk.client.map.js +0 -38182
  382. package/client/kdk.client.map.min.css +0 -1
  383. package/client/kdk.client.map.min.js +0 -27032
  384. package/client/kdk.client.min.css +0 -1
  385. package/client/kdk.client.min.js +0 -29074
  386. package/client/schemas/capture.create.json +0 -132
  387. package/client/schemas/catalog.update.json +0 -44
  388. package/client/schemas/messages.update.json +0 -16
  389. package/client/schemas/projects.create.json +0 -52
  390. package/client/schemas/projects.update.json +0 -52
  391. package/client/schemas/settings.update.json +0 -286
  392. package/client/schemas/tags.update.json +0 -35
  393. package/client/schemas/users.update-profile.json +0 -34
  394. package/core/client/components/account/KAccount.vue +0 -68
  395. package/core/client/components/account/KDeleteAccountManager.vue +0 -62
  396. package/core/client/components/account/KEmailManager.vue +0 -128
  397. package/core/client/components/account/KPasswordManager.vue +0 -90
  398. package/core/client/components/account/KVerifyEmailManager.vue +0 -105
  399. package/core/client/components/collection/KColumn.vue +0 -227
  400. package/core/client/components/collection/KHistory.vue +0 -113
  401. package/core/client/components/collection/KHistoryEntry.vue +0 -109
  402. package/coverage/tmp/coverage-222524-1765963609350-0.json +0 -1
  403. package/coverage/tmp/coverage-222536-1765963609335-0.json +0 -1
  404. package/coverage/tmp/coverage-222547-1765963609324-0.json +0 -1
  405. package/coverage/tmp/coverage-222559-1765963609309-0.json +0 -1
  406. package/scripts/kash/LICENSE +0 -21
  407. package/test/api/core/test-log-2025-07-31.log +0 -15
  408. package/test/api/core/test-log-2025-10-03.log +0 -18
  409. package/test/api/core/test-log-2025-11-10.log +0 -0
  410. package/test/api/core/test-log-2025-11-12.log +0 -117
  411. package/test/api/core/test-log-2025-11-27.log +0 -0
  412. package/test/api/core/test-log-2025-11-28.log +0 -17
  413. package/test/api/core/test-log-2025-12-09.log +0 -148
  414. package/test/api/core/test-log-2025-12-17.log +0 -58
  415. package/test/api/core/test-log-2026-01-29.log +0 -17
  416. package/test/api/map/test-log-2025-07-23.log +0 -1
  417. package/test/api/map/test-log-2025-11-28.log +0 -33
  418. package/test/api/map/test-log-2025-12-10.log +0 -2
  419. package/test/api/map/test-log-2026-01-06.log +0 -26
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <div v-if="count > 0">
3
+ <KMenu v-if="menu"
4
+ icon="las la-bars" id="time-series-selector"
5
+ :content="actions"
6
+ action-renderer="item"
7
+ :dense="dense"
8
+ :badge="{ color: 'accent', label: count }"
9
+ />
10
+ <KPanel v-else
11
+ id="time-series-selector"
12
+ :content="actions"
13
+ action-renderer="item"
14
+ :dense="dense"
15
+ direction="vertical"
16
+ />
17
+ </div>
18
+ </template>
19
+
20
+ <script setup>
21
+ import _ from 'lodash'
22
+ import { computed } from 'vue'
23
+ import { Store, composables as kCoreComposables } from '../../../../core/client/index.js'
24
+
25
+ // Props
26
+ defineProps({
27
+ dense: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ menu: {
32
+ type: Boolean,
33
+ default: true
34
+ }
35
+ })
36
+
37
+ // Data
38
+ const { CurrentActivityContext } = kCoreComposables.useCurrentActivity()
39
+ const { state } = CurrentActivityContext
40
+
41
+ // Computed
42
+ const actions = computed(() => {
43
+ const timeSeries = []
44
+ for (let i = 0; i < state.timeSeries.length; i++) {
45
+ const timeSerie = state.timeSeries[i]
46
+ // When using list display all available timeseries like tabs
47
+ // When using menu only those that are not yet visible
48
+ if (Store.get('layout.windows.top.gt.sm') || !timeSerie.visible) {
49
+ timeSeries.push(timeSerie)
50
+ }
51
+ }
52
+ return timeSeries.map(timeSerie => ({
53
+ id: timeSerie.id,
54
+ label: timeSerie.label,
55
+ color: timeSerie.visible ? 'primary' : 'grey-9',
56
+ handler: () => showTimeSerie(timeSerie.id)
57
+ }))
58
+ })
59
+ const count = computed(() => {
60
+ return actions.value.length
61
+ })
62
+
63
+ // Functions
64
+ function showTimeSerie (id) {
65
+ // Only one graph visible at a time if no pinning
66
+ // Otherwise only one in addition to the pinned one
67
+ // This is managed by pinning action that will hide once pinned
68
+ _.forEach(state.timeSeries, timeSerie => {
69
+ timeSerie.visible = (timeSerie.id === id) || timeSerie.pinned
70
+ })
71
+ }
72
+ </script>
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <KPanel
3
+ id="time-series-toolbar"
4
+ :content="content"
5
+ :context="context"
6
+ />
7
+ </template>
8
+
9
+ <script setup>
10
+ import { computed, inject } from 'vue'
11
+ import { Store } from '../../../../core/client/store.js'
12
+ import { useCurrentActivity } from '../../composables/activity.js'
13
+
14
+ const { CurrentActivityContext, centerOnSelection, hasProbedLocation, centerOnProbe } = useCurrentActivity()
15
+ const { state } = CurrentActivityContext
16
+
17
+ // Props
18
+ const props = defineProps({
19
+ context: {
20
+ type: Object,
21
+ default: () => null
22
+ }
23
+ })
24
+
25
+ // Data
26
+ const widget = inject('widget')
27
+
28
+ // Computed
29
+ const context = computed(() => {
30
+ return props.context
31
+ })
32
+ const hasSingleSerie = computed(() => {
33
+ return state.timeSeries.length === 1
34
+ })
35
+ const content = computed(() => {
36
+ if (!widget.value) return []
37
+ return [{
38
+ id: 'time-series-selector',
39
+ component: 'KTimeSeriesSelector',
40
+ visible: () => !hasSingleSerie.value && Store.get('layout.windows.top.lt.md')
41
+ }, {
42
+ id: 'restore-time-series-zoom',
43
+ icon: 'las la-undo',
44
+ tooltip: 'KTimeSeries.RESTORE_ZOOM',
45
+ visible: widget.value.isZoomed,
46
+ handler: () => widget.value.onRestoreZoom()
47
+ }, {
48
+ id: 'absolute-time-range',
49
+ component: 'time/KAbsoluteTimeRange'
50
+ }, {
51
+ id: 'relative-time-ranges',
52
+ component: 'menu/KMenu',
53
+ icon: 'las la-history',
54
+ content: [{
55
+ component: 'time/KRelativeTimeRanges',
56
+ ranges: ['last-hour', 'last-2-hours', 'last-3-hours', 'last-6-hours',
57
+ 'last-12-hours', 'last-day', 'last-2-days', 'last-3-days', 'last-week',
58
+ 'next-12-hours', 'next-day', 'next-2-days', 'next-3-days']
59
+ }]
60
+ }, {
61
+ id: 'center-view',
62
+ icon: 'las la-eye',
63
+ tooltip: 'KTimeSeries.CENTER_ON',
64
+ handler: () => {
65
+ if (hasProbedLocation()) centerOnProbe()
66
+ else centerOnSelection()
67
+ }
68
+ }]
69
+ /* TODO: action previously available on KTimeSeries
70
+ {
71
+ id: 'run-options',
72
+ component: 'input/KOptionsChooser',
73
+ icon: 'las la-clock',
74
+ tooltip: 'KTimeSeries.RUN',
75
+ visible: 'hasRunTimes',
76
+ hideSelected: false,
77
+ options: ':runOptions',
78
+ on: { event: 'option-chosen', listener: 'onUpdateRun' }
79
+ }
80
+ */
81
+ })
82
+
83
+ </script>
@@ -1,7 +1,6 @@
1
1
  import _ from 'lodash'
2
2
  import { ref, computed } from 'vue'
3
3
  import * as catalog from '../utils/utils.catalog.js'
4
- import { getCatalogProjectQuery } from '../utils/utils.project.js'
5
4
  import { api } from '../../../core/client/api.js'
6
5
 
7
6
  export function useCatalog (options = {}) {
@@ -30,13 +29,10 @@ export function useCatalog (options = {}) {
30
29
 
31
30
  // Functions
32
31
  async function getLayers (filterQuery = {}) {
33
- const query = Object.assign({},
34
- options.project ? Object.assign(getCatalogProjectQuery(options.project), options.layers) : options.layers,
35
- filterQuery)
36
32
  layers.value = await catalog.getLayers({
37
- query,
33
+ query: Object.assign({}, options.layers, filterQuery),
38
34
  context: options.context,
39
- planetApi: options.planetApi
35
+ project: options.project
40
36
  })
41
37
  return layers.value
42
38
  }
@@ -44,7 +40,7 @@ export function useCatalog (options = {}) {
44
40
  categories.value = await catalog.getCategories({
45
41
  query: options.categories,
46
42
  context: options.context,
47
- planetApi: options.planetApi
43
+ project: options.project
48
44
  })
49
45
  return categories.value
50
46
  }
@@ -52,15 +48,15 @@ export function useCatalog (options = {}) {
52
48
  sublegends.value = await catalog.getSublegends({
53
49
  query: options.sublegends,
54
50
  context: options.context,
55
- planetApi: options.planetApi
51
+ project: options.project
56
52
  })
57
53
  return sublegends.value
58
54
  }
59
55
  async function getViews () {
60
56
  views.value = await catalog.getViews({
61
- query: options.project ? Object.assign(getCatalogProjectQuery(options.project), options.views) : options.views,
57
+ query: options.views,
62
58
  context: options.context,
63
- planetApi: options.planetApi
59
+ project: options.project
64
60
  })
65
61
  return views.value
66
62
  }
@@ -4,7 +4,9 @@ import bbox from '@turf/bbox'
4
4
  import bboxPolygon from '@turf/bbox-polygon'
5
5
  import { uid } from 'quasar'
6
6
  import { unref, onBeforeMount, onBeforeUnmount } from 'vue'
7
- import * as utils from '../utils.js'
7
+ import { getFeatureId } from '../utils/utils.js'
8
+ import * as features from '../utils/utils.features.js' // Named import to avoid conflict with similar function names
9
+ import { isLayerHighlightable } from '../utils/utils.layers.js'
8
10
  import * as composables from '../../../core/client/composables/index.js'
9
11
 
10
12
  export const HighlightsLayerName = uid()
@@ -58,13 +60,13 @@ export function useHighlight (name, options = {}) {
58
60
  let id = `${name}`
59
61
  if (layer) id += `-${_.kebabCase(layer.name)}`
60
62
  if (feature) {
61
- const featureId = utils.getFeatureId(feature, layer)
63
+ const featureId = getFeatureId(feature, layer)
62
64
  if (featureId) id += `-${featureId}`
63
65
  }
64
66
  return id
65
67
  }
66
68
  function isHighlightFor (highlightId, layer, feature) {
67
- return feature ? highlightId.includes(`-${utils.getFeatureId(feature, layer)}`) : highlightId.includes(`-${_.kebabCase(layer.name)}`)
69
+ return feature ? highlightId.includes(`-${getFeatureId(feature, layer)}`) : highlightId.includes(`-${_.kebabCase(layer.name)}`)
68
70
  }
69
71
  function hasHighlight (feature, layer) {
70
72
  return has(getHighlightId(feature, layer))
@@ -88,7 +90,7 @@ export function useHighlight (name, options = {}) {
88
90
  highlightMode = mode
89
91
  }
90
92
  function highlight (feature, layer, selected = true) {
91
- if (layer && (highlightMode === 'highlightable-layers') && !utils.isLayerHighlightable(layer)) return
93
+ if (layer && (highlightMode === 'highlightable-layers') && !isLayerHighlightable(layer)) return
92
94
  const highlightId = getHighlightId(feature, layer)
93
95
  // Define default highlight feature
94
96
  const highlight = {
@@ -102,7 +104,7 @@ export function useHighlight (name, options = {}) {
102
104
  // Assign style
103
105
  if (selected) {
104
106
  // Do not alter config object
105
- const selectionStylePath = `engines.${activity.engine}.style.selection.${utils.getFeatureStyleType(highlight)}`
107
+ const selectionStylePath = `engines.${activity.engine}.style.selection.${features.getFeatureStyleType(highlight)}`
106
108
  let highlightStyle = _.cloneDeep(_.get(config, selectionStylePath, {}))
107
109
  if (activity.is2D()) {
108
110
  // adapt the size to the marker using feature style
@@ -120,8 +122,9 @@ export function useHighlight (name, options = {}) {
120
122
  }
121
123
  }
122
124
  // If highlight size is based on a shape with a radius use it, otherwise go for size
123
- if (radius) Object.assign(highlightStyle, { radius: radius + 0.5 * HighlightMargin })
124
- else if (size) Object.assign(highlightStyle, { size: [size[0] + HighlightMargin, size[1] + HighlightMargin] })
125
+ // FIXME: Take care to templating, in this case for now we don't take it into account
126
+ if (_.isNumber(radius)) Object.assign(highlightStyle, { radius: radius + 0.5 * HighlightMargin })
127
+ else if (Array.isArray(size) && (size.length > 1) && _.isNumber(size[0]) && _.isNumber(size[1])) Object.assign(highlightStyle, { size: [size[0] + HighlightMargin, size[1] + HighlightMargin] })
125
128
 
126
129
  Object.assign(highlight, { style: highlightStyle })
127
130
  } else {
@@ -236,13 +239,13 @@ export function useHighlight (name, options = {}) {
236
239
  })
237
240
  }
238
241
  function listenToFeaturesServiceEventsForLayer (layer) {
239
- const listeners = utils.listenToFeaturesServiceEventsForLayer(layer, {
242
+ const listeners = features.listenToFeaturesServiceEventsForLayer(layer, {
240
243
  all: onFeatureUpdated, removed: onFeatureRemoved
241
244
  }, layerServiceEventListeners[layer._id])
242
245
  if (listeners) layerServiceEventListeners[layer._id] = listeners
243
246
  }
244
247
  function unlistenToFeaturesServiceEventsForLayer (layer) {
245
- utils.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
248
+ features.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
246
249
  delete layerServiceEventListeners[layer._id]
247
250
  }
248
251
  function listenToFeaturesServiceEventsForLayers () {
@@ -38,7 +38,7 @@ export function useProject (options = {}) {
38
38
 
39
39
  // Functions
40
40
  function hasProject () {
41
- return projectId.value
41
+ return projectId.value || project.value
42
42
  }
43
43
  function isProjectLoaded () {
44
44
  return project.value
@@ -9,7 +9,8 @@ import intersects from '@turf/boolean-intersects'
9
9
  import { featureEach } from '@turf/meta'
10
10
  import { unref } from 'vue'
11
11
  import * as composables from '../../../core/client/composables/index.js'
12
- import * as utils from '../utils.js'
12
+ import { getFeatureId } from '../utils/utils.js'
13
+ import * as features from '../utils/utils.features.js' // Named import to avoid conflict with similar function names
13
14
  import { convertPolygonStyleToLeafletPath } from '../leaflet/utils/index.js'
14
15
 
15
16
  export function useSelection (name, options = {}) {
@@ -31,8 +32,8 @@ export function useSelection (name, options = {}) {
31
32
  if (layer1 !== layer2) return false
32
33
  // Then compare features
33
34
  if (item1.feature && item2.feature) {
34
- const id1 = utils.getFeatureId(item1.feature, item1.layer)
35
- const id2 = utils.getFeatureId(item2.feature, item2.layer)
35
+ const id1 = getFeatureId(item1.feature, item1.layer)
36
+ const id2 = getFeatureId(item2.feature, item2.layer)
36
37
  return id1 === id2
37
38
  } else {
38
39
  // If only one has a feature then it cannot be the same
@@ -158,8 +159,8 @@ export function useSelection (name, options = {}) {
158
159
  for (let i = 0; i < items.length; i++) {
159
160
  const item = items[i]
160
161
  if (item.feature && item.layer && (item.layer.name === layer.name)) {
161
- const selectedId = utils.getFeatureId(item.feature, item.layer)
162
- const featureId = utils.getFeatureId(feature, layer)
162
+ const selectedId = getFeatureId(item.feature, item.layer)
163
+ const featureId = getFeatureId(feature, layer)
163
164
  if (featureId === selectedId) return item
164
165
  }
165
166
  }
@@ -355,13 +356,13 @@ export function useSelection (name, options = {}) {
355
356
  hiddenFeatures.forEach((item) => selection.unselectItem(item))
356
357
  }
357
358
  function listenToFeaturesServiceEventsForLayer (layer) {
358
- const listeners = utils.listenToFeaturesServiceEventsForLayer(layer, {
359
+ const listeners = features.listenToFeaturesServiceEventsForLayer(layer, {
359
360
  all: onFeatureUpdated, removed: onFeatureRemoved
360
361
  }, layerServiceEventListeners[layer._id])
361
362
  if (listeners) layerServiceEventListeners[layer._id] = listeners
362
363
  }
363
364
  function unlistenToFeaturesServiceEventsForLayer (layer) {
364
- utils.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
365
+ features.unlistenToFeaturesServiceEventsForLayer(layer, layerServiceEventListeners[layer._id])
365
366
  delete layerServiceEventListeners[layer._id]
366
367
  }
367
368
  function listenToFeaturesServiceEventsForLayers () {
@@ -58,8 +58,15 @@ export function useWeather (options = {}) {
58
58
  if (variables && variables.length > 0) {
59
59
  _.forOwn(fields, (value, key) => {
60
60
  // Take care that weather fields are prefixed by 'properties.' because they target feature
61
- const variable = _.find(variables, { name: `${value.property.replace('properties.', '')}` })
62
- if (variable) value.label = variable.label
61
+ let name = value.property.replace('properties.', '')
62
+ // Also weacast properties are postfixed by forecast level
63
+ if (activity.forecastLevel) name = name.replace(`-${activity.forecastLevel}`, '')
64
+ const variable = _.find(variables, { name })
65
+ // We allow variable name to be customized based on level information
66
+ if (variable) value.label = _.template(i18n.tie(variable.label))({
67
+ level: (activity ? activity.selectedLevel : null),
68
+ levelUnit: (activity && activity.selectableLevels ? activity.selectableLevels.unit : '')
69
+ })
63
70
  })
64
71
  }
65
72
  return fields
@@ -1,3 +1,4 @@
1
+ import _ from 'lodash'
1
2
  import { Store, Events, utils } from '../../core/client/index.js'
2
3
  import { errors } from '../common/index.js'
3
4
  import { formatUserCoordinates } from './utils.js'
@@ -50,11 +51,12 @@ export const Geolocation = {
50
51
  get altitudeAccuracy () {
51
52
  return this.getAltitudeAccuracy()
52
53
  },
53
- async update () {
54
+ async update (params = {}) {
55
+ const refreshParams = _.merge({ timeout: 30000, enableHighAccuracy: true }, params)
54
56
  let location = null
55
57
  // Get the position
56
58
  try {
57
- location = await this.refresh()
59
+ location = await this.refresh(refreshParams)
58
60
  Store.patch('geolocation', { location, error: undefined })
59
61
  logger.debug('[KDK] Geolocation updated:', location)
60
62
  } catch (error) {
@@ -78,13 +80,14 @@ export const Geolocation = {
78
80
  Events.emit('error', Object.assign(geolocationError, {
79
81
  // By default we only show geolocation errors, nothing if disabled by user
80
82
  ignore: (code === error.PERMISSION_DENIED),
81
- retryHandler: () => this.refresh()
83
+ retryHandler: () => this.refresh(refreshParams)
82
84
  }))
83
85
  logger.debug('[KDK] geolocation failed: ', error)
84
86
  }
85
87
  return location
86
88
  },
87
- async refresh () {
89
+ async refresh (params = {}) {
90
+ const refreshParams = _.merge({ timeout: 30000, enableHighAccuracy: true }, params)
88
91
  this.positionPromise = utils.createQuerablePromise(new Promise((resolve, reject) => {
89
92
  if (!window.navigator.geolocation) {
90
93
  Events.emit('error', {
@@ -112,7 +115,7 @@ export const Geolocation = {
112
115
  }
113
116
  })
114
117
  },
115
- (error) => reject(error), { timeout: 30000, enableHighAccuracy: true })
118
+ (error) => reject(error), refreshParams)
116
119
  }))
117
120
  return this.positionPromise
118
121
  }
@@ -465,15 +465,17 @@
465
465
  "OUTSIDE_MAP": "Indeterminated position"
466
466
  },
467
467
  "KTimeSeries": {
468
- "LABEL": "Time Series",
469
- "RESTORE_TIME_RANGE": "Restore previous view",
470
- "NO_DATA_AVAILABLE": "No data available",
471
- "CENTER_ON": "Center the view on the probed location",
472
- "SPAN": "Timeseries span",
468
+ "LABEL": "Time series",
469
+ "CHART_SERIE_TOOLTIP": "View graph",
470
+ "TABLE_SERIE_TOOLTIP": "View table",
471
+ "LOGARITHMIC_SERIE_TOOLTIP": "Logarithmic scale",
472
+ "LINEAR_SERIE_TOOLTIP": "Linear scale",
473
+ "PIN_SERIE_TOOLTIP": "Pin graph",
474
+ "UNPIN_SERIE_TOOLTIP": "Unpin graph",
475
+ "EXPORT_SERIE_TOOLTIP": "Export data",
476
+ "RESTORE_ZOOM": "Restore previous view",
473
477
  "RUN": "Forecast run",
474
- "TIME_LABEL": "Time",
475
- "EXPORT_SERIES": "Export data",
476
- "SERIES_EXPORT_FILE": "Series"
478
+ "CENTER_ON": "Center the view on the probed location"
477
479
  },
478
480
  "KStackableTimeSeries": {
479
481
  "NO_DATA_AVAILABLE": "No data available"
@@ -466,14 +466,16 @@
466
466
  },
467
467
  "KTimeSeries": {
468
468
  "LABEL": "Séries chronologiques",
469
- "RESTORE_TIME_RANGE": "Restaurer la vue précédente",
470
- "NO_DATA_AVAILABLE": "Aucune donnée disponible",
471
- "CENTER_ON": "Centrer la vue sur la sonde",
472
- "SPAN": "Intervalle de la série temporelle",
469
+ "CHART_SERIE_TOOLTIP": "Voir le graphe",
470
+ "TABLE_SERIE_TOOLTIP": "Voir la table",
471
+ "LOGARITHMIC_SERIE_TOOLTIP": "Echelle logarithmique",
472
+ "LINEAR_SERIE_TOOLTIP": "Echelle linéaire",
473
+ "PIN_SERIE_TOOLTIP": "Epingler le graphe",
474
+ "UNPIN_SERIE_TOOLTIP": "Désépingler le graphe",
475
+ "EXPORT_SERIE_TOOLTIP": "Exporter les données",
476
+ "RESTORE_ZOOM": "Restaurer la vue précédente",
473
477
  "RUN": "Réseau de prévision",
474
- "TIME_LABEL": "Temps",
475
- "EXPORT_SERIES": "Exporter les données",
476
- "SERIES_EXPORT_FILE": "Series"
478
+ "CENTER_ON": "Centrer la vue sur la sonde"
477
479
  },
478
480
  "KStackableTimeSeries": {
479
481
  "NO_DATA_AVAILABLE": "Aucune donnée disponible"
@@ -10,6 +10,8 @@ import { getFeatureId } from '../utils.js'
10
10
  const TiledFeatureLayer = L.GridLayer.extend({
11
11
  initialize (options) {
12
12
  this.enableDebug = _.get(options, 'enableDebug', false)
13
+ this.enableMergeRequests = _.get(options, 'enableMergeRequests', true)
14
+
13
15
  // this.enableDebug = true
14
16
  L.GridLayer.prototype.initialize.call(this, options)
15
17
 
@@ -168,98 +170,99 @@ const TiledFeatureLayer = L.GridLayer.extend({
168
170
  mergeRequests (tiles) {
169
171
  const requests = []
170
172
 
171
- // Try to merge tiles vertically, then horizontally
172
- const sortedTiles = tiles.sort((a, b) => {
173
- if (a.coords.x === b.coords.x) {
174
- return a.coords.y < b.coords.y ? -1 : a.coords.y !== b.coords.y ? 1 : 0
175
- }
176
- return a.coords.x < b.coords.x ? -1 : 1
177
- })
173
+ if (this.enableMergeRequests) {
174
+ // Try to merge tiles vertically, then horizontally
175
+ const sortedTiles = tiles.sort((a, b) => {
176
+ if (a.coords.x === b.coords.x) {
177
+ return a.coords.y < b.coords.y ? -1 : a.coords.y !== b.coords.y ? 1 : 0
178
+ }
179
+ return a.coords.x < b.coords.x ? -1 : 1
180
+ })
178
181
 
179
- if (sortedTiles.length) {
180
- const z = sortedTiles[0].coords.z
181
- const vrequests = []
182
- sortedTiles.forEach((tile) => {
183
- let newRequest = true
184
- if (vrequests.length) {
185
- const r = vrequests[vrequests.length - 1]
186
- if (tile.coords.x === r.x) {
187
- if (tile.coords.y === r.maxy + 1) {
188
- r.tiles.push(tile)
189
- r.maxy = tile.coords.y
190
- newRequest = false
182
+ if (sortedTiles.length) {
183
+ const z = sortedTiles[0].coords.z
184
+ const vrequests = []
185
+ sortedTiles.forEach((tile) => {
186
+ let newRequest = true
187
+ if (vrequests.length) {
188
+ const r = vrequests[vrequests.length - 1]
189
+ if (tile.coords.x === r.x) {
190
+ if (tile.coords.y === r.maxy + 1) {
191
+ r.tiles.push(tile)
192
+ r.maxy = tile.coords.y
193
+ newRequest = false
194
+ }
191
195
  }
192
196
  }
193
- }
194
- if (newRequest) {
195
- vrequests.push({
196
- x: tile.coords.x,
197
- miny: tile.coords.y,
198
- maxy: tile.coords.y,
199
- tiles: [tile]
200
- })
201
- }
202
- })
197
+ if (newRequest) {
198
+ vrequests.push({
199
+ x: tile.coords.x,
200
+ miny: tile.coords.y,
201
+ maxy: tile.coords.y,
202
+ tiles: [tile]
203
+ })
204
+ }
205
+ })
203
206
 
204
- // Now try to merge horizontally adjacent vertical requests
205
- vrequests.forEach((v) => {
206
- let newRequest = true
207
- if (requests.length) {
208
- const h = requests[requests.length - 1]
209
- if (v.miny === h.miny && v.maxy === h.maxy && v.x === h.maxx + 1) {
210
- h.tiles.push(...v.tiles)
211
- h.maxx = v.x
212
- newRequest = false
207
+ // Now try to merge horizontally adjacent vertical requests
208
+ vrequests.forEach((v) => {
209
+ let newRequest = true
210
+ if (requests.length) {
211
+ const h = requests[requests.length - 1]
212
+ if (v.miny === h.miny && v.maxy === h.maxy && v.x === h.maxx + 1) {
213
+ h.tiles.push(...v.tiles)
214
+ h.maxx = v.x
215
+ newRequest = false
216
+ }
213
217
  }
214
- }
215
- if (newRequest) {
216
- requests.push({
217
- minx: v.x,
218
- maxx: v.x,
219
- miny: v.miny,
220
- maxy: v.maxy,
221
- tiles: [].concat(v.tiles)
222
- })
223
- }
224
- })
218
+ if (newRequest) {
219
+ requests.push({
220
+ minx: v.x,
221
+ maxx: v.x,
222
+ miny: v.miny,
223
+ maxy: v.maxy,
224
+ tiles: [].concat(v.tiles)
225
+ })
226
+ }
227
+ })
225
228
 
226
- // Compute final query
227
- requests.forEach((r) => {
228
- const minp = L.point(r.minx, r.miny); const maxp = L.point(r.maxx, r.maxy)
229
- minp.z = maxp.z = z
230
- const bounds = this._tileCoordsToBounds(minp)
231
- bounds.extend(this._tileCoordsToBounds(maxp))
232
- r.query = {
233
- south: bounds.getSouth(),
234
- north: bounds.getNorth(),
235
- west: bounds.getWest(),
236
- east: bounds.getEast()
237
- }
238
- })
229
+ // Compute final query
230
+ requests.forEach((r) => {
231
+ const minp = L.point(r.minx, r.miny); const maxp = L.point(r.maxx, r.maxy)
232
+ minp.z = maxp.z = z
233
+ const bounds = this._tileCoordsToBounds(minp)
234
+ bounds.extend(this._tileCoordsToBounds(maxp))
235
+ r.query = {
236
+ south: bounds.getSouth(),
237
+ north: bounds.getNorth(),
238
+ west: bounds.getWest(),
239
+ east: bounds.getEast()
240
+ }
241
+ })
239
242
 
240
- if (this.enableDebug) {
241
- let numTilesR = 0
242
- requests.forEach((r) => { numTilesR += r.tiles.length })
243
- if (numTilesR !== tiles.length) {
244
- logger.debug('TiledFeatureLayer: less requested tiles than expected !')
243
+ if (this.enableDebug) {
244
+ let numTilesR = 0
245
+ requests.forEach((r) => { numTilesR += r.tiles.length })
246
+ if (numTilesR !== tiles.length) {
247
+ logger.debug('TiledFeatureLayer: less requested tiles than expected !')
248
+ }
245
249
  }
246
250
  }
247
- }
248
-
249
- /* One request per tile
250
- tiles.forEach((tile) => {
251
- const r = {
252
- tiles: [tile],
253
- query: {
254
- south: tile.bbox.getSouth(),
255
- north: tile.bbox.getNorth(),
256
- west: tile.bbox.getWest(),
257
- east: tile.bbox.getEast()
251
+ } else {
252
+ // Request merging disabled => one request per tile
253
+ tiles.forEach((tile) => {
254
+ const r = {
255
+ tiles: [tile],
256
+ query: {
257
+ south: tile.bbox.getSouth(),
258
+ north: tile.bbox.getNorth(),
259
+ west: tile.bbox.getWest(),
260
+ east: tile.bbox.getEast()
261
+ }
258
262
  }
259
- }
260
- requests.push(r)
261
- })
262
- */
263
+ requests.push(r)
264
+ })
265
+ }
263
266
 
264
267
  if (this.enableDebug && tiles.length) {
265
268
  logger.debug(`TiledFeatureLayer: ${tiles.length} requests reduced to ${requests.length}`)