@kalisio/kdk 2.6.4 → 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 (398) 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 +392 -398
  69. package/coverage/core/api/authentication.js.html +352 -187
  70. package/coverage/core/api/db.js.html +165 -126
  71. package/coverage/core/api/hooks/hooks.authentication.js.html +22 -196
  72. package/coverage/core/api/hooks/hooks.authorisations.js.html +383 -662
  73. package/coverage/core/api/hooks/hooks.logger.js.html +41 -41
  74. package/coverage/core/api/hooks/hooks.model.js.html +113 -101
  75. package/coverage/core/api/hooks/hooks.push.js.html +124 -97
  76. package/coverage/core/api/hooks/hooks.query.js.html +292 -217
  77. package/coverage/core/api/hooks/hooks.schemas.js.html +123 -123
  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.groups.js.html → hooks.tags.js.html} +100 -76
  81. package/coverage/core/api/hooks/hooks.users.js.html +255 -447
  82. package/coverage/core/api/hooks/index.html +107 -122
  83. package/coverage/core/api/hooks/index.js.html +4 -10
  84. package/coverage/core/api/index.html +46 -61
  85. package/coverage/core/api/index.js.html +9 -9
  86. package/coverage/core/api/marshall.js.html +9 -9
  87. package/coverage/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
  88. package/coverage/core/api/models/index.html +35 -50
  89. package/coverage/core/api/models/messages.model.mongodb.js.html +39 -27
  90. package/coverage/core/api/models/tags.model.mongodb.js.html +26 -32
  91. package/coverage/core/api/models/users.model.mongodb.js.html +10 -10
  92. package/coverage/core/api/services/account/account.hooks.js.html +5 -5
  93. package/coverage/core/api/services/account/account.service.js.html +127 -127
  94. package/coverage/core/api/services/account/index.html +22 -22
  95. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
  96. package/coverage/core/api/services/authorisations/authorisations.service.js.html +213 -222
  97. package/coverage/core/api/services/authorisations/index.html +21 -21
  98. package/coverage/core/api/services/{organisations/organisations.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
  99. package/coverage/core/api/services/{groups → configurations}/index.html +8 -8
  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 +76 -76
  104. package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
  105. package/coverage/core/api/services/import-export/index.html +32 -32
  106. package/coverage/core/api/services/index.html +21 -21
  107. package/coverage/core/api/services/index.js.html +313 -142
  108. package/coverage/core/api/services/mailer/index.html +32 -32
  109. package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
  110. package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
  111. package/coverage/core/api/services/messages/index.html +21 -21
  112. package/coverage/core/api/services/messages/messages.hooks.js.html +112 -76
  113. package/coverage/core/api/services/push/index.html +32 -32
  114. package/coverage/core/api/services/push/push.hooks.js.html +80 -80
  115. package/coverage/core/api/services/push/push.service.js.html +34 -34
  116. package/coverage/core/api/services/storage/index.html +29 -29
  117. package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
  118. package/coverage/core/api/services/storage/storage.service.js.html +29 -29
  119. package/coverage/core/api/services/tags/index.html +21 -21
  120. package/coverage/core/api/services/tags/tags.hooks.js.html +119 -71
  121. package/coverage/core/api/services/users/index.html +27 -12
  122. package/coverage/core/api/services/users/users.hooks.js.html +14 -11
  123. package/coverage/core/api/services/users/users.service.js.html +100 -0
  124. package/coverage/core/common/errors.js.html +1 -1
  125. package/coverage/core/common/index.html +42 -27
  126. package/coverage/core/common/index.js.html +1 -1
  127. package/coverage/core/common/permissions.js.html +166 -472
  128. package/coverage/core/common/schema.js.html +4 -4
  129. package/coverage/core/common/utils.js.html +31 -25
  130. package/coverage/core/common/utils.offline.js.html +199 -0
  131. package/coverage/index.html +192 -192
  132. package/coverage/lcov-report/core/api/application.js.html +392 -398
  133. package/coverage/lcov-report/core/api/authentication.js.html +352 -187
  134. package/coverage/lcov-report/core/api/db.js.html +165 -126
  135. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +22 -196
  136. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +383 -662
  137. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +41 -41
  138. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +113 -101
  139. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +124 -97
  140. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +292 -217
  141. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +123 -123
  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.groups.js.html → hooks.tags.js.html} +100 -76
  145. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +255 -447
  146. package/coverage/lcov-report/core/api/hooks/index.html +107 -122
  147. package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
  148. package/coverage/lcov-report/core/api/index.html +46 -61
  149. package/coverage/lcov-report/core/api/index.js.html +9 -9
  150. package/coverage/lcov-report/core/api/marshall.js.html +9 -9
  151. package/coverage/lcov-report/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
  152. package/coverage/lcov-report/core/api/models/index.html +35 -50
  153. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +39 -27
  154. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +26 -32
  155. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +10 -10
  156. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +5 -5
  157. package/coverage/lcov-report/core/api/services/account/account.service.js.html +127 -127
  158. package/coverage/lcov-report/core/api/services/account/index.html +22 -22
  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 +213 -222
  161. package/coverage/lcov-report/core/api/services/authorisations/index.html +21 -21
  162. package/coverage/lcov-report/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
  163. package/coverage/lcov-report/core/api/services/{groups → configurations}/index.html +8 -8
  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 +76 -76
  168. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
  169. package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
  170. package/coverage/lcov-report/core/api/services/index.html +21 -21
  171. package/coverage/lcov-report/core/api/services/index.js.html +313 -142
  172. package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
  173. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
  174. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
  175. package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
  176. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +112 -76
  177. package/coverage/lcov-report/core/api/services/push/index.html +32 -32
  178. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
  179. package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
  180. package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
  181. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
  182. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +29 -29
  183. package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
  184. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +119 -71
  185. package/coverage/lcov-report/core/api/services/users/index.html +27 -12
  186. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +14 -11
  187. package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
  188. package/coverage/lcov-report/core/common/errors.js.html +1 -1
  189. package/coverage/lcov-report/core/common/index.html +42 -27
  190. package/coverage/lcov-report/core/common/index.js.html +1 -1
  191. package/coverage/lcov-report/core/common/permissions.js.html +166 -472
  192. package/coverage/lcov-report/core/common/schema.js.html +4 -4
  193. package/coverage/lcov-report/core/common/utils.js.html +31 -25
  194. package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
  195. package/coverage/lcov-report/index.html +192 -192
  196. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +169 -31
  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 +215 -35
  199. package/coverage/lcov-report/map/api/hooks/index.html +7 -7
  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 +82 -7
  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 +22 -7
  208. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
  209. package/coverage/lcov-report/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
  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 +39 -12
  214. package/coverage/lcov-report/map/api/services/catalog/index.html +5 -5
  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 +86 -11
  218. package/coverage/lcov-report/map/api/services/features/features.service.js.html +307 -4
  219. package/coverage/lcov-report/map/api/services/features/index.html +7 -7
  220. package/coverage/lcov-report/map/api/services/index.html +5 -5
  221. package/coverage/lcov-report/map/api/services/index.js.html +326 -50
  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/{core/api/services/organisations → lcov-report/map/api/services/styles}/index.html +10 -25
  225. package/coverage/lcov-report/{core/api/services/organisations/organisations.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
  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 +7 -10
  229. package/coverage/lcov-report/map/common/grid.js.html +1 -1
  230. package/coverage/lcov-report/map/common/index.html +19 -19
  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 +4 -7
  236. package/coverage/lcov-report/map/common/permissions.js.html +10 -4
  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 +9 -12
  239. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
  240. package/coverage/lcov-report/map/common/wcs-utils.js.html +12 -15
  241. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +2 -2
  242. package/coverage/lcov-report/map/common/wfs-utils.js.html +14 -17
  243. package/coverage/lcov-report/map/common/wms-utils.js.html +30 -12
  244. package/coverage/lcov-report/map/common/wmts-utils.js.html +10 -13
  245. package/coverage/lcov.info +4157 -3816
  246. package/coverage/map/api/hooks/hooks.catalog.js.html +169 -31
  247. package/coverage/map/api/hooks/hooks.features.js.html +1 -1
  248. package/coverage/map/api/hooks/hooks.query.js.html +215 -35
  249. package/coverage/map/api/hooks/index.html +7 -7
  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 +82 -7
  256. package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
  257. package/coverage/map/api/models/index.html +22 -7
  258. package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
  259. package/coverage/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
  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 +39 -12
  264. package/coverage/map/api/services/catalog/index.html +5 -5
  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 +86 -11
  268. package/coverage/map/api/services/features/features.service.js.html +307 -4
  269. package/coverage/map/api/services/features/index.html +7 -7
  270. package/coverage/map/api/services/index.html +5 -5
  271. package/coverage/map/api/services/index.js.html +326 -50
  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/{lcov-report/core/api/services/organisations → map/api/services/styles}/index.html +10 -25
  275. package/coverage/{core/api/services/groups/groups.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
  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 +7 -10
  279. package/coverage/map/common/grid.js.html +1 -1
  280. package/coverage/map/common/index.html +19 -19
  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 +4 -7
  286. package/coverage/map/common/permissions.js.html +10 -4
  287. package/coverage/map/common/time-based-grid-source.js.html +1 -1
  288. package/coverage/map/common/tms-utils.js.html +9 -12
  289. package/coverage/map/common/wcs-grid-source.js.html +3 -3
  290. package/coverage/map/common/wcs-utils.js.html +12 -15
  291. package/coverage/map/common/weacast-grid-source.js.html +2 -2
  292. package/coverage/map/common/wfs-utils.js.html +14 -17
  293. package/coverage/map/common/wms-utils.js.html +30 -12
  294. package/coverage/map/common/wmts-utils.js.html +10 -13
  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-1028556-1773134124353-0.json +1 -0
  300. package/extras/configs/widgets.top.js +3 -3
  301. package/extras/tests/core/collection.mjs +2 -9
  302. package/extras/tours/pane.top.js +0 -9
  303. package/map/api/hooks/hooks.catalog.js +18 -4
  304. package/map/api/services/catalog/catalog.hooks.js +3 -0
  305. package/map/api/services/features/features.hooks.js +3 -1
  306. package/map/api/services/index.js +2 -6
  307. package/map/api/services/styles/styles.hooks.js +6 -1
  308. package/map/client/components/KFeatureActionButton.vue +9 -3
  309. package/map/client/components/KFeaturesFilterManager.vue +5 -5
  310. package/map/client/components/KFilterCondition.vue +17 -10
  311. package/map/client/components/KLayerEditor.vue +49 -39
  312. package/map/client/components/KMeasureTool.vue +7 -1
  313. package/map/client/components/KTimezoneMap.vue +29 -9
  314. package/map/client/components/catalog/KLayersPanel.vue +26 -16
  315. package/map/client/components/catalog/KLayersSelector.vue +13 -2
  316. package/map/client/components/catalog/KViewsPanel.vue +5 -4
  317. package/map/client/components/form/KSelectLayersField.vue +28 -17
  318. package/map/client/components/form/KSelectViewsField.vue +18 -9
  319. package/map/client/components/form/KTimezoneField.vue +1 -2
  320. package/map/client/components/legend/KVariablesLegend.vue +10 -1
  321. package/map/client/components/location/KLocationCardSection.vue +7 -2
  322. package/map/client/components/location/KLocationMap.vue +31 -7
  323. package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
  324. package/map/client/components/stickies/KZoomControl.vue +1 -1
  325. package/map/client/components/styles/KStyleManager.vue +4 -1
  326. package/map/client/components/widget/KTimeSeries.vue +174 -497
  327. package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
  328. package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
  329. package/map/client/composables/catalog.js +6 -10
  330. package/map/client/composables/highlight.js +12 -9
  331. package/map/client/composables/project.js +1 -1
  332. package/map/client/composables/selection.js +8 -7
  333. package/map/client/composables/weather.js +9 -2
  334. package/map/client/geolocation.js +8 -5
  335. package/map/client/i18n/map_en.json +11 -10
  336. package/map/client/i18n/map_fr.json +10 -9
  337. package/map/client/leaflet/TiledFeatureLayer.js +85 -82
  338. package/map/client/leaflet/utils/utils.geojson.js +3 -3
  339. package/map/client/mixins/globe/mixin.base-globe.js +15 -6
  340. package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
  341. package/map/client/mixins/map/mixin.edit-layers.js +9 -1
  342. package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
  343. package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
  344. package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
  345. package/map/client/mixins/mixin.activity.js +23 -30
  346. package/map/client/mixins/mixin.feature-selection.js +41 -5
  347. package/map/client/planets.js +1 -1
  348. package/map/client/readers/reader.kml.js +2 -3
  349. package/map/client/utils/utils.catalog.js +36 -10
  350. package/map/client/utils/utils.layers.js +39 -8
  351. package/map/client/utils/utils.project.js +4 -0
  352. package/map/client/utils/utils.style.js +37 -7
  353. package/map/client/utils/utils.time-series.js +215 -6
  354. package/map/common/schemas/catalog.update.json +1 -1
  355. package/map/common/weacast-grid-source.js +1 -1
  356. package/package.json +3 -3
  357. package/scripts/kash/CHANGELOG.md +0 -4
  358. package/scripts/kash/README.md +0 -9
  359. package/scripts/kash/kash.sh +45 -40
  360. package/scripts/kash/scripts/run_tests.sh +1 -4
  361. package/test/api/core/authentication.test.js +9 -4
  362. package/test/api/core/config/default.cjs +1 -0
  363. package/test/api/core/hooks.test.js +6 -0
  364. package/test/api/core/index.test.js +43 -18
  365. package/test/api/core/push.test.js +8 -8
  366. package/test/api/core/test-log-2026-03-10.log +60 -0
  367. package/test/api/core/users.test.js +384 -0
  368. package/test/api/map/grid-sources.test.js +1 -1
  369. package/test/api/map/test-log-2026-03-10.log +56 -0
  370. package/vite/package.json +11 -2
  371. package/vite/test/core/composables.test.js +77 -0
  372. package/vite/vitest.config.js +13 -0
  373. package/vite/yarn.lock +1096 -18
  374. package/.vscode/settings.json +0 -5
  375. package/core/client/components/account/KAccount.vue +0 -68
  376. package/core/client/components/account/KDeleteAccountManager.vue +0 -62
  377. package/core/client/components/account/KEmailManager.vue +0 -128
  378. package/core/client/components/account/KPasswordManager.vue +0 -90
  379. package/core/client/components/account/KVerifyEmailManager.vue +0 -105
  380. package/core/client/components/collection/KColumn.vue +0 -227
  381. package/core/client/components/collection/KHistory.vue +0 -113
  382. package/core/client/components/collection/KHistoryEntry.vue +0 -109
  383. package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
  384. package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
  385. package/coverage/core/api/utils.js.html +0 -118
  386. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
  387. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
  388. package/coverage/lcov-report/core/api/utils.js.html +0 -118
  389. package/coverage/tmp/coverage-151166-1723543324307-0.json +0 -1
  390. package/coverage/tmp/coverage-151178-1723543324283-0.json +0 -1
  391. package/coverage/tmp/coverage-151189-1723543324271-0.json +0 -1
  392. package/coverage/tmp/coverage-151201-1723543324248-0.json +0 -1
  393. package/coverage/tmp/coverage-151208-1723543324227-0.json +0 -1
  394. package/scripts/kash/LICENSE +0 -21
  395. package/test/api/core/test-log-2024-04-22.log +0 -84
  396. package/test/api/core/test-log-2024-04-23.log +0 -23
  397. package/test/api/core/test-log-2024-08-13.log +0 -3
  398. package/test/api/map/test-log-2025-03-08.log +0 -0
@@ -1,7 +1,5 @@
1
- import KAccount from './KAccount.vue'
2
1
  import KProfile from './KProfile.vue'
3
2
 
4
3
  export {
5
- KAccount,
6
4
  KProfile
7
5
  }
@@ -45,6 +45,7 @@ onMounted(async () => {
45
45
  else {
46
46
  const mapping = serviceSettings.getSettingsMapping()
47
47
  schemaFilter.value = Object.keys(mapping).filter(value => _.get(mapping, value))
48
+ if (_.isEmpty(schemaFilter.value)) schemaFilter.value = null
48
49
  }
49
50
  })
50
51
 
@@ -17,13 +17,12 @@
17
17
  </template>
18
18
 
19
19
  <script setup>
20
- import _ from 'lodash'
21
20
  import { ref } from 'vue'
22
21
  import { i18n } from '../../i18n.js'
23
22
  import KGrid from './KGrid.vue'
24
23
 
25
24
  // Props
26
- defineProps({
25
+ const props = defineProps({
27
26
  columns: {
28
27
  type: Array,
29
28
  default: () => null
@@ -35,7 +34,9 @@ const columnRefs = ref([])
35
34
 
36
35
  // Functions
37
36
  function getColumn (value) {
38
- return _.find(columnRefs.value, { name: value })
37
+ const index = props.columns.findIndex(column => column.name === value)
38
+ if (index === -1) return undefined
39
+ return columnRefs.value[index] || undefined
39
40
  }
40
41
  function getColumns (values) {
41
42
  return values.map(value => getColumn(value))
@@ -11,6 +11,7 @@
11
11
  <KPanel
12
12
  v-if="filteredActions"
13
13
  :content="filteredActions"
14
+ :context="context"
14
15
  class="no-wrap"
15
16
  />
16
17
  </div>
@@ -286,6 +286,8 @@ onBeforeMount(() => {
286
286
  })
287
287
  onBeforeUnmount(() => {
288
288
  Events.off('user-abilities-changed', refreshCollection)
289
+ if (scrollDownRef.value) scrollDownRef.value.refresh.cancel()
290
+ if (scrollToTopRef.value) scrollToTopRef.value.refresh.cancel()
289
291
  })
290
292
 
291
293
  // Expose
@@ -116,7 +116,11 @@ const props = defineProps({
116
116
  },
117
117
  service: {
118
118
  type: String,
119
- required: true
119
+ required: false
120
+ },
121
+ getService: {
122
+ type: Function,
123
+ required: false
120
124
  },
121
125
  baseQuery: {
122
126
  type: Object,
@@ -43,7 +43,7 @@
43
43
  <q-timeline-entry :color="getColor(item)">
44
44
  <template v-slot:title>
45
45
  <slot name="title">
46
- <div v-if="getTitle(item)" class="text-h6">
46
+ <div v-if="getTitle(item)" class="text-h6 ellipsis">
47
47
  {{ getTitle(item) }}
48
48
  </div>
49
49
  </slot>
@@ -243,6 +243,10 @@ const props = defineProps({
243
243
  type: String,
244
244
  default: undefined
245
245
  },
246
+ heading: {
247
+ type: Boolean,
248
+ default: true
249
+ },
246
250
  footer: {
247
251
  type: [Array, Object],
248
252
  default: () => null
@@ -333,6 +337,7 @@ function getColor (item) {
333
337
  return _.get(item, _.get(props.schema, 'colorField'))
334
338
  }
335
339
  function getHeading (item) {
340
+ if (!props.heading) return null
336
341
  const currentTimestamp = moment(_.get(item, _.get(props.schema, 'timestampField')))
337
342
  if (!currentTimestamp || !currentTimestamp.isValid()) return false
338
343
  const heading = _.capitalize(currentTimestamp.format('MMMM, YYYY'))
@@ -378,6 +383,8 @@ onBeforeMount(() => {
378
383
  })
379
384
  onBeforeUnmount(() => {
380
385
  Events.off('user-abilities-changed', refreshCollection)
386
+ if (scrollDownRef.value) scrollDownRef.value.refresh.cancel()
387
+ if (scrollToTopRef.value) scrollToTopRef.value.refresh.cancel()
381
388
  })
382
389
  </script>
383
390
 
@@ -388,6 +395,7 @@ onBeforeUnmount(() => {
388
395
  }
389
396
  .q-timeline__title {
390
397
  margin-bottom: 4px;
398
+ max-width: 80vw;
391
399
  }
392
400
  .q-timeline__subtitle {
393
401
  margin-bottom: 0px;
@@ -2,7 +2,6 @@ import KCard from './KCard.vue'
2
2
  import KCardSection from './KCardSection.vue'
3
3
  import KGrid from './KGrid.vue'
4
4
  import KItem from './KItem.vue'
5
- import KHistory from './KHistory.vue'
6
5
  import KTable from './KTable.vue'
7
6
 
8
7
  export {
@@ -10,6 +9,5 @@ export {
10
9
  KCardSection,
11
10
  KGrid,
12
11
  KItem,
13
- KHistory,
14
12
  KTable
15
13
  }
@@ -46,7 +46,8 @@
46
46
  :for="properties.name + '-field'"
47
47
  :id="properties.name + '-field'"
48
48
  v-model="input"
49
- autofocus type="text"
49
+ :autofocus="hasFocus"
50
+ type="text"
50
51
  :after="inputActions"
51
52
  @keyup.enter="onChipAdded()"
52
53
  />
@@ -13,6 +13,7 @@
13
13
  :error="hasError"
14
14
  :error-message="errorLabel"
15
15
  no-error-icon
16
+ :autofocus="hasFocus"
16
17
  bottom-slots
17
18
  @blur="onChanged"
18
19
  @update:model-value="onChanged"
@@ -11,6 +11,19 @@
11
11
  {{ file.name }}
12
12
  </q-chip>
13
13
  </div>
14
+ <!-- -->
15
+ <q-field v-else-if="model"
16
+ :for="properties.name + '-field'"
17
+ v-model="model"
18
+ :label="label"
19
+ clearable
20
+ @clear="onFileCleared"
21
+ :disable="disabled"
22
+ >
23
+ <template v-slot:control>
24
+ {{ displayName }}
25
+ </template>
26
+ </q-field>
14
27
  <q-file v-else
15
28
  :for="properties.name + '-field'"
16
29
  v-model="files"
@@ -70,12 +83,21 @@ export default {
70
83
  computed: {
71
84
  multiple () {
72
85
  return _.get(this.properties, 'field.multiple', false)
86
+ },
87
+ displayName () {
88
+ if (_.isArray(this.model)) return _.map(this.model, 'name').join(', ')
89
+ return _.get(this.model, 'name', '')
73
90
  }
74
91
  },
75
92
  methods: {
76
93
  emptyModel () {
77
94
  return this.multiple ? [] : null
78
95
  },
96
+ onFileCleared () {
97
+ this.files = null
98
+ this.error = ''
99
+ this.onChanged()
100
+ },
79
101
  getAcceptedTypes () {
80
102
  return _.get(this.properties, 'field.mimeTypes', '')
81
103
  },
@@ -129,7 +151,6 @@ export default {
129
151
  this.onChanged()
130
152
  },
131
153
  onFileRejected (errs) {
132
- console.log(errs)
133
154
  const errors = [].concat(errs)
134
155
  for (const error of errors) {
135
156
  if (error?.failedPropValidation === 'max-files') this.error = i18n.tc('errors.MAX_FILES_REACHED', this.getMaxFiles())
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <q-form
3
3
  v-if="schema"
4
+ autofocus
4
5
  @submit.prevent="onSubmit"
5
6
  class="column"
6
7
  >
@@ -295,6 +296,7 @@ onMounted(async () => {
295
296
 
296
297
  // Expose
297
298
  defineExpose({
299
+ isReady,
298
300
  getField,
299
301
  fill,
300
302
  clear,
@@ -18,6 +18,7 @@
18
18
  :error-message="errorLabel"
19
19
  :error="hasError"
20
20
  :disable="disabled"
21
+ :autofocus="hasFocus"
21
22
  bottom-slots
22
23
  :options="options"
23
24
  @filter="onSearch"
@@ -12,6 +12,7 @@
12
12
  :disable="disabled"
13
13
  :error="hasError"
14
14
  :error-message="errorLabel"
15
+ :autofocus="hasFocus"
15
16
  bottom-slot
16
17
  @blur="onChanged"
17
18
  @update:model-value="onUpdated"
@@ -11,6 +11,7 @@
11
11
  :disable="disabled"
12
12
  :error="hasError"
13
13
  :error-message="errorLabel"
14
+ :autofocus="hasFocus"
14
15
  bottom-slots
15
16
  :autocomplete="autocomplete"
16
17
  @blur="onChanged"
@@ -12,6 +12,7 @@
12
12
  :disable="disabled"
13
13
  :error="hasError"
14
14
  :error-message="errorLabel"
15
+ :autofocus="hasFocus"
15
16
  bottom-slots
16
17
  @blur="onChanged"
17
18
  @update:model-value="onChanged"
@@ -19,6 +19,7 @@
19
19
  :error-message="errorLabel"
20
20
  :error="hasError"
21
21
  :disable="disabled"
22
+ :autofocus="hasFocus"
22
23
  bottom-slots
23
24
  :options="options"
24
25
  @filter="onSearch"
@@ -31,6 +31,7 @@
31
31
  style="max-width: 54px"
32
32
  :readonly="readonly"
33
33
  :disable="disabled"
34
+ :autofocus="hasFocus"
34
35
  @update:model-value='updateModel()'
35
36
  />
36
37
  <span class="text-body1">x</span>
@@ -20,6 +20,7 @@
20
20
  :error="hasError"
21
21
  :error-message="errorLabel"
22
22
  :disable="disabled"
23
+ :autofocus="hasFocus"
23
24
  bottom-slots
24
25
  @filter="onFilter"
25
26
  @blur="onChanged"
@@ -55,6 +56,13 @@
55
56
  {{ scope.opt.label }}
56
57
  </span>
57
58
  </template>
59
+ <!-- no options display -->
60
+ <template v-if="hasNoOption" v-slot:no-option>
61
+ <p v-if="typeof this.properties.field.noOption === 'string'" class="noOptionText">{{ this.properties.field.noOption }}</p>
62
+ <Suspense v-else>
63
+ <component v-if="noOptionComponent" :is="noOptionComponent" v-bind="noOptionsAttributes" />
64
+ </Suspense>
65
+ </template>
58
66
  <!-- Helper -->
59
67
  <template v-if="hasHelper" v-slot:append>
60
68
  <k-action
@@ -76,6 +84,7 @@
76
84
  import _ from 'lodash'
77
85
  import { makeDiacriticPattern } from '../../../common'
78
86
  import { baseField } from '../../mixins'
87
+ import { loadComponent } from '../../utils'
79
88
 
80
89
  export default {
81
90
  mixins: [baseField],
@@ -98,6 +107,15 @@ export default {
98
107
  })
99
108
  }
100
109
  return opts
110
+ },
111
+ hasNoOption () {
112
+ return !_.isEmpty(_.get(this.properties.field, 'noOption', {}))
113
+ },
114
+ noOptionComponent () {
115
+ return loadComponent(this.properties.field.noOption.component)
116
+ },
117
+ noOptionsAttributes () {
118
+ return _.omit(this.properties.field.noOption, 'component')
101
119
  }
102
120
  },
103
121
  data () {
@@ -163,3 +181,16 @@ export default {
163
181
  }
164
182
  }
165
183
  </script>
184
+
185
+ <style lang=scss scoped>
186
+ .noOptionText {
187
+ margin-bottom: $space-y-base;
188
+ padding-inline: $space-x-base;
189
+ text-align: center;
190
+ }
191
+ @media (min-width: $breakpoint-lg-min) {
192
+ .noOptionText {
193
+ margin-block: $space-y-base;
194
+ }
195
+ }
196
+ </style>
@@ -18,6 +18,7 @@
18
18
  :error-message="errorLabel"
19
19
  :error="hasError"
20
20
  :disable="disabled"
21
+ :autofocus="hasFocus"
21
22
  bottom-slots
22
23
  :options="options"
23
24
  @filter="onSearch"
@@ -13,6 +13,7 @@
13
13
  :disable="disabled"
14
14
  :error="hasError"
15
15
  :error-message="errorLabel"
16
+ :autofocus="hasFocus"
16
17
  bottom-slots
17
18
  :debounce="debounce"
18
19
  @blur="onChanged"
@@ -14,6 +14,7 @@
14
14
  v-model="fieldValues[i - 1]"
15
15
  style="width: 5ch"
16
16
  :disable="disabled"
17
+ :autofocus="hasFocus"
17
18
  outlined
18
19
  :ref="el => updateFieldRef(el, i - 1)"
19
20
  @update:model-value='updateModel(i)'
@@ -13,6 +13,7 @@
13
13
  :error="hasError"
14
14
  :error-message="errorLabel"
15
15
  :disable="disabled"
16
+ :autofocus="hasFocus"
16
17
  bottom-slots
17
18
  @blur="onChanged"
18
19
  @update:model-value='onChanged'
@@ -14,6 +14,7 @@
14
14
  :disable="disabled"
15
15
  :error="hasError"
16
16
  :error-message="errorLabel"
17
+ :autofocus="hasFocus"
17
18
  bottom-slots
18
19
  >
19
20
  <!-- Helper -->
@@ -40,14 +40,13 @@ const computedIconColor = computed(() => {
40
40
  return getHtmlColor(props.icon.color, defaultColor)
41
41
  })
42
42
  const computedOverlay = computed(() => {
43
- if (!props.icon && !props.icon.overlay) return
44
- return _.omit(props.icon.overlay, ['color', 'rotation'])
43
+ return _.omit(_.get(props.icon, 'overlay', {}), ['color', 'rotation'])
45
44
  })
46
45
  const computedOverlayColor = computed(() => {
47
- return getHtmlColor(_.get(props.icon.overlay, 'color', defaultColor))
46
+ return getHtmlColor(_.get(props.icon, 'overlay.color', defaultColor))
48
47
  })
49
48
  const computedOverlayTransform = computed(() => {
50
- return `rotate(${_.get(props.icon.overlay, 'rotation', 0)}deg)`
49
+ return `rotate(${_.get(props.icon, 'overlay.rotation', 0)}deg)`
51
50
  })
52
51
  </script>
53
52
 
@@ -24,6 +24,7 @@
24
24
  :pointer-events="sticky.pointerEvents"
25
25
  :position="getStickyPosition(sticky)"
26
26
  :offset="getStickyOffset(sticky)"
27
+ :expand="sticky.expand"
27
28
  class="k-sticky"
28
29
  >
29
30
  <KContent v-bind="sticky" />
@@ -270,7 +270,7 @@ const widgetHeight = computed(() => {
270
270
  })
271
271
 
272
272
  // Watch
273
- watch(() => [$q.screen.width, $q.screen.height], (value) => onScreenResized())
273
+ watch(() => [$q.screen.width, $q.screen.height, header.visible, header.size, footer.visible, footer.size], (value) => onScreenResized())
274
274
  watch(() => currentWindow.state, (newState, oldState) => refresh(newState, oldState))
275
275
 
276
276
  // Functions
@@ -322,13 +322,16 @@ function refresh (newState, oldState) {
322
322
  }
323
323
  function setPinnedGeometry () {
324
324
  const size = computeResponsiveSize(currentWindow.sizePolicy.pinned)
325
+ let height = $q.screen.height
326
+ if (header.visible) height -= header.size[1]
327
+ if (footer.visible) height -= footer.size[1]
325
328
  let x, y
326
329
  if (props.placement === 'top' || props.placement === 'bottom') {
327
330
  x = $q.screen.width / 2 - size[0] / 2
328
- y = props.placement === 'top' ? 0 : $q.screen.height - size[1]
331
+ y = props.placement === 'top' ? 0 : height - size[1]
329
332
  } else {
330
333
  x = props.placement === 'left' ? 0 : $q.screen.width - size[0]
331
- y = $q.screen.height / 2 - size[1] / 2
334
+ y = height / 2 - size[1] / 2
332
335
  }
333
336
  updateGeometry([x, y], size)
334
337
  }
@@ -9,12 +9,13 @@
9
9
  id="composer-fab"
10
10
  :icon="getKindIcon(currentType)"
11
11
  :color="getKindColor(currentType)"
12
- direction="up"
12
+ direction="right"
13
13
  :vertical-actions-align="$q.screen.lt.md ? 'left' : 'center'"
14
14
  padding="xs"
15
15
  >
16
16
  <template v-for="type in availableTypes" :key="type">
17
17
  <q-fab-action
18
+ :id="type + '-option'"
18
19
  :icon="getKindIcon(type)"
19
20
  :color="getKindColor(type)"
20
21
  :label="getKindLabel(type)"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="fit row no-wrap">
2
+ <div class="row no-wrap">
3
3
  <!-- missions timeline -->
4
4
  <div :class="wide ? 'col-11' : 'col-12'">
5
5
  <KTimeLine
@@ -12,7 +12,6 @@
12
12
 
13
13
  <script setup>
14
14
  import _ from 'lodash'
15
- import moment from 'moment'
16
15
  import { computed } from 'vue'
17
16
  import { Time } from '../../time.js'
18
17
  import { i18n } from '../../i18n.js'
@@ -69,7 +68,7 @@ const computedButton = computed(() => {
69
68
  let format = props.format
70
69
  if (_.isEmpty(format)) format = _.get(Time.getFormat(), 'date.short')
71
70
  // compute label
72
- const label = _.isEmpty(computedModel.value) ? i18n.tie(props.placeholder) : moment(computedModel.value).format(format)
71
+ const label = _.isEmpty(computedModel.value) ? i18n.tie(props.placeholder) : Time.convertToLocal(computedModel.value).format(format)
73
72
  // define button spec
74
73
  const spec = {
75
74
  id: 'date-button',
@@ -34,7 +34,6 @@
34
34
  import _ from 'lodash'
35
35
  import moment from 'moment'
36
36
  import { ref, computed, watch } from 'vue'
37
- import { toLocalTimezone } from '../../utils/utils.time.js'
38
37
  import { Time } from '../../time.js'
39
38
  import KDate from './KDate.vue'
40
39
  import KTime from './KTime.vue'
@@ -143,7 +142,8 @@ const computedDateModel = computed({
143
142
  })
144
143
  const computedTimeModel = computed({
145
144
  get: function () {
146
- return dateTime.value ? dateTime.value.format(timeMask) : null
145
+ const time = (dateTime.value ? dateTime.value.format(timeMask) : null)
146
+ return time
147
147
  },
148
148
  set: function (value) {
149
149
  const { HH, mm, ss } = toHMS(value)
@@ -164,18 +164,18 @@ const computedTimePicker = computed(() => {
164
164
 
165
165
  // Watch
166
166
  watch(() => props.modelValue, (value) => {
167
- dateTime.value = toLocalTimezone(props.modelValue, Time.getFormatTimezone())
167
+ dateTime.value = Time.convertToLocal(props.modelValue)
168
168
  })
169
169
  watch(() => props.timezone, (value) => {
170
- dateTime.value = toLocalTimezone(props.modelValue, Time.getFormatTimezone())
171
- minDateTime.value = toLocalTimezone(props.min, Time.getFormatTimezone())
172
- maxDateTime.value = toLocalTimezone(props.max, Time.getFormatTimezone())
170
+ dateTime.value = Time.convertToLocal(props.modelValue)
171
+ minDateTime.value = Time.convertToLocal(props.min)
172
+ maxDateTime.value = Time.convertToLocal(props.max)
173
173
  })
174
174
  watch(() => props.min, (value) => {
175
- minDateTime.value = toLocalTimezone(props.min, Time.getFormatTimezone())
175
+ minDateTime.value = Time.convertToLocal(props.min)
176
176
  })
177
177
  watch(() => props.max, (value) => {
178
- maxDateTime.value = toLocalTimezone(props.max, Time.getFormatTimezone())
178
+ maxDateTime.value = Time.convertToLocal(props.max)
179
179
  })
180
180
 
181
181
  // Functions
@@ -238,7 +238,7 @@ const triggerEmit = _.debounce(() => {
238
238
  }, 100)
239
239
 
240
240
  // Immediate
241
- if (props.modelValue) dateTime.value = toLocalTimezone(props.modelValue, Time.getFormatTimezone())
242
- if (props.min) minDateTime.value = toLocalTimezone(props.min, Time.getFormatTimezone())
243
- if (props.max) maxDateTime.value = toLocalTimezone(props.max, Time.getFormatTimezone())
241
+ if (props.modelValue) dateTime.value = Time.convertToLocal(props.modelValue)
242
+ if (props.min) minDateTime.value = Time.convertToLocal(props.min)
243
+ if (props.max) maxDateTime.value = Time.convertToLocal(props.max)
244
244
  </script>
@@ -74,7 +74,7 @@ const computedButton = computed(() => {
74
74
  if (_.isEmpty(format)) format = _.get(Time.getFormat(), 'time.long')
75
75
  // compute label
76
76
  let label
77
- if (!_.isEmpty(computedModel.value)) label = moment(computedModel.value, mask).format(format)
77
+ if (!_.isEmpty(computedModel.value)) label = moment.tz(computedModel.value, mask, Time.getFormatTimezone()).format(format)
78
78
  else label = i18n.tie(props.placeholder)
79
79
  // define button spec
80
80
  const spec = {
@@ -36,7 +36,7 @@ export function useCollection (options) {
36
36
 
37
37
  // Functions
38
38
  function getService () {
39
- const service = api.getService(options.service.value, options.contextId ? options.contextId.value : null)
39
+ const service = options.getService?.value ? options.getService.value() : api.getService(options.service.value, options.contextId ? options.contextId.value : null)
40
40
  if (!service) {
41
41
  throw new Error('Cannot retrieve target service ' + options.service.value)
42
42
  }
@@ -111,18 +111,22 @@ export function useCollection (options) {
111
111
  }
112
112
  }
113
113
 
114
- const refreshCollection = _.throttle(() => {
115
- const fullQuery = {
114
+ function getFullQuery () {
115
+ return {
116
116
  $locale: getLocale(),
117
117
  ...getCollectionBaseQuery(),
118
118
  ...getCollectionFilterQuery(),
119
119
  ...getCollectionPaginationQuery()
120
120
  }
121
+ }
122
+
123
+ const refreshCollection = _.throttle(() => {
124
+ const fullQuery = getFullQuery()
121
125
  subscribe(fullQuery)
122
126
  }, options.refreshThrottle.value, { leading: false })
123
127
 
124
128
  function resetCollection () {
125
- // Do not reset the collection since it is initializing
129
+ // Do not reset the collection since it is initializing
126
130
  if (_.isNil(items.value)) return
127
131
  // Reset pagination and start again refreshing the collection
128
132
  if (options.appendItems.value) setCollectionItems([])
@@ -134,9 +138,30 @@ export function useCollection (options) {
134
138
  // When we append items some items of the previous pages might have been updated.
135
139
  // In this case we need to reset the full collection as Rx only tracks changes on the current page
136
140
  updatedItems = (Array.isArray(updatedItems) ? updatedItems : [updatedItems])
137
- // We keep order from the updated list as depending on the sorting criteria a new item might have to be pushed on top of current items
138
- updatedItems = _.intersectionWith(items.value, updatedItems, (item1, item2) => item1._id && item2._id && (item1._id.toString() === item2._id.toString()))
139
- if (updatedItems.length > 0) resetCollection()
141
+ // Update the required items
142
+ for (const updatedItem of updatedItems) {
143
+ const item = _.find(items.value, item => {
144
+ return updatedItem._id && item._id && (updatedItem._id.toString() === item._id.toString())
145
+ })
146
+ if (item) Object.assign(item, updatedItem)
147
+ }
148
+ // Some items might not match the query anymore so that we should remove it
149
+ const matcher = api.matcher(getFullQuery())
150
+ const matchedItems = updatedItems.filter(matcher)
151
+ const itemsToRemove = _.differenceBy(updatedItems, matchedItems, item => item._id ? item._id.toString() : null)
152
+ onItemsRemoved(itemsToRemove)
153
+ }
154
+
155
+ function onItemsRemoved (removedItems) {
156
+ // When we append items some items of the previous pages might have been updated.
157
+ // In this case we need to reset the full collection as Rx only tracks changes on the current page
158
+ removedItems = (Array.isArray(removedItems) ? removedItems : [removedItems])
159
+ // Remove the required items
160
+ for (const removedItem of removedItems) {
161
+ _.remove(items.value, item => {
162
+ return removedItem._id && item._id && (removedItem._id.toString() === item._id.toString())
163
+ })
164
+ }
140
165
  }
141
166
 
142
167
  // Lifecycle hooks
@@ -154,7 +179,7 @@ export function useCollection (options) {
154
179
  serviceEventListeners = listenToServiceEvents(getService(), {
155
180
  patched: onItemsUpdated,
156
181
  updated: onItemsUpdated,
157
- removed: onItemsUpdated
182
+ removed: onItemsRemoved
158
183
  })
159
184
  }
160
185
  })
@@ -23,7 +23,7 @@ export function useErrors () {
23
23
  // Check if user can retry to avoid this error
24
24
  if (error.retryHandler) {
25
25
  notification.actions = [{
26
- label: this.$t('RETRY'),
26
+ label: i18n.tie('RETRY'),
27
27
  handler: error.retryHandler
28
28
  }]
29
29
  // Increase timeout so that user has a chance to retry